15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

c○: Michael Kohlhase 17<br />

Can be represented as<br />

⎧<br />

⎫<br />

〈a, e〉, 〈e, i〉, 〈i, j〉,<br />

⎪⎨<br />

〈f, j〉, 〈f, g〉, 〈g, h〉, ⎪⎬<br />

<br />

〈d, h〉, 〈g, k〉, 〈a, b〉<br />

⎪⎩<br />

〈m, n〉, 〈n, o〉, 〈b, c〉<br />

〈k, o〉, 〈o, p〉, 〈l, p〉<br />

, a, p<br />

⎪⎭<br />

Mazes as Graphs (Visualizing Graphs via Diagrams)<br />

Graphs are very abstract objects, we need a good, intuitive way of thinking about them. We<br />

use diagrams, where the nodes are visualized as dots and the edges as lines between them.<br />

Our maze<br />

⎧<br />

⎫<br />

〈a, e〉, 〈e, i〉, 〈i, j〉,<br />

⎪⎨<br />

〈f, j〉, 〈f, g〉, 〈g, h〉, ⎪⎬<br />

<br />

〈d, h〉, 〈g, k〉, 〈a, b〉<br />

⎪⎩<br />

〈m, n〉, 〈n, o〉, 〈b, c〉<br />

〈k, o〉, 〈o, p〉, 〈l, p〉<br />

, a, p<br />

⎪⎭<br />

can be visualized as<br />

Note that the diagram is a visualization (a representation intended for humans to process<br />

visually) of the graph, and not the graph itself.<br />

c○: Michael Kohlhase 18<br />

Now that we have a mathematical model for mazes, we can look at the subclass of graphs that<br />

correspond to the mazes that we are after: unique solutions and all rooms are reachable! We will<br />

concentrate on the first requirement now and leave the second one for later.<br />

Unique solutions<br />

12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!