Presentation is loading. Please wait.

Presentation is loading. Please wait.

I.5. Computational Complexity

Similar presentations


Presentation on theme: "I.5. Computational Complexity"โ€” Presentation transcript:

1 I.5. Computational Complexity
Nemhauser and Wolsey, p 114 - Ref: Computers and Intractability: A Guide to the Theory of NP-Completeness, M. Garey and D. Johnson, 1979, Freeman Purpose: classification of problems according to their difficulties ( polynomial time solvability). Many problems look similar, but have quite different complexity. e.g.) Shortest Path Problem (directed case with nonnegative arc weights, arbitrary arc weights. Undirected case.). Chinese Postman Problem ( graph undirected, directed, mixed) and TSP. Matching and Node Packing (Independent Set, Stable Set) in graphs. Spanning Tree, Steiner Tree. Uncapacitated Lot Sizing, Capacitated Lot Sizing. Uncapacitated Facility Location, Capacitated Facility Location. Integer Programming 2017

2 Mixed integer programming problem
max {๐‘๐‘ฅ+โ„Ž๐‘ฆ:๐ด๐‘ฅ+๐บ๐‘ฆโ‰ค๐‘, ๐‘ฅโˆˆ ๐‘ + ๐‘› , ๐‘ฆโˆˆ ๐‘… + ๐‘› } LP, IP are special cases of MIP, hence MIP is at least as hard as IP and LP. See Fig 1.1 (P116, NW) for classification of problems Note that the problems in the figure may have a little bit different meaning from earlier definitions. Observations If MIP easy, then LP, IP easy If LP and/or IP hard, then MIP hard If MIP hard, but LP and/or IP may be easy. Integer Programming 2017

3 2.Measuring alg efficiency and prob complexity
Def: problem instance: specified by assigning data to problem parameters size of a problem: length of information to represent the problem in binary alphabet. ( 2 ๐‘› โ‰ค๐‘ฅ< 2 ๐‘›+1 and ๐‘ฅ positive integer, then ๐‘ฅ= ๐‘–=0 ๐‘› ๐›ฟ ๐‘– 2 ๐‘– , ๐›ฟ ๐‘– โˆˆ{0,1} represent rational number by two integers, incidence (characteristic) vectors for sets, node-edge incidence matrix, adjacency matrix for graphs, Only compact representation acceptable, e. g. TSP ) Integer Programming 2017

4 Running time of algorithm :
Arithmetic model: assume each instruction takes unit time Bit model: each instruction on single bit takes unit time Use a simple majorizing function to represent the asymptotic behavior of the running time with respect to the size of the problem. Worst-case view point. Advantage: 1. absolute guarantee 2. make no assumption on distribution of data 3. easier to analyze Disadvantage: very conservative estimate (e.g. simplex method for LP) Algorithm is said to be polynomial time algorithm if ๐‘“ ๐‘˜ =๐‘‚( ๐‘˜ ๐‘ ) for some fixed ๐‘. (๐‘“(๐‘˜) is ๐‘‚ ๐‘”(๐‘˜) if โˆƒ a positive constant ๐‘ and a positive integer ๐‘˜โ€ฒ such that ๐‘“(๐‘˜)โ‰ค๐‘๐‘”(๐‘˜) for all integers ๐‘˜โ‰ฅ๐‘˜โ€ฒ. ) Integer Programming 2017

5 Note Size of data must be considered: ( ๐‘‚(๐‘›๐‘) dynamic programming algorithm for knapsack problem is not polynomial time algorithm since ๐‘= 2 log 2 ๐‘ which is not polynomial in log 2 ๐‘ . ) (unary encoding not allowed) Size of the numbers during computation must remain polynomially bounded of the input data ( ๐œƒ ) ( length of the encoding of the numbers must remain polynomial of log ๐œƒ , e.g. ellipsoid method for LP needs to compute square root. ) Def: P is the class of problems that can be solved in polynomial time ( more precisely, the feasibility problem form of the problem ) Integer Programming 2017

