Question 159
In the left-hand side diagram below there are 4 rows and 3 columns of rectangles, and in the right-hand side diagram below there are 3 rows and 4 columns of rectangles. Numbers are inserted in the rectangles in the left-hand side diagram as indicated below, while no numbers are inserted yet in the right-hand side diagram.
| 1 | 2 | 3 |
| --- | --- | --- |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| 10 | 11 | 12 |
| | | | |
| --- | --- | --- | --- |
| | | | |
| | | | |
| | | | |
Suppose we try to insert into each rectangle of the right-hand side diagram an integer greater than or equal to 1 and less than or equal to 12 in such a way that the following two conditions are satisfied:
* If numbers $n$ and $m$ are written in a same row of the right-hand side diagram, then they also appear in a same row of the left-hand side diagram.
* If numbers $n$ and $m$ are written in a same column of the right-hand side diagram, then they appear in a same column of the left-hand side diagram.
How many different ways are there for inserting numbers into the rectangles of the diagram on the right-hand side satisfying these conditions? We may insert a same number into more than one rectangles in the right-hand side diagram or we need not insert some number into any rectangle on the right-hand side diagram.
| 1 | 2 | 3 |
| --- | --- | --- |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| 10 | 11 | 12 |
| | | | |
| --- | --- | --- | --- |
| | | | |
| | | | |
| | | | |
Suppose we try to insert into each rectangle of the right-hand side diagram an integer greater than or equal to 1 and less than or equal to 12 in such a way that the following two conditions are satisfied:
* If numbers $n$ and $m$ are written in a same row of the right-hand side diagram, then they also appear in a same row of the left-hand side diagram.
* If numbers $n$ and $m$ are written in a same column of the right-hand side diagram, then they appear in a same column of the left-hand side diagram.
How many different ways are there for inserting numbers into the rectangles of the diagram on the right-hand side satisfying these conditions? We may insert a same number into more than one rectangles in the right-hand side diagram or we need not insert some number into any rectangle on the right-hand side diagram.