SOLO-014 · Advanced Mastermind
EXTREMEThe Chamber of Duplicates
Find the only orderly code of 6 digits.
This page contains the solution.
The answer
Code: 140633.
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 6.
- Proposal 474563 requires min(n3, 1) + min(n4, 2) + min(n5, 1) + min(n6, 1) + min(n7, 1) = 3.
- Proposal 013237 requires min(n0, 1) + min(n1, 1) + min(n2, 1) + min(n3, 2) + min(n7, 1) = 4.
- Proposal 163003 requires min(n0, 2) + min(n1, 1) + min(n3, 2) + min(n6, 1) = 5.
- Proposal 635050 requires min(n0, 2) + min(n3, 1) + min(n5, 2) + min(n6, 1) = 3.
- Proposal 042546 requires min(n0, 1) + min(n2, 1) + min(n4, 2) + min(n5, 1) + min(n6, 1) = 3.
- These limitations of occurrences alone leave 1 multiset(s).Here they are, written in ascending order: 013346.
- Multi ensemble 013346 : after successive application of the numbers of property placed, there remains 144 → 64 → 19 → 5 → 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 262.144 ordered words of length 6 out of 0 to 7. The initial zeros or words with repetition are not removed.
- Index 1, proposal 474563: retains exactly the configurations with 1 position equal(s) and 3 common occurrence(s). There are 42,344 candidates left.
- Index 2, proposal 013237: retains exactly the configurations with 1 position equal(s) and 4 common occurrence(s). There are 3,996 candidates left.
- Index 3, proposal 163003: retains exactly the configurations with 2 positions and 5 common occurrence(s). 58 candidates remain.
- Index 4, proposal 635050: retains exactly the configurations with 0 position equal(s) and 3 common occurrence(s). There are 5 candidates left.
- Index 5, proposal 042546: retains exactly the configurations with 1 position equal(s) and 3 common occurrence(s). There are 1 candidate(s) left.
- In index 1, the candidate 000000 would give 0 well placed and 0 badly placed, instead of 1 and 2: it is eliminated.
- In index 2, candidate 000364 would give 1 well placed and 1 ill placed, instead of 1 and 3: it is eliminated.
- In Index 3, candidate 001473 would give 1 well placed and 3 badly placed, instead of 2 and 3: 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 474563: 1 well placed, 2 badly placed.
- Final check against 013237: 1 well placed, 3 badly placed.
- Final check against 163003: 2 well placed, 3 badly placed.
- Final check against 635050: 0 well placed, 3 badly placed.
- Final check against 042546: 1 well placed, 2 badly 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": "013346",
"remaining_after_position_constraints": [
144,
64,
19,
5,
1
]
}
]
}How we verified this answer
Complete listing of all codes; calculation independent of each score; deletion of redundant indices.
{
"candidates": 262144,
"solutions": 1,
"clues": 5,
"survivors_after_clues": [
42344,
3996,
58,
5,
1
]
}The reference method leaves 1 multiset(s) after solving multiplicity constraints; then it is necessary to cross their arrangements with all position constraints. The resolution combines equations of multiplicity ceilings, permutations with repetition and intertwined position constraints. The corrected provides the complete cutting of this exploration. The Extreme level remains an appreciation of this manual effort, without calibration on players.