A strange question follows:
I'm doing a problem solving competition @ my school, and they allow us to use a computer. Since I'm the only one in the competition who knows how to code, I use C and Pascal programs to solve problems faster. I've done that with pseudocode-to-code exercises, algorithms, Collatz conjecture verification and such.
Now, yesterday I was training for the next challenge (18th of April), and I saw an exercise on Young tableaux. It was phrased like this(I'll do my best to translate from Italian):
"Ferrers diagrams are configuration of N boxes distributed in one or more horizontal rows, left-aligned and configured so that every row contains an equal or lower number of boxes than the row over it. These configurations might also be described by a list of the boxes' number, like in this image:
(source: olimpiadiproblemsolving.it)
A Young tableau is a Ferrers diagram of N boxes filled with integers from 1 to N. Example:
(source: olimpiadiproblemsolving.it)
If numbers in the boxes are sorted so that they are in increasing order by row and by column, the table is "standard"(example: first, third and fifth tableau). In standard tableaux, the first box of the first row always contains 1. N is always in the left-most box in one of the rows of the diagram.
PROBLEM
Consider a [6,3,2,1,1,1] Ferrers diagram:
1) If 6 is fixed on the 6th box of the 1st row and 11 is fixed in the last box of the 1st column, in how many ways can you complete the diagram in a standard way?
2) If 7 is fixed on the 6th box of the 1st row and 11 is fixed in the last box of the 1st column, in how many ways can you complete the diagram in a standard way?
3) If 8 is fixed on the 6th box of the 1st row and 11 is fixed in the last box of the 1st column, in how many ways can you complete the diagram in a standard way?"
I've tried to code a solution with a matrix filled with those numbers and with "-1" as a "row-ending character", but I got stuck. How can I code "fill it in every way possible so that the tableau is standard?".