Solving combinatorial problems with symbolic method and generating functionsNumber of compositions in parts less equal two equals number of compositions in parts greater equal two.Showing two generating functions to be equalGenerating functions homework question 3Distributing problem using generating functionsGenerating functions for compositionsGenerating Functions and Linear Diophantine InequalitiesConfusion about Generating Function of Restricted PartitionsGenerating Functions PartitionsGenerating functions and integer partitioningPartition identity with generating functionsPartition Generating Functions

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Can a vampire attack twice with their claws using Multiattack?

NMaximize is not converging to a solution

RSA: Danger of using p to create q

I'm flying to France today and my passport expires in less than 2 months

Can I make popcorn with any corn?

Filter any system log file by date or date range

What are the disadvantages of having a left skewed distribution?

Can you really stack all of this on an Opportunity Attack?

What does the "remote control" for a QF-4 look like?

High voltage LED indicator 40-1000 VDC without additional power supply

Why is Minecraft giving an OpenGL error?

Theorems that impeded progress

Do infinite dimensional systems make sense?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Cross compiling for RPi - error while loading shared libraries

Could an aircraft fly or hover using only jets of compressed air?

How does quantile regression compare to logistic regression with the variable split at the quantile?

Arrow those variables!

What's the point of deactivating Num Lock on login screens?

Which country benefited the most from UN Security Council vetoes?

Horror movie about a virus at the prom; beginning and end are stylized as a cartoon

A case of the sniffles

Is it legal for company to use my work email to pretend I still work there?



Solving combinatorial problems with symbolic method and generating functions


Number of compositions in parts less equal two equals number of compositions in parts greater equal two.Showing two generating functions to be equalGenerating functions homework question 3Distributing problem using generating functionsGenerating functions for compositionsGenerating Functions and Linear Diophantine InequalitiesConfusion about Generating Function of Restricted PartitionsGenerating Functions PartitionsGenerating functions and integer partitioningPartition identity with generating functionsPartition Generating Functions













2












$begingroup$


I am trying to solve the following problems:



a) Let $mathcalF$ be the family of all finite 0-1-sequences that have no 1s directly behind each other. Let the weight of each sequence be its length.
How can $mathcalF$ be constructed with simpler objects? How does the generating function look like?



b) Show with generating functions: The number of partitions of n into different summands equals the number of partitions of n into odd summands.



c) Show with generating functions: The number of compositions of n into summands being 1 or 2 equals the number of compositions of n+2 into summands greater than or equal 2.



My solutions:



a) I have no idea here.



b) Let $mathcalP$ be the partition in different summands. Then $mathcalP = (epsilon+1) times (epsilon+2)times (epsilon+3)times ...$



$Rightarrow P(z) = (1+z)cdot (1+z^2) cdot (1+z^3) cdot dotsc = frac1(1-z)cdot(1-z^3)cdot(1-z^5)cdot dotsc$



Now let $tildemathcalP$ be the partition in odd summands. Then $tildemathcalP = 1^asttimes3^asttimes5^asttimesdotsc$



$Rightarrow tildeP(z) = frac11-zcdotfrac11-z^3cdotfrac11-z^5cdot dotsc$.



Therefore $P(z) = tildeP(z)$ and so $[z^n]P(z) = [z^n]tildeP(z)$, which proofs that the numbers of partitions of n are the same.



c) Let $mathcalK$ be the number of compositions of n into 1s and 2s.
Then $mathcalK = 1,2^ast$ and so $K(z) = frac11-(z+z^2)$.



Let $tildemathcalK$ be the number of compositions of n+2 into 2,3,4,5,6,7,... Then $tildemathcalK = 2,3,4,5,6,...^ast$ and therefore $tildeK(z) = frac11-(z^2+z^3+z^4+z^5+...)$.



I am not sure if I have determined $mathcalK, tildemathcalK, K(z)$ and $tildeK(z)$ correctly and if so, I don't know how to show that $[z^n]K(z) = [z^n+2]tildeK(z)$.



So I'd very much appreciate your help on a) and c). Thanks in advance!










share|cite|improve this question











$endgroup$







  • 1




    $begingroup$
    I am confused about (c). There are two compositions of $2$ into ones and twos: $1+1$ and $2$. There is only one composition of $4$ into threes or more: $4$.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:25











  • $begingroup$
    @MikeEarnest Thanks for your comment, you are right, I made a mistake. It should say "greater than OR EQUAL 2". I will correct it, sorry!
    $endgroup$
    – Studentu
    Mar 21 at 18:28















2












$begingroup$


I am trying to solve the following problems:



a) Let $mathcalF$ be the family of all finite 0-1-sequences that have no 1s directly behind each other. Let the weight of each sequence be its length.
How can $mathcalF$ be constructed with simpler objects? How does the generating function look like?



b) Show with generating functions: The number of partitions of n into different summands equals the number of partitions of n into odd summands.



c) Show with generating functions: The number of compositions of n into summands being 1 or 2 equals the number of compositions of n+2 into summands greater than or equal 2.



My solutions:



a) I have no idea here.



b) Let $mathcalP$ be the partition in different summands. Then $mathcalP = (epsilon+1) times (epsilon+2)times (epsilon+3)times ...$



$Rightarrow P(z) = (1+z)cdot (1+z^2) cdot (1+z^3) cdot dotsc = frac1(1-z)cdot(1-z^3)cdot(1-z^5)cdot dotsc$



