# Find out the rules from examples, then solve it

Fill the blank rectangles with numbers 6 to 16
Find out the rules from examples

Hint:

No common divisors except 1

• In examples 2 and 3, do you realize that 9 is not a prime number? – Cordfield Aug 29 '17 at 9:15
• @Cordfield : Yes I realize it. – Jamal Senjaya Aug 29 '17 at 9:31
• Your “Hint” is pretty heavy; you might as well have come out and said explicitly what rule we were missing. You might want to write hints that are lightweight; pointing us in a direction without shoving the answer into our face. – Peregrine Rook Aug 30 '17 at 4:52

First, the board look like this.

AA  5 BB CC DD
EE    FF    GG
HH II JJ 17 KK


And I found three rules.

1. If there is a dot between two cells, two numbers should be consecutive. If there is no dot, two numbers should not be consecutive.
2. Greatest common divisor of two adjacent cells should be 1. In other words, two numbers should be coprime.
3. By rule 2, difference of two adjacent cells should be an odd number.

By rule 1,

BB, II, and JJ are obvious.

e1  5  6 o1 e2
o2    o3    o4
e3 15 16 17 e4

Now we have numbers from 7 to 14.

By rule 3,

e1 ~ e4 should be an even number, and o1 ~ o4 should be an odd number.

And the candidates are:

e1 =  8, 10, 12, 14
e2 =  8, 10, 12, 14
e3 =  8, 10, 12, 14
e4 =  8, 10, 12, 14
o1 =  7,  9, 11, 13
o2 =  7,  9, 11, 13
o3 =  7,  9, 11, 13
o4 =  7,  9, 11, 13

By rule 1, some numbers can be removed from the candidates.

e1 =  8, 10, 12, 14
e2 =  8, 10, 12, 14
e3 =  8, 10, 12
e4 =  8, 10, 12, 14
o1 =      9, 11, 13
o2 =  7,  9, 11, 13
o3 =      9, 11, 13
o4 =  7,  9, 11, 13

By rule 2, more numbers can be removed.

e1 cannot be 10, e3 cannot be 10 and 12, o1 cannot be 9, o3 cannot be 9

e1 =  8,     12, 14
e2 =  8, 10, 12, 14
e3 =  8
e4 =  8, 10, 12, 14
o1 =         11, 13
o2 =  7,  9, 11, 13
o3 =         11, 13
o4 =  7,  9, 11, 13

Since e3 has one candidate,

we can fill in e3. Then o2 should be 7 or 9.

e1  5  6 o1 e2
o2    o3    o4
8 15 16 17 e4
e1 =      12, 14
e2 =  10, 12, 14
e4 =  10, 12, 14
o1 =         11, 13
o2 =  7,  9
o3 =         11, 13
o4 =  7,  9, 11, 13

Let's assume:

o2 is 9.

e1  5  6 o1 e2
9    o3    o4
8 15 16 17 e4
Since 7 can only be filled in o4, it should be 7, and e4 should be 8, which is impossible.

Therefore,

o2 should be 7.

e1  5  6 o1 e2
7    o3    o4
8 15 16 17 e4
e1 =      12, 14
e2 =  10, 12, 14
e4 =  10, 12, 14
o1 =     11, 13
o3 =     11, 13
o4 =  9, 11, 13

In order,

e1 should be 12, o4 should be 9, e4 should be 10, e2 should be 14, o1 should be 11, and o3 should be 13.

12  5  6 11 14
7    13     9
8 15 16 17 10

And this is my final answer.

I think my explanation is messy and those formattings are horrible. Feel free to point errors or improve formatting of my answer.

• Rule 3 implies rule 2 – boboquack Aug 29 '17 at 9:24
• @boboquack Oh, you are right. For God's sake. – Otami Arimura Aug 29 '17 at 9:27
• @boboquack no, there are lots of coprime pairs with an even difference. – Kruga Aug 29 '17 at 14:42
• @Kruga however no even numbers can be next to each other, meaning that they have to be at the places they are, meaning the odd numbers must be in the remaining places and as a result all the differences are odd – boboquack Aug 29 '17 at 21:30
• @boboquack ah, I see what you mean. But it still depends on the shape of the grid and the preexisting numbers. – Kruga Aug 30 '17 at 7:25

the rule is simple:

dot between squares means those numbers should be consecutive. and if there is no dot, they cannot be consecutive and the difference has to be odd number.

and the numbers that you are supposed to fill is given as

$5$ to $17$

so firstly you can easily see that

5 to 6 and 17 to 16 then 16 to 15.

the rest becomes:

14 5  6  9  12
11 x  13 x  7
10 15 16 17 8

