Algorithms and Data Review Fall 2010 Karl Lieberherr 1CS 4800 Fall 201012/7/2010.

Slides:



Advertisements
Similar presentations
Algorithm Design Methods (I) Fall 2003 CSE, POSTECH.
Advertisements

Algorithm Design Methods Spring 2007 CSE, POSTECH.
Scientific Community Game Karl Lieberherr 4/29/20151SCG.
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.
The Theory of NP-Completeness
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Graphs 4/16/2017 8:41 PM NP-Completeness.
88- 1 Chapter 8 The Theory of NP-Completeness P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class.
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
T Ball (1 Relation) What Your Robots Do Karl Lieberherr CSU 670 Spring 2009.
SCG Example Labs Ahmed Abdelmeged Karl Lieberherr.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Poster Design & Printing by Genigraphics ® The Scientific Community Game Education and Innovation Through Survival in a Virtual World of.
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:
Bold Stroke January 13, 2003 Advanced Algorithms CS 539/441 OR In Search Of Efficient General Solutions Joe Hoffert
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.
The Scientific Community Game for STEM Innovation and Education (STEM: Science, Technology, Engineering and Mathematics) Karl Lieberherr Ahmed Abdelmeged.
Lecture 22 More NPC problems
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
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.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 28, 2014.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
The Scientific Community Game Education and Innovation Through Survival in a Virtual World of Claims Karl Lieberherr Northeastern University College of.
SCG layers or SCG stages Karl and Yue. Layers of Constraints We can look at the process of game design as a successive layering of constraints on a game.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
MSD 2011 Midterm Karl Lieberherr 3/28/20111MSD midterm.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Design and Analysis of Algorithms - Chapter 101 Our old list of problems b Sorting b Searching b Shortest paths in a graph b Minimum spanning tree b Primality.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
The Algorithms we use to learn about Algorithms Karl Lieberherr Ahmed Abdelmeged 3/16/20111Open House 2011.
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.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
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.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
PhD March The Evergreen Project: How To Learn From Mistakes Caused by Blurry Vision in MAX-CSP Solving Karl J. Lieberherr Northeastern University.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
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.
The Theory of NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
P & NP.
Algorithm Design Methods
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
The Scientific Community Game for STEM Innovation and Education
Hard Problems Introduction to NP
NP-Completeness Yin Tat Lee
Intro to Theory of Computation
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Principles of Computing – UFCFA3-30-1
Richard Anderson Lecture 30 NP-Completeness
Chapter 11 Limitations of Algorithm Power
CS 3343: Analysis of Algorithms
NP-Completeness Yin Tat Lee
Algorithm Design Methods
Algorithm Design Methods
Dichotomies in CSP Karl Lieberherr inspired by the paper:
Our old list of problems
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Karl Lieberherr Ahmed Abdelmeged
Algorithm Design Methods
Presentation transcript:

Algorithms and Data Review Fall 2010 Karl Lieberherr 1CS 4800 Fall /7/2010

Problem Solving Polya: How to Solve It 2CS 4800 Fall /7/2010

Algorithmic Patterns Greedy Divide and Conquer Dynamic Programming Network Flow Intractability: Reductions and characterization of NP 3CS 4800 Fall /7/2010

Algorithmic thinking Making claims about algorithms Choosing from a predefined set of claims – claims that are refuted – claims that are defended Used: Scientific Community Game for Algorithmic domains – make learning interactive and second order – students who are better at the game are better at algorithms 12/7/2010CS 4800 Fall 20104

Summary of SCG Definitions Domain Problem Solution valid(Problem, Solution) quality(Problem, Solution) → [0,1] 5CS 4800 Fall 2010 Claim(Domain) Problems: PowerSet(Domain.Problem) q: Quality = [0,1] r: Resource = N + Rules of the Scientific Community: propose and oppose, be an active scholar, rules for reputation accumulation. Tournaments 12/7/2010

Formal: HSR Domain: – Problem: (n,k), k <= n. – Solution: Decision tree to determine highest safe rung. – quality(problem, solution): depth of decision tree / number of rungs – valid(problem, solution): at most k left branches,... 6CS 4800 Fall /7/2010

