Problem: Let be the set of all binary integers that can be written using exactly 5 zeros and 8 ones where leading zeros are allowed. If all possible subtractions are performed in which one element of is subtracted from another, find the number of times the answer 1 is obtained.
First note that it is impossible to just have the two numbers end in a and a . This is because we have an uneven number of and remaining, and they can not cancel each other out to make . Thus, we need to add constraints to these numbers in order to achieve the task. Next note that , so an option is to force the two numbers to end in and . This works, because now we have an even number of zeros and ones distributed among the remaining digits of the two binary integers.
Thus, when we place the integers as explained, we have 0s and 1s to distribute among the remaining digits of either number. (We say either because we we will then place the digits of the other integer to match up with the digits of the first integer) Thus we can say that we are choosing places out of spots to put the four we need to complete the requirements, and we have ways to arrange the digits.
An example of two integers that work is