Now let $tildemathcalP$ be the partition in odd summands. Then $tildemathcalP = 1^asttimes3^asttimes5^asttimesdotsc$



$Rightarrow tildeP(z) = frac11-zcdotfrac11-z^3cdotfrac11-z^5cdot dotsc$.



Therefore $P(z) = tildeP(z)$ and so $[z^n]P(z) = [z^n]tildeP(z)$, which proofs that the numbers of partitions of n are the same.



c) Let $mathcalK$ be the number of compositions of n into 1s and 2s.
Then $mathcalK = 1,2^ast$ and so $K(z) = frac11-(z+z^2)$.



Let $tildemathcalK$ be the number of compositions of n+2 into 2,3,4,5,6,7,... Then $tildemathcalK = 2,3,4,5,6,...^ast$ and therefore $tildeK(z) = frac11-(z^2+z^3+z^4+z^5+...)$.



I am not sure if I have determined $mathcalK, tildemathcalK, K(z)$ and $tildeK(z)$ correctly and if so, I don't know how to show that $[z^n]K(z) = [z^n+2]tildeK(z)$.



So I'd very much appreciate your help on a) and c). Thanks in advance!










share|cite|improve this question











$endgroup$







  • 1




    $begingroup$
    I am confused about (c). There are two compositions of $2$ into ones and twos: $1+1$ and $2$. There is only one composition of $4$ into threes or more: $4$.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:25











  • $begingroup$
    @MikeEarnest Thanks for your comment, you are right, I made a mistake. It should say "greater than OR EQUAL 2". I will correct it, sorry!
    $endgroup$
    – Studentu
    Mar 21 at 18:28













2












2








2


0



$begingroup$


I am trying to solve the following problems:



a) Let $mathcalF$ be the family of all finite 0-1-sequences that have no 1s directly behind each other. Let the weight of each sequence be its length.
How can $mathcalF$ be constructed with simpler objects? How does the generating function look like?



b) Show with generating functions: The number of partitions of n into different summands equals the number of partitions of n into odd summands.



c) Show with generating functions: The number of compositions of n into summands being 1 or 2 equals the number of compositions of n+2 into summands greater than or equal 2.



My solutions:



a) I have no idea here.



b) Let $mathcalP$ be the partition in different summands. Then $mathcalP = (epsilon+1) times (epsilon+2)times (epsilon+3)times ...$



$Rightarrow P(z) = (1+z)cdot (1+z^2) cdot (1+z^3) cdot dotsc = frac1(1-z)cdot(1-z^3)cdot(1-z^5)cdot dotsc$



Now let $tildemathcalP$ be the partition in odd summands. Then $tildemathcalP = 1^asttimes3^asttimes5^asttimesdotsc$



$Rightarrow tildeP(z) = frac11-zcdotfrac11-z^3cdotfrac11-z^5cdot dotsc$.



Therefore $P(z) = tildeP(z)$ and so $[z^n]P(z) = [z^n]tildeP(z)$, which proofs that the numbers of partitions of n are the same.



c) Let $mathcalK$ be the number of compositions of n into 1s and 2s.
Then $mathcalK = 1,2^ast$ and so $K(z) = frac11-(z+z^2)$.



Let $tildemathcalK$ be the number of compositions of n+2 into 2,3,4,5,6,7,... Then $tildemathcalK = 2,3,4,5,6,...^ast$ and therefore $tildeK(z) = frac11-(z^2+z^3+z^4+z^5+...)$.



I am not sure if I have determined $mathcalK, tildemathcalK, K(z)$ and $tildeK(z)$ correctly and if so, I don't know how to show that $[z^n]K(z) = [z^n+2]tildeK(z)$.



So I'd very much appreciate your help on a) and c). Thanks in advance!










share|cite|improve this question











$endgroup$




I am trying to solve the following problems:



a) Let $mathcalF$ be the family of all finite 0-1-sequences that have no 1s directly behind each other. Let the weight of each sequence be its length.
How can $mathcalF$ be constructed with simpler objects? How does the generating function look like?



b) Show with generating functions: The number of partitions of n into different summands equals the number of partitions of n into odd summands.



c) Show with generating functions: The number of compositions of n into summands being 1 or 2 equals the number of compositions of n+2 into summands greater than or equal 2.



My solutions:



a) I have no idea here.



b) Let $mathcalP$ be the partition in different summands. Then $mathcalP = (epsilon+1) times (epsilon+2)times (epsilon+3)times ...$



$Rightarrow P(z) = (1+z)cdot (1+z^2) cdot (1+z^3) cdot dotsc = frac1(1-z)cdot(1-z^3)cdot(1-z^5)cdot dotsc$



Now let $tildemathcalP$ be the partition in odd summands. Then $tildemathcalP = 1^asttimes3^asttimes5^asttimesdotsc$



$Rightarrow tildeP(z) = frac11-zcdotfrac11-z^3cdotfrac11-z^5cdot dotsc$.



Therefore $P(z) = tildeP(z)$ and so $[z^n]P(z) = [z^n]tildeP(z)$, which proofs that the numbers of partitions of n are the same.



c) Let $mathcalK$ be the number of compositions of n into 1s and 2s.
Then $mathcalK = 1,2^ast$ and so $K(z) = frac11-(z+z^2)$.



Let $tildemathcalK$ be the number of compositions of n+2 into 2,3,4,5,6,7,... Then $tildemathcalK = 2,3,4,5,6,...^ast$ and therefore $tildeK(z) = frac11-(z^2+z^3+z^4+z^5+...)$.



I am not sure if I have determined $mathcalK, tildemathcalK, K(z)$ and $tildeK(z)$ correctly and if so, I don't know how to show that $[z^n]K(z) = [z^n+2]tildeK(z)$.



So I'd very much appreciate your help on a) and c). Thanks in advance!







combinatorics generating-functions integer-partitions combinatorial-proofs analytic-combinatorics






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 21 at 18:29







Studentu

















asked Mar 21 at 18:06









StudentuStudentu

1399




1399







  • 1




    $begingroup$
    I am confused about (c). There are two compositions of $2$ into ones and twos: $1+1$ and $2$. There is only one composition of $4$ into threes or more: $4$.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:25











  • $begingroup$
    @MikeEarnest Thanks for your comment, you are right, I made a mistake. It should say "greater than OR EQUAL 2". I will correct it, sorry!
    $endgroup$
    – Studentu
    Mar 21 at 18:28












  • 1




    $begingroup$
    I am confused about (c). There are two compositions of $2$ into ones and twos: $1+1$ and $2$. There is only one composition of $4$ into threes or more: $4$.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:25











  • $begingroup$
    @MikeEarnest Thanks for your comment, you are right, I made a mistake. It should say "greater than OR EQUAL 2". I will correct it, sorry!
    $endgroup$
    – Studentu
    Mar 21 at 18:28







1




1




$begingroup$
I am confused about (c). There are two compositions of $2$ into ones and twos: $1+1$ and $2$. There is only one composition of $4$ into threes or more: $4$.
$endgroup$
– Mike Earnest
Mar 21 at 18:25





$begingroup$
I am confused about (c). There are two compositions of $2$ into ones and twos: $1+1$ and $2$. There is only one composition of $4$ into threes or more: $4$.
$endgroup$
– Mike Earnest
Mar 21 at 18:25













$begingroup$
@MikeEarnest Thanks for your comment, you are right, I made a mistake. It should say "greater than OR EQUAL 2". I will correct it, sorry!
$endgroup$
– Studentu
Mar 21 at 18:28




$begingroup$
@MikeEarnest Thanks for your comment, you are right, I made a mistake. It should say "greater than OR EQUAL 2". I will correct it, sorry!
$endgroup$
– Studentu
Mar 21 at 18:28










2 Answers
2






active

oldest

votes


















1












$begingroup$

Saying that there are no adjacent ones is almost equivalent to saying that every $1$ is followed by a $0$. In that case, the string is freely built out of copies of $0$ and $10$, so this is $0,10^*$. However, there is also optionally a $1$ at the end which is not followed by a zero, so it is more like $0,10^*times varepsilon,1$.




Let $k_n$ be the number of compositions of $n$ into $2,3,4,dots$. What you found is
$$
frac11-(z^2+z^3+dots)=sum_n=0^infty k_n x^n=tilde K(z)
$$

It is probability easier to find
$$
sum_n=0^infty k_n+2 x^n=K_2(z)
$$

Then, all you have to do is prove that $K_2(z)=K(z)$, which is simple algebra.



You are almost done! Can you see how to easily get $K_2$ from $tilde K$?



Note
$$
K_2(z)=sum_n=0^infty k_n+2x^n=sum_n=2^infty k_nx^n-2=frac1x^2sum_n=2^infty k_nx^n
$$

The last summation almost looks like $tilde K(z)$. The only problem is that the summation starts from $n=2$, not $n=0$. Therefore, the summation $sum_n=2^infty k_nx^n$ is attained from $tilde K(z)$ by subtracting the first two terms.






share|cite|improve this answer











$endgroup$












  • $begingroup$
    Thanks for your reply! I am going to try to solve it with the information you gave and let you know if it worked. :)
    $endgroup$
    – Studentu
    Mar 21 at 18:46







  • 1




    $begingroup$
    @Studentu Sure! Just to clarify, $K'(z)$ does not refer to the derivative of $K(z)$, it is just a new function.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:54






  • 1




    $begingroup$
    @Studentu See edit for more details. I changed $K'$ to $K_2$ to avoid confusion.
    $endgroup$
    – Mike Earnest
    Mar 21 at 19:10






  • 1




    $begingroup$
    @Studentu Looks good!
    $endgroup$
    – Mike Earnest
    Mar 22 at 0:06






  • 1




    $begingroup$
    @Studentu Very subtle error! You need to instead to instead subtract $colorred1cdot 1+0cdot z$ from $tilde K$. Because of the empty composition, $k_0=1$. This now works.
    $endgroup$
    – Mike Earnest
    Mar 22 at 1:28


















1












$begingroup$


Ad c.)



Your approach is fine. With $mathcalK = 1,2^ast$ we obtain
beginalign*
K(z) &= frac11-left(z+z^2right)\
&=frac11-z-z^2tag1
endalign*



and with $tildemathcalK = 2,3,4,5,6,...^ast$ we obtain
beginalign*
tildeK(z) &= frac11-(z^2+z^3+z^4+z^5+cdots)\
&=frac11-fracz^21-ztag2\
&=frac1-z1-z-z^2\
&=1+fracz^21-z-z^2tag3
endalign*




Comment:



  • In (2) we use the geometric series expansion.


We obtain from (1) and (3) for $ngeq 1$



