Merge branch 'presentation-slides'
authorNeil Smith <neil.git@njae.me.uk>
Wed, 12 Mar 2014 12:47:28 +0000 (12:47 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Wed, 12 Mar 2014 12:47:28 +0000 (12:47 +0000)
slides/aims.html [new file with mode: 0644]
slides/c1a_frequency_histogram.png [new file with mode: 0644]
slides/caesar-break.html [new file with mode: 0644]
slides/caesar-encipher.html
slides/english_frequency_histogram.png [new file with mode: 0644]
slides/vector-dot-product.svg [new file with mode: 0644]
slides/vector-subtraction.svg [new file with mode: 0644]

diff --git a/slides/aims.html b/slides/aims.html
new file mode 100644 (file)
index 0000000..fcf0c70
--- /dev/null
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Aims</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <style type="text/css">
+      /* Slideshow styles */
+      body {
+        font-size: 20px;
+      }
+      h1, h2, h3 {
+        font-weight: 400;
+        margin-bottom: 0;
+      }
+      h1 { font-size: 3em; }
+      h2 { font-size: 2em; }
+      h3 { font-size: 1.6em; }
+      a, a > code {
+        text-decoration: none;
+      }
+      code {
+        -moz-border-radius: 5px;
+        -web-border-radius: 5px;
+        background: #e7e8e2;
+        border-radius: 5px;
+        font-size: 16px;
+      }
+      .plaintext {
+        background: #272822;
+        color: #80ff80;
+        text-shadow: 0 0 20px #333;
+        padding: 2px 5px;
+      }
+      .ciphertext {
+        background: #272822;
+        color: #ff6666;
+        text-shadow: 0 0 20px #333;
+        padding: 2px 5px;
+      }
+    </style>
+  </head>
+  <body>
+    <textarea id="source">
+
+# Aims
+
+Material aimed for two (three?) audiences
+
+1. Teacher CPD
+2. In-school resources for children
+3. (Outreach resources, mainly Bletchley Park)
+
+After your suggestions on how to extend these notes to hit these audiences
+
+---
+
+# Programming != Computing
+
+> Computational thinking is like architectural thinking. Programming is like
+> bricklaying. 
+
+This course will cover four things, in increasing order of importance.
+
+1. Teach some ideas about ciphers and cryptanalysis.
+2. Show off some tools: IPython, git, doctest.
+3. Explore some different corners of Python (itertools, multiprocessing).
+4. Expose my thinking for how to solve these problems. 
+
+    </textarea>
+    <script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      var slideshow = remark.create({ ratio: "16:9" });
+    </script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/slides/c1a_frequency_histogram.png b/slides/c1a_frequency_histogram.png
new file mode 100644 (file)
index 0000000..7ccbd42
Binary files /dev/null and b/slides/c1a_frequency_histogram.png differ
diff --git a/slides/caesar-break.html b/slides/caesar-break.html
new file mode 100644 (file)
index 0000000..187719d
--- /dev/null
@@ -0,0 +1,314 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Breaking caesar ciphers</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <style type="text/css">
+      /* Slideshow styles */
+      body {
+        font-size: 20px;
+      }
+      h1, h2, h3 {
+        font-weight: 400;
+        margin-bottom: 0;
+      }
+      h1 { font-size: 3em; }
+      h2 { font-size: 2em; }
+      h3 { font-size: 1.6em; }
+      a, a > code {
+        text-decoration: none;
+      }
+      code {
+        -moz-border-radius: 5px;
+        -web-border-radius: 5px;
+        background: #e7e8e2;
+        border-radius: 5px;
+        font-size: 16px;
+      }
+      .plaintext {
+        background: #272822;
+        color: #80ff80;
+        text-shadow: 0 0 20px #333;
+        padding: 2px 5px;
+      }
+      .ciphertext {
+        background: #272822;
+        color: #ff6666;
+        text-shadow: 0 0 20px #333;
+        padding: 2px 5px;
+      }
+       .float-right {
+        float: right;
+      }
+    </style>
+  </head>
+  <body>
+    <textarea id="source">
+
+# Breaking caesar ciphers
+
+![center-aligned Caesar wheel](caesarwheel1.gif)
+
+---
+
+# Human vs Machine
+
+Slow but clever vs Dumb but fast
+
+## Human approach
+
+Ciphertext | Plaintext 
+---|---
+![left-aligned Ciphertext frequencies](c1a_frequency_histogram.png) | ![left-aligned English frequencies](english_frequency_histogram.png) 
+
+---
+
+# Human vs machine
+
+## Machine approach
+
+Brute force. 
+
+Try all keys.
+
+* How many keys to try?
+
+## Basic idea
+
+```
+for each key:
+    decipher with this key
+    how close is it to English?
+    remember the best key
+```
+
+What steps do we know how to do?
+
+---
+# How close is it to English?
+
+What does English look like?
+
+* We need a model of English.
+
+How do we define "closeness"?
+
+---
+
+# What does English look like?
+
+## Abstraction: frequency of letter counts
+
+Letter | Count
+-------|------
+a | 489107
+b | 92647
+c | 140497
+d | 267381
+e | 756288
+. | .
+. | .
+. | .
+z | 3575
+
+One way of thinking about this is a 26-dimensional vector. 
+
+Create a vector of our text, and one of idealised English. 
+
+The distance between the vectors is how far from English the text is.
+
+---
+
+# Frequencies of English
+
+But before then how do we count the letters?
+
+* Read a file into a string
+```python
+open()
+read()
+```
+* Count them
+```python
+import collections
+```
+
+---
+
+# Canonical forms
+
+Counting letters in _War and Peace_ gives all manner of junk.
+
+* Convert the text in canonical form (lower case, accents removed, non-letters stripped) before counting
+
+```python
+[l.lower() for l in text if ...]
+```
+---
+
+
+# Accents
+
+```python
+>>> caesar_encipher_letter('é', 1)
+```
+What does it produce?
+
+What should it produce?
+
+## Unicode, combining codepoints, and normal forms
+
+Text encodings will bite you when you least expect it.
+
+* urlencoding is the other pain point.
+
+---
+
+# Five minutes on StackOverflow later...
+
+```python
+def unaccent(text):
+    """Remove all accents from letters. 
+    It does this by converting the unicode string to decomposed compatibility
+    form, dropping all the combining accents, then re-encoding the bytes.
+
+    >>> unaccent('hello')
+    'hello'
+    >>> unaccent('HELLO')
+    'HELLO'
+    >>> unaccent('héllo')
+    'hello'
+    >>> unaccent('héllö')
+    'hello'
+    >>> unaccent('HÉLLÖ')
+    'HELLO'
+    """
+    return unicodedata.normalize('NFKD', text).\
+        encode('ascii', 'ignore').\
+        decode('utf-8')
+```
+
+---
+
+# Vector distances
+
+.float-right[![right-aligned Vector subtraction](vector-subtraction.svg)]
+
+Several different distance measures (__metrics__, also called __norms__):
+
+* L<sub>2</sub> norm (Euclidean distance): 
+`\(\|\mathbf{a} - \mathbf{b}\| = \sqrt{\sum_i (\mathbf{a}_i - \mathbf{b}_i)^2} \)`
+
+* L<sub>1</sub> norm (Manhattan distance, taxicab distance): 
+`\(\|\mathbf{a} - \mathbf{b}\| = \sum_i |\mathbf{a}_i - \mathbf{b}_i| \)`
+
+* L<sub>3</sub> norm: 
+`\(\|\mathbf{a} - \mathbf{b}\| = \sqrt[3]{\sum_i |\mathbf{a}_i - \mathbf{b}_i|^3} \)`
+
+The higher the power used, the more weight is given to the largest differences in components.
+
+(Extends out to:
+
+* L<sub>0</sub> norm (Hamming distance): 
+`$$\|\mathbf{a} - \mathbf{b}\| = \sum_i \left\{
+\begin{matrix} 1 &amp;\mbox{if}\ \mathbf{a}_i \neq \mathbf{b}_i , \\
+ 0 &amp;\mbox{if}\ \mathbf{a}_i = \mathbf{b}_i \end{matrix} \right. $$`
+
+* L<sub>&infin;</sub> norm: 
+`\(\|\mathbf{a} - \mathbf{b}\| = \max_i{(\mathbf{a}_i - \mathbf{b}_i)} \)`
+
+neither of which will be that useful.)
+---
+
+# Normalisation of vectors
+
+Frequency distributions drawn from different sources will have different lengths. For a fair comparison we need to scale them. 
+
+* Eucliean scaling (vector with unit length): `$$ \hat{\mathbf{x}} = \frac{\mathbf{x}}{\| \mathbf{x} \|} = \frac{\mathbf{x}}{ \sqrt{\mathbf{x}_1^2 + \mathbf{x}_2^2 + \mathbf{x}_3^2 + \dots } }$$`
+
+* Normalisation (components of vector sum to 1): `$$ \hat{\mathbf{x}} = \frac{\mathbf{x}}{\| \mathbf{x} \|} = \frac{\mathbf{x}}{ \mathbf{x}_1 + \mathbf{x}_2 + \mathbf{x}_3 + \dots }$$`
+
+---
+
+# Angle, not distance
+
+Rather than looking at the distance between the vectors, look at the angle between them.
+
+.float-right[![right-aligned Vector dot product](vector-dot-product.svg)]
+
+Vector dot product shows how much of one vector lies in the direction of another: 
+`\( \mathbf{A} \bullet \mathbf{B} = 
+\| \mathbf{A} \| \cdot \| \mathbf{B} \| \cos{\theta} \)`
+
+But, 
+`\( \mathbf{A} \bullet \mathbf{B} = \sum_i \mathbf{A}_i \cdot \mathbf{B}_i \)`
+and `\( \| \mathbf{A} \| = \sum_i \mathbf{A}_i^2 \)`
+
+A bit of rearranging give the cosine simiarity:
+`$$ \cos{\theta} = \frac{ \mathbf{A} \bullet \mathbf{B} }{ \| \mathbf{A} \| \cdot \| \mathbf{B} \| } = 
+\frac{\sum_i \mathbf{A}_i \cdot \mathbf{B}_i}{\sum_i \mathbf{A}_i^2 \times \sum_i \mathbf{B}_i^2} $$`
+
+This is independent of vector lengths!
+
+Cosine similarity is 1 if in parallel, 0 if perpendicular, -1 if antiparallel.
+
+---
+
+# An infinite number of monkeys
+
+What is the probability that this string of letters is a sample of English?
+
+Given 'th', 'e' is about six times more likely than 'a' or 'i'.
+
+## Naive Bayes, or the bag of letters
+
+Ignore letter order, just treat each letter individually.
+
+Probability of a text is `\( \prod_i p_i \)`
+
+(Implmentation issue: this can often underflow, so get in the habit of rephrasing it as `\( \sum_i \log p_i \)`)
+
+---
+
+# Which is best?
+
+   | Euclidean | Normalised
+---|-----------|------------  
+L1 |     x     |      x
+L2 |     x     |      x
+L3 |     x     |      x
+Cosine |     x     |      x
+
+And the probability measure!
+
+* Nine different ways of measuring fitness.
+
+## Computing is an empircal science
+
+
+
+    </textarea>
+    <script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript">
+    </script>
+
+    <script type="text/javascript"
+      src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"></script>
+
+    <script type="text/javascript">
+      var slideshow = remark.create({ ratio: "16:9" });
+
+      // Setup MathJax
+      MathJax.Hub.Config({
+        tex2jax: {
+        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
+        }
+      });
+      MathJax.Hub.Queue(function() {
+        $(MathJax.Hub.getAllJax()).map(function(index, elem) {
+            return(elem.SourceElement());
+        }).parent().addClass('has-jax');
+      });
+      MathJax.Hub.Configured();
+    </script>
+  </body>
+</html>
index a4d5b2df15bbec0f783b85e6a2d2658314a32742..3bc519c9b59c27f05785cced5ea703da9f715d8a 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
   <head>
-    <title>Title</title>
+    <title>Caesar cipher</title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <style type="text/css">
       /* Slideshow styles */
@@ -12,7 +12,7 @@
         font-weight: 400;
         margin-bottom: 0;
       }
