5 views

Uploaded by ashutoshfriends

- Multi-Robot Task Allocation: Analyzing the Complexity and Optimality of Key Architectures
- divide and conquer algo
- Katz - Complexity Theory (Lecture Notes)
- CS154_FinalSolutions 2010
- 00006030
- Assignment 3
- Chapter 1 - Introduction
- p and np
- Mgr Amen
- Chapter 23 Algorithm Efficiency Liang 8th
- [IJCT-V2I2P5] Authors :B.Sudha(M.Tech) , Mr.S.ArunKumar (Assistant Professor)
- practice_book_math.pdf
- Prolog Search
- 269349285 Steel and Timbe
- Da Brow Ski Thesis
- Randomized Algorithms
- Data Structures Midterm 2015 spring.pdf
- Benito Varona JCAM Publicado
- Mathematics HL - ANSWERS - Calculus - Course Companion - Oxford 2014
- 32 Averages

You are on page 1of 5

computer running a particular program.

✦ We must argue that the TM can do

exactly what a computer can do, albeit

slower.

2. We use the simplicity of the TM model to

prove formally that there are specic problems

(=languages) that the TM cannot solve.

✦ Two classes: \recursively enumerable"

= TM can accept the strings in the

language but cannot tell for certain that a

string is not in the language; \non-RE" =

no TM can even recognize the members of

the language in the RE sense.

3. We then look at problems (languages) that do

have TM's that accept them and always halt;

i.e., they not only recognize the strings in the

language, but they tell us when they are sure

the string is not in the language.

✦ The classes P and NP are those

languages recognizable by deterministic

(resp., nondeterministic) TM's that halt

within a time that is some polynomial in

the input.

✦ Polynomial is as close as we can get,

because real computers and dierent

models of (deterministic) TM's can dier

in their running time by a polynomial

function, e.g., a problem might take

O(n2 ) time on a real computer and O(n6 )

on a TM.

4. NP-complete problems: Since we don't know

whether P = NP , but it appears that at least

some problems in NP take exponential time,

the best we can do is show that a certain

problem is \NP-complete," = if this problem

is in P , then all of NP is in P .

5. Some specic problems that are NP-complete:

satisability of boolean (propositional logic)

formulas, traveling salesman, etc.

Intuitive Argument About an Undecidable

Problem

Given a C program, does it print hello, world.

as the rst 13 characters of output?

1

We prove there is no C program to solve that

problem by supposing that there were such a

program H , the \hello-world-tester."

✦ H takes as input a C program P and an

input le I for that program, and tells

whether P , with input I , \prints hello

world" (by which we mean it does so as

the rst 13 characters).

Modify H to a new program H1 that acts like

H , but when H prints no, H1 prints hello,

world.

✦ Requires some thought: we need to

nd where no is printed and change the

printf statement.

Modify H1 to H2. This program takes only

one input, P , and acts like H1 with both its

program and data inputs equal to P .

✦ I.e., H2(P ) = H1(P; P ).

✦ Requires more thought: H2 must buer

its input so it can be used as both the P

and I inputs to H1.

H2 cannot exist. If it did, what would H2(H2)

do?

✦ If H2(H2) = yes, then H2 given H2 as

input evidently does not print hello,

world. But H2(H2) = H1(H2; H2) =

H (H2; H2), and H1 prints yes if and only

if its rst input, given its second input as

data, prints hello, world. Thus, H2(H2 )

= yes implies H2(H2 ) = hello, world.

✦ But if H2(H2) = hello, world. then

H1(H2; H2) = hello, world. and

H (H2; H2) = no. Thus, H2 (H2) =

hello, world. implies H2(H2 ) 6= hello,

world.

The TM

Finite-state control, like PDA.

One read-write tape serves as both input and

unbounded storage device.

✦ Tape divided into cells.

✦ Each tape holds one symbol from the tape

alphabet.

✦ Tape is \semi-innite"; it ends only at the

left.

2

Tape head marks the \current" cell, which is

the only cell that can in
uence the move of

the TM.

Initially, tape holds a1a2 an BB where

a1 a2 an is the input, chosen from an input

alphabet (subset of the tape alphabet) and B

is the blank.

Formal TM

M = (Q; ; ,; ; q0; B; F ), where:

Q = nte set of states.

, = tape alphabet; , = input alphabet.

B in , , = blank.

q0 in Q = start symbol; F Q = accepting

states.

takes a state and tape symbol, returns a new

state, replacement symbol (either might not

change) and a direction L=R for head motion.

Example

Nontrivial examples are hard to come by. Here's a

