Neeldhara
  • About
  • Research
    • Overview
    • People
    • Publications
    • Surveys
  • Teaching
    • Courses
    • Materials
  • Lists
    • Puzzles
    • Bookmarks
  • Exposition
    • Talks
    • Videos
  • Events
  • Blog

CS614. Advanced Algorithms. L19 Quiz.

CS614. Advanced Algorithms.

L19 Quiz

Back to the course page

Problem 1. Bin Packing

Consider the bin-packing problem:

Input: nnn items with sizes a1⋯ana_1 \cdots a_na1​⋯an​ respectively, a positive integer BBB (bin capacity) and a positive integer kkk (number of bins). Question: Is there a partition of the set {1⋯n}\{1 \cdots n\}{1⋯n} into sets S1,…,SkS_1, \ldots, S_kS1​,…,Sk​ such that for each i∈{1⋯k}i \in\{1 \cdots k\}i∈{1⋯k} we have that ∑j∈Siaj≤B\sum_{j \in S_i} a_j \leq B∑j∈Si​​aj​≤B?

Show that Bin Packing is NP-complete.

Problem 2. BOX-DEPTH

Consider the following problem, called BOX-DEPTH: Given a set of nnn axisaligned rectangles in the plane, how big is the largest subset of these rectangles that contain a common point?

  1. Describe a polynomial-time reduction from BOX-DEPTH to MAXCLIQUE.

  2. Describe and analyze a polynomial-time algorithm for BOX-DEPTH. [Hint: O(n3)O\left(n^3\right)O(n3) time should be easy, but O(nlog⁡n)O(n \log n)O(nlogn) time is possible.]

  3. Why don’t these two results imply that P=NP\mathrm{P}=\mathrm{NP}P=NP?


© 2022 • Neeldhara Misra • Credits •

 

Corrections? Please leave a comment here or a PR in this repository, thanks!

I’d rather be a failure at something I love than a success at something I hate.

George Burns

You live and you learn — at any rate, you live.

Douglas Adams

A problem worthy of attack proves its worth by fighting back.

Paul Erdos

×