SOLO-012 · Advanced Mastermind
EXPERTThe Silent Lock
Find the only ordered code of 5 digits.
This page contains the solution.
The answer
Code: 32752.
The reasoning
- 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.
- To cut down the work, ignore the positions for now. Let n₀,…,n₇ be the counts of the eight digits. Their sum is 5.
- Proposal 22543 requires min(n2, 2) + min(n3, 1) + min(n4, 1) + min(n5, 1) = 4.
- Proposal 41050 requires min(n0, 2) + min(n1, 1) + min(n4, 1) + min(n5, 1) = 1.
- Proposal 70302 requires min(n0, 2) + min(n2, 1) + min(n3, 1) + min(n7, 1) = 3.
- Proposal 37433 requires min(n3, 3) + min(n4, 1) + min(n7, 1) = 2.
- These limitations of occurrences alone leave 1 multi set(s).Here they are, written in ascending order: 22357.
- Multi ensemble 22357 : after successive application of the numbers of property placed, there remains 26 → 6 → 2 → 1 arrangement(s).
- 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.
- 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.
- Index 1, proposal 22543: keeps exactly the configurations with 1 position equal(s) and 4 common occurrence(s). There are 652 candidates left.
- Index 2, proposal 41050: retains exactly the configurations with 1 position equal(s) and 1 common occurrence(s). There are 39 candidates left.
- Index 3, proposal 70302: keeps exactly the configurations with 1 position equal(s) and 3 common occurrence(s). There are 4 candidates left.
- Index 4, proposal 37433: retains exactly the configurations with 1 position equal(s) and 2 common occurrence(s). There are 1 candidate(s).
- In Index 1, candidate 00000 would give 0 well placed and 0 badly placed, instead of 1 and 3: it is eliminated.
- In Index 2, candidate 02234 would give 0 well placed and 2 badly placed, instead of 1 and 0: it is eliminated.
- In index 3, candidate 23252 would give 1 well placed and 1 ill placed, instead of 1 and 2: it is eliminated.
- 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.
- Final check against 22543: 1 well placed, 3 badly placed.
- Final check against 41050: 1 well placed, 0 wrong placed.
- Final check against 70302 : 1 well placed, 2 wrong placed.
- Final check against 37433 : 1 well placed, 1 wrong placed.
- 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
- Consolidate wrongly placed and figure absent.
- Count twice an occurrence of the code when the proposal repeats a number.
- Prohibit repetitions or the initial zero without the rules requiring it.
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": "22357",
"remaining_after_position_constraints": [
26,
6,
2,
1
]
}
]
}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": [
652,
39,
4,
1
]
}The reference method leaves 1 multi set(s) after solving multiplicity constraints; then it is necessary to cross their arrangements with all position constraints. Repeats prevent treating the numbers as a simple set. The reference method combines occurrence counting and configuration removal.