Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 34.5, Problem 5E
Program Plan Intro
To prove that the set partition problem is NP complete.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A graduate student is working on a problem X. After working on it for several days she is unable to find a polynomial-time solution to the problem. Therefore, she attempts to prove that he problem is NP-complete. To prove that X is NP-complete she first designs a decision version of the problem. She then proves that the decision version is in NP. Next, she chooses SUBSET-SUM, a well-known NP-complete problem and reduces her problem to SUBSET-SUM (i.e., she proves X £p SUBSET-SUM). Is her approach correct? Explain your answer.
The subset sum problem is defined as follows:
SUBSETSUM = {(a1, a2,...,am; b) : m,a1, a2, ...,am; b are integers and
3IC {1,2, ..., m} such that Eier a; =b}.
Assume you have a polynomial-time algorithm A that decides, for any input sequence
(a1, a2, ...,am, b), whether or not (a1, a2, ...,am, b) E SUBSETSUM. Note that this algorithm
only returns YES or NO; it does not return anything else.
Design a polynomial-time algorithm B that takes an arbitrary sequence (a1, az, ..., am, b)
as input.
• If (a1, a2, ...,am; b) E SUBSETSUM, then B returns a subset I of {1,2, ..., m} such
that Eier a; = b.
If (a1, a2, ..., am, b) & SUBSETSUM, then B returns NO.
Your algorithm B may use algorithm A as a black box. As always, justify your answer.
et X = {1, 2, 3, 4, 5} and Y = {7, 11, 13} are two sets. find R = {(x, y): x ∈ X and y ∈ Y and (y – x) is divisible by 6}
Chapter 34 Solutions
Introduction to Algorithms
Ch. 34.1 - Prob. 1ECh. 34.1 - Prob. 2ECh. 34.1 - Prob. 3ECh. 34.1 - Prob. 4ECh. 34.1 - Prob. 5ECh. 34.1 - Prob. 6ECh. 34.2 - Prob. 1ECh. 34.2 - Prob. 2ECh. 34.2 - Prob. 3ECh. 34.2 - Prob. 4E
Ch. 34.2 - Prob. 5ECh. 34.2 - Prob. 6ECh. 34.2 - Prob. 7ECh. 34.2 - Prob. 8ECh. 34.2 - Prob. 9ECh. 34.2 - Prob. 10ECh. 34.2 - Prob. 11ECh. 34.3 - Prob. 1ECh. 34.3 - Prob. 2ECh. 34.3 - Prob. 3ECh. 34.3 - Prob. 4ECh. 34.3 - Prob. 5ECh. 34.3 - Prob. 6ECh. 34.3 - Prob. 7ECh. 34.3 - Prob. 8ECh. 34.4 - Prob. 1ECh. 34.4 - Prob. 2ECh. 34.4 - Prob. 3ECh. 34.4 - Prob. 4ECh. 34.4 - Prob. 5ECh. 34.4 - Prob. 6ECh. 34.4 - Prob. 7ECh. 34.5 - Prob. 1ECh. 34.5 - Prob. 2ECh. 34.5 - Prob. 3ECh. 34.5 - Prob. 4ECh. 34.5 - Prob. 5ECh. 34.5 - Prob. 6ECh. 34.5 - Prob. 7ECh. 34.5 - Prob. 8ECh. 34 - Prob. 1PCh. 34 - Prob. 2PCh. 34 - Prob. 3PCh. 34 - Prob. 4P
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Construct an NPDA that accepts L(G) for the following G:arrow_forwardProve that the following problem, given a set S of integers and a number t, is of the NP class. Is there a subset of S whose elements add up to t?Note: An issue with data structures and algorithmsarrow_forwardLong chain of friends: You are given a list of people, and statements of the form “x knows y”. You are asked to find, is there a chain of k distinct people, such as x1 knows x2, x2 knows x3, and xk-1 knows xk. Prove that this problem is NP-complete by using one of the known NP-complete problems (CLIQUE, 3-SAT, Hamiltonian Path, Hamiltonian Cycle, Independent Set, etc.)arrow_forward
- Discrete Math Let A, B, and C be finite sets with |A| = 6|B| = 8|C| = 6|A ⋂ B| = 3|A ⋂ C| = 2|B ⋂ C| = 5|A U B U C| = 11 Find |A ⋂ B ⋂ C|arrow_forwardLet A be the set {1,3,5,7,9} and B be the set {1,2,4,8} . Find the integer value |(AxB) ꓵ (BxA)|arrow_forwardLet S be a set of sets with the following recursive definition ∅ ∈ S. If X ⊆ S, then X ∈ S. (a) List three different elements of S. (b) Explain why S has infinitely many elementsarrow_forward
- If you are given a set S of integers and a number t, prove that this issue falls into the NP class. Is there a subset of S where the total number of items is t? Note: Complexity in Data Structures and Algorithmsarrow_forwardIV. Let P(n):n and n + 2 are primes. be an open sentence over the domain N. Find six positive integers n for which P(n) is true. If n E N such that P(n) is true, then the two integers n ,n + 2 are called twin primes. It has been conjectured that there are infinitely many twin primes.arrow_forwardIs A a subset of B if; A = {5,2,1} B ={ 6, 1, 2arrow_forward
- [Introduction to the Design and Analysis of Algorithms, 3rd Edition] Maxima search. A point (xi, yi) in the Cartesian plane is said to be dominated by point (xj , yj ) if xi ≤ xj and yi ≤ yj with at least one of the two inequalities being strict. Given a set of n points, one of them is said to be a maximum of the set if it is not dominated by any other point in the set. For example, in the figure below, all the maximum points of the set are circled. Design an efficient algorithm for finding all the maximum points of a given set of n points in the Cartesian plane. What is the time efficiency class of your algorithm?arrow_forwardIf five integers are chosen from the set {1, 2, 3, 4, 5, 6, 7, 8}, must there be at least two integers with the property that the larger minus the smaller is 2? Write an answer that would convince a good but skeptical fellow student who has learned the statement of the pigeonhole principle but not seen an application like this one. Describe the pigeons, the pigeonholes, and how the pigeons get to the pigeonholes.arrow_forwardRecall a set A is countable if |N| ≥ |A|. Recall that Cantor’s theorem shows that P(N) = {X ⊆ N}is uncountable. Prove this.Show that F = {X ⊆ N | |X| < ∞} is countable, with an onto functiong : N → F that is computable. Write a program/function (e.g., in Python) that runs forever and prints every element of F,e.g., if run it would print something like{0}{1}{0,2}{3}{0,2}{0,5,7}{1}{0,1}{}{2}...(Note that you must prove that the program works, i.e., it prints every element of F, and onlyelements of F.)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education