beginalign*
colorblue[z^n+2]tildeK(z) &=[z^n+2]left(1+fracz^21-z-z^2right)\
&=[z^n+2]fracz^21-z-z^2tag4\
&=[z^n]frac11-z-z^2tag5\
&,,colorblue=[z^n]K(z)
endalign*



and the claim follows.




Comment:



  • In (4) we skip the term $1$ which does not contribute to the coefficient of $z^n+2$ since $ngeq 1$.


  • In (5) we apply the rule $[z^p-q]A(z)=[z^p]z^qA(z)$.



Note the coefficients of
beginalign*
K(z)&=frac11-z-z^2\
&=colorblue1+colorblue1z+colorblue2z^2+colorblue3z^3+colorblue5z^4+colorblue8z^5+cdots
endalign*

are the Fibonacci numbers.




ad a.)



We start with binary sequences with no consecutive equal characters at all. See example III.24 Smirnov words from Analytic Combinatorics by P. Flajolet and R. Sedgewick for more information.



A generating function for the number of Smirnov words over a binary alphabet is given by
beginalign*
left.left(1-fracu1+u-fracw1+wright)^-1right|_u=w=ztag6
endalign*



where $u$ represents occurrences of $0$ and $w$ occurrences of $1$.
Since there are no restrictions stated for zeros we replace occurrences of $0$ in a Smirnov word by one or more zeros.
beginalign*
ulongrightarrow u+u^2+u^3+cdots=fracu1-utag7
endalign*




We substitute (7) in (6) evaluate at $z$ and obtain



beginalign*
left(1-fracfracz1-z1+fracz1-z-fracz1+zright)^-1
&=left(1-z-fracz1+zright)^-1\
&=frac1+z1-z-z^2\
&=1+2z+3z^2+5z^3+8z^4+cdots
endalign*



which is again a generating function of (shifted) Fibonacci numbers.







share|cite|improve this answer











$endgroup$












  • $begingroup$
    Thanks for your answer, especially for the one regarding a), and for the link to the reference to the book! :)
    $endgroup$
    – Studentu
    Mar 22 at 20:53






  • 1




    $begingroup$
    @Studentu: You're welcome. :-)
    $endgroup$
    – Markus Scheuer
    Mar 22 at 20:55











Your Answer





StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3157169%2fsolving-combinatorial-problems-with-symbolic-method-and-generating-functions%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

Saying that there are no adjacent ones is almost equivalent to saying that every $1$ is followed by a $0$. In that case, the string is freely built out of copies of $0$ and $10$, so this is $0,10^*$. However, there is also optionally a $1$ at the end which is not followed by a zero, so it is more like $0,10^*times varepsilon,1$.




Let $k_n$ be the number of compositions of $n$ into $2,3,4,dots$. What you found is
$$
frac11-(z^2+z^3+dots)=sum_n=0^infty k_n x^n=tilde K(z)
$$

It is probability easier to find
$$
sum_n=0^infty k_n+2 x^n=K_2(z)
$$

Then, all you have to do is prove that $K_2(z)=K(z)$, which is simple algebra.



You are almost done! Can you see how to easily get $K_2$ from $tilde K$?



Note
$$
K_2(z)=sum_n=0^infty k_n+2x^n=sum_n=2^infty k_nx^n-2=frac1x^2sum_n=2^infty k_nx^n
$$

The last summation almost looks like $tilde K(z)$. The only problem is that the summation starts from $n=2$, not $n=0$. Therefore, the summation $sum_n=2^infty k_nx^n$ is attained from $tilde K(z)$ by subtracting the first two terms.






share|cite|improve this answer











$endgroup$












  • $begingroup$
    Thanks for your reply! I am going to try to solve it with the information you gave and let you know if it worked. :)
    $endgroup$
    – Studentu
    Mar 21 at 18:46







  • 1




    $begingroup$
    @Studentu Sure! Just to clarify, $K'(z)$ does not refer to the derivative of $K(z)$, it is just a new function.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:54






  • 1




    $begingroup$
    @Studentu See edit for more details. I changed $K'$ to $K_2$ to avoid confusion.
    $endgroup$
    – Mike Earnest
    Mar 21 at 19:10






  • 1




    $begingroup$
    @Studentu Looks good!
    $endgroup$
    – Mike Earnest
    Mar 22 at 0:06






  • 1




    $begingroup$
    @Studentu Very subtle error! You need to instead to instead subtract $colorred1cdot 1+0cdot z$ from $tilde K$. Because of the empty composition, $k_0=1$. This now works.
    $endgroup$
    – Mike Earnest
    Mar 22 at 1:28















1












$begingroup$

Saying that there are no adjacent ones is almost equivalent to saying that every $1$ is followed by a $0$. In that case, the string is freely built out of copies of $0$ and $10$, so this is $0,10^*$. However, there is also optionally a $1$ at the end which is not followed by a zero, so it is more like $0,10^*times varepsilon,1$.




Let $k_n$ be the number of compositions of $n$ into $2,3,4,dots$. What you found is
$$
frac11-(z^2+z^3+dots)=sum_n=0^infty k_n x^n=tilde K(z)
$$

It is probability easier to find
$$
sum_n=0^infty k_n+2 x^n=K_2(z)
$$

Then, all you have to do is prove that $K_2(z)=K(z)$, which is simple algebra.



You are almost done! Can you see how to easily get $K_2$ from $tilde K$?