-      h1 { font-size: 4em; }
+      h1 { font-size: 3em; }
       h2 { font-size: 2em; }
       h3 { font-size: 1.6em; }
       a, a > code {
@@ -64,7 +64,7 @@ ord()
 
 chr()
 
-mod()
+%
 ```
 
 * What are good test cases?
@@ -103,37 +103,13 @@ def caesar_encipher_letter(letter, shift):
     'b'
     """
     if letter in string.ascii_letters:
+    .
+    .
+    .
 ```
 
 ---
 
-# My tests
-
-```python
-def caesar_encipher_letter(letter, shift):
-    """Encipher a letter, given a shift amount
-
-    >>> caesar_encipher_letter('a', 1)
-    'b'
-    >>> caesar_encipher_letter('a', 2)
-    'c'
-    >>> caesar_encipher_letter('b', 2)
-    'd'
-    >>> caesar_encipher_letter('x', 2)
-    'z'
-    >>> caesar_encipher_letter('y', 2)
-    'a'
-    >>> caesar_encipher_letter('z', 2)
-    'b'
-    >>> caesar_encipher_letter('z', -1)
-    'y'
-    >>> caesar_encipher_letter('a', -1)
-    'z'
-    """
-    if letter in string.ascii_letters:
-```
----
-
 # The magic doctest incantation
 
 ```python
@@ -177,6 +153,8 @@ for p in plaintext:
     ciphertext += caesar_encipher_letter(p, key)
 ```
 
+...but easily generalisable
+
 ---
 
 # Doing all the letters
@@ -208,7 +186,7 @@ ciphertext = [caesar_encipher_letter(p, key) for p in plaintext]
     <script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript">
     </script>
     <script type="text/javascript">
-      var slideshow = remark.create();
+      var slideshow = remark.create({ ratio: "16:9" });
     </script>
   </body>
 </html>
\ No newline at end of file
diff --git a/slides/english_frequency_histogram.png b/slides/english_frequency_histogram.png
new file mode 100644 (file)
index 0000000..3ab182e
Binary files /dev/null and b/slides/english_frequency_histogram.png differ
diff --git a/slides/vector-dot-product.svg b/slides/vector-dot-product.svg
new file mode 100644 (file)
index 0000000..05d69c1
--- /dev/null
@@ -0,0 +1,324 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:ooo="http://xml.openoffice.org/svg/export"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.2"
+   width="250.85039"
+   height="146.49925"
+   viewBox="0 0 7079.5554 4134.5345"
+   preserveAspectRatio="xMidYMid"
+   clip-path="url(#presentation_clip_path)"
+   xml:space="preserve"
+   id="svg3769"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="vector-dot-product.svg"
+   style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata
+     id="metadata3944"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview3942"
+     showgrid="false"
+     fit-margin-top="5"
+     fit-margin-left="5"
+     fit-margin-right="15"
+     fit-margin-bottom="10"
+     inkscape:zoom="0.22425739"
+     inkscape:cx="274.82676"
+     inkscape:cy="-111.98893"
+     inkscape:window-x="49"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg3769" /><defs
+     class="ClipPathGroup"
+     id="defs3771"><clipPath
+       id="presentation_clip_path"
+       clipPathUnits="userSpaceOnUse"><rect
+         x="0"
+         y="0"
+         width="21000"
+         height="29700"
+         id="rect3774" /></clipPath></defs><defs
+     class="TextShapeIndex"
+     id="defs3776"><g
+       ooo:slide="id1"
+       ooo:id-list="id3 id4 id5 id6 id7 id8 id9 id10 id11"
+       id="g3778" /></defs><defs
+     class="EmbeddedBulletChars"
+     id="defs3780"><g
+       id="bullet-char-template(57356)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 580,1141 1163,571 580,0 -4,571 580,1141 z"
+         id="path3783"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(57354)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m 8,1128 1129,0 L 1137,0 8,0 8,1128 z"
+         id="path3786"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10146)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 174,0 602,739 174,1481 1456,739 174,0 z m 1184,739 -1049,607 350,-607 699,0 z"
+         id="path3789"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10132)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 2015,739 1276,0 717,0 l 543,543 -1086,0 0,393 1086,0 -543,545 557,0 741,-742 z"
+         id="path3792"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10007)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m 0,-2 c -7,16 -16,29 -25,39 l 381,530 c -94,256 -141,385 -141,387 0,25 13,38 40,38 9,0 21,-2 34,-5 21,4 42,12 65,25 l 27,-13 111,-251 280,301 64,-25 24,25 c 21,-10 41,-24 62,-43 C 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 c 0,-27 -21,-55 -63,-84 l 16,-20 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 c -22,-34 -53,-51 -92,-51 -42,0 -63,17 -64,51 -7,9 -10,24 -10,44 0,9 1,19 2,30 z"
+         id="path3795"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10004)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 c 0,78 14,145 41,201 34,71 87,106 158,106 53,0 88,-31 106,-94 l 23,-176 c 8,-64 28,-97 59,-98 l 735,706 c 11,11 33,17 66,17 42,0 63,-15 63,-46 l 0,-122 c 0,-36 -10,-64 -30,-84 L 442,47 C 390,-6 338,-33 285,-33 z"
+         id="path3798"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(9679)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 c 0,181 53,324 160,431 106,107 249,161 430,161 179,0 323,-54 432,-161 108,-107 162,-251 162,-431 0,-180 -54,-324 -162,-431 C 1136,54 992,0 813,0 z"
+         id="path3801"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(8226)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m 346,457 c -73,0 -137,26 -191,78 -54,51 -81,114 -81,188 0,73 27,136 81,188 54,52 118,78 191,78 73,0 134,-26 185,-79 51,-51 77,-114 77,-187 0,-75 -25,-137 -76,-188 -50,-52 -112,-78 -186,-78 z"
+         id="path3804"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(8211)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m -4,459 1139,0 0,147 -1139,0 0,-147 z"
+         id="path3807"
+         inkscape:connector-curvature="0" /></g></defs><defs
+     class="TextEmbeddedBitmaps"
+     id="defs3809" /><g
+     id="g3811"
+     transform="translate(-2743.778,-7554.8889)"><g
+       id="id2"
+       class="Master_Slide"><g
+         id="bg-id2"
+         class="Background" /><g
+         id="bo-id2"
+         class="BackgroundObjects" /></g></g><g
+     class="SlideGroup"
+     id="g3816"
+     transform="translate(-2743.778,-7554.8889)"><g
+       id="g3818"><g
+         id="id1"
+         class="Slide"
+         clip-path="url(#presentation_clip_path)"><g
+           class="Page"
+           id="g3821"><g
+             class="com.sun.star.drawing.CustomShape"
+             id="g3823"><g
+               id="id3"><path
+                 d="m 5276,9860 -7,-31 -7,-30 -9,-30 -9,-30 -10,-30 -10,-30 -12,-29 -12,-29 -13,-28 -13,-29 -15,-27 -15,-28 -15,-27 -17,-27 -17,-26 -995,671 1176,-240 z m 24,-960 0,0 z m -2401,2401 0,0 z"
+                 id="path3826"
+                 inkscape:connector-curvature="0"
+                 style="fill:#ffffff;stroke:none" /><path
+                 d="m 5276,9860 -7,-31 -7,-30 -9,-30 -9,-30 -10,-30 -10,-30 -12,-29 -12,-29 -13,-28 -13,-29 -15,-27 -15,-28 -15,-27 -17,-27 -17,-26 -995,671 1176,-240 z"
+                 id="path3828"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000" /><path
+                 d="m 5300,8900 0,0 z"
+                 id="path3830"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000" /><path
+                 d="m 2899,11301 0,0 z"
+                 id="path3832"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000" /></g></g><g
+             class="com.sun.star.drawing.LineShape"
+             id="g3834"><g
+               id="id4"><path
+                 d="M 4000,10100 7145,7943"
+                 id="path3837"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7500,7700 -456,131 170,247 286,-378 z"
+                 id="path3839"
+                 inkscape:connector-curvature="0"
+                 style="fill:#000000;stroke:none" /></g></g><g
+             class="com.sun.star.drawing.LineShape"
+             id="g3841"><g
+               id="id5"><path
+                 d="M 4000,10100 8979,9086"
+                 id="path3844"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 9400,9000 -471,-57 60,294 411,-237 z"
+                 id="path3846"
+                 inkscape:connector-curvature="0"
+                 style="fill:#000000;stroke:none" /></g></g><g
+             class="com.sun.star.drawing.LineShape"
+             id="g3848"><g
+               id="id6"><path
+                 d="m 7800,9300 -9,-50"
+                 id="path3851"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7781,9200 -9,-50"
+                 id="path3853"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7762,9099 -9,-50"
+                 id="path3855"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7744,8999 -10,-50"
+                 id="path3857"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7725,8899 -10,-50"
+                 id="path3859"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7706,8799 -9,-50"
+                 id="path3861"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7687,8698 -9,-50"
+                 id="path3863"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7668,8598 -9,-50"
+                 id="path3865"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7650,8498 -10,-50"
+                 id="path3867"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7631,8398 -10,-50"
+                 id="path3869"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7612,8297 -9,-50"
+                 id="path3871"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7593,8197 -9,-50"
+                 id="path3873"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7574,8097 -9,-50"
+                 id="path3875"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7556,7997 -10,-50"
+                 id="path3877"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7537,7896 -10,-50"
+                 id="path3879"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7518,7796 -9,-50"
+                 id="path3881"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /></g></g><g
+             class="com.sun.star.drawing.TextShape"
+             id="g3883"><g
+               id="id7"><text
+                 class="TextShape"
+                 id="text3886"><tspan
+                   class="TextParagraph"
+                   font-size="635px"
+                   font-weight="700"
+                   id="tspan3888"
+                   style="font-size:635px;font-weight:700;font-family:'Arial, sans-serif'"><tspan
+                     class="TextPosition"
+                     x="5150"
+                     y="8501"
+                     id="tspan3890"><tspan
+                       id="tspan3892"
+                       style="fill:#000000;stroke:none">a</tspan></tspan></tspan></text>
+</g></g><g
+             class="com.sun.star.drawing.TextShape"
+             id="g3894"><g
+               id="id8"><text
+                 class="TextShape"
+                 id="text3897"><tspan
+                   class="TextParagraph"
+                   font-size="635px"
+                   font-weight="700"
+                   id="tspan3899"
+                   style="font-size:635px;font-weight:700;font-family:'Arial, sans-serif'"><tspan
+                     class="TextPosition"
+                     x="8750"
+                     y="8839"
+                     id="tspan3901"><tspan
+                       id="tspan3903"
+                       style="fill:#000000;stroke:none">b</tspan></tspan></tspan></text>
+</g></g><g
+             class="com.sun.star.drawing.TextShape"
+             id="g3905"><g
+               id="id9"><text
+                 class="TextShape"
+                 id="text3908"><tspan
+                   class="TextParagraph"
+                   font-size="635px"
+                   font-weight="700"
+                   id="tspan3910"
+                   style="font-size:635px;font-weight:700;font-family:Symbol"><tspan
+                     class="TextPosition"
+                     x="5750"
+                     y="9568"
+                     id="tspan3912"><tspan
+                       id="tspan3914"
+                       style="fill:#000000;stroke:none">q</tspan></tspan></tspan></text>
+</g></g><g
+             class="com.sun.star.drawing.ClosedBezierShape"
+             id="g3916"><g
+               id="id10"><path
+                 d="m 4550,10183 c 27,70 78,114 152,134 75,20 174,20 297,0 l 621,-103 c 59,-10 115,-14 168,-11 53,2 102,10 147,24 45,13 85,31 121,54 36,23 66,50 90,81 l 4,0 c -1,-34 6,-67 22,-98 15,-31 38,-60 67,-86 30,-26 67,-49 111,-68 45,-19 96,-33 154,-43 l 620,-103 c 125,-20 213,-51 263,-92 51,-40 63,-96 37,-165 l -27,-69 225,-38 58,152 c 38,101 22,184 -47,249 -69,66 -185,113 -349,140 l -630,104 c -72,12 -132,28 -179,48 -47,19 -82,42 -107,69 -24,26 -39,56 -43,90 -5,34 0,71 16,111 l -225,37 c -15,-40 -37,-74 -65,-103 -28,-28 -62,-50 -103,-66 -40,-15 -88,-25 -143,-27 -56,-3 -120,2 -193,14 l -629,104 c -79,13 -152,19 -220,16 -68,-3 -128,-13 -182,-31 -54,-18 -100,-44 -138,-78 -38,-34 -67,-76 -86,-126 l -57,-152 224,-37 26,69 z"
+                 id="path3919"
+                 inkscape:connector-curvature="0"
+                 style="fill:#000000;stroke:none" /></g></g><g
+             class="com.sun.star.drawing.TextShape"
+             id="g3921"><g
+               id="id11"><text
+                 class="TextShape"
+                 id="text3924"><tspan
+                   class="TextParagraph"
+                   font-size="635px"
+                   font-weight="700"
+                   id="tspan3926"
+                   style="font-size:635px;font-weight:700;font-family:'Arial, sans-serif'"><tspan
+                     class="TextPosition"
+                     x="5927"
+                     y="11401"
+                     id="tspan3928"><tspan
+                       id="tspan3930"
+                       style="fill:#000000;stroke:none">a</tspan><tspan
+                       font-weight="400"
+                       id="tspan3932"
+                       style="font-weight:400;fill:#000000;stroke:none" /></tspan><tspan
+                     class="TextPosition"
+                     y="11191"
+                     id="tspan3934"><tspan
+                       font-size="368px"
+                       id="tspan3936"
+                       style="font-size:368px;fill:#000000;stroke:none">. </tspan></tspan><tspan
+                     class="TextPosition"
+                     y="11401"
+                     id="tspan3938"><tspan
+                       id="tspan3940"
+                       style="fill:#000000;stroke:none">b</tspan></tspan></tspan></text>
+</g></g></g></g></g></g></svg>
\ No newline at end of file
diff --git a/slides/vector-subtraction.svg b/slides/vector-subtraction.svg
new file mode 100644 (file)
index 0000000..325257f
--- /dev/null
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:ooo="http://xml.openoffice.org/svg/export"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.2"
+   width="228.54137"
+   height="103.12974"
+   viewBox="0 0 6449.9453 2910.5504"
+   preserveAspectRatio="xMidYMid"
+   clip-path="url(#presentation_clip_path)"
+   xml:space="preserve"
+   id="svg3457"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="vector-subtraction.svg"
+   style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata
+     id="metadata3571"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1317"
+     inkscape:window-height="744"
+     id="namedview3569"
+     showgrid="false"
+     inkscape:zoom="0.56729519"
+     inkscape:cx="-37.834655"
+     inkscape:cy="-939.45952"
+     inkscape:window-x="49"
+     inkscape:window-y="24"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg3457"
+     fit-margin-top="5"
+     fit-margin-left="5"
+     fit-margin-right="10"
+     fit-margin-bottom="5" /><defs
+     class="ClipPathGroup"
+     id="defs3459"><clipPath
+       id="presentation_clip_path"
+       clipPathUnits="userSpaceOnUse"><rect
+         x="0"
+         y="0"
+         width="21000"
+         height="29700"
+         id="rect3462" /></clipPath></defs><defs
+     class="TextShapeIndex"
+     id="defs3464"><g
+       ooo:slide="id1"
+       ooo:id-list="id3 id4 id5 id6 id7 id8"
+       id="g3466" /></defs><defs
+     class="EmbeddedBulletChars"
+     id="defs3468"><g
+       id="bullet-char-template(57356)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 580,1141 1163,571 580,0 -4,571 580,1141 z"
+         id="path3471"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(57354)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m 8,1128 1129,0 L 1137,0 8,0 8,1128 z"
+         id="path3474"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10146)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 174,0 602,739 174,1481 1456,739 174,0 z m 1184,739 -1049,607 350,-607 699,0 z"
+         id="path3477"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10132)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 2015,739 1276,0 717,0 l 543,543 -1086,0 0,393 1086,0 -543,545 557,0 741,-742 z"
+         id="path3480"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10007)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m 0,-2 c -7,16 -16,29 -25,39 l 381,530 c -94,256 -141,385 -141,387 0,25 13,38 40,38 9,0 21,-2 34,-5 21,4 42,12 65,25 l 27,-13 111,-251 280,301 64,-25 24,25 c 21,-10 41,-24 62,-43 C 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 c 0,-27 -21,-55 -63,-84 l 16,-20 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 c -22,-34 -53,-51 -92,-51 -42,0 -63,17 -64,51 -7,9 -10,24 -10,44 0,9 1,19 2,30 z"
+         id="path3483"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(10004)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 c 0,78 14,145 41,201 34,71 87,106 158,106 53,0 88,-31 106,-94 l 23,-176 c 8,-64 28,-97 59,-98 l 735,706 c 11,11 33,17 66,17 42,0 63,-15 63,-46 l 0,-122 c 0,-36 -10,-64 -30,-84 L 442,47 C 390,-6 338,-33 285,-33 z"
+         id="path3486"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(9679)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 c 0,181 53,324 160,431 106,107 249,161 430,161 179,0 323,-54 432,-161 108,-107 162,-251 162,-431 0,-180 -54,-324 -162,-431 C 1136,54 992,0 813,0 z"
+         id="path3489"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(8226)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m 346,457 c -73,0 -137,26 -191,78 -54,51 -81,114 -81,188 0,73 27,136 81,188 54,52 118,78 191,78 73,0 134,-26 185,-79 51,-51 77,-114 77,-187 0,-75 -25,-137 -76,-188 -50,-52 -112,-78 -186,-78 z"
+         id="path3492"
+         inkscape:connector-curvature="0" /></g><g
+       id="bullet-char-template(8211)"
+       transform="scale(4.8828125e-4,-4.8828125e-4)"><path
+         d="m -4,459 1139,0 0,147 -1139,0 0,-147 z"
+         id="path3495"
+         inkscape:connector-curvature="0" /></g></defs><defs
+     class="TextEmbeddedBitmaps"
+     id="defs3497" /><g
+     id="g3499"
+     transform="translate(-3808.889,-7437.7619)"><g
+       id="id2"
+       class="Master_Slide"><g
+         id="bg-id2"
+         class="Background" /><g
+         id="bo-id2"
+         class="BackgroundObjects" /></g></g><g
+     class="SlideGroup"
+     id="g3504"
+     transform="translate(-3808.889,-7437.7619)"><g
+       id="g3506"><g
+         id="id1"
+         class="Slide"
+         clip-path="url(#presentation_clip_path)"><g
+           class="Page"
+           id="g3509"><g
+             class="com.sun.star.drawing.LineShape"
+             id="g3511"><g
+               id="id3"><path
+                 d="M 4000,10100 7145,7943"
+                 id="path3514"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7500,7700 -456,131 170,247 286,-378 z"
+                 id="path3516"
+                 inkscape:connector-curvature="0"
+                 style="fill:#000000;stroke:none" /></g></g><g
+             class="com.sun.star.drawing.LineShape"
+             id="g3518"><g
+               id="id4"><path
+                 d="M 4000,10100 8979,9086"
+                 id="path3521"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 9400,9000 -471,-57 60,294 411,-237 z"
+                 id="path3523"
+                 inkscape:connector-curvature="0"
+                 style="fill:#000000;stroke:none" /></g></g><g
+             class="com.sun.star.drawing.LineShape"
+             id="g3525"><g
+               id="id5"><path
+                 d="M 9400,9000 7855,7943"
+                 id="path3528"
+                 inkscape:connector-curvature="0"
+                 style="fill:none;stroke:#000000;stroke-width:100" /><path
+                 d="m 7500,7700 287,378 169,-248 -456,-130 z"
+                 id="path3530"
+                 inkscape:connector-curvature="0"
+                 style="fill:#000000;stroke:none" /></g></g><g
+             class="com.sun.star.drawing.TextShape"
+             id="g3532"><g
+               id="id6"><text
+                 class="TextShape"
+                 id="text3535"><tspan
+                   class="TextParagraph"
+                   font-size="635px"
+                   font-weight="700"
+                   id="tspan3537"
+                   style="font-size:635px;font-weight:700;font-family:'Arial, sans-serif'"><tspan
+                     class="TextPosition"
+                     x="5150"
+                     y="8501"
+                     id="tspan3539"><tspan
+                       id="tspan3541"
+                       style="fill:#000000;stroke:none">a</tspan></tspan></tspan></text>
+</g></g><g
+             class="com.sun.star.drawing.TextShape"
+             id="g3543"><g
+               id="id7"><text
+                 class="TextShape"
+                 id="text3546"><tspan
+                   class="TextParagraph"
+                   font-size="635px"
+                   font-weight="700"
+                   id="tspan3548"
+                   style="font-size:635px;font-weight:700;font-family:'Arial, sans-serif'"><tspan
+                     class="TextPosition"
+                     x="7250"
+                     y="10201"
+                     id="tspan3550"><tspan
+                       id="tspan3552"
+                       style="fill:#000000;stroke:none">b</tspan></tspan></tspan></text>
+</g></g><g
+             class="com.sun.star.drawing.TextShape"
+             id="g3554"><g
+               id="id8"><text
+                 class="TextShape"
+                 id="text3557"><tspan
+                   class="TextParagraph"
+                   font-size="635px"
+                   font-weight="400"
+                   id="tspan3559"
+                   style="font-size:635px;font-weight:400;font-family:'Arial, sans-serif'"><tspan
+                     class="TextPosition"
+                     x="8697"
+                     y="8039"
+                     id="tspan3561"><tspan
+                       font-weight="700"
+                       id="tspan3563"
+                       style="font-weight:700;fill:#000000;stroke:none">a</tspan><tspan
+                       id="tspan3565"
+                       style="fill:#000000;stroke:none"> - </tspan><tspan
+                       font-weight="700"
+                       id="tspan3567"
+                       style="font-weight:700;fill:#000000;stroke:none">b</tspan></tspan></tspan></text>
+</g></g></g></g></g></g></svg>
\ No newline at end of file