Finding a certain set of matrices with GAP

47 Views Asked by At

Call a $n \times n$-matrix $A=(a_{i,j})$ with entries only 0 or 1 "cool" in case it has the following properties:

-We have $a_{i,j}=0$ in case $i>j$.

-It has only 1 on the diagonal

-It has only 1 in the first row.

(call it "supercool" if additional it has only 1 on the last column.)

Question: Is there a quick/good way to obtain all cool (an supercool) matrices with GAP?

I know how to do it when filtering out from all 0-1-matrices but that takes very long when $n$ is large. So I am hoping for a very fast way to get those matrices also for large $n$.