6 3. Some Problems Solvable in Polynomial Time
Problems in P Shortest path problem with nonnegative arc weights (Dijkstraโ€™s alg., ๐‘‚( ๐‘š 2 )) Solving linear equations Transportation problem ( using scaling of data, polynomial in log ๐œƒ ) (For general network flow problem, Tardos found strongly polynomial time algorithm (algorithm such that the running time is polynomial in problem parameter (e.g. ๐‘š,๐‘› ), but independent of data size ) The linear programming problem ( ellipsoid method, interior point methods ) Integer Programming 2017

7 Certificate of optimality
Information that can be used to check optimality of a solution in polynomial time. (length of the encoding of information must be polynomially bounded of the length of the input.) Problem in ๐‘ƒ โŸน โˆƒ certificate of optimality ( problem itself, use the poly time algorithm to verify the optimality) โˆƒ certificate of optimality โŸน (likely that) problem is in ๐‘ƒ Integer Programming 2017

8 LP : ๐œƒ ๐ด = max ๐‘–,๐‘— ๐‘Ž ๐‘–๐‘— , ๐œƒ ๐‘ = max ๐‘– ๐‘ ๐‘– , ๐œƒ=maxโก( ๐œƒ ๐ด , ๐œƒ ๐‘ )
Then certificate of optimality for LP is primal, dual basic feasible solution. Size of certificate is polynomially bounded? Prop 3.1: ๐‘ฅ 0 , ๐‘Ÿ 0 : extreme point and extreme ray of ๐‘ƒ= ๐‘ฅโˆˆ ๐‘… + ๐‘› : ๐ด๐‘ฅโ‰ค๐‘ , ๐ด,๐‘: integral, A is ๐‘šร—๐‘›. Then, for ๐‘—=1,โ€ฆ,๐‘› i) ๐‘ฅ ๐‘— 0 = ๐‘ ๐‘— ๐‘ž , 0โ‰ค ๐‘ ๐‘— <๐‘› ๐œƒ ๐‘ ๐‘› ๐œƒ ๐ด ๐‘›โˆ’1 , 1โ‰ค๐‘ž< (๐‘› ๐œƒ ๐ด ) ๐‘› ii) ๐‘Ÿ ๐‘— 0 = ๐‘ ๐‘— ๐‘ž , 0โ‰ค ๐‘ ๐‘— < ๐‘›โˆ’1 ๐œƒ ๐ด ๐‘›โˆ’1 , 1โ‰ค๐‘ž< ( ๐‘›โˆ’1 ๐œƒ ๐ด ) ๐‘› Pf) (i) extreme point of ๐‘ƒ is a solution of ๐ด โ€ฒ ๐‘ฅ= ๐‘ โ€ฒ , where ๐ดโ€ฒ is ๐‘›ร—๐‘› and nonsingular. From Cramerโ€™s rule, ๐‘ฅ ๐‘— = ๐‘ ๐‘— /๐‘ž ( ๐‘ž: determinant of ๐ด โ€ฒ , ๐‘ ๐‘— : det of matrix obtained by replacing ๐‘—โˆ’th column of ๐ดโ€ฒ by ๐‘โ€ฒ). Number of terms in det is ๐‘›! ( < ๐‘› ๐‘› ), hence 1โ‰ค๐‘ž< (๐‘› ๐œƒ ๐ด ) ๐‘› and 0โ‰ค ๐‘ ๐‘— <๐‘› ๐œƒ ๐‘ ๐‘› ๐œƒ ๐ด ๐‘›โˆ’1 . (ii) ๐‘Ÿ 0 is determined by ๐‘›โˆ’1 equations. ( ๐‘Ž ๐‘– ๐‘ฅ=0 or ๐‘ฅ ๐‘— =0 ) Integer Programming 2017

9 Number of digits to represent ๐‘ฅ 0 =2๐‘› log (๐‘›๐œƒ) ๐‘› =2 ๐‘› 2 log (๐‘›๐œƒ) ~ polynomial function of log ๏ฑ. ๏‚ฎ short proof Above result indicates that we can solve any LP as problem on polytope ๐‘ƒ โ€ฒ ={๐‘ฅโˆˆ ๐‘… + ๐‘› :๐ด๐‘ฅโ‰ค๐‘, ๐‘ฅโ‰ค ๐‘›๐œƒ ๐‘› } ( used in ellipsoid algorithm for LP ) Integer Programming 2017

