← All 40 challenges

SOLO-011 · Advanced Mastermind

EXPERT

The Eight Inks

Find the only ordered code of 5 digits.

This page contains the solution.

The answer

Code: 70730.

The reasoning

  1. Separates two constraints for each line: the number of equal positions per position, and then the total of common occurrences. This total is well placed + wrong placed; for each number, the minimum of the two multiplicities is taken.
  2. To cut down the work, ignore the positions for now. Let n₀,…,n₇ be the counts of the eight digits. Their sum is 5.
  3. Proposal 02553 requires min(n0, 1) + min(n2, 1) + min(n3, 1) + min(n5, 2) = 2.
  4. Proposal 62532 requires min(n2, 2) + min(n3, 1) + min(n5, 1) + min(n6, 1) = 1.
  5. Proposal 05062 requires min(n0, 2) + min(n2, 1) + min(n5, 1) + min(n6, 1) = 2.
  6. Proposal 73375 requires min(n3, 2) + min(n5, 1) + min(n7, 2) = 3.
  7. These limitations of occurrences alone leave 5 multi-unit(s).Here they are, written in ascending order: 00337; 00377; 01577; 04577; 05777.
  8. Multiassembly 00337 : after successive application of the numbers of property placed, there remains 12 → 5 → 2 → 0 arrangement(s).
  9. Multiassembly 00377 : after successive application of the numbers of property placed, there remains 15 → 3 → 1 → 1 arrangement(s).
  10. Multi ensemble 01577 : after successive application of the numbers of property placed, there is left 30 → 0 → 0 → 0 arrangement(s).
  11. Multi ensemble 04577 : after successive application of the numbers of property placed, there remains 30 → 0 → 0 → 0 arrangement(s).
  12. Multiassembly 05777 : after successive application of the numbers of property placed, there remains 10 → 0 → 0 → 0 arrangement(s).
  13. So we can make two separate tables, occurrences and then places. Only one line in the second table keeps an arrangement; that's the code announced. This separation avoids blindly browsing all the ordered words.
  14. Starts with the 32.768 words ordered length 5 out of 0 to 7 and do not remove the initial zeros or the words with repetition.
  15. Index 1, proposal 02553: retains exactly the configurations with 0 position equal(s) and 2 common occurrence(s). There are 7.051 candidates left.
  16. Index 2, proposal 62532: keeps exactly the configurations with 1 position equal(s) and 1 common occurrence(s). There are 319 candidates left.
  17. Index 3, proposal 05062: retains exactly the configurations with 0 position equal(s) and 2 common occurrence(s). There are 16 candidates left.
  18. Index 4, proposal 73375: retains exactly the configurations with 1 position equal(s) and 3 common occurrence(s). There is 1 candidate remaining.
  19. In index 1, candidate 00000 would give 1 well placed and 0 badly placed, instead of 0 and 2: it is eliminated.
  20. In Index 2, candidate 10005 would give 0 well placed and 1 ill placed, instead of 1 and 0: it is eliminated.
  21. In index 3, candidate 10002 would give 2 well placed and 1 ill placed, instead of 0 and 2: it is eliminated.
  22. This filtering can be done on paper in branches: first fixes the possible occurrences, then affects their places and cuts a branch as soon as a line exceeds its number of places or can no longer reach its common total. You must not choose a candidate only because it satisfies the last line.
  23. Final check against 02553: 0 well placed, 2 wrong placed.
  24. Final check against 62532: 1 well placed, 0 wrong placed.
  25. Final check against 05062: 0 well placed, 2 wrong placed.
  26. Final check against 73375: 1 well placed, 2 badly placed.
  27. The exhaustive check takes all possible words and has exactly one solution. The numbers are therefore determined at all places; it is not just a compatible code found at random.

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.

{
  "multisets_and_position_counts": [
    {
      "bag": "00337",
      "remaining_after_position_constraints": [
        12,
        5,
        2,
        0
      ]
    },
    {
      "bag": "00377",
      "remaining_after_position_constraints": [
        15,
        3,
        1,
        1
      ]
    },
    {
      "bag": "01577",
      "remaining_after_position_constraints": [
        30,
        0,
        0,
        0
      ]
    },
    {
      "bag": "04577",
      "remaining_after_position_constraints": [
        30,
        0,
        0,
        0
      ]
    },
    {
      "bag": "05777",
      "remaining_after_position_constraints": [
        10,
        0,
        0,
        0
      ]
    }
  ]
}
How we verified this answer

Complete listing of all codes; calculation independent of each score; deletion of redundant indices.

{
  "candidates": 32768,
  "solutions": 1,
  "clues": 4,
  "survivors_after_clues": [
    7051,
    319,
    16,
    1
  ]
}

The reference method leaves 5 multi set(s) after solving multiplicity constraints; then it is necessary to cross their arrangements with all the position constraints. Repeats prevent the numbers from being treated as a simple set. The reference method combines occurrence counting and configuration removal.

← Return to puzzle SOLO-011