\documentclass[xcolor=dvipsnames, table, color=usenames]{beamer}
\usepackage{amssymb, amsmath}
\usepackage{latexsym}
\usepackage{color}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{url}
\usepackage{multirow}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 	SPANISH
%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[spanish]{babel}
\usepackage[latin1]{inputenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 	Fuente
%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{lmodern} %para evitar unos warnings por el tamaño de letra (si lo quitas, el resultado apenas cambia)
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 	GRÁFICOS, CAJAS
%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikz}
\usetikzlibrary{decorations,decorations.pathmorphing,decorations.markings,decorations.pathreplacing,positioning}
\usetikzlibrary{fadings}
\usetikzlibrary{calc}
\tikzset{
    nodo/.style={circle,minimum size=8pt,inner sep=1pt,font=\small,draw=blue,fill=white},%
    flechas/.style={>=latex,draw=blue,line width=.8pt, postaction={decorate},decoration={markings,mark=at position .55 with {\arrow[blue]{>}}}},%
    vert/.style={circle,minimum size=12pt,inner sep=0pt,draw=blue,font=\tiny,fill=white},%
    punto/.style={circle,minimum size=3pt,inner sep=0pt,fill=black}
}
%%%%%%%%%%%%%%%FOTOS
% El comando es una alternativa chapucera a paquetes raros con los que probablemente tendrías problemas
% Si tienes problemas con shadows.blur lo puedo cambiar (pero no queda tan bonito)
%\usetikzlibrary{shadows,shadows.blur}
\usetikzlibrary{shadows}
\newcommand\imgs[5][]{
\rotatebox{#5}{%
\node[inner sep=1pt,#1] (img) at #4
    {\includegraphics[keepaspectratio=true,#2]{#3}};
%            \path[blur shadow={shadow xshift=0pt,shadow yshift=-2pt,shadow blur steps=5}]
%            ($(img.north west)+(.3ex,-.5ex)$) -- ($(img.south west)+(.5ex,-.7ex)$)
%            .. controls ($(img.south)!.1!(img.south west)$) .. (img.south)
%            .. controls ($(img.south)!.1!(img.south east)$) .. ($(img.south east)+(-.5ex,-.7ex)$)
%            -- ($(img.north east)+(-.3ex, -.5ex)$) -- cycle;
\node[draw=colortema2,rectangle,line width=1pt,inner sep=1pt,#1] at #4
    {\includegraphics[keepaspectratio=true,#2]{#3}};
}}
%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\tcbuselibrary{vignette} %teclas
\newtcolorbox{miblock}[1][]{bottom=0pt,top=0pt,left=1pt,right=1pt,grow to right by=5pt,grow to left by=5pt,%
                            halign=flush left,enhanced,drop fuzzy shadow,colframe=white,colback=white,coltitle=azul2,fonttitle=\large,#1}%
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 	MACROS
%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\F}{\mathbb{F}}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Colores
%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{masrojo}{rgb}{0.7,0,0}
\definecolor{amarillo2}{RGB}{248,172,0} %amarilloICMAT
\definecolor{azul1}{RGB}{64,80,147} %azulDULCI
\definecolor{azul2}{RGB}{51,51,178} %azulstructure
%%*****************************************
%% Colores tema
%%*****************************************
\colorlet{colortema1}{amarillo2}
\colorlet{colortema2}{azul1}
\colorlet{fondo}{azul1!25!white}
%%%%%%%%%%%%%%%%%%%%%%%%%%


\mode<presentation>{%
    \useinnertheme[shadow=true]{rounded}%
    \setbeamercolor*{title}{fg=white}%
    \setbeamertemplate{navigation symbols}{}%
}

\setbeamercolor*{item}{fg=colortema2}
\setbeamercolor*{section in head/foot}{fg=white,bg=colortema2}

%%*****************************************
%% HEADLINE
%%*****************************************
\setbeamertemplate{mini frames}{}
\setbeamertemplate{headline}{%
\leavevmode
\ifnum\insertframenumber>0\relax%
\begin{beamercolorbox}[wd=\the\paperwidth,ht=0ex,dp=0ex]{section in head/foot}
  \begin{tikzpicture}
    \useasboundingbox[fill=colortema1](0,0) rectangle (\the\paperwidth,0.5cm);
    \fill[fondo!5!white] (0,0) rectangle (\the\paperwidth,-0.1);
    \node[anchor=north west,font=\sffamily\bfseries\tiny] at (0.5,0.45){ \insertnavigation{0.9\paperwidth}};%
  \end{tikzpicture}
\end{beamercolorbox}
\fi
\vskip-17pt
}
%%*****************************************
%% FOOTLINE
%%*****************************************
\setbeamertemplate{footline}{%
\leavevmode
\ifnum\insertframenumber>0\relax%
\begin{beamercolorbox}[wd=\the\paperwidth,ht=0ex,dp=0ex,ignorebg]{section in head/foot}
    \begin{tikzpicture}
    \useasboundingbox (0,0) rectangle (\the\paperwidth,0.45);
    {\node[anchor=east,font=\sffamily\bfseries\tiny,colortema2!60!black] at (2.4,0.23){\insertshortauthor};}
    \fill[colortema1] (2.5,0) rectangle (\the\paperwidth,0.45);
    {\node[anchor=west,font=\sffamily\bfseries\tiny] at (2.6,0.23){\insertshorttitle};}
    {\node[anchor=east,font=\sffamily\bfseries\tiny] at (0.97\paperwidth,0.23){\insertframenumber};}
    \end{tikzpicture}
\end{beamercolorbox}
\fi
}
%%*****************************************
%% FRAME TITLE
%%*****************************************
\setbeamertemplate{frametitle}{%
\vskip-1pt
  \begin{beamercolorbox}[wd=\paperwidth,ht=1.3cm]{}
  \begin{tikzpicture}
    \useasboundingbox (0,0) rectangle (\the\paperwidth,0.7);
    \fill[colortema2] (0,0) rectangle (\the\paperwidth,0.6);
    {\node[anchor=north west,font=\sffamily\mdseries\large,white] at (0.4,0.6){\insertframetitle};}
  \end{tikzpicture}
  \end{beamercolorbox}
}
%%*****************************************
%% BACKGROUND
%%*****************************************
\setbeamertemplate{background}{%
  \begin{tikzpicture}
    \useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight);
    \fill[color=colortema2] (2.6,2) rectangle (\the\paperwidth,\the\paperheight);
    \fill[color=colortema1] (0,0) rectangle(2.5,1.9);
    \fill[color=fondo] (2.6,0) rectangle (\the\paperwidth,1.9);
    \fill[color=fondo] (0,2) rectangle (2.5,\the\paperheight);
    \draw[line width=2pt,color=white] (3.75,4) -- (\the\paperwidth,4);
    \ifnum\thepage>1\relax%
    \fill[top color=white,bottom color=fondo,opacity=1] (0,0) rectangle (\the\paperwidth,\the\paperheight);
    \fi
  \end{tikzpicture}
}
%%*****************************************
%% TITLE PAGE
%%*****************************************
\setbeamertemplate{title page}{%
  \vskip55pt
    \begin{minipage}[c][3cm][b]{.95\textwidth}
    \begin{beamercolorbox}[leftskip=2.8cm]{title}
      \LARGE\bfseries\inserttitle%
    \end{beamercolorbox}%
  \end{minipage}%
  \vskip25pt
    \begin{minipage}[c][1.5cm][t]{.95\textwidth}
    \begin{beamercolorbox}[leftskip=2.8cm]{title}
    \bfseries\insertauthor%
    \end{beamercolorbox}%
  \end{minipage}%
  \vskip10pt
  \begin{minipage}[c][1.5cm][c]{.95\textwidth}
    \begin{beamercolorbox}[leftskip=2.8cm]{}
    \small\insertinstitute \\[5pt] \insertdate
    \end{beamercolorbox}%
  \end{minipage}%
}
%--------------------------------------------------------------------------



%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Datos
%%%%%%%%%%%%%%%%%%%%%%%%%%
\title[Matemáticas prácticas]{Matemáticas prácticas}
\institute{Universidad de Murcia}
\date{23 de febrero de 2017}
\author[F. Chamizo]{Fernando Chamizo Lorente (UAM-ICMAT)}


\begin{document}

\begin{frame}[noframenumbering]
\titlepage
\end{frame}

%%%%%%%%%%%%
% SLIDE 1  %
%%%%%%%%%%%%
\begin{frame}
\vfill
\begin{tcolorbox}[enhanced,center,width=10cm,boxsep=10pt,halign=flush left,%
                  colback=white,colframe=colortema2!70!black,%
                  sharp corners=downhill,leftrule=5pt,rightrule=5pt,drop fuzzy shadow=colortema2!70!black,%
                  before upper={\makebox(25,-10){\scalebox{5}{\rmfamily\color{colortema2!70!black}\textquotedblleft}}},%
                  after upper={\makebox(25,-23){\scalebox{5}{\rmfamily\color{colortema2!70!black}\textquotedblright}}}]
\emph{I'm a mathematician, basically. What I do is look around for problems where I can find useful applications for mathematics. All I do, really, is the math, and other people have the ideas.}
\end{tcolorbox}
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-.35,.7) grid (10.35,-.5);}
\node[anchor=south east,align=right] at (10,0) {F.~Dyson};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
\section{\texorpdfstring{PageRank\textsuperscript{TM}}{PageRank TM}}
%%%%%%%%%%%%
% SLIDE 2  %
%%%%%%%%%%%%
\begin{frame}
\vfill
\begin{tcolorbox}[enhanced,center,width=8.5cm,boxsep=10pt,halign=center,%
                  fontupper=\Large,colupper=colortema2!70!black,%
                  colback=white,colframe=colortema2!70!black,%
                  sharp corners=downhill,leftrule=5pt,rightrule=5pt,drop fuzzy shadow=colortema2!70!black]
El algoritmo \textbf{\itshape PageRank}{\small\textsuperscript{TM}}
\end{tcolorbox}
\vfill
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 3  %
%%%%%%%%%%%%
\begin{frame}{El modelo}
\vskip-10pt
Imaginemos una red de comunicaciones formada por nodos unidos mediante \lq\lq cables''  con una dirección en la que fluye la información:
Las páginas web que componen internet con sus enlaces.

\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,-.5) grid (10.35,-3.5);}
\foreach \pos/\name in {{(2,-1)/1},{(3,-3)/2},{(1,-2.5)/3},{(4,-1.5)/4},{(8.5,-2.5)/5},{(7.5,-1.5)/6},{(6,-1)/7},{(5.5,-2.5)/8},{(7,-3)/9}}
    \node[nodo] (\name) at \pos {$\name$};
\foreach \ini/ \fin in {2/4,4/1,5/6,6/7,7/8,9/5}
    \path[draw,flechas] (\ini) to[bend right=25] (\fin);
\foreach \ini/ \fin in {1/2,2/1,2/3,3/1,4/8,8/4}
    \path[draw,flechas] (\ini) to[bend left=25] (\fin);
\foreach \ini/ \fin in {6/8,8/9,9/6}
    \path[draw,flechas] (\ini) to[bend right=10] (\fin);
\end{tikzpicture}
{%\small
Un modelo natural simple consiste en suponer que un visitante de una página web escoge al azar uno de los enlaces que se le ofrecen para continuar navegando.}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 4  %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-8);}
\node[anchor=west,text width=7.3cm,inner sep=0pt,align=flush left] at (-.35,-1)
    {Supongamos que en cada unidad de tiempo, los visitantes se reparten equitativamente entre los diferentes enlaces.};
{\tikzset{xshift=8.6cm,yshift=-1.4cm}
    \foreach \pos/\name in {{(90:1)/1},{(-30:.8)/2},{(180:.8)/3}}
        \node[nodo] (\name) at \pos {$\name$};
    \path[draw,flechas] (1) to[bend left=20] node[right,masrojo,font=\tiny] {$1$} (2);
    \path[draw,flechas] (2) to[bend left=20] node[below left=-2pt,masrojo,font=\tiny] {$1/2$} (1);
    \path[draw,flechas] (2) to[bend left=20] node[below,masrojo,font=\tiny] {$1/2$} (3);
    \path[draw,flechas] (3) to[bend left=20] node[above left=-2pt,masrojo,font=\tiny] {$1$} (1);
}
\node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-2.2)
    {Asignando un número de visitantes a cada página,};
