order independent hash?

N

Neal Becker

I like to hash a list of words (actually, the command line args of my program)
in such a way that different words will create different hash, but not sensitive
to the order of the words. Any ideas?
 
8

88888 Dihedral

I like to hash a list of words (actually, the command line args of my program)
in such a way that different words will create different hash, but not sensitive
to the order of the words. Any ideas?

For each word of your list as the key, an object of a hash can be used further
is stored as the value in the hash of the list of words.

Assume that word 1 is the key and the hash stored is a sentence that uses
the key word 1.

This is very useful to learn vocabularies and writing sentences.
 
8

88888 Dihedral

I like to hash a list of words (actually, the command line args of my program)
in such a way that different words will create different hash, but not sensitive
to the order of the words. Any ideas?

For each word of your list as the key, an object of a hash can be used further
is stored as the value in the hash of the list of words.

Assume that word 1 is the key and the hash stored is a sentence that uses
the key word 1.

This is very useful to learn vocabularies and writing sentences.
 
I

Ian Kelly

For each word of your list as the key, an object of a hash can be used further
is stored as the value in the hash of the list of words.

Assume that word 1 is the key and the hash stored is a sentence that uses
the key word 1.

This is very useful to learn vocabularies and writing sentences.

The OP is talking about hash functions, not hash tables, and
furthermore he is talking about hashing the entire unordered
collection of words, not hashing individual words or ordered
sentences.
 
S

Steven D'Aprano

]


Dihedral, EVERY SINGLE ONE of your messages is double posted. You are
sending to the newsgroup and the mailing list, but they are aliases for
each other. Please stop double posting.
 
8

88888 Dihedral

]


Dihedral, EVERY SINGLE ONE of your messages is double posted. You are
sending to the newsgroup and the mailing list, but they are aliases for
each other. Please stop double posting.

A list can replace a hash. I knew that in lisp.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top