Reductions Between Np Complete

Print   

02 Nov 2017

Disclaimer:
This essay has been written and submitted by students and is not an example of our work. Please click this link to view samples of our professional work witten by our professional essay writers. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of EssayCompany.

problems

Adam Jama

Abstract

This is where an abstract can appear. If you don't have an abstract,

just throw out theses lines. The abstract should not exceed 10 lines :-)

3

4

5

6

7

8

9

10

Project Dissertation submitted to the University of Wales, Swansea

in Partial Ful_lment for the Degree of Bachelor of Science

1

Department of Computer Science

University of Wales Swansea

Declaration

This work has not previously been accepted in substance for any degree and is

not being currently submitted for any degree.

May 2, 2013

Signed:

Statement 1

This dissertation is being submitted in partial ful_lment of the requirements for

the degree of a BSc in Computer Science.

May 2, 2013

Signed:

Statement 2

This dissertation is the result of my own independent work/investigation, except

where otherwise stated. Other sources are speci_cally acknowledged by clear

cross referencing to author, work, and pages using the bibliography/references.

I understand that failure to do this amounts to plagiarism and will be considered

grounds for failure of this dissertation and the degree examination as a whole.

May 2, 2013

Signed:

Statement 3

I hereby give consent for my dissertation to be available for photocopying and

for inter-library loan, and for the title and summary to be made available to

outside organisations.

May 2, 2013

Signed:

Contents

1 Introduction 6

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.2 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Preliminaries 8

2.1 Graph theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.2 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.3 Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4 Polynomial-time . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.5 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.6 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3 P, NP and NP-Complete 15

3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2 P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3 NP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.3.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.4 NP-complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 The 8 basic NP-complete problems 22

4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.2 Graph Colouring . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.3 Clique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.4 Vertex Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.5 Hamiltonian Circuit . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.6 Subset-sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.7 3-SAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.8 Sudoku . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.9 Latin square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5 De_nition Of 8 Problems 30

5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.2 Graph Colouring . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.2.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.3 3-SAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.4 Hamiltonian Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.4.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4

5.5 Vertex Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.5.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.6 Subset-Sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.6.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.7 Clique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.7.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.8 Sudoku . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

5.9 Latin Square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.9.1 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

6 Conclusion 61

5

Chapter 1

Introduction

1.1 Introduction

In Computational Complexity the class NP-complete is a very important research

area in Computer Science, reason being that determining whether or not

every problem whose solution can be e_ciently veri_ed by a computer, can also

be quickly solved by a computer. The following problem is referred to as

the P versus NP problem, which is one of the principal unsolved problems

in Computer Science to date. Also, demonstrating that many computational

problems that occur throughout Computer Science are in the complexity class

NP-complete, by showing a transformation from a known NP-complete problem.

The main purpose of this dissertation is to study the Computational Complexity

class NP-complete and in particular the reduction notion. This paper

will focus on 8 decision problems which are known to be in the complexity class

NP-complete and show their reductions from known NP-complete problems.

For the 8 NP-complete problems I will give the precise de_nitions. I will also

give examples when the decision problem is satis_ed and in the case its not.

I will start by introducing the Computational Complexity classes P, NP and

NP-complete. For each of the complexity classes, I will begin by giving a brief

insight into the history behind the complexity classes. Also, providing precise

de_nitions of the complexity class, referring to known problems that are in the

class and inserting illustrations when needed.

Subsequently, I will present the precise de_nition of the 8 problems also taking

into account the di_erent interpretations of the problem. I will go onto give

a brief insight into the history behind the problems. Also, providing examples of

applications that model these 8 problems and insert illustrations when needed.

Finally, I will de_ne each of the 8 decision problem by giving the input, size

of the problem and output. We will give the history of discovery of each problem,

show where the NP-completeness of the decision problem was _rst shown.

Firstly we verify that each of the decision problems can be e_ciently veri_ed by

providing examples. We then derive rigorous proofs for each reduction, proving

that the decision problem is in the complexity class NP-complete.

6

1.2 Discovery

In 1971, Stephen Cook a Canadian Computer Scientist introduced the theory

of NP-completeness, in a paper entitled "The Complexity of Theorem Proving

Procedures" [7]. Within this paper Stephen Cook introduced important

concepts regarding NP-completeness.

Firstly, he con_rmed the class NP, were the abbreviation of NP refers to

nondeterministic polynomial time. The decision problems in the class NP can

be solved in polynomial time by a nondeterministic computer.

Also, he stressed the importance of polynomial time reduction, such that

every problem in the decision class NP is reducible to a given decision problem

C in polynomial time. If it's the case, that we have a polynomial time reduction

from one NP problem to another given NP problem. This con_rms that

any polynomial time algorithm for the second problem can be converted into a

polynomial time algorithm for the _rst problem.

Thirdly, he introduced the _rst decision problem in the class NP, the Satis-

_ability problem which is more often than not referred to as the SAT problem.

This con_rms that a given decision problem c in NP, can be polynomially reduced

to the Satis_ability problem. If the satis_ability problem can be solved

with a polynomial time algorithm, then so can every problem in NP, and if any

problem is in NP-hard, then the satis_ability problem also must be hard.

Finally, Stephen Cook proved that a problem in the decision class NP may

also be in the the decision class NP-hard such that, a given decision problem c is

NP-hard if and only if there is a known problem in NP-complete i.e the problem

that is polynomial time reducible to c.

Subsequently, in 1972 Richard Karp an American Computer Scientist developed

on the ground work of Stephen Cook by using the Boolean Satis_ability

problem to prove several other problems were in the class NP-complete by showing

there is a polynomial-time reduction from the Boolean Satis_ability problem

to each of the Karp's 21 NP-complete problems in his paper, "Reducibility Among

Combinatorial Problem" [19]. The development of Richard Karp's 21

NP-complete problems steered a wide-ranging interest in the concept of NPcompleteness.

7

Chapter 2

Preliminaries

2.1 Graph theory

De_nition 2.1.1 A graph is a pair (V;E), where V is the set of vertices, and

E is the set of edges, where an edge is a 2-element subset of V . Often a graph

