1
$\begingroup$

You are on a grid, that looks like this:

01-02-03-04
 |  |  |  |
05-06-07-08
 |  |  |  |
09-10-11-12
 |  |  |  |
13-14-15-16

You start on 01, and you must end up on 16. You may go in any of the 4 directions (up, down, left, right). Easy, right? WRONG. Here's the catch:
If you go up, add where you end up. If you go down, subtract where you end up. If you go left, add 2. If you go right, subtract 2. You may start with any number, but you must end up with EXACTLY 0. Is it possible if you start with a running total of 0? If yes, how? If no, why? And which numbers can make it to 16 with 0? You may not use loops, because it's ridiculously easy to get to 0...(Example: if you want to get to 16 from 12, you must have 16, if you get there from 15, have 2)

Note: This is called Square of Numbers simply because there will be larger and larger squares each time we go up.

$\endgroup$
4
  • 2
    $\begingroup$ You start on 01 but you may start with any number? Does that mean the "running total" can be anything you like? Couldn't I just reverse engineer to end up with 0 on 16? For example, I start on 01 with 33 and then go down (-5), down(-9), down(-13), right(-2), right(-2), right(-2) to land on 16 with 0. $\endgroup$
    – hexomino
    Commented Jul 15, 2020 at 9:24
  • $\begingroup$ Yes, you can start with any number. But the goal is to reach 16 with 0 as the start and 0 as the end. This is the result of an edit clarifying things and adding things too. $\endgroup$
    – Player1456
    Commented Jul 15, 2020 at 9:44
  • $\begingroup$ "start with any number" is too ambiguous. Do you mean start at any location, or start with any number as your running total? $\endgroup$ Commented Jul 15, 2020 at 10:09
  • $\begingroup$ Start with any number as the running total. But is it possible with 0? That is the question. $\endgroup$
    – Player1456
    Commented Jul 15, 2020 at 10:10

2 Answers 2

2
$\begingroup$

I don't think there is any way to find out all possibilities without essentially using brute force. I wrote a computer program to traverse all possible non-intersecting paths ending at the 16 square, and calculate their running totals. The results are listed below, where for each square all possible starting totals are listed with which you can reach square 16 with a zero total.

1: 33-51
2: 31-49
3: 29-42
4: 27-40
5: 28-50
6: 26-51
7: 24-38, 41-43, 46-49
8: 22-34
9: 19-22, 24-40, 42, 45
10: 17-43, 45
11: 15-25, 28-32, 34-38, 40-41
12: 13-22, 25
13: 6, 11-13, 16-31, 33, 36
14: 4, 9-11, 14-28, 31
15: 2, 7-9, 12-26, 29
16: 0


Note: I have removed my previous answer that was written before the question was updated to ban loops, and which was incorrect anyway.

$\endgroup$
7
  • $\begingroup$ You just made me realize how stupidly easy my work was. My bad. I banned loops, because my brain forgot to. Sorry! $\endgroup$
    – Player1456
    Commented Jul 15, 2020 at 9:57
  • 1
    $\begingroup$ Did one (or both, @Player1456) of you get the up/down subtraction/addition directions reversed, by any chance? $\endgroup$
    – Bass
    Commented Jul 15, 2020 at 10:10
  • $\begingroup$ ...I don't get it. No, but the loops are banned. $\endgroup$
    – Player1456
    Commented Jul 15, 2020 at 10:11
  • 1
    $\begingroup$ @Player1456 Going up to 12 and down to 16 doesn't add 4, it subtracts 4, so your edit to the question seems to suffer from the same error as this answer. $\endgroup$
    – Bass
    Commented Jul 15, 2020 at 10:14
  • $\begingroup$ ...what do you mean? $\endgroup$
    – Player1456
    Commented Jul 15, 2020 at 10:16
3
$\begingroup$

This is impossible. To reach 16 one must take 3 more moves to the right than moves to the left, which gives a total of -6. If you are at one row than moving up and down again (maybe in a different column) yields a negative 'income' from vertical movement: the numbers to be added (in the row above) are smaller than all numbers in the current row, which will be subtracted. So one cannot compensate the -6 that one gets from doing steps to the right. And one always ends with a negative total.

$\endgroup$
2
  • $\begingroup$ This looks right, and it seems to be still true regardless of the starting position (unless we start on the 16 square which is the trivial case). $\endgroup$
    – hexomino
    Commented Jul 15, 2020 at 10:27
  • $\begingroup$ Good observation, but I can't give both answers the "correct" mark... you get the upvote instead. Sorry... $\endgroup$
    – Player1456
    Commented Jul 16, 2020 at 2:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.