WOLFRAM

finds a Chinese postman tour in the graph g of minimal length.

finds at most k Chinese postman tours.

FindPostmanTour[{vw,},]

uses rules vw to specify the graph g.

Details

  • A Chinese postman tour is a tour that traverses each edge at least once.
  • FindPostmanTour returns a list of edges consisting of Chinese postman tours.
  • FindPostmanTour returns the list {} if no Chinese postman tours exist.
  • FindPostmanTour[g] is equivalent to FindPostmanTour[g,1].
  • FindPostmanTour works with undirected graphs, directed graphs, weighted graphs, and multigraphs.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Find a Chinese postman tour:

Out[2]=2

Highlight the tour:

Out[3]=3

Find several Chinese postman tours:

Out[2]=2

Scope  (8)Survey of the scope of standard use cases

FindPostmanTour works with undirected graphs:

Out[1]=1

Directed graphs:

Out[1]=1

Weighted graphs:

Out[1]=1

Multigraphs:

Out[1]=1

Find several Chinese postman tours:

Out[1]=1

Use rules to specify the graph:

Out[1]=1

FindPostmanTour returns an empty result for a graph with no Chinese postman tours:

Out[1]=1

FindPostmanTour works with large graphs:

Out[2]=2

Applications  (3)Sample problems that can be solved with this function

Find a shortest route that a newspaper carrier can use to distribute newspapers in a neighborhood:

Out[2]=2
Out[3]=3

The total distance:

Out[4]=4

Find the most efficient way for a letter carrier to deliver letters, knowing the time it takes to deliver mail on a street and the time it takes to walk a street without delivering mail (deadheading time):

A route that goes through all the streets and minimizes the total deadheading time:

Out[2]=2

Show the route:

Out[3]=3

The total delivery time:

Out[4]=4
Out[5]=5
Out[6]=6

Testing combinations of actions in a finite-state machine:

Generate a line graph:

Out[2]=2

A length-2 switch cover:

Out[3]=3

Properties & Relations  (2)Properties of the function, and connections to other functions

An Eulerian graph has a Chinese postman tour:

Out[1]=1
Out[2]=2
Out[3]=3

It is the same as its Eulerian cycle:

Out[4]=4

A connected graph has a Chinese postman tour:

Out[1]=1
Out[2]=2

Neat Examples  (1)Surprising or curious use cases

Find a Chinese postman tour:

Out[7]//Shallow=7

Dynamically highlight cycles:

Out[11]=11
Wolfram Research (2012), FindPostmanTour, Wolfram Language function, https://reference.wolfram.com/language/ref/FindPostmanTour.html (updated 2015).
Wolfram Research (2012), FindPostmanTour, Wolfram Language function, https://reference.wolfram.com/language/ref/FindPostmanTour.html (updated 2015).

Text

Wolfram Research (2012), FindPostmanTour, Wolfram Language function, https://reference.wolfram.com/language/ref/FindPostmanTour.html (updated 2015).

Wolfram Research (2012), FindPostmanTour, Wolfram Language function, https://reference.wolfram.com/language/ref/FindPostmanTour.html (updated 2015).

CMS

Wolfram Language. 2012. "FindPostmanTour." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/FindPostmanTour.html.

Wolfram Language. 2012. "FindPostmanTour." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/FindPostmanTour.html.

APA

Wolfram Language. (2012). FindPostmanTour. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindPostmanTour.html

Wolfram Language. (2012). FindPostmanTour. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindPostmanTour.html

BibTeX

@misc{reference.wolfram_2025_findpostmantour, author="Wolfram Research", title="{FindPostmanTour}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FindPostmanTour.html}", note=[Accessed: 30-March-2025 ]}

@misc{reference.wolfram_2025_findpostmantour, author="Wolfram Research", title="{FindPostmanTour}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FindPostmanTour.html}", note=[Accessed: 30-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_findpostmantour, organization={Wolfram Research}, title={FindPostmanTour}, year={2015}, url={https://reference.wolfram.com/language/ref/FindPostmanTour.html}, note=[Accessed: 30-March-2025 ]}

@online{reference.wolfram_2025_findpostmantour, organization={Wolfram Research}, title={FindPostmanTour}, year={2015}, url={https://reference.wolfram.com/language/ref/FindPostmanTour.html}, note=[Accessed: 30-March-2025 ]}