is denoted by G = (V;E), and we may use V (G) := V and E(G) := E. [14]

Example 2.1.2 Some simple examples for graphs, using mathematical nota-

tion, and additionally drawing them XXX

1. A graph with one vertex: (f1g; ;). Note that a graph with at most one

vertex can not have an edge.

2. There are exactly two possible graphs G with V (G) = f1; 2g, namely with

E(G) = ; or E(G) = ff1; 2gg.

3. There are exactly three possible graphs G with V(G) = f1,2,3g, namely

with E(G) = ; or E(G) = ff1,2gg or E(G) = ff1,2g,f2,3g,f3,1gg

Figure 2.1: Undirected graphs. (a) A undirected graph G = (V,E), where V =

f;g and E = f;g. (b) An undirected graph G = (V,E), where V = f1g and E

= f;g. (c) An undirected graph G = (V,E), where V = f1,2g and E = f(1,2)g.

De_nition 2.1.3 A bipartite graph is an undirected graph G = (V;E), in

which V can be partitioned into two sets V1 and V2 such that (u,v) 2 E implies

either u 2 V1 and v 2 V2 or u 2 V2 and v 2 V1. That is, all edges go between

the two sets V1 and V2 [25].

8

Example 2.1.4 Some simple examples for bipartite graphs, using mathematical

notation, and additionally drawing them XXX

1. The bipartite graph G = (5,6), where V1 = f1,2,3g, V2 = f4,5g and E =

f(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)g

2. The bipartite graph G = (9,8), where V1 = f1,2,3,4,5g, V2 = f6,7,8,9g

and E = f(1,6),(2,6),(2,7),(3,8),(3,9),(4,7),(5,6),(5,9)g

Figure 2.2: Undirected graphs. (a) A undirected graph G = (V,E), where V1

= f1,2,3g and V2 = f4,5g and E = f(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)g. (b) An

unidirected graph G = (V,E), where V1 = f1,2,3,4,5g, V2 = f6,7,8,9g and E =

f(1,6),(2,6),(2,7),(3,8),(3,9),(4,7),(5,6),(5,9)g.

2.2 Sets

De_nition 2.2.1 A Set, is a collection of distinguishable objects, called its

elements. If object x is a element of set S, we write x 2 S. If x 62 S. We express

a set by listing all the elements inside braces.

Example 2.2.2 Some simple examples for sets, using mathematical notations,

and additionally drawing them:

1. The set S = f20,95,106,48,52,7g. The set S contains the integers 7,20,48,52,95

and 106.

2. The set S = f32,77,21,54,21,77g. The set S contains the integers 32,77,21,54,21

and 77.

3. The set S = f1,2,3,4,5,6,7,8,9g. The set S contains the integers 1,2,3,4,5,6,7,8

and 9.

9

Figure 2.3: Finite sets. (a) The _nite set S = f20,7,48,52,106,95g. (b) The _nite

set S = f37,106,52,95,48,7g. (c) The _nite set S = f1,9,8,3,6,7,2,5,4g.

Example 2.2.3 Some special notations for frequently encountered sets, using

mathematical notations:

1. ; expresses the empty set, which is the set containing no elements.

2. Z expresses the integer set, which is, the set f...,-2,-1,0,1,2,...g

3. R expresses the real number set, which is, the set

4. N expresses the natural number set, which is, the set f0,1,2,...g.

De_nition 2.2.4 A subset, is a collection of distinguishable elements, such

that, all the elements of the set A are in the set B, if x 2 A implies x 2 B. We

express a A is a subset of B by writing A _ B.

Example 2.2.5 Some simple examples for subsets, using mathematical nota-

tions, and additionally drawing them:

1. The _nite sets S = f1,3,40,20,3,1g and S' = f40,20,3g show that S' _ S

2. The _nite sets S = f7,2,7,9,1g and S' = f9,1g show that S' _ S

3. The _nite sets S = f2,3,8,14,11g and S' = f14,11g show that S' _ S

10

Figure 2.4: Finite sets. (a) The _nite set S' = f40,20,3g is a subset of the

set S = f1,3,40,20,3,1g. (b) The _nite set S' = f9,1g is a subset of the set

S = f1,7,9,77,2,7g. (c) The _nite set S' = f11,14g is a subset of the set S =

f2,14,8,3,11g

2.3 Logic

De_nition 2.3.1 In Boolean Logic, a formula is in Conjunctive Normal Form

(CNF) if it is of the form Ci

V

...

V

Cn where each Ci is a disjunction of the

literals. The formula Ci are also called (disjunctive) clauses.

Example 2.3.2 Some simple examples for CNF Boolean Logic, using mathe-

matical notation, and additionally drawing them:

1. The following formula is a disjunction of two literals A

W

B.

2. The following formula is a conjunction of two clauses A

V

B.

3. The following formula is a conjunction of two clauses where each clause

has a disjunction of literals (A

W

B)

V

(C

W

B).

De_nition 2.3.3 A Boolean Logic formula is said to be in n-CNF, where n is

a natural number, if it is in CNF and every clause contains at most n literals.

11

Figure 2.5: Boolean Logic formulas. (a) The truth table for the Conjunctive

Normal form clause (A

W

B). (b) The truth table for the conjunction of two

clauses A

V

B. (c) The truth table for the Conjunctive Normal formula, where

each clause has two distinct literals (A

W

B)

V

(C

V

B).

This shows that the third CNF example above is in 2-CNF

De_nition 2.3.4 In Boolean Logic, a formula is in Disjunctive Normal Form

(DNF) if it is of the form Ci

W

...

W

Cn where each Ci is conjunction of literals.

The formula Ci are also called (conjunction) clauses.

Example 2.3.5 Some simple examples for DNF Boolean Logic, using mathe-

matical notations, and additionally drawing them:

1. The following formula is a conjunction of two literals: A

V

B

2. The following formula is a disjunction of two clauses: A

W

B

3. The following formula is a disjunction of two clauses where each clause

has a conjunction of literals: (A

V

B)

W

(C

V

B)

12

Figure 2.6: Boolean Logic formulas. (a) The truth table for the Disjunctive

