author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Tue, 12 Nov 2013 01:53:41 +0000 | |
changeset 126 | b091e0abb894 |
parent 90 | d1d07f05325a |
child 128 | 4e108563716c |
permissions | -rw-r--r-- |
59 | 1 |
\documentclass[dvipsnames,14pt,t]{beamer} |
2 |
\usepackage{proof} |
|
126
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
3 |
\usepackage{beamerthemeplaincu} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
4 |
%\usepackage[T1]{fontenc} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
5 |
%\usepackage[latin1]{inputenc} |
59 | 6 |
\usepackage{mathpartir} |
7 |
\usepackage{isabelle} |
|
8 |
\usepackage{isabellesym} |
|
9 |
\usepackage[absolute,overlay]{textpos} |
|
10 |
\usepackage{ifthen} |
|
11 |
\usepackage{tikz} |
|
12 |
\usepackage{courier} |
|
13 |
\usepackage{listings} |
|
14 |
\usetikzlibrary{arrows} |
|
15 |
\usetikzlibrary{positioning} |
|
16 |
\usetikzlibrary{calc} |
|
126
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
17 |
\usetikzlibrary{shapes} |
59 | 18 |
\usepackage{graphicx} |
19 |
||
20 |
\isabellestyle{rm} |
|
21 |
\renewcommand{\isastyle}{\rm}% |
|
22 |
\renewcommand{\isastyleminor}{\rm}% |
|
23 |
\renewcommand{\isastylescript}{\footnotesize\rm\slshape}% |
|
24 |
\renewcommand{\isatagproof}{} |
|
25 |
\renewcommand{\endisatagproof}{} |
|
26 |
\renewcommand{\isamarkupcmt}[1]{#1} |
|
27 |
||
28 |
% Isabelle characters |
|
29 |
\renewcommand{\isacharunderscore}{\_} |
|
30 |
\renewcommand{\isacharbar}{\isamath{\mid}} |
|
31 |
\renewcommand{\isasymiota}{} |
|
32 |
\renewcommand{\isacharbraceleft}{\{} |
|
33 |
\renewcommand{\isacharbraceright}{\}} |
|
34 |
\renewcommand{\isacharless}{$\langle$} |
|
35 |
\renewcommand{\isachargreater}{$\rangle$} |
|
36 |
\renewcommand{\isasymsharp}{\isamath{\#}} |
|
37 |
\renewcommand{\isasymdots}{\isamath{...}} |
|
38 |
\renewcommand{\isasymbullet}{\act} |
|
126
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
39 |
\newcommand{\isaliteral}[1]{} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
40 |
\newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}} |
59 | 41 |
|
42 |
||
43 |
||
44 |
\definecolor{javared}{rgb}{0.6,0,0} % for strings |
|
45 |
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments |
|
46 |
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords |
|
47 |
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc |
|
48 |
||
49 |
\lstset{language=Java, |
|
50 |
basicstyle=\ttfamily, |
|
51 |
keywordstyle=\color{javapurple}\bfseries, |
|
52 |
stringstyle=\color{javagreen}, |
|
53 |
commentstyle=\color{javagreen}, |
|
54 |
morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
55 |
numbers=left, |
|
56 |
numberstyle=\tiny\color{black}, |
|
57 |
stepnumber=1, |
|
58 |
numbersep=10pt, |
|
59 |
tabsize=2, |
|
60 |
showspaces=false, |
|
61 |
showstringspaces=false} |
|
62 |
||
63 |
\lstdefinelanguage{scala}{ |
|
64 |
morekeywords={abstract,case,catch,class,def,% |
|
65 |
do,else,extends,false,final,finally,% |
|
66 |
for,if,implicit,import,match,mixin,% |
|
67 |
new,null,object,override,package,% |
|
68 |
private,protected,requires,return,sealed,% |
|
69 |
super,this,throw,trait,true,try,% |
|
70 |
type,val,var,while,with,yield}, |
|
71 |
otherkeywords={=>,<-,<\%,<:,>:,\#,@}, |
|
72 |
sensitive=true, |
|
73 |
morecomment=[l]{//}, |
|
74 |
morecomment=[n]{/*}{*/}, |
|
75 |
morestring=[b]", |
|
76 |
morestring=[b]', |
|
77 |
morestring=[b]""" |
|
78 |
} |
|
79 |
||
80 |
\lstset{language=Scala, |
|
81 |
basicstyle=\ttfamily, |
|
82 |
keywordstyle=\color{javapurple}\bfseries, |
|
83 |
stringstyle=\color{javagreen}, |
|
84 |
commentstyle=\color{javagreen}, |
|
85 |
morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
86 |
numbers=left, |
|
87 |
numberstyle=\tiny\color{black}, |
|
88 |
stepnumber=1, |
|
89 |
numbersep=10pt, |
|
90 |
tabsize=2, |
|
91 |
showspaces=false, |
|
92 |
showstringspaces=false} |
|
93 |
||
126
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
94 |
%sudoku |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
95 |
\newcounter{row} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
96 |
\newcounter{col} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
97 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
98 |
\newcommand\setrow[9]{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
99 |
\setcounter{col}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
100 |
\foreach \n in {#1, #2, #3, #4, #5, #6, #7, #8, #9} { |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
101 |
\edef\x{\value{col} - 0.5} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
102 |
\edef\y{9.5 - \value{row}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
103 |
\node[anchor=center] at (\x, \y) {\n}; |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
104 |
\stepcounter{col} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
105 |
} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
106 |
\stepcounter{row} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
107 |
} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
108 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
109 |
|
59 | 110 |
% beamer stuff |
126
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
111 |
\renewcommand{\slidecaption}{APP 06, King's College London, 12 November 2013} |
59 | 112 |
|
113 |
\newcommand{\bl}[1]{\textcolor{blue}{#1}} |
|
114 |
\begin{document} |
|
115 |
||
116 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
117 |
\mode<presentation>{ |
|
118 |
\begin{frame}<1>[t] |
|
119 |
\frametitle{% |
|
120 |
\begin{tabular}{@ {}c@ {}} |
|
121 |
\\ |
|
122 |
\LARGE Access Control and \\[-3mm] |
|
123 |
\LARGE Privacy Policies (6)\\[-6mm] |
|
124 |
\end{tabular}}\bigskip\bigskip\bigskip |
|
125 |
||
126 |
%\begin{center} |
|
127 |
%\includegraphics[scale=1.3]{pics/barrier.jpg} |
|
128 |
%\end{center} |
|
129 |
||
130 |
\normalsize |
|
131 |
\begin{center} |
|
132 |
\begin{tabular}{ll} |
|
133 |
Email: & christian.urban at kcl.ac.uk\\ |
|
126
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
134 |
Office: & S1.27 (1st floor Strand Building)\\ |
59 | 135 |
Slides: & KEATS (also homework is there)\\ |
136 |
\end{tabular} |
|
137 |
\end{center} |
|
138 |
||
139 |
||
140 |
\end{frame}} |
|
141 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
142 |
||
143 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
144 |
\mode<presentation>{ |
|
145 |
\begin{frame}[t] |
|
146 |
\frametitle{\Large\begin{tabular}{@ {}c@ {}}Access Control Logic\end{tabular}} |
|
147 |
||
148 |
Formulas |
|
149 |
||
150 |
\begin{itemize} |
|
151 |
\item[] |
|
152 |
||
153 |
\begin{center}\color{blue} |
|
154 |
\begin{tabular}[t]{rcl@ {\hspace{10mm}}l} |
|
155 |
\isa{F} & \isa{{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}} & \isa{true} \\ |
|
156 |
& \isa{{\isaliteral{7C}{\isacharbar}}} & \isa{false} \\ |
|
157 |
& \isa{{\isaliteral{7C}{\isacharbar}}} & \isa{F\ {\isaliteral{5C3C616E643E}{\isasymand}}\ F} \\ |
|
158 |
& \isa{{\isaliteral{7C}{\isacharbar}}} & \isa{F\ {\isaliteral{5C3C6F723E}{\isasymor}}\ F} \\ |
|
159 |
& \isa{{\isaliteral{7C}{\isacharbar}}} & \isa{F\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ F}\\ |
|
160 |
& \isa{{\isaliteral{7C}{\isacharbar}}} & \isa{p\ {\isaliteral{28}{\isacharparenleft}}t\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}t\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{29}{\isacharparenright}}} \\ |
|
161 |
& \isa{{\isaliteral{7C}{\isacharbar}}} & \alert{\isa{P\ says\ F}} & \textcolor{black}{``saying predicate''}\\ |
|
162 |
\end{tabular} |
|
163 |
\end{center} |
|
164 |
||
165 |
\end{itemize} |
|
166 |
||
167 |
Judgements |
|
168 |
||
169 |
\begin{itemize} |
|
170 |
\item[] \mbox{\hspace{9mm}}\bl{$\Gamma \vdash \text{F}$} |
|
171 |
\end{itemize} |
|
172 |
||
173 |
\end{frame}} |
|
174 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
175 |
||
62 | 176 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
59 | 177 |
\mode<presentation>{ |
178 |
\begin{frame}[c] |
|
179 |
\frametitle{Inference Rules} |
|
180 |
||
181 |
\begin{center} |
|
182 |
\bl{\infer{\Gamma, F\vdash F}{}}\bigskip\\ |
|
183 |
||
62 | 184 |
\bl{\infer{\Gamma \vdash F_2}{\Gamma \vdash F_1 \Rightarrow F_2 \quad \Gamma \vdash F_1}} |
59 | 185 |
\qquad |
186 |
\bl{\infer{\Gamma \vdash F_1 \Rightarrow F_2}{F_1, \Gamma \vdash F_2}}\bigskip\\ |
|
187 |
||
188 |
\bl{\infer{\Gamma \vdash P\,\text{says}\, F}{\Gamma \vdash F}}\medskip\\ |
|
189 |
||
190 |
\bl{\infer{\Gamma \vdash P \,\text{says}\, F_2} |
|
191 |
{\Gamma \vdash P \,\text{says}\, (F_1\Rightarrow F_2) \quad |
|
192 |
\Gamma \vdash P \,\text{says}\, F_1}} |
|
193 |
\end{center} |
|
194 |
||
195 |
\end{frame}} |
|
196 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
197 |
||
198 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
199 |
\mode<presentation>{ |
|
200 |
\begin{frame}[c] |
|
201 |
\frametitle{Proofs} |
|
202 |
||
60 | 203 |
\begin{center} |
204 |
\bl{ |
|
205 |
\infer{\Gamma \vdash F} |
|
206 |
{\infer{\hspace{1cm}:\hspace{1cm}} |
|
207 |
{\infer{\hspace{1cm}:\hspace{1cm}}{:} |
|
208 |
& |
|
209 |
\infer{\hspace{1cm}:\hspace{1cm}}{:\quad :} |
|
210 |
}} |
|
211 |
} |
|
212 |
\end{center} |
|
59 | 213 |
|
214 |
\end{frame}} |
|
215 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
216 |
||
217 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
218 |
\mode<presentation>{ |
|
219 |
\begin{frame}[c] |
|
220 |
\frametitle{The Access Control Problem} |
|
221 |
||
222 |
||
223 |
\begin{center} |
|
224 |
\begin{tikzpicture}[scale=1] |
|
225 |
||
226 |
\draw[line width=1mm] (-.3, -0.5) rectangle (1.5,2); |
|
227 |
\draw (-2.7,1) node {\begin{tabular}{l}access\\request\\ (\bl{$F$})\end{tabular}}; |
|
228 |
\draw (4.2,1) node {\begin{tabular}{l}provable/\\not provable\end{tabular}}; |
|
229 |
\draw (0.6,0.8) node {\footnotesize \begin{tabular}{l}AC-\\ Checker:\\ applies\\ inference\\ rules\end{tabular}}; |
|
230 |
||
231 |
\draw[red, ->, line width = 2mm] (1.7,1) -- (2.7,1); |
|
232 |
\draw[red,<-, line width = 2mm] (-0.6,1) -- (-1.6,1); |
|
233 |
\draw[red, <-, line width = 3mm] (0.6,2.2) -- (0.6,3.2); |
|
234 |
||
235 |
\draw (0.6,4) node {\begin{tabular}{l}\large Access Policy (\bl{$\Gamma$})\end{tabular}}; |
|
236 |
||
237 |
\end{tikzpicture} |
|
238 |
\end{center} |
|
239 |
||
240 |
\end{frame}} |
|
241 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
242 |
||
243 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
244 |
\mode<presentation>{ |
|
245 |
\begin{frame}[c] |
|
246 |
\frametitle{} |
|
247 |
||
248 |
Recall the following scenario: |
|
249 |
||
250 |
\begin{itemize} |
|
60 | 251 |
\item If \textcolor{blue}{Admin} says that \textcolor{blue}{\isa{file\isaliteral{5C3C5E697375623E}{} {}}} |
59 | 252 |
should be deleted, then this file must be deleted. |
253 |
\item \textcolor{blue}{Admin} trusts \textcolor{blue}{Bob} to decide whether |
|
60 | 254 |
\textcolor{blue}{\isa{file\isaliteral{5C3C5E697375623E}{}}} should be deleted. |
255 |
\item \textcolor{blue}{Bob} wants to delete \textcolor{blue}{\isa{file\isaliteral{5C3C5E697375623E}{}}}. |
|
59 | 256 |
\end{itemize}\bigskip |
257 |
||
258 |
\small |
|
259 |
\textcolor{blue}{\isa{{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{3D}{\isacharequal}}}\small\begin{tabular}{l} |
|
60 | 260 |
\isa{{\isaliteral{28}{\isacharparenleft}}Admin\ says\ del{\isaliteral{5F}{\isacharunderscore}}file\isaliteral{5C3C5E697375623E}{}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ del{\isaliteral{5F}{\isacharunderscore}}file\isaliteral{5C3C5E697375623E}{}},\\ |
261 |
\isa{{\isaliteral{28}{\isacharparenleft}}Admin\ says\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{28}{\isacharparenleft}}Bob\ says\ del{\isaliteral{5F}{\isacharunderscore}}file\isaliteral{5C3C5E697375623E}{}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ del{\isaliteral{5F}{\isacharunderscore}}file\isaliteral{5C3C5E697375623E}{}{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}},\\ |
|
262 |
\isa{Bob\ says\ del{\isaliteral{5F}{\isacharunderscore}}file\isaliteral{5C3C5E697375623E}{}}\\ |
|
59 | 263 |
\end{tabular}}\medskip |
264 |
||
60 | 265 |
\textcolor{blue}{\isa{{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ del{\isaliteral{5F}{\isacharunderscore}}file\isaliteral{5C3C5E697375623E}{}}} |
59 | 266 |
\end{frame}} |
267 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
268 |
||
269 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
270 |
\mode<presentation>{ |
|
271 |
\begin{frame}[c] |
|
272 |
||
273 |
How to prove \bl{$\Gamma \vdash F$}?\bigskip\bigskip |
|
274 |
||
275 |
\begin{center} |
|
276 |
\Large \bl{\infer{\Gamma, F\vdash F}{}} |
|
277 |
\end{center} |
|
278 |
||
279 |
\end{frame}} |
|
280 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
281 |
||
282 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
283 |
\mode<presentation>{ |
|
284 |
\begin{frame}[c] |
|
285 |
||
286 |
\begin{center} |
|
287 |
\Large |
|
288 |
\bl{\infer{\Gamma \vdash F_1 \Rightarrow F_2}{F_1, \Gamma \vdash F_2}} |
|
289 |
\end{center} |
|
290 |
||
291 |
\end{frame}} |
|
292 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
293 |
||
294 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
295 |
\mode<presentation>{ |
|
296 |
\begin{frame}[c] |
|
297 |
||
298 |
\begin{center} |
|
299 |
\Large |
|
300 |
\bl{\infer{\Gamma \vdash P \,\text{says}\, F}{\Gamma \vdash F}} |
|
301 |
\end{center} |
|
302 |
||
303 |
\end{frame}} |
|
304 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
305 |
||
306 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
307 |
\mode<presentation>{ |
|
308 |
\begin{frame}[c] |
|
309 |
||
310 |
\begin{center} |
|
311 |
\Large |
|
312 |
\bl{\infer{\Gamma \vdash F_1 \vee F_2}{\Gamma \vdash F_1}}\qquad |
|
313 |
\bl{\infer{\Gamma \vdash F_1 \vee F_2}{\Gamma \vdash F_2}}\ |
|
314 |
\end{center} |
|
315 |
||
316 |
\end{frame}} |
|
317 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
318 |
||
319 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
320 |
\mode<presentation>{ |
|
321 |
\begin{frame}[c] |
|
322 |
||
323 |
\begin{center} |
|
324 |
\Large |
|
325 |
\bl{\infer{\Gamma \vdash F_1 \wedge F_2}{\Gamma \vdash F_1 \quad \Gamma \vdash F_2}} |
|
326 |
\end{center} |
|
327 |
||
328 |
\end{frame}} |
|
329 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
330 |
||
331 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
332 |
\mode<presentation>{ |
|
333 |
\begin{frame}[t] |
|
334 |
||
335 |
I want to prove \bl{$\Gamma \vdash \text{Pred}$}\bigskip\bigskip\pause |
|
336 |
||
337 |
\begin{enumerate} |
|
338 |
\item I found that \bl{$\Gamma$} contains the assumption \bl{$F_1 \Rightarrow F_2$}\bigskip\pause |
|
339 |
\item If I can prove \bl{$\Gamma \vdash F_1$},\pause{} then I can prove |
|
340 |
\begin{center} |
|
341 |
\bl{$\Gamma \vdash F_2$} |
|
342 |
\end{center}\bigskip\pause |
|
343 |
||
344 |
\item So better I try to prove \bl{$\Gamma \vdash \text{Pred}$} with the additional assumption |
|
345 |
\bl{$F_2$}.\bigskip |
|
346 |
\begin{center} |
|
347 |
\bl{$F_2, \Gamma \vdash \text{Pred}$} |
|
348 |
\end{center} |
|
60 | 349 |
\end{enumerate} |
59 | 350 |
|
60 | 351 |
\only<4>{ |
352 |
\begin{textblock}{11}(1,10.5) |
|
353 |
\bl{\infer{\Gamma\vdash F_2}{\Gamma\vdash F_1\Rightarrow F_2 & \Gamma\vdash F_1}} |
|
354 |
\end{textblock}} |
|
355 |
||
59 | 356 |
|
357 |
\end{frame}} |
|
358 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
60 | 359 |
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
360 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
361 |
\mode<presentation>{ |
|
362 |
\begin{frame}[c] |
|
59 | 363 |
|
60 | 364 |
\begin{itemize} |
365 |
\item \bl{$P$} is entitled to do \bl{$F$}\smallskip\\ |
|
366 |
\bl{$P \,\text{controls}\, F \,\dn\, (P\,\text{says}\, F) \Rightarrow F$}\medskip |
|
367 |
||
368 |
\begin{center} |
|
369 |
\bl{\infer{\Gamma \vdash F}{\Gamma \vdash P\,\text{controls}\, F & \Gamma \vdash P\,\text{says}\,F}} |
|
370 |
\end{center} |
|
371 |
||
372 |
\item \bl{$P$} speaks for \bl{$Q$}\smallskip\\ |
|
373 |
\bl{$P \mapsto Q \,\dn\, \forall F. (P\,\text{says}\, F) \Rightarrow (Q \,\text{says}\,F)$}\medskip |
|
374 |
||
375 |
\begin{center} |
|
376 |
\bl{\infer{\Gamma \vdash Q\,\text{says}\,F}{\Gamma \vdash P\mapsto Q & \Gamma \vdash P\,\text{says}\,F}} |
|
377 |
\medskip\\ |
|
378 |
\bl{\infer{\Gamma \vdash P\,\text{controls}\,F}{\Gamma \vdash P\mapsto Q & \Gamma \vdash Q\,\text{controls}\,F}}\\ |
|
379 |
||
380 |
\end{center} |
|
381 |
\end{itemize} |
|
382 |
||
383 |
\end{frame}} |
|
384 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
385 |
||
386 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
387 |
\mode<presentation>{ |
|
388 |
\begin{frame}[c] |
|
126
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
389 |
\frametitle{Sudoku} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
390 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
391 |
\begin{tikzpicture}[scale=.5] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
392 |
\begin{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
393 |
\draw (0, 0) grid (9, 9); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
394 |
\draw[very thick, scale=3] (0, 0) grid (3, 3); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
395 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
396 |
\setcounter{row}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
397 |
\setrow { }{2}{ } {5}{ }{1} { }{9}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
398 |
\setrow {8}{ }{ } {2}{ }{3} { }{ }{6} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
399 |
\setrow { }{3}{ } { }{6}{ } { }{7}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
400 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
401 |
\setrow { }{ }{1} { }{ }{ } {6}{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
402 |
\setrow {5}{4}{ } { }{ }{ } { }{1}{9} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
403 |
\setrow { }{ }{2} { }{ }{ } {7}{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
404 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
405 |
\setrow { }{9}{ } { }{3}{ } { }{8}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
406 |
\setrow {2}{ }{ } {8}{ }{4} { }{ }{7} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
407 |
\setrow { }{1}{ } {9}{ }{7} { }{6}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
408 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
409 |
\fill[red, fill opacity=0.4] (4,0) rectangle (5,9); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
410 |
\fill[red, fill opacity=0.4] (0,5) rectangle (9,6); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
411 |
\fill[red!50, fill opacity=0.4] (3,3) rectangle (4,5); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
412 |
\fill[red!50, fill opacity=0.4] (5,3) rectangle (6,5); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
413 |
\node[gray, anchor=center] at (4.5, -0.5) {columns}; |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
414 |
\node[gray, rotate=90, anchor=center] at (-0.6, 4.5, -0.5) {rows}; |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
415 |
\node[gray, anchor=center] at (4.5, 4.5) {box}; |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
416 |
\end{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
417 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
418 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
419 |
\small |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
420 |
\begin{textblock}{7}(9,3) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
421 |
\begin{enumerate} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
422 |
\item {\bf Row-Column:} each cell, must contain exactly one number |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
423 |
\item {\bf Row-Number:} each row must contain each number exactly once |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
424 |
\item {\bf Column-Number:} each column must contain each number exactly once |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
425 |
\item {\bf Box-Number:} each box must contain each number exactly once |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
426 |
\end{enumerate} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
427 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
428 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
429 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
430 |
\end{frame}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
431 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
432 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
433 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
434 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
435 |
\mode<presentation>{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
436 |
\begin{frame}[c] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
437 |
\frametitle{Solving Sudokus} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
438 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
439 |
\begin{tikzpicture}[scale=.5] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
440 |
\begin{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
441 |
\draw (0, 0) grid (9, 9); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
442 |
\draw[very thick, scale=3] (0, 0) grid (3, 3); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
443 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
444 |
\setcounter{row}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
445 |
\setrow { }{ }{ } {7}{ }{ } { }{5}{8} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
446 |
\setrow {}{5}{6} {2}{1}{8} {7}{9}{3} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
447 |
\setrow { }{ }{ } { }{ }{ } {1}{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
448 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
449 |
\setrow { }{ }{ } { }{ }{ } { }{8}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
450 |
\setrow { }{ }{ } {3}{7}{6} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
451 |
\setrow {9}{6}{ } { }{ }{ } { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
452 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
453 |
\setrow { }{ }{5} { }{3}{ } { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
454 |
\setrow { }{ }{4} { }{2}{1} {8}{3}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
455 |
\setrow {8}{7}{ } { }{ }{3} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
456 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
457 |
\fill[red, fill opacity=0.4] (0,7) rectangle (1,8); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
458 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
459 |
\end{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
460 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
461 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
462 |
\small |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
463 |
\begin{textblock}{6}(9,6) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
464 |
{\bf single position rules}\\ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
465 |
\begin{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
466 |
\bl{\infer{4\;\text{in empty position}}{\{1..9\} - \{4\}\;\text{in one row}}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
467 |
\end{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
468 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
469 |
\onslide<2->{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
470 |
\begin{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
471 |
\bl{\infer{x\;\text{in empty position}}{\{1..9\} - \{x\}\;\text{in one column}}}\medskip\\ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
472 |
\bl{\infer{x\;\text{in empty position}}{\{1..9\} - \{x\}\;\text{in one box}}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
473 |
\end{center}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
474 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
475 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
476 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
477 |
\end{frame}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
478 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
479 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
480 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
481 |
\mode<presentation>{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
482 |
\begin{frame}[c] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
483 |
\frametitle{Solving Sudokus} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
484 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
485 |
\begin{tikzpicture}[scale=.5] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
486 |
\begin{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
487 |
\draw (0, 0) grid (9, 9); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
488 |
\draw[very thick, scale=3] (0, 0) grid (3, 3); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
489 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
490 |
\setcounter{row}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
491 |
\setrow { }{ }{ } {7}{ }{ } {\alert{\footnotesize 2}}{5}{8} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
492 |
\setrow {}{5}{6} {2}{1}{8} {7}{9}{3} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
493 |
\setrow { }{ }{ } { }{ }{ } {1}{\alert{\footnotesize 2}}{\alert{\footnotesize 2}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
494 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
495 |
\setrow { }{ }{ } { }{ }{ } { }{8}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
496 |
\setrow { }{ }{ } {3}{7}{6} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
497 |
\setrow {9}{6}{ } { }{ }{ } { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
498 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
499 |
\setrow { }{ }{5} { }{3}{ } { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
500 |
\setrow { }{ }{4} { }{2}{1} {8}{3}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
501 |
\setrow {8}{7}{ } { }{ }{3} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
502 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
503 |
\end{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
504 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
505 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
506 |
\small |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
507 |
\begin{textblock}{6}(7.5,6) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
508 |
{\bf candidate rules}\\ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
509 |
\begin{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
510 |
\bl{\infer{x\;\text{candidate in empty positions}}{X - \{x\}\;\text{in one box} & X \subseteq \{1..9\}}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
511 |
\end{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
512 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
513 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
514 |
\end{frame}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
515 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
516 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
517 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
518 |
\mode<presentation>{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
519 |
\begin{frame}[c] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
520 |
\frametitle{Solving Sudokus} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
521 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
522 |
\begin{tikzpicture}[scale=.5] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
523 |
\begin{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
524 |
\draw (0, 0) grid (9, 9); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
525 |
\draw[very thick, scale=3] (0, 0) grid (3, 3); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
526 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
527 |
\setcounter{row}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
528 |
\setrow { }{ }{ } {7}{ }{ } {\alert{\footnotesize 2}}{5}{8} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
529 |
\setrow {\alert{4}}{5}{6} {2}{1}{8} {7}{9}{3} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
530 |
\setrow { }{ }{ } { }{ }{ } {1}{\alert{\footnotesize 2}}{\alert{\footnotesize 2}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
531 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
532 |
\setrow { }{ }{ } { }{ }{ } { }{8}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
533 |
\setrow { }{ }{ } {3}{7}{6} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
534 |
\setrow {9}{6}{ } { }{ }{ } { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
535 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
536 |
\setrow { }{ }{5} { }{3}{ } { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
537 |
\setrow { }{ }{4} { }{2}{1} {8}{3}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
538 |
\setrow {8}{7}{ } { }{ }{3} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
539 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
540 |
\end{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
541 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
542 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
543 |
\small |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
544 |
\begin{textblock}{6}(7.5,6) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
545 |
\begin{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
546 |
\bl{\infer{4\;\text{in empty position}}{\{1..9\} - \{4\}\;\text{in one row}}}\bigskip\\ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
547 |
\bl{\infer{2\;\text{candidate in empty positions}}{X - \{2\}\;\text{in one box} & X \subseteq \{1..9\}}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
548 |
\end{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
549 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
550 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
551 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
552 |
\begin{textblock}{3}(13.5,6.8) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
553 |
\begin{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
554 |
\onslide<1>{\node at (0,0) [single arrow, shape border rotate=270, fill=red,text=white]{\mbox{\alert{a}}};} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
555 |
\onslide<2>{\node at (0,0) [single arrow, shape border rotate=90, fill=red,text=white]{\mbox{\alert{a}}};} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
556 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
557 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
558 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
559 |
\begin{textblock}{3}(14.5,9.3) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
560 |
\begin{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
561 |
\onslide<1>{\node at (0,0) [single arrow, shape border rotate=270, fill=red,text=white]{\mbox{\alert{a}}};} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
562 |
\onslide<2>{\node at (0,0) [single arrow, shape border rotate=90, fill=red,text=white]{\mbox{\alert{a}}};} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
563 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
564 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
565 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
566 |
\end{frame}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
567 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
568 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
569 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
570 |
\mode<presentation>{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
571 |
\begin{frame}[c] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
572 |
\frametitle{Solving Sudokus} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
573 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
574 |
\begin{tikzpicture}[scale=.5] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
575 |
\begin{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
576 |
\draw (0, 0) grid (9, 9); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
577 |
\draw[very thick, scale=3] (0, 0) grid (3, 3); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
578 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
579 |
\setcounter{row}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
580 |
\setrow { }{ }{ } {7}{ }{ } { }{5}{8} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
581 |
\setrow { }{5}{6} {2}{1}{8} {7}{9}{3} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
582 |
\setrow { }{ }{ } { }{ }{ } {1}{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
583 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
584 |
\setrow { }{ }{ } { }{ }{ } { }{8}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
585 |
\setrow { }{ }{ } {3}{7}{6} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
586 |
\setrow {9}{6}{ } { }{ }{ } { }{ }{ \alert{2}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
587 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
588 |
\setrow { }{ }{5} { }{3}{ } { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
589 |
\setrow { }{ }{4} { }{2}{1} {8}{3}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
590 |
\setrow {8}{7}{ } { }{ }{3} { }{ }{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
591 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
592 |
\end{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
593 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
594 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
595 |
\small |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
596 |
\begin{textblock}{6}(7.5,6) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
597 |
\begin{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
598 |
\bl{\infer{2\;\text{candidate}}{X - \{2\}\;\text{in one box} & X \subseteq \{1..9\}}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
599 |
\end{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
600 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
601 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
602 |
\begin{textblock}{3}(14.5,8.3) |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
603 |
\begin{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
604 |
\onslide<1>{\node at (0,0) [single arrow, shape border rotate=90, fill=red,text=white]{\mbox{\alert{a}}};} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
605 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
606 |
\end{textblock} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
607 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
608 |
\end{frame}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
609 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
610 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
611 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
612 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
613 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
614 |
\mode<presentation>{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
615 |
\begin{frame}[c] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
616 |
\frametitle{Sudoku} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
617 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
618 |
Are there sudokus that cannot be solved?\pause |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
619 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
620 |
\begin{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
621 |
\begin{tikzpicture}[scale=.5] |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
622 |
\begin{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
623 |
\draw (0, 0) grid (9, 9); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
624 |
\draw[very thick, scale=3] (0, 0) grid (3, 3); |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
625 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
626 |
\setcounter{row}{1} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
627 |
\setrow {1}{2}{3} {4}{5}{6} {7}{8}{ } |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
628 |
\setrow { }{ }{ } { }{ }{ } { }{ }{2} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
629 |
\setrow { }{ }{ } { }{ }{ } { }{ }{3} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
630 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
631 |
\setrow { }{ }{ } { }{ }{ } { }{ }{4} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
632 |
\setrow { }{ }{ } { }{ }{ } { }{ }{5} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
633 |
\setrow { }{ }{ } { }{ }{ } { }{ }{6} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
634 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
635 |
\setrow { }{ }{ } { }{ }{ } { }{ }{7} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
636 |
\setrow { }{ }{ } { }{ }{ } { }{ }{8} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
637 |
\setrow { }{ }{ } { }{ }{ } { }{ }{9} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
638 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
639 |
\end{scope} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
640 |
\end{tikzpicture} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
641 |
\end{center} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
642 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
643 |
Sometimes no rules apply at all....unsolvable sudoku. |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
644 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
645 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
646 |
\end{frame}} |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
647 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
648 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
649 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
650 |
|
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
651 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
652 |
\mode<presentation>{ |
b091e0abb894
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
90
diff
changeset
|
653 |
\begin{frame}[c] |
60 | 654 |
\frametitle{Protocol Specifications} |
655 |
||
656 |
The Needham-Schroeder Protocol: |
|
657 |
||
658 |
\begin{center} |
|
659 |
\begin{tabular}{@ {\hspace{-7mm}}l@{\hspace{2mm}}r@ {\hspace{1mm}}l} |
|
660 |
Message 1 & \bl{$A \rightarrow S :$} & \bl{$A, B, N_A$}\\ |
|
661 |
Message 2 & \bl{$S \rightarrow A :$} & \bl{$\{N_A, B, K_{AB},\{K_{AB}, A\}_{K_{BS}} \}_{K_{AS}}$}\\ |
|
662 |
Message 3 & \bl{$A \rightarrow B :$} & \bl{$\{K_{AB}, A\}_{K_{BS}} $}\\ |
|
663 |
Message 4 & \bl{$B \rightarrow A :$} & \bl{$\{N_B\}_{K_{AB}}$}\\ |
|
664 |
Message 5 & \bl{$A \rightarrow B :$} & \bl{$\{N_B-1\}_{K_{AB}}$}\\ |
|
665 |
\end{tabular} |
|
666 |
\end{center} |
|
667 |
||
668 |
\end{frame}} |
|
669 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
670 |
||
671 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
672 |
\mode<presentation>{ |
|
673 |
\begin{frame}[c] |
|
674 |
\frametitle{Trusted Third Party} |
|
675 |
||
676 |
Simple protocol for establishing a secure connection via a mutually |
|
677 |
trusted 3rd party (server): |
|
678 |
||
679 |
\begin{center} |
|
680 |
\begin{tabular}{@ {\hspace{-7mm}}l@{\hspace{2mm}}r@ {\hspace{1mm}}l} |
|
681 |
Message 1 & \bl{$A \rightarrow S :$} & \bl{$A, B$}\\ |
|
682 |
Message 2 & \bl{$S \rightarrow A :$} & \bl{$\{K_{AB}\}_{K_{AS}}$} and \bl{$\{\{K_{AB}\}_{K_{BS}} \}_{K_{AS}}$}\\ |
|
683 |
Message 3 & \bl{$A \rightarrow B :$} & \bl{$\{K_{AB}\}_{K_{BS}} $}\\ |
|
684 |
Message 4 & \bl{$A \rightarrow B :$} & \bl{$\{m\}_{K_{AB}}$}\\ |
|
685 |
\end{tabular} |
|
686 |
\end{center} |
|
687 |
||
688 |
\end{frame}} |
|
689 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
690 |
||
691 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
692 |
\mode<presentation>{ |
|
693 |
\begin{frame}[c] |
|
694 |
\frametitle{Sending Messages} |
|
695 |
||
696 |
\begin{itemize} |
|
697 |
\item Alice sends a message \bl{$m$} |
|
698 |
\begin{center} |
|
699 |
\bl{Alice says $m$} |
|
700 |
\end{center}\medskip\pause |
|
701 |
||
702 |
\item Alice sends an encrypted message \bl{$m$}\\ (with key \bl{$K$}) |
|
703 |
\begin{center} |
|
704 |
\bl{Alice says $\{m\}_K$} |
|
705 |
\end{center}\medskip\pause |
|
706 |
||
707 |
\item Decryption of Alice's message\smallskip |
|
708 |
\begin{center} |
|
709 |
\bl{\mbox{\infer{\Gamma \vdash \text{Alice}\;\text{says}\;m} |
|
62 | 710 |
{\Gamma \vdash \text{Alice}\;\text{says}\;\{m\}_K & \Gamma \vdash \text{Alice}\,\text{says}\,K}}} |
60 | 711 |
\end{center} |
712 |
\end{itemize} |
|
713 |
||
714 |
\end{frame}} |
|
715 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
716 |
||
717 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
718 |
\mode<presentation>{ |
|
719 |
\begin{frame}[c] |
|
720 |
\frametitle{Encryption} |
|
721 |
||
722 |
\begin{itemize} |
|
723 |
\item Encryption of a message\smallskip |
|
724 |
\begin{center} |
|
725 |
\bl{\mbox{\infer{\Gamma \vdash \text{Alice}\;\text{says}\;\{m\}_K} |
|
62 | 726 |
{\Gamma \vdash \text{Alice}\;\text{says}\;m & \Gamma \vdash \text{Alice}\,\text{says}\,K}}} |
60 | 727 |
\end{center} |
728 |
\end{itemize} |
|
729 |
||
730 |
\end{frame}} |
|
731 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
732 |
||
61 | 733 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
734 |
\mode<presentation>{ |
|
735 |
\begin{frame}[c] |
|
736 |
\frametitle{Public/Private Keys} |
|
737 |
||
738 |
\begin{itemize} |
|
739 |
\item Bob has a private and public key: \bl{$K_{Bob}^{pub}$}, \bl{$K_{Bob}^{priv}$}\bigskip |
|
740 |
\begin{center} |
|
741 |
\bl{\mbox{\infer{\Gamma \vdash \text{Alice}\;\text{says}\;m} |
|
742 |
{\Gamma \vdash \text{Alice}\;\text{says}\;\{m\}_{K_{Bob}^{pub}} & |
|
743 |
\Gamma \vdash K_{Bob}^{priv}}}} |
|
744 |
\end{center}\bigskip\pause |
|
745 |
||
746 |
\item this is {\bf not} a derived rule! |
|
747 |
\end{itemize} |
|
748 |
||
749 |
\end{frame}} |
|
750 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
751 |
||
752 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
753 |
\mode<presentation>{ |
|
754 |
\begin{frame}[c] |
|
755 |
\frametitle{Trusted Third Party} |
|
756 |
||
757 |
\begin{itemize} |
|
758 |
\item Alice calls Sam for a key to communicate with Bob |
|
759 |
\item Sam responds with a key that Alice can read and a key Bob can read (pre-shared) |
|
760 |
\item Alice sends the message encrypted with the key and the second key it recieved |
|
761 |
\end{itemize}\bigskip |
|
762 |
||
763 |
\begin{center} |
|
764 |
\bl{\begin{tabular}{lcl} |
|
765 |
$A$ sends $S$ &:& $\textit{Connect}(A,B)$\\ |
|
766 |
$S$ sends $A$ &:& $\{K_{AB}\}_{K_{AS}}$ \textcolor{black}{and} $\{\{K_{AB}\}_{K_{BS}}\}_{K_{AS}}$\\ |
|
767 |
$A$ sends $B$ &:& $\{K_{AB}\}_{K_{BS}}$\\ |
|
768 |
$A$ sends $B$ &:& $\{m\}_{K_{AB}}$ |
|
769 |
\end{tabular}} |
|
770 |
\end{center} |
|
771 |
||
772 |
\end{frame}} |
|
773 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
774 |
||
775 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
776 |
\mode<presentation>{ |
|
777 |
\begin{frame}[c] |
|
778 |
\frametitle{Sending Rule} |
|
779 |
||
780 |
\bl{\begin{center} |
|
781 |
\mbox{\infer{\Gamma \vdash Q \;\textit{says}\; F} |
|
782 |
{\Gamma \vdash P \;\textit{says}\; F & \Gamma \vdash P \;\textit{sends}\; Q : F}} |
|
783 |
\end{center}}\bigskip\pause |
|
784 |
||
785 |
\bl{$P \,\text{sends}\, Q : F \dn$}\\ |
|
786 |
\hspace{6mm}\bl{$(P \,\text{says}\, F) \Rightarrow (Q \,\text{says}\, F)$} |
|
787 |
||
788 |
\end{frame}} |
|
789 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
790 |
||
791 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
792 |
\mode<presentation>{ |
|
793 |
\begin{frame}[c] |
|
794 |
\frametitle{Trusted Third Party} |
|
795 |
||
796 |
\begin{center} |
|
797 |
\bl{\begin{tabular}{l} |
|
798 |
$A$ sends $S$ : $\textit{Connect}(A,B)$\\ |
|
799 |
\bl{$S \,\text{says}\, (\textit{Connect}(A,B) \Rightarrow$}\\ |
|
800 |
\hspace{2.5cm}\bl{$\{K_{AB}\}_{K_{AS}} \wedge |
|
62 | 801 |
\{\{K_{AB}\}_{K_{BS}}\}_{K_{AS}})$}\\ |
61 | 802 |
$S$ sends $A$ : $\{K_{AB}\}_{K_{AS}}$ \bl{$\wedge$} $\{\{K_{AB}\}_{K_{BS}}\}_{K_{AS}}$\\ |
803 |
$A$ sends $B$ : $\{K_{AB}\}_{K_{BS}}$\\ |
|
804 |
$A$ sends $B$ : $\{m\}_{K_{AB}}$ |
|
805 |
\end{tabular}} |
|
806 |
\end{center}\bigskip\pause |
|
807 |
||
808 |
||
809 |
\bl{$\Gamma \vdash B \,\text{says} \, m$}? |
|
810 |
\end{frame}} |
|
811 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
59 | 812 |
\end{document} |
813 |
||
814 |
%%% Local Variables: |
|
815 |
%%% mode: latex |
|
816 |
%%% TeX-master: t |
|
817 |
%%% End: |
|
818 |