"Is dot a fact?"

You're presented with a five-by-five grid of dots.

Each dot is assigned a label from 1 to 25 going across the rows and down. Thus, the top-left dot is number 1; the bottom-left dot is 21.

Your job is start at dot number 1 and to go from dot to dot and draw a picture. How do you know what dot to go to? Well, each dot has (below) a statement followed by two instructions; if the statement is true, follow the first instruction; if the statement is false, follow the second. It looks like this:

Dot number in boldface Statement followed by a period (full stop). instruction if true followed by a semicolon; instruction if false

p in any instruction or statement refers to the dot you just visited, or its number. (It stands for "previous".)

How to read the instructions: Each instruction has one of three forms: end means you're done. jump x means you should now visit x, but don't draw a line on the grid from where you are to x. walk x means you should now visit x, and draw a line to get there. Arithmetic yielding x should be done modulo 25; thus, "2p" means you multiply 2 by p and, if necessary, take the result modulo 25 to yield a number from 1 to 25.

The statements and instructions:

1 The answer after this one is true. jump 10; jump 7
2 You've never visited 2p. walk p+4; end
3 You've visited 15p. walk 11; jump 21
4 You'll visit p. jump 2p; jump 3
5 You've taken fewer than half the steps of the entire route. walk 2p; jump 15
6 You've taken more than half the steps of the entire route. walk 10p ; walk p−9
7 The answer before this one is false. walk 11; jump 19
8 The answer before this one is false. walk 19; jump 7
9 The answer before this one is false. walk 22; jump 22
10 This is the first time you're at 10. walk p−5; jump 3p
11 You will visit p. walk 7p; walk 24
12 You will not visit p. end; jump 15
13 You will visit p. walk p; jump p+2
14 You have visited 9. jump 1; walk 9
15 You have visited p−2. jump p; end
16 You have visited p−2. jump 2p; jump p
17 You will not visit 3p. jump 13p; end
18 You have visited 2p. jump 3p; jump 2p
19 You have visited p+2. walk 2p; jump p−2
20 This is the 2nd time you're at 20. walk 1; jump 6
21 This is the 1st time you're at 21. jump 4; jump 3p
22 This is not the 1st time you're at 22. walk 21; jump 5
23 The answer before this one is true. jump 5; jump 7
24 When you were just at p, that was your 1st time there. jump p−8; jump p+8
25 You will not visit 14. walk 17p; jump 8

Nitty-gritty details of terminology: Every time you're at a dot, it's called "visiting" it, including the initial visit to dot 1. Every time you walk or jump from dot to dot, it's called a "step"; all the steps constitute the "route". References to "before" and "after" refer to the order along the route, not the usual order of integers. Past and future tense in the statements (e.g. "you will visit 9") refer to the past and future relative to your current visit, and do not refer to the entire route.

Many thanks to Games and Alconja for ideas. This is my first puzzle of this type, and I'd appreciate feedback (in chat is probably best).

Start at 1.
"The answer after this one is true. jump 10; jump 7."
Assume this is false: the answer after this is false and we jump to 7. The statement at 7 is "The answer before this one is false. walk 11; jump 19." Note that this is a contradiction because statement 7 is true but we were assuming it should be false. Therefore the first statement should be true.

"This is the first time you're at 10. walk p−5; jump 3p."
As noted by the previous step, plus this is indeed the first time at 10. Then this is true.

Walk to 1-5=21.
"This is the 1st time you're at 21. jump 4; jump 3p."
This is the first time at 21 too so true.

"You'll visit p. jump 2p; jump 3."

Here, actually the answer cannot be determined intuitively (at least for me), so we will make a branch.

Suppose it is false:

So we will not visit 21 again.

"You've visited 15p. walk 11; jump 21."
This is true because we have visited 15x4=10.

Walk to 11.
"You will visit p. walk 7p; walk 24."
Assume this is true, then we will walk to 7x3=21. But we had a promise not to visit 21 again. So this is false and we will not visit 3 again.

Walk to 24.
"When you were just at p, that was your 1st time there. jump p−8; jump p+8."
This is true as that was our 1st time at 11.

But... we had a promise not to visit 3 again, right? So this is a contradiction thus we should backtrack to the 3rd step!

And suppose it is true:

Then we will visit again the 21.

"You will not visit 3p. jump 13p; end."
Assume that this is false then we end our journey and not visiting 21 again: contradiction. That means this should be true and we will not visit 3x4=12 again.

"You've never visited 2p. walk p+4; end."
Because we've never visited 2x17=9, then this is true.

Walk to 17+4=21.
"This is the 1st time you're at 21. jump 4; jump 3p."
This is our 2nd time, and yes we are visiting 21 again! Now, this statement is false.

"You've taken more than half the steps of the entire route. walk 10p; walk p−9."
Assume this is false, so we will have at least 7 more steps and walk to 21-9=12. The statement at 12 is "You will not visit p. end; jump 15." This should be false otherwise our journey will end too early. So we will visit 6 again and jump to 15. The statement at 15 is "You have visited p−2. jump p; end." This is true because we've visited 10. So we jump to 12. Back at 12, we have to end our journey because we would have promised not to visit 15 again and suddenly jump to 15. This is also too early to stop. Therefore our initial assumption is incorrect. It should be true.

Walk to 10x21=10.
"This is the first time you're at 10. walk p−5; jump 3p."
This is the second time so false.

"You have visited 2p. jump 3p; jump 2p."
This is false because we haven't visited 2x10=20 yet.

"This is the 2nd time you're at 20. walk 1; jump 6."
This is false because it's our 1st time.

"You've taken more than half the steps of the entire route. walk 10p; walk p−9."
This is true because we stated that we already had taken more than half the steps before.

Walk to 10x20=25.
"You will not visit 14. walk 17p; jump 8."
Assume this is false, jumping to 8 will then lead to either 19 or 7, and then will lead to another dots. This is incorrect because we should end our journey in the next visit (by the statement at 6.) Thus this is true.

Walk to 17x6=2.
"You've never visited 2p. walk p+4; end." This is false because we already visited 2x25=25. Therefore, we end our journey here.

Thus, the final answer will be:

A star!

P.S. Thanks to @DanielMathias for acknowledging my mistake on the previous answer. Also for @msh210, this surely is a fun and sweet puzzle! I'm looking forward to the next one, and I'm pretty sure there might be many variations available in the future to this type of puzzle. :)

• At "Jump to 2x10=20" you note that this is false, but proceed with instructions for true. Apr 19, 2020 at 1:57
• @DanielMathias gah my bad, will try to correct it, thanks! Apr 19, 2020 at 3:03
• @ShawnBalestracci Yes it refers to the previous question (question 1) but it also indeed states about the question 7. Apr 19, 2020 at 3:23
• Thanks for your remarks. Well solved! You've a slight error in the branch when you go to 15, but there general idea is correct. Apr 19, 2020 at 4:58