•e 10 Decision Problems A decision problem is a general question to be answered, usually possessing several parameters, or free variables, whose values are left unspecified. An instance of a problem is obtained by specifying particular values for all the problem parameters. 0- c)/C(-<- Example. Hamiltonian Circuit instance A Graph G = (V,E). question Does G contain a Hamiltonian Circuit? -fAc..f CO/l-p,}l) -c v<"- ) v-(,.-f<}. (:/10 I (/r..--TO" - u'. /,'"(.,::;Y""i. "Does the following graph have a Hamiltonian Circuit?" is a question. It refers to a specific instance. , 2 ee I "J-.L.j 3/ is a cycle that contains every vertex. A solution to a problem is an algorithm that answers the question that results from each instance. A decision problem is decidable if a solution exist and it is undecidable otherwise. . In general we are concerned with the questions of whether certain decision problems are decidable and if so, whether they can be decided in polynomial time. e e J ~~r 5/ 0'" 'f' X c: 'Cpi / . \ .-;..- ..,! j / ' A "problem" is not the same as a "question" 'f"<:?t <­ According to Church's thesis, every computational device can be simulated by some Turing machine. Thus, a decision problem is decidable if and only if there is a Turing machine that solves the problem. To show that a decision problem is undecidable, we take the point of view that it suffices to show that no Turing machine solves the problem. Conversely, to show that a Turing machine J • exists to solve a decision problem, it suffices to present an informal algorithm. If a decision problem is decidable, we want to know whether it is feasible. That is we want to know whether there is a polynomial time-bounded turing machine (This notion will be formally defined during this course.) that decides the problem. Recalling that input to a Turing machine must be presented as a word over a finite alphabet, the first technical issue we must address is one of reasonable encodings. In order for a Turing machine to solve a decision problem about graphs, for example, graphs must be encoded as words over some finite alphabet. Furthermore, the encoding must be reasonable in the sense that the length of the word that represents the graph must be no more than a polynomial in the length of whatever is considered to be a natural presentation of a graph. •e • Reasonable encoding should be concise and not" padded" with unnecessary information or symbols. Numbers should be represented in binary, or any other concise representation, and should not be represented in unary. If we restrict ourselves to encoding schemes with these properties, then the particular choice of representation will not affect whether a given problem is feasible. For example, one might present a graph G = (V,E) either by a Vertex List and an Edge List or with an Adjacency matrix. For our purposes, either is acceptable. Once such a decision is made, it is straightforward to encode the presentation as a word over a finite alphabet. To wit, suppose that· V = {1, ... , k} and E consists of pairs of the form (e l , e z). Then, 1. Denote each integer by its 2-adic representation. Let c(i) be the 2-adic representation of the number i. 2. For each I, I = 1, ... k, let [c(i)] represent the vertex I. 3 In general, if Xl , ..., xn represent the objects Xl , .... ><0, let (XI' ... , xn) represent the object (Xl , .... ><0). Thus, in particular, an edge (ell e z) is represented by the string ([c(e l )], [c(eJ]). In this manner every graph is representable as a string over the • • .. finite alphabet { 0, 1, [, ], (, )}. Other data structures are encoded in a similar manner. • • • • 7Acoret~H 0¥ 7/x: ~ lIowlt) /:1- ~·CI cia tlf' D F 17 /MJ Ct'veIL M v/ ~ r -flro~ ¢ ~ !-{ /VlJ ,J aCCTp/f ~vodlif ;; rCtTA aCe rof/ s-ICife, Sohye: 10 Cln -smrf sfCt k I'ro/rv 11IJor Il-hl71 : slurr /71cAr k 17:: l~lA ~/are t (1)cu' /:: ~ v (' r)' reins! h () C(li f, / /f __ S OO/n/IV -f/r; f a /5 accrpf e J-{' r"C"J ref fYon-v ,!?lCi,- f('c! P1/1/ k-/ 0D~ /l; '¢'Or r /Y'v . T h ~ r'C' / san c/efr-/,hIJlJc wAcfh'r"l two i'n/'/e ar~ C'J I.-1t'vC1!rhf Uv-tlotnC1ra Lt: f f Irca/';- /' IV;' Ard !7:::/A/ f/;r/) CL 5,- //71.);, sf?!~.f cJ t';ace l ;0 f '; ;hI fr' / ,\.. /10 /70 Olv Ir, f~ fhc; I hCi hi Ie: ;; i-I =- L ( /Vi I) 0 Q (;) D r not L?- /Th/'t\- 10 -=- Lr .#11-)' S y j-n)77 -c f,- I C (L t () rAcer-picA' .. L;;r) VI (L J b/S'o/?1C 17 DFfl L?-) /11 3 ' IS c0lfo//re -­ i f (/"., . • o )} 0./ ,-",/ Roo f \ Ii, r, / B r-- ( 8 1 I S Dr:-$DI\ /Y7 /nr-f <8; s//>1q4Ic B I r' ,/~~ I h/lovs: CIs w), w, 0..., f-Ac/Y ;VI C1cc ~g else- ,/L// ifJ' eels < B,J t-v >. CiCc-LPfs w' ) / ,~ c/c!Q/'/j, B.:: (Q) C d~ /0) F) /11 V 6· f'J Ii...! 13 /s I (n .. w s Irl/7c) 15 4 7/;<",/; frtp M e., 13:S B red:.4s W!t'<9rL ;::p. /f/J • ..G­ B<5 A~t:'IA ~~/("s ~adt'f'l;J u cc-e:p15 j'V}­ F /7 c r, 0/ ?i B of Ie f -c:;;-~, I'n /VJ j'J0....s/floFt,- j /J1pl'l On 6r, -!AI:; 0r' /Cfsl W ;'/1 or, f~ { ~, !/ZlrJ51 !ldl1 fA~ ..../: hy IN, fkn­ acco~V IX sy Mh06 /~jr"ct c\.­ • . ' . (//101ecI~bk ?rQbk/725 _. . U(s//7J !-e,+ <M a -5·ft I/]J - -- r<=0h.nl p /01..1 iA.-e Ie-CT,n-ro! . for Cl/1.1. l&/"J~ .. Ir.JCK..hlP'JL .. M.J alc:.npf~ -!he .. C'~_o f jV} as .P,..--sda./-j 0;,) -fh c ') ol/("r.a /;/11 Ie. . ? l/ph Ci 6-c f~ '. ! Ii S Il'np/-C 5)/lJfach L. frs.1 CQ/') FxamJ'lJ~ .Ol1d alift'.rjn 1/7--C Wh~f)r/" / 1/5 of. .~. r.,IV), 5.!Ol]a CL co* 'fie: . . . (~C'/75.J~r-;-je. !c/k,.t411(j whos~ l)IJA.. Ie vc / drs c r • \' iVl /.J.Y llf/?1f .;' f . 7U/ J i'l5 I? /to tv Is G V (s.; . .CL cc>~. f,..t{('r1/.s;!?J 01C[f~. M .. OIY.. ?( ( (VI) € IS - ... ('::::...'.:.. ~---_. ­ - -.. -. -- -,_._ .. : r--e) -e.~f i- ­ :..u fr>CtcA/,h-.:; /:S~::_-'~I.IJ('cI.a .uni iI-~rsql_... .. ';h~. r /}/J,_ &0 f-eXQ tnple.- . 0 f «_ i ye n(/VI ) -r·V1~a.s:~_ .. s7br e='dp r0zY12/7l.-­ : .7' f : CO !5 mpl/1frr. ! corly . CO/;o.0It'6 AClc7l -I-hC' { j?~c3J''l:1jn~ : A.a~~0(/t~qI' !h k -t6ro,·e5kKr-:-gj yec;:Jr--S. • ]'U n-o~ /1'3 c; r6;!?~'- /' VO~ /l/~u;nqn n .; On.cI CQ?:vQrf~s bt/11 If fir f}ry f 0Yn"P'" fr fA c/.I. S.lorcdm 5 J;rIA. c; /;6&.5. in f~/" na!lv .//] _ is~ Sa /.rJC /??Cin/x·---. c:(....s .~ IP, . .Y9/7..Y(t:-rJ'?'7C1/J 0 ;fr <J-V .ct r=( j , C< ij~r IN';ti.-r'; fj I" -IIA end:if!d by 7?t /"/,'i'}f (/ ?//)/v<"rs<::;/ /?'7 C1 r-A//jc.· .] .. • ,-; / 7/;Lof('171_" L-. 0/1 c:Y! D-t:: ilJ-L /<!, L L C <:.., Or-C- l -- dec/de:{ hie "If /5 //Vl /f/l (M71 Q cc -('pts ( /VI';J) /' proof -S"vrrose 7~ /t A , o'fh r"'rJ--Vlse '-fh'~1 T arc Y'" pI; L( /V)) - - t:= k (/VI:;:> 6 <tV) e- L(/VI) k; &') '7 ( N b (" c, e. a i·e· /f/7 ( > cc or-;::r-f /VI 0 /V) '/ F/v" E k (tV ), fC/\r flc t--.!crr L( M) ¢0 /,-~l k, FoV" cll 0. / /1 L cr,//// ' t=> gy~f,} k /5 j-~.~f f W< proof J clo <"5 rc-eplJ K rE ;Vj k-') IV (/l/) ') • M //1510 I} <:" L a. (101 'X­ jUI"'JhOA---- ._ .. Do~ J7;e o rctrt· _ _-7l',e It.g.-'Cf* LA1101EC/cla j2rD b!~hL ble . - ­ _. -- A/fr1-- ---==--t--f(~'L)-) __ x i-.<: /VI) ; j __ j~t R-09t , ft1 acc;~1 _2} 6 k_ 6=) .. l (/\1 / al LV]-tACC.rpt-5 __ ?.F-(~)J- ~ 4/­ ./"1 { /ft"_ !<I/s I f filM I (;TNi as C\ S?1 b vo.t.,,-htJ f; __ _ (s_drclcl~_bk) __ fhcn SO Itt I'S- . flenc.:J /$ __f{nc:l~ c-/"fa.6/~., __ . -j , . ~ - I , .,­ .-.- -_. • i r -- ... - -_. -, , .... -. - _._-.- --, • SC,'"P?05{:Pyc,b/r-/'n' (? /5 Or) CI{Jor / f.J;.h-, f;1zrI 1/;07 c/-c /oir 11(/ VI C? s GI Vt'" (/VI / Q r),/ L.v, -I-I ("'("turns -f/"J~ I- a h Ci 1-6 -fAr/I 1+ t7 -/kn 1. • • P /VI /1/7 W 61-) ;1/7 a c~fJ w) 01'0 11pf Q CC -fA~ T /11 a // r-('/bt r /'"7J rut'} cIor"J /VI ':LI-YJ?",f (/;F,) -.;-;:(/) ?/ W r"~;. {;y'" !:::,ffi:;"vs ~ ((,A/f /.J IN) o/ae.r no! IQ a, rf:Vr'''lfM?'//Y Ifr, %r".s SIL:h'''/#fl-r rc ,./~.I-, -I-he 1Ic,/h t5 okCl'p?J ct/rr,ft/lal!y h~ /1: <. ft1) CUJt!=/1 w.) Cis!' c4 no! a(c ~I ZI On