The Rectangle Escape Problem By: Ehsan Emam-Jomeh-Zadeh Sepehr Assadi Supervisor: Dr. Hamid Zarrabi-Zadeh Sharif University of Technology B.Sc. Thesis.

Slides:



Advertisements
Similar presentations
NP-Hard Nattee Niparnan.
Advertisements

Shortest Vector In A Lattice is NP-Hard to approximate
Triangle partition problem Jian Li Sep,2005.  Proposed by Redstar in Algorithm board in Fudan BBS.  Motivated by some network design strategy.
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
Max Cut Problem Daniel Natapov.
Fast Algorithms For Hierarchical Range Histogram Constructions
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
What is Intractable? Some problems seem too hard to solve efficiently. Question 1: Does an efficient algorithm exist?  An O(a ) algorithm, where a > 1,
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
02/01/11CMPUT 671 Lecture 11 CMPUT 671 Hard Problems Winter 2002 Joseph Culberson Home Page.
Computational problems, algorithms, runtime, hardness
Ugo Montanari On the optimal approximation of descrete functions with low- dimentional tables.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Approximation Algorithms
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
1 Shira Zucker Ben-Gurion University of the Negev Advisors: Prof. Daniel Berend Prof. Ephraim Korach Anticoloring for Toroidal Grids.
2-Layer Crossing Minimisation Johan van Rooij. Overview Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer:
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Integer Programming Difference from linear programming –Variables x i must take on integral values, not real values Lots of interesting problems can be.
Coloring Algorithms and Networks. Coloring2 Graph coloring Vertex coloring: –Function f: V  C, such that for all {v,w}  E: f(v)  f(w) Chromatic number.
Distributed Combinatorial Optimization
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
Delay Efficient Sleep Scheduling in Wireless Sensor Networks Gang Lu, Narayanan Sadagopan, Bhaskar Krishnamachari, Anish Goel Presented by Boangoat(Bea)
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
1 Energy-aware stage illumination. Written by: Friedrich Eisenbrand Stefan Funke Andreas Karrenbauer Domagoj Matijevic Presented By: Yossi Maimon.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Example Question on Linear Program, Dual and NP-Complete Proof COT5405 Spring 11.
Approximation Algorithms
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 On Completing Latin Squares Iman Hajirasouliha Joint work with Hossein Jowhari, Ravi Kumar, and Ravi Sundaram.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Approximation Algorithms for Graph Homomorphism Problems Chaitanya Swamy University of Waterloo Joint work with Michael Langberg and Yuval Rabani Open.
The Dominating Set and its Parametric Dual  the Dominated Set  Lan Lin prepared for theory group meeting on June 11, 2003.
Non-Approximability Results. Summary -Gap technique -Examples: MINIMUM GRAPH COLORING, MINIMUM TSP, MINIMUM BIN PACKING -The PCP theorem -Application:
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
1 CS612 Algorithms for Electronic Design Automation CS 612 – Lecture 8 Lecture 8 Network Flow Based Modeling Mustafa Ozdal Computer Engineering Department,
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
Unique Games Approximation Amit Weinstein Complexity Seminar, Fall 2006 Based on: “Near Optimal Algorithms for Unique Games" by M. Charikar, K. Makarychev,
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
NPC.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
CSC 413/513: Intro to Algorithms
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Approximation Algorithms Duality My T. UF.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
P & NP.
Chapter 10 NP-Complete Problems.
Mathematical Foundations of AI
Lecture 22 Complexity and Reductions
On the Complexity of Buffer Allocation in Message Passing Systems
Computability and Complexity
The Subset Sum Game Revisited
Bin Fu Department of Computer Science
NP-Completeness Yin Tat Lee
Danny Z. Chen1, Yan Gu2, Jian Li2, and Haitao Wang1
CSE 6408 Advanced Algorithms.
The Theory of NP-Completeness
CS154, Lecture 16: More NP-Complete Problems; PCPs
Dominating Set By Eric Wengert.
Presentation transcript:

The Rectangle Escape Problem By: Ehsan Emam-Jomeh-Zadeh Sepehr Assadi Supervisor: Dr. Hamid Zarrabi-Zadeh Sharif University of Technology B.Sc. Thesis

Problem Definition  Rectangle Escape Problem (REP): o Given: One board n axis-parallel rectangles on the board. o Escape the rectangles to the boundaries minimizing the maximum density of points Escape: – Extend the rectangle on one of its sides Density: – Number of the rectangles existing or escaping over a point 12/20/12Bs.C. Thesis 2