Normal form clause (A

V

B). (b) The truth table for the disjuntion of two

clauses A

V

B. (c) The truth table for the Disjunctive Normal formula, where

each clause has two distinct literals (A

V

B)

W

(C

V

B).

De_nition 2.3.6 The DeMorgan's Law

1. :(P

W

Q) ! (:P)

W

(:Q)

2. :(P

V

Q) ! (:P)

V

(:Q)

In other words, the DeMorgan's Laws are transformation rules, such that the

negation of a conjunction is the disjunction of the negations. Als, the negation

of a disjunction is the conjunction of the negations.

2.4 Polynomial-time

De_nition 2.4.1 In Computational Time Complexity, a given algorithm is a

Polynomial Time algorithm if on inputs of size n, their worst-case running time

is O(nc).

Example 2.4.2 Some simple examples of Polynomial Time algorithms, using

mathematical notaion:

1. DIV(x,y) = (q,r) such that x = y.r + r wherere r < y. The remainder r

is also denoted x mod y.

2. GCD is de_ned as the largest z such that z/x and z/y.

3. EXP(x,y) = xy.

13

2.5 Functions

De_nition 2.5.1 For any real number x, we denote the greatest integer less

than or equal to x by bxc "the oor of x".

De_nition 2.5.2 For any real number x, we denote the least integer greater

than or equal to x by dxe "the ceiling of x".

Example 2.5.3 Some simple examples using the oor and ceiling function:

1. x = 2.4: bxc = 2 and dxe = 3

2. x = 2.9: bxc = 2 and dxe = 3

3. x = 3: bx/2c = 1 and dx/2e = 2

4. x = 7: bx/2c = 3 and dx/2e = 4

2.6 Matrices

De_nition 2.6.1 In mathematics, a matrix is a rectangular array of number,

symbols and expressions, which are arranged in rows and columns.

Example 2.6.2 Some simple examples using matrices:

1. x = 2.4: bxc = 2 and dxe = 3

2. x = 2.9: bxc = 2 and dxe = 3

3. x = 3: bx/2c = 1 and dx/2e = 2

4. x = 7: bx/2c = 3 and dx/2e = 4

14

Chapter 3

P, NP and NP-Complete

3.1 Overview

In chapter 3, we present the computational complexity classes P, NP and NPcomplete.

I will begin the chapter by introducing the complexity class P, which

is the set of decision problem which can be solved e_ciently. I begin this section

by giving an insight into the history behind the notion P. I will then go onto

present the formal de_nition of the Complexity class P and provide examples

of computational problems that are in the complexity class P.

Subsequently, I will go onto introduce the complexity class NP, which is the

set of decision problems whose solution can be veri_ed e_ciently by a computer.

I also begin this section by giving an insight into the history behind the notion

NP. We go onto to present the formal de_nition of the complexity class NP

by showing the two conditions that must hold if the decision problem has a

e_ciently veri_able proof system. I will also provide some examples of decision

problems that are in the complexity class NP.

Finally, I will conclude this chapter by introducing the complexity class

NP-complete, which is the set of decision problems whose solution cannot be

solved e_ciently by a computer. In this section we present the theory of NPcompleteness,

which is based on the notion of a polynomial time transformation.

We present the formal de_nition of the theory of NP-completeness, by showing

the steps an NP problem has to take in order to to be in the complexity class

NP-complete. I will then go onto provide the formal de_nition of a polynomial

time reduction and give examples of well known reductions of NP-complete

problems.

3.2 P

3.2.1 Discovery

In 1964, Alan Cobham an American mathematician introduced the set of problems

which are e_ciently solvable in polynomial time, in his paper entitled "The

intrinsic computational di_culty of functions" [5]. He proved that many of the

mathematical functions can be proved in polynomial time.

15

Subsequently, in 1965, Jack Edmond a Canadian mathematician proved the

maximum matching problem has a polynomial time algorithm named the Blossom

algorithm, in his paper entitled "Paths, trees, and owers" [9].

De_nition 3.2.1 A decision problem S _ f0,1g_ is e_ciently solvable if there

exists a polynomial-time algorithm A such that, for every x, it holds that A(x)

= 1 if and only if x 2 S [24].

In other words, a decision problem S is in the complexity class P if there

exists a polynomial time algorithm which solves S.

Example 3.2.2 Some examples of decision problems that are in complexity

class P:

1. Primality - Given an integer n > 0, determining whether or not n is prime

was a commonly probed question in mathematics. Since, Carl Gauss, a

German mathematician challenged mathematicians to solve primality ef-

_ciently. The achievement of _nding an e_cient algorithm for primality

was well presented by Agrwal and Mainindra in the paper entitled "Primes

is in P" [1].

2. GCD - Given two integers a and b (where at least one of which is non-

zero), dertmine the largest integer z which divides a and b. The most

famous algorithm for solving the Greatest Common Divisor is the Euclid

Algorithm which is shown in [20].

3. Maximum matching - Given a graph G = (V,E), a Maximum Match m in

G is a set of pairwise non-adjacent edges, such that no two edges share a

common vertex. Jack R. Edmonds a Canadian mathematician e_eciently

solved the maximum match problem, in a paper entitled "Paths, tree and

owers" [9].

4. Eulerian Cycle - Given a graph G =(V,E), a Eulerian Cycle c in G is

a closed cycle that spans through all the edges of G. The Eulerian cycle

of given graph can be solved e_ciently by using the Fleury's Algorithm.

Wilson and Robin [28] describe the Fleury's algorithm well.

5. Connectivity - Given a grah G = (V,E), a given graph G is connected

if there is a path between every pair of vertices. The connectedness of a

given graph G can be solved e_ciently by either using depth-_rst search

or breadth-_rst search algorithms. Targan and Hopcroft [16] describe the

algorithm well for determining whether or not a graph is connected.

16

Figure 3.1: Given an undirected graph G. (a) A graph G = (V,E), where V =

f1,2,3,4g and E = f(1,2),(2,3),(3,4),(4,2)g. (b) A graph G' = (V,E), where V

= f1,2,3,4g and E = f(1,2),(2,3),(3,4),(4,2)g, such that f(1,2)g and f(3,4)g do