10 Certificate of optimality for matching problem (IP problem) :
๐บ=(๐‘‰,๐ธ) with ๐‘š nodes and ๐‘› edges max ๐‘’โˆˆ๐ธ ๐‘ ๐‘’ ๐‘ฅ ๐‘’ ๐‘’โˆˆ๐›ฟ({๐‘–}) ๐‘ฅ ๐‘’ โ‰ค1 for ๐‘–โˆˆ๐‘‰ ๐‘ฅโˆˆ ๐‘ + ๐ธ add odd set constraints: ๐‘’โˆˆ๐ธ(๐‘ˆ) ๐‘ฅ ๐‘’ โ‰ค( ๐‘ˆ โˆ’1)/2 for all ๐‘ˆโŠ†๐‘‰, |๐‘ˆ|โ‰ฅ3 and odd extreme points of LP relaxation are incidence vectors of matchings. But canโ€™t use polynomial solvability of LP directly (number of constraints exponential in the size of data) However, certificate of optimality exists. Choose constraints that correspond to positive dual variables in optimal solution. (basic dual solution has no more than ๐‘› positive variables) Note that we do not need to check the odd set constraints for violation once a matching solution is given. Integer Programming 2017

11 4. Remarks on 0-1 and Pure-Integer Prog.
Consider the running time for IP (brute force enumeration) and bounds on the size of solutions. 0-1 integer: total enumeration takes ๐‘‚( 2 ๐‘› ๐‘š๐‘›) some subclass solvable in polynomial time Integer knapsack : ๐‘‚(๐‘›๐‘) dynamic programming algorithm. Pure integer: Let ๐‘ƒ={๐‘ฅโˆˆ ๐‘… + ๐‘› :๐ด๐‘ฅโ‰ค๐‘} P bounded ๏‚ฎ ๐‘ฅ ๐‘— โ‰ค (๐‘›๐œƒ) ๐‘› ๏‚ฎ total enumeration P unbounded? Integer Programming 2017

12 Thm 4.1: ๐‘ฅ 0 extreme point of conv(๐‘†), ๐‘†=๐‘ƒโˆฉ ๐‘ ๐‘› , then
๐‘ฅ ๐‘— 0 โ‰ค ( ๐‘š+๐‘› ๐‘›๐œƒ) ๐‘› Pf) From Thm 6.1, 6.2 of section I.4.6 (p104), conv ๐‘† ={๐‘ฅโˆˆ ๐‘… + ๐‘› :๐‘ฅ= ๐‘™โˆˆ๐ฟ ๐›ผ ๐‘™ ๐‘ž ๐‘™ + ๐‘—โˆˆ๐ฝ ๐œ‡ ๐‘— ๐‘Ÿ ๐‘— , ๐‘™โˆˆ๐ฟ ๐›ผ ๐‘™ =1, ๐›ผโˆˆ ๐‘… + ๐ฟ , ๐œ‡โˆˆ ๐‘… + ๐ฝ } , where ๐‘ž ๐‘™ , ๐‘Ÿ ๐‘— โˆˆ ๐‘ + ๐‘› for ๐‘™โˆˆ๐ฟ and ๐‘—โˆˆ๐ฝ. ( integer ๐‘ฅ ๐‘– โˆˆ๐‘ƒ: ๐‘ฅ ๐‘– ={ ๐‘˜โˆˆ๐พ ๐œ† ๐‘˜ ๐‘ฅ ๐‘˜ + ๐‘—โˆˆ๐ฝ ( ๐œ‡ ๐‘— ๐‘– โˆ’ ๐œ‡ ๐‘— ๐‘– ) ๐‘Ÿ ๐‘— } +{ ๐‘—โˆˆ๐ฝ ๐œ‡ ๐‘— ๐‘– ๐‘Ÿ ๐‘— }, ๐‘˜โˆˆ๐พ ๐œ† ๐‘˜ =1, ๐œ† ๐‘˜ , ๐œ‡ ๐‘— โ‰ฅ0 for ๐‘˜โˆˆ๐พ, ๐‘—โˆˆ๐ฝ ) ( ๐‘†={๐‘ฅโˆˆ ๐‘… + ๐‘› :๐‘ฅ= ๐‘™โˆˆ๐ฟ ๐›ผ ๐‘™ ๐‘ž ๐‘™ + ๐‘—โˆˆ๐ฝ ๐›ฝ ๐‘— ๐‘Ÿ ๐‘— , ๐‘™โˆˆ๐ฟ ๐›ผ ๐‘™ =1, ๐›ผโˆˆ ๐‘ + ๐ฟ ,๐›ฝโˆˆ ๐‘ + ๐ฝ } ) Any extreme point of conv(๐‘†) must be one of the points { ๐‘ž ๐‘™ } ๐‘™โˆˆ๐ฟ , that is, any extreme point ๐‘ฅ 0 โˆˆ๐‘„, ๐‘„={๐‘ฅโˆˆ ๐‘ + ๐‘› :๐‘ฅ= ๐‘˜โˆˆ๐พ ๐œ† ๐‘˜ ๐‘ฅ ๐‘˜ + ๐‘—โˆˆ๐ฝ ๐œ‡ ๐‘— ๐‘Ÿ ๐‘— , ๐‘˜โˆˆ๐พ ๐œ† ๐‘˜ =1, ๐œ‡ 1 <1 ๐‘“๐‘œ๐‘Ÿ ๐‘—โˆˆ๐ฝ, ๐œ†โˆˆ ๐‘… + ๐พ , ๐œ‡โˆˆ ๐‘… + ๐ฝ }, where ๐‘ฅ ๐‘˜ ๐‘˜โˆˆ๐พ are extreme points and ๐‘Ÿ ๐‘— ๐‘—โˆˆ๐ฝ are extreme rays of P. Since ๐ฝ โ‰ค ๐‘š+๐‘› ๐‘›โˆ’1 , ๐‘ฅ ๐‘™ ๐‘˜ โ‰ค ๐‘›๐œƒ ๐‘› , and ๐‘Ÿ ๐‘™ ๐‘— โ‰ค ๐‘›๐œƒ ๐‘› , hence ๐‘ฅ ๐‘™ 0 โ‰ค ๐‘›๐œƒ ๐‘› 1+ ๐ฝ < ( ๐‘š+๐‘› ๐‘›๐œƒ) ๐‘› ๏‚œ Integer Programming 2017

