Pārlūkot izejas kodu

Beweis hinzugefügt

Martin Thoma 12 gadi atpakaļ
vecāks
revīzija
71f296ac0b

+ 27 - 0
presentations/Diskrete-Mathematik/Graph_files/ForceDirected.css

@@ -0,0 +1,27 @@
+#inner-details {
+  font-size:12px;
+}
+
+span.close {
+	color:#FF5555;
+	cursor:pointer;
+	font-weight:bold;
+	margin-left:3px;
+}
+
+span.name {
+  cursor: pointer;
+}
+
+/*TOOLTIPS*/
+.tip {
+   text-align: left;
+   width:auto;
+   max-width:500px;
+}
+
+.tip-title {
+  font-size: 11px;
+  text-align:center;
+  margin-bottom:2px;
+}

+ 123 - 0
presentations/Diskrete-Mathematik/Graph_files/base.css

@@ -0,0 +1,123 @@
+html, body {
+    margin:0;
+    padding:0;
+    font-family: "Lucida Grande", Verdana;
+    font-size: 0.9em;
+    text-align: center;
+    background-color:#F2F2F2;
+}
+
+input, select {
+    font-size:0.9em;
+}
+
+table {
+    margin-top:-10px;
+    margin-left:7px;
+}
+
+h4 {
+    font-size:1.1em;
+    text-decoration:none;
+    font-weight:normal;
+    color:#23A4FF;
+}
+
+a {
+    color:#23A4FF;
+}
+
+#container {
+    width: 1000px;
+    height: 600px;
+    margin:0 auto;
+    position:relative;
+}
+
+#left-container, 
+#right-container, 
+#center-container {
+    height:600px;
+    position:absolute;
+    top:0;
+}
+
+#left-container, #right-container {
+    width:200px;
+    color:#686c70;
+    text-align: left;
+    overflow: auto;
+    background-color:#fff;
+    background-repeat:no-repeat;
+    border-bottom:1px solid #ddd;
+}
+
+#left-container {
+    left:0;
+    background-image:url('col2.png');
+    background-position:center right;
+    border-left:1px solid #ddd;
+    
+}
+
+#right-container {
+    right:0;
+    background-image:url('col1.png');
+    background-position:center left;
+    border-right:1px solid #ddd;
+}
+
+#right-container h4{
+    text-indent:8px;
+}
+
+#center-container {
+    width:600px;
+    left:200px;
+    background-color:#1a1a1a;
+    color:#ccc;
+}
+
+.text {
+    margin: 7px;
+}
+
+#inner-details {
+    font-size:0.8em;
+    list-style:none;
+    margin:7px;
+}
+
+#log {
+    position:absolute;
+    top:10px;
+    font-size:1.0em;
+    font-weight:bold;
+    color:#23A4FF;
+}
+
+
+#infovis {
+    position:relative;
+    width:600px;
+    height:600px;
+    margin:auto;
+    overflow:hidden;
+}
+
+/*TOOLTIPS*/
+.tip {
+    color: #111;
+    width: 139px;
+    background-color: white;
+    border:1px solid #ccc;
+    -moz-box-shadow:#555 2px 2px 8px;
+    -webkit-box-shadow:#555 2px 2px 8px;
+    -o-box-shadow:#555 2px 2px 8px;
+    box-shadow:#555 2px 2px 8px;
+    opacity:0.9;
+    filter:alpha(opacity=90);
+    font-size:10px;
+    font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+    padding:7px;
+}

+ 458 - 0
presentations/Diskrete-Mathematik/Graph_files/graph.js

