Download presentation
Presentation is loading. Please wait.
Published byElla Bruce Modified over 9 years ago
1
Complete Graphs A complete graph is one where there is an edge between every two nodes A C B G
2
Clique Clique: A complete subgraph of a graph A C B D F G E H 10 20 16 4 6 8 24 20 6 9 13 12 Problem (Clique): Find the clique with the largest number of nodes in a graph
3
CNF Can Be Reduced into Clique First we need to formulate Clique as a decision problem: Decision Problem (Clique): Given a graph and a value K, is there a clique of size K (i.e., with K nodes) in the graph? We will transform CNF formulas into clique problems such that the formulas can be satisfied if and only if the decision problem for the Clique is true We are going to show: CNF Clique
4
CNF Can Be Reduced Into Clique (II) = (a) (¬a ¬b c d) (¬c ¬d) (¬d) a ¬a ¬b c d ¬c¬c ¬d¬d ¬d¬d Connect two nodes from different disjunctions if they are not in conflict (i.e., a and ¬a are in conflict) Can be made true if and only if there is a Clique of size 4
5
CNF Can Be Reduced Into Clique (II) Generally for a given CNF: 1 2 … n it can be made true if and only if there is a Clique of size n for the corresponding graph
6
Vertex-Cover A C B D F G E H 10 20 16 4 6 8 24 20 6 9 13 12 Given a graph G, a vertex cover V is a collection of nodes in G such that for every arc (w,v) either w is in G or v is in G or both Vertex-Cover Problem: Given a graph, find the vertex- cover containing the minimum number of nodes
7
Vertex-Cover is NP-Hard Hint: 1. Use the complement of a graph. 2. Make simple examples (e.g., graphs with 4-5 nodes) Given a graph G, the complement G C is a graph containing the same nodes as G, and the arcs: {(u,v) : (u,v) is not in G} G: G C : You are going to show: Clique Vertex-Cover
8
Independent Set Given a graph G, an independent set V is a collection of nodes in G such that no two nodes in V have an arc connecting them A C B D F G E H 10 20 16 4 6 8 24 20 6 9 13 12 U
9
Independent Set Independent-Set Problem: Given a graph, find the Independent-set containing the maximum number of nodes You are going to show: Vertex-Cover Independent-Set Hint: look at the hint for the transformation of Clique into Vertex-Cover
10
Constraint-SAT Definition. A constraint is an expression of the form: (x = y) (x y) Where x and y are variables that can take values from a set (e.g., {1, 2, 3, 4, …}) Definition. Constraint-SAT: given a sequence of constraints connected by : 1 2 … n find assignments of the variables that makes the conjunction true For example: ( x = y) ( x z) (y z)
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.