TM that checks its third symbol is 0, accepts if so,

and runs forever, if not.

M = (fp; q; r; s; tg; f0; 1g; f0; 1; B g; p; B; fsg)

1. (p; X ) = (q; X; R) for X = 0; 1.

2. (q; X ) = (r; X; R) for X = 0; 1.

3. (r; 0) = (s; 0; L).

4. (r; 1) = (t; 1; R).

5. (t; X ) = (t; X; R) for X = 0; 1; B .

ID's of a Turing Machine

The ID (instantaneous description) captures what

is going on at any moment: the current state, the

contents of the tape, and the position of the tape

head.

Keep things nite by dropping all symbols to

the right of the head and to the right of the

rightmost nonblank.

✦ Subtle point: although there is no limit

on how far right the head may move and

write nonblanks, at any nite time, the

TM has visited only a nite prex of the

innite tape.

3

Notation: q says:

✦ is the tape contents to the left of the

head.

✦ The state is q.

✦ is the nonblank tape contents at or to

the right of the tape head.

One move indicated by `; zero, one, or more

moves represented by `* .

✦ Check the reader for the detailed

denition of `.

Example

With input 0101, the sequence of ID's of the TM

is: p0101 ` 0q101 ` 01r01 ` 0s101.

At that point it halts, since state s has no

move when the head is scanning 1.

With input 0111 the sequence is: p0111 ` 0q111 `

01r11 ` 011t1 ` 0111t ` 0111Bt ` .

The TM never halts, but continues to move

right.

Acceptance by Final State and by Halting

One way to dene the language of a TM is by

the set of input strings that cause it to reach an

accepting state.

L(M ) = fw j q0w `* p for some p in F and

any and in , g.

Another way is to dene the set of strings that

cause the TM to halt = have no next move.

H (M ) = fw j q0w `* pX , and (p; X ) is not

denedg.

✦ Subtle point: a TM can appear to halt if

the next move would take the head o the

left end of the tape.

✦ Given any TM, we can mark the left end

so that never happens; i.e., we produce

a modied TM that accepts the same

language and halts rather than fall o

the left end.

Example

The TM M of our previous example has L(M )

equal to those strings in the language of RE

(0 + 1)(0 + 1)0(0 + 1) .

4

H (M ) is the language of + 0 + 1 + (0 + 1)(0 +

1) + (0 + 1)(0 + 1)0(0 + 1) .

Equivalence of Acceptance by Final State

and Halting

We need to show L is L(M1 ) for some TM M1 if

and only if L is H (M2 ) for some TM M2 .

If

Modify M2 as follows:

1. Introduce one accepting state r.

2. Whenever there is no transition for M2 on

state q and symbol X , add a transition to

state r, moving right (so we can't possibly fall

o the left end) and leaving symbol X .

Only-If

Roughly, we let M2 simulate M1 , but if M1 enters

an accepting state, M2 has no next move and so

halts.

Major problem: M1 could halt without

accepting.

✦ To avoid this problem, introduce state r

that moves right on every symbol, staying

in state r and leaving the tape symbols

unchanged.

✦ Give M2 a transition to r (moving right)

on every state-symbol combination that

does not have a rule.

Also, remove all transitions where the state is

an accepting state of M1 , so M2 will halt in

those situations.

Falling O the Left End of Tape

The reader talks about the funny situation where

the TM would halt but falls o the left end of

tape.

This situation is not halting.

Neither does a TM accept if it tries to enter

an accepting state as it falls o the left end.

We can prevent falling o the left end, by

marking the leftmost cell, as in the reader.

But it appears we do not need to do

so in order to prove the equivalence of

halting/accepting, since neither occurs when

the TM falls o the left end.

