Newer
Older
Lecture_repo / Lectures_my / MC_2016 / Lecture11 / mchrzasz.tex
@mchrzasz mchrzasz on 3 Jun 2016 24 KB updated everything
\documentclass[11 pt,xcolor={dvipsnames,svgnames,x11names,table}]{beamer}

\usepackage[english]{babel} 
\usepackage{polski}         
\usepackage[skins,theorems]{tcolorbox}
\tcbset{highlight math style={enhanced,
  colframe=red,colback=white,arc=0pt,boxrule=1pt}}

\usetheme[
	bullet=circle,		% Other option: square
	bigpagenumber,		% circled page number on lower right
	topline=true,			% colored bar at the top of the frame 
	shadow=false,			% Shading for beamer blocks
	watermark=BG_lower,	% png file for the watermark
	]{Flip}

%\logo{\kern+1.em\includegraphics[height=1cm]{SHiP-3_LightCharcoal}}
                            

\usepackage[lf]{berenis}
\usepackage[LY1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{emerald}
\usefonttheme{professionalfonts}
\usepackage[no-math]{fontspec}	
\usepackage{listings}
\defaultfontfeatures{Mapping=tex-text}	% This seems to be important for mapping glyphs properly

\setmainfont{Gillius ADF}			% Beamer ignores "main font" in favor of sans font
\setsansfont{Gillius ADF}			% This is the font that beamer will use by default
% \setmainfont{Gill Sans Light}		% Prettier, but harder to read

\setbeamerfont{title}{family=\fontspec{Gillius ADF}}

\input t1augie.fd

%\newcommand{\handwriting}{\fontspec{augie}} % From Emerald City, free font
%\newcommand{\handwriting}{\usefont{T1}{fau}{m}{n}} % From Emerald City, free font
% \newcommand{\handwriting}{}	% If you prefer no special handwriting font or don't have augie

%% Gill Sans doesn't look very nice when boldfaced
%% This is a hack to use Helvetica instead
%% Usage: \textbf{\forbold some stuff}
%\newcommand{\forbold}{\fontspec{Arial}}

\usepackage{graphicx}
\usepackage[export]{adjustbox}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{colortbl}
\usepackage{mathrsfs} 			% For Weinberg-esque letters
\usepackage{cancel}				% For "SUSY-breaking" symbol
\usepackage{slashed}            % for slashed characters in math mode
\usepackage{bbm}                % for \mathbbm{1} (unit matrix)
\usepackage{amsthm}				% For theorem environment
\usepackage{multirow}			% For multi row cells in table
\usepackage{arydshln} 			% For dashed lines in arrays and tables
\usepackage{siunitx}
\usepackage{xhfill}
\usepackage{grffile}
\usepackage{textpos}
\usepackage{subfigure}
\usepackage{tikz}
\usepackage{hyperref}
\newcommand*{\Scale}[2][4]{\scalebox{#1}{$#2$}}%
\newcommand*{\Resize}[2]{\resizebox{#1}{!}{$#2$}}%


%\usepackage{hepparticles}    
\usepackage[italic]{hepparticles}     

\usepackage{hepnicenames} 

% Drawing a line
\tikzstyle{lw} = [line width=20pt]
\newcommand{\topline}{%
  \tikz[remember picture,overlay] {%
    \draw[crimsonred] ([yshift=-23.5pt]current page.north west)
             -- ([yshift=-23.5pt,xshift=\paperwidth]current page.north west);}}



% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\usepackage{tikzfeynman}		% For Feynman diagrams
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{trees}
\usetikzlibrary{matrix,arrows} 				% For commutative diagram
% http://www.felixl.de/commu.pdf
\usetikzlibrary{positioning}				% For "above of=" commands
\usetikzlibrary{calc,through}				% For coordinates
\usetikzlibrary{decorations.pathreplacing}  % For curly braces
% http://www.math.ucla.edu/~getreuer/tikz.html
\usepackage{pgffor}							% For repeating patterns

\usetikzlibrary{decorations.pathmorphing}	% For Feynman Diagrams
\usetikzlibrary{decorations.markings}
\tikzset{
	% >=stealth', %%  Uncomment for more conventional arrows
	vector/.style={decorate, decoration={snake}, draw},
	provector/.style={decorate, decoration={snake,amplitude=2.5pt}, draw},
	antivector/.style={decorate, decoration={snake,amplitude=-2.5pt}, draw},
	fermion/.style={draw=gray, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=gray]{>}}}},
	fermionbar/.style={draw=gray, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=gray]{<}}}},
	fermionnoarrow/.style={draw=gray},
	gluon/.style={decorate, draw=black,
		decoration={coil,amplitude=4pt, segment length=5pt}},
	scalar/.style={dashed,draw=black, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
	scalarbar/.style={dashed,draw=black, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=black]{<}}}},
	scalarnoarrow/.style={dashed,draw=black},
	electron/.style={draw=black, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
	bigvector/.style={decorate, decoration={snake,amplitude=4pt}, draw},
}

