You are on page 1of 13

1

The nine dots puzzle extended to n^2 dots
Marco Ripà, sPIqr Society, Apr 01 2013

Figure 1: The 9 dots puzzle/solution

Problem 1:
Considering the nine dots puzzle (see http://en.wikipedia.org/wiki/Thinking_outside_the_box) simplest extension, I show that you can solve it (4x4 dots grid fitting all dots into the center with straight, thin, lines) staring from any dots of the grid. Just take a look at the picture below:

Figure 2: The 16 dots // 6 lines puzzle solutions (starting from any dots).

2

Problem 2:
Considering a generic nxn grid, what is the minimum number of straight lines that you need to fit all the dots (without lifting the pencil from your paper)?

Answer: for n=1, you need (at least) 1 line; for n=2, you need (at least) 3 lines… and, for n≥3, you need (at least) 2*n-2 lines. To understand this result, you can look at the following solving pattern, using the same strategy to solve any nxn puzzle (for n>3). You can easily see that you need two more lines for any n’:=n+1 square.

Figure 3: To fit nxn dots (into the center and without lifting your pencil from the paper), for n≥3, you need (at least) 2n-2 straight lines.

N.B. A consequence of this proof is that, for n→∞, the size of the paper that you need to draw your solution with your pencil, tends to be the same one of the area encompassed by the most external dots.

3

Figure 4: The square spiral proof (2*n-2 straight lines proof). If n’:=n+1, you have to draw one horizontal and one vertical line more... a square spiral, indeed.

Figure 5: Solving the nxn problem inside the box for n=5. For n>5, it is possible to solve any nxn puzzle inside the box just using the square spiral method.

4

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Figure 6: Smart cheating...

5

nxnxn Dots Puzzle in 3D and its Generalization to K-Dimensions!
Marco Ripà, sPIqr Society, May 01 2013

I am glad to announce that I have just solved the nxnx...xn dots puzzle, in any dimensions amount you like (n≥2)... the inconvenience is that, for three dimensions and more, I can provide only a lower plus an upper bound (considering the straight lines you need to connect nxnx...xn dots). In 3D, the upper bound of the number of consecutive straight lines you need is given by the formula SL:=2(n^2)-n-1, for n>2 (if n=2, SL=7... it is trivial). The solving pattern is the same one I have just shown in 2D, connecting every plane using one more line (so, there are n-1 lines more). 2D2(n-1) SL. We have to reproduce the “square spiral” n-times, connecting every plane we have considered... so there are “n-1” lines more. Thus, 2(n-1)*n+(n-1)=2n*n-2n+n-1 (Q.E.D.).

Square spiral method in k-dimensions (general solving method): The total straight lines amount, in k-dimensions (nxnx...xn where “n” appears k-times), would be: 2(n-1)*(n^(k-2))+(n^(k-2)-1)=2(n^(k-1))-n^(k-2)+(n^(k-2)-1). This is a general result: it is an upper bound for any nxnx...xn dots problem! Now, let’s focus ourselves on the 3D generalization. My result/proof is as follows: Lower Bound (Proof - by definition): k(l)>=[(n^3-n)/(n-1)]+1=n*(n+1)+1. Upper Bound (Square Spiral Proof): k(m)=2(n^2)-n-1. Corrected Upper Bound: for any n>3, k(m)=2(n^2)-n-2. Thus, the GAP (by proofs) is given by 2(n^2)-n-2-(n^2+n+1)=n^2-2n-3. For example, considering n=4, I can solve the puzzle using only 26 straight lines, instead of 2(4^2)-4-1=27.

6

Figure 7: 4x4x4 dots, 26 straight lines.

The table below refers to the Upper Bound (by the Square Spiral) above, while the Lower Bound is based on the consideration that you cannot connect more than “n” dots using the first line and then the maximum number is “n-1” for any additional line:

Table 1: Upper/Lower bounds in 2 and 3 dimensions.

7

The 3D approximated upper-bound pattern, implies that, for n>2, SL(n+1)=SL(n)+5+4(n-1).

Here is the Corrected Upper Bound solution for n=5 (43 straight lines only):

Figure 8: 5x5x5 dots, 43 straight lines.

Upper Bound in k dimensions (k≥2). Let “h” denote the straight lines number you need to fit every dot: ( )  ( ) .

Lower Bound in k dimensions (k≥2). Let “h” denote the straight lines number you need to fit every dot:

8

(

) (

)

.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------My lower bound for the “best plane by plane” 3D solution (solving each nxn grid before skipping to a new grid using a “linking” straight line) is as follows: h = (2*n-2)*2+(2*n-3)*2+(2*n-4)*4+(2*n-5)*4+(2*n-6)*6+(2*n-7)*6+(2*n-8)*8+…+(n-1) =

( ) ∑ ⌈ ⌉

*

(

) ⌈ ⌉+

(

(

)

) (

∑(

)

*

⌈ ⌉+) (1)

n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

3D (Lower Bound) 1 7 13 21 31 43 57 73 91 111 133 157 183 211 241 273 307 343 381 421

3D (Upper Bound) 1 7 14 26 43 64 89 117 148 183 222 265 311 361 415 473 535 601 670 743

Gap (UpperLower B.) 0 0 1 5 12 21 32 44 57 72 89 108 128 150 174 200 228 258 289 322

3D (Guessing the Upper B. Increments [n-->n+1] Plane Bound) /// 1 6 7 7 14 12 26 17 40 21 59 25 82 28 109 31 139 35 173 39 211 43 253 46 298 50 347 54 400 58 457 62 518 66 583 69 651 73 723

Table 2: Upper/Lower bounds in 2 and 3 dimensions.

N.B.

9

Table 2 indicates the lower bounds for the nxnxn dots problem if we are searching plane-by-plane solutions only.

No intersections additional constraint:

Figure 9: Connecting dots without crossing a line.

h = (2*n-1)*2+(2*n-2)*2+(2*n-3)*4+(2*n-4)*4+(2*n-5)*6+(2*n-6)*6+(2*n-7)*8+…+(n-1) =

( ) ∑ ⌈ ⌉

*

(

) ⌈ ⌉+

(

(

)

) (

∑(

)

*

⌈ ⌉+) (2)

Where i(max) is the maximum (integer) value of “i” inside the summation (the maximum value such that ∑ * ⌈ ⌉+ ).

A general method to reduce the gap between the 3D lower/upper bounds is to combine the pattern below with the square spiral one:

10 Figure 10: 5x5 dots 8 lines basic pattern.

This is not the best upper bound we can define for a plane-by-plane problem as well. In fact:

Figure 11: 6x6x6 dots, 62 lines [this pattern has been inspired by http://www.mathpuzzle.com/joe6x6.GIF].

The best upper bound I have currently proved for any arbitrary large value of n (following the pattern by figure 10) is as follows: n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Upper Bound (nxnxn) 1 7 14 26 43 63 87 115 146 181 220 263 309 359 413 471 n 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Upper Bound (nxnxn) 1799 1919 2043 2171 2302 2437 2576 2719 2866 3017 3172 3331 3493 3659 3829 4003

11

17 18 19 20 21 22 23 24 25 26 27 28 29 30

532 597 666 739 816 897 982 1071 1163 1259 1359 1463 1571 1683

47 48 49 50 51 52 53 54 55 56 57 58 59 60

4181 4363 4549 4739 4932 5129 5330 5535 5744 5957 6174 6395 6620 6849

Table 10: nxnxn dots puzzle upper bounds following the pattern by figure 10.

n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

nxnxn Solution by the Square Spiral 1 7 16 29 45 65 89 117 148 183 222 265 311 361 415 473 535 601 670 743 820

Best nxnxn Upper Bound Currently Discovered 1 7 14 26 43 63→62 87→85 115→112 146 181→178 220 263→260 309 359→358 413 471 532 597 666 739 816

Gap (square spiral-pattern by Fig 10) 0 0 2 3 2 2→3 2→4 2→5 2 2→5 2 2→5 2 2→3 2 2 3 4 4 4 4

12

22 901 897 4 23 986 982 4 24 1075 1071 4 25 1167 1163 4 26 1263 1259 4 27 1363 1359 4 28 1467 1463 4 29 1575 1571 4 30 1687 1683 4 31 1803 1799 4 32 1923 1919 4 33 2046 2043 3 34 2173 2171 2 35 2304 2302 2 36 2439 2437 2 37 2578 2576 2 38 2721 2719 2 39 2868 2866 2 40 3019 3017 2 41 3173 3172 1 42 3331 3331 0 43 3493 3493 0 44 3659 3659 0 45 3829 3829 0 46 4003 4003 0 47 4181 4181 0 48 4363 4363 0 49 4549 4549 0 50 4739 4739 0 51 4932 4932 0 Table 11: nxnxn dots puzzle upper bounds following the Square Spiral pattern and the one by figure 10: if n≥42, we have the same result. If n=6, 8, 10, 12 or 14, the best plane-by-plane upper bound is given by ( ) ( )) ( pattern (http://www.mathpuzzle.com/dots10x10.gif). , following Roger Phillips’

For any n≥42,
( ) ∑ ⌈ ⌉ ( )

[

(

) ⌈ ⌉]

(

(

)

) (

∑ [

⌈ ⌉])

13

So, we have proved that, if n≥42, the Square Spiral pattern is the best plane-by-plane pattern available: it is as good as the one by figure 10 (for any n>41 – n>50 considering a generic 5x5 pattern -, the last/external pieces of the two patterns overlap – it is a square spiral frame, indeed). It is also the best pattern available with zero crossing lines (from 1 to k-dimensions).

Thus “h”, the upper bound for the k-dimensions dots problem, can be further lowered as: ∀n∈ℕ\* +, let “t” be defined as the lowest upper bound we have previously proved for the standard nxnxn dots problem (see Table 11), e.g. n=6t=62, while, ∀n>41,

( ) ∑ ⌈ ⌉

*

(

) ⌈ ⌉+

(

(

)

) (

(

)

*

⌈ ⌉+) (4),

(

)

.

Let ̃ be the minimum amount of straight lines you need to solve the +), we have just proved that: (k,n∈ℕ\* ̃ ( ) (5)

dots problem

The (5) can be further improved, by the ( (4) + Table 10 ), as: ̃ ( ) (6)