not share a common vertex.

3.3 NP

3.3.1 Discovery

In 1971, Stephen Cook a Canadian Computer Scientist introduced the theory

of NP-completeness in his paper "The Complexity of Theorem Proving" [7],

which provided the _rst NP-completeness proof. Stephen cook proved the _rst

problem in the class NP, the Satis_ability problem, which is more often that

not referred to as the SAT problem and also proved the same for 3SAT.

Subsequently, in 1972 Richard Karp an American Computer Scientist presented

his paper "Reducibility among Combinatorial Problems" [19]. Stephen

Karp's paper introduced 19 more problems that were NP-complete, which include

the Hamiltonian Circuit, Clique and Vertex cover. It also provided methods

to prove NP-completeness using transformations from problems known to

be NP-complete.

In 1979, Michael Garey and David Johnson published the textbook entitled

"Computers and Intractability: A Guide to the Theory of NP-completeness"

[14]. This was the _rst book on the theory of NP-completeness. Garey and

Johnson provide countless number of problems that are NP-complete and provide

the original sources where its NP-completeness was shown.

De_nition 3.3.1 A decision problem S _ f0,1g* has an e_eciently veri_able

proof system if there exists a polynomial p and a polynomial-time (veri_cation)

algorithm V such that the following two conditions hold:

1. Completeness: for every x 2 S, there exists y of length at most p(jxj) such

that V(x,y) = 1.

2. Soundness: For every x =2 S and every y, it holds that V(x,y) = 0. Thus,

x 2 S if and only if there exixts y of length at most p(jxj) such that V(x,y)

= 1.

In such a case, we say that S has an NP-proof system, and refer to V as its

veri_cation procedure (or as the proof system itself ). We denote NP the

class of decision problems that have e_ciently veri_able proof systems [24].

17

In other words, condition one refers to true assertions that have valid proofs.

Assertions refer to elements in S, from this we understand for every x belonging

to S exists a string y such that V(x,y) = 1 (YES). v accepts y as a valid proof

for the elements of x in S.

Conversely, condition two refers to false assertions that have not valid proofs,

that is for every x not belonging to the set S and every string y it holds that

V(x,y) = 0 (NO) v rejects y as a proof for the elements of x in S.

Example 3.3.2 Some examples of decision problems that fall into the class NP:

1. Set Cover - Consider a collection C of subsets of a _nite set S and a pos-

itive integer K _ jCj. Does C contain a cover of S of size K. Consider a _-

nite set S = f5,6,7,8,9g and set of sets C = ff5,6,7,8,9g,f6,8g,f7,8g,f8,9gg

and K = 2. V((S,C), 2) where S is the _nite set and C is the set of sets

n, whose union is S, Thus for K = 2 we have ff5,6,7gf8,9gg is a cover

for S.

2. Directed Hamiltonian Circuit - Consider a directed graph G (recall De_-

nition 5.4.1). Does G contain a directed Hamiltonian circuit. A directed

graph G = (V,E) = f1,2,3,4g and E = f(1,2),(2,5),(2,4),(2,2),(5,4),(4,5),(4,1)g.

V(G,f1,2,3,4,1g) we _nd we can derive a Directed Hamiltonian cycle from

the given graph G.

Figure 3.2: (a) The truth table for the clause (x

W

y

W

z) shows that for the

instance where fx = 1, y = 2 and z = 1g evaluates to true. (b) The graph G

= (V,E), where V = f1,2,3,4g and E = f(3,2),(2,4),(3,4),(4,1),(1,3)g shows that

for the instance f3,2,4,1,3g shows we have a cycle for this instance

.

The following de_nition of NP shows that any problem that is in P is also

in NP. Since if a decision problem is in the decision class P, it indicates that we

can solve it in polynomial time without even being given a certi_cate.

18

3.4 NP-complete

De_nition 3.4.1 The process of devising an NP-completeness proof for a de-

cision problem L will consist of the following four steps:

1. showing that L is in NP,

2. selecting a known NP-complete problem L',

3. constructing a transformation f from L' to L, and

4. proving that f is a (polynomial) transformation [14].

In other words, a decision problem L is said to be in the class NP-complete

if there is a known NP-complete that can be reduced to the decision problem L

using a polynomial-time algorithm.

Example 3.4.2 Some examples of decision problems that fall into the class

NP-complete:

1. Vertex Cover - Given a graph G = (V,E) and a positive integer K _ jVj -

Is there a vertex cover of size K for G, that is, a subset V' _ V such that

jV'j _ K and, for each edge fu,vg 2 E, at least one of u and v belongs to

V'.

2. Clique - Given a graph G = (V,E) and a positive integer J _ jVj - Does

G contain a clique of size J, that is, a subset V' _ V such that jV'j _ J

and every two vertices in V' are joined by an edge in E.

Figure 3.3: Undirected graphs. (a) A undirected graph G = (V,E), where

V = f1,2,3,4,5,6,7g and E = f(7,1),(1,2),(2,3),(2,6),(3,6),(3,5),(6,5),(3,4)g we

have a vertex cover V' = f1,6,3g such that all the edges in G are covered.

(b) A undirected graph G = (V,E), where V = f1,2,3,4,5,6g and E =

f(1,2),(2,3),(3,4),(4,5),(3,5),(5,6),(6,2)g we have a clique V' = f3,4,5g such that

each pair of vertices is connected by an edge.

19

De_nition 3.4.3 We say that a decision problem L1 is polynomial-time re-

ducible to a problem L2, written L1 _p L2, if there exits a polynomial-time

computable function f : f0,1g* ! f0,1g* such that for all x 2 f0,1g*, x 2 L1 if

and only if f(x) 2 L1 [24].

In other words, the general notion of a polynomial-time reduction is, given

a decision problem L it can be reduced to a problem L' if it's the case that, an

instance of L can be transformed using a polynomial-time to an instance of L',

in which the transformation also gives a solution to the instance of L.

Example 3.4.4 Some examples of decision problems that have been reduced to

other decision problems:

1. Clique _p Vertex-cover

2. Vertex Cover _p Hamiltonian-cycle

