generate de bruijn sequences
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example readme and example Mar 6, 2013
test
.travis.yml
LICENSE
index.js algorithm from wikipedia Mar 5, 2013
package.json package.json etc Mar 5, 2013
readme.markdown

readme.markdown

de-bruijn

generate DeBruijn sequences

You can use DeBruijn numbers to crack combination locks.

browser support

build status

example

var deBruijn = require('de-bruijn');

var a = Number(process.argv[2]);
var b = Number(process.argv[3]);

var xs = deBruijn(a, b);
console.log(xs.join(''));
$ node example/seq.js 2 3
00010111
$ node example/seq.js 10 3
0001002003004005006007008009011012013014015016017018019021022023024025026027028029031032033034035036037038039041042043044045046047048049051052053054055056057058059061062063064065066067068069071072073074075076077078079081082083084085086087088089091092093094095096097098099111211311411511611711811912212312412512612712812913213313413513613713813914214314414514614714814915215315415515615715815916216316416516616716816917217317417517617717817918218318418518618718818919219319419519619719819922232242252262272282292332342352362372382392432442452462472482492532542552562572582592632642652662672682692732742752762772782792832842852862872882892932942952962972982993334335336337338339344345346347348349354355356357358359364365366367368369374375376377378379384385386387388389394395396397398399444544644744844945545645745845946546646746846947547647747847948548648748848949549649749849955565575585595665675685695765775785795865875885895965975985996667668669677678679687688689697698699777877978878979879988898999

methods

var deBruijn = require('de-bruijn')

var xs = deBruijn(k, n)

Return an array xs with the de Bruijn sequence for k digits of order n.

install

With npm do:

npm install de-bruijn

license

MIT