REP Example  Example: 12/20/12Bs.C. Thesis 3

REP Example  Example: 12/20/12Bs.C. Thesis 4

REP Example  Example: 12/20/12Bs.C. Thesis 5

REP Example  Example: 12/20/12Bs.C. Thesis 6 Density Two!

Motivations  Bus Routing Application o Set of chips on a Printed Circuit Board (PCB) o Connect them via buses to boundaries o Minimizing the number of layers  Natural Geometry Problem 12/20/12Bs.C. Thesis 7

Decision Version: K-REP  Decision version of REP  Problem definition: o Given: An instance of REP Integer k ≥ 1 o Is it possible to escape the rectangles with maximum density of k? 12/20/12Bs.C. Thesis 8

Rectangle Escape Problem  Previous results: o K-REP is NP-complete for k ≥ 3. o 4-approximation algorithm for REP. o O(n 6 )-time algorithm for solving 1-REP. 12/20/12Bs.C. Thesis 9

Rectangle Escape Problem  Our results: o NP-Completeness of 2-REP. o Inapproximability of REP within factor of 3/2 (under assumption of P ≠ NP) o O(n 4 )-time algorithm for 1-REP. o Randomized (1+ ε) -approximation algorithm with high probability (when optimal answer is sufficiently large.) 12/20/12Bs.C. Thesis 10

Hardness Result  Theorem: o K-REP is NPC for k ≥ 2, even if all the rectangles are disjoint.  Proof Idea: o Reduction from 3-SAT. 12/20/12Bs.C. Thesis 11

Hardness Result (Cont.)  Proof: 12/20/12Bs.C. Thesis 12 a a a’a’ a’a’ b b b’ c c c’ (a ∨ b’ ∨ c ) (a ∨ b ∨ c’ )

Hardness Result (Cont.)  Proof: 12/20/12Bs.C. Thesis 13 a a a’a’ a’a’ b b b’ c c c’ (a ∨ b’ ∨ c ) (a ∨ b ∨ c’ ) Variable Rectangles

Hardness Result (Cont.)  Proof: 12/20/12Bs.C. Thesis 14 a a a’a’ a’a’ b b b’ c c c’ (a ∨ b’ ∨ c ) (a ∨ b ∨ c’ ) Literal Rectangles

Hardness Result (Cont.)  Proof: ‌ 12/20/12Bs.C. Thesis 15 a a a’a’ a’a’ b b b’ c c c’ (a ∨ b’ ∨ c ) (a ∨ b ∨ c’ ) Blocking Rectangles

Hardness Result (Cont.)  Proof: o Variable Rectangles: Only one of them can escape to right. – being true o Literal Rectangles: One of them should escape downward. – so its upward rectangle should be true o Blocking Rectangles: Block escape route of other rectangles. o Therefore 2-REP answer is YES iff 3-SAT is statisfiable ☐ 12/20/12Bs.C. Thesis 16

Hardness Result (Cont.)  Proof: o Proof for 2-REP Done! o By induction we can prove for k > 2. 12/20/12Bs.C. Thesis 17

Inapproximability result  Theorem: o REP admits no polynomial time α - approximation algorithm for α < 3/2 unless P = NP.  Proof: o Any α -approximation algorithm for α < 3/2 would solve 2-REP optimally! ☐ 12/20/12Bs.C. Thesis 18

O(n 4 )-time algorithm for 1-REP  Maximum Disjoint routing: o Given: An instance of REP o Find the maximum number of rectangles escaping in unit density. 12/20/12Bs.C. Thesis 19

O(n 4 )-time algorithm for 1-REP (Cont.)  Preprocess: o R 1,…,R n : n rectangles sorted by y- coordinates of their bottom side. o Free direction: if escape direction does not collide with any rectangle. Independent of other escape routes! Remove all non free directions! o v 1,…,v k : set of all vertical lines created by extending sides of rectangles o v α,v β : represent left and right vertical lines of the rectangle at hand. 12/20/12Bs.C. Thesis 20

O(n 4 )-time algorithm for 1-REP (Cont.)  Supplementary problems: o Two simpler problem: OneDirection(i,l,r): – Only rectangles between v l, v r can escape – Escapes upward if possible. TwoDirection(i,l,r): – Only rectangles between v l, v r can escape – Escapes downward or upward if possible. o Both of them can be solved by a simple greedy algorithm! 12/20/12Bs.C. Thesis 21

O(n 4 )-time algorithm for 1-REP (Cont.)  Supplementary problems: o No-Left-Escape(i,b,l,r): Only rectangles on right of v b can escape No rectangle can escape to left Only rectangles between v l, v r can escape downward o No-Right-Escape(i,b,l,r): Defines and solves similarly. 12/20/12Bs.C. Thesis 22