%%%%%%%%%%%%%%%%
\only<1>{%
    \foreach \x/\t/\a/\b/\c in {.7/0/120/120/120,3.3/1/180/120/60,6.3/4/150/150/60,9.3/6/150/135/75}{
\tikzset{xshift=\x cm,yshift=-4cm}
    \draw[colortema1,fill=white] (-1,-1.2) rectangle (1,1.2);
    \node[nodo] (1) at (90:.9) {$1$}; \node[blue,font=\tiny] at ($(1)+(.5,0)$) {\a};
    \node[nodo] (2) at (-30:.7) {$2$}; \node[blue,font=\tiny,inner sep=0pt] at ($(2)+(.1,-.35)$) {\b};
    \node[nodo] (3) at (180:.7) {$3$}; \node[blue,font=\tiny,inner sep=0pt] at ($(3)+(0,-.35)$) {\c};
    \foreach \ini/ \fin in {1/2,2/1,2/3,3/1}
        \path[draw,flechas] (\ini) to[bend left=20] (\fin);
    \node[font=\footnotesize] at (0,-1) {T=\t};
}}%
\only<2>{%
    \foreach \x/\t/\a/\b/\c in {.7/0/{1/3}/{1/3}/{1/3},3.3/1/{1/2}/{1/3}/{1/6},6.3/4/{5/12}/{5/12}/{1/6},9.3/6/{5/12}/{3/8}/{5/24}}{
\tikzset{xshift=\x cm,yshift=-4cm}
    \draw[colortema1,fill=white] (-1,-1.2) rectangle (1,1.2);
    \node[nodo] (1) at (90:.9) {$1$}; \node[blue,font=\tiny] at ($(1)+(.5,0)$) {\a};
    \node[nodo] (2) at (-30:.7) {$2$}; \node[blue,font=\tiny,inner sep=0pt] at ($(2)+(.1,-.35)$) {\b};
    \node[nodo] (3) at (180:.7) {$3$}; \node[blue,font=\tiny,inner sep=0pt] at ($(3)+(0,-.35)$) {\c};
    \foreach \ini/ \fin in {1/2,2/1,2/3,3/1}
        \path[draw,flechas] (\ini) to[bend left=20] (\fin);
    \node[font=\footnotesize] at (0,-1) {T=\t};%
}}
%%%%%%%%%%%%%%%%%
\draw[->] (1.7,-4) -- (2.3,-4);
\draw[->] (4.3,-4) -- (4.5,-4) (5,-4) -- (5.3,-4);
\draw[thick,dotted] (4.5,-4) -- (5,-4);
\draw[->] (7.3,-4) -- (7.5,-4) (8,-4) -- (8.3,-4);
\draw[thick,dotted] (7.5,-4) -- (8,-4);
%%%%%%%%%%%%%%%%%
\node[anchor=south west,inner sep=0pt,font=\small] at (6.8,-6)
    {\emph{distribución límite}};
\draw[->] (10,-5.2) to[out=270,in=0] (9.4,-6.2) -- (6.55,-6.2);
\only<1>{%
    \node[rectangle,rounded corners,draw=colortema1,fill=white,line width=.5pt,text width=2.8cm,align=center] at (5,-6)
        {$(144,144,72)$};
}
\only<2>{%
    \node[rectangle,rounded corners,draw=colortema1,fill=white,line width=.5pt,text width=2.8cm,align=center] at (5,-6)
        {$(2/5,2/5,1/5)$};
    \node[text width=9cm,inner sep=0pt,align=flush center] at (5,-7.2)
        {\structure{¿Es éste un sistema adecuado para ordenar la importancia de las páginas web?}};
}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 5  %
%%%%%%%%%%%%
\begin{frame}
\vskip10pt
Si uno de los vértices no tiene ninguna importancia, por ejemplo
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-2.5);}
\node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-1) {};
{\tikzset{xshift=1.5cm,yshift=-1.5cm}
    \foreach \pos/\name in {{(90:1)/1},{(-20:1)/2},{(200:1)/3}}
        \node[nodo] (\name) at \pos {$\name$};
    \foreach \ini/ \fin in {1/2,2/3,3/2}
        \path[draw,flechas] (\ini) to[bend left=15] (\fin);%
}
\node[font=\small] at (6,-1.25)
    {\begin{tabular}{lll}
        paso 0 &$\to$& $(1/3,1/3,1/3)$
        \\
        paso 1 &$\to$& $(0,2/3,1/3)$
        \\
        paso 2 &$\to$& $(0,1/3,2/3)$
        \\
        paso 3 &$\to$& $(0,2/3,1/3)$
        \\
        paso 4 &$\to$& $(0,1/3,2/3)$
    \end{tabular}};
