CSC 8301 Design & Analysis of Algorithms: Lower Bounds

Similar documents
CSC 1700 Analysis of Algorithms: P and NP Problems

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

Limitations of Algorithm Power

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity

Analysis of Algorithms. Unit 5 - Intractable Problems

In complexity theory, algorithms and problems are classified by the growth order of computation time as a function of instance size.

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

Data Structures in Java

Tractability. Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time?

Computational Complexity

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

COMP Analysis of Algorithms & Data Structures

} } } Lecture 23: Computational Complexity. Lecture Overview. Definitions: EXP R. uncomputable/ undecidable P C EXP C R = = Examples

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

VIII. NP-completeness

Find an Element x in an Unsorted Array

ECS122A Handout on NP-Completeness March 12, 2018

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

1. Introduction Recap

CMSC 441: Algorithms. NP Completeness

NP-Completeness. Until now we have been designing algorithms for specific problems

CSC 421: Algorithm Design & Analysis. Spring 2018

b. Checking completeness of a graph represented by its adjacency matrix c. Generating all the subsets of a n-element set

CS/COE

Instructor N.Sadagopan Scribe: P.Renjith. Lecture- Complexity Class- P and NP

Unit 1A: Computational Complexity

Tractable & Intractable Problems

COSE215: Theory of Computation. Lecture 20 P, NP, and NP-Complete Problems

NP Complete Problems. COMP 215 Lecture 20

P,NP, NP-Hard and NP-Complete

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

More on NP and Reductions

Graph Theory and Optimization Computational Complexity (in brief)

Design and Analysis of Algorithms

Polynomial-time Reductions

The Complexity Classes P and NP. Andreas Klappenecker [partially based on slides by Professor Welch]

Instructor N.Sadagopan Scribe: P.Renjith

NP Completeness and Approximation Algorithms

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

CS6901: review of Theory of Computation and Algorithms

The P versus NP Problem. Ker-I Ko. Stony Brook, New York

NP-problems continued

Lecture 19: Finish NP-Completeness, conp and Friends

Computability and Complexity Theory: An Introduction

Data Structures and Algorithms

Introduction to Complexity Theory

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35.

Computational Complexity

Algorithms Design & Analysis. Approximation Algorithm

Problems, and How Computer Scientists Solve Them Manas Thakur

Data Structures and Algorithms (CSCI 340)

Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary

The P-vs-NP problem. Andrés E. Caicedo. September 10, 2011

Computational Complexity

Turing Machines and Time Complexity

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

CS3719 Theory of Computation and Algorithms

Problems and Solutions. Decidability and Complexity

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 2 : Regular Expressions & DFAs

P and NP. Inge Li Gørtz. Thank you to Kevin Wayne, Philip Bille and Paul Fischer for inspiration to slides

NP and NP Completeness

BBM402-Lecture 11: The Class NP

P, NP, NP-Complete, and NPhard

1 Computational Problems

Lecture 14 - P v.s. NP 1

Complexity, P and NP

Computability and Complexity Theory

CSCI3390-Lecture 14: The class NP

COSE215: Theory of Computation. Lecture 21 P, NP, and NP-Complete Problems

Limits of Feasibility. Example. Complexity Relationships among Models. 1. Complexity Relationships among Models

Friday Four Square! Today at 4:15PM, Outside Gates

Complexity Classes in Membrane Computing

CS 583: Algorithms. NP Completeness Ch 34. Intractability

Notes for Lecture Notes 2

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

CSC 421: Algorithm Design & Analysis. Spring 2015

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

Exercises NP-completeness

Spring Lecture 21 NP-Complete Problems

CS481: Bioinformatics Algorithms

Combinatorial optimization problems

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Models of Computation

NP-Completeness. NP-Completeness 1

INTRO TO COMPUTATIONAL COMPLEXITY

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

Computational complexity theory

1.1 P, NP, and NP-complete

P and NP. Warm Up: Super Hard Problems. Overview. Problem Classification. Tools for classifying problems according to relative hardness.

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

Chapter 3: Proving NP-completeness Results

DAA 8 TH UNIT DETAILS

Data Structures and Algorithms

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Reductions. Reduction. Linear Time Reduction: Examples. Linear Time Reductions

Transcription:

CSC 8301 Design & Analysis of Algorithms: Lower Bounds Professor Henry Carter Fall 2016

