Language IN๐บ๐ฝ๐๐ฝ๐๐น โข ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น = ๐ฅ ๐ โณ ๐ฅ is infinite} โข We will show this is not computable by using ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น to compute ๐ผ๐ต๐๐ 1
โณ ๐ฅ ๐ฆ Halts? It is infinite Language of ๐ ๐ฅ๐ฆ โณ ๐ฅ ๐ฆ Doesnโt Halt ? It isnโt infinite โข If โณ(๐ฅ)(๐ฆ) halts: Build this machine: ๐ ๐ฅ๐ฆ : โ ๐ ๐ฅ๐ฆ always returns 1 1) run โณ(๐ฅ)(๐ฆ) 2) return 1 โ ๐ ๐ ๐ฅ๐ฆ = ฮฃ โ , which is infinite โข If โณ(๐ฅ)(๐ฆ) doesnโt halt: โ ๐ ๐ฅ๐ฆ gets โstuckโ in step 1 and never returns โ ๐ ๐ ๐ฅ๐ฆ = โ , which is finite 2
Using ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น to build ๐ผ๐ต๐๐ Assume we have ๐ โ which ๐ต โ computes ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น : ๐ โณ ๐ฅ is/isnโt ๐ฅ Is L โณ ๐ฅ infinite? infinite We could then build ๐ ๐ผ๐ต๐๐ which computes ๐ผ๐ต๐๐ like this: ๐ต ๐ฐ๐ฉ๐ด๐ผ Does โณ ๐ฅ ๐ฆ halt? ๐ฅ โณ ๐ฅ ๐ฆ ๐ต โ Build this machine: ๐ ๐ฅ๐ฆ : does/doesnโt Is L ๐ ๐ฅ๐ฆ infinite? 1) run โณ(๐ฅ)(๐ฆ) ๐ฆ halt 2) return 1 3
Reduction Problem we think is impossible Problem know is impossible ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น ๐ผ๐ต๐๐ ๐ถ ๐ต Build (but donโt run) ๐ ๐ฅ๐ฆ Is L โณ ๐ฅ Does โณ(๐ฅ) infinite? halt on input ๐ฆ ? Assume Give ๐ ๐ฅ๐ฆ to the ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น solver, then ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น solver exists ๐ ๐ผ๐ต๐๐ computes ๐ผ๐ต๐๐ answer the same Reduction 4
Using ๐บ๐ฝ๐๐ฝ๐๐น to build ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น Assume we have ๐ ๐บ๐ฝ๐๐ฝ๐๐น ๐ต ๐ฎ๐ฑ๐ถ๐ฑ๐ผ๐ญ which computes ๐บ๐ฝ๐๐ฝ๐๐น : ๐ โณ ๐ฅ is/isnโt ๐ฅ Is L โณ ๐ฅ finite? finite We could then build ๐ โ which computes ๐ฝ๐๐บ๐ฝ๐๐ฝ๐๐น like this: ๐ต โ Is L โณ ๐ฅ infinite? ๐ฅ ๐ต ๐ฎ๐ฑ๐ถ๐ฑ๐ผ๐ญ ๐ โณ ๐ฅ Is L โณ ๐ฅ finite? is/isnโt infinite 5
Language ๐๐๐๐๐๐ โข ๐๐๐๐๐๐ = ๐ฅ ๐ โณ ๐ฅ is non โ regular} โข We will show this is not computable by using ๐๐๐๐๐๐ to compute ๐ผ๐ต๐๐ 6
โณ ๐ฅ ๐ฆ Halts? It is non-regular โณ ๐ฅ ๐ฆ Doesnโt Halt ? It isnโt non-regular Language of ๐ ๐ฅ๐ฆ Build this machine: ๐ ๐ฅ๐ฆ (๐ง): 1) run โณ(๐ฅ)(๐ฆ) 2) return MAJ(๐ง) โข If โณ(๐ฅ)(๐ฆ) halts: โ ๐ ๐ฅ๐ฆ returns 1 if MAJ ๐ง = 1 โ ๐ ๐ ๐ฅ๐ฆ = ๐๐ต๐พ(๐ง) , which is non-regular โข If โณ(๐ฅ)(๐ฆ) doesnโt halt: โ ๐ ๐ฅ๐ฆ gets โstuckโ in step 1 and never returns 1 โ ๐ ๐ ๐ฅ๐ฆ = โ , which isnโt non-regular 7
Using ๐๐๐๐๐๐ to build ๐ผ๐ต๐๐ Assume we have ๐ ๐๐ which ๐ต ๐ถ๐บ computes ๐๐๐๐๐๐ : ๐ โณ ๐ฅ is/isnโt ๐ฅ Is L โณ ๐ฅ non- non-regular regular? We could then build ๐ ๐ผ๐ต๐๐ which computes ๐ผ๐ต๐๐ like this: ๐ต ๐ฐ๐ฉ๐ด๐ผ Does โณ ๐ฅ ๐ฆ halt? ๐ฅ โณ(๐ฅ)(๐ฆ) ๐ต ๐ถ๐บ Build this machine: ๐ ๐ฅ๐ฆ (๐ง): does/doesnโt Is L โณ ๐ฅ non- 1) run โณ(๐ฅ)(๐ฆ) ๐ฆ halt regular? 2) return MAJ (๐ง) 8
Reduction ๐๐๐๐๐๐ ๐ผ๐ต๐๐ ๐ถ ๐ต Describe that machine ๐ ๐ฅ๐ฆ Is L โณ ๐ฅ non- Does โณ(๐ฅ) regular? halt on input ๐ฆ ? Assume Give ๐ ๐ฅ๐ฆ to the ๐๐๐๐๐๐ solver, then ๐๐๐๐๐๐ solver exists ๐ ๐ผ๐ต๐๐ computes ๐ผ๐ต๐๐ answer the same Reduction 9
Using ๐๐๐ to build ๐๐๐๐๐๐ Assume we have ๐ ๐๐๐ ๐ต ๐๐๐ which computes ๐๐๐๐๐๐ : ๐ โณ ๐ฅ is/isnโt ๐ฅ Is L โณ ๐ฅ regular? Regular We could then build ๐ ๐๐ which computes ๐๐๐๐๐๐ like this: ๐ต ๐ถ๐บ Is L โณ ๐ฅ non-regular? ๐ฅ ๐ต ๐๐๐ ๐ โณ ๐ฅ is/isnโt non- Is L โณ ๐ฅ regular? regular 10
Language ๐ต๐๐๐๐๐ข101 โข ๐ต๐๐๐๐๐ข101 = ๐ฅ โณ ๐ฅ 101 = 1} โข We will show this is not computable by using ๐ต๐๐๐๐๐ข101 to compute ๐ผ๐ต๐๐ 11
โณ ๐ฅ ๐ฆ Halts? It does accept 101 โณ ๐ฅ ๐ฆ Doesnโt Halt ? It doesnโt accept101 Building ๐ ๐ฅ๐ฆ Build this machine: ๐ ๐ฅ๐ฆ (๐ง): 1) run โณ(๐ฅ)(๐ฆ) โข If โณ(๐ฅ)(๐ฆ) halts: 2) return ๐ง == 101 โ ๐ ๐ฅ๐ฆ returns 1 if ๐ง == 101 โ ๐ ๐ ๐ฅ๐ฆ = {101} , so it does accept 101 โข If โณ(๐ฅ)(๐ฆ) doesnโt halt: โ ๐ ๐ฅ๐ฆ gets โstuckโ in step 1 and never returns 1 โ ๐ ๐ ๐ฅ๐ฆ = โ , so it doesnโt accept 101 12
Using ๐ต๐๐๐๐๐ข101 to build ๐ผ๐ต๐๐ Assume we have ๐ ๐ต101 ๐ต ๐ฉ๐๐๐ which computes ๐ต๐๐๐๐๐ข101 : โณ(๐ฅ) does/doesnโt ๐ฅ Does โณ(๐ฅ) accept accept 101 101? We could then build ๐ ๐ผ๐ต๐๐ which computes ๐ผ๐ต๐๐ like this: ๐ต ๐ฐ๐ฉ๐ด๐ผ Does โณ ๐ฅ ๐ฆ halt? ๐ฅ โณ(๐ฅ)(๐ฆ) ๐ต ๐ฉ๐๐๐ Build this machine: ๐ ๐ฅ๐ฆ (๐ง): does/doesnโt Does โณ(๐ฅ) accept 1) run โณ(๐ฅ)(๐ฆ) ๐ฆ halt 101? 2) return ๐ง == 101 13
๐ต๐๐๐๐๐ข101 Reduction ๐ต๐๐๐๐๐ข101 ๐ผ๐ต๐๐ ๐ถ ๐ต Describe that machine ๐ ๐ฅ๐ฆ Is 101 โ L โณ ๐ฅ ? Does โณ(๐ฅ) halt on input ๐ฆ ? Assume Give ๐ ๐ฅ๐ฆ to the ๐ต๐๐๐๐๐ข101 solver, then ๐ต๐๐๐๐๐ข101 solver exists ๐ ๐ผ๐ต๐๐ computes ๐ผ๐ต๐๐ answer the same Reduction 14
Using ๐๐๐๐๐๐ข101 to build ๐ต๐๐๐๐๐ข101 Assume we have ๐ ๐101 ๐ต ๐101 which computes ๐๐๐๐๐๐ข 101: 101 isnโt/is in ๐ฅ Is 101 โ L โณ ๐ฅ ๐ โณ ๐ฅ ? We could then build ๐ ๐ต101 which computes ๐ต๐๐๐๐๐ข101 like this: ๐ต ๐ต101 Is 101 โ L โณ ๐ฅ ? ๐ฅ ๐ต ๐101 101 is/isnโt in ๐ โณ ๐ฅ Is 101 โ L โณ ๐ฅ ? 15
Computability and non-computability closed under complement โข If ๐ is computable, then ๐ ๐ is computable Assume we have ๐ ๐ which ๐ต ๐ด computes ๐ : ๐ฅ is/isnโt in ๐ ๐ฅ Is ๐ฅ โ L ? We could then build ๐ ๐ ๐ which computes ๐ ๐ like this: ๐ต ๐ ๐ Is ๐ฅ โ L ? ๐ฅ ๐ต ๐ด ๐ฅ isnโt/is in ๐ Is ๐ฅ โ L ? 16
Complement Reduction ๐ ๐ ๐ ๐ถ ๐ฅ โ ๐ ? ๐ต Donโt change ๐ฅ ๐ฅ โ ๐ ? If Give ๐ฅ to the ๐ solver, ๐ solver exists ๐ ๐ solver exists then answer the opposite ๐ solver doesnโt exist ๐ ๐ solver doesnโt exist Reduction 17
Sematic Property โข Turing machines ๐, ๐โฒ are Functionally Equivalent if โ๐ฆ โ ฮฃ โ , ๐ ๐ฆ == ๐ ๐ฆ โฒ โ i.e. they compute the same function/language โข A Semantic Property of a Turing machine is one that depends only on the input/output behavior of the machine โ Formally, if ๐ is semantic, then for machine ๐, ๐โฒ that are functionally equivalent, ๐ ๐ == ๐ ๐ โฒ โ If ๐, ๐โฒ have the same input/output behavior, and ๐ is a semantic property, then either bother ๐ and ๐โฒ have property ๐ , or neither of them do. 18
Examples โข These properties are Semantic: โ Is the language of this machine finite? โ Is the language of this machine Regular? โ Does this machine reject 101? โ Does this machine return 1001 for input 001? โ Does this machine only ever return odd numbers? โ Is the language of this machine computable? โข These properties are not Semantic: โ Does this machine ever overwrite cell 204 of its tape? โ Does this machine use more than 3102 cells of its tape on input 101? โ Does this machine take at least 2020 transitions for input ๐ ? โ Does this machine ever overwrite the ๐ผ symbol? 19
Riceโs Theorem โข For any Semantic property ๐ of Turing Machines, either: โ Every Turing machine has property ๐ ๐ is โtrivialโ โ No Turing machines have property ๐ โ ๐ is uncomputable โข In other words: โ If ๐ is semantic, and computable, then one of these two machines computes it: Return 1 Return 0 20
Proof of Riceโs Theorem Let ๐ be a semantic property of a Turing machine โข Assume ๐ โ (a machine whose language is โ ) doesnโt have property ๐ โข (otherwise substitute ยฌ๐ , then answer opposite) Let ๐ ๐ be a machine that does have property ๐ โข โข Idea: โ If โณ(๐ฅ)(๐ฆ) halts, ๐ ๐ ๐ฅ๐ฆ = ๐ ๐ โ๐๐ก ๐ โ If โณ(๐ฅ)(๐ฆ) doesnโt halt, ๐ ๐ ๐ฅ๐ฆ = L ๐ โ = โ โ ๐(๐ ๐ฅ๐ฆ ) has property ๐ if and only if โณ ๐ฅ ๐ฆ halts โณ ๐ฅ ๐ฆ Halts? It has property ๐ Build this machine: ๐ ๐ฅ๐ฆ (๐ง): โณ ๐ฅ ๐ฆ Doesnโt Halt ? It doesnโt have property ๐ 1) run โณ(๐ฅ)(๐ฆ) 2) return ๐ โ๐๐ก ๐ (๐ง) 21
Using ๐ to build ๐ผ๐ต๐๐ Assume we have ๐ ๐ which ๐ต ๐ธ computes ๐ : โณ(๐ฅ) does/doesnโt ๐ฅ Does โณ(๐ฅ) have have property ๐ property ๐ ? We could then build ๐ ๐ผ๐ต๐๐ which computes ๐ผ๐ต๐๐ like this: ๐ต ๐ฐ๐ฉ๐ด๐ผ Does โณ ๐ฅ ๐ฆ halt? ๐ฅ โณ(๐ฅ) ๐ต ๐ธ Build this machine: ๐ ๐ฅ๐ฆ (๐ง): does/doesnโt Does โณ(๐ฅ) have 1) run โณ(๐ฅ)(๐ฆ) ๐ฆ have property ๐ property ๐ ? 2) return ๐ โ๐๐ก ๐ (๐ง) 22
Recommend
More recommend