4-9问题的形式化描述.

Slides:



Advertisements
Similar presentations
Problems and Their Classes
Advertisements

Polynomial-time reductions We have seen several reductions:
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 class NP Section 7.3 Giorgi Japaridze Theory of Computability.
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
CPE702 Complexity Classes Pruet Boonma Department of Computer Engineering Chiang Mai University Based on Material by Jenny Walter.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
The Theory of NP-Completeness
NP-complete and NP-hard problems
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
KNAPSACK PROBLEM A dynamic approach. Knapsack Problem  Given a sack, able to hold K kg  Given a list of objects  Each has a weight and a value  Try.
Complexity Issues Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
Ref: Pfleeger96, Ch.31 NP-Complete Problems Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Computability and Complexity 17-1 Computability and Complexity Andrei Bulatov Strong NP-Completeness.
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,
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.
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.
The Complexity of Primality Testing. What is Primality Testing? Testing whether an integer is prime or not. – An integer p is prime if the only integers.
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.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
CS 345: Chapter 10 Parallelism, Concurrency, and Alternative Models Or, Getting Lots of Stuff Done at Once.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
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.
Computational Complexity Jang, HaYoung BioIntelligence Lab.
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.
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.
The Class NP Lecture 39 Section 7.3 Mon, Nov 26, 2007.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
04/04/13 Algorithms and NP Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1.
Nicholas Bulinski.  Informally it is the question of if a computer can quickly verify that a solution to a problem is true then can the computer solve.
“One ring to rule them all” Analogy (sort of) Lord of The Rings Computational Complexity “One problem to solve them all” “my preciousss…”
The Multicommodity Flow Problem Updated 21 April 2008.
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.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
Instructor: Dr. GautamDas February 24, 2009 Class notes by Ranganath M R.
Copyright © 2014 Curt Hill Algorithm Analysis How Do We Determine the Complexity of Algorithms.
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
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.
The Theory of NP-Completeness
Complexity Classes.
Data Structures and Algorithm Analysis Lecture 24
8.1 Determine whether the following statements are correct or not
Chapter 10 NP-Complete Problems.
8.2 – Strong NP Completeness
Hard Problems Some problems are hard to solve.
Intro to Theory of Computation
Computability and Complexity
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
MCA 301: Design and Analysis of Algorithms
Approximation Algorithms
1. for (i=0; i < n; i+=2) if (A[i] > A[i+1]) swap(A[i], A[i+1])
Polynomial time approximation scheme
NP-Complete Problems.
Instructor Neelima Gupta
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 Lecture #43 Dr.Sohail Aslam.
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Alex Bolsoy, Jonathan Suggs, Casey Wenner
Presentation transcript:

4-9问题的形式化描述

? Multiple choices: 如果是稀疏矩阵呢? 1 3 2 4 Encode: 00=‘0’, 01=‘1’,10=‘#’ 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 0 0100 0011 1000 1000 0100#0011#1000#1000 0011 1000 0100 0100 00010000𝟏𝟎00000101𝟏𝟎01000000𝟏𝟎01000000 0000 1101 0110 0000 … 4#0100#0011#1000#1000 100#0100#0011#1000#1000 010000𝟏𝟎00010000𝟏𝟎00000101𝟏𝟎01000000𝟏𝟎01000000 0 0 −1 −2 4 0 0 0 0 2 0 0 0 1 0 0 4#0400#0021#−1000#−2000 ? 4#0#4#0#0#0#0#2#1#−1#0#0#0#−2#0#0#0 ❶:11=‘-’ ❷:在所有权重前添加一位符号位,00=‘0’正,01=‘1’负 如果是稀疏矩阵呢? 进一步压缩:4#0#4##0#0#2#1##−1##−2##

此时(在一定程度上)可以不用纠结于如何编码!而直接关注与问题本身! Certificate:𝑐∈ 𝑎∈ 0,1 ∗ | 𝑎 𝑖𝑠 𝑎 𝑠𝑒𝑞𝑢𝑒𝑛𝑐𝑒 𝑜𝑓 𝑣𝑒𝑟𝑡𝑖𝑐𝑠 𝑣 0 , 𝑣 1 ,…, 𝑣 𝑘 , 𝑣 𝑖 ∈𝜔.𝑉 验证过程: 令n= 𝜔.𝑉 Check 𝑘=𝑛−1? If not return false; Check 𝑣 𝑖 ≠ 𝑣 𝑗 ?𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖,𝑗∈0,1,…,𝑛−1,𝑖≠𝑗 . If not return false; If 𝜔.𝑉 >1, check (𝑣 𝑖 , 𝑣 𝑖+1 %𝑛 )∈𝜔.𝑉?If not return false; Return true;

Source: http://courses.csail.mit.edu/6.890/fall14/scribe/lec4.pdf

Pseudo-polynomial time In computational complexity theory, a numeric algorithm runs in pseudo-polynomial time if its running time is polynomial in the numeric value of the input, but is exponential in the length of the input – the number of bits required to represent it. Integer-valued Problems:algorithmic problems whose inputs can be viewed as a collection of integers. In what follows we fix the coding of inputs to words over {0, 1, #}, |x|:the length of the input Max numeric value

Pseudo-polynomial time https://en.wikipedia.org/wiki/Pseudo-polynomial_time

Pseudo-polynomial time An NP-complete problem with known pseudo- polynomial time algorithms is called weakly NP- complete. 0-1 Knapsack problem is weakly NP-complete can be solved by a dynamic programming  algorithm An NP-complete problem is called strongly NP- complete if it is proven that it cannot be solved by a pseudo-polynomial time algorithm unless P=NP.  bin packing is strongly NP-complete  https://en.wikipedia.org/wiki/Pseudo-polynomial_time https://en.wikipedia.org/wiki/Weak_NP-completeness https://en.wikipedia.org/wiki/Strong_NP-completeness