Introduction and finite automata Flashcards
LAG
Language, Automata, Grammar
Symbol
{ a,b,c,d,0,1,2,3,…}
Finite set of symbols
Alphabet
Collection of alphabet, Sequence
String {a, aa, aaa, aaaa, …}
Collection of Strings
Language L(M), i.e. Strings starting with ‘a’
Empty String
∑(a, b) = ∑0 = ε
Types of Language
Finite, Infinite
Automata
Model, Machine to check whether given string is accepted in language or not.
Example of Finite Language?
strings of length 4
Example of Infinite Language?
strings starts with ‘a’
Set of all strings with Length = 0
∑ = (a, b)
∑0, ε, λ
Set of all strings with length = 1
∑ = (a, b)
∑1 = {a, b}
Kleene Closure
∑#, (a+b)# , {ε, a, b, ab, aab, aba, baa, ….}
All possible strings over ∑= (a, b), here # = *
Positive Closure
∑+ , (a + b)+, {a, b, ab, aab, aba, …}
(∑+) + (∑0) = ?
∑*
What is Grammar?
G = {V, T, P, S}
V = variable
T = Terminal
P = Production Rule
S = Start
Example of Grammar?
S -> aSb | ε
a^mb^m, m >=0
give examples of “S -> aSb | ε”
{ε, ab, aabb, aaabbb, …}
S -> SS
S -> aSb
S-> bSa
S -> ε
n(a) = n(b)
Expressing power of any machine can be defined as…
the maximum number of languages it can accept..
if machine M1 can accept more languages then M2 then we can say that expressing power of M1 is greater then M2
Deterministic finite automata (DFA) and Non-deterministic finite automata (NFA) have different POWER
T or F ?
FALSE
Languages accepted by NFA,will also be accepted by DFA because we can make DFA corresponding to NFA. So their expressing power is same.
Deterministic push down automata (DPDA) and Non-deterministic push down automata (NPDA) have different POWER
T or F ?
TRUE
In this case languages accepted by NPDA is more then DPDA, so expressing power of NPDA is more then DPDA
FA
Deterministic single tape Turing machine and Non-deterministic single tape Turing machine have same POWER
T or F ?
TRUE
Both deterministic and non deterministic turing can accept same language.so there expressing power is same.
Single tape Turing machine and multi-tape Turing machine same POWER
T or F ?
FALSE
In turing machine if we increase the number of tape then also language accepted by that machine is same as single tape turing machine.so there expressing power is same.
C language is a regular language.
T or F?
FALSE.
The C language is a context sensitive language.
All modern programming languages use CSL.