由 gkw0824usa 於 星期六 十月 13, 2012 1:27 am
1.
picture this:
you are trying to find out the permutation of 12 rocks and 3 sticks (3 sticks divides the rocks into 4 spaces which are X,Y,Z,U respectively)
xxxxxxxxxxxx |||
eg. xxxx|xxxx|xx|xx (X,Y,Z,U)
so the non negative sol would be (12+3)!/(12!3!)
now if you want positive sol:
first assign each (X,Y,Z,U) 1 rocks each, then the problem will be reduced to similar to the one we did except that
the initial setup would then be the following:
xxxxxxxx, |||
so the you would be finding the permutation of 8 rocks and 3 sticks.
find the permutation and you're done