[关闭]
@740340735 2016-01-01T08:59:03.000000Z 字数 1210 阅读 622

Exercise 3.1

算法设计与分析


Problem Discription

Design a polynomial-time algorithm for solving the following problem: Given an undirected Graph with degree constraints , find a feasible orientation or determine that there is none. In particular:

  1. Reduce it to a max flow problem. Prove that a max flow of a certain value can be converted into an orientation (and vice versa).

  2. Redcuce it to a maximum matching. Show how certain matching can be converted into orientations (and vice versa).

Max Flow Algorithm
  1. Note the undirected edges as and consider them as vertices of the max flow network.
  2. Build an edge with from to each .
  3. Build two edges with from each to and .
  4. Build an edge from each to with capacity of the constraint .
  5. Run , and get the result .
  6. If , there is a feasible orientation that
  7. If , there is no feasible orientation.
Maximum Matching Algorithm
  1. Note the undirected edges as and them on one side of matching.
  2. For each , put vertices on the other side of matching.
  3. Build an edge from each to and .
  4. Run , and get the result .
  5. If , there is a feasible orientation that
  6. If , there is no feasible orientation.
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注