Recap Iterative improvement algorithms take a feasible solution and iteratively improve it until optimized Simplex method: linear equations Ford-Fulkerson: network flow Bipartite matching: matching cardinality or matching weight 2

How low can you go? Algorithmic power explored so far has been powerful Several implicit limitations have been encountered These limitations established through lower-bound proofs (big-ω) 3

Proving the lower bound Trivial limits Problem reduction Adversarial argument Information-theoretic 4

Trivial Limits A simple lower bound can be established based on the size of the input and output Every input element must be read Every output element must be written 5

Examples Enumerating permutations of n elements Evaluating a polynomial N x N matrix multiplication 6

Tight Bounds The tightness of the bound indicates how close the lower bound is to the actual known lower bound If a lower bound is known along with an algorithm with the same efficiency, the bound is "tight" Examples: Polynomial evaluation N x N matrix multiplication 7

Problem Reduction If we have a lower bound for problem Q, it can be applied to other problems Reducing Q to P implies that the worst-case lower bound for Q also applies to P Since the worst-case Q requires Ω(n) operations no matter how you try to solve it, reducing the problem to P and solving P also faces the same lower bound 8

Common problems for reduction Problem Lower Bound Tightness sorting Ω(n log n) yes Searching a sorted Ω(log n) yes array Element uniqueness Ω(n log n) yes n-digit integer multiplication n x n matrix multiplication Ω(n) Ω(n 2 ) unknown unknown 9

Euclidean Minimum Spanning Tree 10

(Matrix) Multiplication Integer multiplication: x y = (x + y)2 (x y) 2 4 x 2 = x x Matrix multiplication X = apple 0 A A T 0 Y = apple 0 B T B 0 11

Adversarial Arguments An adversarial player generates inputs during execution to incur maximum comparisons The adversary must remain consistent with previous choices Determine how many comparisons the adversary can force Example: merging two sorted arrays 12

Information-Theoretic Arguments Determine the minimum number of questions required to gather the necessary "information" Example: guessing a number between 1 and n Enumerate possible execution paths with decision trees The maximum and average heights of the tree correspond to the worst-case and average number of questions (comparisons) 13

Example tree: Insertion Sort 14

Sorting Lower Bound Lower bound on height: Stirling's formula: n! (2πn)1/2 (n/e) n Average height: 15

Example tree: Searching 16

Example tree: Searching 17

Searching Lower Bound Representation-dependent Ternary decision trees: Not tight Binary decision trees: 18

Practice: finding the median of three elements What is the information-theoretic lower bound using comparison-based algorithms? Draw a decision tree Is the bound illustrated by your decision tree tight? Can we get a better algorithm? 19

Recap Algorithmic power is broad but limited Lower bounds determine whether an algorithm can be improved by more than a constant factor Established through input size, problem reduction, adversarial generation, and information-theoretic decision trees 20

Quantifying Difficulty Is the problem solvable? Is the problem solvable in polynomial time? Foundational questions in computational complexity 21

Decision Problems To simplify analysis, complexity questions are frequently applied to decision problems Examples: Does the program halt? Can the graph be colored with no more than m colors? Many problems in computing can be reduced to a series of decision problems Find the minimum number of colors needed to color a graph 22

Decidability Is the problem solvable? Many decision problems cannot be solved with any algorithm Alan Turing's halting problem is undecidable 23

Halting Problem 24

Tractability Is the problem solvable in polynomial time? Proof: give a (deterministic) polynomial time algorithm Abstractly represented as all problems in the set P Contains many of the problems we've already examined 25

NP Problems Problems with no known polynomial-time solution Specifically, problems solvable using the following nondeterministic algorithm: Randomly generate a solution Deterministically check the correctness of the solution P is a subset of NP How? 26

Examples Hamiltonian circuit Traveling Salesman Knapsack problem Partition problem Bin packing problem Graph-coloring problem Integer linear programming 27

NP-Complete Representative problems in NP Require two characteristics: A belongs to class NP All problems in NP are polynomially reducible to A How do we prove these characteristics? 28

Practice A game of chess can be posed as the following decision problem: given a legal positioning of chess pieces and information about which side is to move, determine whether that side can win. Is this decision problem decidable? 29

Practice A certain problem can be solved using an algorithm whose running time is in O(n log n ). Is the problem tractable or not? Can we be certain? 30

Next Time... Levitin Chapter 11.3-11.4 Remember, you need to read it BEFORE you come to class! Homework: 11.1: 1, 2, 3ab 11.2: 1, 3a 31