Master Mind Analysis (4 peg, 6 color)



Number of possible secret code combination: 1296.
Since there are 14 different outcome for each trial, we immediately know that the lower bound for minimum number of trials before knowing the answer is 3.

The following is a deeper analysis for the possible first move:

			
				try
		XXXX	XYYY	XXYY	XYZZ	WXYZ
outcome
----		 625	 256   	 256	  81	  16
---W		   0	 308	 256	 276	 152
---B		 500     317	 256	 182	 108
--WW		   0	  61	  96	 222	 312
--BW		   0	 156	 208	 230	 252
--BB		 150	 123	 114	 105	  96
-WWW		   0	   0	  16	  44	 136
-BWW		   0      27	  36	  84	 132  
-BBW		   0	  24	  32	  40	  48
-BBB		  20	  20	  20	  20	  20
WWWW		   0	   0	   1	   2	   9
BWWW		   0	   0	   0	   4	   8
BBWW		   0	   3	   4	   5	   6
BBBB		   1	   1	   1	   1	   1

From the above table, we are certain that we need more than 4 attempts before knowing the secret code. The following is a possible way to do so(the final answer is left for you to deduce....). However, to disappoint you, it is not finished yet....
0-5 = the six colours
B=Black, W=White

0011
----:2344
     --BW:2533
          --BW:2452
               
---W:1233
     ----:4404 
          --BW:5000
          --BB:5400
          -BWW:4000
          -BBB:4500
     ---W:1505
          ---W:4020
          ---B:4220
          --WW:5300
          --BW:0220
          --BB:3504
          -WWW:1010
          -BWW:4520
          -BBW:2000
          -BBB:2000
     ---B:2205
          ---W:4400
          ---B:4400
          --WW:4000
          --BW:4200
          -BWW:5400
          -BBW:4500
          -BBB:2400
          BBWW:2000
     --WW:2142
          ----:3350
          ---W:0552
          ---B:2350
          --WW:4320
          --BW:2304
          --BB:2304
          -BWW:5000
          -BBW:2125
          -BBB:2425
          BBWW:4122
     --BW:5215
          ----:4310
          ---W:4530
          ---B:4210
          --WW:4420
          --BW:4130
          -WWW:2520
          -BWW:2100
     --BB:
     -WWW:
     -BWW:
     -BBW:
     -BBB:
 


Last modified Aug 24 1998
thomasina_lee@yahoo.co.uk
1