% TIKZ - for block diagrams, 
% from http://www.texample.net/tikz/examples/control-system-principles/
% \usetikzlibrary{shapes,arrows}
\tikzstyle{block} = [draw, rectangle, 
minimum height=3em, minimum width=6em]




\usetikzlibrary{backgrounds}
\usetikzlibrary{mindmap,trees}	% For mind map
\newcommand{\degree}{\ensuremath{^\circ}}
\newcommand{\E}{\mathrm{E}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand\Ts{\rule{0pt}{2.6ex}}       % Top strut
\newcommand\Bs{\rule[-1.2ex]{0pt}{0pt}} % Bottom strut

\graphicspath{{images/}}	% Put all images in this directory. Avoids clutter.

% SOME COMMANDS THAT I FIND HANDY
% \renewcommand{\tilde}{\widetilde} % dinky tildes look silly, dosn't work with fontspec
%\newcommand{\comment}[1]{\textcolor{comment}{\footnotesize{#1}\normalsize}} % comment mild
%\newcommand{\Comment}[1]{\textcolor{Comment}{\footnotesize{#1}\normalsize}} % comment bold
%\newcommand{\COMMENT}[1]{\textcolor{COMMENT}{\footnotesize{#1}\normalsize}} % comment crazy bold
\newcommand{\Alert}[1]{\textcolor{Alert}{#1}} % louder alert
\newcommand{\ALERT}[1]{\textcolor{ALERT}{#1}} % loudest alert
%% "\alert" is already a beamer pre-defined

\def\Put(#1,#2)#3{\leavevmode\makebox(0,0){\put(#1,#2){#3}}}

\usepackage{gmp}
\usepackage[final]{feynmp-auto}

\usepackage[backend=bibtex,style=numeric-comp,firstinits=true]{biblatex}
\bibliography{bib}
\setbeamertemplate{bibliography item}[text]

\makeatletter\let\frametextheight\beamer@frametextheight\makeatother

% suppress frame numbering for backup slides
% you always need the appendix for this!
\newcommand{\backupbegin}{
	\newcounter{framenumberappendix}
	\setcounter{framenumberappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
	\addtocounter{framenumberappendix}{-\value{framenumber}}
	\addtocounter{framenumber}{\value{framenumberappendix}} 
}


\definecolor{links}{HTML}{2A1B81}
%\hypersetup{colorlinks,linkcolor=,urlcolor=links}

% For shapo's formulas:

% For shapo's formulas:
\def\lsi{\raise0.3ex\hbox{$<$\kern-0.75em\raise-1.1ex\hbox{$\sim$}}}
\def\gsi{\raise0.3ex\hbox{$>$\kern-0.75em\raise-1.1ex\hbox{$\sim$}}}
\newcommand{\lsim}{\mathop{\lsi}}
\newcommand{\gsim}{\mathop{\gsi}}
\newcommand{\wt}{\widetilde}
%\newcommand{\ol}{\overline}
\newcommand{\Tr}{\rm{Tr}}
\newcommand{\tr}{\rm{tr}}
\newcommand{\eqn}[1]{&\hspace{-0.7em}#1\hspace{-0.7em}&}
\newcommand{\vev}[1]{\rm{$\langle #1 \rangle$}}
\newcommand{\abs}[1]{\rm{$\left| #1 \right|$}}
\newcommand{\eV}{\rm{eV}}
\newcommand{\keV}{\rm{keV}}
\newcommand{\GeV}{\rm{GeV}}
\newcommand{\im}{\rm{Im}}
\newcommand{\disp}{\displaystyle}
\def\be{\begin{equation}}
\def\ee{\end{equation}}
\def\ba{\begin{eqnarray}}
\def\ea{\end{eqnarray}}
\def\d{\partial}
\def\l{\left(}
\def\r{\right)}
\def\la{\langle}
\def\ra{\rangle}
\def\e{{\rm e}}
\def\Br{{\rm Br}}
\def\fixme{{\color{red} FIXME!}}
\def\mc{{\color{Magenta}{MC}}}
\def\pdf{{\rm p.d.f.}}
\def\cdf{{\rm c.d.f.}}
\def\ARROW{{\color{JungleGreen}{$\Rrightarrow$}}\xspace}  
\def\ARROWR{{\color{WildStrawberry}{$\Rrightarrow$}}\xspace}  

\author{ {\fontspec{Trebuchet MS}Marcin Chrz\k{a}szcz} (Universit\"{a}t Z\"{u}rich)}
\institute{UZH}
\title[Specific \pdf~generation]{Specific \pdf~generation}
\date{\fixme}
\newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}%
\newcommand*{\QEDB}{\hfill\ensuremath{\square}}%

\author{ {\fontspec{Trebuchet MS}Marcin Chrz\k{a}szcz} (Universit\"{a}t Z\"{u}rich)}
\institute{UZH}
\title[Integral equations, eigenvalue, function interpolation]{Integral equations, eigenvalue, function interpolation}
\date{\fixme}


\begin{document}
\tikzstyle{every picture}+=[remember picture]

{
\setbeamertemplate{sidebar right}{\llap{\includegraphics[width=\paperwidth,height=\paperheight]{bubble2}}}
\begin{frame}[c]%{\phantom{title page}} 
\begin{center}
\begin{center}
	\begin{columns}
		\begin{column}{0.9\textwidth}
			\flushright\fontspec{Trebuchet MS}\bfseries \Huge {Integral equations, eigenvalue, function interpolation}
		\end{column}
		\begin{column}{0.2\textwidth}
		  %\includegraphics[width=\textwidth]{SHiP-2}
		\end{column}
	\end{columns}
\end{center}
	\quad
	\vspace{3em}
\begin{columns}
\begin{column}{0.44\textwidth}
\flushright \vspace{-1.8em} {\fontspec{Trebuchet MS} \Large Marcin ChrzÄ…szcz\\\vspace{-0.1em}\small \href{mailto:mchrzasz@cern.ch}{mchrzasz@cern.ch}}

\end{column}
\begin{column}{0.53\textwidth}
\includegraphics[height=1.3cm]{uzh-transp}
\end{column}
\end{columns}

\vspace{1em}
%		\footnotesize\textcolor{gray}{With N. Serra, B. Storaci\\Thanks to the theory support from M. Shaposhnikov, D. Gorbunov}\normalsize\\
\vspace{0.5em}
	\textcolor{normal text.fg!50!Comment}{Monte Carlo methods, \\ 26 May, 2016}
\end{center}
\end{frame}
}


\begin{frame}\frametitle{Integral equations, introduction}
\begin{minipage}{\textwidth}
%\begin{small}
\ARROW Fredholm integral equation of the second order:
\begin{align*}
\phi(x) = f(x) +  \int_a^b K(x,y) \phi(y) dy 
\end{align*}
\ARROWR The $f$ and $K$ are known functions. $K$ is called kernel.\\
\ARROW The CHALLENGE: find the $\phi$ that obeys the above equations.\\
\ARROW There are NO numerical that can solve this type of equations!\\
\ARROW Different methods have to be used depending on the $f$ and $K$ functions.\\
\ARROWR The MC algorithm: construct a probabilistic algorithm which has an expected value the solution of the above equations. There are many ways to build this!\\
\ARROW We assume that the Neumann series converges!






%\end{small}

\end{minipage}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}\frametitle{Integral equations, approximations}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW The following steps approximate the Fredholm equation:
\begin{align*}
\phi_0(x)=0,~~~~~~~~~~~~~\phi_1(x)=f(x)+\int_a^b K(x,y) \phi_0(y) dy=f(x)
\end{align*}
\begin{align*}
\phi_2(x)=f(x) + \int_a^b K(x,y) \phi_1(y)dy = f(x) + \int_a^b K(x,y) f(y)dy
\end{align*}
\begin{align*}
\Scale[0.75]{\phi_3(x)= f(x)+ \int_a^b K(x,y) dy =  f(x)+\int_a^b K(x,y) f(y) dy  +  \int_a^b \int_a^b K(x,y) K(y,z) f(z) dy dz}
\end{align*}
\ARROW Now we put the following notations:
\begin{align*}
K^{(1)}(x,y)=K(x,y)~~~~~~~~~~~~~~~~K^{(2)}(x,y)= \int_a^b K(x,t)K(t,y) dt
\end{align*}
\ARROW One gets:
\begin{align*}
\phi_3(x)=f(x) + \int_a^b K^{(1)}(x,y) f(y) dy + \int_a^b K^{(2)} (x,y) f(y) dy
\end{align*}

\end{footnotesize}

\end{minipage}

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}\frametitle{Integral equations, approximations}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW Continuing this process:
\begin{align*}
K^{(n)} (x,y) = \int_a^b K(x,t) K^{(n-1)}(t,y) dt
\end{align*}
and the n-th approximation:
\begin{align*}
\phi_n(x) =f(x)+\int_a^b K^{(1)}(x,y) f(y) dy+  \int_a^b K^{(2)}(x,y) f(y) dy+ \\... + \int_a^b K^{(n)}(x,y) f(y) dy
\end{align*}
\ARROW Now going with the Neumann series: $n \to \infty$:
\begin{align*}
\phi(x) = lim_{n\to \infty} \phi_n(x) = f(x) + \sum_{i=1}^n \int_a^b K^{(n)}(x,y) f(y) dy
\end{align*}
\ARROW The above series converges only inside the square: $a \leq x,~y \leq b$ for:
\begin{align*}
\int_a^b \int_a^b \vert K(x,y) \vert^2dx dy < 1
\end{align*}

\end{footnotesize}

\end{minipage}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}\frametitle{Integral equations, algorithm}
\begin{minipage}{\textwidth}
\begin{footnotesize}
\ARROW The random walk of particle happens on the interval $(a,b)$:
\begin{itemize}
\item In the $t=0$ the particle is in the position $x_0=x$. 
\item If the particle at time $t=n-1$ is in the $x_{n-1}$ position then in time $t=n$ the position is: $x_n=x_{n-1}+\xi_n$. The numbers $\xi_1,~\xi_2,...$ are independent random numbers generated from $\rho$ \pdf.
\item The particle stops the walk once it reaches the position $a$ or $b$. 
\item The particle life time is $n$ when $x_n \leq a$ and $x_n \geq b$. 
\item The expected life time is given by the equation:
\begin{align*}
\tau(x)=\rho_1(x)+\int_a^b \left[ 1+ \tau(y) \right] \rho(y-x)dy
\end{align*}
where:
\begin{align*}
\rho_q(x)=\int_{-\infty}^{a-x}\rho(y)dy + \int_{b-x}^{\infty} \rho(y) dy
\end{align*}
is the probability of particle annihilation in the time $t=1$.
\end{itemize}


\end{footnotesize}

\end{minipage}

\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}\frametitle{Integral equations, algorithm 2}
\begin{minipage}{\textwidth}
\begin{footnotesize}
\ARROW The above can be transformed:
\begin{align}
\tau(x) =1 +\int_a^b\tau(y)\rho(x-y)dy
\label{eq1}
\end{align}
\ARROW Now if $p(x)$ is the probability that the particle in time $t=0$ was in position $x$ gets annihilated because it crosses the border $a$.\\
\ARROW The probability obeys the analogous equation:
\begin{align}
p(x)= \rho(x)+\int_a^b p(y)\rho(y-x)dy 
\label{eq2}
\end{align}
where
\begin{align*}
\rho(x)=\int_{-\infty}^{a-x} \rho(y)dy
\end{align*}
is the probability of annihilating the particle in the first walk.\\
\ARROW For the functions $\tau$ and $\rho$ we got the integral Fredholm equation.\\
\ARROW So the above random walk can be be used to solve the Equations~\ref{eq1} and \ref{eq2}.




\end{footnotesize}
\end{minipage}
\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}\frametitle{Integral equations, algorithm 3}
\begin{minipage}{\textwidth}
\begin{footnotesize}
\ARROW The $\rho(x)$ is the \pdf~of random variables $\xi_n$.\\
\ARROW We observe the random walk of the particle. The trajectory: $\gamma=(x_0,x_1,x_2,...,x_n)$. This means for $t=0,1,2...,n-1$ and $x_n \leq a$ or $x_n \geq b$. Additionally we mark: $\gamma_r=(x_0,x_1,...,x_r),~r \leq n$.\\
\ARROW We defined a random variable:
\begin{align*}
S(x)=\sum_{r=1}^n V(\gamma_r) f(x_{r-1})
\end{align*}
where 
\begin{align*}
V(\gamma_0)&=1,\\
V(\gamma_r)&=\frac{K(x_{r-1}, x_r)}{\rho(x_r-x_{r-1})} V(\gamma_{r-1})
\end{align*}
\ARROW One can prove that $E\left[S(x)\right]$ treated as a function of $x$ variable is the solution to the integral equation. 



\end{footnotesize}
\end{minipage}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}\frametitle{Integral equations, algorithm 4}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW We define a new random variable:
\begin{align*}
c_r(x)=\begin{cases}
\frac{V(\gamma_{n-r})f(x_{n-r})}{\rho(x_{n-r})},~~& r \leq n,\\
0,~~&r> n
\end{cases}
\end{align*}
where $\rho_r(x)$ is defined as:
\begin{align*}
\rho_1(x) &= \int_{-\infty}^{a-x} \rho(y)dy + \int_{b-x}^{+\infty}\rho(y)dy,\\
\rho_r(x) &= \int_a^b ... \int_a^b \rho(x_1-x) \rho(x_2-x_1)...\rho(x_{r-1}-x_{r-2})\rho_1(x_{r-1}) dx_1...dx_{r-1}
\end{align*}
is the probability that the particle that is at given time in the $x$ coordinate will survive $r$ moments.\\
\ARROWR  One can prove that $E\left[c_r(x)\right]$ treated as a function of $x$ variable is the solution to the integral equation. 



\end{footnotesize}
\end{minipage}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}\frametitle{Integral equations, general remark}
\begin{minipage}{\textwidth}
\begin{footnotesize}


\begin{alertblock}{There is a general trick:}
Any integral equation can be transformed to linear equation using quadratic form. If done so one can use the algorithms form lecture 8 to solve it. Bullet prove solution!
\end{alertblock}


\end{footnotesize}
\end{minipage}
\end{frame}



\begin{frame}\frametitle{Eigenvalue problem}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW The Eigenvalue problem is to find $\lambda$ that obeys the equation:
\begin{align*}
H \overrightarrow{x} = \lambda \overrightarrow{x}
\end{align*}
\ARROW For simplicity we assume there the biggest Eigenvalue is singular and it's real.\\
\ARROWR The numerical method is basically an iterative procedure to find the biggest Eigenvalue:
\begin{itemize}
\item We choose randomly a vector $\overrightarrow{x}_0$.
\item The $m$ vector we choose accordingly to formula:
\begin{align*}
\overrightarrow{x}_m=H\overrightarrow{x}_{m-1}/\lambda_m
\end{align*}
where $\lambda_m$ is choose such that
\begin{align*}
\sum_{j=1}^n \vert (\overrightarrow{x}_m)_j \vert =1
\end{align*}
the $(\overrightarrow{x})_j$ is the $j$ coordinate of the $\overrightarrow{x}$ vector, $j=1,2,3,...,n$
\end{itemize}

\ARROWR The set $\lambda_m$ is converging to the largest Eigenvalue of the $H$ matrix. 

\end{footnotesize}
\end{minipage}
\end{frame}





\begin{frame}\frametitle{Eigenvalue problem}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW From the above we get:
\begin{align*}
\lambda_1 \lambda_2 ... \lambda_m (\overrightarrow{x}_j) = (H^m \overrightarrow{x}_0)_j;~~~~\lambda_1 \lambda_2 ... \lambda_m = \sum_{j=1}^n (H^m \overrightarrow{x}_0)_j
\end{align*}
\ARROWR For big $k$ and $m>k$ one gets:
\begin{align*}
\frac{\sum_{j=1}^n (H^m \overrightarrow{x}_0)_j  }{\sum_{j=1}^n (H^k \overrightarrow{x}_0)_j} = \lambda_{k+1} \lambda_{k+2} ... \lambda_m \approx \lambda^{m-k}
\end{align*}
from which:
\begin{align*}
\lambda \approx \left[ \frac{\sum_{j=1}^n (H^m \overrightarrow{x}_0)_j  }{\sum_{j=1}^n (H^k \overrightarrow{x}_0)_j} \right]^{\frac{1}{m-k}}
\end{align*}
\ARROW This is the Eigenvalue estimation corresponding to $H^m \overrightarrow{x}_0$ for sufficient large $m$.


\end{footnotesize}
\end{minipage}
\end{frame}





\begin{frame}\frametitle{Eigenvalue problem, probabilistic model}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW Let $Q=(q_{ij})$, $i,j=1,2,...,n$ is the probability matrix:
\begin{align*}
q_{ij} \geq 0,~~~\sum_{j=1}^{n} q_{ij}=1
\end{align*}
\ARROW We construct a random walk on the set: $\lbrace 1,2,.... n \rbrace$ accordingly to the below rules:
\begin{itemize}
\item In the $t=0$ the particle is in a randomly chosen state $i_0$ accordingly to binned \pdf : $p_j$.
\item If in the moment $t=n-1$ the particle is in $i_{n-1}$ state then in the next moment it goes to the state $i_n$ with the probability $q_{i_{n-1} j}$.
\item For $\gamma=(i_0,i_1,...)$ trajectory we define a random variable:
\begin{align*}
W_r(\gamma)= \frac{(\overrightarrow{x})_{i_0}  }{p_{i_0}} \frac{h_{i_1 i_0 } h_{i_2 i_1 } h_{i_3 i_2 } ... h_{i_r i_{r-1} }  }{q_{i_1 i_0 } q_{i_2 i_1 } q_{i_3 i_2 } ... q_{i_r i_{r-1} }  }
\end{align*}
\end{itemize}
\ARROW Now we do: 
\begin{align*}
\frac{E\left[W_m(\gamma) \right] }{ E\left[W_k(\gamma) \right] } \approx \lambda^{m-k}
\end{align*}
\ARROW So to estimate the largest Eigenvalue:
\begin{align*}
\hat{\lambda} = \left[\frac{W_m(\gamma)}{W_k(\gamma)} \right]^{\frac{1}{m-k}}
\end{align*}


\end{footnotesize}
\end{minipage}
\end{frame}



\begin{frame}\frametitle{Function interpolation}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW Lets put $f(x_1)=f_1,~f(x_2)=f_2$, which we know the functions.\\
\ARROW The problem: calculate the $f(p)$ for $x_1<p<x_2$.\\
\ARROW From the interpolation method we get:
\begin{align*}
f(p)= \frac{p-x_1}{x_2-x_1}f_2+\frac{x_2-p}{x_2-x_1}f_1
\end{align*}
\ARROW I am jet-lagged writing this so let me put: $x_1=0$ and $x_2=1$:
\begin{align*}
f(p)=(1-p)f_1 + p f_2
\end{align*}
\ARROW For 2-dim:
\begin{align*}
f(p_1,p_2)= \sum_{\delta} r_1 r_2 f(\delta_1, \delta_2)
\end{align*}
where:
\begin{align*}
r_i=\begin{cases}
1-p_i,~~& \delta_i=0\\
p_i,~~~& \delta_i=1
\end{cases}
\end{align*}
\ARROW the sum is over all pairs (in this case 4).

\end{footnotesize}
\end{minipage}
\end{frame}



\begin{frame}\frametitle{Function interpolation}
\begin{minipage}{\textwidth}
\begin{footnotesize}

\ARROW For n-dim we get a monstrous:
\begin{align*}
f(p_1,p_2,...,p_n)=\sum_{\delta}r_1r_2...r_nf(\delta_1,...,\delta_n)
\end{align*}
the sum is over all combinations $(\delta_1,..., \delta_n)$, where $\delta_i=0,1$. \\
\ARROWR The above sum is over $2^n$ terms and each of it has $(n+1)$ temrs. It's easy to imagine that for large $n$ this is hard... Example $n=50$ then we have $10^{14}$ ingredients.\\
\ARROW There has to be a better way to  do this!\\
\ARROW From construction:
\begin{align*}
0\leq r_1 r_2 ... r_n \leq 1,~~~~~~~~~~~~\sum_{\delta} r_1 r_2... r_n =1
\end{align*}
\ARROW We can treat the $r_i$ as probabilities! We define a random varaible: $\xi=(\xi_1,...,\xi_n)$ such that:
\begin{align*}
\mathcal{P}(\xi_i=0)=1-p_i,~~~~~\mathcal{P}(\xi_i=1)=p_i
\end{align*}
The extrapolation value is then equal:
\begin{align*}
f(p_1,p_2,...,p_n)=E\left[ f(\xi_1,...,\xi_n) \right] 
\end{align*}



\end{footnotesize}
\end{minipage}
\end{frame}






\begin{frame}\frametitle{Travelling Salesman Problem}
\begin{itemize}
\item Salesman starting from his base has to visit $n-1$ other locations and return to base headquarters. The problem is to find the shortest way.
\item For large $n$ the problem can't be solver by brutal force as the complexity of the problem is $(n-1)!$
\item There exist simplified numerical solutions assuming factorizations. Unfortunately even those require anonymous computing power.
\item Can MC help? YES :)
\item The minimum distance $l$ has to depend on 2 factors: $P$ the area of the city the Salesman is travelling and the density of places he wants to visit: $\dfrac{n}{P}$
\item Form this we can assume:
\end{itemize}
\begin{equation}
l \sim P^a (\dfrac{n}{P})^b=P^{a-b}n^b. \nonumber
\end{equation}

\end{frame}


\begin{frame}\frametitle{Traveling Salesman Problem}
\begin{itemize}
\item From dimension analysis:
\end{itemize}
\begin{equation}
a-b=\dfrac{1}{2}. \nonumber
\end{equation}
\begin{itemize}
\item To get $l$ we need square root of area.
\item From this it's obvious:
\end{itemize}
\begin{equation}
l \sim P^a (\dfrac{n}{P})^b=P^{0.5}n^{a-0.5}. \nonumber
\end{equation}
\begin{itemize}
\item Now we can multiply the area by alpha factor that keeps the density constant then:
\end{itemize}
\begin{equation}
l \sim \alpha^{0.5} \alpha^{a-0.5} = \alpha^a \nonumber
\end{equation}
\begin{itemize}
\item In this case the distance between the clients will not change, but the number of clients will increase by $\alpha$ so:
\end{itemize}
\begin{equation}
l \sim \alpha \nonumber
\end{equation}
\begin{itemize}
\item In the end we get: $a=1$
\end{itemize}
\end{frame}



\begin{frame}\frametitle{Traveling Salesman Problem}
\begin{itemize}
\item In total:
\end{itemize}
\begin{equation}
l \sim k (nP)^{0.5}\nonumber
\end{equation}
\begin{itemize}
\item Of course the k depends on the shape of the area and locations of client. However for large $n$ the k starts loosing the dependency. It's an asymptotically free estimator.
\item To use the above formula we need to somehow calculate k.
\item How to estimate this? Well make a TOY MC: take a square put uniformly $n$ points. Then we can calculate $l$. Then it's trivial:
\end{itemize}
\begin{equation}
k= l(nP)^{-0.5} \nonumber
\end{equation}
\end{frame}


\begin{frame}\frametitle{Traveling Salesman Problem}
\begin{itemize}
\item This kind of MC experiment might require large CPU power and time. The adventage is that once we solve the problem we can use the obtained k for other cases (it's universal constant!).
\item It turns out that:
\end{itemize}
\begin{equation}
k \sim \dfrac{3}{4} \nonumber
\end{equation}
\begin{itemize}
\item Ok, but in this case we can calculate $l$ but not the actual shortest way! Why the hell we did this exercise?!
\item Turns out that for most of the problems we are looking for the solution that is close to smallest $l$ not the exact minimum.
\end{itemize}
\end{frame}

\begin{frame}\frametitle{War Games}

\begin{itemize}
\item S. Andersoon 1966 simulated for Swedish government how would a tank battle look like.
\item Each of the sides has  15 tanks. that they allocate on the battle field. 
\item The battle is done in time steps.
\item Each tank has 5 states:
\begin{itemize}
\item OK
\item Tank can only shoot
\item Tank can only move
\item Tank is destroyed
\item Temporary states
\end{itemize}
\item This models made possible to check different fighting strategies.

\end{itemize}
\end{frame}




\backupbegin   

\begin{frame}\frametitle{Backup}


\end{frame}

\backupend			

\end{document}