\end{tikzpicture}
la probabilidad inicial asignada al vértice irrelevante se va transmitiendo periódicamente y la simulación no converge.
\vskip10pt

Si la detenemos en un paso impar nos parecerá que \tikz[anchor=base,baseline] \node[nodo]{2}; es el doble de importante que \tikz[anchor=base,baseline] \node[nodo]{1};, mientras que si la detenemos en un paso par, sacaremos la conclusión contraria.

\vskip10pt

\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,1);}
\node[text width=10cm,align=center] at (5,.5) 
    {\structure{¿Por qué ocurre esto? ¿Cómo remediar este tipo de situaciones conservando el espíritu del modelo?}};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 6  %
%%%%%%%%%%%%
\begin{frame}{La teoría}
\vskip-10pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-2);}
\node[anchor=north] at (5,0) 
    {\structure{Cadenas de Markov}};
\begin{scope}[node distance=.2cm and .8cm]
    \node[text width=2cm,inner sep=0pt,align=center,font=\small] (I) at (1,-1)
        {Irreducible};
    \node[right=of I,font=\footnotesize] (I2)
        {Todas las partes de la red son alcanzables.};
    \node[below=of I,text width=2cm,inner sep=0pt,align=center,font=\small] (R)
        {Regular};
    \node[right=of R,font=\footnotesize] (R2)
        {Irreducible especificando un número de pasos.};
\end{scope}
\foreach \x in {I,R}
    \draw[->,thick,shorten >=10pt] (\x.east) -- (\x2.west);
\end{tikzpicture}

\begin{miblock}
\sl \small Para cadenas de Markov finitas regulares, la sucesión $\big\{(\pi_n)\}_{n=0}^\infty$ de vectores de probabilidades en el paso~$n$ converge a la única distribución estacionaria.
En particular, el límite no depende de la distribución inicial.
\end{miblock}
{\color{azul2} \small Añadiendo enlaces imaginarios ``débiles'' de probabilidad $\epsilon$ que unen los nodos no conectados, la cadena se vuelve regular.}
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-2.6);}
{\tikzset{xshift=1.8cm,yshift=-1.7cm}
    \foreach \pos/\name in {{(90:1)/1},{(-20:1)/2},{(200:1)/3}}
        \node[nodo] (\name) at \pos {$\name$};
    \foreach \ini/ \fin in {2/3,3/2}
        \path[draw,flechas] (\ini) to[bend left=15] (\fin);
    \foreach \ini/ \fin in {2/1,3/1}
        \path[draw,flechas,dashed] (\ini) to[bend left=15] (\fin);
    \path[draw,flechas] (1) to[bend left=15] node[pos=.5,right,masrojo,font=\tiny] {$1-2\epsilon$} (2);
    \path[draw,flechas,dashed] (1) to[bend left=15] node[pos=.5,right,masrojo,font=\footnotesize] {$\epsilon$} (3);
    \path[draw,dashed,blue,>=latex,line width=.8pt] (1) edge[out=115,in=65,loop] node[pos=.3,left,masrojo,font=\footnotesize] {$\epsilon$} (1);
    \path[draw,dashed,blue,>=latex,line width=.8pt] (2) edge[out=-20,in=-70,loop] (2);
    \path[draw,dashed,blue,>=latex,line width=.8pt] (3) edge[out=250,in=200,loop] (3);%
}
\node[anchor=west,text width=6cm,inner sep=0pt,font=\small,align=left] at (4,-.4)
    {En el ejemplo, la distribución límite es};
\node[rectangle,rounded corners,draw=colortema1,fill=white,line width=.5pt,font=\small] at (7,-1.3)
    {$\displaystyle{\Big(\epsilon,\frac{1-2\epsilon}{2-3\epsilon},\frac{1-3\epsilon+3\epsilon^2}{2-3\epsilon}\Big)}$};
\node[anchor=west,text width=6cm,inner sep=0pt,font=\small,align=left] at (4,-2.3)
    {que tiende a $(0,1/2,1/2)$ si $\epsilon\to 0^+$.};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 7  %
%%%%%%%%%%%%
\begin{frame}{La práctica}
El algoritmo fue patentado en 2001 por uno de los fundadores de la empresa Google.

\begin{itemize}
\item Esta empresa afirma que su buscador indexa $N>10^{12}$ páginas.

{\small \color{azul2!80!black} $\rightsquigarrow$ Teóricamente esto llevaría a considerar más de $10^{24}$ enlaces.}

\item Como las probabilidades siempre suman uno, basta hacer la simulación con los enlaces reales y multiplicar en cada paso los resultados por $1-N\epsilon$ y sumarles $\epsilon$.

{\small \color{azul2!80!black} $\rightsquigarrow$ Según los informes,  se toma $\epsilon={0.15}/{N}$, se realizan entre 50 y 100 iteraciones en la simulación
y se llevan a cabo actualizaciones más o menos mensuales.}
\end{itemize}
\end{frame}
%%%%%%%%%%
\section{TAC}
%%%%%%%%%%%%
% SLIDE 8  %
%%%%%%%%%%%%
\begin{frame}
\vfill
\begin{tcolorbox}[enhanced,center,width=8.5cm,boxsep=10pt,halign=center,%
                  fontupper=\Large,colupper=colortema2!70!black,%
                  colback=white,colframe=colortema2!70!black,%
                  sharp corners=downhill,leftrule=5pt,rightrule=5pt,drop fuzzy shadow=colortema2!70!black]
TAC: tomografía axial computarizada
\end{tcolorbox}
\vfill
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 9  %
%%%%%%%%%%%%
\begin{frame}{El modelo}
\vskip-10pt
Tenemos una barra metálica maciza homogénea y queremos saber si tiene alguna imperfección en su fabricación.
\begin{tikzpicture}[>=latex]
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-5);}
\node[anchor=west,text width=6cm,inner sep=0pt,align=flush left] at (4,-2)
    {Con una máquina de rayos~X, basta tomar una radiografía.
    \\[5pt]
    Cualquier mancha que veamos es señal de una imperfección.};
\node[text width=10.6cm,inner sep=0pt,align=flush center] at (5,-4.5)
    {\structure{¿Podemos ser más precisos con más radiografías y averiguar su situación y forma o ver variaciones suaves de la densidad?}};
{\tikzset{xshift=2cm,yshift=-.8cm}
    \fill [white] ellipse [x radius=1, y radius=1/3];
    \path [left color=black!50,right color=black!50,middle color=black!25] (-1+.05,-2.6) arc (180:360:1-.05 and 1/3-.05*1/3) -- cycle;
    \path [top color=black!25,bottom color=white] (0,.05*1/3) ellipse [x radius=1-.05,y radius=1/3-.05*1/3];
    \path [left color=black!25,right color=black!25,middle color=white] (-1,0) -- (-1,-2.5) arc (180:360:1 and 1/3)        -- (1,0) arc (360:180:1 and 1/3);
    \foreach \r in {225,315} \foreach \i [evaluate = {\s=30;}] in {0,2,...,30}
        \fill [black, fill opacity=1/50] (0,0) -- (\r+\s-\i:1 and 1/3) -- ++(0,-2.5) arc (\r+\s-\i:\r-\s+\i:1 and 1/3) -- ++(0,2.5) -- cycle;
    \foreach \r in {45,135} \foreach \i [evaluate = {\s=30;}] in {0,2,...,30}
        \fill [black, fill opacity=1/50] (0,0) -- (\r+\s-\i:1 and 1/3) arc (\r+\s-\i:\r-\s+\i:1 and 1/3)  -- cycle;%
}
\end{tikzpicture}
{\small La cuestión es equivalente a saber si podemos deducir la estructura de un cuerpo traslúcido a partir de sus sombras.}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 10 %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-8);}
\node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-.4)
    {Consideramos una región no homogénea de densidad superficial~$\rho$};
%%%%%%%%%%%%%%%%%
\begin{scope}[>=latex,scale=.9,xshift=1.5cm,yshift=-2cm]
    \fill[colortema2!50] circle [radius=1cm];
    \fill[white] circle [radius=.05cm];
    \fill[white] (0,.5) circle [radius=.2cm];
    \foreach \f in {-1,-.8,...,1} \draw[->] (\f,1) -- (\f,-1);
    \fill[shade,left color=black!50,right color=black!50,middle color=black] (-1,-1.1) -- (1,-1.1) -- (1,-1.4) -- (-1,-1.4) -- cycle;
    \fill[white,opacity=.3] (-.05,-1.1) rectangle (.05,-1.4);
    \fill[white,opacity=.3] (-.2,-1.1) rectangle (.2,-1.4);
