alexbowe / debdec

Python library for efficiently decodable de Bruijn sequences (WiP).
7 stars 0 forks source link

String of 1s for length-six binary sequence decoding incorrectly #1

Closed alexbowe closed 10 years ago

alexbowe commented 11 years ago

To reproduce:

decode_db(6, [1,1,1,1,1,1]) 35 #should be 29

This means there is probably an incorrect calculation in f2n(), and probably affects more than the 2,6 sequence.

This could be a programming error, or could be a bug from the text itself (which has confirmed errors). Knuth has a fixed version (in Mathematica) at http://www-cs-faculty.stanford.edu/~knuth/programs.html under "co debruijn", although it is a little hard to follow.

First, it is probably best to double check in text (the answer for problem 99).

floere commented 11 years ago

Wouldn't it be a good idea having tests now? :)

alexbowe commented 11 years ago

Yup! I have some, but haven't merged my tests branch yet. Soon ;)

On 2013年7月30日Tuesday at 18:07, Florian R. Hanke wrote:

Wouldn't it be a good idea having tests now? :)

— Reply to this email directly or view it on GitHub (https://github.com/alexbowe/debdec/issues/1#issuecomment-21834236).

floere commented 11 years ago

:+1: