

Since the length of a musical phrase (in terms of number of notes) or no. of counts isn't unlimited, there is bound to be a theoretical upper bound

First, we need some simplifying assumptions as there are obviously numerous complexities. Since CM is based on the gamakas, and even a slight difference in handling of mathematically un-quantifiable phrases can turn out 2 different phrases with the same swara skeleton, I ignore the gamaka part out entirely. Let us also ignore the flexible stretching and shrinking that occurs in the part of our music not bound by the tala (which would be a gamaka in itself).
This then reduces the number of patterns available to a function of the pattern length (in terms of counts or notes) :
1) For rhythmic patterns, it is fairly simple. Assume one beat (t) and a pause (,), the building blocks of rhythm. Say we have a rhythmic pattern of 5 counts : In blank form, it is - - - - - .
If you want to have a proper 5 note pattern, your first blank has to be a beat (t), otherwise it will create a pattern of lower length. The other blanks can be either a 't' or a ',' (2 possibilities). Therefore total number of patterns is 1 x 2 x 2 x 2 x 2 = 1 x 2^(5-1) = 16 patterns. Extrapolating for a pattern of 'x' number of notes, the number of patterns possible will be at 2^(x-1) for a pattern of x notes.
Obviously we do not use only one syllable for a beat in CM (I don't know the full list of jathi patterns), so if the number of possible syllables is 'n', the total number of possibilities in a 5 beat pattern is n x (n+1)^(4-1). If you have 6 syllables, then the first beat has 6 patterns and the others can have 7 patterns (the "," is the silent 7th syllable). Therefore you will have 6 x 7^4 = 14406 patterns !!
Finally, there is one special possibility that all 5 patterns may be left silent, so the silence itself is an additional pattern which means totally you have 14407 patterns. So then, the general rule is then for a system with "n" syllables and "x" count pattern - f(n,x) = n x (n+1)^(x-1) + 1
Even a tani avartanam from a mathematical perspective, is one <gigantic> rhythmic pattern. A smart enough effort could probably give us the pattern number for a tani avartanam.


<To be continued ... Analysis of Melodic Patterns>