hi, i am willing to pay $50 (Paypal) for who is able to write me a matlab program able to solve the following problem. I have a garage with n x m parking spots, and I have p vehicles to park. Assuming that all the spots are empty, I want to generate all the possible solutions for this problem (also generating all the "sub" cases of q < p cars). I made an example above of what I mean. The following is for n=m=p=q=2 , but I want the algorithm to be able to solve the problem for any value of those parameters Falco85 Example: n=m=p=2, representing the garage with a matrix like this: 0 0 0 0 i want to generate all the possible matrices when one or both the cars are parked. in this case the solution to the problem would be: 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 2 0 0 0 0 2 0 0 0 0 0 2 0 0 2 0 1 2 0 0 1 0 0 2 1 0 2 0 2 1 0 0 2 0 0 1 2 0 1 0