Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

counting there being less options b/c colors that aren't used yet are equivalent isn't going to get you very far. after all 4 colors are placed once it stops helping.

also you're counting wrong. there are 2 or 3 options for the third square. 2 if the first 2 squares got the same color.



I was trying to point out that you can quickly eliminate 90% of the problem space so while I did forget about some summitry's my point still stands. Anyway looking at a 3x3 grid the box limitation is going to become increasingly important.

  Step 1: (1,x,x,x)
  Step 2:
  There are 2 meaningful options (1,1,x,x) and (1,2,x,x) because (1,3,x,x) is the same as (1,2,x,x).  Granted only apply to the first 2x2 grid.
  Step 3: (1,1,1,x), (1,1,2,x), (1,2,1,x), (1,2,2,x), (1,2,3,x)
  Step 4: (1,1,1,2), (1,1,2,1), (1,1,2,2), (1,1,2,3), (1,2,1,1), (1,2,1,2), (1,2,1,3), (1,2,2,1),(1,2,2,2),(1,2,2,3), (1,2,3,1),(1,2,3,2),(1,2,3,3),(1,2,3,4) 
So 14 options.


See, that's the thing about really big numbers. 10% of 10^174 is still 10^173.


It's no where near 10^173 because of the box limitations. Adjusting for summitry's there are 12 (or less) 2x2 boxes. But then building a 3x3 box, the total is not 12 * 4^5 possible because at least 4 * 12 of them are eliminated by the boxing constraint. It's more than that but I am not doing this by hand.

The reason you can't crack RSA is because after skipping composite numbers and small primes you cant further reduce the search space. Don't forget 20x20 box is known to not be solvable and the 16x16 box has at least one known solution.


how does it stand? you have given no argument this will make a substantial reduction when the grid size is much larger than the number of colors


Ok, if you consider in on the logarithmic scale then it's almost meaningless, but the idea was:

A) you don't need to innumerate every complete grid before eliminating them.

B) How you count is important, if you just looked at the top row the boxing effect does not help and you have almost 2 * 3 * 4^14 options.

PS: You can also cull some rotational summitry's from those 14 options before you start, but again that's only important if you are trying to actually calculate it.


> you don't need to innumerate every complete grid before eliminating them.

Of course. For large grids, I wonder if you can eliminate everything that doesn't have nearly equal amounts of every color.


Yes, though I would try an construct a 9x9 grid, and then try tacking on 3 valid 8x8 grids, then add the filler. My guess is larger grids are more constrained than working with smaller independent grids. Also you could store the extra grids as part of a larger data structure and work your way up to them by testing valid 2x2 grids, which are subset's a valid 3x3 grid etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: