First off... who puts balls on tiles? They roll away and not to mention the cat keeps batting at them. Am I the only one who thinks about these things???
Sorry. I like this problem, I know you didn't really ask, and this is now the distant future, but I'd like to solve the bigger question of N x N grids:
An N x N grid requires (3N-2)/2 balls to ensure the required 2N unique combinations. I will note an odd value for N requires that the equation be rounded up, and that N=1 and N=2 are not solvable for any # of balls. This equation represents the limit using the least ball-centric combinations, but also represents the actual solution for all N>2 because there is an easy-ish method for building the puzzle.
The big strategy I am putting forward is that you must first tackle the 1-ball combinations and everything else will fall into place.
![![8x8_1](https://cdn.statically.io/img/i.sstatic.net/hO1MU.png)
This is an example 8x8 grid. I have labeled some of the rows and columns to remind myself how many balls I intend on putting in that row or column. I have eight total 1-ball combinations and I must use all of them. These four balls generate the eight combinations I need.
![![8x8_2](https://cdn.statically.io/img/i.sstatic.net/lFflw.png)
But when I go to fill in the 2-ball combinations I have a problem. The rows and columns, when added up, come out to different values. This isn't a big deal, we just need to fix it up a bit in those last two rows. I just sort of flipped the labels in the corner.
![![8x8_3](https://cdn.statically.io/img/i.sstatic.net/OmL7x.png)
The last step isn't magic, I just started filling in balls to satisfy the 2-ball rows and columns and it just sort of solved itself. We have many 2-ball combinations at our disposal and better yet this alternating spacing happens to be awesome for not making duplicate combinations. I don't know... maybe it is magic.
![![enter image description here](https://cdn.statically.io/img/i.sstatic.net/cSdom.png)
So check this out. This pattern emerges from filling in those 2-ball combinations. N is odd here so you will note the labels in the lower corner look a bit different. Bottom two rows look a little funny, and that's always going to happen. I figure there's twelve or so different ways that pattern could end in the corner.
![![enter image description here](https://cdn.statically.io/img/i.sstatic.net/GhL4h.png)
I would love to know if there is a way to arrange things where you don't have to fix up the bit in the corner. It's pretty elegant if not for that. I had fun.