Differential restraint system Summary

I. Contents:

There are n variables, the system of m inequality constraints composition consisting of, referred to as differential restraint system.

Differential restraint system is to convert these relationships inequality FIG solved by the method of the shortest path.

 

Second, the common method for solving a problem that is

1, obtain the minimum value of the inequalities:

Solution: The inequality is converted to AB> = Form C, establishing B-> edge length A is C, and then determine the longest path, the longest path is the result of solution.

 

2, and the maximum value of Inequality

Solution: The inequality means into AB <= Form C, establishing B-> A side of length C, then the shortest path is obtained, the solution is the result of the shortest path.

 

3, determined whether a solution exists inequality

Solution: find a source, and then build from source to all points in question in accordance with the existing relationship, then solving this source to all points

Solutions of the maximum or minimum distance is obtained solution, if present in the ring is illustrated in FIG well, these inequalities solution exists.

 

Third, the common question:

1, note that multiple edges

2, the implied question of establishing the conditions sides

3, note that inequality interval, whether there may be a case where -1

4, to establish the distance to the source of -INF INF avoided.

5, when using SPFA, sometimes instead of the queue will be faster with the stack.

 

Fourth, practice

1 POJ 1716

2, Los Valley P3275

3, the POJ 2983

4 POJ 1364

5, POJ 3169

6, the POJ 3460

7, the POJ 1201

8, the POJ 1275

Guess you like

Origin blog.csdn.net/qq_41829060/article/details/91994472