This came up as a result of a rather roundabout thought-exercise -derivation of the number of possible musical scales. The questions and observations - which are the point of this post - are at the bottom of the wall o' math. I'm one of those cursed physics people the real mathematicians like to yell at, so my notation may be godawful even if my logic is sound. Please point out mistakes in either logic or notation.
--
Suppose a scale is defined as any unique combination of notes between a given note at the bottom and that same note, one octave up, at the top. Every scale has a minimum of two notes separated by one octave (low "do", high "do"), and a maximum of 12 (the chromatic scale). (It may be possible to generalize to any number of divisions, but I don't know how.) Represented in binary form with 0 representing "there is no note in this slot" and 1 representing "there is a note here" we therefore have
100000000001 (Do, Do)
and
111111111111 (chromatic)
At this point you should be seeing what I didn't for far too long, which is that we obviously have a 10-bit binary array and there are 2^10 unique combinations. But since I want a sum series, I'll go on...
It becomes useful now to qualify the possible scales in terms of the number of filled states, where n=0 is (Do, Do) and n=10 is (chromatic). In such a notation, filled-note-quantity N(0+n) is identical to N(10-n) insofar as its multiplicity is concerned, because whether we have the 1 as the 'default' and vary the 0s or vice versa makes no difference for counting the total number of possible scales. The interesting values are then
0
1
2
3
4
5
and the total number of possible scales is [2*(N0+N1+N2+N3+N4) + N5]
0 and 1 are easy to count: N(0)=1, N(1)=10.
The rest are a bit more complicated.
N(2) has
111000000001
110100000001
110010000001
etc
and
101100000001
etc
Obviously we could just use 2^u and be done. But lets go on.
There are 9 possibilities for "first note filled", 8 possibilities for "first note empty, second note filled", etc, down to 1 possibility for "first eight notes filled". The formula for sum of all numbers: ∑(F,L)= ( L² - F² + F + L)/2 becomes useful - in this case, we have N(2)=∑(1,9)=45.
Now consider the n=3 case.
For "first note filled" there are ∑(1,8) possibilities. For "first note empty, second note filled" there are ∑(1,7) and so on to "first seven notes empty" with ∑(1,1). Our solution is thus:
N(3) = ∑_{m=1}^{8}∑(1,m) = 36+28+21+15+10+6+3+1= 120
N(4) continues according to similar logic. For "first note filled" there are m=1 to m=7 ∑∑(1,m) possibilities, and so on. "First note open, second note filled" has m=1 to m=6 ∑∑(1,m). Thus we have
N(4) = ∑_{m=1}^{7}∑_{1}^{m}∑(1,m) = 28+2*21+3*15+4*10+5*6+6*3+7*1 = 210
Now we are getting somewhere. Of course, for our 12-note-maximum, we are almost done.
N(5) = ∑_{p=1}^{p=6}∑_{m=1}^{m=p}∑_{1}^{m}∑(1,m) = [21+2*15+3*10+4*6+5*3+6*1]+[15+2*10+3*6+4*3+5*1]+[10+2*6+3*3+4*1]+[6+2*3+3*1]+[3+2*1]+[1] = 252
[2*(N0+N1+N2+N3+N4) + N5] = 2*(1+10+45+120+210)+252 = 1024
--
OBSERVATIONS
That was where I realized I was an idiot and could have just raised 2^10 and been done. Nevertheless, there are some interesting things in the above.
First, none of the components of the final sum are powers of two, except for the trivial case of N(1)=N(10)=2^0.
Second, it appears to follow a predictable pattern and generate some interesting identities: we know that N(6) = N (4), and continuing on from N(5) we get
N(6)=∑_{q=1}^{q=5}∑_{p=1}^{p=q}∑_{m=1}^{m=p}∑_{1}^{m}∑(1,m) = N(4) = ∑_{m=1}^{7}∑_{1}^{m}∑(1,m) \
I haven't tested this one because it would take forever to write out all the sums and it is getting late.
So on for N(6) and N(3) and so on.
Third, the number of interest in each N(n) is (10+1-n). Perhaps the above can be generalized to other powers of 2^u with the number of interest being (u+1-n) and identical formulas:
N(2)=∑(1,u-1)
N(3) = ∑_{m=1}^{u-2}∑(1,m)
And so on. I have not tested this.
Fourth, we can keep going forever using the method that shows up in N(4), N(5), etc, just by replacing the highest value of the farthest-left sum with another variable, and then taking the sum of that that sum while the new variable goes from 1 to u+1-n.
QUESTIONS
Is there a general expression for 2^u as a series sum (basically expressing my last paragraph with math, assuming it's not in error)? What about other bases? Non-integer numbers?
Have I made mistakes?
On a scale of one to 2^10, how frivolous of a waste of time is this?
expanding 2^n in sum series? - experiment and questions
Moderator: Alyrium Denryle
- Kuroneko
- Jedi Council Member
- Posts: 2469
- Joined: 2003-03-13 03:10am
- Location: Fréchet space
- Contact:
Re: expanding 2^n in sum series? - experiment and questions
I'm not clear on what you're trying to do, but what you're counting is clearly the number of ways of picking n positions out of ten to be filled with 1s. Hence the number is the binomial coefficient C(10,n) = 10!/[n!(10-n)!]. The properties you've discovered are that C(u,n) = C(u,u-n), Sumn=0u[ C(u,n) ] = 2u and Sumk=0n[ k ] = C(n+1,2).
The first is easy: if you think of a set of u objects, the number of subsets of size n is C(u,n). But clearly there are 2u possible subsets, as each element can has two choices: either be or not be in a subset. The second can be proved analogously to your consideration of ∑(F,L).
The first is easy: if you think of a set of u objects, the number of subsets of size n is C(u,n). But clearly there are 2u possible subsets, as each element can has two choices: either be or not be in a subset. The second can be proved analogously to your consideration of ∑(F,L).
"The fool saith in his heart that there is no empty set. But if that were so, then the set of all such sets would be empty, and hence it would be the empty set." -- Wesley Salmon
Re: expanding 2^n in sum series? - experiment and questions
Ghetto edit: there are 13 notes in a chromatic scale, 11 notes between Do and Do, and 2048 possible scales.