Formal: HSR Claim(Domain): – Alice claims ({(25,2)},9/25,5 seconds) {(25,2)}: set of problems (singleton) 9/25: quality 5 seconds: resource Refutation Protocol: – Bob refutes: only one problem: (25,2) – Alice: solves problem by providing decision tree t. – predicate: t is a valid decision tree for (25,2) of depth 9 CS 4800 Fall /7/2010

Protocol variations Example: Independent Set Domain – Problem: Directed graph G=(V,E) – Solution: V’ subset of V Claim – Problems: all directed graphs with < 10^6 nodes – quality: |V’|/|V| Protocol – Alice to Admin: G, AlgA(G) – Admin to Bob: G – Bob to Admin: AlgB(G) – Admin to both: AlgB(G), r[G,AlgB(G),AlgA(G)] 12/7/2010CS 4800 Fall Alice claims that her algorithm finds a solution at least as good as Bob’s.

Protocol variations Example: Knapsack Domain – Problem: Knapsack problem K(n,Items(Weights,Values),W) – Solution: subset of Items Claim – Problems: all knapsack problems with W < 10^3 – quality: |V’|/|V| Protocol – Alice to Admin: K, AlgA(K) – Admin to Bob: K – Bob to Admin: AlgB(K) including AlgB(K).resource – Admin to both: AlgB(K) including AlgB(K).resource, r[K,AlgB(K),AlgA(K)] 12/7/2010CS 4800 Fall Alice claims that her algorithm finds a solution at least as good as Bob’s and using fewer resources.

Languages for expressing algorithms Decision trees Finite state machines Pseudo code Programming languages 10CS 4800 Fall /7/2010

Prove properties about algorithm Find an invariant of the algorithm that helps to prove what you want. Example: Ford-Fulkerson Dynamic Programming: formulate recurrence for optimal solution in terms of optimal solutions for sub problems. Formulate algorithm so that it is easier to prove its correctness. 11CS 4800 Fall /7/2010

Intractability Problems that don’t have an algorithmic solution. E.g. is grammar ambiguous? Problems that don’t have an efficient algorithmic solution, e.g., NP-complete problems. Reduction: Y <= X : Y is reducible to X, Y reduces to X: an algorithm for X implies an algorithm for Y Polynomial Reduction: Y <=p X: a polynomial algorithm for X implies a polynomial algorithm for Y. 12CS 4800 Fall /7/2010

NP-complete Problem X 1.X in NP 2.for all Y in NP, Y <=p X. Every problem in NP can be reduced to X. Circuit Satisfiability is NP-complete. 13CS 4800 Fall /7/2010

More NP-complete problems If Y is NP-complete and X is in NP with the property that Y <=p X, then X is NP-complete. 14CS 4800 Fall /7/2010

Strategy for proving problem X to be NP-complete Prove that X in NP. Choose a problem Y that is NP-complete. Prove that Y <=p X. Cook and Karp (translation) reductions (page 473) Example of Cook reduction: search (FSAT) reduces to decision (SAT) 15CS 4800 Fall /7/2010

Interview question Given a set S and a predicate pred defined on subsets of S, find a subset ss of S satisfying pred. – Example pred: false on all subsets not having 3 elements. For 3 element subsets pred({a,b,c}) iff a+b+c=0. 16CS 4800 Fall /7/2010

Order Statistics Given a sequence of n numbers, find the kth largest element. O(n*log(n)) O(n*log(k)) O(n): median of the median 17CS 4800 Fall /7/2010

Expected number of satisfied constraints under random assignment Maximum Satisfiability Maximum Boolean CSP 18CS 4800 Fall /7/2010

Problem Snapshot Boolean CSP: constraint satisfaction problem – Each constraint uses a Boolean relation. – e.g. a Boolean relation 1in3(x y z) is satisfied iff exactly one of its parameters is true. Boolean MAX-CSP a multi-set of constraints. Maximize satisfied fraction. 19CS 4800 Fall /7/2010

3p(1-p) 2 for MAX-CSP({22}) 20CS 4800 Fall /7/2010

all the look-ahead polynomials for T Ball 21CS 4800 Fall /7/2010