1 / 25

Lecture 25 Partition

Lecture 25 Partition. Partition. Subsum. S=33333333333333333333 1111111111111111111111. 1. 1. Puzzle. Answer. Knapsack. Decision Version. Theorem. Proof. Theorem. Algorithm. Classify: for i < m, c i < a= c G , for i > m+1, c i > a. Sort For.

Download Presentation

Lecture 25 Partition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 25 Partition

  2. Partition

  3. Subsum

  4. S=33333333333333333333 1111111111111111111111 1 1

  5. Puzzle Answer

  6. Knapsack

  7. Decision Version

  8. Theorem Proof.

  9. Theorem

  10. Algorithm • Classify: for i < m, ci< a= cG, for i > m+1, ci > a. • Sort • For

  11. Proof.

  12. Time

  13. Fully PTAS • A problem has a fully PTAS if for any ε>0, it has (1+ε)-approximation running in time poly(n,1/ε).

  14. Fully FTAS for Knapsack

  15. Time • outside loop: O(n) • Inside loop: O(nM) where M=max ci • Core: O(n log (MS)) • Total O(n M log (MS)) • Since input size is O(n log (MS)), this is a pseudo-polynomial-time due to M=2 3 log M

More Related