wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> MasterMind I
(Message started by: zeb on Jul 30th, 2002, 11:35am)

Title: MasterMind I
Post by zeb on Jul 30th, 2002, 11:35am
G: Green
R: Red
Y: Yellow
B: Brown
L: Light Blue
D: Dark Blue

black peg: .
White peg: o

reversing the order, my apologies:
1) GRYB ...
2) RYBD oo
3) GRYL ..o
4) GLYB ..o
5) ----? ....

The solid information is the 3 black pegs. There are 4 possiblities for which colors contribute to the three black pegs,
a) GRY-
b) G-YB
c) -RYB
d) GR-B

Testing a), (of course they all pass test 1), by definition)
passes 2), and fails 3), since if true, a) would be 3) ...

b) passes all but 4) since if true, b) would be 4) ...

c) fails 2) since if true, c) would be 2)ooo

d) is left, and passes all tests (at least doesn't fail any).

So, we know GR-B, but what about the missing one?

2) RYBD oo, we know R and B are the oo, so Y and D cannot be the missing color.

3) GRYL ..o we know G & R are the .. and Y was just elliminated, so L must be the o, and the missing color.

GRLB.

Title: Re: MasterMind I
Post by Carl_Cox on Sep 15th, 2002, 8:27pm
okay, here's my method.  Rather than test hypotheses, I tried to construct the final sequence:

a - green
b - red
c - yellow
d - brown
e - light blue
f - dark blue

x - correct color in place
/ - correct color, wrong place

the statements, then, are
4)aecd xx/
3)abce xx/
2)bcdf //
1)abcd xxx

additional statements
5) from 1 and 4, we know that b is in position 2: _b__
6) from 1 and 3, we know that d is in position 4: _b_d
7) from 2,5, and 6 the final solution does not include c or f
8) from 1 and 7, we know that a is in the first position: ab_d
9) from 8 and 3 (or 8 and 4) we know that e is included in the final solution.
10) from 8 and 9, e must be in position 3: abed

The final color sequence then is
green, red, light blue, brown

if someone wants more detail, i'd be happy to oblige.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board