JK, you are right.A bit pattern like: 10101100Can be intepreted as: ()()(())The function cycles through all bit patterns of the appropriate length and eliminates those that fail the three tests described below.The tests depend on calculating the sums of the bit patterns, with 0 being replaced by -1. e.g. sum(1100) = 1 + 1 - 1 - 1 = 0 Here are the tests:(1) sum(bitpattern) = 0Here is an example whic