🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.mathematics
Article #61

Re: Product and sum of integer array as test for repeats

#61
From: Bruce Varley
Date: Sun, 22 May 2011 13:03
25 lines
2558 bytes
<kym@kymhorsell.com> wrote in message 
news:4dd8e833$0$22474$afc38c87@news.optusnet.com.au...
> Bruce Varley <bv@nospam.com> wrote:
> [...]
>
> What you may be looking for is a "perfect hashing" scheme.
> While Don Knuth wrote in his book such schemes might be very dificult
> to find, quite a few are now known.
>
> Give it a Google.
>
> There is also a UNIX/Linux/GNU tool called "gperf" that creates perfect
> hash tables for strings (normally used for reserved word or keyword 
> lookup)
> that might either do what you want or be adapted.
>
> -- 
> "Denialism"? Is that a word?
>  -- Mickey Langan, Sun 2 Jan 2011 4:50 pm

Thanks, I'll follow that up. This function has to run on a specialised 
industrial platform with minimal capabilities (yes, amazingly they do still 
exist), classical algos such as hashing are likely to be OTT. I have a 
couple of workarounds up my sleeve. Cheers 
Technical Details
Message-ID: <3JCdnY22mZkElETQnZ2dnUVZ8vKdnZ2d@westnet.com.au>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail
References: <sfednZKGnKXCJkrQnZ2dnUVZ8vSdnZ2d@westnet.com.au> <4dd7cb2e$0$24911$afc38c87@news.optusnet.com.au> <UN-dndWEaNQEeUXQnZ2dnUVZ8j6dnZ2d@westnet.com.au> <4dd8e833$0$22474$afc38c87@news.optusnet.com.au>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d67e,14bbc351f4d58412
X-Google-NewGroupId: yes
X-Google-Attributes: giddfcd5d83b8,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 22 May 2011 08:03:20 -0500
From: "Bruce Varley" <bv@NoSpam.com>
Newsgroups: aus.mathematics
References: <sfednZKGnKXCJkrQnZ2dnUVZ8vSdnZ2d@westnet.com.au> <4dd7cb2e$0$24911$afc38c87@news.optusnet.com.au> <UN-dndWEaNQEeUXQnZ2dnUVZ8j6dnZ2d@westnet.com.au> <4dd8e833$0$22474$afc38c87@news.optusnet.com.au>
Subject: Re: Product and sum of integer array as test for repeats
Date: Sun, 22 May 2011 21:03:18 +0800
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090
X-RFC2646: Format=Flowed; Original
Message-ID: <3JCdnY22mZkElETQnZ2dnUVZ8vKdnZ2d@westnet.com.au>
Lines: 27
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 124.169.160.145
X-Trace: sv3-EeUSmWzRAgBlHEP5TbENzfeav4sX/IANQxdsVq1AFLbZtcbwq+R27xoFsL+OPMtwJT1h4bnOm3pm0Gy!fruxaRBh12sa5s6wMa7siWk8IMgZN6HzK27QhhKWfpXAD766knySJ0v9QX/uoxCepOduugr12Ctf!T/WNXqYrDPdx18hLUinxdPY=
X-Complaints-To: abuse@westnet.com.au
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2217