Mastermind Logic

Classwork




As always, please write on a separate sheet.
Recall the scoring rules for Mastermind:
A white peg indicates that you have a correct color, but it is in the wrong place.
A black peg indicates that you have a correct color and it is in the correct place.

1)    Suppose for your first guess you put down five pegs, all of different color. Your scorekeeper tells you that none of your pegs is correct! This is actually good news. Why?




2)    This score is impossible:

four black pegs, one white peg

Why?




3)    Suppose on your first guess you get this score:

two black pegs, three white pegs

Wow! You picked all of the right colors on the first try and you only need to put them in the right place. There aren't that many things that the code could be. How many possible codes remain?




4)    Sometimes people forget you are allowed to have two pegs of the same color in a Mastermind code. When they make their guesses, they avoid doubling up on a color. As it turns out, a randomly constructed code is more likely to have a repeated color than to have five distinct colors. Show why that's true.


5)    Frequently in Mastermind, you need to use a method known as "proof by contradiction." Here's how the concept works: you start with an initial assumption, an hypothesis. Then you follow all of the consequences of that hypothesis. "If this is true, then this must also be true." You check to see if the various consequences are consistent with each other. If you find two consequences that can't both be true simultaneously, then you have your contradiction. The existence of contradictory consequences means that the original hypothesis must be false. It's a way to prove that something can't be true. The next problem (which you are writing up for homework) uses the method of proof by contradiction.


6)    Here is a sequence of guesses, with the corresponding score:



Green Blue Red White Yellow2 white pegs1st guess
BlueGreenGreenBlueGreen1 black peg 2nd guess
RedGreenBlackBlackRed1 white, 1 black 3rd guess
BlueBlackBlackYellowBlue2 black, 1 white4th guess






your guess


If green is correct, then blue can't possibly be correct. Why?

If green is correct, then there must be only one black peg. Why?

If there is only one black peg, then blue must be correct. Why?

Green can't possibly be correct. Why?

Fill in a fifth guess in the table above. Make sure it is a possible code.


7)    Here is a sequence of guesses, with the corresponding score:



Blue White Red Green Orange 3 white pegs1st guess
White Blue Green Yellow Yellow 2 black pegs 2nd guess
White Blue Gray Red Gray 1 black peg3rd guess
White Green Green Black Blue 1 black, 1 white4th guess
White Orange Green White White 1 black, 1 white5th guess






your guess


a) White can't possibly be correct. Why not?
b) Come up with a possible guess.



QR Home Page Glossary Previous Worksheet Next Worksheet