\end{scope}
\begin{scope}[>=latex,scale=.9,xshift=5.5cm,yshift=-2cm]
    \fill[colortema2!50] circle [radius=1cm];
    \fill[white] circle [radius=.05cm];
    \fill[white] (0,.5) circle [radius=.2cm];
    \foreach \f in {-1,-.8,...,1} \draw[->,rotate=-90] (\f,1) -- (\f,-1);
    \fill[shade,left color=black!50,right color=black!50,middle color=black,shading angle=0] (-1.1,1) -- (-1.1,-1) -- (-1.4,-1) -- (-1.4,1) -- cycle;
    \fill[white,opacity=.3,rotate=-90] (-.05,-1.1) rectangle (.05,-1.4);
    \fill[white,opacity=.3,rotate=-90] (-.7,-1.1) rectangle (-.3,-1.4);
\end{scope}
\begin{scope}[>=latex,scale=.9,xshift=9cm,yshift=-2cm]
    \fill[colortema2!50] circle [radius=1cm];
    \fill[white] circle [radius=.05cm];
    \fill[white] (0,.5) circle [radius=.2cm];
    \foreach \f in {-1,-.8,...,1} \draw[->,rotate=45] (\f,1) -- (\f,-1);
    \fill[shade,left color=black!50,right color=black!50,middle color=black,shading angle=0] (.07,-1.48) -- (1.48,-.07) -- (1.7,-.28) -- (.28,-1.7) -- cycle;
    \fill[white,opacity=.3,rotate=45] (-.05,-1.1) rectangle (.05,-1.4);
    \fill[white,opacity=.3,rotate=45] (.7,-1.1) rectangle (.3,-1.4);
\end{scope}
%%%%%%%%%%%%%%%%%
\node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-3.5)
    {Cada rayo sufre una atenuación medible que depende de};
\node[rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt,text width=9cm,inner sep=1pt,align=flush center,font=\small] at (5,-4.5)
    {$\displaystyle{P_\alpha(t)=\int_{r_{\alpha,t}}\rho}$ \qquad con $r_{\alpha,t}\equiv x\cos\alpha+y\sen\alpha = t$};
\only<1>{
    \node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-5.8)
        {Lo que buscamos es un método que permita recuperar $\rho$ a partir de las funciones $P_\alpha$ para $0\le \alpha<2\pi$. };
}
\only<2>{%
    \begin{scope}[xshift=1cm,yshift=-6.5cm]
        \fill[colortema2!50] circle [radius=1cm];
        \fill[fondo] circle [radius=.05cm];
        \fill[fondo] (0,.5) circle [radius=.2cm];
        \draw[step=.075cm] (-1,-1) grid (1,1);
    \end{scope}
    \node[anchor=south,inner sep=0pt,font=\footnotesize,azul2!80!black] at (1,-8) 
        {$N\times N$ píxeles};
    \node[anchor=north west,text width=7.5cm,inner sep=0pt,align=flush left,font=\small] at (2.7,-5.5)
        {{\color{Plum}Variante discreta.} $x_i=$\;densidad en el $i$-ésimo píxel};
    \node[anchor=north west,text width=7.5cm,inner sep=0pt,align=flush left,font=\small] at (2.7,-6.2)
        {Para cada $t$ y $\alpha$, \quad $P_\alpha(t)$ $\to$ ecuación lineal};
    \node[rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt,anchor=west,text width=7cm,align=flush center,font=\small] at (2.7,-7.1)
        {$A\vec{x}=\vec{b}$ \quad con $A\in\mathcal{M}_{L\times N^2}(\R)$,\quad $L\gg N^2$};
    \node[anchor=south,inner sep=0pt,font=\small] at (6,-8)
        {Muy dispersa $\approx$ $N$\;incógnitas/ecuación};%
}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 11 %
%%%%%%%%%%%%
\begin{frame}{La teoría}
\vskip-13pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-4.6);}
\only<1>{
    \node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left,Plum] at (-.35,-.3)
        {Método continuo.};
    \node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-1)
        {La posibilidad de recuperar $\rho$ a partir de $P_\alpha(t)$ está basada en la fórmula de inversión de la transformada de Fourier:};
    \node[rectangle,rounded corners,fill=white,draw=colortema2,line width=.5pt,font=\small] at (5,-2.5)
        {$\displaystyle{f(x,y)= \int_{\R^2} \widehat{f}(\xi,\eta) e^{2\pi i(x\xi+y\eta)} d\xi d\eta}$};
    \node[anchor=south west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-4)
        {donde $\displaystyle{\widehat{f}(\xi,\eta) = \int_{\R^2} f(x,y) e^{-2\pi i(x\xi+y\eta)} dx dy.}$};
}
\only<2>{
    \node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left,Plum] at (-.35,-.3)
        {Método discreto.};
    \node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-1.5)
        {\textbf{Problema técnico}: si queremos una resolución $1000\times 1000$, tenemos $10^6$~incógnitas y el método de eliminación de Gauss requeriría del orden de $10^{18}$ operaciones si el número de ecuaciones iguala al de incógnitas.};
    \node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-3)
        {\textbf{Problema teórico}: el sistema está sobredeterminado y entonces errores infinitesimales debidos a deficiencias en el modelo o a la toma de datos, lo convertirán en incompatible.};
    \node[anchor=south,text width=10.6cm,inner sep=0pt,align=flush center] at (5,-4.6)
        {\structure{¿Cómo resolver un sistema lineal sin solución?}};
}
\end{tikzpicture}
\visible<1>{%
    \begin{miblock}
    \small
    \sl Si $\rho\in C^\infty_0$ entonces se obtiene a partir de $P_\alpha(t)$ por medio de la fórmula
    \setlength{\abovedisplayskip}{3pt}
    \setlength{\belowdisplayskip}{3pt}
    \[
    \rho(x,y)=
    \iiint_\Omega
    rP_\alpha(t)
    \cos\big(2\pi r(x\cos\theta+y\sen\theta-t)\big)d\theta dr dt
    \]
    con $\Omega = [0,2\pi] \times\R^+\times\R$.
    \end{miblock}
}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 12 %
%%%%%%%%%%%%
\begin{frame}
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-2);}
\node at (5,-.5) 
    {\structure{Algoritmo de Kaczmarz}};
\node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-1)
    {Proyectamos sucesivamente sobre cada uno de los hiperplanos que definen las ecuaciones, partiendo de un punto inicial arbitrario.};
\end{tikzpicture}

\only<1>{%
    \begin{tikzpicture}
    \invisible{\draw[step=1cm,help lines] (-0.35,.2) grid (10.35,-3.6);}
    \node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,0)
        {Para dos incógnitas las iteraciones se acercan a puntos que son ``casi soluciones'' cuando se tiene un sistema incompatible que es ``casi compatible determinado''.};
    \draw[rounded corners,fill=white,draw=colortema2,line width=1pt] (-.3,-1.3) rectangle (10.3,-3.5);%
    \node[anchor=east] at (5,-2.3)
        {\includegraphics[width=4.9cm]{./images/kaczmarz.eps}};
    \node[anchor=west] at (5,-2.3)
        {\includegraphics[width=4.9cm]{./images/kaczmarz2.eps}};
    \node[font=\tiny] at (2.5,-3.3)
        {Tres ecuaciones, dos incógnitas};
    \node[font=\tiny] at (7.5,-3.3)
        {Detalle de las iteraciones en la zona central};
    \end{tikzpicture}%
}
\only<2>{%
\vskip7pt
    \begin{miblock}
        \sl \small
        {\sf (Needell)} Las iteraciones $\vec{x}_k$ al aplicar el algoritmo de Kaczmarz aleatorio a un sistema incompatible satisfacen
        \setlength{\abovedisplayskip}{5pt}
        \setlength{\belowdisplayskip}{5pt}
        \[
        \mathbb{E}\|\vec{x}_k-\vec{s}\|\le \big(1-M^{-2}S^{-2}\big)^{k/2}\|\vec{x}_0-\vec{s}\|+\gamma MS,
        \quad
        \left\{\begin{array}{ll}
        M=\inf\frac{\|\vec{x}\|}{\|A\vec{x}\|}
        \\
        S= \Big(\sum |a_{ij}|^2\Big)^{1/2}
        \end{array}\right.
        \]
        donde la esperanza es relativa a la elección de los hiperplanos.
    \end{miblock}
\vskip8pt}
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-1);}
\node[rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt,minimum height=.7cm,font=\small] (S1) at (2,-.5)
    {$A\vec{x}=\vec{b}$};
