0% found this document useful (0 votes)
61 views24 pages

TOC Unit - 4 (Handwritten)

The document discusses the Turing Machine, invented by Alan Turing in 1936, detailing its components, functions, and classifications. It explains how Turing Machines accept languages, their operational states, and various modifications such as multi-tape and non-deterministic versions. Additionally, it covers the implications of these machines in computation and language acceptance.

Uploaded by

krishnaraadha295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views24 pages

TOC Unit - 4 (Handwritten)

The document discusses the Turing Machine, invented by Alan Turing in 1936, detailing its components, functions, and classifications. It explains how Turing Machines accept languages, their operational states, and various modifications such as multi-tape and non-deterministic versions. Additionally, it covers the implications of these machines in computation and language acceptance.

Uploaded by

krishnaraadha295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DATE

TURING MACHINE
Jwung
Jing machine was imuented in 1936
by Alan Turing. 1 a n accepting deufco
whish accepto Re cuwrsiue Entmable LanguLape
generated by e O ram ma
There a varibus eatunes othe TM.=
t h a s an extenal mempiy which nem fmbtns
aoitray long depuence o input.
h a s unlimited memny capahilit.
The tapa haad hag the capability te moe
e tand ight.

he machine Can bnOduce a Ctain utputE


hased Dn ik input. sometimes iA may ha
nequined that he same input has to bbe
ssd to geneate. the output. so in his
hmachine, he olidtinctiem b)winput qnd 9tp
hos baern hemoued. Thus a tam men s t o
alphabet can be used pe he T.m.
Femal delinitfem e a Turing Machine-
A Turung Machine M-(8,i1&,1o,B, F)
a heple dtuttwe whthi

-inih st o states.
thehe chanacto e t o anguage
dat o Jape aiymbo; = £ u ?p?
whene B blank dymbel.
-dat ansition unctiom
o nitil dtate.
blam k smbe
f at o final stutts FC.

a Jurimg Machine halts in una stt,


then the sting is atebted.

*Basic Model e Tuning Matine

ppPp3lb pepp
Roinitial state
Read u
head
Fi- Basi modle) oTuing Marhine
DATE

PACE O

Jwimg Machime has: am infimite tape


diided imto olts4 can be intinite
eth dinectiend xcept0 6emeinile
beitien a1, 2 Q n .an. lhe umaining will
be olank Blank i den@ted by B

The l ! owing netatiems ane used to deno te


the dinectiom e mouem tnt of Hhe tape heod
LLeptmoue
S- stationay
R- Rght moue

Tuanaitiorm pun- slai,a)l1i,b, R).


t ndicates that the ymbod in eurnet
and the state unde Rwhead is
is
Cell js a

2i, thtn the hew dtate under R/uw head ia


b
141 and
47 nd he tuwtnent cull is changed to by
mo ning m Aught diec tion
Turing Machin as languae Aceptors
halts when it no i
A tuwing
Atwimg
has
mahine
ag auailoble moues. 44 halts ina
inal tate, it acceph t s inpud; ohuu
it Jujus is input
Let m (8, E, r, 6, to B, P) 4s a TM,
Lm)
bhe Language acceptd by M. denoted by Lm
s the st o ose dtin in E* ha
haf
Caust M to inter in final dtate.

A 6tuing w im theTm said to be


atLepted , -
9ow d1 pd2 hes dAme
PEF
Qno 2 *

The TM dosnet accept sting w t h e


mahin halk m a non actepting dtedt on
dotu nst halt

Ewy TM diwdes the det e input tring


oww the i in three dasses;

.Accept This the det ol sbing which


CALde the TM to halt in dOme fnal
tate. alse called halting dtot)
DATE
PAGE NO.

Reject- 4 may pesible that the input


string may Lead to deme comRiguatiG
mat
with neminal xtate e m uhich the Tm
.Can ne-t moe Je. to deme Bm bim ation
honinal tate and CLuvrent ynbof o
which the traritien pune undeincd.

Loop- An input átrun might caude the


TM to enter anInkinife lovp, a neuer ending.
guln o mouLA. n thi Ca h o r is ne
utceme. The machine centinussto mak
mows, but the Obdenue heu dur thatt
it abeut to atcept 0 Croh

Dedfgn a TM e ab" |nz= 1}


CY, Y, R)
Ca,a,R ,4,1)
Ca,R Cb,Y,
9,R)

