$50 to develop a program in Matlab

Discussion in 'Programming' started by falco85, Mar 2, 2009.

  1. #1
    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
     
    falco85, Mar 2, 2009 IP
  2. chmdznr

    chmdznr Active Member

    Messages:
    417
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I can do that. PM me if you haven't found someone. (my matlab is version 7r14)
     
    chmdznr, Mar 2, 2009 IP
  3. ajayr

    ajayr Active Member

    Messages:
    322
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Does this have to be in Matlab? Can I do it in Perl or in R?
     
    ajayr, Mar 2, 2009 IP