|
||||||||||||
|
||||||||||||
| ||||||||||||
Tony, There are 32 "combinations" (subsets) of a collection of 5 objects. One way to generate them uses binary representations. This is good for a programmer. Assign each of the 5 people a number that will correspond to a bit position. If you then count from 0 to 31 and look at the binary representation of each number, you get a different combination each time. The people included are those for whom the bit position corresponding to their number holds a 1. For example 25 = 11001 corresponds to persons 1, 2, and 5 (if bits are numbered from the left), and 0 = 00000 corresponds to the empty collection (no people). The converse is also true, given any subset of the 5 people, the binary number formed by putting a 1 in the corresponding position when the person is in the subset and 0 otherwise lies between 0 and 31, inclusive. Victoria | ||||||||||||
|
||||||||||||
Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences. |