Weighted Graph

A graph $G$ is called an edge-weighted (weighted) graph if each edge of $G$ has a weight $w$ where $w\in \R$ Note - Every unweighted graph can be seen as a weighted graph where all weights = 1


Chinese Postman Problem

Given the street plan of a city find a closed walk in the city such that → **each street is passed at least once → total traveled distance is minimum

Model** Street = Edge Junction / Intersection = Vertex

Application

general approach

Untitled

pairing process

Given $G$ in which there are odd-degree vertexes, we make the degree of each vertex even by “pairing” each odd-degree vertex $u$ in $G$ with exactly one other odd-degree vertex $v$ in $G$.

Untitled

Algorithm

Let $G$ be a weighted and connected graph and let $v_1, v_2,...,v_{2r}$ be the odd-degree vertex in $G$, for some $r\geq 0$

  1. For each $v_i$ and $v_j$, with $i<j$, find a $[v_i, v_j]$-path $P_{ij}$ of min weight $w_{ij}$. Let $e_{ij}$ be the new edge between $v_i, v_j$ with weight $w_{ij}$.

    Consider all pairs of vertexes with odd degrees, and compute the lengths of their shortest paths

  2. Find a set $E$ of $r$ edges in $\{e_{ij}\ |\ 1\leq i \leq j \leq2r\}$ such that:

    1. No two different edges in $E$ share a vertex
    2. The total weight of these $r$ edges is minimum

    Pick the combination of edges with a minimal total weight, AND that connect to ALL vertexes (with uneven degrees) exactly once

  3. For each edge $e_{ij}$ in $E$, duplicate the edges in $P_{ij}$ in $G$