I have just started self-studying with Alan Tucker's Applied Combinatorics. The intro to the book is a series of problems based on the game Mastermind, which I have had a good amount of success with. However, I am stuck on the following problem.
In Mastermind, there is a "secret code" made up of four colored pegs. These pegs can be Blue, Red, Green, Yellow, Black, or White, and repetitions are allowed (so Blue Green Red Green and Blue Yellow Black White are both valid secret codes). A player takes turns guessing the code, and their guesses are scored with black and white keys. The guess gets one black key for each peg that is the right color and in the right location, and one white key for each peg that is the right color but in the wrong position. Each guess can only have four keys, and each peg can only have one key (a peg that gets a black key cannot also get a white key).
With those rules in mind, I have the following problem.
What are the two possible secret codes (one of them has no repeated colors)?
Guess 1: Black Blue Yellow White - 2 white keys
Guess 2: Red White Blue Green - 1 black key, 2 white keys
Guess 3: Blue Green Red Green - 2 white keys
Guess 4: Yellow Red White Blue - 1 black key, 2 white keys
My general strategy for solving these problems has been to make a grid and mark out what I know cannot be true (so the top of the table is the positions 1 2 3 4 and the side is all of the colors).
So far, all I have been able to deduce about this problem is that none of the position/color combos in guesses 1 or 3 is correct, and I do not know where to go from here.
Am I approaching this type of problem incorrectly or am I just missing something?