The commands below change a frog’s color. Each command has the form “If ... then ...” or “If ... then ...; otherwise ...”. Initially the frog has an unknown color. Which commands make the frog blue?
Editorial execution convention: execute the lines in order, testing each condition against the current color after any preceding change. Select all valid options.
If the frog is red, color it blue; otherwise color it yellow.
If the frog is yellow, color it red; otherwise color it blue.
If the frog is yellow, color it red.
If the frog is not yellow, color it blue.
If the frog is red, color it blue.
If the frog is not red, color it blue.
Bill puts treasure in a maze and sends George the following instruction.
The source says that George must take 6 steps left, 4 steps right, 1 step left and 2 steps right, and illustrates the following path.
Which instruction can lead to the treasure along this target path?
Editorial interpretation: compare the lengths of successive horizontal and vertical runs in the drawings; the source’s direction wording is discussed in the solution.
A beaver can follow the arrows through a maze to get home, as in this example.
In the following maze, however, the arrows would make the beaver get lost. What is the minimum number of arrows that must be changed so it can get home?
Each figure and its three successive 90° clockwise rotations correspond, in order, to four consecutive letters of the English alphabet. This example gives the letters encoded by the first figure and its rotations.
Which string could be encoded by the following sequence?
Alice, Bob, Chris, Dani and Emily each have a secret number. The five numbers are distinct positive three-digit integers, each using three different digits from 1 to 5.
- If the hundreds digit is 4, the tens digit is not 3.
- The units digits of Alice, Dani and Emily are respectively 5, 2 and 3.
- The hundreds digits of Chris and Emily are respectively 5 and 2.
- If the units digit is 2, the hundreds digit is 4.
- Bob’s tens digit is 2.
Which list, in the order Alice, Bob, Chris, Emily, Dani, could give their numbers?
Beavers A and B chase one another on the following maps. They always stand on black dots. A first jumps to an adjacent dot; then B jumps to an adjacent dot, and they continue alternating. B wins if B jumps onto the dot currently occupied by A. In which case does B have a chance to win?
Five tasks A,B,C,D,E must be assigned to five beavers, one task to each.
- Beaver 1 can do A or B.
- Beaver 2 can do C or D.
- Beaver 3 can do B or E.
- Beaver 4 can do C or E.
- Beaver 5 can do A, B or D.
How many assignments give each beaver a suitable task?
Robots are assembled from a head, body and legs supplied by three conveyors.
- Heads repeat: circle, square, triangle.
- Bodies repeat: blue, yellow, red, purple.
- Legs repeat: one leg, two legs, three legs.
The first robot has a circular head, a blue body and one leg. What does robot number 2022 look like?
Three lamps change color continuously according to these repeating rules.
- Lamp I cycles blue, red, purple, yellow, changing every 3 seconds.
- Lamp II cycles blue, purple, yellow, changing every 4 seconds.
- Lamp III alternates blue, red, changing every 5 seconds.
Just now lamps I,II,III have respectively changed to blue,purple,red. How long until their colors are respectively red,purple,blue?