13 Note that ( ๐‘š+๐‘› ๐‘›๐œƒ) ๐‘› โ‰ค 2 ๐‘› 2 ๐œƒ ๐‘› , where ๐‘› =maxโก(๐‘š,๐‘›)
Let ๐œ” ๐ด,๐‘ = (2 ๐‘› 2 ๐œƒ) ๐‘› ๏‚ฎ can give bounds ๐‘ฅ ๐‘— โ‰ค ๐œ” ๐ด,๐‘ ๏‚ฎ enumeration Now can use a technique to transform general IP to 0-1 IP Let ๐‘ฅ ๐‘— = ๐‘˜=0 ๐‘‘ 2 ๐‘˜ ๐‘ฅ ๐‘—๐‘˜ , ๐‘ฅ ๐‘—๐‘˜ : binary, ๐‘‘= ๐‘› log (2 ๐‘› 2 ๐œƒ) length polynomially bounded ( 2 ๐‘‘ ๐œƒ=๐œƒ (2 ๐‘› 2 ๐œƒ) ๐‘› , objective coeff: max ๐‘ ๐‘— ร— (2 ๐‘› 2 ๐œƒ) ๐‘› Complexity of algorithm (enumeration) for IP : Integer Programming with ๐‘› fixed 0-1 IP ๏ƒŽ P (enumeration algorithm) For general IP, enumeration is not polynomial even for fixed n. (depends on data size) ( ๐œ” ๐ด,๐‘ = (2 ๐‘› 2 ๐œƒ) ๐‘› ๏‚ฎ not polynomial even ๐‘› fixed. transformation to 0-1 IP : one variable ๏‚ฎ ๐‘‘+1 variables ๏‚ฎ enumeration is at least 2 ๐‘‘ ๏‚ฎ polynomial in ๐œƒ ( not in log ๐œƒ ) ๏‚ฎ enumeration not polynomial even for ๐‘› fixed. Integer Programming 2017

14 However, there exists a theorem that says IP with fixed ๐‘› is in ๐‘ƒ ( using basis reduction algorithm for integer lattices, section I , II ) ( It says complexity not depend on ๐œƒ, but result itself does not have much meaning in terms of practical algorithms.) Thm 4.3: Suppose ๐‘†= ๐‘ฅโˆˆ ๐‘ + ๐‘› :๐ด๐‘ฅโ‰ค๐‘ , where (๐ด,๐‘) is an integral ๐‘šร—(๐‘›+1) matrix. If (๐œ‹, ๐œ‹ 0 ) defines a facet of conv(๐‘†), then the length of the description of the coefficients of (๐œ‹, ๐œ‹ 0 ) is bounded by a polynomial function of ๐‘š,๐‘›, and log ๐œƒ . Integer Programming 2017

15 5. Nondeterministic Polynomial-Time Algorithms and NP Problems
(Feasibility problem) ๐‘‹:(๐ท,๐น) ๐ท : set of 0-1 strings (instances of ๐‘‹) ๐น : set of feasible instances ( ๐นโŠ†๐ท ) ( also called decision problem, language recognition problem by Turing machine) ( algorithm ๏‚ซ deterministic Turing machine ) Given a ๐‘‘โˆˆ๐ท, is ๐‘‘โˆˆ๐น ? Integer Programming 2017

16 0-1 integer programming feasibility:
๐ท is the set of all integer matrices (๐ด,๐‘) ๐น={ ๐ด,๐‘ : {๐‘ฅโˆˆ ๐ต ๐‘› :๐ด๐‘ฅโ‰ค๐‘}โ‰ โˆ…} 0-1 integer programming lower bound feasibility: ๐น={ ๐ด,๐‘,๐‘,๐‘ง :{๐‘ฅโˆˆ ๐ต ๐‘› :๐ด๐‘ฅโ‰ค๐‘, ๐‘๐‘ฅโ‰ฅ๐‘ง}โ‰ โˆ…} ( note that lower bound feasibility is nontrivial even for ๐‘โ‰ฅ0 ) Prop 5.1: If 0-1 IP lower bound feasibility problem can be solved in polynomial time, then the 0-1 IP optimization problem can be solved in polynomial time ( by bisection search) Integer Programming 2017

17 Equivalence of Optimization and Feasibility Problem
Consider 0-1 IP optimization and 0-1 IP lower bound feasibility. Opt : Find max {๐‘๐‘ฅ:๐ด๐‘ฅโ‰ค๐‘, ๐‘ฅโˆˆ ๐ต ๐‘› } Feas : โˆƒ ๐‘ฅโˆˆ ๐ต ๐‘› that satisfies ๐ด๐‘ฅโ‰ค๐‘ and ๐‘๐‘ฅโ‰ฅ๐‘ง? If we can solve Opt easily, then we can use the algorithm for Opt to solve Feas. Hence Opt is at least as hard as Feas. (Feas is no harder than Opt.) Our main purpose is to show that Opt is difficult to solve, so if we can show that Feas is hard, it automatically means that Opt is hard. It can be shown that Feas is at least as hard as Opt, i. e. if we can solve Feas easily, we can solve Opt easily. Therefore, Opt and Feas have the same difficulty in terms of polynomial time solvability. These relationship holds for almost all optimization and feasibility problem pairs. Integer Programming 2017

18 (See GJ p 116-117 for TSP problems, later)
Optimization problem can be further divided into (i) finding optimal value and (ii) finding optimal solution. Suppose we can solve Feas in polynomial time, then by using bisection (binary) search, can find optimal value of Opt efficiently (in log ๐‘ง ๐‘ˆ โˆ’ ๐‘ง ๐ฟ +1 log ๐‘ง ๐‘ˆ โˆ’ ๐‘ง ๐ฟ +1 iterations, which is polynomial of the input length, assuming length of encoding of ๐‘ง ๐‘ˆ , ๐‘ง ๐ฟ is poly of input length). Once we know the optimal value of Opt, we can construct an optimal solution using Feas as subroutine. We fix the value of ๐‘ฅ 1 in Opt as 0 and 1, and ask Feas algorithm which case provides optimal value. Then we can determine the value of x1 in an optimal solution. Repeat the procedure for remaining variables. Total computation is polynomial as long as Feas can be solved in polynomial time. (See GJ p for TSP problems, later) Hence, โˆƒ efficient algorithm for Opt โŸบ โˆƒ efficient algorithm for Feas Integer Programming 2017

19 (Deterministic one-tape Turing machine)
Turing Machine Model Deterministic Turing Machine : mathematical model of algorithm (refer GJ p.23 - ) Finite State Control Read-write head Tape โ€ฆ. โ€ฆ. -3 -2 -1 1 2 3 4 (Deterministic one-tape Turing machine) Integer Programming 2017

20 A program for DTM specifies the following information:
A finite set ๏‡ of tape symbols, including a subset ฮฃโŠ‚ฮ“ of input symbols and a distinguished blank symbol ๐‘โˆˆฮ“โˆ’ฮฃ A finite set ๐‘„ of states (start state ๐‘ž 0 , halt states ๐‘ž ๐‘Œ and ๐‘ž ๐‘ ) A transition function ๐›ฟ:(๐‘„โˆ’ ๐‘ž ๐‘Œ , ๐‘ž ๐‘ )ร—ฮ“ ๏‚ฎ ๐‘„ร—ฮ“ร—{โˆ’1,+1} Input to a DTM is a string ๐‘ฅโˆˆ ฮฃ โˆ— . DTM halts if in ๐‘ž ๐‘Œ or ๐‘ž ๐‘ state. We say DTM program M accepts input ๐‘ฅโˆˆ ฮฃ โˆ— iff ๐‘€ halts in state ๐‘ž ๐‘Œ when applied to input ๐‘ฅ. Integer Programming 2017

21 Example ฮ“={0,1,๐‘}, ฮฃ={0,1} ๐‘„={ ๐‘ž 0 , ๐‘ž 1 , ๐‘ž 2 , ๐‘ž 3 , ๐‘ž ๐‘Œ , ๐‘ž ๐‘ } ๐‘ž 1
ฮ“={0,1,๐‘}, ฮฃ={0,1} ๐‘„={ ๐‘ž 0 , ๐‘ž 1 , ๐‘ž 2 , ๐‘ž 3 , ๐‘ž ๐‘Œ , ๐‘ž ๐‘ } ๐‘ž 1 ๐‘ ๐‘ž0 (๐‘ž0, 0, +1) (๐‘ž0, 1, +1) (๐‘ž1, ๐‘, -1) ๐‘ž1 (๐‘ž2, ๐‘, -1) (๐‘ž3, ๐‘, -1) (๐‘ž๐‘, ๐‘, -1) ๐‘ž2 (๐‘ž๐‘Œ, ๐‘, -1) ๐‘ž3 This DTM program accepts 0-1 strings with rightmost two symbols are zeroes. ( check with ), i. e. it solves the problem of integer divisibility by 4.) Integer Programming 2017

22 The language (subset of ฮฃ โˆ— ) LM recognized by a DTM program M is given by
๐ฟ ๐‘€ ={๐‘ฅโˆˆ ฮฃ โˆ— :๐‘€ accepts ๐‘ฅ} We say a DTM program ๐‘€ solves the decision problem (feasibility problem) ๏ if ๐‘€ halts for all input strings over its input alphabet and ๐ฟ๐‘€= โ€˜yesโ€™ instances of the decision problems. Integer Programming 2017

23 ๐‘ƒ = {๐ฟ : there is a polynomial time DTM program ๐‘€ for which ๐ฟ= ๐ฟ ๐‘€ }
Note that ( ๏“*โˆ’ ๐ฟ ๐‘€ ) instances (โ€˜noโ€™ instances and garbage strings) also can be identified since the DTM always stops, so DTM has capability of solving the decision problem (algorithmically). Though simple, DTM has all capability (but slowly) that we can do on a computer using algorithm. There are other complicated models of computation, but the capability is the same as one tape DTM (capability of identifying โ€˜yesโ€™, โ€˜noโ€™ answer, the speed may be different.) ๐‘ƒ = {๐ฟ : there is a polynomial time DTM program ๐‘€ for which ๐ฟ= ๐ฟ ๐‘€ } Integer Programming 2017

24 (Nondeterministic one-tape Turing machine)
Certificate of Feasibility, the Class NP, and Nondeterministic Algorithms Nondeterministic Turing Machine model Finite State Control Guessing Module Guessing head Read-write head Tape โ€ฆ. โ€ฆ. -3 -2 -1 1 2 3 4 (Nondeterministic one-tape Turing machine) Integer Programming 2017

25 Computation of NDTM consists of two stages
(1) guessing stage: Starting from tape square โ€“1, write some symbol on the tape and move left until the stage stops (2) checking stage: Started when the guessing module activate the finite state control in state ๐‘ž0. Works the same as DTM. Accepting computation if it halts in state ๐‘ž๐‘Œ. All other computations ( halting in state ๐‘ž๐‘ or not halt) are non-accepting computations. Some others define NDTM as having many alternative choices in the transition function ๐›ฟ. NDTM has the capability(non-determinism) to select the right choice if it leads to accepting state. (DTM is a special case of NDTM) The language recognized by NDTM program ๐‘€ is ๐ฟ ๐‘€ ={๐‘ฅโˆˆ ฮฃ โˆ— :๐‘€ accepts ๐‘ฅ} ๐‘๐‘ƒ ={๐ฟ: there is a polynomial time NDTM program ๐‘€ for which ๐ฟ= ๐ฟ ๐‘€ } Integer Programming 2017

26 Nondeterministic algorithm : Given an instance ๐‘‘โˆˆ๐ท
In the text (NW), certificate of feasibility ( ๐‘„ ๐‘‘ ) : information that can be used to check the feasibility of a given instance of feasibility problem in polynomial time. Nondeterministic algorithm : Given an instance ๐‘‘โˆˆ๐ท (1) guessing stage : guess a structure ( binary string) ๐‘„ (2) checking stage : algorithm to check ๐‘‘โˆˆ๐น 1. If ๐‘‘โˆˆ๐น, there exists ๐‘„ ๐‘‘ that guessing stage provides, hence output โ€˜yesโ€™ 2. If ๐‘‘โˆ‰๐น, no certificate exists, no output (NDTM may give โ€˜noโ€™ or may not halt (runs forever)) Integer Programming 2017

27 ( nothing is said when ๐‘‘โˆ‰๐น)
๐‘๐‘ƒ : the class of feasibility problems such that for each instance of ๐‘‘โˆˆ๐น, the answer ๐‘‘โˆˆ๐น is obtained in polynomial time by some nondeterministic algorithm. ( nothing is said when ๐‘‘โˆ‰๐น) (๐‘๐‘ƒ may stand for Nondeterministic Polynomial time) Note that the symmetry between answers โ€˜yesโ€™ and โ€˜noโ€™ for the problems in P may not hold for problems in ๐‘๐‘ƒ. For problems in P, โ€˜noโ€™ answer can be obtained in poly time (for ๐‘‘โˆ‰๐น) since the DTM always halts in poly time on a given instance. (Just exchange โ€˜yesโ€™, โ€˜noโ€™ answers. Consider shortest path problem with nonnegative weights.) But, for problems in ๐‘๐‘ƒ, โ€˜noโ€™ answer may not be obtained in poly time even by NDTM. (Consider TSP problem). However, โ€˜noโ€™ answer may be obtained in exponential time by NDTM (or DTM). Integer Programming 2017

28 Ex: 0-1 integer feasibility is in ๐‘๐‘ƒ guessing stage : guess an ๐‘ฅโˆˆ ๐ต ๐‘›
checking stage : If ๐ด๐‘ฅโ‰ค๐‘, then (๐ด,๐‘)โˆˆ๐น General integer feasibility is in ๐‘๐‘ƒ use Theorem 4.1 Hamiltonian cycle is in ๐‘๐‘ƒ Remark) We can simulate a poly time nondeterministic algorithm by an exponential time deterministic algorithm. For each ๐‘‘โˆˆ๐น, โˆƒ structure ๐‘„ ๐‘‘ whose length ๐‘™( ๐‘„ ๐‘‘ ) is polynomial in the length of ๐‘‘. Suppose we know the length ๐‘™( ๐‘„ ๐‘‘ ) (We can estimate this if we have information of the structure, consider 0-1 IP feasibility) Then for each binary string of length up to ๐‘™( ๐‘„ ๐‘‘ ), we run the polynomial checking algorithm (deterministic). If a string gives โ€˜yesโ€™, ๐‘‘โˆˆ๐น If all fails, ๐‘‘โˆ‰๐น. Hence a problem in ๐‘๐‘ƒ can be completely solved by deterministic exponential time algorithm. Integer Programming 2017

