probability/combinatorial question Consider a 7 x 7 grid with each space consecutively numbered 1-49 (row one 1-7, row two 8-14 etc etc). How many ways are there of choosing any 6 numbers from 49 such that at most 2 numbers are chosen from any one column or row of the grid?
 A: Let S be the set of all possible choices of 6 numbers, let $A_i$ be the set of choices with at least 3 numbers from row i, and let $B_i$ be the set of choices with at least 3 numbers from column i, where $1\le i\le7$.
Using Inclusion-Exclusion to find the number of elements in $\overline{A_1}\cap\cdots \cap\overline{A_7}\cap\overline{B_1}\cap\cdots\cap\overline{B_7}$, we get
$|S|-\sum_{i}|A_{i}|-\sum_{i}|B_{i}|+\sum_{i<j}|A_{i}\cap A_{j}|+\sum_{i<j}|B_{i}\cap B_{j}|+\sum_{i,j}|A_{i}\cap B_{j}|=
\displaystyle\binom{49}{6}-2\binom{7}{1}\bigg[\binom{7}{3}\binom{42}{3}+\binom{7}{4}\binom{42}{2}+\binom{7}{5}\binom{42}{1}+\binom{{7}}{6}\bigg]+2\binom{7}{2}\binom{7}{3}\binom{7}{3}+\binom{7}{1}\binom{7}{1}\bigg[\binom{6}{3}\binom{6}{3}+\binom{6}{2}\binom{6}{2}\binom{36}{1}+2\binom{6}{3}\binom{6}{2}\bigg]$ 
where the terms in the last set of brackets correspond to the cases in which the number in the
ith row and jth column is not chosen, where it is chosen and only 2 other elements are chosen from that row and column, and where it is chosen and 3 other elements are chosen from that row or column.
(Notice that all the triple intersections are empty.)
