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

It also works for Hamming distance of bit strings. For an n-bit string there are C(n,k) ways of achieving a Hamming distance of k, for example there is only 1 string with distance 0 (the original string) and 1 string with distance n (the complement of the original string), and everything in the middle goes first up and then down—following the components of Pascal's triangle.

This could also be viewed as, for example, the distance along edges from one corner of an n-dimensional hypercube to other corners. There is 1 corner where you don't move at all and 1 corner where you move in every dimension, and the largest number of corners in which you move in half of the dimensions.

I agree with your intuition that this phenomenon will apply to a whole lot of contexts and situations.



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

Search: