Matematyka dyskretna 1/Ćwiczenia 7: Funkcje tworzące: Różnice pomiędzy wersjami

Z Studia Informatyczne
Przejdź do nawigacjiPrzejdź do wyszukiwania
Arek (dyskusja | edycje)
Nie podano opisu zmian
Pitab (dyskusja | edycje)
Linia 1: Linia 1:
==Funkcje tworzące==
==Funkcje tworzące==


{{cwiczenie|ex some genereiting function||
{{cwiczenie|1|cw 1|
 
Policz funkcję tworzącą następujących ciągów:
Policz funkcję tworzącą następujących ciągów:


; a.
; a. <math>\displaystyle a_n=2^n </math> ,
<math>\displaystyle a_n=2^n </math> ,
; b. <math>\displaystyle b_n=2n+3 </math> ,
 
; c. <math>\displaystyle c_n=\frac{1}{n} </math>  dla  <math>\displaystyle n\geq 1 </math> , oraz  <math>\displaystyle c_0=0 </math> ,
; b.
; d. <math>\displaystyle d_n=1+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{n} </math> .
<math>\displaystyle b_n=2n+3 </math> ,
 
; c.
<math>\displaystyle c_n=\frac{1}{n} </math>  dla  <math>\displaystyle n\geq1 </math> , oraz  <math>\displaystyle c_0=0 </math> ,
 
; d.
<math>\displaystyle d_n=1+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{n} </math> .


}}
}}
Linia 27: Linia 19:
ciągu stałego równego  <math>\displaystyle 1 </math> :
ciągu stałego równego  <math>\displaystyle 1 </math> :


<center><math>\displaystyle  
 
{{wzor|1|1|
<math>\displaystyle  
\frac{1}{1-x}=1+x+x^2+x^3+x^4+\ldots.
\frac{1}{1-x}=1+x+x^2+x^3+x^4+\ldots.
</math></center>
</math>}}
 


