I am trying to solve this code cracking problem. The solution is either the code or all possible solutions if you can't narrow the possibilities.
We have a 5 character code that is consisting of digits {0,1, ..., 7}. We have 10 attempts and for each attempt we have the amount of correctly guessed digits on the right indexes, and the number of correctly guessed digits on an incorrect index.
What I did what to generate all 5 digit numbers consisting of digits {0,1, ..., 7}., however I failed to find any way to narrow the attempts down. Could you help me find the right algorithm? Thanks!