Newer
Older
Lecture_repo / Lectures_my / MC_2016 / Lecture12 / mchrzasz.tex
  1. \documentclass[11 pt,xcolor={dvipsnames,svgnames,x11names,table}]{beamer}
  2.  
  3. \usepackage[english]{babel}
  4. \usepackage{polski}
  5. \usepackage[skins,theorems]{tcolorbox}
  6. \tcbset{highlight math style={enhanced,
  7. colframe=red,colback=white,arc=0pt,boxrule=1pt}}
  8.  
  9. \usetheme[
  10. bullet=circle, % Other option: square
  11. bigpagenumber, % circled page number on lower right
  12. topline=true, % colored bar at the top of the frame
  13. shadow=false, % Shading for beamer blocks
  14. watermark=BG_lower, % png file for the watermark
  15. ]{Flip}
  16.  
  17. %\logo{\kern+1.em\includegraphics[height=1cm]{SHiP-3_LightCharcoal}}
  18.  
  19. \usepackage[lf]{berenis}
  20. \usepackage[LY1]{fontenc}
  21. \usepackage[utf8]{inputenc}
  22.  
  23. \usepackage{emerald}
  24. \usefonttheme{professionalfonts}
  25. \usepackage[no-math]{fontspec}
  26. \usepackage{listings}
  27. \defaultfontfeatures{Mapping=tex-text} % This seems to be important for mapping glyphs properly
  28.  
  29. \setmainfont{Gillius ADF} % Beamer ignores "main font" in favor of sans font
  30. \setsansfont{Gillius ADF} % This is the font that beamer will use by default
  31. % \setmainfont{Gill Sans Light} % Prettier, but harder to read
  32.  
  33. \setbeamerfont{title}{family=\fontspec{Gillius ADF}}
  34.  
  35. \input t1augie.fd
  36.  
  37. %\newcommand{\handwriting}{\fontspec{augie}} % From Emerald City, free font
  38. %\newcommand{\handwriting}{\usefont{T1}{fau}{m}{n}} % From Emerald City, free font
  39. % \newcommand{\handwriting}{} % If you prefer no special handwriting font or don't have augie
  40.  
  41. %% Gill Sans doesn't look very nice when boldfaced
  42. %% This is a hack to use Helvetica instead
  43. %% Usage: \textbf{\forbold some stuff}
  44. %\newcommand{\forbold}{\fontspec{Arial}}
  45.  
  46. \usepackage{graphicx}
  47. \usepackage[export]{adjustbox}
  48.  
  49. \usepackage{amsmath}
  50. \usepackage{amsfonts}
  51. \usepackage{amssymb}
  52. \usepackage{bm}
  53. \usepackage{colortbl}
  54. \usepackage{mathrsfs} % For Weinberg-esque letters
  55. \usepackage{cancel} % For "SUSY-breaking" symbol
  56. \usepackage{slashed} % for slashed characters in math mode
  57. \usepackage{bbm} % for \mathbbm{1} (unit matrix)
  58. \usepackage{amsthm} % For theorem environment
  59. \usepackage{multirow} % For multi row cells in table
  60. \usepackage{arydshln} % For dashed lines in arrays and tables
  61. \usepackage{siunitx}
  62. \usepackage{xhfill}
  63. \usepackage{grffile}
  64. \usepackage{textpos}
  65. \usepackage{subfigure}
  66. \usepackage{tikz}
  67. \usepackage{hyperref}
  68. %\usepackage{hepparticles}
  69. \usepackage[italic]{hepparticles}
  70.  
  71. \usepackage{hepnicenames}
  72.  
  73. % Drawing a line
  74. \tikzstyle{lw} = [line width=20pt]
  75. \newcommand{\topline}{%
  76. \tikz[remember picture,overlay] {%
  77. \draw[crimsonred] ([yshift=-23.5pt]current page.north west)
  78. -- ([yshift=-23.5pt,xshift=\paperwidth]current page.north west);}}
  79.  
  80.  
  81.  
  82. % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
  83. \usepackage{tikzfeynman} % For Feynman diagrams
  84. \usetikzlibrary{arrows,shapes}
  85. \usetikzlibrary{trees}
  86. \usetikzlibrary{matrix,arrows} % For commutative diagram
  87. % http://www.felixl.de/commu.pdf
  88. \usetikzlibrary{positioning} % For "above of=" commands
  89. \usetikzlibrary{calc,through} % For coordinates
  90. \usetikzlibrary{decorations.pathreplacing} % For curly braces
  91. % http://www.math.ucla.edu/~getreuer/tikz.html
  92. \usepackage{pgffor} % For repeating patterns
  93.  
  94. \usetikzlibrary{decorations.pathmorphing} % For Feynman Diagrams
  95. \usetikzlibrary{decorations.markings}
  96. \tikzset{
  97. % >=stealth', %% Uncomment for more conventional arrows
  98. vector/.style={decorate, decoration={snake}, draw},
  99. provector/.style={decorate, decoration={snake,amplitude=2.5pt}, draw},
  100. antivector/.style={decorate, decoration={snake,amplitude=-2.5pt}, draw},
  101. fermion/.style={draw=gray, postaction={decorate},
  102. decoration={markings,mark=at position .55 with {\arrow[draw=gray]{>}}}},
  103. fermionbar/.style={draw=gray, postaction={decorate},
  104. decoration={markings,mark=at position .55 with {\arrow[draw=gray]{<}}}},
  105. fermionnoarrow/.style={draw=gray},
  106. gluon/.style={decorate, draw=black,
  107. decoration={coil,amplitude=4pt, segment length=5pt}},
  108. scalar/.style={dashed,draw=black, postaction={decorate},
  109. decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
  110. scalarbar/.style={dashed,draw=black, postaction={decorate},
  111. decoration={markings,mark=at position .55 with {\arrow[draw=black]{<}}}},
  112. scalarnoarrow/.style={dashed,draw=black},
  113. electron/.style={draw=black, postaction={decorate},
  114. decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
  115. bigvector/.style={decorate, decoration={snake,amplitude=4pt}, draw},
  116. }
  117.  
  118. % TIKZ - for block diagrams,
  119. % from http://www.texample.net/tikz/examples/control-system-principles/
  120. % \usetikzlibrary{shapes,arrows}
  121. \tikzstyle{block} = [draw, rectangle,
  122. minimum height=3em, minimum width=6em]
  123.  
  124.  
  125.  
  126.  
  127. \usetikzlibrary{backgrounds}
  128. \usetikzlibrary{mindmap,trees} % For mind map
  129. \newcommand{\degree}{\ensuremath{^\circ}}
  130. \newcommand{\E}{\mathrm{E}}
  131. \newcommand{\Var}{\mathrm{Var}}
  132. \newcommand{\Cov}{\mathrm{Cov}}
  133. \newcommand\Ts{\rule{0pt}{2.6ex}} % Top strut
  134. \newcommand\Bs{\rule[-1.2ex]{0pt}{0pt}} % Bottom strut
  135.  
  136. \graphicspath{{images/}} % Put all images in this directory. Avoids clutter.
  137.  
  138. % SOME COMMANDS THAT I FIND HANDY
  139. % \renewcommand{\tilde}{\widetilde} % dinky tildes look silly, dosn't work with fontspec
  140. %\newcommand{\comment}[1]{\textcolor{comment}{\footnotesize{#1}\normalsize}} % comment mild
  141. %\newcommand{\Comment}[1]{\textcolor{Comment}{\footnotesize{#1}\normalsize}} % comment bold
  142. %\newcommand{\COMMENT}[1]{\textcolor{COMMENT}{\footnotesize{#1}\normalsize}} % comment crazy bold
  143. \newcommand{\Alert}[1]{\textcolor{Alert}{#1}} % louder alert
  144. \newcommand{\ALERT}[1]{\textcolor{ALERT}{#1}} % loudest alert
  145. %% "\alert" is already a beamer pre-defined
  146. \newcommand*{\Scale}[2][4]{\scalebox{#1}{$#2$}}%
  147.  
  148. \def\Put(#1,#2)#3{\leavevmode\makebox(0,0){\put(#1,#2){#3}}}
  149.  
  150. \usepackage{gmp}
  151. \usepackage[final]{feynmp-auto}
  152.  
  153. \usepackage[backend=bibtex,style=numeric-comp,firstinits=true]{biblatex}
  154. \bibliography{bib}
  155. \setbeamertemplate{bibliography item}[text]
  156.  
  157. \makeatletter\let\frametextheight\beamer@frametextheight\makeatother
  158.  
  159. % suppress frame numbering for backup slides
  160. % you always need the appendix for this!
  161. \newcommand{\backupbegin}{
  162. \newcounter{framenumberappendix}
  163. \setcounter{framenumberappendix}{\value{framenumber}}
  164. }
  165. \newcommand{\backupend}{
  166. \addtocounter{framenumberappendix}{-\value{framenumber}}
  167. \addtocounter{framenumber}{\value{framenumberappendix}}
  168. }
  169.  
  170.  
  171. \definecolor{links}{HTML}{2A1B81}
  172. %\hypersetup{colorlinks,linkcolor=,urlcolor=links}
  173.  
  174. % For shapo's formulas:
  175.  
  176. % For shapo's formulas:
  177. \def\lsi{\raise0.3ex\hbox{$<$\kern-0.75em\raise-1.1ex\hbox{$\sim$}}}
  178. \def\gsi{\raise0.3ex\hbox{$>$\kern-0.75em\raise-1.1ex\hbox{$\sim$}}}
  179. \newcommand{\lsim}{\mathop{\lsi}}
  180. \newcommand{\gsim}{\mathop{\gsi}}
  181. \newcommand{\wt}{\widetilde}
  182. %\newcommand{\ol}{\overline}
  183. \newcommand{\Tr}{\rm{Tr}}
  184. \newcommand{\tr}{\rm{tr}}
  185. \newcommand{\eqn}[1]{&\hspace{-0.7em}#1\hspace{-0.7em}&}
  186. \newcommand{\vev}[1]{\rm{$\langle #1 \rangle$}}
  187. \newcommand{\abs}[1]{\rm{$\left| #1 \right|$}}
  188. \newcommand{\eV}{\rm{eV}}
  189. \newcommand{\keV}{\rm{keV}}
  190. \newcommand{\GeV}{\rm{GeV}}
  191. \newcommand{\im}{\rm{Im}}
  192. \newcommand{\disp}{\displaystyle}
  193. \def\be{\begin{equation}}
  194. \def\ee{\end{equation}}
  195. \def\ba{\begin{eqnarray}}
  196. \def\ea{\end{eqnarray}}
  197. \def\d{\partial}
  198. \def\l{\left(}
  199. \def\r{\right)}
  200. \def\la{\langle}
  201. \def\ra{\rangle}
  202. \def\e{{\rm e}}
  203. \def\Br{{\rm Br}}
  204. \def\fixme{{\color{red} FIXME!}}
  205. \def\mc{{\color{Magenta}{MC}}}
  206. \def\pdf{{\rm p.d.f.}}
  207. \def\cdf{{\rm c.d.f.}}
  208. \def\ARROW{{\color{JungleGreen}{$\Rrightarrow$}}\xspace}
  209. \def\ARROWR{{\color{WildStrawberry}{$\Rrightarrow$}}\xspace}
  210.  
  211. \author{ {\fontspec{Trebuchet MS}Marcin Chrz\k{a}szcz} (Universit\"{a}t Z\"{u}rich)}
  212. \institute{UZH}
  213. \title[Specific \pdf~generation]{Specific \pdf~generation}
  214. \date{\fixme}
  215. \newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}%
  216. \newcommand*{\QEDB}{\hfill\ensuremath{\square}}%
  217.  
  218. \author{ {\fontspec{Trebuchet MS}Marcin Chrz\k{a}szcz} (Universit\"{a}t Z\"{u}rich)}
  219. \institute{UZH}
  220. \title[Applications of MC methods]{Applications of MC methods}
  221. \date{\fixme}
  222.  
  223.  
  224. \begin{document}
  225. \tikzstyle{every picture}+=[remember picture]
  226.  
  227. {
  228. \setbeamertemplate{sidebar right}{\llap{\includegraphics[width=\paperwidth,height=\paperheight]{bubble2}}}
  229. \begin{frame}[c]%{\phantom{title page}}
  230. \begin{center}
  231. \begin{center}
  232. \begin{columns}
  233. \begin{column}{0.9\textwidth}
  234. \flushright\fontspec{Trebuchet MS}\bfseries \Huge {Applications of MC methods}
  235. \end{column}
  236. \begin{column}{0.2\textwidth}
  237. %\includegraphics[width=\textwidth]{SHiP-2}
  238. \end{column}
  239. \end{columns}
  240. \end{center}
  241. \quad
  242. \vspace{3em}
  243. \begin{columns}
  244. \begin{column}{0.44\textwidth}
  245. \flushright \vspace{-1.8em} {\fontspec{Trebuchet MS} \Large Marcin Chrząszcz\\\vspace{-0.1em}\small \href{mailto:mchrzasz@cern.ch}{mchrzasz@cern.ch}}
  246.  
  247. \end{column}
  248. \begin{column}{0.53\textwidth}
  249. \includegraphics[height=1.3cm]{uzh-transp}
  250. \end{column}
  251. \end{columns}
  252.  
  253. \vspace{1em}
  254. % \footnotesize\textcolor{gray}{With N. Serra, B. Storaci\\Thanks to the theory support from M. Shaposhnikov, D. Gorbunov}\normalsize\\
  255. \vspace{0.5em}
  256. \textcolor{normal text.fg!50!Comment}{Monte Carlo methods, \\ 26 May, 2016}
  257. \end{center}
  258. \end{frame}
  259. }
  260.  
  261.  
  262. \begin{frame}\frametitle{Optimization}
  263. \begin{minipage}{\textwidth}
  264. \begin{exampleblock}{Optimization problem:}
  265. We have a set $X \subset \mathbb{R}^m$ and a function $F : X \to \mathbb{R}$.\\
  266. Task:\\
  267. Find the optimum point:
  268. \begin{align*}
  269. x_{opt} \in X : \forall_{x \in X}~F(x) \geq F(x_{opt})
  270. \end{align*}
  271. \end{exampleblock}
  272. \ARROW This is completely different then normal function minimalization as we choose $x_{opt}$ from a set X. This makes a big differences for numerical computations.\\
  273. \ARROWR The MC algorithms for solving this problem:
  274. \begin{itemize}
  275. \item Hit and miss method - the simplest and the slowest.
  276. \item Sequence methods - MC interpretation of method of further approximations.
  277. \item Genetic methods, stat. optimization.
  278. \end{itemize}
  279.  
  280.  
  281. \end{minipage}
  282.  
  283. \end{frame}
  284.  
  285.  
  286.  
  287.  
  288. \begin{frame}\frametitle{Optimization hit and miss}
  289. \begin{minipage}{\textwidth}
  290. \begin{footnotesize}
  291.  
  292. \ARROWR The algorithm acts as follows:
  293. \begin{itemize}
  294. \item We generate $N$ points $x_1,...,x_N \in X$ from a constant \pdf~on $X$.
  295. \item We calculate the $F$ function value in the points $x_1,...,x_N$:
  296. \begin{align*}
  297. F_1=F(x_1),~~~F_2=F(x_2),~~~...,~~~F_N
  298. \end{align*}
  299. \item We calculate $F^{\ast}=\min \lbrace F_1,F_2,...,F_N \rbrace$.
  300. \item The solution is $x_j: F(x_j)=F^{\ast}$
  301. \end{itemize}
  302. \ARROW Precision:
  303. \begin{exampleblock}{}
  304. If $F^{\ast}=\min_{1\leq j \leq N} \lbrace F(x_j) \rbrace$ where $x_j=1,2,...N$ are random points from uniform \pdf~on $X$. Then with the probability $1-(1-\gamma)^N$ the volume of points $x$ for which $F(x)<F^{\ast}$ is smaller then $\epsilon$.
  305. \end{exampleblock}
  306. \ARROW We can say that with probability $1-(1-\gamma)^N$ the points $x_{opt}$ was localized with the probability $\gamma$. \\
  307. \ARROW the smaller the volume the better the accuracy.
  308.  
  309.  
  310. \end{footnotesize}
  311. \end{minipage}
  312.  
  313. \end{frame}
  314.  
  315.  
  316. \begin{frame}\frametitle{Optimization hit and miss}
  317. \begin{minipage}{\textwidth}
  318. \begin{footnotesize}
  319.  
  320. \ARROWR The algorithm acts as follows:
  321. \begin{itemize}
  322. \item We generate $N$ points $x_1,...,x_N \in X$ from a constant \pdf~on $X$.
  323. \item We calculate the $F$ function value in the points $x_1,...,x_N$:
  324. \begin{align*}
  325. F_1=F(x_1),~~~F_2=F(x_2),~~~...,~~~F_N
  326. \end{align*}
  327. \item We calculate $F^{\ast}=\min \lbrace F_1,F_2,...,F_N \rbrace$.
  328. \item The solution is $x_j: F(x_j)=F^{\ast}$
  329. \end{itemize}
  330. \ARROW Precision:
  331. \begin{exampleblock}{}
  332. If $F^{\ast}=\min_{1\leq j \leq N} \lbrace F(x_j) \rbrace$ where $x_j=1,2,...N$ are random points from uniform \pdf~on $X$. Then with the probability $1-(1-\gamma)^N$ the volume of points $x$ for which $F(x)<F^{\ast}$ is smaller then $\epsilon$.
  333. \end{exampleblock}
  334. \ARROW We can say that with probability $1-(1-\gamma)^N$ the points $x_{opt}$ was localized with the probability $\gamma$. \\
  335. \ARROW the smaller the volume the better the accuracy.
  336.  
  337.  
  338. \end{footnotesize}
  339. \end{minipage}
  340.  
  341. \end{frame}
  342.  
  343.  
  344.  
  345. \begin{frame}\frametitle{Optimization hit and miss}
  346. \begin{minipage}{\textwidth}
  347. \begin{footnotesize}
  348. \begin{center}
  349. The smallest $N$ that obeys: $1-(1-\gamma)^N \geq 1 -\epsilon$:
  350. \includegraphics[width=0.7\textwidth]{images/table.png}
  351. \end{center}
  352. \ARROW Example: $\left[0,1\right]^m$ and $F:X \to \mathbb{R}$.\\
  353. How many points we need to generate to ahve $0.9$ probability to be have half of the range of each direction in each precision:
  354. \begin{itemize}
  355. \item For $m=1$: $\gamma=1/2~\rightarrowtail~N=4$.
  356. \item For $m=2$: $\gamma=1/4\rightarrowtail~N=9$.
  357. \item For $m=14$: $\gamma=2^{-14}\rightarrowtail~N>23~000$.
  358.  
  359. \end{itemize}
  360. \ARROW Inefficient for multi-dimensions.
  361. \end{footnotesize}
  362. \end{minipage}
  363.  
  364. \end{frame}
  365.  
  366.  
  367.  
  368.  
  369.  
  370. \begin{frame}\frametitle{Optimization sequence}
  371. \begin{minipage}{\textwidth}
  372. \begin{footnotesize}
  373.  
  374. \ARROW The algorithm:
  375. \begin{itemize}
  376. \item We choose the starting point $x_1 \in X$ from some \pdf~on $X$ set.
  377. \item After generating $x_1,x_2,...,x_n$ check if some conditions are meet.
  378. \begin{itemize}
  379. \item If YES then we stop and we put $x_n$ as solution.
  380. \item If NO then we generate $x_{n+1}$ form a \pdf~ that depends on already generated points.
  381. \end{itemize}
  382. \end{itemize}
  383.  
  384. \ARROW The basic sequence algorithm:
  385. \begin{itemize}
  386. \item Choose $x_1$.
  387. \item After we have $x_1,x_2,...,x_n$ then we generate a temporary point $\xi_n$:
  388. \begin{align*}
  389. x_{n+1}=\begin{cases}
  390. x_n,~~~~~~~~~~{\rm if}~F(x_n+\xi_n) \geq F(x_n)-\epsilon\\
  391. x_n+\xi_n,~~{\rm if}~F(x_n+\xi_n) < F(x_n)-\epsilon \end{cases}
  392. \end{align*}
  393. \end{itemize}
  394.  
  395.  
  396.  
  397. \end{footnotesize}
  398. \end{minipage}
  399.  
  400. \end{frame}
  401.  
  402.  
  403.  
  404.  
  405. \begin{frame}\frametitle{Optimization sequence}
  406. \begin{minipage}{\textwidth}
  407. \begin{footnotesize}
  408.  
  409. \ARROW From the above algorithm we will get a sequence:
  410. \begin{align*}
  411. F(x_1) \geq F(x_2) \geq F(x_3) \geq ...\geq F(x_n)\geq F(x_{n+1})...
  412. \end{align*}
  413. \ARROW If the function is bounded from the bottom the the above sequence is converging.\\
  414. \ARROWR How can we be sure it will converge to $x_{opt}$?
  415. \begin{center}
  416. \includegraphics[width=0.6\textwidth]{images/fig2.png}
  417. \end{center}
  418. \ARROW If we choose the correct the $P_n$ every sequence starting from $x^{\prime}$ will converge to $\overline{x}$, where $F$ has a local minimum.
  419.  
  420.  
  421.  
  422.  
  423. \end{footnotesize}
  424. \end{minipage}
  425.  
  426. \end{frame}
  427.  
  428.  
  429. \begin{frame}\frametitle{Optimization sequence}
  430. \begin{minipage}{\textwidth}
  431. \begin{footnotesize}
  432. \ARROW There are two types of algorithms:
  433. \begin{itemize}
  434. \item If the algorithm can find the global minimum then we call it: global algorithm.
  435. \item If the algorithm can find only local minimum the we call it: local algorithm.
  436. \end{itemize}
  437. \ARROWR If in the sequence $\lbrace x_n \rbrace$ we find a point $x^{\prime}$ such that:
  438. \begin{align*}
  439. F(x_{opt}) < F(x^{\prime}) < F(x_{opt})+\epsilon
  440. \end{align*}
  441. then the above algorithm will converge only to $x^{\prime}$. \\
  442. \ARROW Of course we can change the $\epsilon$ such that we escape the $x^{\prime}$.
  443. \end{footnotesize}
  444. \end{minipage}
  445.  
  446. \end{frame}
  447.  
  448.  
  449.  
  450. \begin{frame}
  451. \begin{minipage}{\textwidth}
  452.  
  453. \begin{center}
  454. \begin{Large}
  455. Q \& A
  456. \end{Large}
  457. \end{center}
  458.  
  459. \end{minipage}
  460.  
  461. \end{frame}
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470. \backupbegin
  471.  
  472. \begin{frame}\frametitle{Backup}
  473.  
  474.  
  475. \end{frame}
  476.  
  477. \backupend
  478.  
  479. \end{document}