2017017(期末)

来源:互联网 发布:sql 查询分析器 编辑:程序博客网 时间:2024/06/04 23:07
8.23. In the NODE-DISJOINT PATHS problem, the input is an undirected graph in which
some vertices have been specially marked: a certain number of “sources”
s1, s2, . . . sk and an equal number of “destinations” t1, t2, . . . tk. The goal is to find
k node-disjoint paths (that is, paths which have no nodes in common) where the
ith path goes from si to ti . Show that this problem is NP-complete.
Here is a sequence of progressively stronger hints.
(i) Reduce from 3SAT.
(ii) For a 3SAT formula with m clauses and n variables, use k = m+ n
sources and destinations. Introduce one source/destination pair (sx, tx) for
each variable x, and one source/destination pair (sc , tc) for each
clause c.
(iii) For each 3SAT clause, introduce 6 new intermediate vertices, one for each
literal occurring in that clause and one for its complement.
(iv) Notice that if the path from sc to tc goes through some intermediate vertex
representing, say, an occurrence of variable x, then no other path can go
through that vertex. What vertex would you like the other path to be forced
to go through instead? 

题意为:


 在提示的基础上再做以下处理:对任意子句

连结起来形成三条路径,因为任意 li 为真都使得c 为真。另外,对于每个变量v ,将 Sv 与所有 串联起来,再连向tv ,从而形成一条路径,再将Sv 与所有v 串联起来,连向tv ,又形成一条路径。在这两条路径中,必然要选择其中一条,这保证了所有变量的一致性,即如果有任意子句选择了v ,则其余子句就不能再选择v 。下面举一个简单的例子,假设要验证 CNF:(x ∨ y ∨ z)(x ∨ y ∨ z )是否可以被满足,令 u = ( x ∨ y ∨ z)v = (x ∨ y ∨ z ),可得 NODE-DISJOINT PATH 问题如下图:



原创粉丝点击