\node[rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt,minimum height=.7cm,font=\small] (S2) at (7,-.5)
    {$A\vec{x}=\vec{c}$\quad con solución $\vec{x}=\vec{s}$};
\draw[->,colortema1,decorate,decoration=snake] (S1) -- (S2);
\end{tikzpicture}
{\small Llamemos $\gamma$ a una cota superior de $|b_i-c_{i}|/\|\vec{f}_i\|$, con $\vec{f}_i$ la fila $i$-ésima.

{\footnotesize Es conveniente elegir los hiperplanos con probabilidad proporcional a $\|\vec{f}_i\|$.}}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 13 %
%%%%%%%%%%%%
\begin{frame}{La práctica}

{\color{Plum} Método continuo.} La hipótesis $\rho\in C^\infty_0$ no es realista por ejemplo en el cuerpo humano y la falta de regularidad causa complicaciones en la aplicación del análisis de Fourier (fenómeno de Gibbs).

{\small \color{azul2!80!black} $\rightsquigarrow$ Desde los resultados de J.~Radon hasta que las TAC formaron parte de la práctica médica habitual, pasaron más de 60 años.}

\medskip

{\color{Plum} Método discreto.} La dificultad práctica consiste en trabajar con grandes volúmenes de datos y tratarlos estadísticamente.

\pause
{\small
\begin{itemize}
\item[$\blacktriangleright$] \emph{Tomografía de emisión de positrones} (PET). Detecta la radiación que aparece en forma de rayos gamma cuando un isótopo radiactivo decae por desintegración beta.
\item[$\blacktriangleright$] \emph{Resonancia magnética nuclear} (NMR). Utiliza fenómenos oscilatorios relacionados con el espín de los núcleos de hidrógeno.
\end{itemize}}
\end{frame}
%%%%%%%%%%
\section{Codificación y compresión}
%%%%%%%%%%%%
% SLIDE 14 %
%%%%%%%%%%%%
\begin{frame}
\vfill
\begin{tcolorbox}[enhanced,center,width=8.5cm,boxsep=10pt,halign=center,%
                  fontupper=\Large,colupper=colortema2!70!black,%
                  colback=white,colframe=colortema2!70!black,%
                  sharp corners=downhill,leftrule=5pt,rightrule=5pt,drop fuzzy shadow=colortema2!70!black]
Codificación y compresión
\end{tcolorbox}
\vfill
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 15 %
%%%%%%%%%%%%
\begin{frame}{El modelo}
\vskip-10pt

Cuando tecleamos un texto en un ordenador, internamente las letras se codifican en bytes.

\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,.35) grid (10.35,-6);}
\begin{scope}[xshift=3cm,yshift=-.2cm,node distance=1pt and 2cm]
    \node(a) {\texttt{M}}; \node [right=of a] (ca) {\texttt{01001101}};
    \node[below=of a] (b) {\texttt{U}}; \node [right=of b] (cb) {\texttt{01010101}};
    \node[below=of b] (c) {\texttt{R}}; \node [right=of c] (cc) {\texttt{01010010}};
    \node[below=of c] (d) {\texttt{C}}; \node [right=of d] (cd) {\texttt{01000011}};
    \node[below=of d] (e) {\texttt{I}}; \node [right=of e] (ce) {\texttt{01001001}};
    \node[below=of e] (f) {\texttt{A}}; \node [right=of f] (cf) {\texttt{01000001}};
    \path (a) -- node[midway,above,font=\footnotesize] {(ASCII)} (ca);
\end{scope}
\foreach \x in {a,b,c,d,e,f}
    \draw[->,thick,shorten >=10pt,shorten <=10pt] (\x.east) -- (c\x.west);
\node[minimum width=20pt,minimum height=20pt,fill=white] (A) at (.25,-3.75)
    {\texttt{U}};
\tcbvignette{over node=A,size=3pt,raised color=gray}
\node[minimum width=20pt,minimum height=20pt,fill=white] (m) at (1.25,-3.75)
    {\texttt{M}};
\tcbvignette{over node=m,size=3pt,raised color=gray}
\node[anchor=west,text width=8cm,inner sep=0pt,align=flush left] at (2,-3.75)
    {Supongamos que tenemos un fichero muy grande compuesto solo por \texttt{M}'s y \texttt{U}'s.};
\node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-4.9)
    {Si lo codificamos con $\texttt{M}\mapsto\texttt{0}$ y $\texttt{U}\mapsto\texttt{1}$, entonces un texto de longitud $L$ ocupará $L$ bits.};
\node[anchor=south,text width=10cm,align=center] at (5,-6)
    {\structure{¿Se puede hacer mejor?}};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 16 %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-8);}
\node[minimum width=20pt,minimum height=20pt,fill=white] (A) at (.25,-.5) {\texttt{M}};
    \tcbvignette{over node=A,size=3pt,raised color=gray}
\node[minimum width=20pt,minimum height=20pt,fill=white] (m) at (.25,-1.5) {\texttt{U}};
    \tcbvignette{over node=m,size=3pt,raised color=gray}
\node[anchor=west,text width=8cm,align=flush left] at (1,-1)
    {Si aproximadamente el $75\%$ de las veces aparece una \texttt{M} y el resto una \texttt{U}, independientemente, podemos codificar pares de símbolos mediante:};
\begin{scope}[node distance=2pt and 2cm]
    \node[anchor=north east] (aa) at (4,-2) {\texttt{MM}}; \node [right=of aa] (caa) {\texttt{0}};
    \node[below=of aa] (am) {\texttt{MU}}; \node [right=of am] (cam) {\texttt{10}};
    \node[below=of am] (ma) {\texttt{UM}}; \node [right=of ma] (cma) {\texttt{110}};
    \node[below=of ma] (mm) {\texttt{UU}}; \node [right=of mm] (cmm) {\texttt{111}};
    \foreach \x in {aa,am,ma,mm}
        \draw[->,thick,shorten >=10pt,shorten <=10pt] (\x.east) -- (c\x.west);
\end{scope}
\only<1>{
    \draw[rounded corners,fill=white,draw=colortema2,line width=1pt] (1,-5) rectangle (9,-6);%
    \node[anchor=east] (frase) at (4,-5.5) {\texttt{UM{\color{gray}MM}UU{\color{gray}MM}MM}};
    \node[node distance=2cm,right=of frase] (cod) {\texttt{110{\color{gray}0}111{\color{gray}0}0}};
    \draw[->,thick,shorten >=7pt,shorten <=7pt,colortema2] (frase.east) -- (cod.west);
    \node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-7)
        {Es fácil, pero no trivial, comprobar que nunca hay ambigüedades al descodificar.};
}
\only<2>{
    \begin{scope}[font=\footnotesize,masrojo,>=latex]
        \node[left=of aa] (p1) {$9/16$}; \node[left=of mm] (p3) {$1/16$};
        \node (p2) at ($(p1)!0.5!(p3)$) {$3/16$};
        \draw[->] (p1) -- (aa); \draw[->] (p2) -- (am); \draw[->] (p2) -- (ma); \draw[->] (p3) -- (mm);
    \end{scope}
    \node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-4.5)
        {La longitud media que ocupará un par de símbolos tras la codificación es};
    \node[rectangle,rounded corners,fill=white,draw=colortema2,line width=.5pt] at (5,-5.3)
        {$\ell_2=1\cdot \frac{9}{16}+2\cdot \frac{3}{16}+3\cdot \frac{3}{16}+3\cdot \frac{1}{16}=\frac{27}{16}$};
    \node[anchor=west,text width=10.7cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-6.3)
        {Un texto de longitud $L$ ocupará en media $L\ell_2/2=0.84375 L$ bits tras la codificación.};
    \node[text width=10cm,inner sep=0pt,align=center] at (5,-7.5) {\structure{Sabiendo la estadística de los símbolos que lo componen, ¿hasta dónde y cómo se puede comprimir un fichero?}};
}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%
% SLIDE 17 %
%%%%%%%%%%%%
\begin{frame}{La teoría}
\vskip-5pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-1.5);}
\node[anchor=west] at (-.35,-.5)
    {\structure{Alfabeto:}};
\node[rectangle,rounded corners,draw=colortema2,line width=.5pt] at (5,-.5)
    {$\mathcal{A}=\{s_1,s_2,\dots, s_n\}$};