Note
$$
K_2(z)=sum_n=0^infty k_n+2x^n=sum_n=2^infty k_nx^n-2=frac1x^2sum_n=2^infty k_nx^n
$$

The last summation almost looks like $tilde K(z)$. The only problem is that the summation starts from $n=2$, not $n=0$. Therefore, the summation $sum_n=2^infty k_nx^n$ is attained from $tilde K(z)$ by subtracting the first two terms.






share|cite|improve this answer











$endgroup$












  • $begingroup$
    Thanks for your reply! I am going to try to solve it with the information you gave and let you know if it worked. :)
    $endgroup$
    – Studentu
    Mar 21 at 18:46







  • 1




    $begingroup$
    @Studentu Sure! Just to clarify, $K'(z)$ does not refer to the derivative of $K(z)$, it is just a new function.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:54






  • 1




    $begingroup$
    @Studentu See edit for more details. I changed $K'$ to $K_2$ to avoid confusion.
    $endgroup$
    – Mike Earnest
    Mar 21 at 19:10






  • 1




    $begingroup$
    @Studentu Looks good!
    $endgroup$
    – Mike Earnest
    Mar 22 at 0:06






  • 1




    $begingroup$
    @Studentu Very subtle error! You need to instead to instead subtract $colorred1cdot 1+0cdot z$ from $tilde K$. Because of the empty composition, $k_0=1$. This now works.
    $endgroup$
    – Mike Earnest
    Mar 22 at 1:28













1












1








1





$begingroup$

Saying that there are no adjacent ones is almost equivalent to saying that every $1$ is followed by a $0$. In that case, the string is freely built out of copies of $0$ and $10$, so this is $0,10^*$. However, there is also optionally a $1$ at the end which is not followed by a zero, so it is more like $0,10^*times varepsilon,1$.




Let $k_n$ be the number of compositions of $n$ into $2,3,4,dots$. What you found is
$$
frac11-(z^2+z^3+dots)=sum_n=0^infty k_n x^n=tilde K(z)
$$

It is probability easier to find
$$
sum_n=0^infty k_n+2 x^n=K_2(z)
$$

Then, all you have to do is prove that $K_2(z)=K(z)$, which is simple algebra.



You are almost done! Can you see how to easily get $K_2$ from $tilde K$?



Note
$$
K_2(z)=sum_n=0^infty k_n+2x^n=sum_n=2^infty k_nx^n-2=frac1x^2sum_n=2^infty k_nx^n
$$

The last summation almost looks like $tilde K(z)$. The only problem is that the summation starts from $n=2$, not $n=0$. Therefore, the summation $sum_n=2^infty k_nx^n$ is attained from $tilde K(z)$ by subtracting the first two terms.






share|cite|improve this answer











$endgroup$



Saying that there are no adjacent ones is almost equivalent to saying that every $1$ is followed by a $0$. In that case, the string is freely built out of copies of $0$ and $10$, so this is $0,10^*$. However, there is also optionally a $1$ at the end which is not followed by a zero, so it is more like $0,10^*times varepsilon,1$.




Let $k_n$ be the number of compositions of $n$ into $2,3,4,dots$. What you found is
$$
frac11-(z^2+z^3+dots)=sum_n=0^infty k_n x^n=tilde K(z)
$$

It is probability easier to find
$$
sum_n=0^infty k_n+2 x^n=K_2(z)
$$

Then, all you have to do is prove that $K_2(z)=K(z)$, which is simple algebra.



You are almost done! Can you see how to easily get $K_2$ from $tilde K$?



Note
$$
K_2(z)=sum_n=0^infty k_n+2x^n=sum_n=2^infty k_nx^n-2=frac1x^2sum_n=2^infty k_nx^n
$$

The last summation almost looks like $tilde K(z)$. The only problem is that the summation starts from $n=2$, not $n=0$. Therefore, the summation $sum_n=2^infty k_nx^n$ is attained from $tilde K(z)$ by subtracting the first two terms.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Mar 21 at 19:05

























answered Mar 21 at 18:40









Mike EarnestMike Earnest

26.9k22152




26.9k22152











  • $begingroup$
    Thanks for your reply! I am going to try to solve it with the information you gave and let you know if it worked. :)
    $endgroup$
    – Studentu
    Mar 21 at 18:46







  • 1




    $begingroup$
    @Studentu Sure! Just to clarify, $K'(z)$ does not refer to the derivative of $K(z)$, it is just a new function.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:54






  • 1




    $begingroup$
    @Studentu See edit for more details. I changed $K'$ to $K_2$ to avoid confusion.
    $endgroup$
    – Mike Earnest
    Mar 21 at 19:10






  • 1




    $begingroup$
    @Studentu Looks good!
    $endgroup$
    – Mike Earnest
    Mar 22 at 0:06






  • 1




    $begingroup$
    @Studentu Very subtle error! You need to instead to instead subtract $colorred1cdot 1+0cdot z$ from $tilde K$. Because of the empty composition, $k_0=1$. This now works.
    $endgroup$
    – Mike Earnest
    Mar 22 at 1:28
















  • $begingroup$
    Thanks for your reply! I am going to try to solve it with the information you gave and let you know if it worked. :)
    $endgroup$
    – Studentu
    Mar 21 at 18:46







  • 1




    $begingroup$
    @Studentu Sure! Just to clarify, $K'(z)$ does not refer to the derivative of $K(z)$, it is just a new function.
    $endgroup$
    – Mike Earnest
    Mar 21 at 18:54






  • 1




    $begingroup$
    @Studentu See edit for more details. I changed $K'$ to $K_2$ to avoid confusion.
    $endgroup$
    – Mike Earnest
    Mar 21 at 19:10






  • 1




    $begingroup$
    @Studentu Looks good!
    $endgroup$
    – Mike Earnest
    Mar 22 at 0:06






  • 1




    $begingroup$
    @Studentu Very subtle error! You need to instead to instead subtract $colorred1cdot 1+0cdot z$ from $tilde K$. Because of the empty composition, $k_0=1$. This now works.
    $endgroup$
    – Mike Earnest
    Mar 22 at 1:28















