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
You are on page 1/ 23
Linear Bounded Automata
Linear Bounded Automata
• A Linear Bounded Automaton (LBA) is similar to Turing Machine with some properties stated below: • Turing Machine with Non-deterministic logic, • Turing Machine with Multi-track, and • Turing Machine with a bounded finite length of the tape. LBA can be defined with eight tuples (elements that help to design automata) M = (Q , T , E , q0 , ML , MR , S , F), where, Q -> A finite set of transition states T -> Tape alphabet E -> Input alphabet q0 -> Initial state ML -> Left bound of tape MR -> Right bound of tape S -> Transition Function F -> A finite set of final states Power of LBA • LBA is powerful than PDA for example: anbncn | n ≥1 cannot be accepted by PDA whereas it can be accepted by LBA without using any extra space or BLANK symbol. Operation of LBA • A linear bounded automaton is a Turing machine that satisfies the following three conditions:
1. Its input alphabet includes two special symbols, serving as
left and right endmarkers. 2. Its transitions may not print other symbols over the endmarkers. 3. Its transitions may neither move to the left of the left endmarker nor to the right of the right endmarker. 4. In other words: instead of having potentially infinite tape on which to compute, computation is restricted to the portion of the tape containing the input plus the two tape squares holding the endmarkers. Examples of LBA L = {anbncn | n ≥1} • L = {an! | n ≥ 0} • L = {an | n = m2, m ≥ 1}, means n is perfect square • L = {an | n is prime} • L = {an | n is not a prime} • L = {ww | w ε {a, b}+} • L = {wn | w ε {a, b}+, n ≥ 1} • L = {wwwR | w ε {a, b}+} Linear bounded automaton (LBA) is a nondeterministic Turing machine that uses only the amount of tape space needed for the input:
It has a finite amount of memory, determined by the length of the
input string It never leaves the cells where the input was placed It has two special tape symbols, < and >, which mark the left and right ends of the input It cannot replace the endmarkers with anything else It cannot move the tape head past the endmarkers
LBAs are different from Turing machines, which have an
unbounded tape that allows them to store an unlimited amount of information. This difference affects the computational power and time complexity of the two models. Turing Machine • A turing machine consists of a tape of infinite length on which read and writes operation can be performed. The tape consists of infinite cells on which each cell either contains input symbol or a special symbol called blank. It also consists of a head pointer which points to cell currently being read and it can move in both directions. A TM is expressed as a 7-tuple (Q, T, B, ∑, δ, q0, F) where:
Q is a finite set of states
T is the tape alphabet (symbols which can be written on Tape) B is blank symbol (every cell is filled with B except input alphabet initially) ∑ is the input alphabet (symbols which are part of input alphabet) δ is a transition function which maps Q × T → Q × T × {L,R}. Depending on its present state and present tape alphabet (pointed by head pointer), it will move to new state, change the tape symbol (may or may not) and move head pointer to either left or right. q0 is the initial state F is the set of final states. If any state of F is reached, input string is accepted. TM as Acceptor • Turing Machines can broadly be classified into two types, the Acceptors and the Transducers. • Acceptor Turing Machine is an automaton used to define Turing-acceptable languages. Such a machine can be used to check whether a given string belongs to a language or not. TM as Transducer • A transducer is a type of Turing Machine that is used to convert the given input into the output after the machine performs various read-writes. It doesn’t accept or reject an input but performs series of operations to obtain the output right in the same tape and halts when finished. Decidability and Undecidability 1. Recursive Language • A Language ‘L’ is said to be recursive if there exists a Turing Machine which will accept all the strings in ‘L’ and reject all the strings not in ‘L’. • The Turing Machine will halt every time and give an answer (accepted or rejected) for each and every input Decidability and Undecidability 2. Recursively Enumerable Language • A Language ‘L’ is said to be recursively enumerable language if there exists a Turing Machine which will accept(and therefore halt) for all the input strings which are in ‘L’. • But may or may not halt for all input strings which are not in ‘L’ Decidability and Undecidability 3. Decidable Language A Language ‘L’ is decidable if it is a recursive language. All decidable languages are recursive languages and vice-versa 4. Partially Decidable Language A Language ‘L’ is partially decidable if ‘L’ is a recursively enumerable language Decidability and Undecidability 5. Undecidable Language • A Language is undecidable if it not decidable • An undecidable language may sometimes be partially decidable but not decidable • If a language is not partially decidable, then there exists no Turing Machine for that language Points to remember Recursive Language TM will always halt
Recursively Enumerable TM will sometimes halt and
Language may not halt sometimes Decidable Language Recursive Language
Partially Decidable Language Recursively Enumerable
Language
Undecidable No TM for that language
Halting Problem • Halting Problem is an undecidable problem Statement for Halting Problem Given a program will it halt when run on some particular given input string? Can we design a machine which if given a program can find out or decide if that program will always halt or not halt on a particular input? Halting Problem Solution Let us assume that we have a C(X) function if{H(X,X) == Halt} H(P,I) loop Forever; where, the function H taking // (not halt) the parameters P(program), else I(input) has to decide whether return; the program will halt or not halt This allows us to write another //(Halt) program function C(X) where C is the function name and X is the program Halting Problem • If we run ‘C’ on itself C(C)
if(C,C)==Halt if(C,C)== Not Halt
By contradiction we can’t have a program that will halt or not halt Post Correspondence Problem Post Correspondence Problem is an undecidable problem No algorithm exists to find the solution to an undecidable problem given an input.
The PCP problem over an alphabet ∑ is stated as follows −
Given the following two lists, M and N of non-empty strings over ∑ − M = (x1, x2, x3,………, xn) N = (y1, y2, y3,………, yn) We can say that there is a Post Correspondence Solution, if for some i1,i2,………… ik, where 1 ≤ ij ≤ n, the condition xi1 …….xik = yi1 …….yik satisfies. Example 1 Find whether the lists • M = (abb, aa, aaa) and N = (bba, aaa, aa) have a Post Correspondence Solution? Sol: We can see that x2x1x3 = y2y1y3 Hence, the solution is i = 2, j = 1, and k = 3. Example 2 • Find whether the lists M = (ab, bab, bbaaa) and N = (a, ba, bab) have a Post Correspondence Solution? Sol: In this case, there is no solution because − | x2x1x3 | ≠ | y2y1y3 | (Lengths are not same) Hence, it can be said that this Post Correspondence Problem is undecidable.