29 The Class CoNP Complement of ๐‘‹=(๐ท,๐น) : ๐‘‹ = ๐ท, ๐น , ๐น =๐ท\F
accepting instance is the one having โ€˜noโ€™ answer e. g) complement of 0-1 IP feasibility (0-1 IP infeasibility): ๐น ={ ๐ด,๐‘ : ๐‘ฅโˆˆ ๐ต ๐‘› :๐ด๐‘ฅโ‰ค๐‘ =โˆ…} complement of 0-1 IP lower bound feasibility: ๐น ={ ๐ด,๐‘,๐‘,๐‘ง : ๐‘ฅโˆˆ ๐ต ๐‘› :๐ด๐‘ฅโ‰ค๐‘,๐‘๐‘ฅโ‰ฅ๐‘ง =โˆ…} (equivalent to showing that ๐‘๐‘ฅ<๐‘ง is a valid inequality for {๐‘ฅโˆˆ ๐ต ๐‘› :๐ด๐‘ฅโ‰ค๐‘}. So if the 0-1 IP lower bound feasibility and its complement are all in ๐‘๐‘ƒ, we have a good characterization (certificate of optimality) of an optimal solution ๐‘ฅ โˆ— to 0-1 IP problem. Note that all data are integers ) Integer Programming 2017