$begingroup$
Thanks for your reply! I am going to try to solve it with the information you gave and let you know if it worked. :)
$endgroup$
– Studentu
Mar 21 at 18:46





$begingroup$
Thanks for your reply! I am going to try to solve it with the information you gave and let you know if it worked. :)
$endgroup$
– Studentu
Mar 21 at 18:46





1




1




$begingroup$
@Studentu Sure! Just to clarify, $K'(z)$ does not refer to the derivative of $K(z)$, it is just a new function.
$endgroup$
– Mike Earnest
Mar 21 at 18:54




$begingroup$
@Studentu Sure! Just to clarify, $K'(z)$ does not refer to the derivative of $K(z)$, it is just a new function.
$endgroup$
– Mike Earnest
Mar 21 at 18:54




1




1




$begingroup$
@Studentu See edit for more details. I changed $K'$ to $K_2$ to avoid confusion.
$endgroup$
– Mike Earnest
Mar 21 at 19:10




$begingroup$
@Studentu See edit for more details. I changed $K'$ to $K_2$ to avoid confusion.
$endgroup$
– Mike Earnest
Mar 21 at 19:10




1




1




$begingroup$
@Studentu Looks good!
$endgroup$
– Mike Earnest
Mar 22 at 0:06




$begingroup$
@Studentu Looks good!
$endgroup$
– Mike Earnest
Mar 22 at 0:06




1




1




$begingroup$
@Studentu Very subtle error! You need to instead to instead subtract $colorred1cdot 1+0cdot z$ from $tilde K$. Because of the empty composition, $k_0=1$. This now works.
$endgroup$
– Mike Earnest
Mar 22 at 1:28




$begingroup$
@Studentu Very subtle error! You need to instead to instead subtract $colorred1cdot 1+0cdot z$ from $tilde K$. Because of the empty composition, $k_0=1$. This now works.
$endgroup$
– Mike Earnest
Mar 22 at 1:28











1












$begingroup$


Ad c.)



Your approach is fine. With $mathcalK = 1,2^ast$ we obtain
beginalign*
K(z) &= frac11-left(z+z^2right)\
&=frac11-z-z^2tag1
endalign*



and with $tildemathcalK = 2,3,4,5,6,...^ast$ we obtain
beginalign*
tildeK(z) &= frac11-(z^2+z^3+z^4+z^5+cdots)\
&=frac11-fracz^21-ztag2\
&=frac1-z1-z-z^2\
&=1+fracz^21-z-z^2tag3
endalign*




Comment:



  • In (2) we use the geometric series expansion.


We obtain from (1) and (3) for $ngeq 1$



beginalign*
colorblue[z^n+2]tildeK(z) &=[z^n+2]left(1+fracz^21-z-z^2right)\
&=[z^n+2]fracz^21-z-z^2tag4\
&=[z^n]frac11-z-z^2tag5\
&,,colorblue=[z^n]K(z)
endalign*



and the claim follows.




Comment:



  • In (4) we skip the term $1$ which does not contribute to the coefficient of $z^n+2$ since $ngeq 1$.


  • In (5) we apply the rule $[z^p-q]A(z)=[z^p]z^qA(z)$.



Note the coefficients of
beginalign*
K(z)&=frac11-z-z^2\
&=colorblue1+colorblue1z+colorblue2z^2+colorblue3z^3+colorblue5z^4+colorblue8z^5+cdots
endalign*

are the Fibonacci numbers.




ad a.)



We start with binary sequences with no consecutive equal characters at all. See example III.24 Smirnov words from Analytic Combinatorics by P. Flajolet and R. Sedgewick for more information.



A generating function for the number of Smirnov words over a binary alphabet is given by
beginalign*
left.left(1-fracu1+u-fracw1+wright)^-1right|_u=w=ztag6
endalign*



where $u$ represents occurrences of $0$ and $w$ occurrences of $1$.
Since there are no restrictions stated for zeros we replace occurrences of $0$ in a Smirnov word by one or more zeros.
beginalign*
ulongrightarrow u+u^2+u^3+cdots=fracu1-utag7
endalign*




We substitute (7) in (6) evaluate at $z$ and obtain



beginalign*
left(1-fracfracz1-z1+fracz1-z-fracz1+zright)^-1
&=left(1-z-fracz1+zright)^-1\
&=frac1+z1-z-z^2\
&=1+2z+3z^2+5z^3+8z^4+cdots
endalign*



which is again a generating function of (shifted) Fibonacci numbers.







share|cite|improve this answer











