Find the number of 2 0 1 8 × 2 0 1 9 matrices formed from only the elements { 0 , 1 } such that the number of 1 's in each row and each column is even.
If your answer is N , then find N m o d 2 0 1 7 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let V n be the n -dimensional vector space over the field Z 2 of two elements consisting of column vectors. Then W n = { x ∈ V n ∣ ∣ x 1 + x 2 + ⋯ + x n = 0 } is an n − 1 -dimensional subspace of V n . From this we see, for any m , n ≥ 2 , that Z m , n = { A ∈ L ( V m , W n ) ∣ ∣ e ( m ) ∈ K e r A } where L ( V m , W n ) is the vector space (over Z 2 of all linear transformations from V m to W n , and e ( m ) ∈ V m is the column vector ( 1 1 1 ⋯ 1 ) T , is a vector space over Z 2 of dimension ( m − 1 ) ( n − 1 ) . Thus Z m , n contains 2 ( m − 1 ) ( n − 1 ) elements.
We are interested in the number of elements in Z 2 0 1 8 , 2 0 1 9 , and hence N = 2 2 0 1 7 × 2 0 1 8 . Since 2 2 0 1 6 ≡ 1 ( m o d 2 0 1 7 ) , we deduce that N ≡ 2 2 0 1 8 ≡ 2 2 = 4 ( m o d 2 0 1 7 ) .
Problem Loading...
Note Loading...
Set Loading...
Fill the top-left 2 0 1 7 × 2 0 1 8 portion of the grid freely. We claim this gives exactly one solution. We also claim all solutions can be produced in this way, and no solution is produced twice.
The latter claim is easy: from any solution, look at the top-left 2 0 1 7 × 2 0 1 8 portion. This solution is generated from that portion. No solution is produced twice, since each solution can only be possibly produced from one portion.
Now we claim each portion gives one solution. To see this, simply note that the last cell of each of the first 2017 rows is determined from the other cells: it's the only cell that will make the count of 1's to be even in the row. Now that we fix this, the last cell of each column is also determined in the same way. Finally, the last row will automatically match: there are a total of an even number of 1's (because each column gives an even number of 1's), and the first 2017 rows have an even number of 1's each, so this last row must also have an even number of 1's.
This proves the claim. So each solution is generated by a unique portion, and each portion generates a unique solution. There are 2 2 0 1 7 × 2 0 1 8 portions, and hence that's the number of solutions. So N = 2 2 0 1 7 × 2 0 1 8 .
Now, by Fermat's Little Theorem, since 2017 is prime, we have 2 2 0 1 7 ≡ 2 ( m o d 2 0 1 7 ) . Thus
N ≡ 2 2 0 1 7 × 2 0 1 8 ≡ ( 2 2 0 1 7 ) 2 0 1 8 ≡ 2 2 0 1 8 ( m o d 2 0 1 7 ) ≡ 2 ⋅ 2 2 0 1 7 ≡ 2 ⋅ 2 ( m o d 2 0 1 7 ) ≡ 4