30 ๐ถ๐‘œ๐‘๐‘ƒ={๐‘‹:๐‘‹ is a feasibility problem, ๐‘‹ โˆˆ๐‘๐‘ƒ} In language terms
๐ถ๐‘œ๐‘๐‘ƒ={ ฮฃ โˆ— โˆ’๐ฟ: ๐ฟ is a language over ๏“ and ๐ฟโˆˆ๐‘๐‘ƒ} Prop 5.4: If ๐‘‹โˆˆ๐‘ƒ โŸน ๐‘‹โˆˆ๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ Pf) ๐‘‹โˆˆ๐‘ƒ โŸน ๐‘‹โˆˆ๐‘๐‘ƒ ๐‘‹โˆˆ๐‘ƒ โŸน ๐‘‹ โˆˆ๐‘ƒ โŸน ๐‘‹ โˆˆ๐‘๐‘ƒ โŸน ๐‘‹โˆˆ๐ถ๐‘œ๐‘๐‘ƒ ex) LP feasibility: ๐‘ฅโˆˆ ๐‘… + ๐‘› :๐ด๐‘ฅโ‰ค๐‘ โ‰ โˆ…? โˆˆ๐‘ƒ by ellipsoid method. Hence it is in ๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ. ( ๐‘ฅโˆˆ ๐‘… ๐‘› case? ) Even without ellipsoid method, can show it is in ๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ. Membership in ๐‘๐‘ƒ can be shown by guessing an extreme point of ๐‘ƒ. ( length of description not too long) Integer Programming 2017