B,L
En Dsign a Tm e Sanbc n=1

(2,29R
(,9,L)
(YhYR) (Y,Y, L)
(a,9,R by b» L)
(2,2,L)

CYYR)
L

(2,2) CB, B,

ransition tabte Jn-fa"chnze13


tat b C X y B
4,YR
(1,a,RaYB)|
12bR) , 2,42 ,2R
e3,3,Cts,b,) to, X,R)a, Y,12(ta,2,
(4, Y,RO|Ca4, 7,15,8
s E
ATE
PAGE N0.

Twuimg Machine a4 Ansdutrs


TM a mLe than judt Janguage accepteu
To use TM as brand ducv , buat he entir
nenblank ptiem tha tope as input, and
tuat he entir nenblamk tiono o the tab
aas utput when +he machine halh.

A TMdpines a funyzf )
her dbing

where 4 is-a pinal dtate.

Turing Cemputalde- Aunctie f ' daid te


be Tundn9- cemputabde, {uat Cemputalde,
ihen exids Ame Tuwung machine
M: ( 8 £ , o 9o, P,F) uch that

eL all we£
E 9esign aTM. He 1ls.mpJemenf
1O, R e , O, L

B,B, L 8,8A)
Oy1,R ty

rani~ien dUapngm fn ld cemplemend

Tanaitiom table -

B
dtates
Ro BL9
ORo |
OL 11 BR
L
r eaign a TM. te nd um e 2
unay no
L1,R 1,1,R
B,B,L 4P,R

tate
R LR lo
LR BL
BR3

ExDesign a TM te inenement a unay number. is


ftn) =n+

,4R
)
tote
c R o R
BR
:
LA

Modlicatisn to shndand Turing Mahsne


mooliicatiens qnd enhgn Cements ho.
Many
Many
te mpOue TM. Thede
boen ho psed
nhan Cement a mtoms the no.
e the no. al

tapes no. o backs on the tape allewall,


attachmemt o meme etc,
mOud

OTM with stay optien instead mouirg


Lot eisht on eeing amnput", the
had C d alse tay at one pedition
witheuF mouingomyuwhee

f: &Xx x X xflu4t-dhigt, Rizht shilt,


stay?
till the ho. of lamguages accepted b
TM e mains dame

T M ith demi- ininite tape - We know


that TM has an nginite inbut tpe with
cctends im beth the divectioma (et 4ight)
imkinitly. de nowiwe esbiet it to
entend ondy in ene direction & not in both
the i e ctiens, de., we make the tape to
he semi inlinite, then also the no o languaa
acLepted by the TM nemains Same.
TATE
PAG

line T.M-n standand Tm


both the inpu
Ornol suput onehnedentm the tape, he head
has the autheity te moe aths64 the
Jnpu
qnd
dont
Can change modi he inpud, we
modily he input we ca hnoide
imput im aparat ile, which is a d
eny
then the head Cannot make change to i t

the TM an to modiy the inpu, the


inpud heed to bs Copied on the tabe anmd ha
changes Can bmade by he haad bu kilt
thinput i l umain unthanped as changs
ar made in the tab and net in th file
duch moodipicatiem to TM dtili +he
By deim
'no oLnguagas acceptedy the TM hemains
the dame

Jump.Jng T-The tandand Tms head can


