Maximum Flow Problem Format


Maximum flow problems are in DIMACS format. See Network Flows and Matching: First DIMACS Implementation Challenge, D. S. Johnson and C. C. McGeoch (editors), AMS, 1993.

Network Structure

Input Format

Input can be either a file or a stream. By convention, maxflow problem file names should have the suffix .max. Here is a sample file: sample.max.

Output Format

The following output format should be used to produce a complete solution in ASCII. In some cases complete solutions are useful. Note, however, that a maxflow problem can have several optimal solutions. In regular testing, the value of the maximum flow is often sufficient. Some application need minimum cuts rather than maximum flows. When a solver is incorporated in a program, the communication is usually performed at the data structure level. Here is a sample file: sample.sol. Solution line types are as follows.