[Dixielandjazz] (fewer) Permutations

Edgerton, Paul A paul.edgerton at eds.com
Wed Aug 31 11:11:32 PDT 2005


Andy Ling kind of stole my thunder with his post, but I've already typed
this, so I'm sending it.  Everybody hit your delete keys now...



Let's arbitrarily limit our choices to a range of 20 semitones, allow
skips of no more than one octave and rhythmic values of eighth, quarter
or half notes and rests.  Let's also say that any rest must be followed
by a note.  We needn't care about meter; its just a distraction.

For our first note we have one of 3 possible durations (assuming the
first note won't be a rest) at one of 20 possible pitches, giving 60
possibilities.

For our second note we could have one of three possible rests, or one of
three possible durations at some pitch, but we can't say we have 20
pitches available any more because of the octave leap limitation.  

Let's say that we start with our lowest possible pitch.  The next note
could be the same note or up to one octave higher, giving us 12
possibilities.

What if we started at the second-lowest pitch? Now we have 13
possibilities. 

Here's a table showing the possibilities for each pair of notes:

1st	2nd
Note	Note		# of possibilities
 1   	1 -> 12 	12 
 2   	1 -> 13	13
 3   	1 -> 14	14
 4   	1 -> 15	15
 5	1 -> 16	16
 6	1 -> 17	17
 7	1 -> 18	18
 8	1 -> 19	19
 9	1 -> 20	20
10	1 -> 20	20 (range limits top) 
11	1 -> 20 	20
12	1 -> 20 	20
13	2 -> 20 	19 (leap limits bottom)
14	3 -> 20	18
15	4 -> 20	17
16	5 -> 20	16
17	6 -> 20	15
18	7 -> 20	14
19	8 -> 20	13
20	9 -> 20	12

		     328 possible pitches x 3 durations = 984 notes 

Remember that the second note could be one of three rest values, so for
our first two notes we have a total of 987 possibilities.

The second and third notes have the same possible combinations, except
that only one of them can be a rest so now we've got:

1 note:						=   		   60
2 notes:						=
987 
3 notes:	987 * 984 				=
971,208  
4 notes: 	(987 * 984) * 984 		=     955,668,672
5 notes:	((987 * 984) * 984) * 984 	= 940,377,973,248

As you can see, we've got an exponential progression: each extra note
gives about three orders of magnitude more possibilities!

We've assumed some performance limitations such as overall range and
leap size, and we've limited the size of any rest.  We haven't limited
how many times a note (or a grouping of notes) can be repeated, nor have
we required rests. (Only Kenny G could play this stuff!)

I'll be the first to say that this is clumsy, algorithmic way to answer
the question that doesn't scale well to longer "compositions."  Well,
I'm a programmer -- not a mathematician.

-- Paul Edgerton



More information about the Dixielandjazz mailing list