Let me preface this question saying that am not a mathematician. I am actually an engineer and my problem came from an particular wiring configuration matrix I needed to construct to figure out every possible way one could stuff up the wiring of a particular device. That being said here is my question:
I have a matrix of m rows and n columns. What are the possible permutations of this matrix given that for each column there must be one and only one '1' and the rest must be '0'.
Or you could say: What are the possible permutations of the matrix given that for each column there must be one and only one $x$ and the rest must be $y$.
I have been able step through every permutation in an exhaustive sense just trying out every way I could think of with a spreadsheet. But I am really interested in the maths and how I would express this problem. I could probably write a short piece of code to do this but that's not helping me understand the underlying maths.
Here is an example matrix \begin{bmatrix} 1 & 1 & 1 & 1\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{bmatrix}
This would be a starting condition and the next step might be \begin{bmatrix} 0 & 1 & 1 & 1\\ 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{bmatrix}
etc etc
Thanks