%% Created by Maple V Trial Version (IBM INTEL NT)
%% Source Worksheet: generatrices1.mws
%% Generated: Mon Nov 30 18:50:52 1998
\documentclass{article}
\usepackage{maple2e}
\DefineParaStyle{Bullet Item}
\DefineParaStyle{Heading 1}
\DefineParaStyle{Heading 2}
\DefineParaStyle{Maple Output}
\DefineCharStyle{2D Math}
\DefineCharStyle{2D Output}
\begin{document}
\begin{maplegroup}
\begin{Heading 2}
Funciones generatrices aplicadas a problemas combinatorios
\end{Heading 2}

Ejemplos:

1.- ¿De cuantas formas se pueden colocar 7 bolas idnticas en 5 urnas
de las cuales, tres tienen capacidad hasta 1 bola y las otras dos
capacidad de hasta cuatro?

\textit{}

\textit{La función generatriz será:}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{g:=x->(1+x+x^2+x^3+x^4)^2*(1+x)^3;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
g := x\rightarrow (1 + x + x^{2} + x^{3} + x^{4})^{2}\,(1 + x)^{3
}
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{expand (g(x));}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
1 + 5\,x + 12\,x^{2} + 20\,x^{3} + 28\,x^{4} + 34\,x^{5} + 34\,x
^{6} + 28\,x^{7} + 20\,x^{8} + 12\,x^{9} + 5\,x^{10} + x^{11}
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\textit{la respuesta es, como se ve, 28. Podramos haberla obtenido sin
expandir el polinomio, haciendo:}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{coeff(g(x),x,7);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
28
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}

2.- ¿De cuantas formas se pueden colocar 20 objetos iguales en tres
urnas de las cuales, una tiene capacidad ilimitada y las otras dos
pueden contener cualquier nmero impar hasta 5?

\textit{La función generatriz será:}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{gg:=x->(x+x^3+x^5)^2*(1/(1-x));}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
\mathit{gg} := x\rightarrow {\displaystyle \frac {(x + x^{3} + x
^{5})^{2}}{1 - x}} 
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p1:=taylor(gg(x),x=0,22);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\begin{eqnarray*}
\lefteqn{\mathit{p1} := x^{2} + x^{3} + 3\,x^{4} + 3\,x^{5} + 6\,
x^{6} + 6\,x^{7} + 8\,x^{8} + 8\,x^{9} + 9\,x^{10} + 9\,x^{11} + 
9\,x^{12} + 9\,x^{13} + 9\,x^{14} + } \\
 & & 9\,x^{15} + 9\,x^{16} + 9\,x^{17} + 9\,x^{18} + 9\,x^{19} + 
9\,x^{20} + 9\,x^{21} + \mathrm{O}(x^{22})\mbox{\hspace{121pt}}
\end{eqnarray*}
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{coeff(p1,x,20);}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
9
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\textit{La solución es 9.}

Recurdese que el coeficiente del trmino \textit{k} de \textit{p1 }es
el valor de la derivada \textit{k}-sima de \textit{gg(x)} evaluada en
\textit{0 }y dividida por \textit{k!}. Por ejemplo:

 

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ (subs(x=0,diff(gg(x),x$4)))/4!;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
3
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
que coincide con el coeficiente de grado cuatro.

3.- Encontrar el nmero de soluciones enteras comprendidas entre 3 y 8
(ambos inclusive) de \textit{a+b+c+d=24} .

\textit{Este problema es equivalente a repartir 24 objetos en cuatro
urnas de capacidad mnima 3 y máxima 8. Por lo tanto, la función
generatriz será:}

\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ggg:=x->(x^3+x^4+x^5+x^6+x^7+x^8)^4;}{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
\mathit{ggg} := x\rightarrow (x^{3} + x^{4} + x^{5} + x^{6} + x^{
7} + x^{8})^{4}
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}
\textit{y la solución será:}

\begin{mapleinput}
\mapleinline{active}{1d}{coeff(ggg(x),x,24); }{%
}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\[
125
\]
\end{maplelatex}

\end{maplegroup}
\begin{maplegroup}

Ejercicios:

1.- Encontrar las funciones generatrices para las formas de distribuir
40 objetos entre cinco urnas:

\begin{Bullet Item}
cuando no hay ninguna restricción en el nmero de objetos en cada urna,
\end{Bullet Item}

\begin{Bullet Item}
cuando cada urna debe contener al menos un objeto,
\end{Bullet Item}

\begin{Bullet Item}
cuando cada urna contiene al menos tres objetos,
\end{Bullet Item}

\begin{Bullet Item}
cuando cada urna contiene un nmero par de objetos.
\end{Bullet Item}

2.- 

\end{maplegroup}
\end{document}
%% End of Maple V Output
