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

Z Studia Informatyczne
Przejdź do nawigacjiPrzejdź do wyszukiwania
Pitab (dyskusja | edycje)
m Zastępowanie tekstu – „,↵</math>” na „</math>,”
 
(Nie pokazano 10 pośrednich wersji utworzonych przez tego samego użytkownika)
Linia 4: Linia 4:
Policz funkcję tworzącą następujących ciągów:
Policz funkcję tworzącą następujących ciągów:


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


}}
}}
Linia 17: Linia 17:
<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">   
W punktach a. i c. będziemy używać wzoru na postać zwartą funkcji tworzącej  
W punktach a. i c. będziemy używać wzoru na postać zwartą funkcji tworzącej  
ciągu stałego równego  <math>\displaystyle 1 </math> :
ciągu stałego równego  <math>1</math> :




{{wzor|1|1|
{{wzor|1|1|
<math>\displaystyle
<math>
\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>}}
</math>}}




; 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ść:  
; ad a. Dla funkcji tworzącej  <math>A\!\left( x \right)=a_0+a_1x+a_2x^2+a_3x^3+\ldots</math>, korzystając z ([[#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>A\!\left( x \right)=1+2x+2^2x^2+2^3x^3+\ldots=\frac{1}{1-2x}</math></center>
</math></center>




Linia 35: Linia 33:


{{wzor|2|2|
{{wzor|2|2|
<math>\displaystyle
<math>
\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>}}
</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>\frac{1}{1-x}</math>  jest funkcją tworzącą ciągu stałego równego  <math>1</math> ,  
zaś funkcja  <math>\displaystyle \frac{1}{\left( 1-x \right)^2} </math>  jest funkcją tworzącą ciągu  <math>\displaystyle n+1 </math> .  
zaś funkcja  <math>\frac{1}{\left( 1-x \right)^2}</math>  jest funkcją tworzącą ciągu  <math>n+1</math> .  
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>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>\sum_{n=0}^{\infty}{\left( 2n+3 \right)x^n}
= \sum_{n=0}^{\infty}{x^n}+ 2\sum_{n=0}^{\infty}{\left( n+1 \right)x^n}
= \sum_{n=0}^{\infty}{x^n}+ 2\sum_{n=0}^{\infty}{\left( n+1 \right)x^n}
=\frac{1}{1-x}+\frac{2}{\left( 1-x \right)^2}
=\frac{1}{1-x}+\frac{2}{\left( 1-x \right)^2}
Linia 51: Linia 49:
</math></center>
</math></center>


; 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:
; ad c. Funkcja tworząca  <math>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>\frac{1}{1-x}</math> , czyli:


<center><math>\displaystyle C\!\left( x \right)
<center><math>C\!\left( x \right)
=\sum_{n=0}^{\infty}{\frac{x^n}{n}}
=\sum_{n=0}^{\infty}{\frac{x^n}{n}}
=\int\sum_{n=0}^{\infty}{x^n}
=\int\sum_{n=0}^{\infty}{x^n}
= \int \frac{1}{1-x}
= \int \frac{1}{1-x}
=-\ln{\left( 1-x \right)}.
=-\ln{\left( 1-x \right)}
</math></center>
</math></center>


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


<center><math>\displaystyle D\!\left( x \right)
<center><math>D\!\left( x \right)
=\frac{C\!\left( x \right)}{1-x}
=\frac{C\!\left( x \right)}{1-x}
=-\frac{\ln{\left( 1-x \right)}}{1-x}
=-\frac{\ln{\left( 1-x \right)}}{1-x}
=\frac{\ln{\left( 1-x \right)}}{x-1}.
=\frac{\ln{\left( 1-x \right)}}{x-1}
</math></center>
</math></center>


Linia 71: Linia 69:


{{cwiczenie|2|cw 2|
{{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>a_n=\frac{1}{n!}</math> .


}}
}}


<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">   
Dla funkcji tworzącej  <math>\displaystyle A\!\left( x \right)=\sum_{n=0}^{\infty}\frac{x^n}{n!} </math>  zachodzi
Dla funkcji tworzącej  <math>A\!\left( x \right)=\sum_{n=0}^{\infty}\frac{x^n}{n!}</math>  zachodzi
<math>\displaystyle A'\!\left( x \right)=A\!\left( x \right) </math> .  
<math>A'\!\left( x \right)=A\!\left( x \right)</math> .  
Rozważ jakie funkcje mają tę własność?
Rozważ jakie funkcje mają tę własność?
</div></div>
</div></div>
Linia 85: Linia 83:




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


Linia 93: Linia 91:




<center><math>\displaystyle A'\!\left( x \right)
<center><math>A'\!\left( x \right)
=\sum_{n=0}^{\infty}\frac{\left( x^n \right)'}{n!}
=\sum_{n=0}^{\infty}\frac{\left( x^n \right)'}{n!}
=\sum_{n=1}^{\infty}\frac{n x^{n-1}}{n!}
=\sum_{n=1}^{\infty}\frac{n x^{n-1}}{n!}
=\sum_{n=1}^{\infty}\frac{x^{n-1}}{\left( n-1 \right)!}
=\sum_{n=1}^{\infty}\frac{x^{n-1}}{\left( n-1 \right)!}
=\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>A\!\left( x \right)</math>  funkcji  <math>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>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>B'\!\left( x \right)=1</math> , a więc  <math>B\!\left( x \right)=x+a</math>  dla pewnego  <math>a\in\mathbb{R}</math> .  
Z faktu, że  <math>\displaystyle A\!\left( 0 \right)=1 </math>  mamy więc:
Z faktu, że  <math>A\!\left( 0 \right)=1</math>  mamy więc:




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


Linia 119: Linia 117:


{{cwiczenie|3|cw 3|
{{cwiczenie|3|cw 3|
Pokaż, że dla liczby naturalnej  <math>\displaystyle m </math>  zachodzi
Pokaż, że dla liczby naturalnej  <math>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>\frac{1}{\left( 1-x \right)^{m+1}}=\sum_{n=0}^{\infty}{ m+n \choose n }x^n
</math></center>
</math></center>


Linia 135: Linia 133:




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


Linia 143: Linia 141:




<center><math>\displaystyle G\!\left( x \right)
<center><math>G\!\left( x \right)
=\left( 1+\left( -x \right) \right)^{-\left( m+1 \right)}
=\left( 1+\left( -x \right) \right)^{-\left( m+1 \right)}
=\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>{ y \choose n }=\frac{y^{\underline{n}}}{n!}</math>   
funkcja  <math>\displaystyle G\!\left( x \right) </math>  przyjmuje więc postać:
funkcja  <math>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>\begin{align} &&\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>
\end{align}</math></center>




Linia 162: Linia 160:




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


Linia 172: Linia 170:




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


Linia 181: Linia 179:


<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">   
Wielomian  <math>\displaystyle 1-3x-2x^2+2x^3 </math>  ma miejsce zerowe dla  <math>\displaystyle x=-1 </math> .
Wielomian  <math>1-3x-2x^2+2x^3</math>  ma miejsce zerowe dla  <math>x=-1</math> .
</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">   
<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">   
Wielomian  <math>\displaystyle W\!\left( x \right)=1-3x-2x^2+2x^3 </math>  ma miejsce zerowe  <math>\displaystyle x=-1 </math> ,  
Wielomian  <math>W\!\left( x \right)=1-3x-2x^2+2x^3</math>  ma miejsce zerowe  <math>x=-1</math> ,  
czyli  <math>\displaystyle W\!\left( x \right)=\left( 1-4x+2x^2 \right)\left( 1+x \right) </math> .  
czyli  <math>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>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>x_1=\frac{2+\sqrt{2}}{2},\quad\quad\quad x_2=\frac{2-\sqrt{2}}{2}
</math></center>
</math></center>


Linia 197: Linia 195:




<center><math>\displaystyle W\!\left( x \right)
<center><math>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>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>G\!\left( x \right)=\frac{1+2x-6x^2}{1-3x-2x^2+2x^3}=
\frac{A}{1-\left( 2+\sqrt{2} \right)x}+
\frac{A}{1-\left( 2+\sqrt{2} \right)x}+
\frac{B}{1-\left( 2-\sqrt{2} \right)x}+
\frac{B}{1-\left( 2-\sqrt{2} \right)x}+
\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>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>1-3x-2x^2+2x^3</math>  otrzymamy:




<center><math>\displaystyle \aligned 1+2x-6x^2&=
<center><math>\begin{align} 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>
\end{align}</math></center>




Dwa wielomiany są równe wtedy i tylko wtedy,  
Dwa wielomiany są równe wtedy i tylko wtedy,  
gdy współczynniki stojące przy odpowiednich wyrazach  <math>\displaystyle x^n </math>  są sobie równe.  
gdy współczynniki stojące przy odpowiednich wyrazach  <math>x^n</math>  są sobie równe.  
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>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>\left\lbrace
\aligned
\begin{align}
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
\endaligned
\end{align}
\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>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>G\!\left( x \right)</math>  po podstawieniu za  <math>A,B,C</math>  odpowiednio liczb  <math>1,1,-1</math>,
jest sumą
jest sumą




<center><math>\displaystyle G\!\left( x \right)=
<center><math>G\!\left( x \right)=
\frac{1}{1-\left( 2+\sqrt{2} \right)x}+
\frac{1}{1-\left( 2+\sqrt{2} \right)x}+
\frac{1}{1-\left( 2-\sqrt{2} \right)x}-
\frac{1}{1-\left( 2-\sqrt{2} \right)x}-
\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>\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>\alpha\sum_{n=0}^{\infty}\rho^n x^n</math>  otrzymujemy:




<center><math>\displaystyle G\!\left( x \right)
<center><math>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>


Linia 265: Linia 262:




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


Linia 275: Linia 272:




<center><math>\displaystyle \left\lbrace
<center><math>\left\lbrace
\aligned
\begin{align}
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\text{dla}\ n\geq2.
\endaligned
\end{align}
\right.
\right</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">   
Rozłóż funkcje kwadratową  <math>\displaystyle 1-2x+x^2=\left( 1-\rho_1x \right)\left( 1-\rho_2x \right) </math>   
Rozłóż funkcje kwadratową  <math>1-2x+x^2=\left( 1-\rho_1x \right)\left( 1-\rho_2x \right)</math>   
i w zależności od wartości  <math>\displaystyle \rho_1,\rho_2 </math>   
i w zależności od wartości  <math>\rho_1,\rho_2</math>   
skorzystaj z metody rozwiązania jednorodnego, liniowego równania rekurencyjnego,  
skorzystaj z metody rozwiązania jednorodnego, liniowego równania rekurencyjnego,  
gdy  <math>\displaystyle k=2 </math>  podanej w wykładzie.
gdy  <math>k=2</math>  podanej w wykładzie.
</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">   
<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">   
Korzystając ze wzoru z wykładu ''Funkcje tworzące'',  
Korzystając ze wzoru z wykładu ''Funkcje tworzące'',  
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>\displaystyle k=2 </math>   
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>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>1-2x+x^2=\left( 1-x \right)^2</math></center>
</math></center>




Linia 306: Linia 301:




<center><math>\displaystyle a_n = \left( \alpha n+\beta \right)1^n,
<center><math>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>\alpha</math>  oraz  <math>\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>a_0</math>  oraz  <math>a_1</math>  możemy wyliczyć  <math>\alpha</math>  oraz  <math>\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>\left\lbrace
\aligned
\begin{align}
0&=\alpha\cdot0+\beta,\\
0&=\alpha\cdot0+\beta,\\
1&=\alpha\cdot1+\beta.
1&=\alpha\cdot1+\beta.
\endaligned
\end{align}
\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>\alpha=1</math>  i  <math>\beta=0</math> , a zatem




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




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


Linia 338: Linia 330:




<center><math>\displaystyle \left\lbrace
<center><math>\left\lbrace
\aligned
\begin{align}
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\text{dla}\ n\geq2.
\endaligned
\end{align}
\right.
\right</math></center>
</math></center>




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


<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">   
Rozłóż funkcje kwadratową  <math>\displaystyle 1-x+x^2=\left( 1-\rho_1x \right)\left( 1-\rho_2x \right) </math>   
Rozłóż funkcje kwadratową  <math>1-x+x^2=\left( 1-\rho_1x \right)\left( 1-\rho_2x \right)</math>   
i w zależności od wartości  <math>\displaystyle \rho_1,\rho_2 </math>   
i w zależności od wartości  <math>\rho_1,\rho_2</math>   
skorzystaj z metody rozwiązania jednorodnego, liniowego równania rekurencyjnego,  
skorzystaj z metody rozwiązania jednorodnego, liniowego równania rekurencyjnego,  
gdy  <math>\displaystyle k=2 </math>  podanej w wykładzie.
gdy  <math>k=2</math>  podanej w wykładzie.
</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">   
<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">   
Korzystając ze wzoru z wykładu ''Funkcje tworzące'',  
Korzystając ze wzoru z wykładu ''Funkcje tworzące'',  
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>\displaystyle k=2 </math>   
dla rozwiązania jednorodnego, liniowego równania rekurencyjnego przy  <math>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>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>




Linia 372: Linia 362:




<center><math>\displaystyle a_n = \alpha\left( \frac{1+i\sqrt{3}}{2} \right)^n+
<center><math>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>\alpha</math>  oraz  <math>\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>a_0</math>  oraz  <math>a_1</math>  możemy wyliczyć  <math>\alpha</math>  oraz  <math>\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>\left\lbrace
\aligned
\begin{align}
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}.
\endaligned
\end{align}
\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>\alpha=-\frac{i\sqrt{3}}{3}</math>  i  <math>\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>a_n = -\frac{i\sqrt{3}}{3}\left( \frac{1+i\sqrt{3}}{2} \right)^n+
\frac{i\sqrt{3}}{3}\left( \frac{1-i\sqrt{3}}{2} \right)^n,
\frac{i\sqrt{3}}{3}\left( \frac{1-i\sqrt{3}}{2} \right)^n</math>,</center>
</math></center>




dla  <math>\displaystyle n=0,1,2,3,\ldots </math>. Z faktu, że
dla  <math>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>\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>




Linia 409: Linia 395:




<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>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>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>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>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>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>a_n</math>  przybiera więc cyklicznie wartości ze zbioru  <math>\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>\left\vert a_n \right\vert\leq 1\quad</math> dla <math>\ n=0,1,2,3,\ldots</math></center>
</math></center>




Linia 436: Linia 419:




<center><math>\displaystyle \left\lbrace
<center><math>\left\lbrace
\aligned
\begin{align}
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\text{dla}\ n\geq3.
\endaligned
\end{align}
\right.
\right</math></center>
</math></center>




Linia 451: Linia 433:
<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">   
Używając równania rekurencyjnego,  
Używając równania rekurencyjnego,  
znajdź zależność dla funkcji tworzącej  <math>\displaystyle A\!\left( x \right)=\sum_{n=0}^{\infty}a_n x^n </math>  
znajdź zależność dla funkcji tworzącej  <math>A\!\left( x \right)=\sum_{n=0}^{\infty}a_n x^n</math>  
tego ciągu. Następnie przedstaw funkcję  <math>\displaystyle A\!\left( x \right) </math>  w postaci zwartej  
tego ciągu. Następnie przedstaw funkcję  <math>A\!\left( x \right)</math>  w postaci zwartej  
i wylicz  <math>\displaystyle a_n </math> .
i wylicz  <math>a_n</math> .
</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">   
<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  <math>\displaystyle A\!\left( x \right)=\sum_{n=0}^{\infty}a_n x^n </math> .
Niech  <math>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>\begin{align} \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>
\end{align}</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>\sum_{n=0}^{\infty}a_n x^n</math>  wstawiamy  <math>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>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>




Linia 476: Linia 457:




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




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




Linia 490: Linia 469:




<center><math>\displaystyle a_n=\left( 2+\sqrt{2} \right)^n+\left( 2-\sqrt{2} \right)^n-\left( -1 \right)^n
<center><math>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>n=0,1,2,\ldots</math> .
</div></div>
</div></div>

Aktualna wersja na dzień 21:47, 11 wrz 2023

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ć (błąd składni): {\displaystyle \left\lbrace \begin{align} a_0&=0,\\ a_1&=1,\\ a_n&=2a_{n-1}-a_{n-2},\quad\text{dla}\ n\geq2. \end{align} \right}
Wskazówka
Rozwiązanie

Ćwiczenie 6

Rozwiąż równanie rekurencyjne postaci


Parser nie mógł rozpoznać (błąd składni): {\displaystyle \left\lbrace \begin{align} a_0&=0,\\ a_1&=1,\\ a_n&=a_{n-1}-a_{n-2}\quad\text{dla}\ n\geq2. \end{align} \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ć (błąd składni): {\displaystyle \left\lbrace \begin{align} a_0&=1,\\ a_1&=5,\\ a_2&=11,\\ a_n&=3a_{n-1}+2a_{n-2}-2a_{n-3}\quad\text{dla}\ n\geq3. \end{align} \right}


Wskazówka
Rozwiązanie