$endgroup$












  • $begingroup$
    Thanks for your answer, especially for the one regarding a), and for the link to the reference to the book! :)
    $endgroup$
    – Studentu
    Mar 22 at 20:53






  • 1




    $begingroup$
    @Studentu: You're welcome. :-)
    $endgroup$
    – Markus Scheuer
    Mar 22 at 20:55















1












$begingroup$


Ad c.)



Your approach is fine. With $mathcalK = 1,2^ast$ we obtain
beginalign*
K(z) &= frac11-left(z+z^2right)\
&=frac11-z-z^2tag1
endalign*



and with $tildemathcalK = 2,3,4,5,6,...^ast$ we obtain
beginalign*
tildeK(z) &= frac11-(z^2+z^3+z^4+z^5+cdots)\
&=frac11-fracz^21-ztag2\
&=frac1-z1-z-z^2\
&=1+fracz^21-z-z^2tag3
endalign*




Comment:



  • In (2) we use the geometric series expansion.


We obtain from (1) and (3) for $ngeq 1$



beginalign*
colorblue[z^n+2]tildeK(z) &=[z^n+2]left(1+fracz^21-z-z^2right)\
&=[z^n+2]fracz^21-z-z^2tag4\
&=[z^n]frac11-z-z^2tag5\
&,,colorblue=[z^n]K(z)
endalign*



and the claim follows.




Comment:



  • In (4) we skip the term $1$ which does not contribute to the coefficient of $z^n+2$ since $ngeq 1$.


  • In (5) we apply the rule $[z^p-q]A(z)=[z^p]z^qA(z)$.



Note the coefficients of
beginalign*
K(z)&=frac11-z-z^2\
&=colorblue1+colorblue1z+colorblue2z^2+colorblue3z^3+colorblue5z^4+colorblue8z^5+cdots
endalign*

are the Fibonacci numbers.




ad a.)



We start with binary sequences with no consecutive equal characters at all. See example III.24 Smirnov words from Analytic Combinatorics by P. Flajolet and R. Sedgewick for more information.



A generating function for the number of Smirnov words over a binary alphabet is given by
beginalign*
left.left(1-fracu1+u-fracw1+wright)^-1right|_u=w=ztag6
endalign*



where $u$ represents occurrences of $0$ and $w$ occurrences of $1$.
Since there are no restrictions stated for zeros we replace occurrences of $0$ in a Smirnov word by one or more zeros.
beginalign*
ulongrightarrow u+u^2+u^3+cdots=fracu1-utag7
endalign*




We substitute (7) in (6) evaluate at $z$ and obtain



beginalign*
left(1-fracfracz1-z1+fracz1-z-fracz1+zright)^-1
&=left(1-z-fracz1+zright)^-1\
&=frac1+z1-z-z^2\
&=1+2z+3z^2+5z^3+8z^4+cdots
endalign*



which is again a generating function of (shifted) Fibonacci numbers.







share|cite|improve this answer











$endgroup$












  • $begingroup$
    Thanks for your answer, especially for the one regarding a), and for the link to the reference to the book! :)
    $endgroup$
    – Studentu
    Mar 22 at 20:53






  • 1




    $begingroup$
    @Studentu: You're welcome. :-)
    $endgroup$
    – Markus Scheuer
    Mar 22 at 20:55













1












1








1





$begingroup$


Ad c.)



Your approach is fine. With $mathcalK = 1,2^ast$ we obtain
beginalign*
K(z) &= frac11-left(z+z^2right)\
&=frac11-z-z^2tag1
endalign*



and with $tildemathcalK = 2,3,4,5,6,...^ast$ we obtain
beginalign*
tildeK(z) &= frac11-(z^2+z^3+z^4+z^5+cdots)\
&=frac11-fracz^21-ztag2\
&=frac1-z1-z-z^2\
&=1+fracz^21-z-z^2tag3
endalign*




Comment:



  • In (2) we use the geometric series expansion.


We obtain from (1) and (3) for $ngeq 1$



beginalign*
colorblue[z^n+2]tildeK(z) &=[z^n+2]left(1+fracz^21-z-z^2right)\
&=[z^n+2]fracz^21-z-z^2tag4\
&=[z^n]frac11-z-z^2tag5\
&,,colorblue=[z^n]K(z)
endalign*



and the claim follows.




Comment:



  • In (4) we skip the term $1$ which does not contribute to the coefficient of $z^n+2$ since $ngeq 1$.


  • In (5) we apply the rule $[z^p-q]A(z)=[z^p]z^qA(z)$.



Note the coefficients of
beginalign*
K(z)&=frac11-z-z^2\
&=colorblue1+colorblue1z+colorblue2z^2+colorblue3z^3+colorblue5z^4+colorblue8z^5+cdots
endalign*

are the Fibonacci numbers.




ad a.)



We start with binary sequences with no consecutive equal characters at all. See example III.24 Smirnov words from Analytic Combinatorics by P. Flajolet and R. Sedgewick for more information.



A generating function for the number of Smirnov words over a binary alphabet is given by
beginalign*
left.left(1-fracu1+u-fracw1+wright)^-1right|_u=w=ztag6
endalign*



where $u$ represents occurrences of $0$ and $w$ occurrences of $1$.
Since there are no restrictions stated for zeros we replace occurrences of $0$ in a Smirnov word by one or more zeros.
beginalign*
ulongrightarrow u+u^2+u^3+cdots=fracu1-utag7
endalign*




We substitute (7) in (6) evaluate at $z$ and obtain



