# 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).

you need (at least) 2*n-2 lines. you need (at least) 3 lines… and.
Figure 3: To fit nxn dots (into the center and without lifting your pencil from the paper). for n≥3. using the same strategy to solve any nxn puzzle (for n>3). the size of the paper that you need to draw your solution with your pencil. you can look at the following solving pattern. for n≥3.
. for n→∞. 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. tends to be the same one of the area encompassed by the most external dots. To understand this result.B. for n=2.2
Problem 2:
Considering a generic nxn grid.
N. You can easily see that you need two more lines for any n’:=n+1 square. you need (at least) 2n-2 straight lines. A consequence of this proof is that. you need (at least) 1 line.

Figure 5: Solving the nxn problem inside the box for n=5. a square spiral. it is possible to solve any nxn puzzle inside the box just using the square spiral method.. For n>5.3
Figure 4: The square spiral proof (2*n-2 straight lines proof).. indeed. you have to draw one horizontal and one vertical line more.
. If n’:=n+1.

4
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Figure 6: Smart cheating.
...

This is a general result: it is an upper bound for any nxnx... In 3D.xn dots puzzle. Thus.xn dots). 2(n-1)*n+(n-1)=2n*n-2n+n-1 (Q.. I can solve the puzzle using only 26 straight lines.
. the upper bound of the number of consecutive straight lines you need is given by the formula SL:=2(n^2)-n-1. the inconvenience is that.). 2D2(n-1) SL. the GAP (by proofs) is given by 2(n^2)-n-2-(n^2+n+1)=n^2-2n-3... there are n-1 lines more). Upper Bound (Square Spiral Proof): k(m)=2(n^2)-n-1... for n>2 (if n=2. The solving pattern is the same one I have just shown in 2D. I can provide only a lower plus an upper bound (considering the straight lines you need to connect nxnx. in any dimensions amount you like (n≥2).xn dots problem! Now.. for three dimensions and more.by definition): k(l)>=[(n^3-n)/(n-1)]+1=n*(n+1)+1.5
nxnxn Dots Puzzle in 3D and its Generalization to K-Dimensions!
Marco Ripà. sPIqr Society. For example. My result/proof is as follows: Lower Bound (Proof . would be: 2(n-1)*(n^(k-2))+(n^(k-2)-1)=2(n^(k-1))-n^(k-2)+(n^(k-2)-1). connecting every plane using one more line (so.. let’s focus ourselves on the 3D generalization. considering n=4. Thus.. k(m)=2(n^2)-n-2.. May 01 2013
I am glad to announce that I have just solved the nxnx. so there are “n-1” lines more.
Square spiral method in k-dimensions (general solving method): The total straight lines amount. We have to reproduce the “square spiral” n-times. SL=7.. instead of 2(4^2)-4-1=27. in k-dimensions (nxnx. Corrected Upper Bound: for any n>3..E.xn where “n” appears k-times).. connecting every plane we have considered. it is trivial).D.

.
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. 26 straight lines.6
Figure 7: 4x4x4 dots.

7
The 3D approximated upper-bound pattern.
Here is the Corrected Upper Bound solution for n=5 (43 straight lines only):
Figure 8: 5x5x5 dots. implies that.
Lower Bound in k dimensions (k≥2).
Upper Bound in k dimensions (k≥2). for n>2. SL(n+1)=SL(n)+5+4(n-1). Let “h” denote the straight lines number you need to fit every dot:
. 43 straight lines. Let “h” denote the straight lines number you need to fit every dot: ( ) ( ) .

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.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.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------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.8
(
) (
)
.
N.
.

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 ∑ * ⌈ ⌉+ ).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.
A general method to reduce the gap between the 3D lower/upper bounds is to combine the pattern below with the square spiral one:
.

mathpuzzle.GIF]. In fact:
Figure 11: 6x6x6 dots.10 Figure 10: 5x5 dots 8 lines basic pattern. 62 lines [this pattern has been inspired by http://www.
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
.
This is not the best upper bound we can define for a plane-by-plane problem as well.com/joe6x6.

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
.

10. we have the same result.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.com/dots10x10. following Roger Phillips’
For any n≥42.
( ) ∑ ⌈ ⌉ ( )
∑
[
(
) ⌈ ⌉]
(
(
)
) (
∑ [
⌈ ⌉])
.mathpuzzle.gif). . If n=6. 12 or 14. 8. the best plane-by-plane upper bound is given by ( ) ( )) ( pattern (http://www.

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 upper bound for the k-dimensions dots problem. if n≥42. n=6t=62.
(
)
.g.
∑
( ) ∑ ⌈ ⌉
*
(
) ⌈ ⌉+
(
(
)
) (
∑
(
)
*
⌈ ⌉+) (4).
Thus “h”. let “t” be defined as the lowest upper bound we have previously proved for the standard nxnxn dots problem (see Table 11).n∈ℕ\* ̃ ( ) (5)
dots problem
The (5) can be further improved. as: ̃ ( ) (6)
. we have proved that. can be further lowered as: ∀n∈ℕ\* +. the last/external pieces of the two patterns overlap – it is a square spiral frame. It is also the best pattern available with zero crossing lines (from 1 to k-dimensions).
Let ̃ be the minimum amount of straight lines you need to solve the +). while. we have just proved that: (k.13
So. ∀n>41. e. by the ( (4) + Table 10 ). indeed).