So, here's once again this article from topcoder about combinatorics. After the article successfully describes what theory it will use: Combinations/Permutations, it goes into an application for it, ie. Binary Vectors. There are a number of properties for them that I don't quite understand, especially this one (#3)
- The number of ordered pairs (a, b) of binary vectors, such that the distance between them (k) can be calculated as follows:
Where does this formula come from?
Moreover, there's an example about the previous formula statement:
The distance between a and b is the number of components that differs in a and b — for example, the distance between (0, 0, 1, 0) and (1, 0, 1, 1) is 2).
Could someone please explain to me how does binary vector(s) distance is done? I need to know the basics and I'm afraid I can't find anything useful or concise using Google.
Thanks in advance!