Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (20 sloc) 644 Bytes
This is one solution for the BitVector Genealogy puzzle from http://www.itasoftware.com/
It will get 100% accuracy on the small test data, but it can get close, but still incorrect results depending on the input.
---
BUILDING
---
My solution use the Qt library and qmake to build the source.
qmake
make
./bitvectors-genealogy [file]
---
TESTS
---
The test directory contains a small program that will generate a test problem and solution. It takes one argument to specify the size and generates a bits file and a parents file.
cd test
qmake
make
cd ..
test/test 1000
./bitvectors-genealogy bits.txt > guess
diff -wu parents.txt guess