-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
105 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,43 @@ | ||
\section{物理過程のシミュレーション} | ||
|
||
\begin{frame}[t,fragile]{物質中の中性子輸送} | ||
\begin{center} | ||
\resizebox{0.45\textwidth}{!}{\includegraphics{image/scattering.pdf}} | ||
\end{center} | ||
\end{frame} | ||
|
||
\begin{frame}[t,fragile]{物質中の中性子輸送} | ||
\begin{itemize} | ||
\setlength{\itemsep}{1em} | ||
\item 物理過程 | ||
\resizebox{0.4\textwidth}{!}{\includegraphics{image/scattering.pdf}} | ||
%\setlength{\itemsep}{1em} | ||
\item ある板状の物質(厚さ$D$)に垂直に中性子が入射したときの吸収率・透過率・反射率 | ||
\item 中性子はある確率で物質の原子核に衝突し、確率$p_{\rm c}$で吸収、$p_{\rm s}=1-p_{\rm c}$で散乱される | ||
\begin{itemize} | ||
\item 衝突は確率的に起きるので、次の衝突までの距離$\ell$は指数分布にしたがう($\ell$: 平均自由行程) | ||
\[ | ||
p(\ell) = \lambda e^{-\lambda\ell} | ||
\] | ||
\item 衝突時、ランダムな方向に散乱されるとすると | ||
\[ | ||
p(\theta,\phi) \, d\theta \, d\phi = \frac{d\Omega}{4\pi} = \frac{\sin \theta}{4\pi} \, d\theta \, d\phi | ||
\] | ||
\[ | ||
p(\theta) = \frac{\sin \theta}{2} \qquad p(\phi)=\frac{1}{2\pi} | ||
\] | ||
\end{itemize} | ||
\end{itemize} | ||
\end{frame} | ||
|
||
\begin{frame}[t,fragile]{モンテカルロシミュレーション} | ||
\begin{enumerate} | ||
\setlength{\itemsep}{1em} | ||
\item 初期条件 $z=0$, $\theta = 0$ | ||
\item {\color{red} 指数分布から$\ell$を選ぶ} | ||
\item $z \leftarrow z + \ell \cos \theta$ | ||
\item $z<0$ → 反射(終了) \\ | ||
$z>D$ → 透過(終了) \\ | ||
$0 < z < D$ → 確率$p_{\rm c}$で吸収(終了)、$p_{\rm s}$で散乱 | ||
\item {\color{red} 散乱後の$\theta$を選び}、2に戻る | ||
\end{enumerate} | ||
\vspace*{-5cm}\hspace{8cm}\resizebox{0.25\textwidth}{!}{\includegraphics{image/scattering.pdf}} | ||
\end{frame} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
\begin{frame}[t,fragile]{乱択アルゴリズム(randomized algorithm)} | ||
\begin{itemize} | ||
\setlength{\itemsep}{1em} | ||
\item 実行中に乱数を参照してその値によって振る舞いをかえるアルゴリズム | ||
\item ラスベガスアルゴリズム | ||
\begin{itemize} | ||
\item 乱数の出方によらず常に正しい結果を与えるアルゴリズム | ||
\item 平均化効果を利用するアルゴリズム:クイックソート | ||
\end{itemize} | ||
\item モンテカルロアルゴリズム | ||
\begin{itemize} | ||
\item 乱数の出方によっては誤った結果を与えるアルゴリズム | ||
\item 標本を利用するアルゴリズム:最大カット問題 | ||
\item くじ引き型のアルゴリズム:素数性判定、関数の同一性、行列積の検算 | ||
\item サンプリングアルゴリズム:モンテカルロ積分、マルコフ連鎖モンテカルロ | ||
\end{itemize} | ||
\end{itemize} | ||
\end{frame} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
\begin{frame}[t,fragile]{乱択クイックソート} | ||
\begin{itemize} | ||
\setlength{\itemsep}{1em} | ||
\item 分割統治法に基づく再帰的なソートアルゴリズム | ||
\begin{itemize} | ||
\item 配列の中から要素を一つ選び、それより小さい要素からのみなる集合と大きい要素のみからなる集合の2つに分ける | ||
\item それぞれの集合をソートし、結合する | ||
\end{itemize} | ||
\item ほぼ同じ大きさの集合に分けることができる場合の実行ステップ数$\sim {\cal O}(n \log n)$ | ||
\item 最悪(選んだ要素が常に最大 or 最小値)の場合のステップ数$\sim {\cal O}(n^2)$ | ||
\item 分割に用いる要素を「ランダムに」選ぶ $\Rightarrow$ 平均ステップ数$\sim {\cal O}(n \log n)$ | ||
\end{itemize} | ||
\end{frame} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
\begin{frame}[t,fragile]{クイックソート} | ||
\resizebox{!}{.9\textheight}{\includegraphics{image/quicksort.pdf}} | ||
\end{frame} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
\begin{frame}[t,fragile]{最小カット問題} | ||
\begin{itemize} | ||
\setlength{\itemsep}{1em} | ||
\item 「最小カット (min-cut)」= 連結グラフを二つの部分に分けるために切らなければならない辺(エッジ)の集合のうち、もっとも小さいもの | ||
\item ``Randomized Min-Cut Algorithm'' | ||
\begin{itemize} | ||
\item ランダムに辺を一つ選ぶ | ||
\item 辺の両端の頂点を一つにつぶす(自己ループは取り除く) | ||
\item 残りの頂点が二つになるまで繰り返す | ||
\end{itemize} | ||
\item 上の試行を何回も繰り返して、得られたうちで最小なカットを結果とする | ||
\item 頂点の数が $n$ のグラフに関して、正解が得られる確率:少なくとも $\frac{2}{n(n-1)}$ | ||
\end{itemize} | ||
\end{frame} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
\begin{frame}[t,fragile]{最小カット問題} | ||
\resizebox{!}{.6\textheight}{\includegraphics{image/min-cut.pdf}} | ||
\end{frame} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,9 @@ | ||
\section{乱択アルゴリズム} | ||
|
||
\begin{frame}[t,fragile]{乱択アルゴリズム(randomized algorithm)} | ||
\begin{itemize} | ||
\setlength{\itemsep}{1em} | ||
\item 実行中に乱数を参照してその値によって振る舞いをかえるアルゴリズム | ||
\item ラスベガスアルゴリズム | ||
\begin{itemize} | ||
\item 乱数の出方によらず常に正しい結果を与えるアルゴリズム | ||
\item 平均化効果を利用するアルゴリズム:クイックソート | ||
\end{itemize} | ||
\item モンテカルロアルゴリズム | ||
\begin{itemize} | ||
\item 乱数の出方によっては誤った結果を与えるアルゴリズム | ||
\item 標本を利用するアルゴリズム:最大カット問題 | ||
\item くじ引き型のアルゴリズム:素数性判定、関数の同一性、行列積の検算 | ||
\item サンプリングアルゴリズム:モンテカルロ積分、マルコフ連鎖モンテカルロ | ||
\end{itemize} | ||
\end{itemize} | ||
\end{frame} | ||
|
||
\begin{frame}[t,fragile]{乱択クイックソート} | ||
\begin{itemize} | ||
\setlength{\itemsep}{1em} | ||
\item 分割統治法に基づく再帰的なソートアルゴリズム | ||
\begin{itemize} | ||
\item 配列の中から要素を一つ選び、それより小さい要素からのみなる集合と大きい要素のみからなる集合の2つに分ける | ||
\item それぞれの集合をソートし、結合する | ||
\end{itemize} | ||
\item ほぼ同じ大きさの集合に分けることができる場合の実行ステップ数$\sim {\cal O}(n \log n)$ | ||
\item 最悪(選んだ要素が常に最大 or 最小値)の場合のステップ数$\sim {\cal O}(n^2)$ | ||
\item 分割に用いる要素を「ランダムに」選ぶ $\Rightarrow$ 平均ステップ数$\sim {\cal O}(n \log n)$ | ||
\end{itemize} | ||
\end{frame} | ||
% -*- coding: utf-8 -*- | ||
|
||
\begin{frame}[t,fragile]{クイックソート} | ||
\resizebox{!}{.9\textheight}{\includegraphics{image/quicksort.pdf}} | ||
\end{frame} | ||
|
||
\begin{frame}[t,fragile]{最小カット問題} | ||
\begin{itemize} | ||
\setlength{\itemsep}{1em} | ||
\item 「最小カット (min-cut)」= 連結グラフを二つの部分に分けるために切らなければならない辺(エッジ)の集合のうち、もっとも小さいもの | ||
\item ``Randomized Min-Cut Algorithm'' | ||
\begin{itemize} | ||
\item ランダムに辺を一つ選ぶ | ||
\item 辺の両端の頂点を一つにつぶす(自己ループは取り除く) | ||
\item 残りの頂点が二つになるまで繰り返す | ||
\end{itemize} | ||
\item 上の試行を何回も繰り返して、得られたうちで最小なカットを結果とする | ||
\item 頂点の数が $n$ のグラフに関して、正解が得られる確率:少なくとも $\frac{2}{n(n-1)}$ | ||
\end{itemize} | ||
\end{frame} | ||
\section{乱択アルゴリズム} | ||
|
||
\begin{frame}[t,fragile]{最小カット問題} | ||
\resizebox{!}{.6\textheight}{\includegraphics{image/min-cut.pdf}} | ||
\end{frame} | ||
\input{randomized-01.tex} | ||
\input{randomized-02.tex} | ||
\input{randomized-03.tex} | ||
\input{randomized-04.tex} | ||
\input{randomized-05.tex} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters