0% found this document useful (0 votes)
42 views3 pages

CHINESE POST MAN and Dijkstra

The document discusses the Chinese Postman Problem (CPP) algorithm for finding the shortest route that visits every edge of a graph. It provides background on the problem, explains Kwan Mei-Ko's foundational algorithm, describes different types of graphs, and outlines the steps to solve the CPP using this algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views3 pages

CHINESE POST MAN and Dijkstra

The document discusses the Chinese Postman Problem (CPP) algorithm for finding the shortest route that visits every edge of a graph. It provides background on the problem, explains Kwan Mei-Ko's foundational algorithm, describes different types of graphs, and outlines the steps to solve the CPP using this algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

THE CHINESE POSTMAN ALGORITHM:

APPLICATION TO SAMPALOC, QUEZON

INTRODUCTION
The Chinese Postman Problem (CPP),
introduced by the Chinese
mathematician Kwan Mei-Ko in 1962, is a
classic algorithm in graph theory. It
seeks to find the shortest closed path or
circuit that visits every edge of a graph
at least once. This problem is
particularly relevant in scenarios such
as route planning for postal delivery,
EXPLANATION
garbage collection, and street The Chinese Postman Problem
sweeping. aims to determine the most
efficient route for a postman to
KWAN MEI-KO'S CONTRIBUTION deliver mail without retracing any
steps unnecessarily. The primary
Kwan Mei-Ko developed the foundational
goal is to minimize the total
algorithm for solving the CPP, which
involves:
distance or cost. The problem can
1.Identifying vertices with an odd degree. be formalized as finding an
2.Pairing these vertices in such a way that Eulerian circuit in a graph, where
the sum of the distances between paired each edge is traversed exactly
vertices is minimized. once. If an Eulerian circuit does not
3.Adding edges between paired vertices to exist, additional edges are
ensure all vertices have even degrees, thus
duplicated to create one.
forming an Eulerian circuit.

Types of Graphs in the Chinese Postman Algorithm

Eulerian Graph: A graph where each vertex


has an even number of edges.

Semi-Eulerian Graph: A graph where exactly two vertices


have an odd number of edges.

Non-Eulerian Graph: A graph where more than two


vertices have an odd number of edges.

BS MATHEMATICS III_2024
STEPS IN SOLVING
CHINESE POSTMAN
ALGORITHM
REPRESENT THE GRAPH
Model the Problem: Represent the street network
as a graph G=(V,E), where V is the set of vertices
(intersections) and E is the set of edges (streets).
1

DETERMINE VERTEX DEGREES

2 Calculate Degrees: Determine the degree


(number of edges connected) of each vertex. This
is essential to identify vertices with odd degrees.

IDENTIFY ODD DEGREE VERTICES


Odd Degree Vertices: Identify all vertices with an odd
degree. Let the number of odd degree vertices be k. In an
Eulerian graph, k=0k ; in a semi-Eulerian graph, k=2; in a
3
non-Eulerian graph, k>2

PAIR ODD DEGREE VERTICES


Pairing: If there are more than two odd degree vertices (k>2), pair
these vertices such that the total distance of the added edges is

4 minimized. This can be done using a matching algorithm or through


a manual process for smaller graphs. The goal is to make all vertex
degrees even.

ADD EDGES TO MAKE DEGREES EVEN


Duplicate Edges: Add the required edges between paired
odd degree vertices. These additional edges ensure that all
vertices now have an even degree, transforming the graph
5
into an Eulerian graph.

FIND THE EULERIAN CIRCUIT

6 Eulerian Circuit: Use Fleury’s algorithm or Hierholzer’s


algorithm to find the Eulerian circuit. An Eulerian circuit
is a path that starts and ends at the same vertex and visits
every edge exactly once.

CONSTRUCT THE OPTIMAL PATH


Construct Path: Combine the original edges and
the duplicated edges to construct the final
7
optimal path that covers all edges with minimal
additional travel.
Dijkstra's
Algorithm
Dijkstra's Algorithm is a method used to find the shortest
path from one starting node to all other nodes in a
weighted graph, where the weights represent the cost to
move from one node to another. It ensures that the
shortest path to each node is found efficiently.

Steps of Dijkstra's Algorithm

1. Setup: 2.Main 3. Repeat:


Process:

Choose the unvisited Repeat the


Start at the node with the process with the
initial node and smallest distance next unvisited
set its distance (starting with the node that has
to 0. Set the initial node). the smallest
distances to all For the chosen node, distance.
other nodes as update the distance Continue until
infinity. to each of its all nodes have
neighbors if a shorter been visited or
Mark all nodes as path is found the smallest
unvisited. through this node. distance among
Mark the chosen unvisited nodes
node as visited. is infinity.

You might also like