How many ways are there to arrange the $48$ staves of a barrel where each stave has 2 states, upside up or upside down.
If the staves couldn't flip, then it would just be $\frac{48!}{48}=47!$
This would be arranging n people in a circle which I remember being $\frac{n!}{n}=(n-1)!$
I initially thought it would be $2*48!$ to allow staves to have an up & down side, but that's way too small and I also wasn't thinking of the circular part of the problem.
I also thought of $(2*48)!=96!$
But that seems to overcount since you only have $48$ staves and this way it allows you to put the same stave next to itself (once in its up position & once in its down position). But I know that each stave has $2$ states, that doesn't translate to $96$ things to arrange, because once you place the 1st stave, you only have $47$ left.
(And it's also ignoring the circular part.)
I have a specific answer to the $48$ staves problem $$ 47!*2^{47} $$ As well as a general formula which I'm pretty sure accounts for arranging in a circle $$ \frac{n!}{n}*\frac{2^n}{2} = (n-1)!*2^{n-1} $$
Explanation
First, imagine we are just arranging $n$ things (ignore flipping staves and the circle aspect) When $n=3$, there are $6!=6$ ways to arrange $3$ staves labeled
A,B&CNow I'll let
A'be thedownstate &Abe theupof a staveFor each of the $6$ simple arrangements, we now need to allow each stave to flip
Let's just look at the very 1st arrangement:
A B CYou can do the same thing allowing flips for the 2nd arrangement:
A C BEach of the $6$ original arrangements expands to $8$ when you allow flipping
$8=2^3$ which should make sense since we have $3$ staves and each has $2$ states (
upordown)So when $n=3$, we start with $3!=6$ initial arrangements, each multiplied by $8$ to allow flipping
$\quad 3!*2^3$
$=6*8$
$=48$
But this hasn't dealt with the fact that we are arranging in a circle
Accounting for The Circular Aspect
When we simply do $n!$, it overcounts
Each arrangement creates $n$ identical patterns because you could rotate $n$ places around the circle and it would still be the same arrangement
Take the "circle" of 3 staves (really a triangle) and just look at the arrangement
A B CImagine starting at any vertex and go clockwise until you come back to the starting vertex.
You get $3$ "arrangements", but they're treated as identical when arranging things in a circle
So you divide by $n$ (the number of vertices where you can start)
$\frac{n!}{n}=(n-1)!$
$\frac{3!}{3}=(3-1)!$
$\quad\, =2!$
$\quad\, =2$
Without flipping, you just have $6$ arrangements & divide by $3$ to account for the circle
But here we have $48$ arrangements to begin with (not $6$) before accounting for the circle
Here are all $48$ arrangements for $3$ staves
The numbers represent arrangements that are in a group & treated as identical
There are only $16$ distinct groups
$\frac{48}{3}=16$
So even though there's the complication of allowing staves to flip, we still just divide by the $n$ staves we have to account for the circle
Edit: As pointed out by Ross Millikan, you need to divide by $2$ to account for flipping over the barrel yielding the same arrangement
This leads to the general formula: $\frac{n!}{n}*\frac{2^n}{2} = (n-1)!*2^{n-1}$
Verifying with $4$ Staves
The $*2^n$ pattern extends to $4$ staves & gave me a new way of thinking of factorial
Here's $3!$ again
Now for each of the $6$ arrangements, there are $4$ places to insert a new 4th stave
Here's $4!=24$ showing where the 4th stave (labeled
X)can be inserted into the $3!=6$ arrangementsAllowing flips, lets look at the 1st arrangement:
X A B CNotice how the first $8$ rows are the same as they are for $3$ staves if you ignore the
X& just look atA,B,Cand their flipped'statesAllowing the 4th stave to flip doubles the $8$ arrangements we had from $3$ staves
This time $1$ arrangement expands to $16$ arrangements allowing flips
$16=2^4$ which follows the pattern: we have $4$ staves, each with $2$ states
So $4!*2^4$
Then divide by $n$ to account for the circle and divide by 2 to ignore flipping the barrel
$\quad \frac{4!}{4}*\frac{2^4}{2}$
$=3!*2^3$