I can see this problem getting more complex. Let us try to simplify the problem right down with the aim of expanding the options in the future. I'm trying to turn it into an academic exercise.
ok. Imagine we have a square that is 2 by 2. How many options. For (row1pos1, row1pos2, row2pos1, row2pos2). We have (1,1,1,1),(0,1,1,1), (1,0,1,1), (1,1,0,1), (1,1,1,0), (0,0,1,1), (1,0,0,1), (1,1,0,0), (0,0,0,1), (1,0,0,0), (0,1,0,1), (1,0,1,0), (0,0,0,0), there is also, (0,1,0,0), (0,0,1,0) , (0,1,1,0) There are 16 outcomes, right? There are 4 cell, 2 possibilities for each cell.
With 1 cell there would be 2 options
2 cells, 4 combinations.
3 cells, 8 combinations. (1,1,1), (0,1,1), (1,0,1), (1,1,0), (0,0,1), (1,0,0), (0,1,0), (0,0,0)
4 cells, 16 outcomes
The number of outcomes is the number of options to the power of the number of cells. The forth case is 2 x 2 x 2 x 2 = 16.
In our case there is 12 x 12 cells. This is 144 cells. 2 to the power of 144 is 2.2300745e+43. That is a big number.
Without complicating things, if this was a DNA sequence there would be 4 options rather than two. 4 to the power of 144 is 4.9732324e+86 .... wooh
In the case presented here. There are multiple small squares. However, in subdividing the squares into subsquares we are creating virtual presence of stars '*'s. You see how I am presenting all this. Yeah. We haven't done the calculation. But you can see that there would be a lot of options.
Therefore we really need to understand more about the problem. It would require machine learning and decision trees. Not Perl's strongest basket. I would love and be loved to see Perl move more in that direction because of the fantastic community it has.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.