\node[anchor=north,font=\small] at (5,-1)
    {con probabilidades (independientes) $p_i$, $\sum p_i=1$};
\end{tikzpicture}
Una codificación es una forma de transformar los $s_i$ en tiras de bits que no den lugar a ambigüedades al descodificar cadenas.
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,.9) grid (10.35,-.9);}
\node[anchor=west] at (-.35,0)
    {\structure{Entropía:}};
\node[rectangle,rounded corners,draw=colortema2,line width=.5pt,font=\small] at (5,0)
    {$\displaystyle{H = H(p_1,\dots, p_n)=-\sum_{i=1}^n p_i\log_2 p_i}$};
\only<1>{%
    \node[anchor=north,inner sep=0pt,font=\small] at (5,-1.2)
        {Entropía$\;\approx\;$0 $\to$ poca incertidumbre};
    \node[anchor=west,text width=10.7cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-2.6)
        {Esta definición la introdujo C.E. Shannon en su famoso artículo de 1948 ``{\sl A mathematical theory of communication}'', donde también introduce la palabra ``bit''.};
}
\end{tikzpicture}
\only<2>{%
    \begin{miblock}
        \small Suponiendo independencia, para la codificación que minimiza la tasa media $r$ de bits por símbolo cuando se agrupan de $N$ en $N$, se verifica
        \setlength{\abovedisplayskip}{2pt}
        \setlength{\belowdisplayskip}{2pt}
        \[
        H\le r<H+\frac 1N.
        \]
        En particular $r$ tiende a $H$ cuando $N\to\infty$.
    \end{miblock}
\vskip7pt}
\end{frame}
%%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 18 %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,1) grid (10.35,-5.5);}
\node[Plum] at (5,.5) 
    {Método LZ78};
\node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,0)
    {Se descompone la cadena en \emph{frases}, donde una frase es una subcadena que añade un carácter nuevo a otra que haya aparecido antes.};
\only<1>{%
    \node[rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt] at (5,-1.2)
        {\texttt{salsa\textvisiblespace salada}};%
}
\only<2->{%
    \node[rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt] at (5,-1.2)
        {$\texttt{|s|a|l|sa|\textvisiblespace |sal|ad|a\#|}$};
    \node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small] at (-.35,-1.7)
        {La división en frases se corresponde a un {\sl diccionario}, cuya entrada $k$ es la $k$-ésima frase y añadimos la entrada $0$ con la cadena vacía.};
    \node at (5,-3.1)
        {$\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
        \hline
        0&1&2&3&4&5&6&7&8\\
        \hline
        $\emptyset$ & \texttt{s} & \texttt{a} & \texttt{l} & \texttt{sa} & \texttt{\textvisiblespace} & \texttt{sal} & \texttt{ad} & \texttt{a\#}\\
        \hline
        \end{tabular}$};
    \node at (3,-4.2) {Codificación:};
    \node[anchor=south west,inner sep=2pt,font=\footnotesize,azul2] (1) at (5,-4.2)
        {último carácter};
    \node[anchor=north west,inner sep=2pt,font=\footnotesize,azul2] (2) at (5,-4.2)
        {lugar en el diccionario al quitarlo};
    \draw[->,azul2] (1) -| (4.3,-4.6);
    \draw[->,azul2] (2) -| (4.7,-4.6);
    \node[anchor=south,rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt] at (5,-5.4)
        {$(\texttt{s},0), (\texttt{a},0), (\texttt{l},0), (\texttt{a},1), (\texttt{\textvisiblespace},0), (\texttt{l},4), (\texttt{d},2), (\texttt{\#},2)$};
}
\end{tikzpicture}
\visible<2>{%
    \begin{miblock}
        \sl Sea $\mathcal{L}_N$ la longitud media para bloques de longitud $N$ con LZ78, suponiendo independencia, entonces    $\mathcal{L}_N/N\to H$ para $N\to\infty$.
    \end{miblock}%
}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 19 %
%%%%%%%%%%%%
\begin{frame}{La práctica}
\vskip-13pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,.5) grid (10.35,-7);}
\node[anchor=west] at (-.35,-.5)
    {\structure{Alfabeto:}};
\node[anchor=west] at (-.35,-2)
    {\structure{Entropía:}};
\draw[colortema2,->,thick] (4.4,0) -- (4.4,-2.5);
\only<1>{%
    \node[rectangle,rounded corners,draw=colortema2,line width=.5pt] at (3,-.5)
        {$\mathcal{A}=\{\texttt{M},\texttt{U}\}$};
    \node[anchor=north east,font=\small] at (4,-1)
        {con probabilidades $1/2$};
    \node[rectangle,rounded corners,draw=colortema2,line width=.5pt] at (3,-2)
        {$H=1$};
    \node[anchor=west,text width=5.7cm,inner sep=0pt,align=flush left] at (4.7,-1.2)
        {Lo mejor que se puede hacer es la codificación trivial $\texttt{M}\mapsto\texttt{0}$ y
$\texttt{U}\mapsto\texttt{1}$, con la que un texto de longitud $L$ ocupará $L$ bits.};
    \node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-3)
        {Sin embargo estos compresores generales dan un rendimiento del orden de un $30\%$ peor. Por ejemplo, con $10^6$ caracteres se tiene:};
    \node (1) at (1,-4.5) {\texttt{gzip}}; \node at (3.5,-4.5) (b1) {1272544 bits};
    \node (2) at (6,-4.5) {\texttt{zip}}; \node at (8.5,-4.5)(b2) {1273680 bits};
    \node (3) at (1,-5.2) {\texttt{bzip2}}; \node at (3.5,-5.2) (b3) {1281704 bits};
    \node (4) at (6,-5.2) {\texttt{rar}}; \node at (8.5,-5.2) (b4) {1291960 bits};
    \foreach \x in {1,2,3,4}
        \draw[azul2!80!black,>=latex,->,thick] (\x.east) -- (b\x.west);
}
\only<2>{%
    \node[rectangle,rounded corners,draw=colortema2,line width=.5pt] at (3,-.5)
        {\emph{Español}};
    \node[rectangle,rounded corners,draw=colortema2,line width=.5pt] at (3,-2)
        {$H\approx 4.09$};
    \node[anchor=west,text width=5.7cm,inner sep=0pt,align=flush left] at (4.7,-1.2)
        {Debemos esperar que $L$ caracteres en español no se compriman más allá de $4.09L$ bits.};
    \node[anchor=north west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-3)
        {Para el texto de \emph{La regenta} de 1869610 caracteres, el límite serían 7646705 bits, sin embargo los resultados experimentales son:};
    \node (1) at (1,-4.5) {\texttt{gzip}}; \node at (3.5,-4.5) (b1) {5840976 bits};
    \node (2) at (6,-4.5) {\texttt{zip}}; \node at (8.5,-4.5)(b2) {5842112 bits};
    \node (3) at (1,-5.2) {\texttt{bzip2}}; \node at (3.5,-5.2) (b3) {4273320 bits};
    \node (4) at (6,-5.2) {\texttt{rar}}; \node at (8.5,-5.2) (b4) {4874552 bits};
    \foreach \x in {1,2,3,4}
        \draw[azul2!80!black,>=latex,->,thick] (\x.east) -- (b\x.west);
    \node[anchor=south west,text width=10.6cm,inner sep=0pt,align=flush left,font=\small,azul2!80!black] at (-.35,-7)
        {$\rightsquigarrow$ La paradoja se explica porque en el cálculo teórico de las longitudes medias se supone la independencia de los caracteres de las palabras y eso está lejos de la realidad en un texto.};%
}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
\section{Horarios}
%%%%%%%%%%%%
% SLIDE 20 %
%%%%%%%%%%%%
\begin{frame}
\vfill
\begin{tcolorbox}[enhanced,center,width=8.5cm,boxsep=10pt,halign=center,%
                  fontupper=\Large,colupper=colortema2!70!black,%
                  colback=white,colframe=colortema2!70!black,%
                  sharp corners=downhill,leftrule=5pt,rightrule=5pt,drop fuzzy shadow=colortema2!70!black]
El problema de los horarios
\end{tcolorbox}
\vfill
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 21 %
%%%%%%%%%%%%
\begin{frame}{El modelo}
\vskip-13pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,.5) grid (10.35,-7);}
\begin{scope}[xshift=3.2cm,yshift=-4cm]
    \foreach \ang/\name in {0/M1,72/M2,144/M3,216/M4,288/M5}
        \node[vert] (\name) at (\ang:1) {\name};
    \foreach \ini/ \fin in {M1/M2,M2/M3,M3/M4,M4/M5,M5/M1,M2/M5}
        \path[draw,blue,line width=.8pt] (\ini) to[bend right=5] (\fin);