@@ -0,0 +1,458 @@
+var labelType, useGradients, nativeTextSupport, animate;
+
+(function() {
+  var ua = navigator.userAgent,
+      iStuff = ua.match(/iPhone/i) || ua.match(/iPad/i),
+      typeOfCanvas = typeof HTMLCanvasElement,
+      nativeCanvasSupport = (typeOfCanvas == 'object' || typeOfCanvas == 'function'),
+      textSupport = nativeCanvasSupport 
+        && (typeof document.createElement('canvas').getContext('2d').fillText == 'function');
+  //I'm setting this based on the fact that ExCanvas provides text support for IE
+  //and that as of today iPhone/iPad current text support is lame
+  labelType = (!nativeCanvasSupport || (textSupport && !iStuff))? 'Native' : 'HTML';
+  nativeTextSupport = labelType == 'Native';
+  useGradients = nativeCanvasSupport;
+  animate = !(iStuff || !nativeCanvasSupport);
+})();
+
+var Log = {
+  elem: false,
+  write: function(text){
+    if (!this.elem) 
+      this.elem = document.getElementById('log');
+    this.elem.innerHTML = text;
+    this.elem.style.left = (500 - this.elem.offsetWidth / 2) + 'px';
+  }
+};
+
+
+function init(){
+  // init data
+  var json = [
+      {
+        "adjacencies": [
+            "graphnode0", 
+            {
+              "nodeTo": "graphnode1",
+              "nodeFrom": "graphnode0",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode5",
+              "nodeFrom": "graphnode0",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode9",
+              "nodeFrom": "graphnode0",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode0",
+        "name": "graphnode0"
+      }, {
+        "adjacencies": [
+            "graphnode1", 
+            {
+              "nodeTo": "graphnode8",
+              "nodeFrom": "graphnode1",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode0",
+              "nodeFrom": "graphnode1",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode2",
+              "nodeFrom": "graphnode1",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode1",
+        "name": "graphnode1"
+      }, {
+        "adjacencies": [
+            "graphnode2", 
+            {
+              "nodeTo": "graphnode1",
+              "nodeFrom": "graphnode2",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode3",
+              "nodeFrom": "graphnode2",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode6",
+              "nodeFrom": "graphnode2",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode2",
+        "name": "graphnode2"
+      }, {
+        "adjacencies": [
+            "graphnode3", 
+            {
+              "nodeTo": "graphnode2",
+              "nodeFrom": "graphnode3",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode4",
+              "nodeFrom": "graphnode3",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode9",
+              "nodeFrom": "graphnode3",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode3",
+        "name": "graphnode3"
+      }, {
+        "adjacencies": [
+            "graphnode4", 
+            {
+              "nodeTo": "graphnode3",
+              "nodeFrom": "graphnode4",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode5",
+              "nodeFrom": "graphnode4",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode8",
+              "nodeFrom": "graphnode4",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode4",
+        "name": "graphnode4"
+      }, {
+        "adjacencies": [
+            "graphnode5", 
+            {
+              "nodeTo": "graphnode4",
+              "nodeFrom": "graphnode5",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode0",
+              "nodeFrom": "graphnode5",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode6",
+              "nodeFrom": "graphnode5",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode5",
+        "name": "graphnode5"
+      }, {
+        "adjacencies": [
+            "graphnode6", 
+            {
+              "nodeTo": "graphnode5",
+              "nodeFrom": "graphnode6",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode2",
+              "nodeFrom": "graphnode6",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode7",
+              "nodeFrom": "graphnode6",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode6",
+        "name": "graphnode6"
+      }, {
+        "adjacencies": [
+            "graphnode7", 
+            {
+              "nodeTo": "graphnode6",
+              "nodeFrom": "graphnode7",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode8",
+              "nodeFrom": "graphnode7",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode9",
+              "nodeFrom": "graphnode7",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode7",
+        "name": "graphnode7"
+      }, {
+        "adjacencies": [
+            "graphnode8", 
+            {
+              "nodeTo": "graphnode1",
+              "nodeFrom": "graphnode8",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode4",
+              "nodeFrom": "graphnode8",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode7",
+              "nodeFrom": "graphnode8",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode8",
+        "name": "graphnode8"
+      }, {
+        "adjacencies": [
+            "graphnode9", 
+            {
+              "nodeTo": "graphnode0",
+              "nodeFrom": "graphnode9",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }, {
+              "nodeTo": "graphnode3",
+              "nodeFrom": "graphnode9",
+              "data": {
+                "$color": "#909291"
+              }
+            }, {
+              "nodeTo": "graphnode7",
+              "nodeFrom": "graphnode9",
+              "data": {
+                "$color": "#557EAA"
+              }
+            }
+        ],
+        "data": {
+          "$color": "#83548B",
+          "$type": "circle",
+          "$dim": 8
+        },
+        "id": "graphnode9",
+        "name": "graphnode9"
+      }
+  ];
+  // end
+  // init ForceDirected
+  var fd = new $jit.ForceDirected({
+    //id of the visualization container
+    injectInto: 'infovis',
+    //Enable zooming and panning
+    //by scrolling and DnD
+    Navigation: {
+      enable: true,
+      //Enable panning events only if we're dragging the empty
+      //canvas (and not a node).
+      panning: 'avoid nodes',
+      zooming: 10 //zoom speed. higher is more sensible
+    },
+    // Change node and edge styles such as
+    // color and width.
+    // These properties are also set per node
+    // with dollar prefixed data-properties in the
+    // JSON structure.
+    Node: {
+      overridable: true
+    },
+    Edge: {
+      overridable: true,
+      color: '#23A4FF',
+      lineWidth: 0.4
+    },
+    //Native canvas text styling
+    Label: {
+      type: labelType, //Native or HTML
+      size: 10,
+      style: 'bold'
+    },
+    //Add Tips
+    Tips: {
+      enable: true,
+      onShow: function(tip, node) {
+        //count connections
+        var count = 0;
+        node.eachAdjacency(function() { count++; });
+        //display node info in tooltip
+        tip.innerHTML = "<div class=\"tip-title\">" + node.name + "</div>"
+          + "<div class=\"tip-text\"><b>connections:</b> " + count + "</div>";
+      }
+    },
+    // Add node events
+    Events: {
+      enable: true,
+      type: 'Native',
+      //Change cursor style when hovering a node
+      onMouseEnter: function() {
+        fd.canvas.getElement().style.cursor = 'move';
+      },
+      onMouseLeave: function() {
+        fd.canvas.getElement().style.cursor = '';
+      },
+      //Update node positions when dragged
+      onDragMove: function(node, eventInfo, e) {
+          var pos = eventInfo.getPos();
+          node.pos.setc(pos.x, pos.y);
+          fd.plot();
+      },
+      //Implement the same handler for touchscreens
+      onTouchMove: function(node, eventInfo, e) {
+        $jit.util.event.stop(e); //stop default touchmove event
+        this.onDragMove(node, eventInfo, e);
+      },
+      //Add also a click handler to nodes
+      onClick: function(node) {
+        if(!node) return;
+        // Build the right column relations list.
+        // This is done by traversing the clicked node connections.
+        var html = "<h4>" + node.name + "</h4><b> connections:</b><ul><li>",
+            list = [];
+        node.eachAdjacency(function(adj){
+          list.push(adj.nodeTo.name);
+        });
+        //append connections information
+        $jit.id('inner-details').innerHTML = html + list.join("</li><li>") + "</li></ul>";
+      }
+    },
+    //Number of iterations for the FD algorithm
+    iterations: 200,
+    //Edge length
+    levelDistance: 130,
+    // Add text to the labels. This method is only triggered
+    // on label creation and only for DOM labels (not native canvas ones).
+    onCreateLabel: function(domElement, node){
+      domElement.innerHTML = node.name;
+      var style = domElement.style;
+      style.fontSize = "0.8em";
+      style.color = "#ddd";
+    },
+    // Change node styles when DOM labels are placed
+    // or moved.
+    onPlaceLabel: function(domElement, node){
+      var style = domElement.style;
+      var left = parseInt(style.left);
+      var top = parseInt(style.top);
+      var w = domElement.offsetWidth;
+      style.left = (left - w / 2) + 'px';
+      style.top = (top + 10) + 'px';
+      style.display = '';
+    }
+  });
+  // load JSON data.
+  fd.loadJSON(json);
+  // compute positions incrementally and animate.
+  fd.computeIncremental({
+    iter: 40,
+    property: 'end',
+    onStep: function(perc){
+      Log.write(perc + '% loaded...');
+    },
+    onComplete: function(){
+      Log.write('done');
+      fd.animate({
+        modes: ['linear'],
+        transition: $jit.Trans.Elastic.easeOut,
+        duration: 2500
+      });
+    }
+  });
+  // end
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 23 - 0
presentations/Diskrete-Mathematik/Graph_files/jit-yc.js


BIN
presentations/Diskrete-Mathematik/LaTeX/Graphentheorie-I.pdf


+ 6 - 0
presentations/Diskrete-Mathematik/LaTeX/Grundlagen.tex

@@ -28,6 +28,12 @@ Kantenmenge bezeichnet.
 
 \end{frame}
 
+\begin{frame}{Isomorphe Graphen}
+\begin{center}
+\href{http://www.martin-thoma.de/uni/graph.html}{martin-thoma.de/uni/graph.html}
+\end{center}
+\end{frame}
+
 \begin{frame}{Inzidenz}
 \begin{block}{Inzidenz}
 Sei $e \in E$ und $k = \Set{v_1, v_2} \in K$.

+ 97 - 6
presentations/Diskrete-Mathematik/LaTeX/Koenigsberger-Brueckenproblem.tex

@@ -26,21 +26,64 @@ Ein Graph heißt \textbf{eulersch}, wenn er einen eulerschen Kreis enthält.
 \end{block}
 \end{frame}
 
+\pgfdeclarelayer{background}
+\pgfsetlayers{background,main}
 \begin{frame}{Eulerscher Kreis}
-TODO: $K_5$ eulerkreis animieren
+    \newcommand\n{5}
+    \tikzstyle{selected edge} = [draw,line width=5pt,-,red!50]
+    \begin{center}
+    \adjustbox{max size={\textwidth}{0.8\textheight}}{
+    \begin{tikzpicture}
+        \foreach \number in {1,...,\n}{
+            \node[vertex] (N-\number) at ({\number*(360/\n)}:5.4cm) {};
+        }
+
+        \foreach \number in {1,...,\n}{
+            \foreach \y in {1,...,\n}{
+                \draw (N-\number) -- (N-\y);
+            }
+        }
+
+        \node<2->[vertex,red] (N-1) at ({1*(360/\n)}:5.4cm) {};
+
+        \begin{pgfonlayer}{background}
+            \path<2->[selected edge] (N-1.center) edge node {} (N-2.center);
+            \path<3->[selected edge] (N-2.center) edge node {} (N-3.center);
+            \path<4->[selected edge] (N-3.center) edge node {} (N-4.center);
+            \path<5->[selected edge] (N-4.center) edge node {} (N-5.center);
+            \path<6->[selected edge] (N-5.center) edge node {} (N-1.center);
+            \path<7->[selected edge] (N-1.center) edge node {} (N-3.center);
+            \path<8->[selected edge] (N-3.center) edge node {} (N-5.center);
+            \path<9->[selected edge] (N-5.center) edge node {} (N-2.center);
+            \path<10->[selected edge] (N-2.center) edge node {} (N-4.center);
+            \path<11->[selected edge](N-4.center) edge node {} (N-1.center);
+        \end{pgfonlayer}
+    \end{tikzpicture}
+    }
+    \end{center}
 \end{frame}
 
+\subsection{Satz von Euler}
 \begin{frame}{Satz von Euler}
 \begin{block}{Satz von Euler}
-Wenn ein Graph $G$ eulersch ist, dann hat jeder Knoten von $G$ geraden Grad.
+Wenn ein Graph $G$ eulersch ist, dann hat jede Ecke von $G$ geraden Grad.
 \end{block}
 
-Wenn $G$ einen Knoten mit ungeraden Grad hat, ist $G$ nicht eulersch.
+\pause
+
+$\Rightarrow$ Wenn $G$ eine Ecke mit ungeraden Grad hat, ist $G$ nicht eulersch.
+
+\pause
+
+\begin{gallery}
+    \galleryimage{vollstaendig/k-5}
+    \galleryimage{koenigsberg/koenigsberg-1}
+\end{gallery}
 \end{frame}
 
 \begin{frame}{Umkehrung des Satzes von Euler}
 \begin{block}{Umkehrung des Satzes von Euler}
-Wenn in einem zusammenhängenden Graphen $G$ jeder Knoten geraden Grad hat, dann 
+Wenn in einem zusammenhängenden Graphen $G$ jede Ecke geraden Grad hat, dann 
 ist $G$ eulersch.
 \end{block}
 
@@ -68,6 +111,54 @@ $G$ hat eine offene eulersche Linie $:\Leftrightarrow G$ hat genau zwei Ecken
 ungeraden Grades.
 \end{block}
 
-TODO: Haus des Nikolaus-Animation.
-TODO: Beweis
+\pause
+
+\begin{block}{Beweis "`$\Rightarrow"'$}
+Sei $G=(E, K)$ ein zusammenhängender Graph und $L = (e_0, \dots, e_s)$ eine offene
+eulersche Linie. \pause
+Sei $G^* = (E, K \cup \Set{e_s, e_0})$. \pause
+Es gibt einen Eulerkreis in $G^*$ \pause \\
+$\xRightarrow{\text{Satz von Euler}}$ In $G^*$ hat jede Ecke geraden Grad \pause \\
+Der Grad von nur zwei Kanten wurde um jeweils 1 erhöht \pause \\
+$\Rightarrow$ in $G$ haben genau 2 Ecken ungeraden Grad $\blacksquare$
+\end{block}
+\end{frame}
+
+\pgfdeclarelayer{background}
+\pgfsetlayers{background,main}
+\begin{frame}{Haus des Nikolaus}
+    \tikzstyle{selected edge} = [draw,line width=5pt,-,red!50]
+    \begin{center}
+    \adjustbox{max size={\textwidth}{0.8\textheight}}{
+    \begin{tikzpicture}
+        \node[vertex] (a) at (0,0) {};
+        \node[vertex] (b) at (2,0) {};
+        \node[vertex] (c) at (2,2) {};
+        \node[vertex] (d) at (0,2) {};
+        \node[vertex] (e) at (1,4) {};
+
+        \draw (a) -- (d);
+        \draw (d) -- (b);
+        \draw (b) -- (c);
+        \draw (c) -- (d);
+        \draw (d) -- (e);
+        \draw (e) -- (c);
+        \draw (c) -- (a);
+        \draw (a) -- (b);
+
+        \node<2->[vertex, red] (a) at (0,0) {};
+
+        \begin{pgfonlayer}{background}
+            \path<2->[selected edge] (a.center) edge node {} (d.center);
+            \path<3->[selected edge] (d.center) edge node {} (b.center);
+            \path<4->[selected edge] (b.center) edge node {} (c.center);
+            \path<5->[selected edge] (c.center) edge node {} (d.center);
+            \path<6->[selected edge] (d.center) edge node {} (e.center);
+            \path<7->[selected edge] (e.center) edge node {} (c.center);
+            \path<8->[selected edge] (c.center) edge node {} (a.center);
+            \path<9->[selected edge] (a.center) edge node {} (b.center);
+        \end{pgfonlayer}
+    \end{tikzpicture}
+    }
+    \end{center}
 \end{frame}

+ 21 - 0
presentations/Diskrete-Mathematik/LaTeX/graphs/haus-des-nikolaus.tex

@@ -0,0 +1,21 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{arrows,positioning} 
+\tikzset{
+    %Define standard arrow tip
+    >=stealth',
+    % Define arrow style
+    pil/.style={->,thick}
+}
+
+\begin{document}
+  \begin{tikzpicture}
+      \node (a)[vertex] at (0,8) {$a$};
+      \node (b)[vertex] at (0,4) {$b$};
+      \node (c)[vertex] at (0,0) {$c$};
+      \node (d)[vertex] at (4,4) {$d$};
+
+      \foreach \from/\to/\pos in {a/b/20,a/b/-20,a/d/0,b/c/20,b/c/-20,b/d/0,c/d/0}
+        \draw[line width=2pt] (\from) to [bend left=\pos] (\to);
+  \end{tikzpicture}
+\end{document}

+ 7 - 0
presentations/Diskrete-Mathematik/Plan/Makefile

@@ -0,0 +1,7 @@
+SOURCE = Plan
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.out

+ 121 - 0
presentations/Diskrete-Mathematik/Plan/Plan.tex

@@ -0,0 +1,121 @@
+\documentclass[a4paper,9pt]{scrartcl}
+\usepackage{amssymb, amsmath} % needed for math
+\usepackage[utf8]{inputenc} % this is needed for umlauts
+\usepackage[ngerman]{babel} % this is needed for umlauts
+\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
+\usepackage[margin=2.5cm]{geometry} %layout
+\usepackage{hyperref}   % links im text
+\usepackage{color}
+\usepackage{framed}
+\usepackage{enumerate}  % for advanced numbering of lists
+\clubpenalty  = 10000   % Schusterjungen verhindern
+\widowpenalty = 10000   % Hurenkinder verhindern
+
+\hypersetup{ 
+  pdfauthor   = {Martin Thoma}, 
+  pdfkeywords = {Lineare Algebra}, 
+  pdftitle    = {Vortrag Graphentheorie I: Tafelbild + Text} 
+} 
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Custom definition style, by                                       %
+% http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex/58164#58164
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\makeatletter
+\newdimen\errorsize \errorsize=0.2pt
+% Frame with a label at top
+\newcommand\LabFrame[2]{%
+    \fboxrule=\FrameRule
+    \fboxsep=-\errorsize
+    \textcolor{FrameColor}{%
+    \fbox{%
+      \vbox{\nobreak
+      \advance\FrameSep\errorsize
+      \begingroup
+        \advance\baselineskip\FrameSep
+        \hrule height \baselineskip
+        \nobreak
+        \vskip-\baselineskip
+      \endgroup
+      \vskip 0.5\FrameSep
+      \hbox{\hskip\FrameSep \strut
+        \textcolor{TitleColor}{\textbf{#1}}}%
+      \nobreak \nointerlineskip
+      \vskip 1.3\FrameSep
+      \hbox{\hskip\FrameSep
+        {\normalcolor#2}%
+        \hskip\FrameSep}%
+      \vskip\FrameSep
+    }}%
+}}
+\definecolor{FrameColor}{rgb}{0.25,0.25,1.0}
+\definecolor{TitleColor}{rgb}{1.0,1.0,1.0}
+
+\newenvironment{contlabelframe}[2][\Frame@Lab\ (cont.)]{% 
+  % Optional continuation label defaults to the first label plus
+  \def\Frame@Lab{#2}%
+  \def\FrameCommand{\LabFrame{#2}}%
+  \def\FirstFrameCommand{\LabFrame{#2}}%
+  \def\MidFrameCommand{\LabFrame{#1}}%
+  \def\LastFrameCommand{\LabFrame{#1}}%
+  \MakeFramed{\advance\hsize-\width \FrameRestore} 
+}{\endMakeFramed} 
+\newcounter{definition}
+\newenvironment{definition}[1]{%
+  \par
+  \refstepcounter{definition}%
+  \begin{contlabelframe}{Definition \thedefinition:\quad #1}
+ \noindent\ignorespaces}
+{\end{contlabelframe}} 
+\makeatother
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Begin document                                                    %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{document}
+\section{Königsberger Brückenproblem}
+\subsection{Beweis des Satzes von Euler}
+Tafelbild:
+
+Sie $G = (E, K)$ ein eulerscher Graph, $K$ ein Eulerkreis durch $G$ und 
+$e \in E$ eine beliebige Kante.
+Dann geht $K$ durch $e$. Nun sei $a$ die Anzahl, wie häufig $K$ durch $e$ geht.
+Offensichtlich geht der Kreis sowohl in den Knoten hinein, als auch hinaus.
+$\Rightarrow e$ hat mindestens den Knotengrad $2a$. Es kann keine weitere
+Kante geben, da jeder Eulerkreis zu $G$ alle Kanten von $G$ beinhaltet.
+$\Rightarrow e$ hat den Knotengrad $2a \Rightarrow$ Jede Ecke von $G$ hat geraden
+Grad. $\blacksquare$
+
+\subsection{Rückrichtung}
+Hat jede Ecke in einem zusammenhängendem Graphen $G$ geraden Grad, so ist $G$ eulerisch.
+
+Beweis durch Induktion über die Anzahl $m$ der Kanten.
+
+\textbf{I.A.}:
+\begin{itemize}
+    \item $m=0 \rightarrow$ trivial
+    \item $m = 1$: nicht möglich
+    \item $m = 2$: Da $G$ zusammenhängend ist, können in diesem Fall nur zwei
+Ecken zweifach miteinander verbunden sein $\Rightarrow$ auch eulersch
+\end{itemize}
+
+\textbf{I.V.}: Sei $m \in \mathbb{N}_{\geq 2}$ die Anzahl der Kanten eines 
+Graphs $G$ und jeder zusammenhängende Graph mit weniger als $m$ Kanten und 
+ausschließlich Knoten geraden Grades sei eulerisch.
+
+\textbf{I.S.} 
+
+Jeder Knoten hat mindestens Grad 2 (zusammenhängend + gerader Grad)
+$\Rightarrow$ es gibt einen Kreis in $G$. TODO
+
+Sei nun $C$ ein Kreis in $G$ mit maximaler Länge.
+
+Annahme: $C$ ist kein Eulerkreis
+
+Wir entfernen alle Kanten in $C$ aus $G$ und nennen das Ergebnis $G^*$.
+Dann hat jeder Zusammenhängende Teilgraph in $G^*$ nur Knoten geraden Grades
+und hat daher einen Eulerkreis. Dieser Eulerkreis hat keine Kante, die in $C$
+enthalten ist und könnte deshalb zu $C$ hinzugefügt werden, wodurch $C$ Länger
+werden würde $\Rightarrow$ Widerspruch $\Rightarrow C$ ist ein Eulerkreis
+$\Rightarrow G$ ist eulersch  $\blacksquare$
+ 
+\end{document}

+ 1 - 0
presentations/Diskrete-Mathematik/templates/myStyle.sty

@@ -133,3 +133,4 @@
 
 \tikzstyle{vertex}=[draw,fill=black,circle,minimum size=10pt,inner sep=0pt]
 \def\TCop{\textsuperscript{\textcopyright}} % Copyright-sign
+\usepackage{mathtools}