beginalign*
left(1-fracfracz1-z1+fracz1-z-fracz1+zright)^-1
&=left(1-z-fracz1+zright)^-1\
&=frac1+z1-z-z^2\
&=1+2z+3z^2+5z^3+8z^4+cdots
endalign*



which is again a generating function of (shifted) Fibonacci numbers.







share|cite|improve this answer











$endgroup$




Ad c.)



Your approach is fine. With $mathcalK = 1,2^ast$ we obtain
beginalign*
K(z) &= frac11-left(z+z^2right)\
&=frac11-z-z^2tag1
endalign*



and with $tildemathcalK = 2,3,4,5,6,...^ast$ we obtain
beginalign*
tildeK(z) &= frac11-(z^2+z^3+z^4+z^5+cdots)\
&=frac11-fracz^21-ztag2\
&=frac1-z1-z-z^2\
&=1+fracz^21-z-z^2tag3
endalign*




Comment:



  • In (2) we use the geometric series expansion.


We obtain from (1) and (3) for $ngeq 1$



beginalign*
colorblue[z^n+2]tildeK(z) &=[z^n+2]left(1+fracz^21-z-z^2right)\
&=[z^n+2]fracz^21-z-z^2tag4\
&=[z^n]frac11-z-z^2tag5\
&,,colorblue=[z^n]K(z)
endalign*



and the claim follows.




Comment:



  • In (4) we skip the term $1$ which does not contribute to the coefficient of $z^n+2$ since $ngeq 1$.


  • In (5) we apply the rule $[z^p-q]A(z)=[z^p]z^qA(z)$.



Note the coefficients of
beginalign*
K(z)&=frac11-z-z^2\
&=colorblue1+colorblue1z+colorblue2z^2+colorblue3z^3+colorblue5z^4+colorblue8z^5+cdots
endalign*

are the Fibonacci numbers.




ad a.)



We start with binary sequences with no consecutive equal characters at all. See example III.24 Smirnov words from Analytic Combinatorics by P. Flajolet and R. Sedgewick for more information.



A generating function for the number of Smirnov words over a binary alphabet is given by
beginalign*
left.left(1-fracu1+u-fracw1+wright)^-1right|_u=w=ztag6
endalign*



where $u$ represents occurrences of $0$ and $w$ occurrences of $1$.
Since there are no restrictions stated for zeros we replace occurrences of $0$ in a Smirnov word by one or more zeros.
beginalign*
ulongrightarrow u+u^2+u^3+cdots=fracu1-utag7
endalign*




We substitute (7) in (6) evaluate at $z$ and obtain



beginalign*
left(1-fracfracz1-z1+fracz1-z-fracz1+zright)^-1
&=left(1-z-fracz1+zright)^-1\
&=frac1+z1-z-z^2\
&=1+2z+3z^2+5z^3+8z^4+cdots
endalign*



which is again a generating function of (shifted) Fibonacci numbers.








share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Mar 22 at 18:06

























answered Mar 22 at 17:27









Markus ScheuerMarkus Scheuer

63.8k460152




63.8k460152











  • $begingroup$
    Thanks for your answer, especially for the one regarding a), and for the link to the reference to the book! :)
    $endgroup$
    – Studentu
    Mar 22 at 20:53






  • 1




    $begingroup$
    @Studentu: You're welcome. :-)
    $endgroup$
    – Markus Scheuer
    Mar 22 at 20:55
















  • $begingroup$
    Thanks for your answer, especially for the one regarding a), and for the link to the reference to the book! :)
    $endgroup$
    – Studentu
    Mar 22 at 20:53






  • 1




    $begingroup$
    @Studentu: You're welcome. :-)
    $endgroup$
    – Markus Scheuer
    Mar 22 at 20:55















$begingroup$
Thanks for your answer, especially for the one regarding a), and for the link to the reference to the book! :)
$endgroup$
– Studentu
Mar 22 at 20:53




$begingroup$
Thanks for your answer, especially for the one regarding a), and for the link to the reference to the book! :)
$endgroup$
– Studentu
Mar 22 at 20:53




1




1




$begingroup$
@Studentu: You're welcome. :-)
$endgroup$
– Markus Scheuer
Mar 22 at 20:55




$begingroup$
@Studentu: You're welcome. :-)
$endgroup$
– Markus Scheuer
Mar 22 at 20:55

















draft saved

draft discarded
















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3157169%2fsolving-combinatorial-problems-with-symbolic-method-and-generating-functions%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Moe incest case Sentencing See also References Navigation menu"'Australian Josef Fritzl' fathered four children by daughter""Small town recoils in horror at 'Australian Fritzl' incest case""Victorian rape allegations echo Fritzl case - Just In (Australian Broadcasting Corporation)""Incest father jailed for 22 years""'Australian Fritzl' sentenced to 22 years in prison for abusing daughter for three decades""RSJ v The Queen"

Who is our nearest planetary neighbor, on average?Santa Claus flies to the South PoleSeven Spheres of Unequal Mass, a weighing problem with a twistDescribe a large integerFast Mental Calculation of $7.5^7$Math in Space (without the help of celebrities)Find the value of $bigstar$: Puzzle 8 - InequalityWho drinks beer while running anyway?A Crucial DeliveryRanking And AverageHow long will my money last at roulette?

Daza language Contents Vocabulary Phonology References External links Navigation menudaza1242Daza"Dazaga"eeee178086576