6502's cornerThe enlightened frogs
2005-06-25
Index

Welcome!
Who am I
Demo
Documents
Small ones
Problems
Chess
Images
Music
My blog
Write me

Versione italiana 


The enlightened frogs

There are 100 lights initially all turned on in a line, numbered from 1 to 100. If you press a lightbulb it will turn on if it's currently off, or it will turn off if it's currently on.

There are also 100 frogs. The first frog jumps over all the lights so turning them off. When it's arrived the second frog starts from the second light and jumps on every other light (i.e. on the lights 2, 4, ..., 98, 100) turning back on all the lights with an even number. When the second frog it's arrived the third frog starts from the third light and jumps on a light every three (so on the lights 3, 6, 9, ..., 96, 99 - see figure above) turning on the lights it finds off and turning off the lights it finds on. The 100 frogs all follow this pattern (e.g. the 18th frog starts from the 18th light and jumps on one light every 18); the last (100th) frog jumps only on the last light (number 100).

When all frogs ended their dance, which lights are on and which ones are off ?

Click on the right arrow to see the solution or on the left arrow to go back to the problem list.