\input graphicx
\nopagenumbers
\magnification 2400
\vsize 10.8truein
\hsize 7.6truein
\voffset -.8truein
\hoffset -.5truein
\parskip 9pt
\parindent 0pt
\def\R{{\bf R}}
\def\v{{\vskip 10pt}}
\def\u{{\vskip -10pt}}
Chinese Postman Problem:  Find shortest (or lowest weight) closed walk that visits all edges (note some edges may be repeated).

Find optimal Eulerization:

1.)  Find all odd degree vertices (note: $\exists$ an even number of odd degree vertices).

2.)  For each possible pairing (perfect matching) of odd degree vertices, $v_i, v_j$, 

{\hskip 0.3in Find the shortest path or minimum weight 

\rightline{path, $P_{i, j}$,  between each pair $v_i, v_j$.}}


3.)  Take optimal pairing (perfect matching), and

\hskip 0.3in duplicate  each edge in the path $P_{i, j}$ for

\rightline{ each ${i, j}$ in the  optimal pairing}
\u
\hskip 0.3in Note this creates an Eulerian graph $G'$

4.)  Find Eulerian circuit in the  Eulerian graph $G'$.

5.)  Apply to the original graph by repeating edges that were duplicated to create the Eulerian graph $G'$.


\eject

Konigsberg bridge with made up distances.

Find shortest tour that visits each bridge and returns to starting point.  
\v
\centerline{I.e. Find lowest weight closed walk.}

\centerline{Thus  find optimal Eulerization.}  


Note all vertices have odd degree.
\vskip 10pt
pair: bc

pair: ad

\vskip -50pt
\rightline{\includegraphics[height=2.1cm]{konigsberg} }
\vfill

pair: ab

pair: cd

\vskip -50pt
\rightline{\includegraphics[height=2.1cm]{konigsberg} }
\vfill

pair: ac

pair: bd

\vskip -50pt
\rightline{\includegraphics[height=2.1cm]{konigsberg} }
\v

Algorithm 4.2 step 2:  Construct a weighted complete graph on 2$k$ vertices in which  vertex $v_i$ is joined to vertex $v_j$ by an edge with weight $w(P_{i, j})$:

\vskip 1in

Find an optimal perfect matching.

Defn:  A subset, $M$, of edges of a gragh $G$ is a
{\it matching} if 
 $e, e' \in M$, then  $e, e'$ are not incident to the same vertex.

Defn:  A matching is {\it perfect} if every vertex in $G$ is incident to some edge in $M$.


Some Applications of Matching:  

\hskip 0.3in Marriage. 

\hskip 0.3in Assignment of tasks to individuals where 

\rightline{one task is assigned to each individual.}

\hskip 0.3in Eulerizing a graph. 



\centerline{\includegraphics[height=3.2cm]{konigsberg} }

Find shortest tour that visits each bridge and returns to starting point. I.e. Find lowest weight closed walk.
\v
\centerline{I.e. Find lowest weight closed walk.}
\vfill \vfill

\hrule

If all vertices have even degree, then  lowest weight closed walk = Eulerian circuit.

If exactly 2 vertices, $u, w$, have odd degree, apply Dijkstra's algorithm to $u$ (or $w$).

If $2k$ vertices have odd degree, form complete graph on $2k$ vertices and use Dijkstra's algorithm $2k-1$ times to determine edge weights.  Then find optimal pairing. 


\end
<B>HW 11</b>  (due Wednesday 4/3) 93, 97, 98,  100, 101, 104

<B>HW 12</b>  (due Saturday 4/6)

Create an exam question similar to problem 2 on the midterm and  answer it.  

I.e, decide on a real-world problem that can be modeled/solved by graph theory, give an extremly simple example and determine the solution.  Note there are no restrictions on the problem except that graph theory is needed to solve it.  It can be related or unrelated to your mini-project.

Note the problem should be typed and submitted via ICON, but you can scan in hand drawn figures (or use powerpoint or Rstudio (for example graph4.r).  If you don't have access to a scanner, you can put the solution in my mailbox, but upload problem and partial solution to ICON.

NOTE:  I may use some of your problems for HW problems. 

