AVA Fall 2005 Dealing with hard problems Lecture I Advanced Algorithms Fall 2005 Anna Pagh (Slides based on Intro week talk by R. Pagh)

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

Math for Liberal Studies. There is a list of numbers called weights These numbers represent objects that need to be packed into bins with a particular.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Design and Analysis of Algorithms NP-Completeness Haidong Xue Summer 2012, at GSU.
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
CSE373: Data Structures & Algorithms Lecture 24: The P vs. NP question, NP-Completeness Nicki Dell Spring 2014 CSE 373 Algorithms and Data Structures 1.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Computational problems, algorithms, runtime, hardness
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
The Brick Wall: NP-Completeness Christopher King Joshua Greenspan.
The Theory of NP-Completeness
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Analysis of Algorithms CS 477/677
Computational Complexity, Physical Mapping III + Perl CIS 667 March 4, 2004.
Polynomial time approximation scheme Lecture 17: Mar 13.
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
Public Key Cryptography Topical Lecture Week 10. PUBLIC AB Public Key Cryptography A: Hey B, send me an encoded message. This is how you encode a message.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 25 Instructor: Paul Beame.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Programming & Data Structures
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
Chapter 7 Inefficiency and Intractability CS 345 Spring Quarter, 2014.
Approximation Algorithms Pages ADVANCED TOPICS IN COMPLEXITY THEORY.
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
MIT and James Orlin1 NP-completeness in 2005.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Approximation Algorithms
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
CSC 413/513: Intro to Algorithms NP Completeness.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
P, NP, and Exponential Problems Should have had all this in CS 252 – Quick review Many problems have an exponential number of possibilities and we can.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Cliff Shaffer Computer Science Computational Complexity.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
CSE373: Data Structures & Algorithms Lecture 22: The P vs. NP question, NP-Completeness Lauren Milne Summer 2015.
Erdal Kose CC30.10 These slides are based of Prof. N. Yanofsky Lecture notes.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete Problems Algorithm : Design & Analysis [23]
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Optimization Problems
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Design and Analysis of Algorithms NP-Completeness Haidong Xue Summer 2012, at GSU.
Computer Science Background for Biologists CSC 487/687 Computing for Bioinformatics Fall 2005.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
Algorithm Complexity By: Ashish Patel and Alex Golebiewski.
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.
Great Theoretical Ideas in Computer Science.
Construction We constructed the following graph: This graph has several nice properties: Diameter Two Graph Pebbling Tim Lewis 1, Dan Simpson 1, Sam Taggart.
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
The NP class. NP-completeness
NP-Complete Problems.
Analysis and design of algorithm
Objective of This Course
Chapter 11 Limitations of Algorithm Power
Solution methods for NP-hard Discrete Optimization Problems
Presentation transcript:

AVA Fall 2005 Dealing with hard problems Lecture I Advanced Algorithms Fall 2005 Anna Pagh (Slides based on Intro week talk by R. Pagh)

AVA Fall 2005 Puzzles There are at least two types of puzzles

AVA Fall 2005 An algorithm for puzzles? How can you systematically complete a puzzle? An algorithm: Put down the pieces one by one by testing all possibilities in each position.

AVA Fall 2005 Analysis of the algorithm Say there are N pieces in the puzzle. Each time we have to place a piece, there are at most 4N possibilities to try. The total number of possibilities to try is no more than 4N 2. Examples: N=9 gives 364 possibilities. N=100 gives possibilities.

AVA Fall 2005 A problem... The algorithm does not work if there are several possibilities for placing a piece in each position. ?

AVA Fall 2005 A new algorithm Try all N possibilities in first position. For each of these, try all N-1 possibilities in second position. For each combination in the first two positions, try all N-2 possibilities in third position. Etc…

AVA Fall 2005 Analysis of new algorithm In the worst case, the number of possibilities to explore is N*(N-1)*(N-2)*…*2*1 Sometimes you need to explore (nearly) all. Examples: N=9 gives possibilities. For N=30 the number is (!)

AVA Fall 2005 But computers are fast... Modern computers are extremely fast. Wouldn’t they be able to do that in a few seconds? Nope! –Even a fast computer does only a few billion things a second. –Solving the puzzle with 30 pieces would take a million billion years!

AVA Fall 2005 A better algorithm? How about trying to find a smarter algorithm for solving the puzzle? Good idea - however nobody has yet succeeded in finding an efficient algorithm. In fact, most experts believe that it is impossible to find an algorithm that solves large puzzles quickly.

AVA Fall 2005 More serious problems MAERSK must plan how containers are placed on ships, and how ships should sail such that: –Goods arrive on time –The capacity of the ships is used as well as possible –...

AVA Fall 2005 More serious problems 2 SAS must plan how its personnel is used on the planes, considering: –Labour union agreements –Extra payment for working over time –Flight schedules –...

AVA Fall 2005 More serious problems 3 The potato producer should try to pack as many bags of potatos as possible, such that each weighs at least 2 kilograms.

AVA Fall 2005 A connection Puzzles and these serious problems have one important thing in common: When you see a proposed solution, it is easy to evaluate how good it is. Puzzles: Check that all the pieces fit. MAERSK plan: Compute the revenue. SAS plan: Compute the personnel expenses.

AVA Fall 2005 Classes P and NP P is the class of problems that can be solved in polynomial time. NP is the class of problems that can be verified in polynomial time. All the problems we have looked at belongs to a class of hard problems called NP-complete. Identifying and dealing with NP- complete problems is a major research topic in computer science.

AVA Fall 2005 Playing Minesweeper: NP-complete Finding possible handball champions: Efficiently solvable More examples Finding possible soccer champions: NP-complete

AVA Fall 2005 Todays lecture How to compare hardness of problems. Show that a problem is ”as hard as” another problem. Polynomial time reductions. Difference between decision problems and optimization problems. More formal definition of NP: What does it mean to verify in polynomial time.

AVA Fall 2005 Next week Define NP-completeness. Show NP-completeness for different problems

AVA Fall 2005 The remaining question THEN WHAT DO YOU DO? Some problems are hard to solve by computer, except by going through an astronomic number of possibilities, which will take forever.

AVA Fall 2005 Possibility 1: Approximations Sometimes you are happy with solutions that are only approximately optimal. Example: A potato packing giving at least 99% of the largest possible number of bags. In a number of cases, one can quickly compute such ”approximately optimal” solutions. (E.g. in packing problems.)

AVA Fall 2005 Possibility 2: Heuristics Some NP-complete problems have algorithms that work well in many specific cases. For example, it might be easy to see that only Brøndby and FCK have a chance of becoming soccer champions, given the standings in the league. ITU has a leading group in ”BDD-based” algorithms for hard problems.

AVA Fall 2005 Last two lectures Approximation algorithms. What it is and some different techniques. How well can a problem be approximated? We can divide problems into new classes depending on the hardness of approximation. Other methods of dealing with NP- complete problems (briefly).