moue enly On step to theuight e lett,
but in Cad o jumping Tm the head can
haad Cam
nue not nly iust enL dtep to the t
ight u t i Can mou me the
i t , , 3 , 4,S+ 6, * d0 ms Can ump
cull to th ight o lJt o the
input tape
f:xX &xx {Ltaigt, Rijiduniyt jy{n}
t h e ne D steps th at tt uish te moue
to the usghd o j t . But tlill the longuages
aCcepted bH Tm Jlmai nd the
the damt
Nen Casin9TM-m dtandard Tm he
nput dymbel Can be changed
to blanL
4acilLity to
blank
buLt we Atmoue 4his
Changin the mput y mbel to hlank tn
xdLLch type TM Called ad hen-Chastna
TM. WJe Can upla ce he Jnput wih on
witm ay
sther dymbel except blank. B deing thi
modilicaLien dtil the no o languoje
accspted byhe TM. ARmaund the dame

Alwayd uiting TM- standard TM ghus


Lug the he re dem than n sing an
Input ue Can Jeaue. as i i wthout
doin
Tm i
an
eny Changes but im aluays uiting
tempuldeiy to modily th
Lmput whenfuer ue see it e ann
leaue it iy.
This kind o modilicatibn
as
didnthelp in mueasingthi number
Tm
languaged accephedby he Tm.
Multitrack Tm- A mutitack Tm LEdid
multiple ack Om a ingle ape. In
multitrack Tm all the rack Juide
he dame twung tapo and monu m
same dinectien
he dine ctfen o dimulaneausly
motien
e
o twung pe
The Rw head i
Capabte radin
amd witing em all he Calls
simultanesusly which lie in the damt
Cetumn By doin9 this moditheatien te T
the no o angua ge
aceepted by Tm emain
R/w head fenont tack Tuung tapa
ig-Muitrack Turing Maehine.
MultLtape TM- In multitape TM, cach track
hesiden a dilenent ope and can
in moue
desized dizectiem imdepend ent
otherd 9 the mo ue ment
j net uquind
hen e make. &tatienaH moueK

head

head

htad

head
Finite Lemprol
Fig-MulLtitape Turing Machint
the na. o
B defng thiy modigicotiou dtily dm
amg uases accep}ea b Tm umains
Multidimenasienal. Tm- n this Tm he
exten
input tape
Can be uiuud as
extending
initely m m e than One
dinecti on
din
(limendfon-Ljt} ht /up ldouwm)
The moues o multidImensíonal a r emat
nal
oleineda eltews-
d: 0x xx{1,R, U, D, átop?
Hene
L=et dérection
R=Right directin
U Upperdipecti
D Dounn ainectien

Rl Hea4

F-MudHdimtnafenal T.wring Machine.


By deing this modi;itation dtily the
numbu_ oang uages atctpted by the Tm
mainghe same.
0Nendererministie
state
TM-n a NDIM Be
fuey and ymbo, thene ane a
o actiend the Tm can haus. do hujeieup
the
tanaitiens a not deterministic. In DTM
the nert moue oa Tm deeminid
umiqualy by d. In NDTM we allow no mou
e mlple mous
The Computatin o DTM Can be
ewed as a bu wih nly ene
bra nth,
whereaas the Ceputation e an NDTm
CAn b wewed as a Be hawin 9 many
pedsibl A h es

The anaitien fun oan NDTM is as


&9, k) (91,3,D1), (1a a,D2)...
(n,m, Pr)
here Di is the dinectien o Moien

f Deteministic Cemputatien-"9ny Cne ntxt


pessibe Lmigunatiem at each sBep i
Cemputatig

Fg- Nondeekimi nistfe Cermputatien-At cetein peint


Chnputatim may hqut ne e me branches.
.Universal TM- Uniutrsal TM isa
dpecipie4 TM hat Cam simulate tho
bthauour
AUTMn a Tm whosk mput
Consistod e t v barts
Finst part is the entoded TmeUoed
by amarkey.
The seLend past L a sbuing tha
interpruted a th nput o Tm enLoded
n s t part

The UTM then simudates he


precesaing e cemd p a t o4 he en oded
Tmin 4h d t pat oinput
Inpt Turing Machine otpit ctp,
Rajert Loep)
stairg
enenal Twring Machine

DsupHion e Tmtniurdal Twing SAccep


Machina Output pejecd
Jrput dtbin
Fis- Univenda Turing Machine
DA

Jo design UTm we use


multitape Tm
becausealeng with input sing o we
alssiu di ciptitmoTm

Descipdien om
(UTM Input sting- ' ' j
II stat e Mackinef

Let Mu be the UTM and inpu e M is


he enndedTuing Machine M1 felewrd by
by
input w. Mu wiu simudate and Run Tm en
Lmput (ect)
wuld haue ash on the imput -Mu will
ash (neject)
M1 wold accopt the sting w- Mu wiUaccept
P m wtld leop en w ML wil lo op om w
Kewngie and Reunsiu Enum tnalde guagE
Thene are thru hessibte
outcemes o
exeuting TM
biuen a input The Tm may
a

Halt and accept the input,


Halt amd neject the
input,
Neuer hat.

Re wsiue languae
A Languaqel isaid te be neursin i
there exxists a TM which uill acLept all
the stringsin L and ject all he stingb
net Jn L.
The TM ill halt tnery time gnd giue an
andw en laccepted 0 Aefectud) eo each and
eueny sbring n put.

Recwrdsiutly Enumerable Langua e-


