A1. The fields of a $4 \times 4$ board are colored white or black. Next to each row and below each column, it is indicated how many fields in that row or column must be black.

In how many ways can the board be colored?
A) 0
B) 1
C) 4
D) 5
E) 8

![](https://cdn.mathpix.com/cropped/2024_04_17_a91c336121b9423a3a1eg-1.jpg?height=309&width=305&top_left_y=1142&top_left_x=1521)
A1. D) 5 Note first that all boxes in the second row and in the second column must be colored white. We consider two cases, depending on the color of the box in the top left corner.

If this box is white, the last two boxes in the first row and column must be black. This fixes the coloring. See the top figure.

If this box is black, one more box in the first column and one more box in the first row must be black. For each of the $2 \times 2=4$ choices, there is exactly one solution. There is then still one row and one column missing a black box. The box in that row and column must therefore be black, and the rest white, see the bottom four figures.
![](https://cdn.mathpix.com/cropped/2024_04_17_7effb8aeb7220f8b3452g-1.jpg?height=522&width=328&top_left_y=524&top_left_x=1521)