← All 40 challenges

SOLO-018 · Futoshiki

EXPERT

The Seven Staircases

Complete square 7 × 7 with figures from 1 to 7.

This page contains the solution.

The answer

Grid, line by line:

3 6 4 2 7 5 1

6 2 1 7 4 3 5

7 4 3 1 5 2 6

5 3 7 6 2 1 4

4 1 6 5 3 7 2

1 5 2 3 6 4 7

2 7 5 4 1 6 3

Coordinates: lines from top to bottom, columns from left to right.
L / C1234567
13642751
26217435
37431526
45376214
54165372
61523647
72754163

The reasoning

  1. First enter the candidates from 1 to 7 in each empty box. Remove any numbers already fixed in its line or column. The rows and columns each require a complete permutation.
  2. Owns inequalities in both directions. If A < B, A can no longer take a value greater than or equal to the greatest candidate of B, and B can no longer take a value less than or equal to the smallest candidate of A.
  3. After each reduction, check the unique locations of each digit in each row and column. A growing chain of k boxes consumes at least k separate values; its ends also give bounds.
  4. The reference method combines these reductions and then controlled assumptions. On this problem, the exact search visits 13 knots, encounters 6 contradictions and reaches a depth of 3 nested choices. These numbers describe this solver and not a guaranteed human duration.
  5. A hypothesis is treated as a temporary branch: notes its box and its number, spreads all the constraints, then returns to the last choice if a box loses all its candidates or if a line can no longer contain a number. Do not erase a hypothesis without noting the contradiction.
  6. Here are the first assignments of the path that leads to the solution. "Assumption" means a choice to be confirmed in exploration, not a proven local deduction:
  7. L3C6 = 2 — single location.
  8. L7C5 = 1 — single location.
  9. L3C4 = 1 — single location.
  10. L2C6 = 3 — hypothesis.
  11. L2C7 = 5 — inequality.
  12. L3C7 = 6 — inequality.
  13. L2C4 = 7 — row/column.
  14. L7C4 = 4 — row/column.
  15. L6C4 = 3 — inequality.
  16. L5C4 = 5 — single location.
  17. L1C7 = 1 — hypothesis.
  18. L2C2 = 2 — hypothesis.
  19. L2C3 = 1 — row/column.
  20. L7C2 = 7 — row/column.
  21. L4C6 = 1 — single location.
  22. L4C3 = 7 — single location.
  23. L7C1 = 2 — row/column.
  24. L3C2 = 4 — row/column.
  25. L6C6 = 4 — row/column.
  26. L5C6 = 7 — single location.
  27. L6C1 = 1 — inequality.
  28. L6C5 = 6 — inequality.
  29. L4C2 = 3 — inequality.
  30. L3C1 = 7 — row/column.
  31. L4C5 = 2 — row/column.
  32. L4C1 = 5 — single location.
  33. L6C2 = 5 — row/column.
  34. L6C3 = 2 — row/column.
  35. L1C2 = 6 — row/column.
  36. L5C2 = 1 — row/column.
  37. Example of a rebutted branch: supposes L2C6 = 1, then L1C5 = 3. The propagation results in: The number 5 can no longer be placed in the group L6C1, L6C2, L6C3, L6C4, L6C5, L6C6, L6C7 The certificate of exploration gives all branches, with indices of boxes counted from zero.
  38. Example of a rebutted branch: supposes L2C6 = 1, then L1C5 = 7, then L2C3 = 2. The propagation results in: Two identical fixed digits in boxes L6C1, L6C2, L6C3, L6C4, L6C5, L6C6, L6C7 The certificate of exploration gives all branches, with indices of boxes counted from zero.
  39. Example of a rebutted branch: supposes L2C6 = 1, then L1C5 = 7, then L2C3 = 7. The propagation results in: L-inequality L6C4 < L7C4 no longer has compatible torque values. The exploration certificate gives all branches, with indices of cells counted from zero.
  40. The final grid allows line-by-line and column-by-column control: each one contains once all the numbers. Then check the inequalities one by one:
  41. L5C1 < L4C1 : 4 < 5.
  42. L6C6 < L5C6 : 4 < 7.
  43. L3C6 < L3C7 : 2 < 6.
  44. L2C6 < L2C7 : 3 < 5.
  45. L6C2 < L7C2 : 5 < 7.
  46. L4C1 < L3C1 : 5 < 7.
  47. L7C7 < L7C6 : 3 < 6.
  48. L5C7 < L6C7 : 2 < 7.
  49. L5C2 < L4C2 : 1 < 3.
  50. L1C4 < L1C5 : 2 < 7.
  51. L1C4 < L2C4 : 2 < 7.
  52. L6C1 < L7C1 : 1 < 2.
  53. L6C4 < L7C4 : 3 < 4.
  54. L6C6 < L6C5 : 4 < 6.
  55. L4C2 < L3C2 : 3 < 4.
  56. L4C5 < L3C5 : 2 < 5.
  57. L2C7 < L3C7 : 5 < 6.
  58. The exact counting continued after finding this grid to look for a second solution. All other branches fail: the solution is unique.

