diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-10-14 17:26:33 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-10-14 17:26:33 +0200 |
| commit | f54265acd6883485d4e307ba8bfc0068ffa8ef00 (patch) | |
| tree | 5a4224a394fb4da884cf94154ea210e5110f8aa7 | |
| parent | dd1895183964f9bb510daec5dcf297d79da87fb9 (diff) | |
| download | unterricht-f54265acd6883485d4e307ba8bfc0068ffa8ef00.tar.gz unterricht-f54265acd6883485d4e307ba8bfc0068ffa8ef00.zip | |
improve BFS slides and add missing edge to graph
| -rw-r--r-- | Info/11/NTG/1/Breitensuche/slides.md | 64 | ||||
| -rw-r--r-- | Info/11/NTG/1/ManfredsLabyrinth/manfreds_labyrinth_graph.tikz | 4 |
2 files changed, 38 insertions, 30 deletions
diff --git a/Info/11/NTG/1/Breitensuche/slides.md b/Info/11/NTG/1/Breitensuche/slides.md index b12ae492..f0495130 100644 --- a/Info/11/NTG/1/Breitensuche/slides.md +++ b/Info/11/NTG/1/Breitensuche/slides.md @@ -241,7 +241,7 @@ Manfred hat einen Wasserrohrbruch in seinem Wohnzimmer! ## \faIcon{pencil-alt} Arbeitsauftrag: Modellierung als Graph \hfill 7 min -Bearbeite die Teilaufgaben **a)** und **b)** auf deinem Arbeitsblatt. +Bearbeite die Teilaufgaben **b)** und **c)** auf deinem Arbeitsblatt. ## Modellierung als Graph @@ -283,7 +283,7 @@ Beginnend bei einem \boldred{Startknoten} werden alle anderen Knoten \underline{ Führe die Breitensuche auf deinem Arbeitsblatt durch und nimm Stellung zu der Aussage: \vspace{0.5cm} -> Unabhängig vom Graphen werde bei der Breitensuche alle Knoten besucht. +> Unabhängig vom Graphen werden bei der Breitensuche alle Knoten besucht. ## \faIcon{pencil-alt} Arbeitsauftrag @@ -296,6 +296,7 @@ Der Computer hat mit unserem menschlichen Vorgehen noch Probleme, denn er sieht 1. Wie kann sich der Computer merken welche Knoten markiert sind? 2. Wie kann der Computer sicherstellen, dass die Knoten in der richtigen Reihenfolge markiert werden? +\pause ### Lösungen \faIcon[regular]{lightbulb} 1. Ein neues Array um die Markierungen zu speichern oder ein neues Attribut `besucht` der Klasse `Knoten` @@ -348,6 +349,7 @@ Führe die Breitensuche wie der Computer an Manfreds Labyrinth durch. (v7) -- (v11), (v9) -- (v11), (v9) -- (v10), + (v10) -- (v11), (v11) -- (v12), (v12) -- (v13), (v13) -- (v16), @@ -363,65 +365,69 @@ Führe die Breitensuche wie der Computer an Manfreds Labyrinth durch. }; \only<1,2>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange:}; +\node[draw, minimum width=5.7cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange:}; }\only<3>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 7}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 7}; }\only<4>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{7}}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{7}}; }\only<5>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 2,9,11}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 2,9,11}; }\only<6>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{2},9,11}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{2},9,11}; }\only<7>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 9,11,1,4}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 9,11,1,4}; }\only<8>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{9},11,1,4}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{9},11,1,4}; }\only<9>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 11,1,4,6,10}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 11,1,4,6,10}; }\only<10>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{11},1,4,6,10}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{11},1,4,6,10}; }\only<11>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 1,4,6,10,8,12,15}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 1,4,6,10,8,12,15}; }\only<12>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{1},4,6,10,8,12,15}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{1},4,6,10,8,12,15}; }\only<13>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{4},6,10,8,12,15}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{4},6,10,8,12,15}; }\only<14>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 6,10,8,12,15,3}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 6,10,8,12,15,3}; }\only<15>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{6},10,8,12,15,3}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{6},10,8,12,15,3}; }\only<16>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{10},8,12,15,3}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{10},8,12,15,3}; }\only<17>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 8,12,15,3,13}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 8,12,15,3,13}; }\only<18>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{8},12,15,3,13}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{8},12,15,3,13}; }\only<19>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 12,15,3,13,5,14}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 12,15,3,13,5,14}; }\only<20>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{12},15,3,13,5,14}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{12},15,3,13,5,14}; }\only<21>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{15},3,13,5,14}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{15},3,13,5,14}; }\only<22>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: 3,13,5,14,16}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: 3,13,5,14,16}; }\only<23>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{3},13,5,14,16}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{3},13,5,14,16}; }\only<24>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{13},5,14,16}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{13},5,14,16}; }\only<25>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{5},14,16}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{5},14,16}; }\only<26>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{14},16}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{14},16}; }\only<27>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: \sout{16}}; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: \sout{16}}; }\only<28>{ -\node[draw, minimum width=5.5cm, align=left] at (2.2, -1) {Warteschlange: }; +\node[draw, minimum width=5.5cm, text width=5.5cm, anchor=west] at (0.2, -1) {Warteschlange: }; } \end{tikzpicture} :::: :::: {.column width=50%}  + +\only<28>{ +Besuchsreihenfolge: 7, 2, 9, 11, 1, 4, 6, 10, 8, 12, 15, 3, 13, 5 , 14, 16 +} :::: ::: diff --git a/Info/11/NTG/1/ManfredsLabyrinth/manfreds_labyrinth_graph.tikz b/Info/11/NTG/1/ManfredsLabyrinth/manfreds_labyrinth_graph.tikz index 40e09780..07ccb18b 100644 --- a/Info/11/NTG/1/ManfredsLabyrinth/manfreds_labyrinth_graph.tikz +++ b/Info/11/NTG/1/ManfredsLabyrinth/manfreds_labyrinth_graph.tikz @@ -8,7 +8,7 @@ \node[graph vertex, first] (v7) at (2.80, 3.00) {7}; \node[graph vertex, third] (v8) at (1.40, 2.25) {8}; \node[graph vertex, second] (v9) at (4.00, 2.55) {9}; -\node[graph vertex, third] (v10) at (5.50, 2.00) {10}; +\node[graph vertex, third] (v10) at (5.50, 2.20) {10}; \node[graph vertex, second] (v11) at (2.90, 1.50) {11}; \node[graph vertex, third] (v12) at (4.20, 1.25) {12}; \node[graph vertex, fourth] (v13) at (5.50, 1.00) {13}; @@ -28,6 +28,8 @@ (v7) -- (v11), (v9) -- (v11), (v9) -- (v10), + (v9) -- (v11), + (v10) -- (v11), (v11) -- (v12), (v12) -- (v13), (v13) -- (v16), |
