Hm. It would be nice if it does turn out to be that easy. But I don't think this is right:

Rows and columns are independent.

A valid choice at any given cell is dependant upon the existing values of the preceding two cells to the left, and the two above.

Also, after 1 billion simulations, the ratio is consistently, (since the first 1 million), 8.972something%. Your figure is too high as would be the case if you omit some of the dependencies:

A B C D +---------------- 1 | 6 | 6 |5.8| ? | |---+---+---+---+ 2 | 6 | 6 |5.8| ? | |---+---+---+---+ 3 |5.8|5.8| ? | ? | |---+---+---+---+ 4 | ? | ? | ? | ? | |---+---+---+---+
  1. The choices at C1, C2 & A3, B3, depend upon the two to left; or two above respectively.

    Of the 36 possible pairings for those two dependencies, 30 leave the choice as 6. 6 pairings leave the choices as 5.

    On average, choices in C1 (etc.) are therefore: 30*6 + 6*5 = 210 / 36 = 5.8333...

  2. The choices at D1, D2 & A4 & B4 is dependant upon the pairings left & above:

    On average, of the 6*5.8333... = 35 pairings that can occur, 6 will be invalid. Therefore 29*6 + 6*5 = 204 / 35 = 5.8285714...... choices.

  3. For C3, the choices are dependant upon the pairings in (C1,C2) and (A3,B3):

    This calculation is wrong!

    Of the 5.8333...^4 - 1158 possible combinations, 6^2 = 36 are invalid. Therefore 1122*6 + 36*5 = 6192 / 1158 = 5.9689119170984455958549222797927.

    Which cannot be right because with the extra constraint, the choices should go down, not up!

    But I'm having trouble wrapping my brain around extending the previous cases to this case?

    There should be a pattern, but I am not yet seeing it.

    Update: Progress! I see (one) error above.

    The choice will be restricted if either pair matches. So the invalid states are 6 * 5.8333^2 * 2; not 6*6. With that, the revised calculation is:

    Of the 5.8333...^4 - 1158 possible combinations, 6 * 5.8333^2 * 2 = 408.333 are invalid.

    Therefore 750*6 + 408.333*5 = 6541.66 / 1158 = 5.6491076568796632124352331606218.

    Which looks much closer to my expectations.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

In reply to Re^8: Pattern enumeration. (UPDATED) by BrowserUk
in thread Pattern enumeration. by BrowserUk

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.