<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<head>
    <name>Algorithm: Directed Chinese Postman Problem</name>
    <doc-version>$Date: 2003/10/06 11:16:09 $</doc-version>
    <author>Matt Albrecht</author>
</head>
<!--
&#x2208; = contained in the set
&#x211d; = the set of all Real numbers
&#x2265; = greater than or equal to
&#x2200; = for all
&#x220b; = such that
&#x3c6; = phi
&#x2211; = sum (as sigma)
-->
<body>
<section>About The Chinese Postman Problem</section>
<P>
The Chinese Postman Problem (CPP) is one of those graph theory problems with a
host of applications.  Since it belongs in the realm of graph theory (and,
thus, combinatorics), I shall explain the algorithm and the current
implementation in graph theroy terminology.
</P>
<P>
The CPP resembles the Traveling Salesman Problem (TSP), but the postman in this
problem must visit each road (edge) in the city (graph) to deliver the mail.
Unlike TSP, CPP for either the directed or undirected case can be solved in
polynomial time (mixed mode is NP-hard) <ref name="1"/>.
</P>
<P>
Let <B>G</B>(<B>E</B>,<B>V</B>) be a directed graph, where
<B>V</B> is the set of all verticies in the graph, and <B>E</B> is the set of all
edges.  We define each edge to be the set
{<i>label</i>, (<i>i</i>, <i>j</i>), <i>w<sub>e</sub></i>},
where <i>label</i> is an identifier for the edge, the ordered pair
(<i>i</i>, <i>j</i>) forms a directed edge from vertex <i>i</i> to vertex
<i>j</i> (<i>i</i> and <i>j</i> &#x2208; V), and <i>w<sub>e</sub></i> is the
weight of the edge (for our purposes, <i>w<sub>e</sub></i> &#x2208; &#x211d;).
To aid us later, we also create a mapping <i>f<sub>w</sub></i>(<i>e</i>) =
<i>w<sub>e</sub></i> &#x2200; <i>e</i> &#x2208; <B>E</B>.
</P>
<P>
Mathematicians say that this graph is a <i>multigraph</i>
since it allows multiple edges with the same ordered pair (<i>i</i>, <i>j</i>).
I'll say that <B>E</B><i><sub>ij</sub></i> is the set of all edges whose
ordered pair of vertices match (<i>i</i>, <i>j</i>).
</P>
<P>
To solve the CPP, we must find a <i>Chinese Postman Tour</i> (CPT).
A CPT is a circuit that includes every element of <B>E</B>.
An <i>optimal</i> CPT must minimize the "cost" of the tour (I'll go into
detail about the "cost" later).
</P>
<P>
Unlike an Euler circuit, in which each edge can only be traversed once, the CPP
allows for multiple traversals of an edge.  Let <i>f<sub>ij</sub></i> be the
extra number of times the CPT traverses any directed edge from <i>i</i> to
<i>j</i>; since every edge has to be traversed at least once,
<i>f<sub>ij</sub></i> + 1 &#x2265; 1 is the number of times edge <i>e</i>
is traversed in the CPT.
</P>
<P>
We write <i>c<sub>ij</sub></i> to mean the minimal weight value for all edges
with vertices <i>i</i> to <i>j</i>, so that
    <i>c<sub>ij</sub></i> = <tt>min</tt>(<i>f<sub>w</sub></i>(<i>e</i>))
    &#x2200; <i>e</i> &#x2208; <B>E</B><i><sub>ij</sub></i>.
</P>
<P>
Thus, we can express the optimization of the CPT as minimizing the weight of
the extra edge visits <ref name="2" />:
<BLOCKQUOTE>
<i>&#x3c6;</i> = &#x2211; <i>c<sub>ij</sub></i> <i>f<sub>ij</sub></i>
</BLOCKQUOTE>

</P>

<reflist>
    <refitem id="1">
    C. H. Papadimitriou, "On the Complexity of Edge Traversing,"
    <i>Journal of the ACM</i>, 23:544-554, 1976.
    </refitem>
    <refitem id="2">
    Harold Thimbleby, "The Directed Chinese Postman Problem,"
    <i>Middlesex University School of Computing Science Technical Report</i>,
    October 2000.
    </refitem>
</reflist>
</body>
</document>

