TCS
TCS
b) The proper suffixes of the string "0123" are: "123", "23", "3".
c) In formal language theory, a useless symbol is a symbol that does not affect the language
generated by a grammar.
d) A Turing Machine is formally defined as a 7-tuple (Q, Σ, Γ, δ, q₀, q_accept, q_reject), where Q is
the set of states, Σ is the input alphabet, Γ is the tape alphabet, δ is the transition function, q₀ is
the initial state, q_accept is the accepting state, and q_reject is the rejecting state.
e) A left-linear grammar is a type of formal grammar where all the production rules are of the
form A → αB or A → α, where A and B are non-terminal symbols, and α is a string of terminal
and/or non-terminal symbols.
h) The tuples of a Linear Bounded Automaton (LBA) include (Q, Σ, Γ, δ, q₀, q_accept, q_reject),
where Q is the set of states, Σ is the input alphabet, Γ is the tape alphabet, δ is the transition
function, q₀ is the initial state, q_accept is the accepting state, and q_reject is the rejecting state.
i) False. The pumping lemma is used to show that a language is not context-free.
j) The regular expression "a(a+b)*ab" describes strings that start with 'a', followed by zero or
more occurrences of 'a' or 'b', and ending with 'ab'. The smallest possible string accepted by
this regular expression is "aab".
Answer:
c) Proper Suffix: A proper suffix of a string is obtained by removing the entire string
or a prefix of it. Example: For the string "abc", "bc" is a proper suffix.
g) The types of normal forms of grammar include Chomsky Normal Form (CNF) and
Greibach Normal Form (GNF).
h) The tuples of a Linear Bounded Automaton (LBA) include (Q, Σ, Γ, δ, q₀, q_accept,
q_reject), where Q is the set of states, Σ is the input alphabet, Γ is the tape alphabet, δ
is the transition function, q₀ is the initial state, q_accept is the accepting state, and
q_reject is the rejecting state.
i) False. The pumping lemma is used to show that a language is not regular.
Definition of NFA: • NFA is denoted by 5-tuple (Q, Σ, δ, q0 , F), where o Q is a finite set of
states. o Σ is a finite set of symbols called the alphabets. o δ is the transition function where δ:
Q × Σ → 2Q , (here, the power set of Q (2Q ) has been taken because in case of NDFA, from
a state, transition can occur to any combination of Q states) o q0 is the initial state from
where any input is processed (q0 ∈ Q). o F is a set of final state/states of Q (F ⊆ Q).
Moore Machine: [April 16, 17, Oct. 17, 18] • Moore machine is the machine with finite
number of states and for which, the output symbol at a given time depends only upon the
present state of machine. Definition: A Moore machine is a 6-tuple (Q, Σ, ∆, δ, λ, q0 ) where,
Q : Finite set of states. Σ : Finite input alphabet. ∆ : An output alphabet. δ : State function, δ :
Q × Σ → Q. λ : Machine function, λ : Q → ∆. q0 : Initial state of the machine.
Mealy Machine: [Oct. 16, 17, 18, April 17, 19] • It is the machine with finite number of states
and for which, the output symbol at a given time is a function of (i.e. it depends on) the
present input symbol, as well as the present state of the machine. Definition: A Mealy
machine is denoted by a 6-tuple (Q, Σ, ∆, δ, λ, q0 ), where, Q : Finite set of states. Σ : Finite
input alphabet ∆ : Finite output alphabet δ : State function, δ": Q × Σ → Q λ : Machine
function λ: Q × Σ → ∆ q0 : Initial state of the machine.
GRAMMAR - Grammar can be defined as, a set of formal rules for generating syntactically
correct sentence from a particular language for which it is written.
• The term "pushdown" refers to the fact that the stack can be regarded as being "pushed
down" like a tray dispenser at a cafeteria, since the operations never work on elements other
than the top element.