Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16565

Re: order independent hash?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.048
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'args': 0.05; 'am,': 0.12; 'stored': 0.13; 'wednesday,': 0.15; 'ideas?': 0.16; 'sentences.': 0.16; 'subject:independent': 0.16; 'unordered': 0.16; 'wrote:': 0.18; 'functions,': 0.18; 'dec': 0.22; 'assume': 0.22; 'header:In- Reply-To:1': 0.22; 'command': 0.24; 'message-id:@mail.gmail.com': 0.28; 'hash': 0.30; 'key,': 0.30; 'received:mail- bw0-f46.google.com': 0.30; 'subject:?': 0.31; 'words,': 0.32; 'list': 0.32; 'received:209.85.214': 0.32; 'object': 0.33; 'fri,': 0.34; 'to:addr:python-list': 0.34; 'ordered': 0.34; 'uses': 0.36; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'useful': 0.38; 'received:209': 0.40; 'to:addr:python.org': 0.40; '2011': 0.61; 'your': 0.61; 'order': 0.62; 'further': 0.64; 'tables,': 0.67; 'collection': 0.69; '30,': 0.74; '11:18': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=fhm814lP+Z7Y0rvzcgRw3ar4oL3vom5CtZ/VuYuJB3k=; b=waXEtNBo8e99N3GyVpKyte/QOFeB5z4SBgGzjNv95n9w0WO98+cybDPrgp+YIyAlC1 tYs3u7se6hYLLKwXg1BcnmfzoAXV7xwZBr1Q6yfEJ04utZbKAmv4/+UscE3wNPBeq/no wy750Ym/+XRJqD6KVhYqpHOkxDD9Z6f4VwoM8=
MIME-Version 1.0
In-Reply-To <14681078.446.1322849892244.JavaMail.geo-discussion-forums@prmw23>
References <mailman.3154.1322656374.27778.python-list@python.org> <14681078.446.1322849892244.JavaMail.geo-discussion-forums@prmw23>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Fri, 2 Dec 2011 11:37:26 -0700
Subject Re: order independent hash?
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3234.1322851079.27778.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1322851079 news.xs4all.nl 6876 [2001:888:2000:d::a6]:44649
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:16565

Show key headers only | View raw


On Fri, Dec 2, 2011 at 11:18 AM, 88888 Dihedral
<dihedral88888@googlemail.com> wrote:
> On Wednesday, November 30, 2011 8:32:39 PM UTC+8, Neal Becker wrote:
>> 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.

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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

order independent hash? Neal Becker <ndbecker2@gmail.com> - 2011-11-30 07:32 -0500
  Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 10:18 -0800
  Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 10:18 -0800
    Re: order independent hash? Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-02 11:37 -0700
    Re: order independent hash? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-03 01:04 +0000
      Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-03 08:36 -0800

csiph-web