CUSTOMER_CODE SMUDE DIVISION_CODE SMUDE

CUSTOMER_CODE
SMUDE
DIVISION_CODE
SMUDE
EVENT_CODE
OCTOBER15
ASSESSMENT_CODE BC0052_OCTOBER15
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
5987
QUESTION_TEXT
Explain the steps involved in conversion of Mealy Machine into Moore
Machine.
SCHEME OF
EVALUATION
Step1: For a state q i determine the number of different outputs that are
available in θ state table of the Mealy machine. (2 marks)
Step2: If the outputs corresponding to state q i in the next state columns
are same, then retain state q i as it is. Else, break q i into different states
with number of new states being equal to the number of different outputs
of q i. (2 ½ marks)
Step3: Rearrange the states and outputs on the format of a Moore
machine. The common output of the new state table can be determined
by examining the outputs under the next state columns of the original
Mealy machine. (2 ½ marks)
Step4: If the output in the constructed state table corresponding to the
initial state is 1, then this specifies the acceptance of the null string ^ by
Mealy machine. Hence to make both Mealy and Moore machines
equivalent, we either need to ignore the output corresponding to the null
string or we need to insert a new initial state at the beginning whose
output i s0. The other row element i this case would remain the same. (3
marks)
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
72464
QUESTION_TEXT
Briefly explain the Classification of Grammars?
SCHEME OF
EVALUATION
Every language is specified by a particular grammar. The classification
of languages is based on the classification of the grammar used to
specify them. Grammars are classified accordingly to the types of
productions.
Definition:
A grammar in which there are no restrictions on its productions is
called type – 0 grammar or unrestricted grammar
A grammar that contains only productions of the form
where
is called type – 1 grammar or context sensitive grammar. The
language generated by this grammar is called context sensitive
language
A grammar that contains only productions of a form
where
and
is called type – 2 grammar or context free
grammar. The language generated by this grammar is called context
free language
A grammar that contains only productions of the form
, where
,
and has the form a, B or a, where
is
called type – 3 grammar or regular grammar. The language generated
by this grammar is called a regular language
A grammar
is called monotonic when every
production in is of the form
having
or
In the
second situation, S does not appear on the right hand side of any of the
production of G.
In other words, in any production, the left hand string is always a single
non – terminal and right hand string is either a terminal or a terminal
followed by a non – terminal.
QUESTION_TYPE DESCRIPTIVE_QUESTION
QUESTION_ID
72465
QUESTION_TEXT
If L1 and L2 are regular, then prove that the regular language is closed
under complementation and intersection.
SCHEME OF
EVALUATION
Let M = (Q, ∑, δ, q0, F) be a DFA which accepts the language L1. Now, let us
define the machine
M1 = (Q, ∑, δ, q0, Q - F).
(1 mark)
The non-final states of M are the final states of M1 and final states of M are
the non- final states of M1. So, the language which is rejected by M is accepted
by M1.
(1 mark)
Also, a language accepted by a DFA is regular. So, the language accepted by M1
is regular. So, a regular language is closed under complementation.(1 mark)
Let us consider M1 = (Q1, ∑, δ1, q1, F1) which accepts L1 and M2 = (Q2, ∑, δ2, q2,
F2) which accepts L2.
It is clear from these two machines that the alphabet of both machines are
same.
Assume both the machines are DFAs.
(1 mark)
To accept the language L1 L2, let us construct the machine M that simulates
both M1 and M2 where the states of the machine M are the pairs (p, q), where
p Q1 and q Q2.
The transition for the machine M from the state {p, q) on input symbol a ∑ is
the (δ (p, a), δ (q, a)).
That is, if, δ1(p, a) = r and δ2(q, a) = s, then the machine moves from the state
(p, q) to the state (r, s) on input symbol a. (1 mark)
In this manner, the machine M can simulate the effect of M1 and M2.
Now, the machine M = (Q, ∑, δ, q, F) recognizes L1
Q2
L2 where Q = Q1 x
q = (q1, q2), where q1 and q2 are the start states of machine M1 and M2
respectively.
(2 marks)
Therefore, the regular language is closed under intersection.
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
72470
QUESTION_TEXT
Prove that
x.
(2 marks)
(1 mark)
for any integer n and real
Solution: Case i: The proof is clear when x is an integer.
Case ii: Suppose that x is any real. Then
--.-- (i)
SCHEME OF
EVALUATION
Also for any real x, and integer n, x + n <
(ii)
From (i) and (ii)
Take k =
+n x+n<
+ n and y = x + n
+n+1
+n + 1
-----------
-------- (iii)
Then (iii) becomes k
y < k + 1, is real and k is an integer
By rule (1) of 4.5.7, we get
That is,
=k
(10 marks)
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
72471
QUESTION_TEXT
Use the definition of order to show that
Solution: The functions f and g referred to in the definition of Onotation are defined as follows. For all real numbers
and
For all real numbers
SCHEME OF
EVALUATION
Therefore,
where C = 4 and
k = 1.
for all x > 1. Or
Hence,
(10 marks)
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
110657
for all x > k
Verify whether or not the following grammar is ambiguous.
QUESTION_TEXT
S → aS | A
A → aA | a
Consider the two leftmost derivations for the string aaaa.
S
SCHEME OF EVALUATION
⟹
aS
⟹
aaS
⟹
aaaS
⟹
aaaA
⟹
aaaa
Other way:
S
⟹
A
⟹
aA
⟹
aaA
⟹
aaaA
⟹
aaaa