Imagine an array of 3 x 7 lights. Lights can be on or off. Show that no matter which lights you turn on or off, you will always be able to find four lights forming the corner of a rectangle, either all on or all off.
Given 3 columns x 7 rows.
1. Every row is guaranteed at least a pair of lights that are on or off.
2. Skip all on or off for a second since this would match any other
combination. If any row matches another row, you have a rectangle.
3. Not counting the all on and all off combinayions, There are 3 combinations for 2 on. and 3 combinations for 2 off.
4. If you set 6 rows to the 6 distinct combinations, then for the 7th
row if you repeat any row you have a rectangle. Use either of the all
on or all off for the 7th row, and you get a rectangle.
<br><br>
So it's impossible not to get a rectangle with 7 rows.;
|
Posted by bob909
on 2004-09-14 20:45:11 |