A composition of n is an expression of n as a sum of not necessarily distinct positive integers, where the order matters. Note that n = n counts as a composition of n .
Let C n be the number of compositions of n with no part equal to 1.
For instance, C 6 = 5 because 6 = 6 = 4 + 2 = 3 + 3 = 2 + 4 = 2 + 2 + 2 .
Find C 1 5 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Interesting. Your recurrence is not as well-known, but the way that you prove that the C n satisfy that one is quite natural.
There is a slightly more complicated way to show directly (combinatorially) that C n = C n − 1 + C n − 2 . Hint: Divide them into two groups depending on whether the last term is a 2.
Log in to reply
B t w your problem was inspiration for this one.
Log in to reply
What you call an "unordered composition" is usually called a partition . I posted a similar problem recently.
Ah, yes, I see that solution now.
Let n = a 1 + ⋯ + a k be a composition of n with no 1. There are two possibilities.
a k = 2 . In that case, n − 2 = a 1 + ⋯ + a k − 1 is a composition of n − 2 with no 1. Clearly this establishes a one-to-one correspondence between compositions of n ending in 2, and compositions of n − 2 .
a k > 2 . Then n − 1 = a 1 + ⋯ + a k − 1 + ( a k − 1 ) is a composition of n − 2 with no 1. Again, we have a one-to-one correspondence, between compositions of n not ending in 2, and compositions of n − 1 .
Thus we have established a bijection C n ↔ C n − 1 ∪ C n − 2 , proving that C n = C n + 1 + C n + 2 .
Problem Loading...
Note Loading...
Set Loading...
Claim : C n = F n − 1 , i.e. the ( n − 1 ) th Fibonacci number. In other words, C 1 = 0 ; C 2 = 1 ; C n + 2 = C n + C n + 1 for n ≥ 1 .
Proof :
First of all, to generate all compositions of n not containing 1, we start with each of the integer 2 ≤ k ≤ n , and append all possible compositions of n − k not containing 1. That results in C n = k = 2 ∑ n C n − k = i = 0 ∑ n − 2 C i different compositions.
Now we will prove the Fibonacci property by induction. Clearly, C 0 = 1 , C 1 = 0 , and C 2 = 1 , so that the recursion formula is valid for n = 0 . Now let n ≥ 1 and assume the recursion formula is true for i < n . Then C n + C n + 1 = 1 + i = 0 ∑ n − 2 ( C i + C i + 1 ) = 1 + i = 0 ∑ n − 2 C i + 2 = i = 0 ∑ n C i = C n + 2 . Here, the term "1" had to be added because C n + 1 = C 0 + ∑ i = 0 n − 2 C i + 1 , and could be removed later because we absorbed it as C 0 + C 1 in the last sum.
Final calculation:
I like the "direct" formula, C n = F n − 1 = 5 ( 2 1 + 2 1 5 ) n − 1 − ( 2 1 − 2 1 5 ) n − 1 , which in this case gives C 1 5 = 3 7 7 .