Jump to content

Talk:Verhoeff algorithm

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Richwales (talk | contribs) at 20:50, 24 September 2006 (Wiki article is correct, Marist article is wrong). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Is this algorithm correct?

According to [1], 3170092 is also a valid number.

Using the algorithm here, that becomes:

  i    ni    p(i,ni)  previous
c
new c =
d(c,p(i,ni))
02202
19421
20516
30863
47836
51269
63396

Which one is incorrect? The wikiarticle? The other article? The fact that 3170092 is a valid number? Or have I made a mistake?

As best I can tell, the Marist College article you cited is wrong. The position-based permutation which Verhoeff settled on (the p table) is not a simple exponential of the group multiplication (the d table), as the article you found claims.
My understanding (from the first reference in the Wikipedia article) is that Verhoeff experimented with many different permutations before coming up with one that worked particularly well. A simple exponential permutation would actually be atrociously bad, since multiplication in the dihedral group contains two cycles of period 2 — namely, (14) and (23) — and one cycle of period 1 — namely, (0).
Richwales 20:50, 24 September 2006 (UTC)[reply]