3. 3-SAT _p Clique

Figure 3.4: Undirected graphs. (a) A undirected graph G = (V,E), where V =

fu,v,z,w,y,xg and E = f(z,u),(u,v),(v,x),(x,y),(y,u),(y,v),(y,w),(u,x),(z,x),(z,w)g

has the clique V' = fx,u,v,yg. (b The graph G' is constructed by a polynomial

time reduction algorithm, which has a Vertex Cover V - V' = fz,wg. (c) The

graph G with a clique is constructed from the 3-CNF formula

H

= (x1

W

W :x2

:x3)

V

(:x1

W

x2

W

x3)

V

(x1

W

x2

W

x3) using a polynomual reuction

algorithm.

Lemma 3.4.5 If L1 _p L2 then L2 2 P implies L1 2 P.

Proof Let A2 be a polynomial-time algorithm that decides L2, and let F be

a polynomial-time reduction algorithm that computes the reduction function f.

We shall construct a polynomial time algorithm A1 that decides L1 [25].

20

Figure 3.5: From the diagram we see that F is reduction algorithm that computes

the reduction f from L1 to L2 in polynomial time. A2 is a polynomial-time

algorithm that decides L2. Image from [30].

21

Chapter 4

The 8 basic NP-complete

problems

4.1 Overview

In chapter 4, we present 8 basic NP-complete by providing precise de_nitions.

We also take an insight into the history behind all 8 problems. Finally, we go

onto provide examples how these problems are modelled in real-time applications.

4.2 Graph Colouring

De_nition 4.2.1 Consider a graph G (recall De_nition 2.1.1). A colouring

of G with colour-set C is a map f : V (G) ! C such that for each fu; vg 2 E(G)

we have f(u) 6= f(v). Such a colouring is called a k-colouring for some integer

k _ 0 if jCj _ k. The default colour-set of a k-colouring is f1; : : : ; kg.

In other words, a graph colouring uses a colour-set C, and assigns to every

vertex a \colour", that is, an element of C, such that adjacent vertices get

di_erent colours.

There are many di_erent interpretations of the graph colouring problem.

A possible interpretation would be, edge colouring which assigns a colour to

every edge in the graph G, such that no two adjacent edges share the same

colour. Another possible interpretation would be, region colouring which

assigns a colour to each region in the graph G, such that no two regions that

share the same boundary have the same colour.

The graph colouring problem originates from the problem of colouring the

countries of a map such that no two countries that have a common border receive

the same colour. It is possible to transform a map to a planar graph G. Such

that, every country gets a point in the plane and connect each pair of points

that match the countries with a common border by a curve. Then we determine

whether or not every planar can be coloured with 4 colours.

22

Figure 4.1: image from [29].

Example 4.2.2 Here are some examples of applications that model the graph

colouring problem:

1. Scheduling - Scheduling an exam timetable can be scheduled in any order,

but pairs of exams may cause major problem if they are assigned to the

same time slot. The following graph G would contain a vertex for every

exam and an edge for every conicting pair of exams.

2. Register allocation - Each colour represents an available register. The

following graph G would contain a vertex for each variable if its the case

that variable a and b are live at the same point they cannot be assigned to

the same register. We add an edge (a,b) to the graph.

Figure 4.2: The diagram shows the three exams History, Maths and P.E which

coincide at the same time on the timetable. English and P.E obviously don't

coincide with any other subject

4.3 Clique

De_nition 4.3.1 Consider a graph G (recall De_nition 2.1.1). A clique of G

is a subset V' _ V of vertices such that every two vertices are connected by an

edge in E.

23

In other words, a clique determines a complete sub-graph of G, that is, a

subset S of vertices such that every two vertices in S are connected by an edge

in G.

There are many di_erent interpretations of the clique problem. A possible

interpretation would be, the maximum clique in a given graph G, which is

the sub-graph with the largest possible number of vertices. Another possible

interpretation would be, the maximal clique, which refers to a sub-graph in

which no more vertices can be added.

Figure 4.3: A undirected graph G = (V,E), where V = f1,2,3,4,5,6g and E

= f(1,2),(2,3),(3,4),(3,5),(5,6),(6,2),(6,1)g with a maximum clique V' = f1,2,3g

and four maximal cliques = f(2,3),(3,4),(3,5),(5,6)g

The clique problem started from sociology and psychology as complete clique

were modelled in terms of social cliques, for instance groups of people that have

some sort of relationship with one another.

Example 4.3.2 Here is an example of an application that models the clique

problem:

1. Social-networks - The maximum clique problem is modelled in social -

networks, where the vertices of G would represent people and the edges

would represent people who are mutual friends.

24

Figure 4.4: In the example above we see that the clique of size 3 (such that the

3 people in the diagram know every other in the clique). The three people on

the outside don't know anyone else in the group.

4.4 Vertex Cover

De_nition 4.4.1 Consider a graph G (recall De_nition 2.1.1). A vertex cover

of G is a subset V' _ such that if (u,v) 2 E, then u 2 V' or v 2 V' (or both).

That is, each vertex "covers" its incident edges, and a vertex cover for G is a

set of vertices that covers all the edges in E.

There is an extension of the vertex cover problem which is referred to as the

minimum vertex cover, which determines the minimum number of vertices

that include all the edges in a given graph G. The vertex cover has the following

properties that, a given graph G is a vertex cover if and only if its complement

is an independent set. Also, the vertex cover and the maximum independent

set is equal to the jVj.

Figure 4.5: j

25

Example 4.4.2 Here are some simple applications that model Vertex Cover:

1. Computer Network Security - The vertex cover problem has been used in

Computer Science to protect computer networks from virus attacks. This

was well presented by Eric Filiol [10]. The aim is to _nd a minimum vertex

cover, where the vertices are the servers and the edges are the connections

between servers.

4.5 Hamiltonian Circuit

De_nition 4.5.1 Consider a graph G 2.1.1). A Hamiltonian cycle of G is an

ordering <v1,v2,...,vn> of the vertices of G, where n = jVj, such that fvn,v1g

2 E and fvi,vi+1g 2 E for all i, 1 6 i < n.

