0% found this document useful (0 votes)
65 views5 pages

Eulerian Circuits and Graph Algorithms

The document discusses several graph theory concepts: 1) Eulerian circuits require that every node has an even degree so you can start and end at the same node while traversing each edge once. Eulerian paths allow starting and ending at different nodes if exactly two nodes have odd degree. 2) The Chinese Postman Problem finds the shortest route covering all edges when no Eulerian tour exists. It involves pairing nodes of odd degree and finding shortest distances between pairs. 3) Graphs can be represented by matrices where rows are edges and columns are nodes, with 1s indicating the edge's endpoints. Euler's formula relates the number of nodes, edges, and faces/loops in a planar graph.

Uploaded by

Sergey Kojoian
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views5 pages

Eulerian Circuits and Graph Algorithms

The document discusses several graph theory concepts: 1) Eulerian circuits require that every node has an even degree so you can start and end at the same node while traversing each edge once. Eulerian paths allow starting and ending at different nodes if exactly two nodes have odd degree. 2) The Chinese Postman Problem finds the shortest route covering all edges when no Eulerian tour exists. It involves pairing nodes of odd degree and finding shortest distances between pairs. 3) Graphs can be represented by matrices where rows are edges and columns are nodes, with 1s indicating the edge's endpoints. Euler's formula relates the number of nodes, edges, and faces/loops in a planar graph.

Uploaded by

Sergey Kojoian
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd

Eulerian circuit(tour)

Premise: 4 nodes, 7 arcs Conclusion: to start from one node, pass through each arc exactly once and come back to the starting node, the degree (number of arcs sprouting from the node) of each node has to be e en! Conclusion: "e can only start from a node, pass through each arc exactly once and end up at a different node, if exactly # arcs ha e odd degree and the rest ha e e en degree!

Chinese Postman Problem

Premise: $o Eulerian tour, but %e %ish to take the shortest path from a start node to itself by co ering all the arcs (not once since the path is not Eulerian)! &he sum of all the degrees of all the nodes is e en because e ery arc adds # degrees(one per node it connects), so for n arcs, #n degrees! 'um of all odd degree nodes( degrees is e en, because the sum of e en ones( is e en and the total degree is e en, so e en ) e en * e en! &hen the number of odd degree nodes is e en because if it %ere odd, %e %ould ha e a odd number sum of odd numbers, %hich is odd!

+lgorithm for finding shortest path

,dentify all odd degree nodes (e en number of them) Consider all the pair%ise matchings of these nodes! "rite do%n the smallest distance bet%een the members of each pairing and sum up these distances -o this for all the pair%ise matchings

.or the matching that yields the shortest total distance, add the arcs of shortest path bet%een the members of the pairings! $o% count the total distance!

/raph to 0atrix

"e can form a matrix that represents the info in a graph by letting the columns rep! $odes, and ro%s rep! +rcs! &hen 123 4 4 35 4 23 4 3 matrix says that %e ha e 4 nodes, and # edges!

&he first edge lea es node 3 and goes to node 4! &he second edge lea es node 6 and goes to node 4 as %ell! ,mportant: ,f some of the edges form a loop, the ro%s that rep! those edges are linearly dependent! +lso note that e ery ro% ector only has # non 7eros, because the arc lea es exactly one node and goes into exactly one node! ,f the graph represents current flo%, then sol ing +x*4 tells us that if the potential is a ector in the nullspace, nothing %ill mo e! 'o if there is a nullspace %e fix the free ars! 8esponsible for it(ground the node)! +9(&)y * 4 is :irchoff(s Current ;a% (&otal flo% at a node is 4)! y2 ars! Correspond to arcs!

Euler(s .ormula

.or e ery graph, <nodes 2 <arcs = <loops * 3

You might also like