Not having repeats makes the job of the person with the code much simpler, at least I think it does. The work that the person guessing the code has to do would then be based on the size of V compared to P.

If you call each "color" Cn, and take the first P characters from a randomly sorted alphabet of size V, you essentially have a code of ...

C1, C2, C3, ..., Cp

If my grey matter is working properly, it does not matter what characters the code maker chooses, other than as a psychological exercise against the choice of the initial selections.

If I ignore defending against the choice of initial selections, the code maker really only has 315 puzzles to generate.

(p=1, v=1 ) .. (p=1, v=36) => 36 (p=2, v=2 ) .. (p=2, v=36) => 35 ... (p=10, v=10) .. (p=10, v=36) => 27 ((27 + 36) / 2) * 10 = 315

Now, that is not to say that the code maker will probably not be choosing '0', '01', '012', etc as the codes. It also does not mean that there will not be some carefully chosen sequences designed to test the robustness of certain types of implementations. :-)

--MidLifeXis

Please consider supporting my wife as she walks in the 2009 Alzheimer's Walk.


In reply to Re^2: Challenge: Optimal Bagels Strategy by MidLifeXis
in thread Challenge: Optimal Bagels Strategy by Limbic~Region

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.