advanced algorithms i
play

Advanced Algorithms (I) Chihao Zhang Shanghai Jiao Tong University - PowerPoint PPT Presentation

Advanced Algorithms (I) Chihao Zhang Shanghai Jiao Tong University Feb. 25, 2019 Advanced Algorithms (I) 1/14 Advanced Algorithms In the course, we will learn Approximation Algorithms linear programming, semi-definite programming spectral


  1. Advanced Algorithms (I) Chihao Zhang Shanghai Jiao Tong University Feb. 25, 2019 Advanced Algorithms (I) 1/14

  2. Advanced Algorithms In the course, we will learn Approximation Algorithms linear programming, semi-definite programming spectral method random walks … We will emphasize on tools for designing approximation algorithms rigorous analysis of algorithms Advanced Algorithms (I) 2/14

  3. Advanced Algorithms In the course, we will learn Approximation Algorithms linear programming, semi-definite programming spectral method random walks … We will emphasize on tools for designing approximation algorithms rigorous analysis of algorithms Advanced Algorithms (I) 2/14

  4. Advanced Algorithms In the course, we will learn Approximation Algorithms We will emphasize on tools for designing approximation algorithms rigorous analysis of algorithms Advanced Algorithms (I) 2/14 ▶ linear programming, semi-definite programming ▶ spectral method ▶ random walks ▶ …

  5. Advanced Algorithms In the course, we will learn Approximation Algorithms We will emphasize on Advanced Algorithms (I) 2/14 ▶ linear programming, semi-definite programming ▶ spectral method ▶ random walks ▶ … ▶ tools for designing approximation algorithms ▶ rigorous analysis of algorithms

  6. Course Info Instructor: Chihao Zhang Course Homepage: http://chihaozhang.com/teaching/AA2019spring/ Ofgice Hour: every Monday, 7:00pm - 9:00pm Grading Policy Homework 30% Mid-term Exam 30% Course Project 40% Advanced Algorithms (I) 3/14

  7. Course Info http://chihaozhang.com/teaching/AA2019spring/ Grading Policy Homework 30% Mid-term Exam 30% Course Project 40% Advanced Algorithms (I) 3/14 ▶ Instructor: Chihao Zhang ▶ Course Homepage: ▶ Ofgice Hour: every Monday, 7:00pm - 9:00pm

  8. Course Info http://chihaozhang.com/teaching/AA2019spring/ Grading Policy Advanced Algorithms (I) 3/14 ▶ Instructor: Chihao Zhang ▶ Course Homepage: ▶ Ofgice Hour: every Monday, 7:00pm - 9:00pm ▶ Homework 30% ▶ Mid-term Exam 30% ▶ Course Project 40%

  9. NP -hard, we look at its optimization version. MaxSAT Advanced Algorithms (I) Harder than SAT, so we look for an approximate solution. number of clauses. Compute an assignment that satisfies maximum Problem: C m . C C A CNF formula Input: MaxSAT Given a CNF formula x x x x x x x x x , is it satisfiable? 4/14

  10. NP -hard, we look at its optimization version. MaxSAT Input: Advanced Algorithms (I) Harder than SAT, so we look for an approximate solution. number of clauses. Compute an assignment that satisfies maximum Problem: C m . C C A CNF formula MaxSAT x x x x x x x x x 4/14 Given a CNF formula ϕ , is it satisfiable?

  11. NP -hard, we look at its optimization version. MaxSAT C Advanced Algorithms (I) Harder than SAT, so we look for an approximate solution. number of clauses. Compute an assignment that satisfies maximum Problem: C m . C A CNF formula Input: MaxSAT 4/14 Given a CNF formula ϕ , is it satisfiable? ϕ = ( x 1 ∨ x 3 ∨ ¯ x 29 ) ∧ (¯ x 3 ∨ x 7 ) ∧ · · · ∧ (¯ x 33 ∨ ¯ x 34 ∨ x 90 ∨ x 126 )

  12. MaxSAT C Advanced Algorithms (I) Harder than SAT, so we look for an approximate solution. number of clauses. Compute an assignment that satisfies maximum Problem: C m . C A CNF formula Input: MaxSAT 4/14 Given a CNF formula ϕ , is it satisfiable? ϕ = ( x 1 ∨ x 3 ∨ ¯ x 29 ) ∧ (¯ x 3 ∨ x 7 ) ∧ · · · ∧ (¯ x 33 ∨ ¯ x 34 ∨ x 90 ∨ x 126 ) NP -hard, we look at its optimization version.

  13. MaxSAT Input: Advanced Algorithms (I) Harder than SAT, so we look for an approximate solution. number of clauses. Compute an assignment that satisfies maximum Problem: MaxSAT 4/14 Given a CNF formula ϕ , is it satisfiable? ϕ = ( x 1 ∨ x 3 ∨ ¯ x 29 ) ∧ (¯ x 3 ∨ x 7 ) ∧ · · · ∧ (¯ x 33 ∨ ¯ x 34 ∨ x 90 ∨ x 126 ) NP -hard, we look at its optimization version. A CNF formula ϕ = C 1 ∧ C 2 · · · ∧ C m .

  14. MaxSAT Input: Advanced Algorithms (I) Harder than SAT, so we look for an approximate solution. number of clauses. Compute an assignment that satisfies maximum Problem: MaxSAT 4/14 Given a CNF formula ϕ , is it satisfiable? ϕ = ( x 1 ∨ x 3 ∨ ¯ x 29 ) ∧ (¯ x 3 ∨ x 7 ) ∧ · · · ∧ (¯ x 33 ∨ ¯ x 34 ∨ x 90 ∨ x 126 ) NP -hard, we look at its optimization version. A CNF formula ϕ = C 1 ∧ C 2 · · · ∧ C m .

  15. If the coin goes HEAD , we set x i true , otherwise we set x i false . Each clause C i contains i literals Tossing a Coin Advanced Algorithms (I) For each variable x i , toss an independent fair coin. We first cosnider the following simple algorithm: C m An instance C C The set of clauses x n x x The variable sets V 5/14

  16. If the coin goes HEAD , we set x i true , otherwise we set x i false . Tossing a Coin We first cosnider the following simple algorithm: For each variable x i , toss an independent fair coin. Advanced Algorithms (I) 5/14 An instance ϕ ▶ The variable sets V = { x 1 , x 2 , . . . , x n } ▶ The set of clauses C = { C 1 , C 2 , . . . , C m } ▶ Each clause C i contains ℓ i literals

  17. If the coin goes HEAD , we set x i true , otherwise we set x i false . Tossing a Coin We first cosnider the following simple algorithm: For each variable x i , toss an independent fair coin. Advanced Algorithms (I) 5/14 An instance ϕ ▶ The variable sets V = { x 1 , x 2 , . . . , x n } ▶ The set of clauses C = { C 1 , C 2 , . . . , C m } ▶ Each clause C i contains ℓ i literals

  18. If the coin goes HEAD , we set x i true , otherwise we set x i false . Tossing a Coin We first cosnider the following simple algorithm: Advanced Algorithms (I) 5/14 An instance ϕ ▶ The variable sets V = { x 1 , x 2 , . . . , x n } ▶ The set of clauses C = { C 1 , C 2 , . . . , C m } ▶ Each clause C i contains ℓ i literals ▶ For each variable x i , toss an independent fair coin.

  19. Tossing a Coin We first cosnider the following simple algorithm: Advanced Algorithms (I) 5/14 An instance ϕ ▶ The variable sets V = { x 1 , x 2 , . . . , x n } ▶ The set of clauses C = { C 1 , C 2 , . . . , C m } ▶ Each clause C i contains ℓ i literals ▶ For each variable x i , toss an independent fair coin. ▶ If the coin goes HEAD , we set x i true , otherwise we set x i false .

  20. For this particular algorithm, it can be derandomized. Pr C i is satisfied Analysis On the otherhand, Advanced Algorithms (I) OPT E X Therefore, m OPT i m The outcome of the algorithm is random, we are interested in its i m i m E X expectation. 6/14

  21. For this particular algorithm, it can be derandomized. Pr C i is satisfied Analysis On the otherhand, Advanced Algorithms (I) OPT E X Therefore, m OPT i m The outcome of the algorithm is random, we are interested in its i m i m E X expectation. 6/14

  22. Pr C i is satisfied Analysis m Advanced Algorithms (I) OPT E X Therefore, m OPT On the otherhand, i The outcome of the algorithm is random, we are interested in its i m i m E X For this particular algorithm, it can be derandomized. expectation. 6/14

  23. Analysis i Advanced Algorithms (I) OPT E X Therefore, m OPT On the otherhand, m i The outcome of the algorithm is random, we are interested in its m m For this particular algorithm, it can be derandomized. expectation. 6/14 ∑ E [ X ] = Pr [ C i is satisfied ] i =1

  24. Analysis The outcome of the algorithm is random, we are interested in its Advanced Algorithms (I) OPT E X Therefore, m OPT On the otherhand, 6/14 m m For this particular algorithm, it can be derandomized. expectation. ( ) ∑ ∑ 1 − 2 − ℓ i E [ X ] = Pr [ C i is satisfied ] = ≥ m 2 . i =1 i =1

  25. Analysis m Advanced Algorithms (I) OPT E X Therefore, On the otherhand, The outcome of the algorithm is random, we are interested in its 6/14 For this particular algorithm, it can be derandomized. m expectation. ( ) ∑ ∑ 1 − 2 − ℓ i E [ X ] = Pr [ C i is satisfied ] = ≥ m 2 . i =1 i =1 OPT ≤ m .

  26. Analysis m Advanced Algorithms (I) Therefore, On the otherhand, The outcome of the algorithm is random, we are interested in its 6/14 expectation. m For this particular algorithm, it can be derandomized. ( ) ∑ ∑ 1 − 2 − ℓ i E [ X ] = Pr [ C i is satisfied ] = ≥ m 2 . i =1 i =1 OPT ≤ m . E [ X ] ≥ 1 2 · OPT .

  27. Can we improve the previous algorithm? Observations the worst case happens when for some singleton clause, i.e., i ; for a singleton C x , if there is no C x , then we can increase the probability of x to be true; otherwise, we can improve the upper bound for OPT ! ( x and x cannot be both satisfied) Advanced Algorithms (I) 7/14

  28. Can we improve the previous algorithm? Observations for a singleton C x , if there is no C x , then we can increase the probability of x to be true; otherwise, we can improve the upper bound for OPT ! ( x and x cannot be both satisfied) Advanced Algorithms (I) 7/14 ▶ the worst case happens when for some singleton clause, i.e., ℓ i = 1 ;

  29. Can we improve the previous algorithm? Observations x , then we can increase the probability of x to be true; otherwise, we can improve the upper bound for OPT ! ( x and x cannot be both satisfied) Advanced Algorithms (I) 7/14 ▶ the worst case happens when for some singleton clause, i.e., ℓ i = 1 ; ▶ for a singleton C = x , if there is no C ′ = ¯

Recommend


More recommend