How many Qr code can we generate

shecincrid

New member
Joined
Jan 18, 2021
Messages
3
Hello guys,

We are trying to calculate how many Qr code we can generate with different pattern.

We developed an algo in C to do a Brut Force but we could't make it.

Basically this is the problem, we have a square divided by 16x15

We have the same figure than a normal tetris, "T" "L" "I" ...

And we also have simple square witch are 1x1 cubes.

We would like to know how many possibilities there is to fit all of them in the 16x15.

See attached pictures

Do not consider the square at the left top of the picture.

We couldn't make it with our algo as for the Brut Force we need to manage the fact that all the black pattern can be flipped.

If you have any idea to calculate that we will be really gratefull.

Thanks guys.
 

Attachments

  • Screen Shot 2021-02-05 at 15.08.03.png
    Screen Shot 2021-02-05 at 15.08.03.png
    106.2 KB · Views: 1
We would like to know how many possibilities there is to fit all of them in the 16x15.

You could subdivide your large grid into several smaller tiles. Then it would be much easier/ quicker to calculate the number of possible patterns on a single tile, let this be p (however this will still require writing some code). Then, if the large grid uses 3 tiles, then there would be p^3 possible ways of tiling the large grid.

We have the same figure than a normal tetris, "T" "L" "I" ...
And we also have simple square witch are 1x1 cubes.

I notice that you also have some figures with 2,3 and 5 squares. All the standard Tetris figures, or "Tetrominoes", have exactly 4 squares. So if your goal is to make the pattern recognisable then I'd recommend that you stick to the original shapes. Perhaps also consider leaving a complete gap around each shape. Here's an example tile...

grid.png

The tile should have a gap along the upper and right edges (for example) so that when tiles are adjacent then the tetronimoes do not touch. I highlighted the border green just to show the tile's edge (I would not include this border in the final grid).
 
Top