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

Bishops only need 5 bits instead of 6 (they can't move to a square of different color), shaving 2 bits and thus reaching exactly 26 bytes.

BTW 495 can be computed as a binomial coefficient C(8+5-1,5-1), the number of combinations of 8 elements chosen with repetitions from 5 elements.



Should be able to shave 4 bits, cause there's four bishops?


Doh of course. But the 26 bytes + 2 bits irritated me so I didn't think about it.




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

Search: