![]() |
|
|
#1 |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
23·3·5·72 Posts |
I have been playing a puzzle game on my tablet lately. The aim is to fill in the grid with 0s and 1s such that 3 conditions are met:
1. There can be at most two 0s or 1s next to one another. 2. Each row and column should contain an equal number of zeros and ones. 3. Any two rows or any two columns can't be completely the same. Rule two indicates that the boards have an even size. I have been thinking about how many possible grids there are. Rule two isn't that hard to implement and I got some way to thinking about one. Can anyone work out have many valid 4x4 or 6x6 grids there are as solutions to this puzzle? Last fiddled with by henryzz on 2017-02-24 at 19:33 |
|
|
|
|
|
#2 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
4 by 4 has these 16 ( prior to the rules, red are eliminated by rule 1):
and a 6 by 6 has 64 possible combinations before rules. depending on the interpretation of rule 2 ( if all rows and columns need say 2 ones and 2 zeroes for example, versus say half are ones and half are 0's in each) even more could be eliminated. and the third rule is more about the order of rows I think because a different ordering of the rows could change what numbers the columns represent. so you might get to use 1100,1010,1001,0101,0011 and try to combine then if the equal number of ones and zeroes are in each row separately or not. |
|
|
|
|
|
|
#3 | |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
23·3·5·72 Posts |
Quote:
Not sure what you are saying about rule 2. If a row has 4 numbers then it needs 2 0s and 2 1s. This sort of logic will only get you so far. You wouldn't be able to do much beyond a 6x6. |
|
|
|
|
|
|
#4 | |
|
"Forget I exist"
Jul 2009
Dumbassville
838410 Posts |
Quote:
14 remain to go through rule three. |
|
|
|
|
|
|
#5 |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
588010 Posts |
Ok so 6x6 is possible using that brute force method. What about 8x8, 10x10, 12x12, nxn?
|
|
|
|
|
|
#6 |
|
"Forget I exist"
Jul 2009
Dumbassville
20C016 Posts |
well in general there won't be at most 2 leading zero's until you hit 2^(n-3) ( first time the 3rd place from the left gets filled) I think you'll find so a great deal of possible binary strings of length n can already be deleted. so already you can toss out 1/16 of all binary strings already. PS ( changed the exponent later) but then you can figure out when a third of the places have 1's by repeating the pattern.
Last fiddled with by science_man_88 on 2017-02-25 at 00:55 |
|
|
|
|
|
#7 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
oh and because you can switch all 0s to 1s and all 1s to 0s we know there will be an even number of solutions at least to each row. and we know a structure they may have using this plus hamming weight you can already cut the n=24 case down to 1800 or so without testing any more properties. edit: sorry 3600 when you flip the 1s and 0s but that's a lot less than 2^24-1. edit2: 3418 and probably falling now.
Last fiddled with by science_man_88 on 2017-02-25 at 02:46 |
|
|
|
|
|
#8 |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
23·3·5·72 Posts |
I have just coded a solution generator in c#.
This told me that there are 72, solutions for 4x4, 4140 solutions for 6x6 and 4111116 solutions for 8x8. Putting 4111116 in the oeis turned up https://oeis.org/A253316 which gives me another name for the puzzle. I think that the general consensus online seems to be that an exact formula isn't even known with just the first rule ignoring the others. |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Team drive #14: k=600-1001 n=1M-2M | mdettweiler | No Prime Left Behind | 10 | 2021-03-13 22:32 |
| k=1001-1399 | pb386 | Riesel Prime Search | 26 | 2016-05-30 12:10 |
| Team drive #7 k=800-1001 n=600K-1M | gd_barnes | No Prime Left Behind | 127 | 2011-07-15 14:25 |
| GPU sieving drive for k<=1001 n=1M-2M | mdettweiler | No Prime Left Behind | 11 | 2010-10-04 22:45 |
| Sieving. 300<k<=1001, n=600K-1M. | Lennart | No Prime Left Behind | 30 | 2008-09-01 08:51 |