6
$\begingroup$

Rules:

  1. Place each number from 1 to 12 exactly once such that every row and column contains exactly two numbers.
  2. Clues outside the grid show the product of the two numbers in that row/column. However, the clues are wrong. The right products are either one less or one more than the clues.

The Puzzle:

Wrong Products Puzzle

$\endgroup$
0

3 Answers 3

4
$\begingroup$

(I know Vaekor answered first, however providing some logic behind the solution - I was 95% done before seeing their answer)


Starting off by deducing some of the correct products:

The 97 must be 96, as 98 cannot be made, and 96 must be 12 x 8
The 109 now must be 110, as the 12 has been used in the columns, and 110 is 11 x 10
The 20 must be 21 as 19 is prime, and 21 is 7 x 3
The 64 must be 63, as 65 cannot be made, and 63 is 7 x 9

There is now only 1-6 available for the columns, and we can deduce that 11 should be 10, which is 5 x 2, 13 should be 12, which is 3 x 4 and 5 should then be 6 which is 6 x 1

We have now fully deduced the columns, and have an overlap in the rows, so we can start filling in numbers and deducing from there:

enter image description here

51 must be 50 which is 5 x 10, as 52 has no valid factor pairs.
10 is either 9 or 11, both of which require a 1
71 is now 72 rather than 70, as 10 is used, so we have 6 and 12

enter image description here

34 has no valid factor pairs, so 35 must be 36, and that now must be 4 and 9
The 9 is now used, so the 10 is 11 and 11 x 1
And finally, only 2 and 8 are left so 15 must be 16

And we have the final answer!

enter image description here

$\endgroup$
3
$\begingroup$

I believe the solution should be:

+--+-+-+-+-+--+
|  |9| |4| |  |
+--+-+-+-+-+--+
|  | | | |6|12|
+--+-+-+-+-+--+
|  |7| |3| |  |
+--+-+-+-+-+--+
|  | |2| | | 8|
+--+-+-+-+-+--+
|10| |5| | |  |
+--+-+-+-+-+--+
|11| | | |1|  |
+--+-+-+-+-+--+

$\endgroup$
2
  • 3
    $\begingroup$ Answers to grid-deduction puzzles are generally expected to "show their work" - perhaps provide the steps taken to get here, or at least a brief outline of the method/logic? $\endgroup$
    – bobble
    Apr 11, 2022 at 22:41
  • 2
    $\begingroup$ I wasn't even aware of how to show my thought process, although it was similar to that given above. Oh well, I will chalk it up to a learning experience. Well solved! $\endgroup$
    – Vaekor
    Apr 12, 2022 at 12:48
3
$\begingroup$

Here is my solution by integer linear programming.

Let binary variable $b_{ijk}$ represent whether number $k$ is placed in cell $(i,j)$, while $k=0$ means leaving the cell empty. And let binary variable $rs_{i}$ represent whether the true product of row $i$ is the shown number $+1$ and $cs_{j}$ represent whether the true product of column $j$ is the shown number $+1$.

MIP does not like products, but by taking log, it converts to sums. So let constants $c_k = \log k$ for $k=1,\dots, 12$, $c_0 = 0$, and $\alpha^c_j=(\log(p^c_j +1) - \log(p^c_j - 1)$, $\beta^c_j = \log(p^c_j - 1)$, where $p^c_j$ means the given product of column $j$, and set $\alpha^r_i, \beta_r^i$ accordingly. Then $(\alpha^c_j cs_j + \beta^c_j)$ and $(\alpha^r_i rs_i + \beta^r_i)$ mean log of the true product depending on $cs_j$ and $rs_i$.

The constraints are $$ \sum_{ij} b_{ijk} = 1 \quad \forall k=1,\dots,12\\ \sum_{k} b_{ijk} = 1\qquad \forall i,j\\ \sum_{i} b_{ij0} = 4\qquad \forall j\\ \sum_{j} b_{ij0} = 4\qquad \forall i\\ \left|\sum_{i,k} c_{k} b_{ijk} -(\alpha^c_j cs_j + \beta^c_j)\right| \leq \varepsilon\quad \forall j \\ \left|\sum_{j,k} c_{k} b_{ijk} -(\alpha^r_i rs_i + \beta^r_i)\right| \leq \varepsilon\quad \forall i$$

The solution given by other answers is the only solution according to the solver.

PS. I accidentally forgot the constraint $\sum_{ij} b_{ijk} = 1$ at first, but there is no other solution generated, meaning that it is redundant to rule every digit exactly once.

$\endgroup$
3
  • 2
    $\begingroup$ Welcome to Puzzling! Your formulation is very similar to the one I used, except that I disallowed $k=0$, treated the first two constraints as inequalities, and treated the next two constraints as $=2$ with a sum over all $k\ge 1$. You can think of your $b_{ij0}$ as a slack variable. $\endgroup$
    – RobPratt
    Apr 16, 2022 at 13:33
  • 1
    $\begingroup$ @RobPratt Thanks for your comment and corrections! I'm having a great time reproducing your results on this site btw. $\endgroup$
    – xd y
    Apr 16, 2022 at 14:23
  • $\begingroup$ I think it's redundant to rule every digit exactly once in this puzzle because of the board size and the given number. Anyway, thank you for taking your time posting your answer with mathematical approach! :) $\endgroup$
    – Nusi
    Apr 18, 2022 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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