Matrix Help: Combinations Given a 10 by 10 matrix filled with 0s and 1s, how many possible outcomes are there?
It sounds easy enough as a combination of $2^{100}$. The kicker to the question is there MUST be exactly five 1's in every row and every column.
Given this is an extra credit school assignment I understand if no one wishes to help but I would like to gain an understanding of the mathematical process
 A: Problems like this are often hard to solve by hand, and also hard to brute-force on a computer if the answer is too large, but you can be smarter than brute-force and get the answer quickly with a computer. Imagine building up your board row by row. You have only one choice for the last row after the first 9 rows are determined. Let $f(n,k_0,k_1,k_2,k_3,k_4,k_5)$ count the number of $n \times 10$ boards you can make where you have $k_i$ columns with $i$ ones, where every row has 5 ones. Then you want to compute $f(10,0,0,0,0,0,10)$. But by the reasoning above this is equal to $f(9,0,0,0,0,5,5)$. Similarly you can come up with generalized counting arguments to get $f(n,k_0,k_1,k_2,k_3,k_4,k_5)$ in terms of a linear combination of $f(n-1,k_0,k_1,k_2,k_3,k_4,k_5)$ for various different combinations of $k_i$.  Using a computer you can quickly compute all the necessary $f(n,k_0,k_1,k_2,k_3,k_4,k_5)$ values in order of increasing $n$. Note you'll probably need unsigned 64-bit integers to store the counts depending on how large they get. You may even need an arbitrary precision integer package if the total answer is more than $2^{64}$. However the total answer is bounded by ${10 \choose 5}^{10}$ and that's not even taking into consideration the fact that both rows AND columns are restricted to have 5 1's each, so probably the answer is less than $2^{64}$ so unsigned integers should work, so you can use any standard programming language you want as long as you're in a 64-bit storage environment.
As a further example of the reasoning, suppose you want to compute $f(2,2,6,2,0,0,0)$. You know the only valid base case for $n=1$ is $f(1,5,5,0,0,0,0)$ and you have $f(2,2,6,2,0,0,0) = {6 \choose 2}{5 \choose 2} f(1,5,5,0,0,0,0)$ by choosing which 2 columns have 2 ones and which 2 columns have 0 ones. And $f(1,5,5,0,0,0,0) = {10 \choose 5}$. 
The complexity of this algorithm is bounded by the number of sub-cases you can get for each $n$. You have $6$ non-negative indices $k_i$ that must sum to $10$. Also the sum $\sum_i i k_i = 5n$, and also $k_i = 0$ for $i > n$, but let's ignore those constraints for a moment. There are ${14 \choose 5} = 2002$ ways to get the 6 indices $k_i$ so that $\sum_i k_i = 10$. Thus there are fewer than $2002$ sub-cases for each $n$. When you move from $n$ to $n+1$, some sub-cases will depend on multiple previous sub-cases. But even in the worst case, if every sub-case depends on every previous sub-case, this still only gives you on the order of $2002^2 = 4$ million pairs of sub-cases you need to compute coefficients for when you move from $n$ to $n+1$. So the total complexity is no more than on the order of $10 \times 4$ million = $40$ million computations of coefficients for pairs of sub-cases. A computer can solve this in a matter of seconds or faster.
Note you probably don't want to store $f(n,k_0,k_1,k_2,k_3,k_4,k_5)$ as a 7-dimensional array, because the array would be quite large and there are only at most $20,020$ entries you need to store. Use a hash table (or a structure like dictionary in python) and use $(n,k_0,k_1,k_2,k_3,k_4,k_5)$ as the hash key.
