Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Are ordered hashes useful?
- Date: Sat, 12 Feb 2011 21:19:08 +0900
- From: Raymond Wan <rwan.kyoto@example.com>
- Subject: Re: [tlug] Are ordered hashes useful?
- References: <4D4E75AB.5060703@example.com> <4D4FB368.4010403@example.com> <AANLkTimk8AUJMRiwbPjGfDfciCwfaQr9_o3vBXtW2+rW@example.com> <87lj1rza76.fsf@example.com> <AANLkTikqy8G6G1Pt3ramSqxKHKJHSpo=zjHYLVENW0Gb@example.com> <878vxqyfok.fsf@example.com> <AANLkTinyP3HG_7H+qf5BeDikJ_kMSLvxU=EcRYyMubZ0@example.com> <8762suy66k.fsf@example.com> <AANLkTin3X1uhvUNooaMk5OD6y36H23U6dceFBmK7885M@example.com> <AANLkTi=bAnQoetsFvLJJvKE3q+zZQ3gPu4CDrGppdVmN@example.com> <AANLkTi=Hs_q1o8dQ7ASeHVv6qgPvzNzBE5cD3ZBn-PzV@example.com> <AANLkTim4_28yMtqRfhgcgjHrFYe17_oj5wsB5_5+6a4O@example.com> <19797.26672.150768.197652@example.com>
On Sat, Feb 12, 2011 at 1:47 AM, Stephen J. Turnbull <stephen@example.com> wrote: > Raymond Wan writes: > > > 2) The other reason is to give a unique key through hashing. For > > security reasons, you probably want the result of hashing to be > > different between program runs or between systems or something. > > But a hash can't do that, it's a deterministic algorithm and therefore > always gives the same answer from the same inputs. The unifying > concept is "uniform chaotic distribution of values". "Uniform" means > that no value is more probable than any other, so risk of collision is > minimized. "Chaotic" means that inputs that are "close" to each other > do not give close outputs more frequently than they give widely > separated outputs. Yes, you are right -- a hash cannot do that. But I think the blurring of the terminology has allows this definition to seep in (somehow). I guess some people consider any type of mapping (deterministic or not) to be a hash. For me, it would have to be deterministic; if it isn't, I wouldn't call it a hash. Maybe just "mapping" or something... For what it's worth, I just encountered an area where a one-to-one mapping with 0 chance of collisions to be called "hashing". IMHO, it's more an array lookup... I also don't consider this as hashing, but it's been in use for a while and is sort of taking on a life of its own. And BTW, I guess this post of mine is a bit unrelated to your original question -- sorry! Even if hashing is deterministic, we still cannot (without more work) recover the order in which the objects/items were hashed. And that was the question you posed, I think. I guess this would require an additional data structure on top of the hash table? Ray
- References:
- [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Dave M G
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Raymond Wan
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Josh Glover
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Stephen J. Turnbull
- Re: [tlug] [Javascript] Shouldn't there be a sort option on objects
- From: Josh Glover
- [tlug] Are ordered hashes useful?
- From: Stephen J. Turnbull
- Re: [tlug] Are ordered hashes useful?
- From: Josh Glover
- Re: [tlug] Are ordered hashes useful?
- From: Stephen J. Turnbull
- Re: [tlug] Are ordered hashes useful?
- From: Josh Glover
- Re: [tlug] Are ordered hashes useful?
- From: Kenneth Burling
- Re: [tlug] Are ordered hashes useful?
- From: Josh Glover
- Re: [tlug] Are ordered hashes useful?
- From: Raymond Wan
- Re: [tlug] Are ordered hashes useful?
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Are ordered hashes useful?
- Next by Date: Re: [tlug] Are ordered hashes useful?
- Previous by thread: Re: [tlug] Are ordered hashes useful?
- Next by thread: Re: [tlug] Are ordered hashes useful?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links