CS10 The Beauty and Joy of Computing Lecture #23 : Limits of Computing 2011-04-20 Thanks to the success of the Kinect, researchers all over the world believe.

Slides:



Advertisements
Similar presentations
CS211 Problems: unsolvable, unfeasible and unsolved Topic 3: P and NP.
Advertisements

1 P, NP, and NP-Complete Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
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,
The Theory of NP-Completeness
Great Theoretical Ideas in Computer Science for Some.
CS420 lecture one Problems, algorithms, decidability, tractability.
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.
Tractable and intractable problems for parallel computers
The Theory of NP-Completeness
P versus NP and Cryptography Wabash College Mathematics and Computer Science Colloquium Nov 16, 2010 Jeff Kinne, Indiana State University (Theoretical)
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
Programming & Data Structures
1 CSC 421: Algorithm Design & Analysis Spring 2013 Complexity & Computability  lower bounds on problems brute force, decision trees, adversary arguments,
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:
CSCE350 Algorithms and Data Structure
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
1 Ethics of Computing MONT 113G, Spring 2012 Session 13 Limits of Computer Science.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
22C:19 Discrete Structures Algorithms and Complexity Fall 2014 Sukumar Ghosh.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
CSC 413/513: Intro to Algorithms NP Completeness.
CSC 172 P, NP, Etc. “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
CSE 3813 Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
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.
Compsci 100, Fall What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in our lives?
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
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.
Beauty and Joy of Computing Limits of Computing Ivona Bezáková CS10: UC Berkeley, April 14, 2014 (Slides inspired by Dan Garcia’s slides.)
CSE332: Data Abstractions Lecture 27: A Few Words on NP Tyler Robison Summer
SNU OOPSLA Lab. 1 Great Ideas of CS with Java Part 1 WWW & Computer programming in the language Java Ch 1: The World Wide Web Ch 2: Watch out: Here comes.
CS10: The Beauty and Joy of Computing Lecture #22 Limits of Computing Warning sign posted at Stern Hall. Also, Apple releases new operating.
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
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.
The Beauty and Joy of Computing Lecture #23 Limits of Computing Researchers at Facebook and the University of Milan found that the avg # of “friends” separating.
Complexity © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
Optimization/Decision Problems Optimization Problems – An optimization problem is one which asks, “What is the optimal solution to problem X?” – Examples:
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
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.
CS10: The Beauty and Joy of Computing Lecture #21 Limits of Computing Instructor: Sean Morris UCB announces The Turing Test Tournament.
Chapter 12: Theory of Computation
CS 2210 Discrete Structures Algorithms and Complexity
Analysis and design of algorithm
How Hard Can It Be?.
Discrete Mathematics CS 2610
Chapter 11 Limitations of Algorithm Power
CSC 380: Design and Analysis of Algorithms
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Our old list of problems
RAIK 283 Data Structures & Algorithms
CS 2210 Discrete Structures Algorithms and Complexity
Presentation transcript:

CS10 The Beauty and Joy of Computing Lecture #23 : Limits of Computing Thanks to the success of the Kinect, researchers all over the world believe they see the future of HCI and it is voice, speech and gestures. They are already developing a “gesture- controlled system for monitoring air- traffic”… UC Berkeley EECS Lecturer SOE Dan Garcia

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (2) Garcia, Fall 2011  CS research areas:  Artificial Intelligence  Biosystems & Computational Biology  Database Management Systems  Graphics  Human-Computer Interaction  Networking  Programming Systems  Scientific Computing  Security  Systems  Theory  Complexity theory  … Computer Science … A UCB viewwww.eecs.berkeley.edu/Research/Areas/

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (3) Garcia, Fall 2011  Problems that…  are tractable with efficient solutions in reasonable time  are intractable  are solvable approximately, not optimally  have no known efficient solution  are not solvable Let’s revisit algorithm complexitywww.csprinciples.org/docs/APCSPrinciplesBigIdeas pdf

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (4) Garcia, Fall 2011  Recall our algorithm complexity lecture, we’ve got several common orders of growth  Constant  Logarithmic  Linear  Quadratic  Cubic  Exponential  Order of growth is polynomial in the size of the problem  E.g.,  Searching for an item in a collection  Sorting a collection  Finding if two numbers in a collection are same  These problems are called being “in P” (for polynomial) Tractable with efficient sols in reas time

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (5) Garcia, Fall 2011  Problems that can be solved, but not solved fast enough  This includes exponential problems  E.g., f(n) = 2 n  as in the image to the right  This also includes poly-time algorithm with a huge exponent  E.g, f(n) = n 10  Only solve for small n Intractable problemsen.wikipedia.org/wiki/Intractability_(complexity)#Intractability Imagine a program that calculated something important at each of the bottom circles. This tree has height n, but there are 2 n bottom circles!

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (6) Garcia, Fall 2011 Peer Instruction What’s the most you can put in your knapsack? a)$4 b)$7 c)$8 d)$15 e)$19 Knapsack Problem You have a backpack with a weight limit (here 15kg), which boxes (with weights and values) should be taken to maximize value?

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (7) Garcia, Fall 2011  A problem might have an optimal solution that cannot be solved in reasonable time  BUT if you don’t need to know the perfect solution, there might exist algorithms which could give pretty good answers in reasonable time Solvable approximately, not optimally in reas time Knapsack Problem You have a backpack with a weight limit (here 15kg), which boxes (with weights and values) should be taken to maximize value? en.wikipedia.org/wiki/Knapsack_problem

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (8) Garcia, Fall 2011  Solving one of them would solve an entire class of them!  We can transform one to another, i.e., reduce  A problem P is “hard” for a class C if every element of C can be “reduced” to P  If you’re “in NP” and “NP-hard”, then you’re “NP-complete”  If you guess an answer, can I verify it in polynomial time?  Called being “in NP”  Non-deterministic (the “guess” part) Polynomial Have no known efficient solutionen.wikipedia.org/wiki/P_%3D_NP_problem Subset Sum Problem Are there a handful of these numbers (at least 1) that add together to get 0?

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (9) Garcia, Fall 2011  This is THE major unsolved problem in Computer Science!  One of 7 “millennium prizes” w/a $1M reward  All it would take is solving ONE problem in the NP-complete set in polynomial time!!  Huge ramifications for cryptography, others If P ≠NP, then  Other NP-Complete  Traveling salesman who needs most efficient route to visit all cities and return home  3SAT The fundamental question. Is P = NP?en.wikipedia.org/wiki/P_%3D_NP_problem

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (10) Garcia, Fall 2011  Decision problems answer YES or NO for an infinite # of inputs  E.g., is N prime?  E.g., is sentence S grammatically correct?  An algorithm is a solution if it correctly answers YES/NO in a finite amount of time  A problem is decidable if it has a solution Problems NOT solvable Alan Turing He asked: “Are all problems decidable?” (people used to believe this was true) Turing proved it wasn’t for CS!

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (11) Garcia, Fall 2011  Given a program and some input, will that program eventually stop? (or will it loop)  Assume we could write it, then let’s prove a contradiction  1. write Stops on Self?  2. Write Weird  3. Call Weird on itself  Turing’s proof : The Halting Problem

UC Berkeley CS10 “The Beauty and Joy of Computing” : Limits of Computability (12) Garcia, Fall 2011  Complexity theory important part of CS  If given a hard problem, rather than try to solve it yourself, see if others have tried similar problems  If you don’t need an exact solution, many approximation algorithms help  Some not computable! Conclusion P=NP question even made its way into popular culture, here shown in the Simpsons 3D episode!