The Hamiltonian cycle problem involves the process of determining whether

or not a given graph G has a edge edge between each pair of consecutive vertices

and between the _rst and last vertex. The Hamiltonian cycle problem has the

following properties, suppose we have a Hamiltonian cycle H for a given graph

G, each vertex in the cycle has precisely two incident edges, one entering the

vertex and one leaving. Also, the only Hamiltonian cycle in G is H.

Figure 4.6: jj

In the 1950s, Sir William Hamiltonian a Irish mathematician introduced

his Icosian game at a meeting in Dublin in the late 1950s. The game was to

26

use a regular dodecahedron whose twenty vertices labelled with names of cities.

The aim was to travel around the dodecahedron by _nding a cycle that passes

through every city exactly once.

Example 4.5.2 Here are some simple applications that model Hamilto-

nian cycles:

A Business man - A business traveller leaves every morning from his home

which is represented by a vertex 1 and needs to visit a number of his clients,

which is represented by v2,..,v11 and the edges being all the possible routes the

businessman can take before returning to his home. How would the businessman

minimise the total distance he travels on his visits?? here we are looking for the

Hamiltonian cycle for the minimum possible length.

4.6 Subset-sum

De_nition 4.6.1 Given a _nite set S (recall De_nition 2.2.1). The subset-sum

problem is a pair (S,t) where S = fx1,x2,xng is a set of positive intgers and t is

a postive integer, we ask whether there is a subset S' _ whose elements sum to

t.

Example 4.6.2 He are some applications that use the Subset problem:

1. knapsack - For the knapsack problem we use di_erent variations of a _-

nite number of variants to _nd the best possible outcome to a particular

situation, a simple example of this would be as follows given the set S

= f20,30,10,2,5,25,41,3,15,3,1g what is the best possible way of getting a

value t = 40 speci_c to the constraint.

4.7 3-SAT

De_nition 4.7.1 Consider a conjunctive normal form formula

H

(recall Def-

inition 2.3.1). A 3-SAT formula consists of a collection C = fc1,c2,...,cmg,

where each clause has 3 distinct literals, Ci = li1

W

li2

W

li3 on a _nite set U of

variables. Is there a truth assignment for U that satis_es all the clauses in C.

The 3-CNF decision problem is the process of determining that there exists

an assignment, which satis_es a Boolean Logic formula which is in Conjunctive

27

Normal Form and has exactly 3 distinct literals in each clause. The 3-CNF

problem wants to establish that the given formula is satis_able such that the

formula to TRUE for a given instance.

4.8 Sudoku

De_nition 4.8.1 Consider a grid G. A Sudoku S = n2 * n2 grid, which is

divided into n * n sub-grids, such that, each row, column and n * n sub-grid has

each of the integers from 1 through n2 exactly once.

The Sudoku problem involves the process of _lling in a given n2 x n2 grid

S, such that every row, every column and n x n subgrid has each number at

most once. The Sudoku puzzle game is often represented by a 32 x 32 grid which

consists of 3 x 3 subgrids, where somes of the boxes are _lled with numbers from

1 through to 9 and there are also blanks that need to be _lled, such that all the

constraints of Sudoku are adhered to. The Sudoku problem has the following

two properties, that Sudoku problems have unique solutions and that Sudoku

problems can only be solved with only reasoning.

The Sudoku puzzle game is a very well known puzzle game that has achieved

international popularity in recent years. The Sudoku puzzle game was introduced

in Japan in the mid 1980's by Nikoli in the paper "Monthly Nikolist".

The Sudoku puzzle game appeared on British shores in November of 2004 when

it appeared on the British newspaper, The Times.

4.9 Latin square

De_nition 4.9.1 Consider a grid G. A Latin Square L = n * n grid, such

that each row and column has each of the integers from 1 through n exactly once.

The Latin square problem involves the process of _lling in a given n x n grid

L, such that every row and every column has each number at most once. The

Latin square puzzle is often partially completed, there are also blanks that need

to be _lled in, such that all the constraints of Sudoku are adhered to.

In 1779, Leonhard Euler a Swiss Mathematician introduced the systematic

development of Latin square, when he posed "The problem of the 36 o_cers".

The problem was to arrange 36 o_cers, each having one of six di_erent regiments,

in a 6 x 6 square, so that each row and each column captured one o_cer

of each rank and just one from each regiment.

Subsequently, in the 20th century Arthur Cayley a Canadian Mathematician

developed on the ground work of Leonhard Euler by showing that the multiplication

table of a group is an appropriately bordered special Latin square.

Example 4.9.2 Here are some examples of applications that model Latin squares:

1. Sudoku - The Sudoku puzzle game that grown considerably in popularity in

recent years is based on Latin squares, such that each row and column has

each of the integers from 1 through to n exactly onc. The only additional

constraint is that the n x n subgrid of a n2 x n2 contains each of the

numbers from 1 through to n2 at most once.

28

2. KenKen - The KenKen puzzle that has also grown in popularity in recent

years is also based on Latin squares, such that each row and column has

each of the integers from 1 through to n exactly once. The only additional

constraint is that, each bold-outlined group of boxes is a grouping that con-

tains integers which achieve the output result using addition, subtraction,

multiplication and division.

29

Chapter 5

De_nition Of 8 Problems

5.1 Overview

In chapter 9, for every of the 8 problems, we begin by giving the original source

where its NP-completeness was shown. We present 8 basic NP-complete decision

problems by precisely de_ning what the decision problem is. This will be

presented by giving the input of the given decision problem, the output of the

decision problem and the size of the problem.

5.2 Graph Colouring

5.2.1 Discovery

The K-Colourability was proved to be in the complexity class NP-complete in

Richard Karp's paper "Reducibility among Combinatorial problems" [19]. It

was shown that, when K = 2 it can be solved in polynomial time, but remains

NP-complete for all _xed K _ 3. Karp used the 3SAT to be a known NPcomplete

problem and proved a polynomial-time reduction to K-Colourability

from 3SAT.

De_nition 5.2.1 Consider a graph G (recall De_nition 2.1.1) and a positive

integer K _ jVj. If G is K-colourable then there exists a function f:V !