\end{scope}
\begin{scope}[xshift=6.5cm,yshift=-4cm]
    \foreach \ang/\name in {60/I1,150/I2,240/I3,330/I4}
        \node[vert] (\name) at (\ang:1) {\name};
    \foreach \ini/ \fin in {I1/I2,I2/I3,I3/I4,I4/I1}
        \path[draw,blue,line width=.8pt] (\ini) to[bend right=5] (\fin);
\end{scope}
\only<1>{%
    \node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-1.2)
        {Queremos decidir la existencia de un horario al especificar ciertas incompatibilidades y, en caso de que exista, contar el número de posibilidades.
        \\[5pt]
        Supongamos que hay alumnos que han escogido simultáneamente algunas asignaturas.};
    \node[anchor=west,text width=2cm,align=center,font=\footnotesize] at (-.35,-4)
        {\structure{Matemáticas}\\[5pt]
        $\texttt{M1}\cap\texttt{M2}\cap\texttt{M5}$\\
        $\texttt{M2}\cap\texttt{M3}$\\
        $\texttt{M3}\cap\texttt{M4}$\\
        $\texttt{M4}\cap\texttt{M5}$};
    \node[anchor=east,text width=2cm,align=center,font=\footnotesize] at (10.35,-4)
        {\structure{Informática}\\[5pt]
        $\texttt{I1}\cap\texttt{I2}$\\
        $\texttt{I2}\cap\texttt{I3}$\\
        $\texttt{I3}\cap\texttt{I4}$\\
        $\texttt{I4}\cap\texttt{I1}$};
    \node[text width=8cm,align=center] at (5,-6) {\structure{Si disponemos de 5 horas lectivas\\ ¿cuántos horarios se pueden hacer?}};
}
\only<2->{%
    \foreach \x in {1,2,3,4,5} \foreach \y in {1,2,3,4}
        \path[draw,blue,line width=.65pt,opacity=.5] (M\x) to[bend left=20] (I\y);
}
\only<2>{%
    \node[anchor=west,text width=10.7cm,inner sep=0pt,align=flush left] at (-.35,-1.5)
        {Debido al doble grado informática-matemáticas, el decanato impone que no deben coincidir asignaturas de matemáticas e informática, entonces se añaden muchas incompatibilidades.};
    \node[text width=10cm,align=center] at (5,-6)
        {\structure{¿Es todavía posible impartir los cursos en 5 horas lectivas?\\ ¿de cuántas formas?}};%
}
\only<3>{%
    \node[anchor=west,text width=10.6cm,inner sep=0pt,align=flush left] at (-.35,-1)
        {A cada hora posible del horario se le asocia un color. Una \textbf{coloración del grafo} es una forma de asignar colores a los vértices de manera que los vértices conectados por aristas tengan colores diferentes.
        \\[5pt]
        Por ejemplo, un horario para las cinco horas lectivas podría ser:};%
    \foreach \pos/\h/\col in {{(1.5,-5.8)/0/masrojo},{(1.5,-6.5)/1/Dandelion},{(4,-5.8)/2/LimeGreen},{(4,-6.5)/3/blue},{(6.5,-5.8)/4/Plum}}
        \node[circle,minimum size=8pt,inner sep=0pt,fill=\col,label=right:{\footnotesize 1\h:00-1\h:50}] at \pos {};
    \foreach \x/\col in {M1/masrojo,M2/LimeGreen,M3/Dandelion,M4/LimeGreen,M5/Dandelion,I1/blue,I2/Plum,I3/blue,I4/Plum}
        \node[circle,minimum size=12pt,inner sep=0pt,font=\tiny,fill=\col,opacity=.5] at (\x) {};
}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 22 %
%%%%%%%%%%%%
\begin{frame}{La teoría}
\begin{miblock}
    \sl \small Para cada grafo $G$ de $n$ vértices, existe un polinomio $P_G$ de grado $n$ tal que el número de formas de colorear los vértices con $k$ colores es $P_G(k)$. Además, para cada arista $a$ de $G$ se cumple
    \setlength{\abovedisplayskip}{3pt}
    \setlength{\belowdisplayskip}{3pt}
    \[
    P_G=P_{G-a}-P_{G_a}
    \]
    donde $G-a$ es el grafo que resulta al eliminar la arista $a$  y $G_a$  el que resulta al colapsarla en un punto identificando los vértices de sus extremos.
\end{miblock}

Hay grafos para los que el \emph{polinomio cromático} $P_G$ sencillo:
\begin{center}\small
    \begin{tabular}{ll}
        $P_G=x(x-1)^{n-1}$ &si $G$ es un árbol\\
        $P_G=(x-1)^{n}+(-1)^{n}(x-1)$ &si $G$ es el $n$-ágono\\
        $P_G=x(x-1)(x-2)\cdots (x-n+1)$ &si $G$ es el grafo completo $K_n$
    \end{tabular}
\end{center}

\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 23 %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{tikzpicture}[line width=.8pt]
\invisible{\draw[step=1cm,help lines] (-0.35,1) grid (10.35,-7);}
\node[anchor=north] at (5,1) 
    {\structure{Horario de matemáticas}};
\begin{scope}[xshift=1.4cm,yshift=-1.5cm]
    \node[anchor=east,font=\small] at (-.8,0) {$G=$};
    \foreach \ang/\name in {0/M1,72/M2,144/M3,216/M4,288/M5}
        \node[punto] (\name) at (\ang:.7) {};
    \foreach \ini/ \fin in {M1/M2,M2/M3,M3/M4,M4/M5,M5/M1}
        \path[draw,blue] (\ini) to[bend right=5] (\fin);
    \path[draw,masrojo] (M2) to[bend right=5] node[right=-2pt,font=\tiny] {$a$} (M5);
\end{scope}
\begin{scope}[xshift=5cm,yshift=-.5cm]
    \node[anchor=east,font=\small] at (-.8,0) {$G-a=$};
    \foreach \ang/\name in {0/M1,72/M2,144/M3,216/M4,288/M5}
        \node[punto] (\name) at (\ang:.7) {};
    \foreach \ini/ \fin in {M1/M2,M2/M3,M3/M4,M4/M5,M5/M1}
        \path[draw,blue] (\ini) to[bend right=5] (\fin);
\only<2>{%
    \node[font=\footnotesize] at (-.5,-1.1)
        {$P_{G-a}=(x-1)^5-x+1$};}
\end{scope}
\begin{scope}[xshift=5cm,yshift=-2.5cm]
    \node[anchor=east,font=\small] at (-.8,0) {$G_a=$};
    \foreach \ang/\name in {0/M1,144/M3,216/M4,288/M5}
        \node[punto] (\name) at (\ang:.7) {};
    \foreach \ini/ \fin in {M3/M4,M3/M5,M4/M5}
        \path[draw,blue] (\ini) to[bend right=5] (\fin);
    \path[draw,masrojo] (M5) to[bend right=5] node[pos=.4,right=-2pt,font=\tiny] {$b$} (M1);
\only<2>{%
    \node[font=\footnotesize] at (-.5,-1.1)
        {$P_{G_a}=x(x-1)^2(x-2)$};}
\end{scope}
\begin{scope}[xshift=9cm,yshift=-1.5cm]
    \node[anchor=east,font=\small] at (-.8,0) {$G_a-b=$};
    \foreach \ang/\name in {0/M1,144/M3,216/M4,288/M5}
        \node[punto] (\name) at (\ang:.7) {};
    \foreach \ini/ \fin in {M3/M4,M3/M5,M4/M5}
        \path[draw,blue] (\ini) to[bend right=5] (\fin);
    \node[font=\footnotesize] at (-.5,-1.1)
        {$P_{G_a-b}=xP_{G_{a,b}}$};
\end{scope}
\begin{scope}[xshift=9cm,yshift=-3.5cm]
    \node[anchor=east,font=\small] at (-.8,0) {$G_{a,b}=$};
    \foreach \ang/\name in {144/M3,216/M4,288/M5}
        \node[punto] (\name) at (\ang:.7) {};
    \foreach \ini/ \fin in {M3/M4,M3/M5,M4/M5}
        \path[draw,blue] (\ini) to[bend right=5] (\fin);
    \node[font=\footnotesize] at (-.5,-1.1)
        {$P_{G_{a,b}}=x(x-1)(x-2)$};
