What is the computational cost of automating brilliance or serendipity? (Computational complexity & P vs NP) COS 116, Spring 2012 Adam Finkelstein.

Slides:



Advertisements
Similar presentations
P, NP, NP-Complete Problems
Advertisements

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.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
The Theory of NP-Completeness
CPE702 Complexity Classes Pruet Boonma Department of Computer Engineering Chiang Mai University Based on Material by Jenny Walter.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Great Theoretical Ideas in Computer Science for Some.
CSE373: Data Structures & Algorithms Lecture 24: The P vs. NP question, NP-Completeness Nicki Dell Spring 2014 CSE 373 Algorithms and Data Structures 1.
What is the computational cost of automating brilliance or serendipity? (Computational complexity and P vs NP question) COS 116: 4/12/11 Sanjeev Arora.
Discrete Structures & Algorithms The P vs. NP Question EECE 320.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Computational Complexity CSC 172 SPRING 2002 LECTURE 27.
Analysis of Algorithms CS 477/677
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Complexity Theory: The P vs NP question Lecture 28 (Dec 4, 2007)
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,
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.
Difficult Problems. Polynomial-time algorithms A polynomial-time algorithm is an algorithm whose running time is O(f(n)), where f(n) is a polynomial A.
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.
FACULTY OF ENGINEERING & INFORMATION TECHNOLOGIES P, NP, and Complexity Six fundamental facts One rule of thumb Three fundamental notions One fundamental.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
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.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
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.
More Computational Complexity Shirley Moore CS4390/5390 Fall August 29,
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
COMPSCI 102 Introduction to Discrete Mathematics.
Cliff Shaffer Computer Science Computational Complexity.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
COMPSCI 102 Introduction to Discrete Mathematics.
CSE373: Data Structures & Algorithms Lecture 22: The P vs. NP question, NP-Completeness Lauren Milne Summer 2015.
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.
Beauty and Joy of Computing Limits of Computing Ivona Bezáková CS10: UC Berkeley, April 14, 2014 (Slides inspired by Dan Garcia’s slides.)
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.
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.
2101INT – Principles of Intelligence Systems Lecture 3.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
Evolutionary Computing Chapter 1. / 20 Chapter 1: Problems to be solved Problems can be classified in different ways: Black box model Search problems.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
CS 154 Formal Languages and Computability May 10 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
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.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
NP-completeness Ch.34.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Great Theoretical Ideas in Computer Science
Unsolvable Problems December 4, 2017.
Richard Anderson Lecture 25 NP-Completeness
Computational Complexity
Chapter 11 Limitations of Algorithm Power
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Presentation transcript:

What is the computational cost of automating brilliance or serendipity? (Computational complexity & P vs NP) COS 116, Spring 2012 Adam Finkelstein

Combination lock Why is it secure? (Assume it cannot be picked) Ans: Combination has 3 numbers 0-39… thief must try 40 3 = 64,000 combinations

Boolean satisfiability Does it have a satisfying assignment? What if instead we had 100 variables? 1000 variables? How long will it take to determine the assignment? (A + B + C) · (D + F + G) · (A + G + K) · (B + P + Z) · (C + U + X)

Exponential running time 2 n time to solve problems of “size” n Main fact to remember: For case of n = 300, 2 n > number of atoms in the visible universe. Increase n by 1  running time doubles!

Discussion Is there an inherent difference between being creative / brilliant and being able to appreciate creativity / brilliance? What is a computational analogue of this phenomenon?

A Proposal Brilliance = Ability to find “needle in a haystack” Comments?? Beethoven found “satisfying assignments” to our neural circuits for music appreciation

There are many computational problems where finding a solution is equivalent to “finding a needle in a haystack”….

CLIQUE Problem CLIQUE: Group of students, every pair of whom are friends In this social network, is there a CLIQUE with 5 or more students? What is a good algorithm for detecting cliques? How does efficiency depend on network size and desired clique size?

Rumor mill problem Social network at PU Each node represents a student Two nodes connected by edge if those students are friends Samantha starts a rumor Will it reach Thomas? Suggest an algorithm How does running time depend on network size? Internet servers solve this problem all the time (last lecture).

Exhaustive Search / Combinatorial Explosion Naïve algorithms for many “needle in a haystack” tasks involve checking all possible answers  exponential running time. Ubiquitous in the computational universe Can we design smarter algorithms (as for “Rumor Mill”)? Say, n 2 running time.

Harmonious Dorm Floor Given: Social network involving n students. Edges correspond to pairs of students who don't get along. Decide if there is a set of k students who would make a harmonious group (everybody gets along). Just the Clique problem in disguise!

Traveling Salesman Problem (aka UPS Truck problem) Input: n points and all pairwise inter-point distances, and a distance k Decide: is there a path that visits all the points (“salesman tour”) whose total length is at most k?

Finals scheduling Input: n students, k classes, enrollment lists, m time slots in which to schedule finals Define “conflict”: a student is in two classes that have finals in the same time slot Decide: If schedule with at most 100 conflicts exists?

The P vs NP Question P: problems for which solutions can be found in polynomial time (n c where c is a fixed integer and n is “input size”). Example: Rumor Mill NP: problems where a good solution can be checked in n c time. Examples: Boolean Satisfiability, Traveling Salesman, Clique, Finals Scheduling Question: Is P = NP? “Can we automate brilliance?” (Note: Choice of computational model --- Turing-Post, pseudocode, C++ etc. --- irrelevant.)

NP-complete Problems Problems in NP that are “the hardest”  If they are in P then so is every NP problem. Examples: Boolean Satisfiability, Traveling Salesman, Clique, Finals Scheduling, 1000s of others How could we possibly prove these problems are “the hardest”?

“Reduction” “If you give me a place to stand, I will move the earth.” – Archimedes (~ 250BC) “If you give me a polynomial-time algorithm for Boolean Satisfiability, I will give you a polynomial-time algorithm for every NP problem.” --- Cook, Levin (1971) “Every NP problem is a satisfiability problem in disguise.”

Dealing with NP-complete problems 1. Heuristics (algorithms that produce reasonable solutions in practice) 2. Approximation algorithms (compute provably near-optimal solutions)

Computational Complexity Theory: Study of Computationally Difficult problems. Study matter  look at mass, charge, etc. Study processes  look at computational difficulty A new lens on the world?

Example 1: Economics General equilibrium theory: Input: n agents, each has some initial endowment (goods, money, etc.) and preference function General equilibrium: system of prices such that for every good, demand = supply. Equilibrium exists [Arrow-Debreu, 1954]. Economists assume markets find it (“invisible hand”) But, no known efficient algorithm to compute it. How does the market compute it?

Example 2: Factoring problem Given a number n, find two numbers p, q (neither of which is 1) such that n = p x q. Any suggestions how to solve it? Fact: This problem is believed to be hard. It is the basis of much of cryptography. (More next time.)

Example 3: Quantum Computation Central tenet of quantum mechanics: when a particle goes from A to B, it takes all possible paths all at the same time [Shor'97] Can use quantum behavior to efficiently factor integers (and break cryptosystems!) Can quantum computers be built, or is quantum mechanics not a correct description of the world? A B Peter Shor

Example 4: Artificial Intelligence What is computational complexity of language recognition? Chess playing? Etc. etc. Potential way to show the brain is not a computer: Show it routinely solves some problem that provably takes exponential time on computers.

Why is P vs NP a Million-dollar open problem? If P = NP then Brilliance becomes routine (best schedule, best route, best design, best math proof, etc…) If P  NP then we know something new and fundamental not just about computers but about the world (akin to “Nothing travels faster than light”).

Next time: Cryptography (practical use of computational complexity)