Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That sequence has 2^2=4 positions. I don't think rflrob meant "n = number of bits" but "n = number of codes".


Ah, I see what you mean. [000, 001, 011, 111, 101, 100] is a grey code of length 6, so not power of two is possible. However trying to come up with an odd length code is a real head scratcher. It may not be possible in binary, but is easily accomplished in higher bases.


You couldn't do an odd number of codes, but if you have an odd number of positions, I suppose you could have one position represented by two adjacent codes. So, you could have a wheel with 5 equal pie slices, but on the reverse, one of those slices is divided in half, with a different encoding on each, that both resolve to the same value/result.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: