100 doors in a Row - solution incomplete?
Isnt the the 100 doors in a row solution missing a case?
Prime Numbers have only 2 factors - The number itself and 1. For example: 7 has only 2 factors 1, 7. If all the doors are closed at start, then prime number doors will remain closed at the end as well.
Please let me know if this is a valid case.
Wednesday, December 10, 2003
That case is essentially covered - that door has an even number of unique divisors - just like the 42nd door in the example (1, 2, 3, 6, 7, 14, 21, 42) - thus it is closed.
Only doors with an odd number of unique divisors will remain open (that being those which are square numbers and thus repeat a divisor).
Friday, December 12, 2003
Fog Creek Home