Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter 34, Problem 1P
Expert Solution
Check Mark
Program Plan Intro

To formulate a related decision problem for the independent-set problem and prove that it is NP-complete.

Explanation of Solution

Independent set of a graph G represents the set or collection of vertices that are not adjacent to one another. It is a concept in graph theory according to which there should not be any edge connecting the two vertices of a set.

  • It is also known as a stable set in which an edge can have at most single endpoint in the graph.
  • Thus, the vertices contained in the independent set represent the subset of the vertices of a graph.

Consider the figure or the graph given below containing an independent set of size 3:

Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 1

Consider a graph Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 2containing V vertices and set of edges E. Here, it is required to devise a decision problem for the independent−set problem and proving that it is NP-complete.

Decision problem:

  • It is a way of asking the question in order to determine that whether a solution or answer of a particular question exists or not.
  • It is a type of problem in a formal system in which the answer or solution of the problem comes out to be in two definite forms as either yes or no.

Consider the following example:

Graph coloring, Hamiltonian cycle or graph. Travelling salesperson Problem (TSP) is some of the common examples of the decision problems (all these can also be expressed as an optimization problem).

Now, it is also asked to show that independent set problem is NP complete.

NP Hard: To show that the problem is NP Hard, the concept of reducing or transforming the instance of the clique problem to an instance of an independent set S.

Consider the instance of the clique problem as Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 3This problem is independent set problem having set Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 4where Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 5is the complement of E.

The set of vertices V represents a clique having size x is in the graph G only in case if V’ is an independent set of graph G’ having the size x and it is also following the fact that the construction of Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 6from Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 7must be done in polynomial time.

In this regard, it can be concluded that independent set problem is also NP hard. Thus it has been proved that an independent set problem is NP as well as NP-hard so it can be said that it is always NP complete.

Expert Solution
Check Mark
Program Plan Intro

To give an algorithm to find an independent set of maximum size.

Explanation of Solution

Given a black box subroutine to solve the decision problem defined in part (a) and a graph Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 8

To implement the algorithm for solving the problem consider black box as Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 9

Algorithm:

//perform search operation

Step 1: start binary search on B to determine the maximum size Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 10for the independent set.

//initialization step.

Step 2: Set the independent set I to be an empty set.

Step 3: For each Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 11

Construct Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 12by removal of Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 13and its related edges from the graph Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 14

Step 4: If Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 15

Set Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 16

Else Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 17

Here Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 18is obtained by removal of all the vertices which are connected to Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 19and the edges which are linked to it from the graph Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 20

//end

Here, step 1 has a time complexity of Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 21

Step2: it has a time complexity of Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 22

Step 3-4 : They have the number of iterations equal to Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 23

Hence it can be concluded that the time complexity is equal to Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 24

Expert Solution
Check Mark
Program Plan Intro

To give an efficient algorithm to solve the independent-set problem when each vertex in G has degree 2.

Explanation of Solution

Given that the degree of the graph is 2, which implies that each vertex in the graph has a cardinality or degree 2.

Here, it is required to give an algorithm that can solve the independent set problem of a graph having degree 2.

Also, it is required to analyze the running time and the correctness of an algorithm.

Consider the graphs containing a simple cycle-

Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 25

Thus, from the above graphs it can be observed that generally the graph containing the vertices of degree 2 is a simple cycle.

Therefore, the independent set problem is such a case can be achieved by initiating at any vertex and start choosing the alternate vertex on the cycle till the size obtained for the independent set to be Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 26

Hence, it can also be concluded that that the running time of the algorithm to solve the problem of independent set having V vertices, E edges and degree of each vertex as 2 is Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 27

Expert Solution
Check Mark
Program Plan Intro

To give an algorithm to solve the independent set problem when G is bipartite.

Explanation of Solution

A bipartite graph commonly known as the biograph is an undirected graph whose vertex set can be partitioned or arranged into two disjoint sets that are independent.

It is possible to color this type of graph by using the two colors only so it is 2 colorable or bichromatic.

There are several applications of these graphs by using graphs like in case of matching problems.

For example:

Consider a bipartite graph given below containing two set of vertices Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 28and Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 29such that Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 30

First find the maximum-matching of the graph by using an algorithm such as augmenting path algorithm or much faster and an improved algorithm known as Hopcroft-Karp bipartite matching algorithm. (Refer section 26-6)

? Repeat the process

¦ for all vertices which are not present in the maximum-matching set (set with largest number of edges), run BFS to find the augmenting path.

¦ Alternate unmatched/matched edges to select the edge which is in the maximum matching and are not connected from the vertices that are not a part maximum matching set.

¦ Reverse or flip the matched edges with unmatched edges and vice-versa.

? Stop the process if no augmenting path is found and return the last matching set.

Introduction to Algorithms, Chapter 34, Problem 1P , additional homework tip 31

The running time or running complexity of the algorithm to solve the independent set problem is. The algorithm works correctly if there does not exist any augmenting path with respect to the maximal matching M as obtained by applying the bipartite matching algorithm.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
"Systems have become very powerful and sophisticated, providing quality information fordecisions that enable the firm to coordinate both internally and externally."With reference to the above statement compare the operations of any three data gatheringsystems today’s organisations use to aid decision making.
labmas Course Home XDocument courses/13810469/menu/a2c41aca-b4d9-4809-ac2e-eef29897ce04 There are three ionizable groups (weak acids and/or bases) in glutamic acid. Label them on the structure below Drag the appropriate labels to their respective targets. OOH [] CH3N CH CH2 CH2 IC HO Reset Help
Python - Need help! How do I have an input in turtle to display my name below the circle it draws and another input to display my age written below that? Code: import turtlebackground = "#FFFFFF" def draw_circle(radius, line_color, fill_color): my_turtle.color(line_color) my_turtle.fillcolor(fill_color) my_turtle.begin_fill() my_turtle.circle(radius) my_turtle.end_fill() def move_turtle(x, y): my_turtle.penup() my_turtle.goto(x, y) my_turtle.pendown() turtle.done()

Chapter 34 Solutions

Introduction to Algorithms

Chapter 34.2, Problem 5E Chapter 34.2, Problem 6E Chapter 34.2, Problem 7E Chapter 34.2, Problem 8E Chapter 34.2, Problem 9E Chapter 34.2, Problem 10E Chapter 34.2, Problem 11E Chapter 34.3, Problem 1E Chapter 34.3, Problem 2E Chapter 34.3, Problem 3E Chapter 34.3, Problem 4E Chapter 34.3, Problem 5E Chapter 34.3, Problem 6E Chapter 34.3, Problem 7E Chapter 34.3, Problem 8E Chapter 34.4, Problem 1E Chapter 34.4, Problem 2E Chapter 34.4, Problem 3E Chapter 34.4, Problem 4E Chapter 34.4, Problem 5E Chapter 34.4, Problem 6E Chapter 34.4, Problem 7E Chapter 34.5, Problem 1E Chapter 34.5, Problem 2E Chapter 34.5, Problem 3E Chapter 34.5, Problem 4E Chapter 34.5, Problem 5E Chapter 34.5, Problem 6E Chapter 34.5, Problem 7E Chapter 34.5, Problem 8E Chapter 34, Problem 1P Chapter 34, Problem 2P Chapter 34, Problem 3P Chapter 34, Problem 4P
Knowledge Booster
Background pattern image
Similar questions
    SEE MORE QUESTIONS
    Recommended textbooks for you
    Text book image
    Operations Research : Applications and Algorithms
    Computer Science
    ISBN:9780534380588
    Author:Wayne L. Winston
    Publisher:Brooks Cole
    Text book image
    C++ for Engineers and Scientists
    Computer Science
    ISBN:9781133187844
    Author:Bronson, Gary J.
    Publisher:Course Technology Ptr
    Text book image
    Fundamentals of Information Systems
    Computer Science
    ISBN:9781305082168
    Author:Ralph Stair, George Reynolds
    Publisher:Cengage Learning
    Text book image
    C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning