Agenda Blog signup… First week impressions – High School vs. University.. Career Night CS outcomes Complexity.

Slides:



Advertisements
Similar presentations
Complexity. P=NP? Who knows? Who cares? Lets revisit some questions from last time – How many pairwise comparisons do I need to do to check if a sequence.
Advertisements

CS211 Problems: unsolvable, unfeasible and unsolved Topic 3: P and NP.
Agenda Blog signup… First week impressions – High School vs. University.. Career Night – Sep 12 th (Wed) CS outcomes Complexity.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CS420 lecture one Problems, algorithms, decidability, tractability.
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Computational problems, algorithms, runtime, hardness
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
The Brick Wall: NP-Completeness Christopher King Joshua Greenspan.
Humans, Computers, and Computational Complexity J. Winters Brock Nathan Kaplan Jason Thompson.
The Theory of NP-Completeness
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
1 Discrete Structures CS 280 Example application of probability: MAX 3-SAT.
If a sparse, NP-Complete language exists => P = NP Let S be a sparse NP-Complete language Define C(n) = |S ≤n | and C a (n) = |S ≤p a (n) | Define p ℓ.
Chapter 11: Limitations of Algorithmic Power
NP-complete and NP-hard problems. Decision problems vs. optimization problems The problems we are trying to solve are basically of two kinds. In decision.
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.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Computability and Modeling Computation What are some really impressive things that computers can do? –Land the space shuttle (and other aircraft) from.
CSCE350 Algorithms and Data Structure
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.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
1 1. Draw the machine schema for a TM which when started with input 001 halts with abbb on the tape in our standard input format. 2. Suppose you have an.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
CSC 413/513: Intro to Algorithms NP Completeness.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
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.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Tyler Robison Summer
NP-complete Problems Prof. Sin-Min Lee Department of Computer Science.
NP-Complete Problems Algorithm : Design & Analysis [23]
2101INT – Principles of Intelligence Systems Lecture 3.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
David Evans Class 15: P vs. NP (Smiley Puzzles and Curing Cancer) CS150: Computer Science University of Virginia Computer.
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
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.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 23: Intractable Problems (Smiley Puzzles.
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.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
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.
ASU 101: The ASU Experience Computer Science Perspective
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
NP-Completeness Lecture for CS 302.
Presentation transcript:

Agenda Blog signup… First week impressions – High School vs. University.. Career Night CS outcomes Complexity

First Week Impressions? How was your first week at ASU? Good things? Frustrating things? Differences from High School?

Mark your calendars for a special evening event (approx. 5:30-8:00PM) in the Memorial Union (on ASU Tempe Campus) At the event, you will have the opportunity to talk to working engineers from a variety of industries and companies, to find out more about engineering careers. You will have the chance to ask them anything you want to know about including what it’s like to be an engineer, or what you need to do to be successful. Attendance will be taken; – there will be no class that week (no class on 9 th September) More information to come later Career Exploration Night Thursday September 8th

“Algorithms and Complexity”

Sorting… When is a sequence in sorted order? – How many pairwise comparisons do I need to do to check if a sequence of n-numbers is sorted? – If I have a procedure for checking whether a sequence is sorted, is it reasonable to sort a sequence of numbers by generating permutations and testing if any of them are sorted? Intelligence is putting the “test” part of Generate&Test into generate part…

Exactly when do we say an algorithm is “slow”? We kind of felt that O(N! * N) is a bit much complexity How about O(N 2 )? O(N 10 )? Where do we draw the line? – Meet the Computer Scientist Nightmare – So “Polynomial” ~ “easy” & “exponential” ~ “hard” – 2 n eventually overtakes any n k however large k is.. How do we know if a problem is “really” hard to solve or it is just that I am dumb and didn’t know how to do better? – If checking the correctness of the solution itself takes more than polynomial time, then we know the problem must be hard.. – But there are many problems, for which checking the correctness is polynomial, and yet we don’t know any efficient algorithm 2n2n

Tower of Hanoi (or Brahma) Shift the disks from the left peg to the right peg – You can lift one disk at a time – You can use the middle peg to “park” disks – You can never ever have a larger disk on top of a smaller disk (or KABOOM) How many moves to solve a 2-disk version? A 3-disk one? An n-disk one? – How long does it take (in terms of input size), to check if you have a correct solution?

Career Exploration Night Experience Topics for Group Discussion: – Share the majors, job titles, and companies of the individuals you met. – What was the most important thing you learned about engineering? Most surprising? Most interesting? – What kind of projects/work activities were mentioned? – What differences did you find between “real people” and what you had read beforehand? Similarities? – What was the best advice that you received?

Discussion Highlights (Group reporting) What was the most important thing you learned? – Most surprising? – Most interesting? Major differences/similarities between information from ‘real people’ and information you read? Types of projects/work activities? Did you see different job functions within a single discipline (or similar job functions across multiple disciplines)? What was the best advice that you received?

Company Requires Or DesiresMy QualificationDifference Between The Two What I Am Going To Do To Make Up The Difference or Gain a Measurable Accomplishment Job Title: ___________________________ Page # ______

Classes P and NP Class P If a problem can be solved in time polynomial in the size of the input it is considered an “easy” problem – Note that your failure to solve a problem in polynomial time doesn’t mean it is not polynomial (you could come up with O(N* N!) algorithm for sorting, after all Class NP Technically “if a problem can be solved in polynomial time by a non-deterministic turing machine, then it is in class NP” Informally, if you can check the correctness of a solution in polynomial time, then it is in class NP – Are there problems where even checking the solution is hard?

How to explain to your boss as to why your program is so slow… I can't find an efficient algorithm, I guess I'm just too dumb. I can't find an efficient algorithm, because no such algorithm is possible. I can't find an efficient algorithm, but neither can all these famous people.

The P=NP question Clearly, all polynomial problems are also NP problems Do we know for sure that there are NP problems that are not polynomial? If we assume this, then we are assuming P != NP If P = NP, then some smarter person can still solve a problem that we thought can’t be solved in polytime – Can imply more than a loss of face… For example, factorization is known to be an NP-Complete problem; and forms the basis for all of cryptography.. If P=NP, then all the cryptography standards can be broken! NP-Complete: “hardest” problems in class NP [the giants of NP-world] EVERY problem in class NP can be reduced to an NP-Complete problem in polynomial time --So you can solve that problem by using an algorithm that solves the NP-complete problem

Reducing Problems… Mathematician reduces “mattress on fire” problem Make Rao Happy Make Everyone in ASU Happy Make Little Tommy Happy Make his entire family happy General NP- problem Boolean Satisfiability Problem 3-SAT

Academic Integrity What it means Typical ASU policy – Homeworks – Exams Take-Home Exams – Term papers

Scholarship Opportunities General Scholarships The FURI program NSF REU program

Is exponential complexity the worst? After all, we can have 2 2 More fundamental question: Can every computational problem be solved in finite time? “Decidability” --Unfortunately not guaranteed  [and Hilbert turns in his grave] 2n2n

Some Decidability Challenges In First Order Logic, inference (proving theorems) is semi-decidable – If the theorem is true, you can show that in finite time; if it is false you may never be able to show it In First Order Logic + Peano Arithmatic, inference is undecidable – There may be theorems that are true but you can’t prove them [Godel]

Practical Implications of Intractability A class of problems is said to be NP-hard as long as the class contains at least one instance that will take exponential time.. What if 99% of the instances are actually easy to solved? --Where then are the wild things?

Satisfiability problem Given a set of propositions P 1 P 2 … P n..and a set of “clauses” that the propositions must satisfy – Clauses are of the form P 1 V P 7 VP 9 V P 12 V ~P 35 – Size of a clause is the number of propositions it mentions; size can be anywhere from 1 to n Find a T/F assignment to the propositions that respects all clauses Is it in class NP? How many “potential” solutions? Canonical NP-Complete Problem. 3-SAT is where all clauses are of length 3

Example of a SAT problem P,Q,R are propositions Clauses – P V ~Q V R – Q V ~R V ~P Is P=False, Q=True, R=False as solution? Is Boolean SAT in NP?

Hardness of 3-sat as a function of #clauses/#variables #clauses/#variables Probability that there is a satisfying assignment Cost of solving (either by finding a solution or showing there ain’t one) p=0.5 You would expect this This is what happens! ~4.3 Phase Transition!

Phase Transition in SAT Theoretically we only know that phase transition ratio occurs between 3.26 and Experimentally, it seems to be close to 4.3 (We also have a proof that 3-SAT has sharp threshold)