login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A231205 Table of maximal number of guesses required to solve a Mastermind variant, read by columns. 0
0, 1, 1, 2, 1, 2, 3, 2, 2, 3, 4, 2 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

The table is the maximum number of guesses required to absolutely identify a code from n colored pegs in k slots with no repetition, where marking is ordered and uses 3 types of peg - gray indicating the color isn't present, white indicating the color is present but in the wrong position and black indicating the color is present and in the right position.

Ordered marking means the codemaker marks from left to right and places a marking peg in the corresponding slot in the answer grid.

Note that the sequence only gives the number of guesses required, not the number of turns required. If for example we have 2 colors and 2 slots, and we guess RG and get marked ww, we now know the answer is GR, and this is not counted as necessary to guess.

T(3,2)=1 because with 3 colors, say c1, c2 and c3, then any answer to, say, the guess c1|c2 tells you the answer - if it's ww the answer is c2|c1, bb -> c1|c2, gw -> c2|c3, wg -> c3|c1, gb -> c3|c2 and bg -> c1|c3. The answers bw, wb and gg are all impossible.

T(4,3)=2 because the worst case scenario involves the 1st guess returning www or some form of wwg.

LINKS

Table of n, a(n) for n=1..12.

Web Games Online, Online MasterMind

Eric Weisstein, MathWorld : MasterMind

Wikipedia, MasterMind

FORMULA

T(n,1)=n-1.

T(n,2)=floor(n/2).

T(n,n)=n-1.

EXAMPLE

With 6 colors (RGYBOP) and 4 slots, say the code is YBRG. The guess BORP should be marked wgbg.

The table starts:

             Colors

Slots  | 1   2   3   4   5   6

-------------------------------

     1 | 0   1   2   3   4   5

     2 | x   1   1   2   2

     3 | x   x   2   2

     4 | x   x   x   3

     5 | x   x   x   x   4

     6 | x   x   x   x   x   5

CROSSREFS

Cf. A004523.

Sequence in context: A049819 A284566 A079056 * A003984 A087061 A082860

Adjacent sequences:  A231202 A231203 A231204 * A231206 A231207 A231208

KEYWORD

nonn,tabl

AUTHOR

Jon Perry, Nov 05 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 18 03:20 EDT 2018. Contains 316302 sequences. (Running on oeis4.)