Common mistakes and false leads

Show the full search proof

Each branch is independent. The tree records the deductions and contradictions found with the method used here.

{
  "indexing": "Case i = ligne i//n+1, colonne i%n+1. Les indices bruts commencent à zéro.",
  "events": [
    {
      "event": "branch",
      "assumptions": [],
      "cell": 12,
      "values": [
        1,
        3
      ]
    },
    {
      "event": "branch",
      "assumptions": [
        {
          "cell": 12,
          "value": 1
        }
      ],
      "cell": 4,
      "values": [
        3,
        7
      ]
    },
    {
      "event": "contradiction",
      "assumptions": [
        {
          "cell": 12,
          "value": 1
        },
        {
          "cell": 4,
          "value": 3
        }
      ],
      "reason": "Le chiffre 5 ne peut plus se placer dans le groupe L6C1, L6C2, L6C3, L6C4, L6C5, L6C6, L6C7"
    },
    {
      "event": "branch",
      "assumptions": [
        {
          "cell": 12,
          "value": 1
        },
        {
          "cell": 4,
          "value": 7
        }
      ],
      "cell": 9,
      "values": [
        2,
        7
      ]
    },
    {
      "event": "contradiction",
      "assumptions": [
        {
          "cell": 12,
          "value": 1
        },
        {
          "cell": 4,
          "value": 7
        },
        {
          "cell": 9,
          "value": 2
        }
      ],
      "reason": "Deux chiffres fixés identiques dans les cases L6C1, L6C2, L6C3, L6C4, L6C5, L6C6, L6C7"
    },
    {
      "event": "contradiction",
      "assumptions": [
        {
          "cell": 12,
          "value": 1
        },
        {
          "cell": 4,
          "value": 7
        },
        {
          "cell": 9,
          "value": 7
        }
      ],
      "reason": "L’inégalité L6C4 < L7C4 ne possède plus de couple de valeurs compatible."
    },
    {
      "event": "branch",
      "assumptions": [
        {
          "cell": 12,
          "value": 3
        }
      ],
      "cell": 6,
      "values": [
        1,
        4
      ]
    },
    {
      "event": "branch",
      "assumptions": [
        {
          "cell": 12,
          "value": 3
        },
        {
          "cell": 6,
          "value": 1
        }
      ],
      "cell": 8,
      "values": [
        1,
        2
      ]
    },
    {
      "event": "contradiction",
      "assumptions": [
        {
          "cell": 12,
          "value": 3
        },
        {
          "cell": 6,
          "value": 1
        },
        {
          "cell": 8,
          "value": 1
        }
      ],
      "reason": "La case L6C3 ne possède plus aucun candidat après exclusion des chiffres fixés dans sa ligne/colonne."
    },
    {
      "event": "solution",
      "assumptions": [
        {
          "cell": 12,
          "value": 3
        },
        {
          "cell": 6,
          "value": 1
        },
        {
          "cell": 8,
          "value": 2
        }
      ]
    },
    {
      "event": "branch",
      "assumptions": [
        {
          "cell": 12,
          "value": 3
        },
        {
          "cell": 6,
          "value": 4
        }
      ],
      "cell": 8,
      "values": [
        1,
        2
      ]
    },
    {
      "event": "contradiction",
      "assumptions": [
        {
          "cell": 12,
          "value": 3
        },
        {
          "cell": 6,
          "value": 4
        },
        {
          "cell": 8,
          "value": 1
        }
      ],
      "reason": "La case L4C7 ne possède plus aucun candidat après exclusion des chiffres fixés dans sa ligne/colonne."
    },
    {
      "event": "contradiction",
      "assumptions": [
        {
          "cell": 12,
          "value": 3
        },
        {
          "cell": 6,
          "value": 4
        },
        {
          "cell": 8,
          "value": 2
        }
      ],
      "reason": "Le chiffre 1 ne peut plus se placer dans le groupe L1C1, L1C2, L1C3, L1C4, L1C5, L1C6, L1C7"
    }
  ]
}
How we verified this answer

Comprehensive research with different domains, constraints, unique locations and inequalities; independent control of the final grid.

{
  "nodes": 13,
  "branches": 6,
  "contradictions": 6,
  "max_depth": 3,
  "forced": 136,
  "solutions": 1,
  "size": 7,
  "givens": 11,
  "inequalities": 17
}

The crossover of single lines, single columns and inequities is not closed by propagation of the only forced numbers in the reference solver. The Expert level is based on the combination of single terminals and locations, followed by controlled exploration; it is not only a result of the size of the square.

← Return to puzzle SOLO-018