f1,2,...,Kg such that f(u) 6= f(v) whenever fu,vg 2 E.

In other words, the graph colouring decision problem inputs a graph G and

a positive integer K, and outputs a YES if G admits a proper vertex colouring

with K colours, NO otherwise.

Example 5.2.2 Some simple examples for graph colourings and graph-non-

colourings [31]

1. The Graph (2,1) is 2 colourable.

2. The Graph (3,3) is 3 colourable.

3. The Graph (4,6) is 4 colourable.

4. The Graph (3,3) is not 2 colourable.

30

5. The Graph (4,6) is not 3 colourable.

There are two fundamental steps with the graph colouring process. The _rst

is the decision process which we input a graph G with n vertices and choose an

integer K where the graph colouring problem decision in yes. The example of

the _rst case where the decision would be NP-complete would be the 3 colouring

as shown above.

The output of the decision would be whether or not the graph G admits a

proper vertex colouring with K colours. There is also a special case where a

graph is 2 colourable and can be be done in P (Polynomial-time) and this is

were the particular graph that we're colouring is bipartite which is a particular

graph whose vertices can be divided into two disjoint sets were every edge that

connects a vertex in U to one in V.

De_nition 5.2.3 The chromatic number of a graph G, denoted by _(G), is

the smallest integer k _ 0 such that G has a k-colouring.

Example 5.2.4 The three most trivial examples:

1. _((;; ;)) = 0; in general we have _(G) = 0 if and only V (G) = ;.

2. _((f1g; ;)) = 1; in general we have _(G) = 1 if and only if E(G) = ; and

V (G) 6= ;.

3. _((f2g; f1g)) = 2; in general we have _(G) = 2 if and only if E(G) = 1

and V(G) = 2.

31

In other words, The chromatic number refers to the smallest number of

colours needed to colour a graph G is called the chromatic number and is often

denoted by _(G). With the optimisation process we will have an input of a

graph G with n vertices. We will _rstly have a look at the simplest form which

is not bipartite. We have looked at this previously which is the triangle K3.

Example 5.2.5 Some more Chromatic number examples:

1. _((f3g; f3g)) = 3; in general we have _(G) = 3 if and only if E(G) = 3

and V(G) = 3.

2. _((f4g; f6g)) = 4; in general we have _(G) = 4 if and only if E(G) = 6

and V(G) = 4.

Example 5.2.6 On the other hand the following graphs will not be n-1 colourable:

1. _((f3g; f3g)) 6= 2; if and only if E(G) = 3.

2. _((f4g; f6g)) 6= 3; if and only if E(G) = 6.

32

Clearly shown above for the base case if both the sub clauses are true then

as a result the graph-colouring problem is satis_ed

Lemma 5.2.7 There is a polynomial-time reduction (recall De_nition 3.4.3)

from 3SAT (recall De_nition 5.3.1) to 3COL (see De_nition 5.2.1). Let U

fu1,u2,...,ung and C = fc1,c2,...,cmg be any instance of 3SAT. We must con-

truct a graph G = (V,E) such that G is 3COL if and only if 3SAT is satis_able.

To prove 3-colourable is NP-complete we use a gadget construction from

3SAT by mapping a given 3CNF formula

H

to the graph G that consists of a

vertex for each variable, a vertex for the negation of each variable, 5 vertices for

each clause and 3 special vertices: TRUE, FALSE and BLUE. The edges of the

graph are of two types: literal edges which are independent of the clause and

clause edges that depend on the clause.

The TRUE and FALSE of the special vertices that are connected by an edge

which indicates they must be given di_erent colours in the 3 - colouring problem,

most often than not True is given the colour green and False is given the colour

red. The third special vertex which is BLUE is connected to both the TRUE

and FALSE vertices. The 3 special vertices would look as follows below:

33

For each clause the variable x is a pair of vertices which associated with two

literals x and :x. For each clause we have three of these vertices and they are all

connected to the vertex blue by an edge. Such that, the negation :x would have

di_erent colour to x and at least one of the literal vertices must be assigned to

True. The connecting of variables to the special vertices would look as follows

for the following formula (x

W

y

W

z ) where x = 1, y = 1 and z = 0:

For each clause we will end up with 5 special vertices with 5 edges which

would be connected in a similar way to the diagram below were the bottom

vertex of the triangle is coloured Green or Red according to the outcome of the

sub clause, for example for our clause (x

W

y

W

z), where hx = 1, y = 1 and z

= 0i the bottom vertex would be coloured Green as shown below.

Now we suppose that the 3-SAT formula

H

is Satis_able. We will show this

by constructing a truthtable for the 3-SAT formula

H

(x

W

y

W

z) to show that

we have a satisfying instance of the formula. The truthtable below shows that

we have a satisfying instance where hx = 1, y = 1 and z = 0i:

34

The gadget has the property that it is possible to colour the terminals with

any combination of the colours True and False, except for colouring all the literal

vertices with False. Such that, in any legal 3-colouring of graph G, if no literals

is coloured Blue, then at least one of these literals is coloured True.

For each ground vertex there exist an edge which is connected to True and/or

False of the master vertex. So using the case of the truth table showing that all

the ground vertices cannot to False, thus the failing of the truth table implies

the graph cannot be satis_ed. We have stated earlier that at least one of the

literals has to be True and the truth table connects the literal and the master

vertex.

35

I will now go onto show a 3 colouring gadget corresponding to the following

3-CNF formula: (x1

W

x2

W

x3)

V

(:x1

W

:x2

W

x3)

V

(x1

W

:x2

W

x3)

36

These two gadget graphs above show the two cases, when the truth table

is not satis_able, implying that the graph is not satis_able in the _rst case

because the truth table is not satis_able we _nd that the 3 graph colouring is

not satis_able. The instance when x1 = 1 , x2 = 1 and x3 = 0: This case

doesn't satisfy in the truth table and it's also the case that is doesn't satisfy in

the 3-graph colouring. Secondly, the instance when x1 = 1 , x2 = 0 and x3 = 1:

This case in the truth table is satis_ed and it's also the case that the 3-graph

colouring is also satis_able.

37