31 Membership in ๐ถ๐‘œ๐‘๐‘ƒ? Use thm of alternatives (Farkasโ€™ lemma)
LP infeasible โŸบ โˆƒ ๐‘ขโˆˆ ๐‘… + ๐‘› , ๐‘ข๐ดโ‰ฅ0, ๐‘ข๐‘<0 (๐‘ข๐‘=โˆ’1) demonstrating feasible ๐‘ข gives a proof that LP is infeasible. size of ๐‘ข not too big. So LP has good characterization Note that above argument assumes the existence of extreme point in ๐‘ƒ. What if ๐‘ƒ is given as {๐‘ฅโˆˆ ๐‘… ๐‘› :๐ด๐‘ฅโ‰ค๐‘}? Such polyhedron may not have an extreme point although it is nonempty. remedy : give a point in a minimal face of ๐‘ƒ. A point in a minimal face is a solution to ๐ด โ€ฒ ๐‘ฅ=๐‘โ€ฒ which is obtained by setting some of the inequalities at equalities. Integer Programming 2017

32 ๐‘‹โˆˆ๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ โŸน ๐‘‹โˆˆ๐‘ƒ? (likely to hold, but not proven) Status
Questions 1. ๐‘ƒ=๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ? (probably true) 2. ๐ถ๐‘œ๐‘๐‘ƒ=๐‘๐‘ƒ? (probably false) 3. ๐‘ƒ=๐‘๐‘ƒ? (probably false) ๐‘๐‘ƒ ๐ถ๐‘œ๐‘๐‘ƒ ๐‘ƒ Integer Programming 2017

