# Finding all the Combinations – N Rectangles inside the Square

I am a beginner in Computational Geometry (Combinatorics) using Wolfram Mathematica and I need help from experts in the field.

How can I compute all the possible combinations: 6 Rectangles inside the Square (10×10) using Wolfram Mathematica?

Considering that the RESTRICTIONS of the problem are:

``1) No Rectangle Can Overlap  2) The 6 rectangles may be vertical or horizontal ``

See the image examples of possible and accepted solutions: Image-Accepted-Solutions-Examples

OUTPUT – Vector 100 elements by line (TEXT FILE):

0,1,1,0,0, . . . , 0,0,6,6,6 (Note: Image Example 01)
1,1,1,0,0, . . . , 0,0,0,4,4 (Note: Image Example 02)
0,0,5,5,0, . . . , 0,0,1,1,1 (Note: Image Example 03)
0,0,0,2,2, . . . , 0,0,0,0,0 (Note: Image Example 04)
0,0,0,0,2, . . . , 0,0,0,0,0 (Note: Image Example 05)
6,6,6,0,0, . . . , 0,4,4,4,0 (Note: Image Example 06)
Continue Combination…

Note: Please, do not put mathematical formulas. I would like the source code in Wolfram Mathematica that processes the input data (execute combinatorics task respecting the restrictions) and writes the direct output for text file to each iteration due to combinatorial explosion problems (Memory Overflow). Being that the detailed text output it is the example above: "OUTPUT – Vector 100 elements by line"

Posted on Categories cheapest proxies