5.3 3-SAT

Discovery

The 3SAT problem was the second problem that was proved to be in the complexity

class NP-complete in Stephen Cook's paper "The complexity of theorem

proving procedures" [7]. 2SAT e_eciently solved in polynomial time is shown

in [2], but it reamins NP-complete for 3SAT. Stephen Cook used the Satis_ability

problem to prove a polynomial time reduction to 3SAT.

De_nition 5.3.1 Consider a conjunctive normal form formula

H

(recall De_-

nition 2.3.1). A 3-SAT decision problem formula consists of a collection C =

fc1,c2,...,cmg, where each clause has 3 distinct literals, Ci = li1

W

li2

W

li3 on

a _nite set U of variables. Is there a truth assignment for U that satis_es all

the clauses in C.

In other words, the 3SAT decision problem inputs a 3SAT formula

H

and a

the output is YES if

H

has a satisfying truth assignment for C, NO otherwise.

Example 5.3.2 Some simple examples of 3-SAT formulas:

1.

H

= (x1

W

x2

W

x3)

2.

H

= (x1

W

:x1

W

:x2)

V

(x3

W

x3

W

x4)

V

(:x1

W

:x3

W

:x4)

3.

H

= (x1

W

:x2

W

:x3)

V

(:x1

W

x2

W

x3)

V

(x1

W

x2

W

x3)

Lemma 5.3.3 There is a polynomial-time reduction from SAT (see De_nition

XXX) to 3-SAT (see De_nition XXX).

Firstly, we construct a binary parse tree for the given SAT formula

H

, were

the connectives are nodes and the literals are leaves. For the following SAT

formula

H

= ((x1 $ x2)

W

:((:x1 ! x3)

W

x4))

V

:x2. The binary parse tree

would look as follows:

38

The reduction from SAT to binary parse tree show that the literal node

must have one or two leafs, also we introduce a variable yi for the output of

the internal node. We then go onto rewrite the original formula

H

as the and

of the root variable and the conjunction of clauses describing the operation of

each node. For our SAT formula above the result would look as follows:

From the following operation the formula

H

obtains a conjunction of the

clauses which at most has 3 literals. The _nal requirement is that each clause

must be a disjunction of literals.

Secondly, we must convert each of the clauses into disjunctive normal form.

This is converted by constructing a truth table for each of the clauses in

H

'.

We determine the enteries of the truth table that evaluate to 0 (false). For the

clause

H

'6 the truth table would look as follows:

We build the formula in Disjunctice normal form which is those entries that

have evaluated to 0. So going top down in our truth table for

H

'6, case 4, 5, 6

and 7 would be the entries that are transformed to DNF as they all evaluate to

0. We do the trasnformation by looking at the assignment of variables in the

cases, and if the variable is assigned to 1 we write down the positive lieral in the

clause but if the variable is asssigned to 0 we write the negation of that literal.

The Disjunctive Normal Form that is equivalent to :

H

'6 is as follows:

:

H

'6 = (y6

V

:x1

V

:x3)

W

(:y6

V

x1

V

x3)

W

(:y6

V

x1

V

:x3)

W

V (:y6

:x1

V

x3)

39

We then go onto convert the formula :

H

'6 into Conjunctive normal form by

using the DeMorgan's Laws. This operation will complement all the lieterals

and change disjunctions to conjunctions and conjunctions to disjunctions. The

following Disjunctive Normal Form formula

H

'6 in Conjunctive Normal Form

would look as follows:

H

"6 = (:y6

W

x1

W

x3)

V

(y6

W

:x1

W

:x3)

V

(y6

W

:x1

W

x3)

V

(y6

W

x1

W

:x3)

We can claim that the following clause

H

"6 clause in Conjunctive Normal

Form is equivalent to the original SAT clause

H

'6 as shown below with the follow

two truthtables:

We do the following transformation for each clause in

H

' so that each clause is

in Conjunctive Normal Form. The _nal step of the transformation is determing

that each clause has exatctly three distinct literals.

Firstly, if the given clause Ci has exactly 3 literals this means that Ci satis_es

all the requiremts of 3-CNF and can be included in the formula.

Subsequently, if the given clause Ci = (l1

W

l2) has 2 distinct literals, we

include an additional literal to to the clause p and :p as follows (l1

W

l2

W

p)

V

(l1

W

l2

W

:p) the following clause is equivalent to (l1

W

l2) whether or not p =

0 or p = 1. All the additional literal do is ful_l the requirement of 3-CNF that

each clause must have 3 distinct literals. For instance the clause C4 = (:y4

W

:y5)

V

(y4

W

y5) from our formula

H

" is very much equivalent to (:y4

W

W :y5

p)

V

(:y4

W

:y5

W

:p)

V

(y4

W

y5

W

p)

V

(y4

W

y5

W

:p) as shown below:

40

Finally, if the given clause Ci = (l1) has 1 distinct literal, we include additional

literals to the clause p and q as follows: (l1

W

p

W

q)

V

(l1

W

p

W

V :q)

(l1

W

:p

W

q)

V

(l1

W

:p

W

:q). The following clause is equivalent to l1

whether or not p = 1 or p = 0 and q = 1 and q = 0. Again, all the additional

literal do is ful_l the requirement that each clause must have 3-distinct literls.

For instance the clause Ci = (xi), is very much equivalent to (xi

W

p

W

q)

V

(xi

W

p

W

:q)

V

(xi

W

:p

W

q)



rev

Our Service Portfolio

jb

Want To Place An Order Quickly?

Then shoot us a message on Whatsapp, WeChat or Gmail. We are available 24/7 to assist you.

whatsapp

Do not panic, you are at the right place

jb

Visit Our essay writting help page to get all the details and guidence on availing our assiatance service.

Get 20% Discount, Now
£19 £14/ Per Page
14 days delivery time

Our writting assistance service is undoubtedly one of the most affordable writting assistance services and we have highly qualified professionls to help you with your work. So what are you waiting for, click below to order now.

Get An Instant Quote

ORDER TODAY!

Our experts are ready to assist you, call us to get a free quote or order now to get succeed in your academics writing.

Get a Free Quote Order Now