; ad a.
; ad a. Dla funkcji tworzącej  <math>\displaystyle A\!\left( x \right)=a_0+a_1x+a_2x^2+a_3x^3+\ldots </math>, korzystając z ([[#1|1]]), otrzymujemy równość:  
Dla funkcji tworzącej  <math>\displaystyle A\!\left( x \right)=a_0+a_1x+a_2x^2+a_3x^3+\ldots </math> ,  
korzystając z ([[##eq genfunc 1,1,1,1,...|Uzupelnic eq genfunc 1,1,1,1,...|]]), otrzymujemy równość:  


<center><math>\displaystyle A\!\left( x \right)=1+2x+2^2x^2+2^3x^3+\ldots=\frac{1}{1-2x}.
<center><math>\displaystyle A\!\left( x \right)=1+2x+2^2x^2+2^3x^3+\ldots=\frac{1}{1-2x}.
</math></center>
</math></center>


; ad b.
Korzystając z twierdzenia '''[con][con newton for integer]''' otrzymamy:


<center><math>\displaystyle  
; ad b. Korzystając z Wniosku [[Matematyka dyskretna 1/Wykład 7: Funkcje tworzące#wn_7.5|7.5]] otrzymamy:
 
{{wzor|2|2|
<math>\displaystyle  
\frac{1}{\left( 1-x \right)^2}=1+2x+3x^2+4x^3+5x^4+\ldots
\frac{1}{\left( 1-x \right)^2}=1+2x+3x^2+4x^3+5x^4+\ldots
</math></center>
</math>}}


Funkcja  <math>\displaystyle \frac{1}{1-x} </math>  jest funkcją tworzącą ciągu stałego równego  <math>\displaystyle 1 </math> ,  
Funkcja  <math>\displaystyle \frac{1}{1-x} </math>  jest funkcją tworzącą ciągu stałego równego  <math>\displaystyle 1 </math> ,  
Linia 51: Linia 43:
Tak więc, aby otrzymać funkcję tworzącą ciągu  <math>\displaystyle 2n+3 </math>   
Tak więc, aby otrzymać funkcję tworzącą ciągu  <math>\displaystyle 2n+3 </math>   
wystarczy dodać jedną do podwojonej drugiej:  
wystarczy dodać jedną do podwojonej drugiej:  


<center><math>\displaystyle \sum_{n=0}^{\infty}{\left( 2n+3 \right)x^n}
<center><math>\displaystyle \sum_{n=0}^{\infty}{\left( 2n+3 \right)x^n}
Linia 58: Linia 51:
</math></center>
</math></center>


; ad c.
; ad c. Funkcja tworząca  <math>\displaystyle C\!\left( x \right)=c_0+c_1x+c_2x^2+c_3x^3+\ldots </math> jest, na mocy '''[eq][eq wzor z calka]''', równa całce z funkcji  <math>\displaystyle \frac{1}{1-x} </math> , czyli:
Funkcja tworząca  <math>\displaystyle C\!\left( x \right)=c_0+c_1x+c_2x^2+c_3x^3+\ldots </math>
jest, na mocy '''[eq][eq wzor z calka]''', równa całce z funkcji  <math>\displaystyle \frac{1}{1-x} </math> , czyli:


<center><math>\displaystyle C\!\left( x \right)
<center><math>\displaystyle C\!\left( x \right)
Linia 70: Linia 60:
</math></center>
</math></center>


; ad d.
; ad d. Korzystając z punktu c., na mocy '''[eq][eq 1 przez 1-x]''', otrzymujemy
:
Korzystając z punktu c., na mocy '''[eq][eq 1 przez 1-x]''', otrzymujemy


<center><math>\displaystyle D\!\left( x \right)
<center><math>\displaystyle D\!\left( x \right)
Linia 82: Linia 70:
</div></div>
</div></div>


{{cwiczenie|ex exponential(x)||
{{cwiczenie|2|cw 2|
 
Policz funkcję tworzącą ciągu  <math>\displaystyle a_n=\frac{1}{n!} </math> .
Policz funkcję tworzącą ciągu  <math>\displaystyle a_n=\frac{1}{n!} </math> .


Linia 96: Linia 83:
<div class="mw-collapsible mw-made=collapsible mw-collapsed"><span class="mw-collapsible-toogle mw-collapsible-toogle-default style="font-variant:small-caps">Rozwiązanie </span><div class="mw-collapsible-content" style="display:none">   
<div class="mw-collapsible mw-made=collapsible mw-collapsed"><span class="mw-collapsible-toogle mw-collapsible-toogle-default style="font-variant:small-caps">Rozwiązanie </span><div class="mw-collapsible-content" style="display:none">   
Niech
Niech


<center><math>\displaystyle A\!\left( x \right)
<center><math>\displaystyle A\!\left( x \right)
=\sum_{n=0}^{\infty}\frac{x^n}{n!}.
=\sum_{n=0}^{\infty}\frac{x^n}{n!}.
</math></center>
</math></center>


Korzystając z obserwacji '''[obs][obs genfunc tools]''' zauważmy, że
Korzystając z obserwacji '''[obs][obs genfunc tools]''' zauważmy, że


<center><math>\displaystyle A'\!\left( x \right)
<center><math>\displaystyle A'\!\left( x \right)
Linia 109: Linia 99:
=\sum_{n=0}^{\infty}\frac{x^n}{n!}=A\!\left( x \right).
=\sum_{n=0}^{\infty}\frac{x^n}{n!}=A\!\left( x \right).
</math></center>
</math></center>


Po podstawieniu w miejsce  <math>\displaystyle A\!\left( x \right) </math>  funkcji  <math>\displaystyle e^{B\!\left( x \right)} </math>  uzyskamy:
Po podstawieniu w miejsce  <math>\displaystyle A\!\left( x \right) </math>  funkcji  <math>\displaystyle e^{B\!\left( x \right)} </math>  uzyskamy:


<center><math>\displaystyle e^{B\!\left( x \right)}=\left( e^{B\!\left( x \right)} \right)'=B'\!\left( x \right)e^{B\!\left( x \right)},
<center><math>\displaystyle e^{B\!\left( x \right)}=\left( e^{B\!\left( x \right)} \right)'=B'\!\left( x \right)e^{B\!\left( x \right)},
</math></center>
</math></center>


co implikuje, że  <math>\displaystyle B'\!\left( x \right)=1 </math> , a więc  <math>\displaystyle B\!\left( x \right)=x+a </math>  dla pewnego  <math>\displaystyle a\in\mathbb{R} </math> .  
co implikuje, że  <math>\displaystyle B'\!\left( x \right)=1 </math> , a więc  <math>\displaystyle B\!\left( x \right)=x+a </math>  dla pewnego  <math>\displaystyle a\in\mathbb{R} </math> .  
Z faktu, że  <math>\displaystyle A\!\left( 0 \right)=1 </math>  mamy więc:
Z faktu, że  <math>\displaystyle A\!\left( 0 \right)=1 </math>  mamy więc:


<center><math>\displaystyle A\!\left( x \right)=e^x.
<center><math>\displaystyle A\!\left( x \right)=e^x.
</math></center>
</math></center>


</div></div>
</div></div>


{{cwiczenie|ex newton for integer||
{{cwiczenie|3|cw 3|
Pokaż, że dla liczby naturalnej  <math>\displaystyle m </math>  zachodzi


Pokaż, że dla liczby naturalnej  <math>\displaystyle m </math>  zachodzi


<center><math>\displaystyle \frac{1}{\left( 1-x \right)^{m+1}}=\sum_{n=0}^{\infty}{ m+n \choose n }x^n.
<center><math>\displaystyle \frac{1}{\left( 1-x \right)^{m+1}}=\sum_{n=0}^{\infty}{ m+n \choose n }x^n.
</math></center>
</math></center>


}}
}}


<div class="mw-collapsible mw-made=collapsible mw-collapsed"><span class="mw-collapsible-toogle mw-collapsible-toogle-default style="font-variant:small-caps">Wskazówka </span><div class="mw-collapsible-content" style="display:none">   
<div class="mw-collapsible mw-made=collapsible mw-collapsed"><span class="mw-collapsible-toogle mw-collapsible-toogle-default style="font-variant:small-caps">Wskazówka </span><div class="mw-collapsible-content" style="display:none">   
Rozpisz uogólniony symbol dwumianowy z twierdzenia '''[th][thm (1+x){}y]'''.
Rozpisz uogólniony symbol dwumianowy z Twierdzenia [[Matematyka dyskretna 1/Wykład 7: Funkcje tworzące#tw_7.4|7.4]].
</div></div>
</div></div>


<div class="mw-collapsible mw-made=collapsible mw-collapsed"><span class="mw-collapsible-toogle mw-collapsible-toogle-default style="font-variant:small-caps">Rozwiązanie </span><div class="mw-collapsible-content" style="display:none">   Niech
<div class="mw-collapsible mw-made=collapsible mw-collapsed"><span class="mw-collapsible-toogle mw-collapsible-toogle-default style="font-variant:small-caps">Rozwiązanie </span><div class="mw-collapsible-content" style="display:none"> Niech
 


<center><math>\displaystyle G\!\left( x \right)
<center><math>\displaystyle G\!\left( x \right)
Linia 142: Linia 139:
</math></center>
</math></center>


Korzystając z twierdzenia '''[th][thm (1+x){}y]''' otrzymujemy równość:
 
Korzystając z Twierdzenia [[Matematyka dyskretna 1/Wykład 7: Funkcje tworzące#tw_7.4|7.4]] otrzymujemy równość:
 


<center><math>\displaystyle G\!\left( x \right)
<center><math>\displaystyle G\!\left( x \right)
Linia 148: Linia 147:
=\sum_{n=0}^{\infty}{ -\left( m+1 \right) \choose n }\left( -x \right)^n.
=\sum_{n=0}^{\infty}{ -\left( m+1 \right) \choose n }\left( -x \right)^n.
</math></center>
</math></center>


Po rozpisaniu uogólnionego symbolu dwumianowego  
Po rozpisaniu uogólnionego symbolu dwumianowego  
<math>\displaystyle { y \choose n }=\frac{y^{\underline{n}}}{n!} </math>   
<math>\displaystyle { y \choose n }=\frac{y^{\underline{n}}}{n!} </math>   
funkcja  <math>\displaystyle G\!\left( x \right) </math>  przyjmuje więc postać:
funkcja  <math>\displaystyle G\!\left( x \right) </math>  przyjmuje więc postać:


<center><math>\displaystyle \aligned &&\sum_{n=0}^{\infty}\frac{\left( -m-1 \right)\cdot\left( -m-2 \right)\cdot\ldots\cdot\left( -m-n \right)}{n!}\left( -1 \right)^n x^n\ =\\
<center><math>\displaystyle \aligned &&\sum_{n=0}^{\infty}\frac{\left( -m-1 \right)\cdot\left( -m-2 \right)\cdot\ldots\cdot\left( -m-n \right)}{n!}\left( -1 \right)^n x^n\ =\\
&&\quad\quad\quad\quad\quad\quad\quad\quad\quad=\ \sum_{n=0}^{\infty}\frac{\left( m+n \right)\cdot\left( m+n-1 \right)\cdot\ldots\cdot\left( m+1 \right)}{n!}x^n.
&&\quad\quad\quad\quad\quad\quad\quad\quad\quad=\ \sum_{n=0}^{\infty}\frac{\left( m+n \right)\cdot\left( m+n-1 \right)\cdot\ldots\cdot\left( m+1 \right)}{n!}x^n.
\endaligned</math></center>
\endaligned</math></center>


Korzystając ponownie z definicji symbolu dwumianowego dostajemy:
Korzystając ponownie z definicji symbolu dwumianowego dostajemy:


<center><math>\displaystyle G\!\left( x \right)=\sum_{n=0}^{\infty}{ m+n \choose n }x^n.
<center><math>\displaystyle G\!\left( x \right)=\sum_{n=0}^{\infty}{ m+n \choose n }x^n.
</math></center>
</math></center>


</div></div>
</div></div>


{{cwiczenie|ex wymierna||
{{cwiczenie|4|cw 4|
Przedstaw funkcję


Przedstaw funkcję


<center><math>\displaystyle G\!\left( x \right)=\frac{1+2x-6x^2}{1-3x-2x^2+2x^3}
<center><math>\displaystyle G\!\left( x \right)=\frac{1+2x-6x^2}{1-3x-2x^2+2x^3}
</math></center>
</math></center>


w postaci szeregu funkcyjnego.
w postaci szeregu funkcyjnego.
Linia 183: Linia 188:
czyli  <math>\displaystyle W\!\left( x \right)=\left( 1-4x+2x^2 \right)\left( 1+x \right) </math> .  
czyli  <math>\displaystyle W\!\left( x \right)=\left( 1-4x+2x^2 \right)\left( 1+x \right) </math> .  
Z kolei funkcja kwadratowa  <math>\displaystyle 1-4x+2x^2 </math>  ma miejsca zerowe:
Z kolei funkcja kwadratowa  <math>\displaystyle 1-4x+2x^2 </math>  ma miejsca zerowe:


<center><math>\displaystyle x_1=\frac{2+\sqrt{2}}{2},\quad\quad\quad x_2=\frac{2-\sqrt{2}}{2},
<center><math>\displaystyle x_1=\frac{2+\sqrt{2}}{2},\quad\quad\quad x_2=\frac{2-\sqrt{2}}{2},
</math></center>
</math></center>


co implikuje
co implikuje


<center><math>\displaystyle W\!\left( x \right)
<center><math>\displaystyle W\!\left( x \right)
=\left( 1-\left( 2+\sqrt{2} \right)x \right)\cdot\left( 1-\left( 2-\sqrt{2} \right)x \right)\cdot\left( 1+x \right).
=\left( 1-\left( 2+\sqrt{2} \right)x \right)\cdot\left( 1-\left( 2-\sqrt{2} \right)x \right)\cdot\left( 1+x \right).
</math></center>
</math></center>


Funkcja  <math>\displaystyle W\!\left( x \right) </math>  ma więc postać
Funkcja  <math>\displaystyle W\!\left( x \right) </math>  ma więc postać


<center><math>\displaystyle G\!\left( x \right)=\frac{1+2x-6x^2}{1-3x-2x^2+2x^3}=
<center><math>\displaystyle G\!\left( x \right)=\frac{1+2x-6x^2}{1-3x-2x^2+2x^3}=
Linia 200: Linia 210:
\frac{C}{1+x},
\frac{C}{1+x},
</math></center>
</math></center>


dla pewnych  <math>\displaystyle A,B,C \in \mathbb{R} </math> .
dla pewnych  <math>\displaystyle A,B,C \in \mathbb{R} </math> .
Po wymnożeniu  przez  <math>\displaystyle 1-3x-2x^2+2x^3 </math>  otrzymamy:
Po wymnożeniu  przez  <math>\displaystyle 1-3x-2x^2+2x^3 </math>  otrzymamy:


<center><math>\displaystyle \aligned 1+2x-6x^2&=
<center><math>\displaystyle \aligned 1+2x-6x^2&=
A\left( 1-\left( 2-\sqrt{2} \right)x \right)\left( 1+x \right)
A\left( 1-\left( 2-\sqrt{2} \right)x \right)\left( 1+x \right)
+B\left( 1-\left( 2+\sqrt{2} \right)x \right)\left( 1+x \right)\\
+B\left( 1-\left( 2+\sqrt{2} \right)x \right)\left( 1+x \right)\\
&&+C\left( 1-\left( 2-\sqrt{2} \right)x \right)\left( 1-\left( 2+\sqrt{2} \right)x \right)\\
&+C\left( 1-\left( 2-\sqrt{2} \right)x \right)\left( 1-\left( 2+\sqrt{2} \right)x \right)\\
&=\left( A+B+C \right)+\left( \left( -1-\sqrt{2} \right)A+\left( -1+\sqrt{2} \right)B-4C \right)x\\
&=\left( A+B+C \right)+\left( \left( -1-\sqrt{2} \right)A+\left( -1+\sqrt{2} \right)B-4C \right)x\\
&&+\left( \left( -2-\sqrt{2} \right)A+\left( -2+\sqrt{2} \right)B+2C \right)x^2.
&+\left( \left( -2-\sqrt{2} \right)A+\left( -2+\sqrt{2} \right)B+2C \right)x^2.
\endaligned</math></center>
\endaligned</math></center>


Dwa wielomiany są równe wtedy i tylko wtedy,  
Dwa wielomiany są równe wtedy i tylko wtedy,  
Linia 216: Linia 229:
Przyrównujemy więc współczynniki stojące przed  <math>\displaystyle x^0, x^1, x^2 </math>   
Przyrównujemy więc współczynniki stojące przed  <math>\displaystyle x^0, x^1, x^2 </math>   
i otrzymujemy układ równań:
i otrzymujemy układ równań:


<center><math>\displaystyle \left\lbrace
<center><math>\displaystyle \left\lbrace
\begin{array} {r c l}
\aligned
1&=A+B+C\\
1&=A+B+C\\
2&=\left( -1-\sqrt{2} \right)A+\left( -1+\sqrt{2} \right)B-4C\\
2&=\left( -1-\sqrt{2} \right)A+\left( -1+\sqrt{2} \right)B-4C\\
-6&=\left( -2-\sqrt{2} \right)A+\left( -2+\sqrt{2} \right)B+2C,
-6&=\left( -2-\sqrt{2} \right)A+\left( -2+\sqrt{2} \right)B+2C,
\end{array}
\endaligned
\right.
\right.
</math></center>
</math></center>


którego rozwiązaniem są  <math>\displaystyle A=B=1,\ C=-1 </math> .  
którego rozwiązaniem są  <math>\displaystyle A=B=1,\ C=-1 </math> .  
Funkcja  <math>\displaystyle G\!\left( x \right) </math>  po podstawieniu za  <math>\displaystyle A,B,C </math>  odpowiednio liczb  <math>\displaystyle 1,1,-1 </math> ,
Funkcja  <math>\displaystyle G\!\left( x \right) </math>  po podstawieniu za  <math>\displaystyle A,B,C </math>  odpowiednio liczb  <math>\displaystyle 1,1,-1 </math> ,
jest sumą  
jest sumą
 


<center><math>\displaystyle G\!\left( x \right)=
<center><math>\displaystyle G\!\left( x \right)=
Linia 235: Linia 251:
\frac{1}{1+x}.
\frac{1}{1+x}.
</math></center>
</math></center>


Rozwijając ułamki postaci  <math>\displaystyle \frac{\alpha}{1-\rho x} </math>   
Rozwijając ułamki postaci  <math>\displaystyle \frac{\alpha}{1-\rho x} </math>   
w szereg funkcyjny  <math>\displaystyle \alpha\sum_{n=0}^{\infty}\rho^n x^n </math>  otrzymujemy:
w szereg funkcyjny  <math>\displaystyle \alpha\sum_{n=0}^{\infty}\rho^n x^n </math>  otrzymujemy:


<center><math>\displaystyle G\!\left( x \right)
<center><math>\displaystyle G\!\left( x \right)
=\sum_{n=0}^{\infty}\left( \left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n \right)x^n,
=\sum_{n=0}^{\infty}\left( \left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n \right)x^n,
</math></center>
</math></center>


czyli jest to funkcja tworząca ciągu  
czyli jest to funkcja tworząca ciągu  


<center><math>\displaystyle \left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n
<center><math>\displaystyle \left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n
</math></center>
</math></center>


</div></div>
</div></div>


{{cwiczenie|ex recurence 1||
{{cwiczenie|5|cw 5|
Rozwiąż równanie rekurencyjne:


Rozwiąż równanie rekurencyjne:


<center><math>\displaystyle \left\lbrace
<center><math>\displaystyle \left\lbrace
\begin{array} {r c l}
\aligned
a_0&=0,\\
a_0&=0,\\
a_1&=1,\\
a_1&=1,\\
a_n&=2a_{n-1}-a_{n-2},\quad\textrm{dla}\ n\geq2.
a_n&=2a_{n-1}-a_{n-2},\quad\textrm{dla}\ n\geq2.
\end{array}
\endaligned
\right.
\right.
</math></center>
</math></center>
Linia 276: Linia 297:
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>\displaystyle k=2 </math>   
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>\displaystyle k=2 </math>   
otrzymamy następującą funkcję kwadratową:
otrzymamy następującą funkcję kwadratową:


<center><math>\displaystyle 1-2x+x^2=\left( 1-x \right)^2.
<center><math>\displaystyle 1-2x+x^2=\left( 1-x \right)^2.
</math></center>
</math></center>


Jest to przypadek, gdy pierwiastki są sobie równe, więc rozwiązanie jest postaci
Jest to przypadek, gdy pierwiastki są sobie równe, więc rozwiązanie jest postaci


<center><math>\displaystyle a_n = \left( \alpha n+\beta \right)1^n,
<center><math>\displaystyle a_n = \left( \alpha n+\beta \right)1^n,
</math></center>
</math></center>


gdzie  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>  są liczbami rzeczywistymi.  
gdzie  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>  są liczbami rzeczywistymi.  
Mając podane wyrazy  <math>\displaystyle a_0 </math>  oraz  <math>\displaystyle a_1 </math>  możemy wyliczyć  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>   
Mając podane wyrazy  <math>\displaystyle a_0 </math>  oraz  <math>\displaystyle a_1 </math>  możemy wyliczyć  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>   
z następującego układu równań:
z następującego układu równań:


<center><math>\displaystyle \left\lbrace
<center><math>\displaystyle \left\lbrace
\begin{array} {r c l}
\aligned
0&=\alpha\cdot0+\beta,\\
0&=\alpha\cdot0+\beta,\\
1&=\alpha\cdot1+\beta.
1&=\alpha\cdot1+\beta.
\end{array}
\endaligned
\right.
\right.
</math></center>
</math></center>


Rozwiązaniem są  więc  <math>\displaystyle \alpha=1 </math>  i  <math>\displaystyle \beta=0 </math> , a zatem
Rozwiązaniem są  więc  <math>\displaystyle \alpha=1 </math>  i  <math>\displaystyle \beta=0 </math> , a zatem


<center><math>\displaystyle a_n=n,
<center><math>\displaystyle a_n=n,
</math></center>
</math></center>


dla  <math>\displaystyle n=0,1,2,3,\ldots </math> .
dla  <math>\displaystyle n=0,1,2,3,\ldots </math> .
</div></div>
</div></div>


{{cwiczenie|ex cyclic recurence||
{{cwiczenie|6|cw 6|
Rozwiąż równanie rekurencyjne postaci


Rozwiąż równanie rekurencyjne postaci


<center><math>\displaystyle \left\lbrace
<center><math>\displaystyle \left\lbrace
\begin{array} {r c l}
\aligned
a_0&=0,\\
a_0&=0,\\
a_1&=1,\\
a_1&=1,\\
a_n&=a_{n-1}-a_{n-2}\quad\textrm{dla}\ n\geq2.
a_n&=a_{n-1}-a_{n-2}\quad\textrm{dla}\ n\geq2.
\end{array}
\endaligned
\right.
\right.
</math></center>
</math></center>


i sprawdź, czy ciąg  <math>\displaystyle a_n </math>  jest ograniczony.
i sprawdź, czy ciąg  <math>\displaystyle a_n </math>  jest ograniczony.
}}
}}


Linia 333: Linia 362:
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>\displaystyle k=2 </math>   
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>\displaystyle k=2 </math>   
otrzymamy następującą funkcję kwadratową:
otrzymamy następującą funkcję kwadratową:


<center><math>\displaystyle 1-x+x^2=\left( 1-\frac{1+i\sqrt{3}}{2}x \right)\left( 1-\frac{1-i\sqrt{3}}{2}x \right).
<center><math>\displaystyle 1-x+x^2=\left( 1-\frac{1+i\sqrt{3}}{2}x \right)\left( 1-\frac{1-i\sqrt{3}}{2}x \right).
</math></center>
</math></center>


W tym przypadku pierwiastki są różnymi liczbami zespolonymi,  
W tym przypadku pierwiastki są różnymi liczbami zespolonymi,  
więc rozwiązanie jest postaci
więc rozwiązanie jest postaci


<center><math>\displaystyle a_n = \alpha\left( \frac{1+i\sqrt{3}}{2} \right)^n+
<center><math>\displaystyle a_n = \alpha\left( \frac{1+i\sqrt{3}}{2} \right)^n+
\beta\left( \frac{1-i\sqrt{3}}{2} \right)^n,
\beta\left( \frac{1-i\sqrt{3}}{2} \right)^n,
</math></center>
</math></center>


gdzie  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>  są liczbami zespolonymi.  
gdzie  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>  są liczbami zespolonymi.  
Mając podane wyrazy  <math>\displaystyle a_0 </math>  oraz  <math>\displaystyle a_1 </math>  możemy wyliczyć  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>   
Mając podane wyrazy  <math>\displaystyle a_0 </math>  oraz  <math>\displaystyle a_1 </math>  możemy wyliczyć  <math>\displaystyle \alpha </math>  oraz  <math>\displaystyle \beta </math>   
z następującego układu równań:
z następującego układu równań:


<center><math>\displaystyle \left\lbrace
<center><math>\displaystyle \left\lbrace
\begin{array} {r c l}
\aligned
0&=\alpha\cdot1+\beta\cdot1,\\
0&=\alpha\cdot1+\beta\cdot1,\\
1&=\alpha\cdot\frac{1+i\sqrt{3}}{2}+\beta\cdot\frac{1-i\sqrt{3}}{2}.
1&=\alpha\cdot\frac{1+i\sqrt{3}}{2}+\beta\cdot\frac{1-i\sqrt{3}}{2}.
\end{array}
\endaligned
\right.
\right.
</math></center>
</math></center>


Rozwiązaniem są  <math>\displaystyle \alpha=-\frac{i\sqrt{3}}{3} </math>  i  <math>\displaystyle \beta=\frac{i\sqrt{3}}{3} </math> , więc
Rozwiązaniem są  <math>\displaystyle \alpha=-\frac{i\sqrt{3}}{3} </math>  i  <math>\displaystyle \beta=\frac{i\sqrt{3}}{3} </math> , więc


<center><math>\displaystyle a_n = -\frac{i\sqrt{3}}{3}\left( \frac{1+i\sqrt{3}}{2} \right)^n+
<center><math>\displaystyle a_n = -\frac{i\sqrt{3}}{3}\left( \frac{1+i\sqrt{3}}{2} \right)^n+
Linia 362: Linia 398:
</math></center>
</math></center>


dla  <math>\displaystyle n=0,1,2,3,\ldots </math> .
 
Z faktu, że
dla  <math>\displaystyle n=0,1,2,3,\ldots </math>. Z faktu, że
 


<center><math>\displaystyle \left( \frac{1+i\sqrt{3}}{2} \right)^6=1,\quad\left( \frac{1-i\sqrt{3}}{2} \right)^6=1,
<center><math>\displaystyle \left( \frac{1+i\sqrt{3}}{2} \right)^6=1,\quad\left( \frac{1-i\sqrt{3}}{2} \right)^6=1,
</math></center>
</math></center>


uzyskujemy
uzyskujemy


<center><math>\displaystyle a_n = -\frac{i\sqrt{3}}{3}\left( \frac{1+i\sqrt{3}}{2} \right)^{n \mod 6}+\frac{i\sqrt{3}}{3}\left( \frac{1-i\sqrt{3}}{2} \right)^{n \mod 6}.
<center><math>\displaystyle a_n = -\frac{i\sqrt{3}}{3}\left( \frac{1+i\sqrt{3}}{2} \right)^{n \mod 6}+\frac{i\sqrt{3}}{3}\left( \frac{1-i\sqrt{3}}{2} \right)^{n \mod 6}.
</math></center>
</math></center>


Widzimy więc, że ciąg o wyrazach  <math>\displaystyle a_n = a_{n \mod 6} </math>   
Widzimy więc, że ciąg o wyrazach  <math>\displaystyle a_n = a_{n \mod 6} </math>   
przybiera cyklicznie wartości  pierwszych  <math>\displaystyle 6 </math> -ciu swoich wyrazów.  
przybiera cyklicznie wartości  pierwszych  <math>\displaystyle 6 </math> -ciu swoich wyrazów.  
Początkowe wartości ciągu  <math>\displaystyle a_n </math> , to
Początkowe wartości ciągu  <math>\displaystyle a_n </math> , to


<center><math>\displaystyle a_0=0,\quad a_1=1,\quad a_2=1,\quad a_3=0,\quad a_4=-1,\quad a_5=-1.
<center><math>\displaystyle a_0=0,\quad a_1=1,\quad a_2=1,\quad a_3=0,\quad a_4=-1,\quad a_5=-1.
</math></center>
</math></center>


Ciąg  <math>\displaystyle a_n </math>  przybiera więc cyklicznie wartości ze zbioru  <math>\displaystyle \left\lbrace -1,0,1 \right\rbrace </math> ,  
Ciąg  <math>\displaystyle a_n </math>  przybiera więc cyklicznie wartości ze zbioru  <math>\displaystyle \left\lbrace -1,0,1 \right\rbrace </math> ,  
co implikuje oszacowanie
co implikuje oszacowanie


<center><math>\displaystyle \left\vert a_n \right\vert\leq 1\quad </math> dla <math>\displaystyle  \ n=0,1,2,3,\ldots.
<center><math>\displaystyle \left\vert a_n \right\vert\leq 1\quad </math> dla <math>\displaystyle  \ n=0,1,2,3,\ldots.
</math></center>
</math></center>


</div></div>
</div></div>


{{cwiczenie|ex recurence 2||
{{cwiczenie|7|cw 7|
Rozwiąż równanie rekurencyjne postaci


Rozwiąż równanie rekurencyjne postaci


<center><math>\displaystyle \left\lbrace
<center><math>\displaystyle \left\lbrace
\begin{array} {r c l}
\aligned
a_0&=1,\\
a_0&=1,\\
a_1&=5,\\
a_1&=5,\\
a_2&=11,\\
a_2&=11,\\
a_n&=3a_{n-1}+2a_{n-2}-2a_{n-3}\quad\textrm{dla}\ n\geq3.
a_n&=3a_{n-1}+2a_{n-2}-2a_{n-3}\quad\textrm{dla}\ n\geq3.
\end{array}
\endaligned
\right.
\right.
</math></center>
</math></center>


}}
}}
Linia 414: Linia 459:
Niech  <math>\displaystyle A\!\left( x \right)=\sum_{n=0}^{\infty}a_n x^n </math> .
Niech  <math>\displaystyle A\!\left( x \right)=\sum_{n=0}^{\infty}a_n x^n </math> .
Po podstawieniu równości z równania rekurencyjnego otrzymujemy:
Po podstawieniu równości z równania rekurencyjnego otrzymujemy:


<center><math>\displaystyle \aligned \sum_{n=0}^{\infty}a_n x^n&=1+5x+11x^2+3x\sum_{n=2}^{\infty}a_n x^n+2x^2\sum_{n=1}^{\infty}a_n x^n-2x^3\sum_{n=0}^{\infty}a_n x^n\\
<center><math>\displaystyle \aligned \sum_{n=0}^{\infty}a_n x^n&=1+5x+11x^2+3x\sum_{n=2}^{\infty}a_n x^n+2x^2\sum_{n=1}^{\infty}a_n x^n-2x^3\sum_{n=0}^{\infty}a_n x^n\\
&=1+2x-6x^2 +3x\sum_{n=0}^{\infty}a_n x^n+2x^2\sum_{n=0}^{\infty}a_n x^n-2x^3\sum_{n=0}^{\infty}a_n x^n.
&=1+2x-6x^2 +3x\sum_{n=0}^{\infty}a_n x^n+2x^2\sum_{n=0}^{\infty}a_n x^n-2x^3\sum_{n=0}^{\infty}a_n x^n.
\endaligned</math></center>
\endaligned</math></center>


W miejsce  <math>\displaystyle \sum_{n=0}^{\infty}a_n x^n </math>  wstawiamy  <math>\displaystyle A\!\left( x \right) </math>  i otrzymujemy:
W miejsce  <math>\displaystyle \sum_{n=0}^{\infty}a_n x^n </math>  wstawiamy  <math>\displaystyle A\!\left( x \right) </math>  i otrzymujemy:


<center><math>\displaystyle A\!\left( x \right)= 1+2x-6x^2 +3xA\!\left( x \right)+2x^2A\!\left( x \right)-2x^3A\!\left( x \right).
<center><math>\displaystyle A\!\left( x \right)= 1+2x-6x^2 +3xA\!\left( x \right)+2x^2A\!\left( x \right)-2x^3A\!\left( x \right).
</math></center>
</math></center>


Otrzymane równanie przekształcamy do postaci
Otrzymane równanie przekształcamy do postaci


<center><math>\displaystyle A\!\left( x \right)=\frac{1+2x-6x^2}{1-3x-2x^2+2x^3}.
<center><math>\displaystyle A\!\left( x \right)=\frac{1+2x-6x^2}{1-3x-2x^2+2x^3}.
</math></center>
</math></center>


W ćwiczeniu [[##ex wymierna|Uzupelnic ex wymierna|]] przedstawiliśmy funkcję  <math>\displaystyle A\!\left( x \right) </math>  w postaci szeregu funkcyjnego:
 
W [[#cw_4|ćwiczeniu 4]] przedstawiliśmy funkcję  <math>\displaystyle A\!\left( x \right) </math>  w postaci szeregu funkcyjnego:
 


<center><math>\displaystyle \sum_{n=0}^{\infty}a_n x^n=\sum_{n=0}^{\infty}\left( \left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n \right)x^n.
<center><math>\displaystyle \sum_{n=0}^{\infty}a_n x^n=\sum_{n=0}^{\infty}\left( \left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n \right)x^n.
</math></center>
</math></center>


W konsekwencji:
W konsekwencji:


<center><math>\displaystyle a_n=\left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n
<center><math>\displaystyle a_n=\left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n
</math></center>
</math></center>


dla  <math>\displaystyle n=0,1,2,\ldots </math> .
dla  <math>\displaystyle n=0,1,2,\ldots </math> .
</div></div>
</div></div>

Wersja z 09:50, 2 wrz 2006

Funkcje tworzące

Ćwiczenie 1

Policz funkcję tworzącą następujących ciągów:

a. an=2n ,
b. bn=2n+3 ,
c. cn=1n dla n1 , oraz c0=0 ,
d. dn=1+12+13++1n .
Wskazówka
Rozwiązanie

Ćwiczenie 2

Policz funkcję tworzącą ciągu an=1n! .

Wskazówka
Rozwiązanie

Ćwiczenie 3

Pokaż, że dla liczby naturalnej m zachodzi


1(1x)m+1=n=0(m+nn)xn.


Wskazówka
Rozwiązanie

Ćwiczenie 4

Przedstaw funkcję


G(x)=1+2x6x213x2x2+2x3


w postaci szeregu funkcyjnego.

Wskazówka
Rozwiązanie

Ćwiczenie 5

Rozwiąż równanie rekurencyjne:


Parser nie mógł rozpoznać (nieznana funkcja „\aligned”): {\displaystyle \displaystyle \left\lbrace \aligned a_0&=0,\\ a_1&=1,\\ a_n&=2a_{n-1}-a_{n-2},\quad\textrm{dla}\ n\geq2. \endaligned \right. }
Wskazówka
Rozwiązanie

Ćwiczenie 6

Rozwiąż równanie rekurencyjne postaci


Parser nie mógł rozpoznać (nieznana funkcja „\aligned”): {\displaystyle \displaystyle \left\lbrace \aligned a_0&=0,\\ a_1&=1,\\ a_n&=a_{n-1}-a_{n-2}\quad\textrm{dla}\ n\geq2. \endaligned \right. }


i sprawdź, czy ciąg an jest ograniczony.

Wskazówka
Rozwiązanie

Ćwiczenie 7

Rozwiąż równanie rekurencyjne postaci


Parser nie mógł rozpoznać (nieznana funkcja „\aligned”): {\displaystyle \displaystyle \left\lbrace \aligned a_0&=1,\\ a_1&=5,\\ a_2&=11,\\ a_n&=3a_{n-1}+2a_{n-2}-2a_{n-3}\quad\textrm{dla}\ n\geq3. \endaligned \right. }


Wskazówka
Rozwiązanie