33 1. ๐‘ƒ=๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ? (probably true) 2. ๐ถ๐‘œ๐‘๐‘ƒ=๐‘๐‘ƒ? (probably false)
Questions 1. ๐‘ƒ=๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ? (probably true) 2. ๐ถ๐‘œ๐‘๐‘ƒ=๐‘๐‘ƒ? (probably false) 3. ๐‘ƒ=๐‘๐‘ƒ? (probably false) Implications between status 3. true โŸน true : ๐‘ƒโŠ†๐‘๐‘ƒโˆฉ๐ถ๐‘œ๐‘๐‘ƒ โŸน ๐‘ƒโŠ†๐ถ๐‘œ๐‘๐‘ƒ โŸน ๐‘ƒ=๐ถ๐‘œ๐‘๐‘ƒโˆฉ๐‘ƒ=๐ถ๐‘œ๐‘๐‘ƒโˆฉ๐‘๐‘ƒ ( from 3.) If ๐‘ƒ=๐‘๐‘ƒ, then ๐ถ๐‘œ๐‘๐‘ƒโŠ†๐‘ƒ (๐‘‹โˆˆ๐ถ๐‘œ๐‘๐‘ƒ โŸน ๐‘‹ โˆˆ๐‘๐‘ƒ=๐‘ƒ โŸน ๐‘‹โˆˆ๐‘ƒ) โŸน ๐ถ๐‘œ๐‘๐‘ƒ=๐‘ƒ=๐‘๐‘ƒ 1. 2. true โŸน 3. true Integer Programming 2017


Download ppt "I.5. Computational Complexity"

Similar presentations


Ads by Google