Basic C Question

Re: Basic C Question

Post by thetan on Sun May 22, 2011 12:08 pm
([msg=57662]see Re: Basic C Question[/msg])

No, this isn't an issue of over thinking the problem at all. The problem has been solved by both of us n fairly simple and straight forward manners.

The last few exchanges between us has been about the proper naming of data structures. You seem to insist that the data structure you used is a hash table, which it is not. In terms of over thinking what a hash table is, thats nonsense.

This last argument of yours is like saying "AVL Tree: Theres no 2 child elements per node? no rebalancing on arbitrary depth? doesn't rebalance by doing right and left shifts depending on the current depth pattern? ... You're over thinking the problem" No it's not over thinking the problem because _thats what an AVL tree is_.

And it's also like saying "Bloom Filter: isn't all in memory? doesn't use a bit array as a truth table? isn't a probabilistic datastructure? ..... You're over thinking the problem" Once again thats not over thinking anything, thats simply what a bloom filter is.

Much to the same degree in which a hash table by definition transforms keys, must consider hash collision and manage buckets.
"If art interprets our dreams, the computer executes them in the guise of programs!" - SICP

Image

“If at first, the idea is not absurd, then there is no hope for it” - Albert Einstein
User avatar
thetan
Contributor
Contributor
 
Posts: 653
Joined: Thu Dec 17, 2009 6:58 pm
Location: Various Bay Area Cities, California
Blog: View Blog (0)


Re: Basic C Question

Post by tgoe on Mon May 23, 2011 9:36 am
([msg=57677]see Re: Basic C Question[/msg])

A hash function takes an input and returns a number, said number is used in a calculation that determines the memory address of the value to be associated with the input. It's that simple. Key transformation isn't strictly necessary and collision management only needs to take place when a collision is possible. When the key space is small it's easy to write a hash function which doesn't map 2 or more inputs to the same number. You're talking about more complicated hashing systems where the key space is infinite (arbitrary strings, for instance) and the table itself is finite (available memory).

I'm beginning to think that we aren't going to convince each other.

lol two tech nazis walk into a bar...
User avatar
tgoe
Contributor
Contributor
 
Posts: 527
Joined: Sun Sep 28, 2008 2:33 pm
Location: q3dm7
Blog: View Blog (0)


Previous

Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests