lb-auto
TRANSCRIPT
![Page 1: lb-auto](https://reader036.vdocuments.mx/reader036/viewer/2022081807/577d33bf1a28ab3a6b8ba0db/html5/thumbnails/1.jpg)
8/8/2019 lb-auto
http://slidepdf.com/reader/full/lb-auto 1/6
Linear Bounded Autom ata
The last machine model of computat ion which we shal l examine is the linear
bounded automaton or lba . These were originally developed as models for
actual comp uters rather than m odels for the com pu tat ional process. They have
become impor tant in the theory of computat ion even though they have not
em erged in app licat ions to the extent which pus hd own autom ata enjoy.
Here is the motivation for the design of this class of machines. Computers are
fini te devices. They do not h ave un end ing am oun ts of stora ge like Turing
m achines. Thus any actual com pu tat ion don e on a com put er is not as extensive
as th at which could be com pleted on a Turing mach ine. So, to m im ic (or m aybe
model) computers, we must restr ict the storage capacity of Turing machines.This sh ould n ot be as severely as we did for f ini te autom ata th ough . Here is th e
definit ion.
Defini t ion. A linear b ounded au tom aton (lba ) is a m u lti-track Tu ring
m achine wh ich ha s only on e tape, and this tape is exactly th e sam e length
as the inp ut.
That seem s quite reason able. We allow the com pu ting device to use just the
stora ge it was given at the b eginn ing of i ts com pu tation. As a s afety feature, we
shall employ endmarkers (* on the lef t and # on the r ight) on our lba tapes and
never al low the machine to go past them . This will ens ure that th e storageboun ds are m aintained and help keep our m achines f rom leaving thei r tapes.
At this point , th e ques tion of accepting sets ar ises. Let 's have linear bou nd ed
aut om ata accept just like Turing m achines. Thus for lba halt ing m eans
accepting.
For these new machines computat ion is rest r icted to an area bounded by a
cons tan t (the nu m ber of tracks) t imes th e length of the inp ut . This is very
m uch l ike a program m ing environm ent where th e sizes of values for variables is
bounded .
Now tha t we know what th ese devices are, let 's look at on e. A set which cann ot
be accepted by pushdown machines ( this i s shown in the mater ial on formal
languages) is the set of str ings whose length is a perfect squ are. In sym bols this
is :
{an | n is a perfect s qu are }.
![Page 2: lb-auto](https://reader036.vdocuments.mx/reader036/viewer/2022081807/577d33bf1a28ab3a6b8ba0db/html5/thumbnails/2.jpg)
8/8/2019 lb-auto
http://slidepdf.com/reader/full/lb-auto 2/6
Linear Bounded Automata 2
Here is the st rategy. We shall us e a four track m achine with th e inp ut writ ten
on th e f ir s t t rack. The second and thi rd t racks are used for scratch work while
the fourth track is holds str ings of square length which wil l be matched against
the input s t r ing.
To do th is we need to generate som e st r ings of square length. The second an dth ird tra cks are us ed for th is. On th e second track we will bu ild s tr ings of length
k = 1, 2, 3, and so forth. After each str ing is buil t , we construct (on the fourth
t rack) a s t r ing whose length i s the square of the length of the s t r ing on the
second t rack by copying the second t rack to the four th exact ly that m any t im es.
The third track is us ed to coun t down from k. Here is a lit t le chart which
explains the u se of th e t racks.
tra ck con ten t
1 an (input)
2 ak
3 ak-m
4 am k
Then we check to see if this is the same length as the input. The third track is
us ed for bookkeeping. The algorithm is provided as f igure 1.
repeat
clear the 3rd and 4th tracks
add another a to the 2nd track
copy the 2nd track to the 3rd track
while there are a’s written on the 3
rd
trackdelete an a from the 3rd trackadd the 2nd track's a's to those on 4th track
until overflow takes place or 4th track = input
if there was no overflow then accept
Fig ur e 1 - Recogn it ion of Perf ect Square Lengt h Inp ut s
Now we've seen something of what can be done by l inear bounded automata.
We need to investigate som e of the decision prob lems concerning them . The
first pro blem is the halt ing prob lem .
Theorem 1 . Th e h alt ing problem is solvab le for l inear boun ded autom ata.
Proof . Our argument here wi l l be based upon the number of possible
configurations for an lba. Let 's assu m e that we have an lba with on e track
( this is al lowed because can use addit ional tape symbols to simulate
tracks as we did with Turing machines) , k instructions, an alphabet of s
![Page 3: lb-auto](https://reader036.vdocuments.mx/reader036/viewer/2022081807/577d33bf1a28ab3a6b8ba0db/html5/thumbnails/3.jpg)
8/8/2019 lb-auto
http://slidepdf.com/reader/full/lb-auto 3/6
Linear Bounded Automata 3
tap e sym bols, and an inp ut tap e which is n characters in length . An lba
configuration is the same as a Turing machine configuration and consists
of:
a) an ins truction,
b) the ta pe h ead's p osit ion, andc) the conten t of the tape.
That is all. We now ask: how m any different configurations can th ere be?
It is no t too d iff icult to f igure ou t . With s sym bols and a tap e which is n
squares long, we can have only s n different tapes. The tape head can be
on an y of the n squ ares and we can be execut ing any of the k inst ruct ions.
Thus th ere are only
k*n*sn
pos sible different con figurations for the lba.
Let us return to a technique we used to prove the pumping lemma for
fini te automata. We observe that i f the lba enters the same configuration
twice then it wil l do t his again an d again an d again. It is stuck in a loop.
The theorem follows from th is. We only need to sim ulate and observe the
lba for k*n*s n steps. If it has n ot hal ted by then it m ust be in a loop an d
will never ha lt.
Corol lary. Th e m em bership problem s for sets accepted by linear bou nd ed
autom ata a re solvab le.
Corol lary. Th e sets accepted by linear bou nded au tom ata are a ll
recursive.
Let ' s pursue this not ion about s tep count ing a bi t more. We know that an lba
will run for no more than k&n&s n s teps because tha t is the upp er bound on the
nu m ber of configurations p ossible for a m achine with an inpu t of length n . But,
let us ask: exactly how many conf igurat ions are actually reached by the
machine? If we knew (and we shall soon) we would have a sharper bound on
when looping takes place. Thus t o detect looping, we could coun t step s with an
lba by using an ext ra t rack as a s tep coun ter .
Now let 's mak e the prob lem a lit t le m ore diff icult . Sup pos e we had a
non det erm inist ic l inear boun ded aut om aton (nlba). We know what this is;
m erely a machine which has m ore than on e possible m ove at each step. And , if
i t can achieve a halt ing configuration, i t accepts. So we now ask: how m any
configurat ions can an n lba reach for som e inp ut? We st i ll have only k*n*sn
![Page 4: lb-auto](https://reader036.vdocuments.mx/reader036/viewer/2022081807/577d33bf1a28ab3a6b8ba0db/html5/thumbnails/4.jpg)
8/8/2019 lb-auto
http://slidepdf.com/reader/full/lb-auto 4/6
Linear Bounded Automata 4
poss ible conf igurat ions, so i f we could detect th em we could count t hem using
n tap e squ ares. The big problem is how to d etect them. Here is a rath er nif ty
resu lt which dem ons trates n ond eterm inism in al l of its glory. We start with a
ser ies of lem m ata.
Lem m a . For an y non determ inist ic linear boun ded autom aton there isanother w hich can locate and exam ine m configurations reachable (by the
first lba) from som e inp ut if there are a t least m reacha ble configura tions.
Proof . We have an nlba and an integer m . In ad dit ion we know th at there
are at least m con figurations reachab le from a certain inp ut. Our task is
to f ind them.
If the nlba has k instructions, one track, s symbols, and the input is
length n, then we know that there are at most k&n&sn possible
configurations (Ci) reachable from the star t ing configuration (which we
shall call C0). We can enum erate them and check whether the nlba can
get to them . Consider:
x = 0
for i = 1 to k*n*sn
generate Ci
guess a path from C0 to Ci
verify that it is a proper path
if Ci is reachable then x = x + 1
verify that x ≥ m (otherwise reject)
This is a perfect example of the guess and veri fy technique used in
non det erm inist ic operat ion. All we did was exploit our definit ion of
non det erm inism . We looked at al l pos sible configurat ions and count ed
tho se which were reachab le from th e star t ing configuration.
Note also that every step above can be car r ied out using n tape squares
and s everal t racks. Our major prob lem h ere is to coun t to k*n*sn . We
need to f irst n ote th at for al l except a few values of n , this is sm aller th an
(s+1)n and we can count to this in bas e s+1using exact ly n tape sq uares.
Since we verify that we have indeed found at least m configurations our
algor i thm does indeed examine the appropr iate number of reachable
configurations if th ey exist .
![Page 5: lb-auto](https://reader036.vdocuments.mx/reader036/viewer/2022081807/577d33bf1a28ab3a6b8ba0db/html5/thumbnails/5.jpg)
8/8/2019 lb-auto
http://slidepdf.com/reader/full/lb-auto 5/6
Linear Bounded Automata 5
Lem m a . For any non determ inist ic linear boun ded autom aton th ere is
another which can compute the number of configurations reachable from
an input .
Proof . As before we begin with an arbitrary machine which has k
ins tructions , one track, s symb ols, and a n inpu t of length n . We shalli terat ively count the number of configurations (n i) reachable from the
initial con figur ation . Con sider :
n0 = 1
i = 0
repeat
i = i + 1
ni = 0
m := 0
for j = 1 to k*n*sn generate Cj
guess whether Cj can be reached in i steps or less
if path from C0 to Cj is verifiable then
ni = ni + 1
if reached in less than i steps then m = m + 1
verify that m = ni-1 (otherwise reject)
until ni = ni-1
The gues sing step is just th e algorithm of our last lemm a. We do it byfinding al l of the configurations reachable in less than i steps and seeing
if any of them is C j or if one m ore step will prod uce C j. Since we know n i-
1 , we can verify that we have looked a t al l of them .
The remaind er is just coun ting. We do not of course h ave to save all of
the n i, just th e current one an d t he last one. All of this can be d one on n
squares of tape (and several t racks) . Noting that we are done when no
m ore reachable conf igurat ions can be found f inishes th e proof .
Theorem 2 . Th e class of sets accepted b y n ond eterm inistic linea r boun ded autom ata is closed u nder com plem ent.
Proof . Most of our work has been don e. To bu ild a ma chine which
accepts the complement of the set accepted by some nlba involves
pu tt ing th e previous two together . First f ind ou t exactly how m any
configurations are reachab le. Then exam ine al l of them and if any halt ing
configurations are encoun tered , reject . Otherwise accept .
![Page 6: lb-auto](https://reader036.vdocuments.mx/reader036/viewer/2022081807/577d33bf1a28ab3a6b8ba0db/html5/thumbnails/6.jpg)
8/8/2019 lb-auto
http://slidepdf.com/reader/full/lb-auto 6/6
Linear Bounded Automata 6
Our f inal topic is decision problems. Unfortunately we have seen the only
imp ortan t solvable decision problem concerning l inear boun ded au tom ata. (At
least there was one!) The rema ining decision prob lem s we have examined for
oth er class es of m achines are un solvable. Most of the proofs of this depen d
upon th e next lemm a.
Lem m a . For every Turing machine there is a l inear bounded automaton
which accepts the set of strings which are valid halting computations for
the Turing m achine.
The proof of th is im port ant lemm a will rem ain an exercise. It shou ld not be too
hard to see just how an lba could check a s t r ing to see i f i t i s a computat ion
though. After al l , we did a rather careful analysis of how pushdown machines
recognize invalid computations.
Theorem 3 . The emptiness problem is unsolvable for linear bounded automata .
Proof . Note that if a Tur ing m achine accepts no inpu ts th en i t does not
have any valid hal t ing comp utat ions. Thus the l inear boun ded au tom aton
which accepts the Turing machine's valid halt ing computations accepts
noth ing. This m eans that i f we could solve the em pt iness problem for
linear bou nd ed au tom ata th en we could solve it for Tur ing m achines.
In the treatment of formal languages we shall prove that the class of sets
accepted by l inear bounded automata proper ly contains the class of sets
accepted by push do wn ma chines. This places this class in th e hierarchy
f a ⊂⊂⊂⊂ pda ⊂⊂⊂⊂ lba ⊂⊂⊂⊂ TM
of classes of sets computable by the var ious machine models we have been
examining.
(By the way, we could intuitively indicate why lba's are more powerful than
pu sh down m achines. Two observations are necess ary. First , a tap e which can
be read and writ ten up on is as powerful a tool as a s tack. Then, note that a
pushdown machine can only place a bounded number of symbols on i t s s tack
du r ing each step of it s comp utat ion. Thus i t s s tack cannot grow longer than aconstant t im es th e length of it s inpu t .)
The oth er relat ionsh ip we need is not available. Nobod y kno ws if
nondeterminist ic l inear bounded automata are more powerful than ordinary
ones .