- divide and conquer algoUploaded byankitdocs
- Katz - Complexity Theory (Lecture Notes)Uploaded byKristina Šekrst
- CS154_FinalSolutions 2010Uploaded byDiane Yang
- Chapter 1 - IntroductionUploaded byNguyễn Thanh Linh
- Multi-Robot Task Allocation: Analyzing the Complexity and Optimality of Key ArchitecturesUploaded byXDrones UAV
- 00006030Uploaded bydcrust_amit
- p and npUploaded byDagim Neway
- [IJCT-V2I2P5] Authors :B.Sudha(M.Tech) , Mr.S.ArunKumar (Assistant Professor)Uploaded byIjctJournals
- Assignment 3Uploaded byNaci John Trance
- Mgr AmenUploaded byJoo-Hyun Yoo
- practice_book_math.pdfUploaded byNoureldinYosri
- Chapter 23 Algorithm Efficiency Liang 8thUploaded byRosendo Stuart
- Prolog SearchUploaded byAlexandru Matei
- 269349285 Steel and TimbeUploaded byyeshi janexo
- Da Brow Ski ThesisUploaded byDarius-Florentin Neatu
- Randomized AlgorithmsUploaded byMohsin Qurban
- Data Structures Midterm 2015 spring.pdfUploaded by黃士軒
- Benito Varona JCAM PublicadoUploaded byJeremy Ebert
- Mathematics HL - ANSWERS - Calculus - Course Companion - Oxford 2014Uploaded byFuchi Ponpon
- 32 AveragesUploaded byGeorge Tsavd
- random wordsUploaded bybombking
- Low Complexity Implementation of LDPC Decoder UsingUploaded bysamsath10
- Economic Lot Sizing an Algorithm That Runs in Linear Time in the WagnerUploaded byfmunoz7
- c_progsUploaded byParthajyoti Bordoloi
- Fan Yang Final Project Report Fixed Figure ReferencesUploaded byNguyen Tuan Linh
- 10.1.1.16.1046.psUploaded bykr0465
- Yuri Gurevich and Saharon Shelah- On Finite Rigid StructuresUploaded byJgfm2
- On the Smarandache kn-digital subsequenceUploaded byRyanElias
- Floating Point ArithmeticUploaded byGrace Reyes
- Aplication of push relabel .pdfUploaded byyuver

- fafl Slides 1Uploaded byatul
- Slides 16Uploaded byashutoshfriends
- Slides 15Uploaded byatul
- Slides 14Uploaded byatul
- Slides 13Uploaded byashutoshfriends
- filelanguage and automata 12Uploaded byashutoshfriends
- filelanguage and automata10Uploaded byashutoshfriends
- filelanguage and automata 9Uploaded byashutoshfriends
- filelanguage and automata 8Uploaded byashutoshfriends
- filelanguage and automata 7Uploaded byashutoshfriends
- filelanguage and automata 6Uploaded byashutoshfriends
- filelanguage and automata 5Uploaded byashutoshfriends
- filelanguage and automata 4Uploaded byashutoshfriends
- filelanguage and automata 3Uploaded byashutoshfriends
- filelanguage and automataUploaded byashutoshfriends
- Pumping CflUploaded byashutoshfriends

- LOGIC AND SET THEORY EXAMUploaded bysklekl
- Ethics in Mathematics: a Brief History of Mathematical ProofsUploaded byDylan C. Beck
- AI artificial inteeligence with its functions and its performancesUploaded bySuganya Periasamy
- 142893674-Source-Code-Aplikasi-Inventory-Data-Barang.pdfUploaded byosirisgod
- Sets and Set NotationUploaded bymicolle0811
- L3Uploaded byGursimran Kaur Chadha
- Tutorial PictUploaded byCaccolo345
- Introduction to LEX [Compiler Design] - StudyOverFlowUploaded byNikhil Mishra
- Ary Game PlayinhUploaded byJose Vergara Soberanis
- predicate logicUploaded byMuneeb Javaid
- NestedQuantifiers-QA.pdfUploaded byQuangHuyĐoàn
- Reinforcement LearningUploaded byabasthana
- 7. Pushdown AutomataUploaded byRavi Teja
- enumerationUploaded byMuhammad Syafiq Hassan
- LTEFDD_V100R006C00_20150511160716.xlsxUploaded byTogo Mali
- Carnap-On the Character of Philosophical Problems 1934Uploaded byfontouramail
- gold.pdfUploaded byAndreea Elena Cîrciumaru
- CS 106syllabusUploaded bygel4i
- Set Theory in Computer Science - A gentle Introduction to Mathematical Modeling I - Jose Meseguer - 2011.pdfUploaded byJack Bullets
- Logic and functionUploaded byMohsin Yasin
- Random Language Model 2019 DeGiuliUploaded byKitzia Aveiri
- Basic Set Theory TerminologyUploaded bykwsx
- DSUploaded bynagarjunasagar
- class6.pptUploaded byabcd
- Suffix Tree ApplicationsUploaded byGuruprasad Sridharan
- chapter 3 critical thinking questionsUploaded byapi-347011626
- Exercises for Unit 6 Ui, Ei, Eg Answers2Uploaded byalicenuoli
- Sequence Detector Finite State Machine DesignUploaded byasic_master
- RecursiveUploaded byezzatulakmma
- 1 AstUploaded byApoorva Ranjan