• 14 breaks your configuration – boboquack Aug 28 '17 at 9:12
• @boboquack forgot 14 :)) it is ojay now. – Oray Aug 28 '17 at 9:14
• Nop wrong answer. – Jamal Senjaya Aug 28 '17 at 9:15
• @JamalSenjaya it is valid for all given examples. :/ – Oray Aug 28 '17 at 9:16
• @JamalSenjaya check it again, change the rule after examining the examples a little deeper. – Oray Aug 28 '17 at 9:22

I found the same rules that Oray found, and I found the same solution:

$\array{14&~\mathbf5&~\mathit6&~9&12\\11&\textbf X&13&\textbf X&~7\\10&\mathit{15}&\mathit{16}&\mathbf{17}&~8}$

where $\mathbf{5}$ and $\mathbf{17}$ (bold) are the given numbers, and $\mathit{6}$, $\mathit{15}$, and $\mathit{16}$  (italic) are the trivially forced ones.

Unfortunately, I found seven other solutions following the same rules:

$\array{10&~\mathbf5&~\mathit6&~9&14\\~7&\textbf X&13&\textbf X&11\\~8&\mathit{15}&\mathit{16}&\mathbf{17}&12}$ $\quad\qquad\array{12&~\mathbf5&~\mathit6&11&14\\~7&\textbf X&13&\textbf X&~9\\~8&\mathit{15}&\mathit{16}&\mathbf{17}&10}$ $\quad\qquad\array{12&~\mathbf5&~\mathit6&~9&14\\~7&\textbf X&13&\textbf X&11\\~8&\mathit{15}&\mathit{16}&\mathbf{17}&10}$

$\array{12&~\mathbf5&~\mathit6&11&14\\~9&\textbf X&13&\textbf X&~7\\10&\mathit{15}&\mathit{16}&\mathbf{17}&~8}$ $\quad\qquad\array{14&~\mathbf5&~\mathit6&13&10\\11&\textbf X&~9&\textbf X&~7\\12&\mathit{15}&\mathit{16}&\mathbf{17}&~8}$

$\array{10&~\mathbf5&~\mathit6&~9&14\\13&\textbf X&11&\textbf X&~7\\12&\mathit{15}&\mathit{16}&\mathbf{17}&~8}$ $~~~\text{and}\,~~\array{10&~\mathbf5&~\mathit6&11&14\\13&\textbf X&~9&\textbf X&~7\\12&\mathit{15}&\mathit{16}&\mathbf{17}&~8}$

A bit more discussion: we know from the problem statement that we are required to use the integers 6 through 16.

The fact that a dot implies that the adjoining numbers are consecutive (differ by 1) forces the 6, 15, and 16, as previously stated, leaving 7, 8, 9, 10, 11, 12, 13, and 14 to be filled in.  The fact that all pairs of adjacent numbers differ by an odd number (> 1) gives us this template:
$$\array{E_1&~\mathbf5&~\mathit6&O_1&E_2\\O_2&\textbf X&O_3&\textbf X&O_4\\E_3&\mathit{15}&\mathit{16}&\mathbf{17}&E_4}$$ where the $E$s are even numbers and the $O$s are odd numbers.

$O_1$ and $O_3$ can’t be 7, because they are adjacent to 6 (without a dot, so not consecutive), so $O_2$ or $O_4$ must be 7.  The number below the 7 must be 8, because $O_2$ and $E_3$ are separated by a dot, and so are $O_4$ and $E_4$, and the number below 7 can’t be 6, because we already know where that is.  That narrows it down to these possibilities:
$\array{E_1&~\mathbf5&~\mathit6&O_1&E_2\\~7&\textbf X&O_3&\textbf X&O_4\\~8&\mathit{15}&\mathit{16}&\mathbf{17}&E_4}$ $\quad\text{or}\quad\array{E_1&~\mathbf5&~\mathit6&O_1&E_2\\O_2&\textbf X&O_3&\textbf X&~7\\E_3&\mathit{15}&\mathit{16}&\mathbf{17}&~8}$

For my next step, I tried to solve for the other bottom pair of edge numbers i.e., $O_2~\&~E_3$ or $O_4~\&~E_4$, whichever one wasn’t 7 & 8.  I got the following pairs: {9,10}, {11,10}, {11,12}, {13,12}, and {13,14}.  Each of those, except for {13,14}, led to at least one solution, as shown above.

So I guess there’s a pattern that we haven’t spotted.        :-(

Rules

Rule 1 - Even Odd Even Odd and so on (matrix style)
Rule 2 - Dots mean subtracted by one
Rule 3 - No dots, no common divisor except 1

Solution - Same as @Otami Arimura

12   5   6   11  14
7 x   13  x   9
8 15  16  17  10