\end{scope}
\draw[thick,decorate,decoration={brace,amplitude=5pt},colortema2] (2.6,-3) -- (2.6,0);
\draw[thick,decorate,decoration={brace,amplitude=5pt},colortema2] (6.65,-4) -- (6.65,-1);
\only<2>{%
    \node[font=\small,rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt] (PG) at (5,-5.5) 
        {$P_G= x(x-1)(x-2)(x^2-3x+3)$};
    \node[anchor=south west,text width=3cm,font=\footnotesize,azul2!80!black] at (-.35,-7)
        {$P_G(1)=P_G(2)=0$\\[2pt]$P_G(3)=18$};
    \node[anchor=south east,text width=7.3cm,align=flush left,font=\small] at (10.35,-7)
        {Se necesitan al menos 3 horas, dando lugar a 18 horarios posibles {\footnotesize($3=18/3!$ salvo permutaciones)}};}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 24 %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{miblock}
    \sl \small Sea $G$ un grafo y sean $G_1$ y $G_2$ subgrafos suyos.
    \begin{itemize}\setlength{\itemsep}{1pt}
    \item
    Si $G=G_1\cup G_2$ con unión disjunta, $P_G=P_{G_1}P_{G_2}$.
    \item
    Si $G=G_1\cup G_2$ y $G_1\cap G_2=K_n$, $P_G=P_{G_1}P_{G_2}/P_{K_n}$.
    \item
    Si $G$ se obtiene uniendo todos los vértices de $G_1$ con los de $G_2$, escribiendo $P_{G_i}=\sum_j a_{ij}P_{K_j}$ se cumple $P_G=\sum_k\sum_j a_{1j}a_{2j}P_{K_{j+k}}$.
    \end{itemize}
\end{miblock}

\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-0.35,0) grid (10.35,-5);}
\node[font=\small,azul2!80!black] at (.8,-.5) 
    {Matemáticas};
\node[anchor=west,font=\small,rectangle,rounded corners,draw=colortema2,line width=.5pt] at (2,-.5)
    {$x(x-1)(x-2)(x^2-3x+3)=P_{K_5}+4P_{K_4}+3P_{K_3}$};
\node[font=\small,azul2!80!black] at (.8,-1.5) 
    {Informática};
\node[anchor=west,font=\small,rectangle,rounded corners,draw=colortema2,line width=.5pt] at (2,-1.5)
    {$(x-1)^4+x-1 = P_{K_4}+2P_{K_3}+P_{K_2}$};
\node[anchor=west,text width=10.3cm,align=flush left,font=\small] at (-.35,-2.5)
    {La  última propiedad da para el grafo total:};
\node[anchor=north,font=\footnotesize,rectangle,rounded corners,fill=white,draw=colortema1,line width=.5pt] at (5,-3)
    {$\begin{aligned}
    P_G &=P_{K_9} + 6P_{K_8} + 12P_{K_7} + 10P_{K_6} + 3P_{K_5}\\
        &=x(x-1)(x-2)(x-3)(x-4)(x^4 - 20x^3 + 155x^2 - 546x + 733)
    \end{aligned}$};
\node[anchor=south west,text width=10.3cm,align=flush left,font=\small] at (-.35,-5)
    {Como es lógico, $P_G(5)/5!$ vuelve a salir $3$.};
\end{tikzpicture}

\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 25 %
%%%%%%%%%%%%
\begin{frame}{La práctica}
El gran problema es que el algoritmo no es muy eficiente cuando el número de vértices crece.

\begin{itemize}
\item El tiempo de computación utilizando el algoritmo sin atajos es del orden de $\varphi^{s}$ donde~$\varphi$ es la razón áurea y $s$ es la suma de vértices y aristas.

{\small \color{azul2!80!black} $\rightsquigarrow$ Parece ser que a lo más que se ha llegado es a conseguir tiempos exponenciales en el número de vértices.}

\item Por otra parte, se conocen algunos resultados negativos que dan pocas esperanzas para que un nuevo algoritmo mágico nos sorprenda.

{\small \color{azul2!80!black} $\rightsquigarrow$ Es lo que se llama un problema \emph{NP-hard}.}
\end{itemize}

En definitiva, el algoritmo es práctico para pocos vértices o cuando hay simetrías o propiedades especiales.
\end{frame}
%%%%%%%%%%
\setbeamertemplate{headline}{
\leavevmode
\begin{beamercolorbox}[wd=\the\paperwidth,ht=0ex,dp=0ex]{section in head/foot}
  \begin{tikzpicture}
    \useasboundingbox[fill=colortema1](0,0) rectangle (\the\paperwidth,0.5cm);
    \fill[fondo!5!white] (0,0) rectangle (\the\paperwidth,-0.1);
    \node[anchor=north west,font=\sffamily\bfseries\tiny] at (0.5,0.45){};%
  \end{tikzpicture}
\end{beamercolorbox}
\vskip-17pt}
%%%%%%%%%%%%
% SLIDE 26 %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-.35,0) grid (10.35,-8);}
    \node[anchor=west,text width=10cm,align=left] at (0,-2.5)
        {Colgaré esta presentación en:};
    \draw[azul2] (-.35,-3.5) -- (10.35,-3.5);
    \node[azul2!80!black,font=\large] at (5,-4)
        {\url{https://www.uam.es/fernando.chamizo}};
    \draw[azul2] (-.35,-4.5) -- (10.35,-4.5);
    \node at (5,-7)
        {\bf Gracias por la atención};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
\end{document}
%%%%%%%%%%%%
% SLIDE 27 %
%%%%%%%%%%%%
\begin{frame}
\vfill
\begin{tcolorbox}[enhanced,center,width=8.5cm,boxsep=10pt,halign=center,%
                  fontupper=\Large,colupper=colortema2!70!black,%
                  colback=white,colframe=colortema2!70!black,%
                  sharp corners=downhill,leftrule=5pt,rightrule=5pt,drop fuzzy shadow=colortema2!70!black]
Bonus track
\end{tcolorbox}
\vfill
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 28 %
%%%%%%%%%%%%
\begin{frame}
\vskip-15pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-.35,0) grid (10.35,-8);}

\draw[colortema1] (-.35,.05) rectangle (5.2,-4.2) (5.3,.05) rectangle (10.35,-5.6) (5.3,-5.7) rectangle (10.35,-8.25) (-.35,-4.3) rectangle (5.2,-8.25);

\imgs[anchor=north west,fill=white]{width=3cm}{./images/p3_patent_pagerank}{(-.25,0)}{0}
\imgs[anchor=north west,fill=white]{height=1.5cm}{./images/Google_web_search}{(2.7,-1.5)}{-10}
\imgs[anchor=north west,fill=white]{height=1.5cm}{./images/Google1998}{(2,-1)}{10}


\imgs[anchor=north west,fill=colortema2]{height=2.5cm}{./images/resonancia}{(5.4,0)}{0}
\imgs[anchor=north west,fill=colortema2]{height=2.5cm}{./images/TAC_PET}{(6.9,-2.8)}{0}
\imgs[fill=black]{height=2cm}{./images/PET-image}{(5.7,-5)}{10}
\imgs[fill=black]{width=2cm}{./images/resonancia_rodilla}{(9.2,0)}{350}

\imgs[anchor=north west,fill=black!80]{height=2cm}{./images/winzip}{(-.25,-4.35)}{0}
\imgs{height=2.5cm}{./images/MP3}{(4.9,-5.3)}{-10}
\imgs[anchor=south west,fill=colortema2]{height=2cm}{./images/bulletstorm}{(1.2,-8)}{0}

\imgs[anchor=south west,fill=colortema2]{height=2cm}{./images/movil_antena}{(5.4,-8)}{0}
\imgs[anchor=south east,fill=white]{height=2cm}{./images/movil_celdas}{(10.25,-8)}{0}
\end{tikzpicture}
\end{frame}
%%%%%%%%%%
%%%%%%%%%%%%
% SLIDE 29 %
%%%%%%%%%%%%
\begin{frame}
\vskip12.5pt
\begin{tikzpicture}
\invisible{\draw[step=1cm,help lines] (-.35,0) grid (10.35,-8);}

\imgs[anchor=north west,fill=colortema2]{width=2.5cm}{./images/bulletstorm}{(0,-2.5)}{0}
\imgs[anchor=south west,fill=black]{height=3.5cm}{./images/bust_credits1}{(3.3,-3.8)}{0}
\imgs[anchor=north west,fill=black]{height=3.5cm}{./images/bust2_credits}{(3.3,-4.2)}{0}

\end{tikzpicture}
\end{frame}
\end{document}