A A Languaje L i daid to "bREL ihere
Cxist a TM which uil accept (and halt)
e r all he input stun9s which aiu in L.
But may O may h8t halt a all:input
stungs uhich a net in l.

REL
RL LReC CLREL
Re cwrdiue lang uage (R1) s alse Recuwnaiul
enumerale languose (Rel) , but a REL
het hecess arily ruUrsi.
ecialing V Recagnisng
lwung Machine Mhet99nizes Lamquage L
D the bing L put minte the Accept s t
the sthiný Not inl
@ithe put m into Reject dtate
BOp Cause M e Loop

Tuing achkineM "aeiides" lamgua9el i


Dth ting Lput Mnte a~cept tate
thi ktingNot in L put m_inte he
Aeject tate

Recegnge Ahcegniger ela lon9ua ge


a machine haf ueco9ripesthiat
LanguAge
1 t ha in the Acceht date enthe
hat a L in he langugge
dking
I t may may ho halt
Ae n t In he
On Kting that
Jmguage
Decider
Adeciden e a languag a
machine hat decides Hhat
LanguagA.
haltt in the Accept state m the sting
hat a m he lan nage
talse halts thesbing b net im
the language
Juning Decidable language
Twn decidabte (n
-

lamg ua ge 1s
decides it decidalde) i eme
seme TM TM
Alse knoum as (Pka)
Recuwmdie lang uage
-

Jwung Recegnigabte language A


language is
-

Turun helog nizable i e Jwung machine


AaLeqnzes
Aka"Recunsiuely tnumeLable languas
esue propertics Re uunsiu langua
ee
O Unien-4 li and la a tue netwiue
language, thene unien L Ul2 wil alss be
he ursiue becauet i TM hals Lo L1 and la
itunll alse halts o ul2
Con cate natism - L l2 are Jue RL,
4hc om Catenatiim L1 l2 ill alse be Rec.
L1= fa"b"chnz =o?
L2 d"e"f*"| mz = 0}
L3 L1 l 2
a"b4 m=0 and n7z o
alio hewhie .

kJeene Llesure- i l i ne cuwrsit , it klesna


doune l wl alse b ewrdiv.
Fe ex L anb" c" m7 =O
DATE

PAGE KO

I n terse itien- Ly and il2 ia huo


hein inteudle4'
unsiue languages
L1 Nl2 uil als be sucundie
Fere
l fa""c"d|nz-0 A mzo
lafa"b"¢hd"nzso:Lm2so
l3 linl2-
=fah dnzzo LfU b

emplement- l eCLrs iLAlanqua.


the: Lempemet oLehith.iy *-Y)5
u alse beheiwdiue.

Ueune propenties REL


RELis doscd unden
Duniem
Cemcaenatien
kleene leswrl
9 trsctien
REL ngt clesed under
Dset denence gnd
Cor phem emt
kCentext-Sensitiue rammar
A ramman =
(Um, , PS) is said to
Lentext stnsitie, it be
im P haue the eum-allhodurtien ulas
q B
whcne
BE CEUVn)t
qnd

OR
dAB 7s
whent

AE Vn
YE CUVn)t
Nete- The hrodurtien S>E i alloued i S the
tard dymbe and S dees net appean On
the ight side ean produtien.
ConteysensitiugAgmmars Ccstn) a a
mere poerful han COmtet Aru 4ammar
CCf ) betause there are dAmelanguJR
that can be described by CSG7 bud not by
Conteyt senaitius lang uae
The Language Jenthatrd by the CSa i
chlled en tt senditiue language (cSl).

SaThlab
aT-> aa Th )ac
Llcn)fab} u fo"cbhnzo
Cendiden he oll euing CS C-
S abc/afbc
Ab> bA
Ac Bbcc
bB > Bb
AB-2 aalaaA

The language eneenated by thés a m m a s k-

SaAbc
S->ab Hc
S abBhcc
SaBbbcc
S a a Abbcc
S a9b Abec
S-2g4 bb Ace
OATE

PAGE NO.:

S2aabb Bbccc
S >aa bB bb ccc
S aaBbbbecc
S2Qaabbb Ccc
The language genenated bythis m n a n is
LGn) Sa ]n7= 13

Wesune Propenties CSL


CSLane dosed unden
Unien
Intensection
lOmplement
Cemcatenatien
leone cleun
2 Reuersa

You might also like