1. Homepage
  2. Homework
  3. [2022] COMP 3170 Assignment 5 - NP-Complete
This question has been solved

[2022] COMP 3170 Assignment 5 - NP-Complete

Engage in a Conversation
COMP3170Analysis of Algorithms and Data StructuresManitobaAlgorithm

COMP 3170 Assignment 5 CourseNana.COM

All problems are written problems. Solutions can be prepared however you like, though they must be legible (marks may be deducted if not). Solutions should be submitted only on Crowdmark. The assignment is out of 27 marks. See course information for guidelines on academic integrity. CourseNana.COM

[8 marks]
Problem 1 Consider the following problem 4SUM: CourseNana.COM

Given a set S, is there a subset {x, y, z, w} ⊂ S so that x + y + z + w = 0? CourseNana.COM

Show that 4SUM is 3SUM-Hard. More precisely, define a reduction f from 3SUM to 4SUM and show that it (i) runs in o(n2) time and (ii) is a valid reduction. CourseNana.COM

[5 + 14 marks]
Problem 2 Recall the partition problem that we saw in class. We will show that the partition problem is NP-Complete. CourseNana.COM

(a) Show that the partition problem is in NP by defining certificates for the partition problem and describing a verification algorithm for these certificates. You should show that your algorithm takes polynomial time and is, indeed, a verification algorithm. CourseNana.COM

(b) Consider a variant of the subset sum problem called the positive subset sum problem, in which all elements of the set S and the target k are all positive integers. You may assume without proof that the positive subset sum problem is NP-Complete (in fact, our proof from class that subset sum is NP-Complete also shows this). Show that the partition problem is NP-Hard by describing a polynomial time reduction from positive subset sum to partition. You should describe how to transform an instance of positive subset sum into an instance of partition, show that the reduction takes polynomial time, and show that the reduction is valid. CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
COMP3170代写,Analysis of Algorithms and Data Structures代写,Manitoba代写,Algorithm代写,COMP3170代编,Analysis of Algorithms and Data Structures代编,Manitoba代编,Algorithm代编,COMP3170代考,Analysis of Algorithms and Data Structures代考,Manitoba代考,Algorithm代考,COMP3170help,Analysis of Algorithms and Data Structureshelp,Manitobahelp,Algorithmhelp,COMP3170作业代写,Analysis of Algorithms and Data Structures作业代写,Manitoba作业代写,Algorithm作业代写,COMP3170编程代写,Analysis of Algorithms and Data Structures编程代写,Manitoba编程代写,Algorithm编程代写,COMP3170programming help,Analysis of Algorithms and Data Structuresprogramming help,Manitobaprogramming help,Algorithmprogramming help,COMP3170assignment help,Analysis of Algorithms and Data Structuresassignment help,Manitobaassignment help,Algorithmassignment help,COMP3170solution,Analysis of Algorithms and Data Structuressolution,Manitobasolution,Algorithmsolution,