O(n 4 )-time algorithm for 1-REP (Cont.)  Supplementary problems: o No-Left-Escape(i,b,l,r): Illustration: 12/20/12Bs.C. Thesis 23

O(n 4 )-time algorithm for 1-REP (Cont.)  No-Left-Escape(i,b,l,r): o Answer in different cases: Downward: – No new restriction – No-Left-Escape(i-1,b,l,r) Upward: – Rectangles between v b and v β : One-Direction(i-1,l,r) and Two-Direction(i-1,l,r) – Other rectangles: No-Left-Escape(i-1, β,l,r) 12/20/12Bs.C. Thesis 24

O(n 4 )-time algorithm for 1-REP (Cont.)  No-Left-Escape(i,b,l,r): o Answer in different cases: Rightward: – Escaping rightward blocks down of some rectangles – No-Left-Escape(i-1,b,l,min{ α,r}) Leftward: – No left escape! 12/20/12Bs.C. Thesis 25

O(n 4 )-time algorithm for 1-REP (Cont.)  Final Problem: o Max-Route(i,l,r): Routing all the rectangles between v l,v r o Answer for different cases: Downward, leftward and rightward: – Just like previous ones Upward: – No-Right-Escape(i-1, α,l,r) + No-Left-Escape(i- 1, β,l,r)+1 12/20/12Bs.C. Thesis 26

O(n 4 )-time algorithm for 1-REP (Cont.)  Theorem: 1-REP can be solved in O(n 4 )  Proof: o Max-Route can solve 1-REP Max-Route answer is n iff 1-REP answer is Yes. o Max-Route can be implemented in O(n 4 ) time By Dynamic programming. ☐ 12/20/12Bs.C. Thesis 27

Randomized Approximation Algorithm  LP formulation of problem: o Build a grid on top of board by extending sides of all rectangles Density of each grid cell is uniform! o x i,j : 0-1 variable rectangle i escapes to direction j – j in {left,right,up,down}. o P(c): For each block ‘c’, is set of all x i,j variables escaping towards ‘c’. 12/20/12Bs.C. Thesis 28

Randomized Approximation Algorithm (Cont.)  LP formulation of problem: o Z: maximum density of any points o LP formulation is as follow: 12/20/12Bs.C. Thesis 29

Randomized Approximation Algorithm (Cont.)  Algorithm: 1.Find optimal solution of (x*,Z*) to LP formulation 2.Route each R i to direction j according to probability distribution of x* i,j 12/20/12Bs.C. Thesis 30

Randomized Approximation Algorithm (Cont.)  Analysis: o Let D(c) be density of cell ‘c’, after run of algorithm o D(c) is random variable: o Expectation of D(c): 12/20/12Bs.C. Thesis 31

Randomized Approximation Algorithm (Cont.)  Analysis: o So E[D(c)] is at most Z*! o But answer is max{D(c)} not E[D(c)]! o Concentration bounds: Bound the difference between variable and its expectation! – Markov, Chebychev and Chernouff equalities. 12/20/12Bs.C. Thesis 32

Randomized Approximation Algorithm (Cont.)  Analysis: o Chernouff bound: Given: – x i {0,1}-random variables and independent – X = sum of x i Then: 12/20/12Bs.C. Thesis 33

Randomized Approximation Algorithm (Cont.)  Analysis: o D(c) holds in Chernouff constraints So we have: o Pr{max c {D(c)} ≥(1+ ε)Z* }: (union bound) 12/20/12Bs.C. Thesis 34

Randomized Approximation Algorithm (Cont.)  Analysis: o if Z* ≥ c ε ln n (c ε ≥ 9/ ε 2 ): Pr{max c {D(c)} ≥(1+ ε )Z*} ≤ 4/n o Meaning that our algorithm is (1+ ε )-approximation algorithm with high probability ☐ 12/20/12Bs.C. Thesis 35

Conclusion  Our results: o 2-REP is NP-Complete. o Inapproximability of REP within factor of 3/2 (under assumption of P ≠ NP) o O(n^4)-time algorithm for 1-REP. o Randomized (1+ ε) -approximation algorithm with high probability (when optimal answer is sufficiently large.) 12/20/12Bs.C. Thesis 36

Future Works  Remaining open problems: o Approximation factor in general case o Extend the results of Maximum Disjoint problem to non-disjoint version. 12/20/12Bs.C. Thesis 37

Thank you!