This is the result after working on the problem on and off since then.
The multinomial function is:
multinomial(x,y) = (x+y)! / (x! * y!)
This equation can be applied to things that must happen
in a specific order. It determines the permutations of these collections
that arise because they can be interleaved. It is this:
s = a + b + c + ... = the total number of steps across the collections
a, b, c,... = the number of items for each independent set
then
s! / ( a! * b! * c!...) = the total number of possibilities
The a, b, c... terms are for those sets of items that must be done in order.
If an item can be interleaved independently, it contributes to s, but
does not need to be in the denominator. Examples follow.
We shall apply this multinomial coefficient method where possible.
4! / (2! * 2!) = 6 Left sock, left shoe, right sock, right shoe. Left sock, right sock, left shoe, right shoe. Left sock, right sock, right shoe, left shoe. Right sock, left sock, left shoe, right shoe. Right sock, left sock, right shoe, left shoe. Right sock, right shoe, left sock, left shoe.
6! / (3! * 3!) = 20 Left sock, left shoe, left tied, right sock, right shoe, right tied. Left sock, left shoe, right sock, left tied, right shoe, right tied. Left sock, left shoe, right sock, right shoe, left tied, right tied. Left sock, left shoe, right sock, right shoe, right tied, left tied. Left sock, right sock, left shoe, left tied, right shoe, right tied. Left sock, right sock, left shoe, right shoe, left tied, right tied. Left sock, right sock, left shoe, right shoe, right tied, left tied. Left sock, right sock, right shoe, left shoe, left tied, right tied. Left sock, right sock, right shoe, left shoe, right tied, left tied. Left sock, right sock, right shoe, right tied, left shoe, left tied. Right sock, left sock, left shoe, left tied, right shoe, right tied. Right sock, left sock, left shoe, right shoe, left tied, right tied. Right sock, left sock, left shoe, right shoe, right tied, left tied. Right sock, left sock, right shoe, left shoe, left tied, right tied. Right sock, left sock, right shoe, left shoe, right tied, left tied. Right sock, left sock, right shoe, right tied, left shoe, left tied. Right sock, right shoe, left sock, left shoe, left tied, right tied. Right sock, right shoe, left sock, left shoe, right tied, left tied. Right sock, right shoe, left sock, right tied, left shoe, left tied. Right sock, right shoe, right tied, left sock, left shoe, left tied.
6! / (3! * 3!) = 20
20 + 20 + 12 = 52 Pants, Left sock, left shoe, left tied, right sock, right shoe, right tied. Pants, Left sock, left shoe, right sock, left tied, right shoe, right tied. Pants, Left sock, left shoe, right sock, right shoe, left tied, right tied. Pants, Left sock, left shoe, right sock, right shoe, right tied, left tied. Pants, Left sock, right sock, left shoe, left tied, right shoe, right tied. Pants, Left sock, right sock, left shoe, right shoe, left tied, right tied. Pants, Left sock, right sock, left shoe, right shoe, right tied, left tied. Pants, Left sock, right sock, right shoe, left shoe, left tied, right tied. Pants, Left sock, right sock, right shoe, left shoe, right tied, left tied. Pants, Left sock, right sock, right shoe, right tied, left shoe, left tied. Pants, Right sock, left sock, left shoe, left tied, right shoe, right tied. Pants, Right sock, left sock, left shoe, right shoe, left tied, right tied. Pants, Right sock, left sock, left shoe, right shoe, right tied, left tied. Pants, Right sock, left sock, right shoe, left shoe, left tied, right tied. Pants, Right sock, left sock, right shoe, left shoe, right tied, left tied. Pants, Right sock, left sock, right shoe, right tied, left shoe, left tied. Pants, Right sock, right shoe, left sock, left shoe, left tied, right tied. Pants, Right sock, right shoe, left sock, left shoe, right tied, left tied. Pants, Right sock, right shoe, left sock, right tied, left shoe, left tied. Pants, Right sock, right shoe, right tied, left sock, left shoe, left tied. Left sock, pants, left shoe, left tied, right sock, right shoe, right tied. Left sock, pants, left shoe, right sock, left tied, right shoe, right tied. Left sock, pants, left shoe, right sock, right shoe, left tied, right tied. Left sock, pants, left shoe, right sock, right shoe, right tied, left tied. Left sock, pants, right sock, left shoe, left tied, right shoe, right tied. Left sock, pants, right sock, left shoe, right shoe, left tied, right tied. Left sock, pants, right sock, left shoe, right shoe, right tied, left tied. Left sock, pants, right sock, right shoe, left shoe, left tied, right tied. Left sock, pants, right sock, right shoe, left shoe, right tied, left tied. Left sock, pants, right sock, right shoe, right tied, left shoe, left tied. Right sock, pants, left sock, left shoe, left tied, right shoe, right tied. Right sock, pants, left sock, left shoe, right shoe, left tied, right tied. Right sock, pants, left sock, left shoe, right shoe, right tied, left tied. Right sock, pants, left sock, right shoe, left shoe, left tied, right tied. Right sock, pants, left sock, right shoe, left shoe, right tied, left tied. Right sock, pants, left sock, right shoe, right tied, left shoe, left tied. Right sock, pants, right shoe, left sock, left shoe, left tied, right tied. Right sock, pants, right shoe, left sock, left shoe, right tied, left tied. Right sock, pants, right shoe, left sock, right tied, left shoe, left tied. Right sock, pants, right shoe, right tied, left sock, left shoe, left tied. Left sock, right sock, pants, left shoe, left tied, right shoe, right tied. Left sock, right sock, pants, left shoe, right shoe, left tied, right tied. Left sock, right sock, pants, left shoe, right shoe, right tied, left tied. Left sock, right sock, pants, right shoe, left shoe, left tied, right tied. Left sock, right sock, pants, right shoe, left shoe, right tied, left tied. Left sock, right sock, pants, right shoe, right tied, left shoe, left tied. Right sock, left sock, pants, left shoe, left tied, right shoe, right tied. Right sock, left sock, pants, left shoe, right shoe, left tied, right tied. Right sock, left sock, pants, left shoe, right shoe, right tied, left tied. Right sock, left sock, pants, right shoe, left shoe, left tied, right tied. Right sock, left sock, pants, right shoe, left shoe, right tied, left tied. Right sock, left sock, pants, right shoe, right tied, left shoe, left tied.I would like to find a formula for this. This is a brute force solution at present.
7! / (3! * 3!) = 140
1) pant leg
2) sock
3) shoe
4) tie shoe
If this is the case, we now have 4 steps to perform per foot, so:
8! / (3! * 3!) = 1120
1) pant leg
2) sock
3) untie shoe
4) shoe
5) tie shoe
If we do these 10 steps in order, we then have:
10! / (5! * 5!) = 252In reality, the first three steps can be done in any order, so that really complicates things.
To see how these results were numerically simulated and modeled, check out my awk program to do this:
shoes.awk
Created: 27 Apr 2018 Modified: 23 Jul 2026Back to the home page.