weds slides
|
@ -309,29 +309,33 @@ schedule:
|
|||
- date: 10/03/22
|
||||
topic: "Composite Data Structures, Stacks, Shortest Path"
|
||||
dow: Mon
|
||||
section_b:
|
||||
slides: slide/14b-QueueStackApps.html
|
||||
- date: 10/05/22
|
||||
topic: "Queues, Shortest Path revisited"
|
||||
dow: Wed
|
||||
section_b:
|
||||
slides: slide/15b-Graphs.html
|
||||
- date: 10/07/22
|
||||
due: PA2-Tests
|
||||
topic: Graphs Intro
|
||||
dow: Fri
|
||||
- week: 7
|
||||
lectures:
|
||||
- date: 10/10/22
|
||||
topic: "Graph ADTs: Edge Lists"
|
||||
due: PA2-Tests
|
||||
dow: Mon
|
||||
- date: 10/12/22
|
||||
topic: DFS, BFS, Analysis
|
||||
dow: Wed
|
||||
- date: 10/14/22
|
||||
due: PA2
|
||||
topic: Priority Queues, Orderings
|
||||
dow: Fri
|
||||
- week: 8
|
||||
lectures:
|
||||
- date: 10/17/22
|
||||
topic: Midterm Review
|
||||
due: PA2
|
||||
dow: Mon
|
||||
- date: 10/19/22
|
||||
special: Midterm Exam
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
template: templates/cse250_2022_slides.erb
|
||||
title: Average Runtime, Stacks, Queues
|
||||
date: Sept 30, 2022
|
||||
textbook: Ch. 15
|
||||
textbook: Ch. 15, Ch. 7
|
||||
---
|
||||
|
||||
<section>
|
||||
|
|
|
@ -0,0 +1,617 @@
|
|||
---
|
||||
template: templates/cse250_2022_slides.erb
|
||||
title: Average Runtime, Stacks, Queues
|
||||
date: Oct 3, 2022
|
||||
textbook: Ch. 7
|
||||
cat: graphics/14b/cat.png
|
||||
---
|
||||
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Stacks</h4>
|
||||
|
||||
<p>A stack of objects on top of one another.</p>
|
||||
|
||||
<dl>
|
||||
<dt>Push</dt>
|
||||
<dd>Put a new object on top of the stack</dd>
|
||||
|
||||
<dt>Pop</dt>
|
||||
<dd>Remove the object on top of the stack</dd>
|
||||
|
||||
<dt>Top</dt>
|
||||
<dd>Peek at what's on top of the stack</dd>
|
||||
</dl>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Queue</h4>
|
||||
|
||||
<p>Outside of the US, "queueing" is lining up.</p>
|
||||
|
||||
<dl>
|
||||
<dt>Enqueue</dt>
|
||||
<dd>Put a new object at the end of the queue</dd>
|
||||
|
||||
<dt>Dequeue</dt>
|
||||
<dd>Remove the next object in the queue</dd>
|
||||
|
||||
<dt>Head</dt>
|
||||
<dd>Peek at the next object in the queue</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p style="font-size: 90%"><b>Thought question:</b> How could you use an array to build a queue?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">ArrayBuffer Attempt 1</h4>
|
||||
|
||||
<dl>
|
||||
<dt>Enqueue</dt>
|
||||
<dd>Append</dd>
|
||||
|
||||
<dt>Dequeue</dt>
|
||||
<dd>Remove(0)</dd>
|
||||
</dl>
|
||||
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">ArrayBuffer Attempt 2</h4>
|
||||
|
||||
<dl>
|
||||
<dt>Enqueue</dt>
|
||||
<dd>Insert(0)</dd>
|
||||
|
||||
<dt>Dequeue</dt>
|
||||
<dd>Remove(last)</dd>
|
||||
</dl>
|
||||
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>Can we avoid having to move all of the<br> elements forward or backward a spot?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
||||
<style type="text/css">
|
||||
#dequeue_example {
|
||||
height: 500px;
|
||||
width: 500px;
|
||||
border: solid 1px black;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
#dequeue_example .dequeue_node {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: inline-block;
|
||||
color: lightgray;
|
||||
background: black;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 5px;
|
||||
}
|
||||
#dequeue_example .dequeue_node.dequeue_end {
|
||||
border-bottom: solid 10px green;
|
||||
}
|
||||
#dequeue_example .dequeue_node.dequeue_start {
|
||||
border-bottom: solid 10px blue;
|
||||
}
|
||||
#dequeue_example .dequeue_node.dequeue_end.dequeue_start {
|
||||
border-bottom: solid 10px green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<button onclick="dequeue_enqueue()">Enqueue</button>
|
||||
<button onclick="dequeue_dequeue()">Dequeue</button>
|
||||
<div id="dequeue_example">
|
||||
<div class="dequeue_node dequeue_start dequeue_end ">_</div>
|
||||
<div class="dequeue_node">_</div>
|
||||
<div class="dequeue_node">_</div>
|
||||
<div class="dequeue_node">_</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dequeue = document.getElementById("dequeue_example")
|
||||
|
||||
var dequeue_counter = 0
|
||||
|
||||
function dequeue_expand() {
|
||||
var values = []
|
||||
var x
|
||||
while(x = dequeue_dequeue()){
|
||||
values.push(x)
|
||||
}
|
||||
console.log("Copying values: "+values)
|
||||
var count = dequeue.children.length * 2
|
||||
dequeue.innerText = ""
|
||||
for(x = 0; x < count; x++){
|
||||
var elem = document.createElement('div')
|
||||
elem.classList.add("dequeue_node")
|
||||
console.log("Update "+x)
|
||||
if(x == 0){
|
||||
console.log("Start")
|
||||
elem.classList.add("dequeue_start")
|
||||
}
|
||||
if(x == values.length){
|
||||
console.log("End")
|
||||
elem.classList.add("dequeue_end")
|
||||
}
|
||||
if(x < values.length){
|
||||
console.log("Existing: "+values[x])
|
||||
elem.innerText = values[x]
|
||||
} else {
|
||||
console.log("Blank")
|
||||
elem.innerText = "_"
|
||||
}
|
||||
dequeue.append(elem)
|
||||
}
|
||||
|
||||
}
|
||||
function dequeue_enqueue() {
|
||||
var node = dequeue.querySelector(".dequeue_end")
|
||||
var next = node.nextElementSibling || dequeue.firstElementChild
|
||||
if(next.classList.contains("dequeue_start")){
|
||||
dequeue_expand()
|
||||
node = dequeue.querySelector(".dequeue_end")
|
||||
next = node.nextElementSibling || dequeue.firstElementChild
|
||||
}
|
||||
node.innerText = dequeue_counter++
|
||||
node.classList.add("active")
|
||||
node.classList.remove("dequeue_end")
|
||||
next.classList.add("dequeue_end")
|
||||
}
|
||||
function dequeue_dequeue() {
|
||||
var node = dequeue.querySelector(".dequeue_start")
|
||||
var next = node.nextElementSibling || dequeue.firstElementChild
|
||||
if(node.classList.contains("dequeue_end")){ return null }
|
||||
var ret = node.innerText
|
||||
node.innerText = "_"
|
||||
node.classList.remove("active")
|
||||
node.classList.remove("dequeue_start")
|
||||
next.classList.add("dequeue_start")
|
||||
return ret
|
||||
}
|
||||
</script>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">ArrayDequeue (Resizable Ring Buffer)</h4>
|
||||
|
||||
<p>Active Array = [start, end)</p>
|
||||
|
||||
<dl style="font-size: 80%">
|
||||
<dt>Enqueue</dt>
|
||||
<dd>Resize buffer if needed</dd>
|
||||
<dd>Add new element at buffer[end]</dd>
|
||||
<dd>Advance end pointer (wrap around to front)</dd>
|
||||
|
||||
<dt>Dequeue</dt>
|
||||
<dd>Remove element at buffer[start]</dd>
|
||||
<dd>Advance start pointer (wrap around to front)</dd>
|
||||
</dl>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Applications of Stacks and Queues</h4>
|
||||
|
||||
<ul>
|
||||
<li class="fragment highlight-blue">Stack: Checking for Balanced Parenthesis/Braces</li>
|
||||
<li>Queue: Scheduling Packets for Delivery</li>
|
||||
<li>Both: Searching Mazes</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Balanced Parenthesis/Braces</h4>
|
||||
|
||||
<p>What does it mean for parenthesis/braces to be balanced?</p>
|
||||
|
||||
<ul>
|
||||
<li>Every opening symbol is matched by a closing symbol</li>
|
||||
<li>No nesting overlaps (e.g., <tt style="font-weight: bold;">{(})</tt> is not ok).</li>
|
||||
</ul>
|
||||
|
||||
<table style="margin-top: 50px;">
|
||||
<tr>
|
||||
<td><tt style="font-weight: bold;">{()({})}</tt></td>
|
||||
<td><tt style="font-weight: bold;">{())</tt></td>
|
||||
<td><tt style="font-weight: bold;">())</tt></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="font-size: 200%" class="fragment">✅</td>
|
||||
<td style="font-size: 200%" class="fragment">❌</td>
|
||||
<td style="font-size: 200%" class="fragment">❌</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Balanced Parenthesis/Braces</h4>
|
||||
|
||||
<p><b>Idea: </b> Count the number of unmatched open parens, braces.</p>
|
||||
<p>Increment counter on <tt>(</tt>, decrement on <tt>)</tt></p>
|
||||
|
||||
<p class="fragment"><b>Problem: </b> allows <tt style="font-weight: bold;">{(})</tt></p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Balanced Parenthesis/Braces</h4>
|
||||
|
||||
<p><b>Idea: </b> Track nesting on a stack!</p>
|
||||
<p>On <tt>(</tt> or <tt>{</tt>, push the symbol on the stack.</p>
|
||||
<p>On <tt>)</tt> or <tt>}</tt>, pop the stack and check the popped symbol.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
#nesting_stack {
|
||||
height: 400px;
|
||||
width: 200px;
|
||||
border: solid 1px black;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
overflow-y: scroll;
|
||||
transition-property: background;
|
||||
transition-duration: 0.1s;
|
||||
}
|
||||
#nesting_stack.nesting_alert {
|
||||
background: #ffbbbb;
|
||||
}
|
||||
#nesting_stack .nesting_symbol {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: block;
|
||||
color: lightgray;
|
||||
background: black;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 5px;
|
||||
}
|
||||
#nesting_string {
|
||||
height: 100px;
|
||||
font-family: fixed;
|
||||
}
|
||||
#nesting_string::before {
|
||||
content: '"';
|
||||
}
|
||||
#nesting_string::after {
|
||||
content: '"';
|
||||
}
|
||||
</style>
|
||||
|
||||
<button onclick="nesting_push('(')">(</button>
|
||||
<button onclick="nesting_push('{')">{</button>
|
||||
<button onclick="nesting_pop(')')">)</button>
|
||||
<button onclick="nesting_pop('}')">}</button>
|
||||
<div id="nesting_stack"></div>
|
||||
<div id="nesting_string"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var nesting_stack = document.getElementById("nesting_stack")
|
||||
var nesting_string = document.getElementById("nesting_string")
|
||||
|
||||
function nesting_push(chr){
|
||||
nesting_string.innerText = nesting_string.innerText+chr
|
||||
var elem = document.createElement('div')
|
||||
elem.classList.add("nesting_symbol")
|
||||
elem.innerText = chr
|
||||
nesting_stack.prepend(elem)
|
||||
}
|
||||
|
||||
function nesting_alert(){
|
||||
nesting_stack.classList.add("nesting_alert")
|
||||
setTimeout(() => {
|
||||
nesting_stack.classList.remove("nesting_alert")
|
||||
}, 100)
|
||||
}
|
||||
|
||||
function nesting_pop(chr){
|
||||
var elem = nesting_stack.firstElementChild
|
||||
var match = (chr == ")" ? "(" : "{")
|
||||
|
||||
if(!elem){ nesting_alert() }
|
||||
else {
|
||||
if(elem.innerText != match){ nesting_alert() }
|
||||
else {
|
||||
nesting_string.innerText = nesting_string.innerText+chr
|
||||
elem.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Network Packets</h4>
|
||||
|
||||
<dl style="font-size: 75%">
|
||||
<dt>Router: 1gb/s internal network, 100mb/s external</dt>
|
||||
<dd><ul>
|
||||
<li>1gb/s sent to router, but only 100mb/s can leave.</li>
|
||||
<li>How do packets get delivered?</li>
|
||||
</ul></dd>
|
||||
|
||||
<dt>Queues</dt>
|
||||
<dd><ul>
|
||||
<li>Enqueue data packets in the order they are received.</li>
|
||||
<li>When outgoing bandwidth available, dequeue and send.</li>
|
||||
</ul></dd>
|
||||
|
||||
<dt>Avoiding Queueing Delays</dt>
|
||||
<dd><ul>
|
||||
<li>Limit size of queue; Packets that don't fit are dropped</li>
|
||||
</ul></dd>
|
||||
|
||||
<p style="font-size: 70%">
|
||||
<span style="margin-right: auto">
|
||||
<b>TCP:</b> blocked packets are retried
|
||||
</span>
|
||||
|
||||
<span style="margin-left: 50px;">
|
||||
<b>UDP:</b> application deals with dropped packets.
|
||||
</span>
|
||||
</p>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Mazes</h4>
|
||||
|
||||
<ul style="font-size: 80%; max-width: 450px;">
|
||||
<li><b>O</b> is the start, <b>X</b> is the objective <ul>
|
||||
<li>There may be multiple paths</li>
|
||||
<li>Generally, we want the shortest</li>
|
||||
</ul></li>
|
||||
<li class="fragment"><b>Approach 1: </b> Take the first available route in one direction <ul>
|
||||
<li style="color: red">Right, Down, Left, or Up</li>
|
||||
<li style="color: blue">Down, Right, Up, Left</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<img src="graphics/14b/maze1.png" style="float: right" width="300px">
|
||||
</section>
|
||||
<section>
|
||||
<h4 class="slide_title">Mazes</h4>
|
||||
|
||||
<ul style="font-size: 80%; max-width: 450px;">
|
||||
<li><b>O</b> is the start, <b>X</b> is the objective <ul>
|
||||
<li>There may be multiple paths</li>
|
||||
<li>Generally, we want the shortest</li>
|
||||
</ul></li>
|
||||
<li><b>Approach 1: </b> Take the first available route in one direction <ul>
|
||||
<li style="color: red">Right, Down, Left, or Up</li>
|
||||
<li style="color: blue">Down, Right, Up, Left</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<img src="graphics/14b/maze1-rdlu.png" style="float: right" width="300px">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Mazes</h4>
|
||||
<img src="graphics/14b/maze1-rdlu.png">
|
||||
|
||||
<p>How do you know which one is best?</p>
|
||||
<p class="fragment">Other problems with this algorithm?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Mazes</h4>
|
||||
<img src="graphics/14b/maze2.png" width="350px">
|
||||
<p> </p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Mazes</h4>
|
||||
<img src="graphics/14b/maze2-rdlu.png" width="350px">
|
||||
<p class="fragment">Priority order doesn't guarantee exploring the entire maze</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Formalizing Maze-Solving</h4>
|
||||
|
||||
<div style="font-size: 80%;">
|
||||
<p><b>Inputs:</b> <ul>
|
||||
<li>The map: An $n\times m$ grid of filled/empty squares.</li>
|
||||
<li>The <b>O</b> is at position $start$</li>
|
||||
<li>The <b>X</b> is at position $dest$</li>
|
||||
</ul></p>
|
||||
|
||||
<p><b>Goal: </b>
|
||||
<li>Compute $steps(\texttt{start}, \texttt{dest})$, the minimum steps from start to end.</li>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="fragment">How do we define $steps$?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Formalizing Maze-Solving</h4>
|
||||
|
||||
<svg data-src="graphics/14b/maze1-distances.svg" />
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Formalizing Maze-Solving</h4>
|
||||
|
||||
<div style="font-size: 70%">
|
||||
$$steps(\texttt{pos},\texttt{dest}) = \begin{cases}
|
||||
0 & \textbf{if } \texttt{pos} = \texttt{dest}\\
|
||||
\end{cases}$$
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Formalizing Maze-Solving</h4>
|
||||
|
||||
<div style="font-size: 70%">
|
||||
$$steps(\texttt{pos},\texttt{dest}) = \begin{cases}
|
||||
0 & \textbf{if } \texttt{pos} = \texttt{dest}\\
|
||||
\infty & \textbf{if } is\_filled(\texttt{pos})\\
|
||||
\end{cases}$$
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Formalizing Maze-Solving</h4>
|
||||
|
||||
<div style="font-size: 70%">
|
||||
$$steps(\texttt{pos},\texttt{dest}) = \begin{cases}
|
||||
0 & \textbf{if } \texttt{pos} = \texttt{dest}\\
|
||||
\infty & \textbf{if } is\_filled(\texttt{pos})\\
|
||||
1 + min\_adjacent(\texttt{pos}, \texttt{dest}) & \textbf{otherwise}
|
||||
\end{cases}$$
|
||||
</div>
|
||||
|
||||
<p class="fragment" data-fragment-index="1">where...</p>
|
||||
|
||||
<p style="text-align: left;" class="fragment" data-fragment-index="1">
|
||||
$min\_adjacent(\texttt{pos}, \texttt{dest}) = $
|
||||
$$\min\begin{cases}
|
||||
steps(moveRight(\texttt{pos}), \texttt{dest})\\
|
||||
steps(moveDown(\texttt{pos}), \texttt{dest})\\
|
||||
steps(moveLeft(\texttt{pos}), \texttt{dest})\\
|
||||
steps(moveUp(\texttt{pos}), \texttt{dest})\\
|
||||
\end{cases}$$
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">$steps(\texttt{pos}, \texttt{dest})$</h4>
|
||||
|
||||
<ul style="font-size: 80%">
|
||||
<li><b>if</b> <tt>pos == dest</tt> <b>then</b> <tt>return 0</tt></li>
|
||||
<li><b>elif</b> <tt>is_filled(pos)</tt> <b>then</b> <tt>return ∞</tt></li>
|
||||
<li><b>else</b> <tt>return 1 +</tt> min of<ul style="font-size: 80%">
|
||||
<li>$steps(moveRight(\texttt{pos}, \texttt{dest}))$</li>
|
||||
<li>$steps(moveDown(\texttt{pos}, \texttt{dest}))$</li>
|
||||
<li>$steps(moveLeft(\texttt{pos}, \texttt{dest}))$</li>
|
||||
<li>$steps(moveUp(\texttt{pos}, \texttt{dest}))$</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="graphics/14b/maze2.png">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p><b>Problem: </b> Infinite loop!</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p><b>Insight: </b> A path with a loop in it can't<br>be shorter than one without the loop.</p>
|
||||
|
||||
<p class="fragment">Mark nodes as visited</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">$steps(\texttt{pos}, \texttt{dest})$</h4>
|
||||
|
||||
<ul style="font-size: 70%">
|
||||
<li><b>if</b> <tt>pos == dest</tt> <b>then</b> <tt>return 0</tt></li>
|
||||
<li style="color: forestgreen;"><b>elif</b> <tt>pos</tt> marked visited <b>then</b> <tt>return ∞</tt></li>
|
||||
<li><b>elif</b> <tt>is_filled(pos)</tt> <b>then</b> <tt>return ∞</tt></li>
|
||||
<li><b>else</b> <ul>
|
||||
<li style="color: forestgreen;">Mark <tt>pos</tt> as visited</li>
|
||||
<li><tt>return 1 +</tt> min of all 4 steps</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="graphics/14b/maze2.png">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p><b>Problem: </b> The first time you visit a node,<br>it may be via a longer path!</p>
|
||||
<p class="fragment">Unmark nodes as you leave them</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">$steps(\texttt{pos}, \texttt{dest})$</h4>
|
||||
|
||||
<ul style="font-size: 60%">
|
||||
<li><b>if</b> <tt>pos == dest</tt> <b>then</b> <tt>return 0</tt></li>
|
||||
<li><b>elif</b> <tt>pos</tt> marked visited <b>then</b> <tt>return ∞</tt></li>
|
||||
<li><b>elif</b> <tt>is_filled(pos)</tt> <b>then</b> <tt>return ∞</tt></li>
|
||||
<li><b>else</b> <ul>
|
||||
<li>Mark <tt>pos</tt> as visited</li>
|
||||
<li><tt>stepCount = 1 +</tt> min of all 4 steps</li>
|
||||
<li style="color: forestgreen;">Unmark <tt>pos</tt> as visited</li>
|
||||
<li style="color: forestgreen;"><tt>return stepCount</tt></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Maze-Solving</h4>
|
||||
|
||||
<div style="font-size: 80%;">
|
||||
<p><b>Inputs:</b> <ul>
|
||||
<li>The map: An $n\times m$ grid of filled/empty squares.</li>
|
||||
<li>The <b>O</b> is at position $start$</li>
|
||||
<li>The <b>X</b> is at position $dest$</li>
|
||||
</ul></p>
|
||||
|
||||
<p><b>Goal: </b>
|
||||
<li>Compute $steps(\texttt{start}, \texttt{dest})$, the minimum steps from start to end.</li>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="fragment">What path did we take?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p><p>Idea: </p> Follow the nodes marked visited</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">$steps(\texttt{pos}, \texttt{dest}, \texttt{visited})$</h4>
|
||||
|
||||
<ul style="font-size: 70%">
|
||||
<li><b>if</b> <tt>pos == dest</tt> <b>then</b> <tt>return <span style="color: forestgreen;">visited.copy()</span></tt></li>
|
||||
<li><b>elif</b> <tt>pos</tt> <span style="color: forestgreen;">∈ <tt>visited</tt></span> <tt>return <span style="color: forestgreen;">no_path</span></tt></tt></li>
|
||||
<li><b>elif</b> <tt>is_filled(pos)</tt> <b>then</b> <tt>return <span style="color: forestgreen;">no_path</span></tt></tt></li>
|
||||
<li><b>else</b> <ul>
|
||||
<li><tt style="color: forestgreen;">visited.append(pos)</tt></li>
|
||||
<li style="color: forestgreen;"><tt>bestPath = </tt> min of all 4 one-step paths</li>
|
||||
<li><tt style="color: forestgreen;">visited.removeLast()</tt></li>
|
||||
<li><tt>return bestPath</tt></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">$steps(\texttt{pos}, \texttt{dest}, \texttt{visited})$</h4>
|
||||
|
||||
<ul style="font-size: 70%">
|
||||
<li><b>if</b> <tt>pos == dest</tt> <b>then</b> <tt>return visited.copy()</tt></li>
|
||||
<li><b>elif</b> <tt>pos</tt> ∈ <tt>visited</tt> <tt>return no_path</tt></tt></li>
|
||||
<li><b>elif</b> <tt>is_filled(pos)</tt> <b>then</b> <tt>return no_path</tt></tt></li>
|
||||
<li><b>else</b> <ul>
|
||||
<li><tt style="color: forestgreen;">visited.push(pos)</tt></li>
|
||||
<li><tt>bestPath = </tt> min of all 4 one-step paths</li>
|
||||
<li><tt style="color: forestgreen;">visited.pop()</tt></li>
|
||||
<li><tt>return bestPath</tt></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p><b>Thought question:</b> Can you solve a maze<br>with a <b>queue</b> instead?</p>
|
||||
</section>
|
|
@ -0,0 +1,704 @@
|
|||
---
|
||||
template: templates/cse250_2022_slides.erb
|
||||
title: Graphs
|
||||
date: Oct 4, 2022
|
||||
textbook: Ch. 15.3
|
||||
cat: graphics/15b/cat.png
|
||||
attribution: Based on slides by Tamassa Goodrich
|
||||
---
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Graphs</h4>
|
||||
|
||||
<p>A <b>graph</b> is a pair $(V, E)$ where</p>
|
||||
<ul>
|
||||
<li>$V$ is a set of <b>vertices</b></li>
|
||||
<li>$E$ is a set of vertex pairs called <b>edges</b></li>
|
||||
<li>edges and vertices may also store data (<b>labels</b>)</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Graphs</h4>
|
||||
<p><b>Example:</b> A computer network<br>(edges store ping, nodes store addresses)</p>
|
||||
<img src="graphics/15b/network.png" width="600px">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Edge Types</h4>
|
||||
|
||||
<img src="graphics/15b/edge_example.png" style="float: right; margin-top: 70px" width="200px">
|
||||
<dl width="500px" style="font-size: 80%">
|
||||
<dt>Directed Edge (e.g., transmit bandwidth)</dt>
|
||||
<dd><ul>
|
||||
<li>Ordered pair of vertices $(u, v)$</li>
|
||||
<li>origin ($u$) → destination ($v$)</li>
|
||||
</ul></dd>
|
||||
|
||||
<dt>Undirected edge (e.g., round-trip latency)</dt>
|
||||
<dd><ul>
|
||||
<li>Unordered pair of vertices $(u, v)$</li>
|
||||
</ul></dd>
|
||||
|
||||
<div class="fragment">
|
||||
<dt>Directed Graph</dt>
|
||||
<dd>All edges are directed</dd>
|
||||
|
||||
<dt>Undirected Graph</dt>
|
||||
<dd>All edges are undirected</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Other Applications</h4>
|
||||
|
||||
<ul>
|
||||
<li>Transporation (Flight/Road/Rail Routing)</li>
|
||||
<li>Protein/Protein Interactions</li>
|
||||
<li>Social Networks</li>
|
||||
<li>Dependency Tracking (e.g., <b>make</b>)</li>
|
||||
<li>Taxonomies</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Terminology</h4>
|
||||
|
||||
<img src="graphics/15b/graph_example.png" width="400px">
|
||||
<dl style="font-size: 50%">
|
||||
<dt>Endpoints (end-vertices) of an edge</dt>
|
||||
<dd>U, V are the endpoints of a</dd>
|
||||
|
||||
<dt>Edges incident on a vertex</dt>
|
||||
<dd>a, b, d are incident on V</dd>
|
||||
|
||||
<dt>Adjacent Vertices</dt>
|
||||
<dd>U, V are adjacent</dd>
|
||||
|
||||
<dt>Degree of a vertex (# of incident edges)</dt>
|
||||
<dd>X has degree 5</dd>
|
||||
|
||||
<dt>Parallel Edges</dt>
|
||||
<dd>h, i are parallel</dd>
|
||||
|
||||
<dt>Self-Loop</dt>
|
||||
<dd>j is a self-loop</dd>
|
||||
|
||||
<dt>Simple Graph</dt>
|
||||
<dd>A graph without parallel edges or self-loops</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Terminology</h4>
|
||||
|
||||
<img src="graphics/15b/graph_example.png" width="400px">
|
||||
<dl style="font-size: 60%; width: 400px;">
|
||||
<dt>Path</dt>
|
||||
<dd>Sequence of alternating vertices and edges</dd>
|
||||
<dd>begins with a vertex</dd>
|
||||
<dd>ends with a vertex</dd>
|
||||
<dd>each edge is preceded and followed by its endpoints</dd>
|
||||
|
||||
<div class="fragment">
|
||||
<dt>Simple Path</dt>
|
||||
<dd>path such that all of its vertices and edges are distinct</dd>
|
||||
</div>
|
||||
|
||||
<dt class="fragment">Examples</dt>
|
||||
<dd> </dd>
|
||||
<dd> <br> </dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Terminology</h4>
|
||||
|
||||
<img src="graphics/15b/graph_example_red.png" width="400px">
|
||||
<dl style="font-size: 60%; width: 400px;">
|
||||
<dt>Path</dt>
|
||||
<dd>Sequence of alternating vertices and edges</dd>
|
||||
<dd>begins with a vertex</dd>
|
||||
<dd>ends with a vertex</dd>
|
||||
<dd>each edge is preceded and followed by its endpoints</dd>
|
||||
|
||||
<dt>Simple Path</dt>
|
||||
<dd>path such that all of its vertices and edges are distinct</dd>
|
||||
|
||||
<dt>Examples</dt>
|
||||
<dd><span style="color: red">V, b, X, h, Z</span> is a simple path.</dd>
|
||||
<dd> <br> </dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Terminology</h4>
|
||||
|
||||
<img src="graphics/15b/graph_example_red_blue.png" width="400px">
|
||||
<dl style="font-size: 60%; width: 400px;">
|
||||
<dt>Path</dt>
|
||||
<dd>Sequence of alternating vertices and edges</dd>
|
||||
<dd>Begins with a vertex</dd>
|
||||
<dd>Ends with a vertex</dd>
|
||||
<dd>Each edge is preceded and followed by its endpoints</dd>
|
||||
|
||||
<dt>Simple Path</dt>
|
||||
<dd>Path such that all of its vertices and edges are distinct</dd>
|
||||
|
||||
<dt>Examples</dt>
|
||||
<dd><span style="color: red">V, b, X, h, Z</span> is a simple path.</dd>
|
||||
<dd><span style="color: blue">U, c, W, e, X, g, Y, f, W, d, V</span> is a path that is not simple.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Terminology</h4>
|
||||
|
||||
<img src="graphics/15b/graph_example.png" width="400px">
|
||||
<dl style="font-size: 60%; width: 500px;">
|
||||
<dt>Cycle</dt>
|
||||
<dd>Path that begins and ends with the same vertex</dd>
|
||||
<dd>Must contain at least one edge</dd>
|
||||
|
||||
<dt>Simple Cycle</dt>
|
||||
<dd>Cycle such that all of its vertices and edges are distinct</dd>
|
||||
|
||||
<dt class="fragment">Examples</dt>
|
||||
<dd> </dd>
|
||||
<dd> <br> </dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Terminology</h4>
|
||||
|
||||
<img src="graphics/15b/graph_example_cycle_red.png" width="400px">
|
||||
<dl style="font-size: 60%; width: 500px;">
|
||||
<dt>Cycle</dt>
|
||||
<dd>Path that begins and ends with the same vertex</dd>
|
||||
<dd>Must contain at least one edge</dd>
|
||||
|
||||
<dt>Simple Cycle</dt>
|
||||
<dd>Cycle such that all of its vertices and edges are distinct</dd>
|
||||
|
||||
<dt>Examples</dt>
|
||||
<dd><span style="color: red;">V, b, X, g, Y, f, W, c, U, a, V</span> is a simple cycle</dd>
|
||||
<dd> <br> </dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Terminology</h4>
|
||||
|
||||
<img src="graphics/15b/graph_example_cycle_red_blue.png" width="400px">
|
||||
<dl style="font-size: 60%; width: 500px;">
|
||||
<dt>Cycle</dt>
|
||||
<dd>Path that begins and ends with the same vertex</dd>
|
||||
<dd>Must contain at least one edge</dd>
|
||||
|
||||
<dt>Simple Cycle</dt>
|
||||
<dd>Cycle such that all of its vertices and edges are distinct</dd>
|
||||
|
||||
<dt>Examples</dt>
|
||||
<dd><span style="color: red;">V, b, X, g, Y, f, W, c, U, a, V</span> is a simple cycle</dd>
|
||||
<dd><span style="color: blue;">U, c, W, e, X, g, Y, f, W, d, V</span> is a cycle that is not simple</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Notation</h4>
|
||||
|
||||
<dl>
|
||||
<dt>$n$</dt>
|
||||
<dd>The number of vertices</dd>
|
||||
|
||||
<dt>$m$</dt>
|
||||
<dd>The number of edges</dd>
|
||||
|
||||
<dt>$deg(v)$</dt>
|
||||
<dd>The degree of vertex $v$</dd>
|
||||
</dl>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Graph Properties</h4>
|
||||
|
||||
$$\sum_{v} deg(v) = 2m$$
|
||||
|
||||
<p class="fragment"><b>Proof: </b> Each edge is counted twice</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Graph Properties</h4>
|
||||
|
||||
<p>In a directed graph with no self-loops and no parallel edges:</p>
|
||||
$$m \leq n(n-1)$$
|
||||
|
||||
<p class="fragment">
|
||||
<ul>
|
||||
<li>No parallel edges: each pair connected at most once</li>
|
||||
<li>No self loops: pick each vertex once</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p class="fragment">
|
||||
$n$ choices for the first vertex; $(n-1)$ choices for the second vertex.
|
||||
$$m \leq n(n-1)$$
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>Hey, isn't this a <b>data structures</b> class?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">A (Directed) Graph ADT</h4>
|
||||
|
||||
<dl>
|
||||
<dt>Two type parameters (<tt>Graph[V, E]</tt>)</dt>
|
||||
<dd><tt>V</tt>: The vertex label type</dd>
|
||||
<dd><tt>E</tt>: The edge label type</dd>
|
||||
|
||||
<dt>Vertices</dt>
|
||||
<dd>... are elements (like Linked List Nodes)</dd>
|
||||
<dd>... store a value of type <tt>V</tt></dd>
|
||||
|
||||
<dt>Edges</dt>
|
||||
<dd>... are elements</dd>
|
||||
<dd>... store a value of type <tt>E</tt></dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">A (Directed) Graph ADT</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
trait Graph[V, E] {
|
||||
def vertices: Iterator[Vertex]
|
||||
def edges: Iterator[Edge]
|
||||
def addVertex(label: V): Vertex
|
||||
def addEdge(orig: Vertex, dest: Vertex, label: E): Edge
|
||||
def removeVertex(vertex: Vertex): Unit
|
||||
def removeEdge(edge: Edge): Unit
|
||||
}
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">A (Directed) Graph ADT</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
trait Vertex[V, E] {
|
||||
def outEdges: Seq[Edge]
|
||||
def inEdges: Seq[Edge]
|
||||
def incidentEdges: Iterator[Edge] = outEdges ++ inEdges
|
||||
def edgeTo(v: Vertex): Boolean
|
||||
def label: V
|
||||
}
|
||||
|
||||
trait Edge[V, E] {
|
||||
def origin: Vertex
|
||||
def destination: Vertex
|
||||
def label: E
|
||||
}
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 1: Edge List</h4>
|
||||
|
||||
<p style="text-decoration: underline;">Data Model</p>
|
||||
<dl>
|
||||
<div class="fragment">
|
||||
<dt>A List of Edges</dt>
|
||||
<dd>ArrayBuffer</dd>
|
||||
</div>
|
||||
|
||||
<div class="fragment">
|
||||
<dt>A List of Vertices</dt>
|
||||
<dd>ArrayBuffer</dd>
|
||||
</div>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 1: Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV1[V, E] extends Graph[V, E]
|
||||
{
|
||||
val vertices = mutable.Buffer[Vertex]()
|
||||
val edges = mutable.Buffer[Edge]()
|
||||
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 1: Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
def addVertex(label: V): Vertex =
|
||||
vertices.append(new Vertex(label))
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 1: Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
def addEdge(orig: Vertex, dest: Vertex, label: E): Edge =
|
||||
edges.append(new Edge(orig, dest, label))
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 1: Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
def removeEdge(edge: Edge): Unit =
|
||||
edges.subtractOne(edge)
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity? <b class="fragment">($O(n)$)</b></p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 2: Linked Edge List</h4>
|
||||
|
||||
<p style="text-decoration: underline;">Data Model</p>
|
||||
<dl>
|
||||
<div>
|
||||
<dt>A List of Edges</dt>
|
||||
<dd>DoublyLinkedList</dd>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<dt>A List of Vertices</dt>
|
||||
<dd>DoublyLinkedList</dd>
|
||||
</div>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">DoublyLinkedList</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DoublyLinkedList[T] extends Seq[T] {
|
||||
def append(element: T): Node =
|
||||
/* O(1) with tail pointer */
|
||||
|
||||
def remove(node: Node): Unit =
|
||||
/* O(1) */
|
||||
|
||||
def iterator: Iterator[T]: Unit =
|
||||
/* O(1) + O(1) per call to next */
|
||||
}
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 2: Linked Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV2[V, E] extends Graph[V, E] {
|
||||
val vertices = DoublyLinkedList[Vertex]()
|
||||
|
||||
class Vertex(label: V) = {
|
||||
var node: DoublyLinkedList[Vertex].Node = null
|
||||
/* ... */
|
||||
}
|
||||
|
||||
def addVertex(label: V): Vertex = {
|
||||
val vertex = new Vertex(label)
|
||||
val node = vertices.append(vertex)
|
||||
vertex.node = node
|
||||
return vertex
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 2: Linked Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV2[V, E] extends Graph[V, E] {
|
||||
val edges = DoublyLinkedList[Edge]()
|
||||
|
||||
class Edge(orig: Vertex, dest: Vertex, label: E) = {
|
||||
var node: DoublyLinkedList[Edge].Node = null
|
||||
/* ... */
|
||||
}
|
||||
|
||||
def addEdge(orig: Vertex, dest: Vertex, label: E): Vertex = {
|
||||
val edge = new Edge(orig, dest, label)
|
||||
val node = edges.append(vertex)
|
||||
edge.node = node
|
||||
return edge
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 2: Linked Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV2[V, E] extends Graph[V, E] {
|
||||
val edges = DoublyLinkedList[Edge]()
|
||||
|
||||
def removeEdge(edge: Edge): Unit = {
|
||||
edges.remove(edge.node)
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 2: Linked Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV2[V, E] extends Graph[V, E] {
|
||||
val vertices = DoublyLinkedList[Vertex]()
|
||||
|
||||
def removeVertex(vertex: Vertex): Unit = {
|
||||
vertices.remove(vertex.node)
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What if there's an edge to/from vertex?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 2: Linked Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV2[V, E] extends Graph[V, E] {
|
||||
val vertices = DoublyLinkedList[Vertex]()
|
||||
|
||||
def removeVertex(vertex: Vertex): Unit = {
|
||||
vertices.remove(vertex.node)
|
||||
for(edge <- vertex.incidentEdges){
|
||||
removeEdge(edge)
|
||||
}
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity? <b class="fragment">O(1) + O(T_{incidentEdges}(n, m))</b></p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 2: Linked Edge List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV2[V, E] extends Graph[V, E] {
|
||||
val vertices = DoublyLinkedList[Vertex]()
|
||||
val edges = DoublyLinkedList[Edge]()
|
||||
|
||||
class Vertex(label: V) = {
|
||||
/* ... */
|
||||
|
||||
def outEdges =
|
||||
vertices.filter { _.orig = this }
|
||||
|
||||
def inEdges =
|
||||
vertices.filter { _.dest = this }
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity? <b class="fragment">$O(m) = O(n^2)$</b></p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Edge List Summary</h4>
|
||||
|
||||
<ul>
|
||||
<li>addEdge, addVertex: <b class="fragment">O(1)</b></li>
|
||||
<li>removeEdge: <b class="fragment">O(1)</b></li>
|
||||
<li>removeVertex: <b class="fragment">O(m)</b></li>
|
||||
<li>vertex.incidentEdges: <b class="fragment">O(m)</b></li>
|
||||
<li class="fragment">vertex.edgeTo: <b class="fragment">O(m)</b></li>
|
||||
<li class="fragment"><b>Space Used</b>: $O(n) + O(m)$</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p><b>Idea: </b> Store the in/out edges for each vertex.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 3: Adjacency List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV3[V, E] extends Graph[V, E] {
|
||||
val vertices = DoublyLinkedList[Vertex]()
|
||||
|
||||
class Vertex(label: V) = {
|
||||
var node: DoublyLinkedList[Vertex].Node = null
|
||||
val inEdges = DoublyLinkedList[Edge]()
|
||||
val outEdges = DoublyLinkedList[Edge]()
|
||||
/* ... */
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 3: Adjacency List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV3[V, E] extends Graph[V, E] {
|
||||
/* ... */
|
||||
def addEdge(orig: Vertex, dest: Vertex, label: E): Vertex = {
|
||||
val edge = new Edge(orig, dest, label)
|
||||
val node = edges.append(vertex)
|
||||
edge.node = node
|
||||
orig.outEdges.append(edge)
|
||||
dest.inEdges.append(edge)
|
||||
return edge
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 3: Adjacency List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV3[V, E] extends Graph[V, E] {
|
||||
/* ... */
|
||||
def removeEdge(edge: Edge): Unit = {
|
||||
edges.remove(edge.node)
|
||||
edge.orig.outEdges.subtractOne(edge)
|
||||
edge.dest.inEdges.subtractOne(edge)
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 4: Adjacency List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV4[V, E] extends Graph[V, E] {
|
||||
/* ... */
|
||||
class Edge(orig: Vertex, dest: Vertex, label: E) = {
|
||||
var node: DoublyLinkedList[Edge].Node = null
|
||||
var origNode: DoublyLinkedList[Edge].Node = null
|
||||
var destNode: DoublyLinkedList[Edge].Node = null
|
||||
/* ... */
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 4: Adjacency List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV4[V, E] extends Graph[V, E] {
|
||||
/* ... */
|
||||
def addEdge(orig: Vertex, dest: Vertex, label: E): Vertex = {
|
||||
val edge = new Edge(orig, dest, label)
|
||||
val node = edges.append(vertex)
|
||||
edge.node = node
|
||||
edge.origNode = orig.outEdges.append(edge)
|
||||
edge.destNode = dest.inEdges.append(edge)
|
||||
return edge
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 4: Adjacency List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV4[V, E] extends Graph[V, E] {
|
||||
/* ... */
|
||||
def removeEdge(edge: Edge): Unit = {
|
||||
edges.remove(edge.node)
|
||||
edge.orig.outEdges.remove(edge.origNode)
|
||||
edge.dest.inEdges.remove(edge.destNode)
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Attempt 4: Adjacency List</h4>
|
||||
|
||||
<pre><code class="scala">
|
||||
class DirectedGraphV4[V, E] extends Graph[V, E] {
|
||||
/* ... */
|
||||
def removeVertex(vertex: Vertex): Unit = {
|
||||
vertices.remove(vertex.node)
|
||||
for(edge <- vertex.incidentEdges){
|
||||
removeEdge(edge)
|
||||
}
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
</code></pre>
|
||||
<p class="fragment">What's the complexity?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Adjacency List</h4>
|
||||
|
||||
<svg data-src="graphics/15b/adjacency_list.svg" width="700px"/>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Adjacency List Summary</h4>
|
||||
|
||||
<ul>
|
||||
<li>addEdge, addVertex: <b class="fragment">O(1)</b></li>
|
||||
<li>removeEdge: <b class="fragment">O(1)</b></li>
|
||||
<li>vertex.incidentEdges: <b class="fragment">O(deg(vertex))</b></li>
|
||||
<li>removeVertex: <b class="fragment">O(deg(vertex))</b></li>
|
||||
<li class="fragment">vertex.edgeTo: <b class="fragment">O(deg(vertex))</b></li>
|
||||
<li class="fragment"><b>Space Used</b>: $O(n) + O(m)$</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4 class="slide_title">Adjacency Matrix</h4>
|
||||
|
||||
<img src="graphics/15b/adjacency_matrix.png">
|
||||
</section>
|
||||
<section>
|
||||
<h4 class="slide_title">Adjacency List Summary</h4>
|
||||
|
||||
<ul>
|
||||
<li>addEdge, removeEdge: <b class="fragment">O(1)</b></li>
|
||||
<li>addVertex, removeVertex: <b class="fragment">O(n^2)</b></li>
|
||||
<li>vertex.incidentEdges: <b class="fragment">O(n)</b></li>
|
||||
<li>vertex.edgeTo: <b class="fragment">O(1)</b></li>
|
||||
<li class="fragment"><b>Space Used</b>: $O(n^2)$</li>
|
||||
</ul>
|
||||
</section>
|
After Width: | Height: | Size: 382 KiB |
|
@ -0,0 +1,620 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
xml:space="preserve"
|
||||
width="3.5571268in"
|
||||
height="3.6219573in"
|
||||
viewBox="0 0 341.48417 347.7079"
|
||||
sodipodi:docname="maze1-distances.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
|
||||
id="metadata8"><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><defs
|
||||
id="defs6"><clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath34"><path
|
||||
d="M 0,0 H 6.048 V 6.048 H 0 Z"
|
||||
id="path32" /></clipPath><radialGradient
|
||||
fx="1.96873"
|
||||
fy="4.3134899"
|
||||
cx="3.0239"
|
||||
cy="3.0239"
|
||||
r="3.0239"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient46"><stop
|
||||
style="stop-opacity:1;stop-color:#e0e0f4"
|
||||
offset="0"
|
||||
id="stop36" /><stop
|
||||
style="stop-opacity:1;stop-color:#6666c6"
|
||||
offset="0.93788"
|
||||
id="stop38" /><stop
|
||||
style="stop-opacity:1;stop-color:#24247d"
|
||||
offset="1.87576"
|
||||
id="stop40" /><stop
|
||||
style="stop-opacity:1;stop-color:#191959"
|
||||
offset="2.5792"
|
||||
id="stop42" /><stop
|
||||
style="stop-opacity:1;stop-color:#ffffff"
|
||||
offset="3.0239"
|
||||
id="stop44" /></radialGradient></defs><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1011"
|
||||
id="namedview4"
|
||||
showgrid="false"
|
||||
units="in"
|
||||
inkscape:zoom="2.7489444"
|
||||
inkscape:cx="215.1735"
|
||||
inkscape:cy="212.44518"
|
||||
inkscape:window-x="1080"
|
||||
inkscape:window-y="352"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g10"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:document-units="in" /><g
|
||||
id="g10"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="04-Stacks_and_Queues-presentation"
|
||||
transform="matrix(1.3333333,0,0,-1.3333333,-134.24879,132.5345)"><g
|
||||
id="g4948"
|
||||
transform="matrix(2.8274324,0,0,2.8274324,520.46247,-307.16639)"><g
|
||||
id="g90"
|
||||
transform="translate(-140.10158,51.959894)"><path
|
||||
d="M 0.16353,16.36383 H 81.65564 M 0.16353,32.72768 H 81.65564 M 0.16353,49.0915 H 81.65564 M 0.16353,65.45537 H 81.65564 M 16.36383,0.16353 V 81.65564 M 32.72768,0.16353 V 81.65564 M 49.0915,0.16353 V 81.65564 M 65.45537,0.16353 v 81.49211"
|
||||
style="fill:none;stroke:#1919ff;stroke-width:0.19925;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path92" /></g><g
|
||||
id="g94"
|
||||
transform="translate(-140.10158,51.959894)"><path
|
||||
d="M 0,0 V 81.8192 H 81.8192 V 0 Z"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path96" /></g><path
|
||||
d="m -131.61326,132.28467 v 2.98883"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path98" /><g
|
||||
id="g100"
|
||||
transform="translate(-131.61326,51.959894)"><g
|
||||
id="g102"
|
||||
transform="matrix(0.75,0,0,0.75,-2.045,86.303)"><g
|
||||
id="g104"><g
|
||||
id="g106"
|
||||
transform="translate(-54.948,-153.352)"><text
|
||||
transform="matrix(1,0,0,-1,54.948,153.352)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text110"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan108">0</tspan></text><g
|
||||
id="g112"
|
||||
transform="translate(54.948,153.352)" /></g></g><g
|
||||
id="g114"
|
||||
transform="translate(2.045,-86.303)" /></g></g><path
|
||||
d="m -115.24943,132.28467 v 2.98883"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path116" /><g
|
||||
id="g118"
|
||||
transform="translate(-131.61326,51.959894)"><g
|
||||
id="g120"
|
||||
transform="matrix(0.75,0,0,0.75,14.318,86.189)"><g
|
||||
id="g122"><g
|
||||
id="g124"
|
||||
transform="translate(-71.311,-153.238)"><text
|
||||
transform="matrix(1,0,0,-1,71.311,153.238)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text128"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan126">1</tspan></text><g
|
||||
id="g130"
|
||||
transform="translate(71.311,153.238)" /></g></g><g
|
||||
id="g132"
|
||||
transform="translate(-14.318,-86.189)" /></g></g><path
|
||||
d="m -98.885589,132.28467 v 2.98883"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path134" /><g
|
||||
id="g136"
|
||||
transform="translate(-131.61326,51.959894)"><g
|
||||
id="g138"
|
||||
transform="matrix(0.75,0,0,0.75,30.682,86.189)"><g
|
||||
id="g140"><g
|
||||
id="g142"
|
||||
transform="translate(-87.675,-153.238)"><text
|
||||
transform="matrix(1,0,0,-1,87.675,153.238)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text146"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan144">2</tspan></text><g
|
||||
id="g148"
|
||||
transform="translate(87.675,153.238)" /></g></g><g
|
||||
id="g150"
|
||||
transform="translate(-30.682,-86.189)" /></g></g><path
|
||||
d="m -82.521808,132.28467 v 2.98883"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path152" /><g
|
||||
id="g154"
|
||||
transform="translate(-131.61326,51.959894)"><g
|
||||
id="g156"
|
||||
transform="matrix(0.75,0,0,0.75,47.046,86.303)"><g
|
||||
id="g158"><g
|
||||
id="g160"
|
||||
transform="translate(-104.039,-153.352)"><text
|
||||
transform="matrix(1,0,0,-1,104.039,153.352)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text164"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan162">3</tspan></text><g
|
||||
id="g166"
|
||||
transform="translate(104.039,153.352)" /></g></g><g
|
||||
id="g168"
|
||||
transform="translate(-47.046,-86.303)" /></g></g><path
|
||||
d="m -66.157938,132.28467 v 2.98883"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path170" /><g
|
||||
id="g172"
|
||||
transform="translate(-131.61326,51.959894)"><g
|
||||
id="g174"
|
||||
transform="matrix(0.75,0,0,0.75,63.409,86.189)"><g
|
||||
id="g176"><g
|
||||
id="g178"
|
||||
transform="translate(-120.402,-153.238)"><text
|
||||
transform="matrix(1,0,0,-1,120.402,153.238)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text182"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan180">4</tspan></text><g
|
||||
id="g184"
|
||||
transform="translate(120.402,153.238)" /></g></g><g
|
||||
id="g186"
|
||||
transform="translate(-63.409,-86.189)" /></g></g><path
|
||||
d="m -130.11884,133.77909 h -2.98884"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path188" /><g
|
||||
id="g190"
|
||||
transform="translate(-140.10158,43.471622)"><g
|
||||
id="g192"
|
||||
transform="matrix(0.75,0,0,0.75,-8.462,79.085)"><g
|
||||
id="g194"><g
|
||||
id="g196"
|
||||
transform="translate(-48.531,-146.134)"><text
|
||||
transform="matrix(1,0,0,-1,48.531,146.134)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text200"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan198">0</tspan></text><g
|
||||
id="g202"
|
||||
transform="translate(48.531,146.134)" /></g></g><g
|
||||
id="g204"
|
||||
transform="translate(8.462,-79.085)" /></g></g><path
|
||||
d="M -138.60716,108.92694 H -141.596"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path206" /><g
|
||||
id="g208"
|
||||
transform="translate(-140.10158,43.471622)"><g
|
||||
id="g210"
|
||||
transform="matrix(0.75,0,0,0.75,-8.462,62.664)"><g
|
||||
id="g212"><g
|
||||
id="g214"
|
||||
transform="translate(-48.531,-129.713)"><text
|
||||
transform="matrix(1,0,0,-1,48.531,129.713)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text218"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan216">1</tspan></text><g
|
||||
id="g220"
|
||||
transform="translate(48.531,129.713)" /></g></g><g
|
||||
id="g222"
|
||||
transform="translate(8.462,-62.664)" /></g></g><path
|
||||
d="M -138.60716,92.563115 H -141.596"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path224" /><g
|
||||
id="g226"
|
||||
transform="translate(-140.10158,43.471622)"><g
|
||||
id="g228"
|
||||
transform="matrix(0.75,0,0,0.75,-8.462,46.301)"><g
|
||||
id="g230"><g
|
||||
id="g232"
|
||||
transform="translate(-48.531,-113.35)"><text
|
||||
transform="matrix(1,0,0,-1,48.531,113.35)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text236"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan234">2</tspan></text><g
|
||||
id="g238"
|
||||
transform="translate(48.531,113.35)" /></g></g><g
|
||||
id="g240"
|
||||
transform="translate(8.462,-46.301)" /></g></g><path
|
||||
d="M -138.60716,76.199302 H -141.596"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path242" /><g
|
||||
id="g244"
|
||||
transform="translate(-140.10158,43.471622)"><g
|
||||
id="g246"
|
||||
transform="matrix(0.75,0,0,0.75,-8.462,29.994)"><g
|
||||
id="g248"><g
|
||||
id="g250"
|
||||
transform="translate(-48.531,-97.043)"><text
|
||||
transform="matrix(1,0,0,-1,48.531,97.043)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text254"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan252">3</tspan></text><g
|
||||
id="g256"
|
||||
transform="translate(48.531,97.043)" /></g></g><g
|
||||
id="g258"
|
||||
transform="translate(8.462,-29.994)" /></g></g><path
|
||||
d="M -138.60716,59.835452 H -141.596"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path260" /><g
|
||||
id="g262"
|
||||
transform="translate(-140.10158,43.471622)"><g
|
||||
id="g264"
|
||||
transform="matrix(0.75,0,0,0.75,-8.462,13.573)"><g
|
||||
id="g266"><g
|
||||
id="g268"
|
||||
transform="translate(-48.531,-80.622)"><text
|
||||
transform="matrix(1,0,0,-1,48.531,80.622)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Roman';-inkscape-font-specification:NimbusRomNo9L-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text272"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan270">4</tspan></text><g
|
||||
id="g274"
|
||||
transform="translate(48.531,80.622)" /></g></g><g
|
||||
id="g276"
|
||||
transform="translate(8.462,-13.573)" /></g></g><g
|
||||
id="g278"
|
||||
transform="translate(-140.10158,51.959894)"><g
|
||||
id="g280"
|
||||
transform="matrix(1.5,0,0,1.5,1.816,67.741)"><g
|
||||
id="g282"><g
|
||||
id="g284"
|
||||
transform="translate(-58.809,-134.79)"><text
|
||||
transform="matrix(1,0,0,-1,58.809,134.79)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Sans';-inkscape-font-specification:NimbusSanL-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text288"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan286">O</tspan></text><g
|
||||
id="g290"
|
||||
transform="translate(58.809,134.79)" /></g></g><g
|
||||
id="g292"
|
||||
transform="translate(-1.816,-67.741)" /></g></g><g
|
||||
id="g294"
|
||||
transform="translate(-140.10158,51.959894)"><g
|
||||
id="g296"
|
||||
transform="matrix(1.5,0,0,1.5,68.179,67.725)"><g
|
||||
id="g298"><g
|
||||
id="g300"
|
||||
transform="translate(-125.172,-134.774)"><text
|
||||
transform="matrix(1,0,0,-1,125.172,134.774)"
|
||||
style="font-variant:normal;font-size:10.9091px;font-family:'Nimbus Sans';-inkscape-font-specification:NimbusSanL-Regu;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="text304"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
id="tspan302">X</tspan></text><g
|
||||
id="g306"
|
||||
transform="translate(125.172,134.774)" /></g></g><g
|
||||
id="g308"
|
||||
transform="translate(-68.179,-67.725)" /></g></g><g
|
||||
id="g310"
|
||||
transform="translate(-140.10158,51.959894)"><path
|
||||
d="M 16.36383,49.0915 V 65.45537 H 65.45537 V 49.0915 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path312" /></g><g
|
||||
id="g314"
|
||||
transform="translate(-140.10158,51.959894)"><path
|
||||
d="M 16.36383,16.36383 V 49.0915 H 32.72768 V 16.36383 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path316" /></g><g
|
||||
id="g318"
|
||||
transform="translate(-140.10158,51.959894)"><path
|
||||
d="M 49.0915,16.36383 V 49.0915 H 65.45537 V 16.36383 Z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path320" /></g><path
|
||||
d="M -138.60716,125.90349 H -141.596"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4950" /></g><g
|
||||
id="g27515"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="281.18353"
|
||||
y="-41.621716"
|
||||
id="text3554"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3552"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="281.18353"
|
||||
y="-41.621716">1</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="4.0303702"
|
||||
id="text15840"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan15838"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="4.0303702">1</tspan></text></g><g
|
||||
id="g27521"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="234.68353"
|
||||
y="-41.621716"
|
||||
id="text6146"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan6144"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="234.68353"
|
||||
y="-41.621716">2</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="49.030373"
|
||||
id="text15844"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan15842"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="49.030373">2</tspan></text></g><g
|
||||
id="g27531"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="189.25583"
|
||||
y="-41.621716"
|
||||
id="text12626"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan12624"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="189.25583"
|
||||
y="-41.621716">3</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="94.030373"
|
||||
id="text16112"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan16110"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="94.030373">3</tspan></text></g><g
|
||||
id="g27537"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="143.31956"
|
||||
id="text17117"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17115"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="327.06552"
|
||||
y="143.31956">4</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="142.49802"
|
||||
y="-41.613903"
|
||||
id="text27525"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan27523"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="142.49802"
|
||||
y="-41.613903">4</tspan></text></g><g
|
||||
id="g27541"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="281.20703"
|
||||
y="143.31956"
|
||||
id="text17223"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17221"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="281.20703"
|
||||
y="143.31956">5</tspan></text></g><g
|
||||
id="g27545"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="234.55463"
|
||||
y="143.31956"
|
||||
id="text17905"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17903"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="234.55463"
|
||||
y="143.31956">6</tspan></text></g><g
|
||||
id="g27563"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="234.7226"
|
||||
y="94.02256"
|
||||
id="text18639"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan18637"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="234.7226"
|
||||
y="94.02256">7</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="189.08786"
|
||||
y="143.31956"
|
||||
id="text21165"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan21163"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="189.08786"
|
||||
y="143.31956">7</tspan></text></g><g
|
||||
id="g27575"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="234.62885"
|
||||
y="48.924904"
|
||||
id="text19367"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan19365"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="234.62885"
|
||||
y="48.924904">8</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="142.58786"
|
||||
y="143.31956"
|
||||
id="text22935"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan22933"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="142.58786"
|
||||
y="143.31956">8</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="142.58786"
|
||||
y="94.014748"
|
||||
id="text23869"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan23867"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="142.58786"
|
||||
y="94.014748">9</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="136.40427"
|
||||
y="48.917091"
|
||||
id="text25419"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan25417"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="136.40427"
|
||||
y="48.917091">10</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.75"
|
||||
x="136.57224"
|
||||
y="4.0225577"
|
||||
id="text26533"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26531"
|
||||
style="font-weight:bold;stroke-width:0.75"
|
||||
x="136.57224"
|
||||
y="4.0225577">11</tspan></text></g><g
|
||||
id="g785"
|
||||
class="fragment"><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#ffffff;stroke-width:0.75"
|
||||
x="233.52338"
|
||||
y="2.8437288"
|
||||
id="text12626-3"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan12624-6"
|
||||
style="font-weight:bold;fill:#ffffff;stroke-width:0.75"
|
||||
x="233.52338"
|
||||
y="2.8437288">∞</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#ffffff;stroke-width:0.75"
|
||||
x="280.02338"
|
||||
y="2.8437288"
|
||||
id="text749"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan747"
|
||||
style="font-weight:bold;fill:#ffffff;stroke-width:0.75"
|
||||
x="280.02338"
|
||||
y="2.8437288">∞</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#ffffff;stroke-width:0.75"
|
||||
x="280.02338"
|
||||
y="47.843731"
|
||||
id="text753"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan751"
|
||||
style="font-weight:bold;fill:#ffffff;stroke-width:0.75"
|
||||
x="280.02338"
|
||||
y="47.843731">∞</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#ffffff;stroke-width:0.75"
|
||||
x="280.02338"
|
||||
y="94.343727"
|
||||
id="text757"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan755"
|
||||
style="font-weight:bold;fill:#ffffff;stroke-width:0.75"
|
||||
x="280.02338"
|
||||
y="94.343727">∞</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#ffffff;stroke-width:0.75"
|
||||
x="188.52338"
|
||||
y="94.343727"
|
||||
id="text761"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan759"
|
||||
style="font-weight:bold;fill:#ffffff;stroke-width:0.75"
|
||||
x="188.52338"
|
||||
y="94.343727">∞</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#ffffff;stroke-width:0.75"
|
||||
x="188.52338"
|
||||
y="47.843727"
|
||||
id="text765"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan763"
|
||||
style="font-weight:bold;fill:#ffffff;stroke-width:0.75"
|
||||
x="188.52338"
|
||||
y="47.843727">∞</tspan></text><text
|
||||
xml:space="preserve"
|
||||
style="font-size:16px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#ffffff;stroke-width:0.75"
|
||||
x="188.52338"
|
||||
y="2.8437262"
|
||||
id="text769"
|
||||
transform="scale(1,-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan767"
|
||||
style="font-weight:bold;fill:#ffffff;stroke-width:0.75"
|
||||
x="188.52338"
|
||||
y="2.8437262">∞</tspan></text></g></g></svg>
|
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.8 KiB |
|
@ -0,0 +1,691 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="358.97247mm"
|
||||
height="145.04407mm"
|
||||
viewBox="0 0 358.97247 145.04407"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
||||
sodipodi:docname="adjacency_list.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4846738"
|
||||
inkscape:cx="898.54249"
|
||||
inkscape:cy="177.43893"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1011"
|
||||
inkscape:window-x="1080"
|
||||
inkscape:window-y="352"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs2">
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Lend"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path1240" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Lstart"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path1237" />
|
||||
</marker>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(95.743232,-18.137903)">
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="path31"
|
||||
cx="36.64978"
|
||||
cy="26.018934"
|
||||
r="7.3810315" />
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="path31-3"
|
||||
cx="87.616486"
|
||||
cy="26.018934"
|
||||
r="7.3810315" />
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="path31-3-6"
|
||||
cx="138.58315"
|
||||
cy="26.018934"
|
||||
r="7.3810315" />
|
||||
<g
|
||||
id="g373"
|
||||
transform="translate(-12.701103,0.61282633)">
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect287"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="34.906265"
|
||||
y="54.277321" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect369"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="49.350887"
|
||||
y="54.277321" />
|
||||
</g>
|
||||
<g
|
||||
id="g379"
|
||||
transform="translate(38.26559,0.61282633)">
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect375"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="34.906265"
|
||||
y="54.277321" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect377"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="49.350887"
|
||||
y="54.277321" />
|
||||
</g>
|
||||
<g
|
||||
id="g385"
|
||||
transform="translate(89.232269,0.61282633)">
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect381"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="34.906265"
|
||||
y="54.277321" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect383"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="49.350887"
|
||||
y="54.277321" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 29.574488,62.357179 35.180684,33.868463"
|
||||
id="path420" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 79.845329,62.357179 5.6062,-28.488716"
|
||||
id="path1593" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 36.649783,25.452515 43.52895,53.941231"
|
||||
id="path1597"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 87.616479,25.452515 6.879167,28.488716"
|
||||
id="path1736"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<g
|
||||
id="g1742"
|
||||
transform="translate(89.232269,0.61282633)">
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect1738"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="34.906265"
|
||||
y="54.277321" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect1740"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="49.350887"
|
||||
y="54.277321" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 138.58315,25.452515 6.87917,28.488716"
|
||||
id="path1744"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 130.64537,62.357179 5.6062,-28.488716"
|
||||
id="path1595" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="39.863434"
|
||||
y="65.653564"
|
||||
id="text3134"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3132"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="39.863434"
|
||||
y="65.653564">U</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="90.663414"
|
||||
y="65.653564"
|
||||
id="text10412"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan10410"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="90.663414"
|
||||
y="65.653564">V</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="140.40512"
|
||||
y="65.653564"
|
||||
id="text13577"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan13575"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="140.40512"
|
||||
y="65.653564">W</tspan></text>
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend)"
|
||||
d="M 44.744406,26.401431 H 79.454769"
|
||||
id="path14977"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend)"
|
||||
d="M 95.544393,26.401431 H 130.25478"
|
||||
id="path15367"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="33.897701"
|
||||
y="87.65461"
|
||||
id="text17224"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17222"
|
||||
style="stroke-width:0.264583"
|
||||
x="33.897701"
|
||||
y="87.65461">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan18436">1</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="84.878738"
|
||||
y="87.65461"
|
||||
id="text20216"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan20214"
|
||||
style="stroke-width:0.264583"
|
||||
x="84.878738"
|
||||
y="87.65461">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan20212">2</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="135.80867"
|
||||
y="87.628632"
|
||||
id="text21403"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan21401"
|
||||
style="stroke-width:0.264583"
|
||||
x="135.80867"
|
||||
y="87.628632">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan21399">3</tspan></tspan></text>
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 36.649783,82.623383 V 69.923144"
|
||||
id="path25745"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 87.616479,82.623383 V 69.923144"
|
||||
id="path26211"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 138.58315,82.623383 V 69.923144"
|
||||
id="path26213"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<g
|
||||
id="g26231"
|
||||
transform="translate(47.105404,0.32337155)">
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26215"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="27.49683"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26217"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="41.941452"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26223"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="56.386074"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26225"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="70.830696"
|
||||
y="107.80682" />
|
||||
</g>
|
||||
<g
|
||||
id="g26241"
|
||||
transform="translate(-16.394599,0.32337155)">
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26233"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="27.49683"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26235"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="41.941452"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26237"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="56.386074"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26239"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="70.830696"
|
||||
y="107.80682" />
|
||||
</g>
|
||||
<g
|
||||
id="g26251"
|
||||
transform="translate(110.60541,0.32337155)">
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26243"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="27.49683"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26245"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="41.941452"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26247"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="56.386074"
|
||||
y="107.80682" />
|
||||
<rect
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="rect26249"
|
||||
width="14.444621"
|
||||
height="14.444621"
|
||||
x="70.830696"
|
||||
y="107.80682" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="29.80761"
|
||||
y="116.27283"
|
||||
id="text26257"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26255"
|
||||
style="stroke-width:0.264583"
|
||||
x="29.80761"
|
||||
y="116.27283">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan26253">1</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="171.62428"
|
||||
y="116.27283"
|
||||
id="text26263"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26261"
|
||||
style="stroke-width:0.264583"
|
||||
x="171.62428"
|
||||
y="116.27283">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan26259">1</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="43.984081"
|
||||
y="116.27283"
|
||||
id="text26269"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26267"
|
||||
style="stroke-width:0.264583"
|
||||
x="43.984081"
|
||||
y="116.27283">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan26265">2</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="93.725739"
|
||||
y="116.27283"
|
||||
id="text26275"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26273"
|
||||
style="stroke-width:0.264583"
|
||||
x="93.725739"
|
||||
y="116.27283">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan26271">2</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="107.85059"
|
||||
y="116.24685"
|
||||
id="text26281"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26279"
|
||||
style="stroke-width:0.264583"
|
||||
x="107.85059"
|
||||
y="116.24685">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan26277">3</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:5.64444px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="157.06316"
|
||||
y="116.24685"
|
||||
id="text26287"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26285"
|
||||
style="stroke-width:0.264583"
|
||||
x="157.06316"
|
||||
y="116.24685">v<tspan
|
||||
style="font-size:65%;baseline-shift:sub"
|
||||
id="tspan26283">3</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="58.253956"
|
||||
y="118.04864"
|
||||
id="text26291"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan26289"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="58.253956"
|
||||
y="118.04864">a</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="121.75394"
|
||||
y="119.03497"
|
||||
id="text27269"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan27267"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="121.75394"
|
||||
y="119.03497">b</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="185.25398"
|
||||
y="118.04864"
|
||||
id="text27273"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan27271"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="185.25398"
|
||||
y="118.04864">c</tspan></text>
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="circle30677"
|
||||
cx="39.991474"
|
||||
cy="155.30093"
|
||||
r="7.3810315" />
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="circle30679"
|
||||
cx="103.49148"
|
||||
cy="155.30093"
|
||||
r="7.3810315" />
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="circle30681"
|
||||
cx="166.99149"
|
||||
cy="155.30093"
|
||||
r="7.3810315" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend)"
|
||||
d="M 48.448574,155.68343 H 95.32977"
|
||||
id="path30683"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend)"
|
||||
d="m 111.4194,155.68343 h 47.41039"
|
||||
id="path30685"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 17.895587,115.38194 18.533066,32.66014"
|
||||
id="path30900"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 81.395591,115.38194 18.533066,32.66014"
|
||||
id="path31020"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 144.89562,115.38194 18.53307,32.66014"
|
||||
id="path31022"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 39.831452,156.04018 53.904315,123.31813"
|
||||
id="path31024"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 103.33146,156.04018 14.07287,-32.72205"
|
||||
id="path31125"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 166.8315,156.04018 14.07287,-32.72205"
|
||||
id="path31127"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:11.2889px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="-96.779518"
|
||||
y="29.563251"
|
||||
id="text32847"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan32845"
|
||||
style="font-weight:bold;font-size:11.2889px;stroke-width:0.264583"
|
||||
x="-96.779518"
|
||||
y="29.563251">LinkedList[Vertex]</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:11.2889px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="-96.779518"
|
||||
y="118.42278"
|
||||
id="text40149"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan40147"
|
||||
style="font-weight:bold;font-size:11.2889px;stroke-width:0.264583"
|
||||
x="-96.779518"
|
||||
y="118.42278">Edge</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:11.2889px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="-95.798325"
|
||||
y="66.147354"
|
||||
id="text41287"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan41285"
|
||||
style="font-weight:bold;font-size:11.2889px;stroke-width:0.264583"
|
||||
x="-95.798325"
|
||||
y="66.147354">Vertex</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:11.2889px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="-96.779518"
|
||||
y="158.3712"
|
||||
id="text41291"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan41289"
|
||||
style="font-weight:bold;font-size:11.2889px;stroke-width:0.264583"
|
||||
x="-96.779518"
|
||||
y="158.3712">LinkedList[Edge]</tspan></text>
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="circle44803"
|
||||
cx="219.78366"
|
||||
cy="26.693445"
|
||||
r="7.3810315" />
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="circle44805"
|
||||
cx="184.21912"
|
||||
cy="78.383881"
|
||||
r="7.3810315" />
|
||||
<circle
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-dashoffset:26.1543"
|
||||
id="circle44807"
|
||||
cx="255.34821"
|
||||
cy="78.383881"
|
||||
r="7.3810315" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 214.4904,31.956183 188.21003,71.679089"
|
||||
id="path44848" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="m 192.1728,78.535091 h 55.66198"
|
||||
id="path44850" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
|
||||
d="M 252.89361,70.725637 225.30575,32.971619"
|
||||
id="path44852" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="215.77322"
|
||||
y="30.223978"
|
||||
id="text50442"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan50440"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="215.77322"
|
||||
y="30.223978">U</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="180.39679"
|
||||
y="81.98436"
|
||||
id="text50530"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan50528"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="180.39679"
|
||||
y="81.98436">V</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="249.90771"
|
||||
y="81.98436"
|
||||
id="text50534"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan50532"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="249.90771"
|
||||
y="81.98436">W</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="192.75375"
|
||||
y="51.423004"
|
||||
id="text50538"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan50536"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="192.75375"
|
||||
y="51.423004">a</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="215.9006"
|
||||
y="87.990524"
|
||||
id="text50542"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan50540"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="215.9006"
|
||||
y="87.990524">b</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.87778px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;stroke-width:0.264583"
|
||||
x="241.33392"
|
||||
y="52.039276"
|
||||
id="text50546"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan50544"
|
||||
style="font-weight:bold;font-size:9.87778px;stroke-width:0.264583"
|
||||
x="241.33392"
|
||||
y="52.039276">c</tspan></text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 470 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 12 KiB |
|
@ -51,18 +51,28 @@ class_name = "CSE-250 Fall 2022 - Section B"
|
|||
<!-- Any Talk-Specific Footer Content Goes Here -->
|
||||
<span style="margin-right: 150px;"><%= date %></span>
|
||||
<span style="margin-right: 150px; background-color: lightgray; border-radius: 3px; padding: 3px;"><a href="<%= out_path %>?print-pdf">🖶</a></span>
|
||||
<span>© Oliver Kennedy, Andrew Hughes; The University at Buffalo, SUNY</span>
|
||||
<span style="display: inline-block; text-align: right">© Oliver Kennedy, Andrew Hughes; The University at Buffalo, SUNY
|
||||
<% if defined? attribution %><br><span style="font-size: 70%"><%=attribution%></span><% end %></span>
|
||||
</div>
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section>
|
||||
<% if defined? cat %>
|
||||
<div style="display: flex; flex-direction: columns">
|
||||
<div style="width: 300px;">
|
||||
<img src="<%=cat%>" width="300px">
|
||||
</div><div style="width: 500px; font-size: 50%">
|
||||
<% end %>
|
||||
<h3><%= title %></h3>
|
||||
<h4><%= class_name %></h4>
|
||||
<p><%= date %></p>
|
||||
<% if defined? textbook %>
|
||||
<h5><b>Textbook</b>: <%= textbook %></h5>
|
||||
<% end %>
|
||||
<% if defined? cat %>
|
||||
</div></div>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
|
||||
|
|