Determine the ways of arranging 'm' men and 'w' women alternatively in a row of 's' seats.
Assumptions :
s<m and s<w
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers22
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2814 Solvers
-
Matrix which contains the values of an other matrix A at the given locations.
239 Solvers
-
523 Solvers
-
Find the index of n in magic(n)
272 Solvers
-
Solving Quadratic Equations (Version 1)
504 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Shouldn't your test result be 18?
3*2*2 + 2*3*1 = 12 + 6 = 18
I think it depends on how you interpret this problem. For example, notice that the problem states that it is assumed that s < m and s < w, but neither of these is true for the test problem. Should they be m < s and w < s? Also, the test has a variable x = 1 which is not defined and is not passed as an argument. I suspect it may be the number of empty seats, but who really knows. Perhaps there is some combination of assumptions for which the right answer is 9. :-)
Are we treating the men and women as identical in their respective sets?