[5560]-581 t. e. (information technology) theory of

15
Total No. of Questions :10] [5560]-581 T. E. (Information Technology) THEORY OF COMPUTATION (2015 Pattern) (Semester-I) Time : 2½ Hours] [Max. Marks : 70 Instructions to the candidates: 1) Neat diagrams must be drawn wherever necessary. 2) Figures to the right indicate full marks. 3) Assume suitable data if necessary. P3625 [Total No. of Pages :3 SEAT No. : Q1) a) Convert the following NFA with -moves into NFA without moves.[6] b) Give formal definitions for the following [4] i) Deterministic finite automata ii) Moore machine iii) Reachable states of P iv) Acceptance of a string by FA OR Q2) a) Construct FA for the following language L. L=[w/w is a binary word of length 4i , i>=1 such that each consecutive block 4 bits contains at least 2 0’s] [8] b) Give difference between moore & mealy machine. [2] P.T.O. CEGP013091 49.248.216.238 03/05/2019 13:23:10 static-238 CEGP013091 49.248.216.238 03/05/2019 13:23:10 static-238 CEGP013091 49.248.216.238 03/05/2019 13:23:10 static-238

Upload: others

Post on 05-Dec-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

1[5560]-581

Total No. of Questions :10]

[5560]-581T. E. (Information Technology)

THEORY OF COMPUTATION(2015 Pattern) (Semester-I)

Time : 2½ Hours] [Max. Marks : 70Instructions to the candidates:

1) Neat diagrams must be drawn wherever necessary.2) Figures to the right indicate full marks.3) Assume suitable data if necessary.

P3625 [Total No. of Pages :3SEAT No. :

Q1) a) Convert the following NFA with -moves into NFA without moves.[6]

b) Give formal definitions for the following [4]i) Deterministic finite automataii) Moore machineiii) Reachable states of Piv) Acceptance of a string by FA

OR

Q2) a) Construct FA for the following language L.L=[w/w is a binary word of length 4i , i>=1 such that each consecutiveblock 4 bits contains at least 2 0’s] [8]

b) Give difference between moore & mealy machine. [2]P.T.O.

CEGP0

1309

1

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238CEG

P013

091

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238

CEGP0

1309

1

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238

2[5560]-581

Q3) a) Show that. [6]

i) . * *.b*ab a

ii) * * *a b a b a b

b) Convert the following grammar to GNF [4]

S ABA AB BA AA A BA aA/ aB bB/ b

ORQ4) a) Write CFG for the following languages. [6]

L= 1 |i j k0 0 j i k

L= 1 2 |i j k0 i j k

b) Convert the following grammar to CNF. [4]

S bA|aBA bAA|as|aB aBB|bs|b

Q5) a) Construct PDA that accepts the language by the following CFG. [8]S SS| (S) | ()

b) Construct post Machine that accepts the following language. [8]

| 0n n nL a b a n

OR

Q6) a) Show that: | 1n n nL a b c n not a CFL. [5]

b) Construct post machine that accepts following language [5]

| 0, 0n mL a b n m

c) Construct PDA that accepts following language | 0n nL a b n . [6]

Write simulation for string ‘aaabbb’

CEGP0

1309

1

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238CEG

P013

091

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238

CEGP0

1309

1

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238

3[5560]-581

Q7) a) Construct a TM to compute 2 | 0n nL a b n Write simulation for thestring.i) abb ii) aabbbb [10]

b) Design TM for the language L={02n} over 0,1 . [8]

OR

Q8) a) Design a TM that multiplies two unary numbers over 1 . Writesimulation for the string 11&111. [8]

b) Design TM to accept the set L of all strings formed with 0&1 and havingsubstring ‘000’. [8]

c) Differentiate between FA & TM. [2]

Q9) a) Prove that [8]i) AREX= {<R,W>| R is a regular expression that generates string

w} is a decidable language.

ii) ECFG= G | Gisa CFG and (G)L is a decidable language.

b) Explain class P with two examples. [8]

OR

Q10)a) Prove that ATM= , | M isa TMandaccepts wm w is undecidable [8]

b) Explain post correspondance problem. [8]

CEGP0

1309

1

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238CEG

P013

091

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238

CEGP0

1309

1

49.2

48.2

16.2

38 0

3/05

/201

9 13

:23:

10 st

atic

-238

��� �� ���������� ����������������� �� ����� � ��������� ��������� ���� ������������

�� ������������������������������������ ���� ���!" ����� �������������������� ����� �������� ����� �����#$%&'���

�� ����� �������� ���� ��������������� �(����"��� ����� ������������������������������� "

)�

��� �� ���������� ����������������� � ���

�� ���

��� *��

���� *����

�� � ����������� �������� �������������� ��� �������+�,����+�,��,����+�����-+�

������������� �����������

��������������� �����

����������� � ������������������������������� ���!"#�$�%�&

�'����"(������

����������� �� �������� ���������� ��������������������������

�� ����������� �����������������������������������������

�� ���� � ���������� �� ��� � !���"����#�����$�

�� ������ �� ���%� ����� & ��#�����$�

"�)��

�����

���������

CEGP0

1309

1

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238CEG

P013

091

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238

CEGP0

1309

1

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238

���������� �

�� -���������������������� ����� ��������� ����� �����#�%�' ����� ����� ����������������������������"��� ����� ����������������������� ��.�"

�� �� /�������������� ���

�� 0�� ���� 1�����2������

��� 2� �����1�����2������

�� -�������1�����2����������34�5��6��" ���

�� -�������1�����2�������������� ������� { | 1}n n nL a b a n� � "���

)�

��� �� /�������������� ���

�� 0��� �� ����� ���"

��� ��� ���������12"

�� -�������1�����2����������34���6��" ���

�� -������1�����2������������������������7�� ��������$.����&.�� ���3#$%&'" ���

��� �� 8�� � ��-�9����� ��������������%��������������: ����.�� �����" ���

�� ������8��������� ����� �������� ���

2{ | 0}n nL a b n� �

�� ��� ��������;�����,�������������������� �" ���

)�

� � �� -�� ������ �����-�<�8��� ���

�����+�

�����+�+��

�� ������-�9������� �������������������������� ��������"���

CEGP0

1309

1

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238CEG

P013

091

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238

CEGP0

1309

1

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238

����������

�� ��� ��������������8��� ���

�� ,����� ���

��� ,��������

��� �� ��� ���1����� ����=������ ����� ��" ���

�� >����:���;� .�� ������������� ���������1������������?���

�� ��� �������������� ��8��� ������������ �" ���

)�

��� �� 8�� �������������� ��8��� ����*8����� ��" ���

�� /�������������8� ������ 1�����������?��� ����������� ������ �" ���

�� �����������������8���*8� �����" ���

����

CEGP0

1309

1

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238CEG

P013

091

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238

CEGP0

1309

1

49.2

48.2

16.2

38 3

0/11

/201

8 09

:41:

49 st

atic

-238

������������� �����������

�������������� ������

������� �� ��

���� ����� ������� �����

���������������������

��� !��"�� �������������� �� �������� �������

���� ��������������������������

�� ����������� �����������������������������������������

�� ���� � ���������� �� ��� � !���"����#�����$�

�� ������ �� ���%� ����� & ��#�����$�

�����

��� �� �������� ��������������������������������������� ���

����������������������������� ��

����������������������������� ��

����������������������������� ����� ��

�� !"#����������##������������$������"#�����������%�"������������$�#�������

�� &����������������� ���

������'�(��)�'�����'

����*�������)�'�����'

+$

��� ��� ���������������������(��������,�������������-�������������'�����#�.���

�� &����$��#�������#�#������������������������"#�������������#'#�����''������������#�#����������������������. ���

�� ������������������������'���/������#�����������''�. ����

0���*��������*������#��������

�12��3�4��

�12�

3�12�

���,���*�����)�.������

���������

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

����������

��� �� ������%����'������.�!"#���������,������'����������. ���

�� &������������������1 ���

�� )��� ���'��������%5

��� ��'#������%5

���� 6�������#����'����%5

�� +��������%����5��������������#����������� ���

0��7�8�.����8�.

�+$

��� �� !"#����������#��������������%5. ���

�� ��������%5����� ����'#��'��������������'��. ���

�� ��������%����5��������������#������������� ���

0������9������7:8�;�������������������������778.

�� �� ������< �.�&������������������#������< �= ���

�� ��������< �����������#��������>������� ���

�� ����������< �����������#�������#������'����������,� ���

����������.��#��������'����������������?��� .

+$

�� �� !"#�����������(�������%�#1 ����#����������"�'#��. ���

�� ����������< �������������/�������������������#���������������� ��. ���

�� ����������)< �����������#������������������������>���2�7� ���

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

���������� �

+$

��� �� &����������'�������)<1�#����'�=�@�����������%�,������������'��#����'����)<�#����'. ���

�� !"#����� ����,���"� ��,��#����'� ��� ���� �����"�� ��� #�����'���� ��'��������.�@��������������������"�'#��. ���

+$��� �� &����������������� ���

�� A���������������� <��������#��������<����'

�� &�������A��,�����%����5������=���''�������������#���'������#�����������������������'�. ���

���

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

CEGP0

1309

1

49.2

48.2

16.2

38 0

2/05

/201

8 14

:04:

49

��� �� �������� ��������������������������������������� ���

���������������������������������

�������������� ��������������������!����

��������������"���#�������������!�������$���"���

�� %���������&���&

�������'������&

����&

����������(�� ���

)���

�*&���������&��&��

�*&��'�����&

��

�*&��������

�*&���'�����&

���&

��

������������&�"������ ��+

�� )������������������, ���

�� ���!�-��(�!�����!

��� .�������(�!�����!

/0

��� �� ���������������������-��������"�������������1����������!����!��+���

�� ����������2��������2�����!������������������'$����! ��!����������"����������!��+ ���

������������� �����������

��������������� �����

����������

�� ���������������������

������������ !"#�$

��������� ������������ �� �������� �������

���� ��������������������������

�� ����������� �������������������������������

�� ����� ��������������� � !���"����#�����$�

�� ������%� ���&������ '��#�����$�

�����

���������

������

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

���������� �

�� )������.�������"�����%��, ���

�� %������������������������������������&����!�������$�������$�

��� %������������������������������������������$�������$���������������3��$�

��� �� ������4����2������+���!!������������������� ���������4���2������+ ���

�� )������������������, ���

�� 5��"�����4����2������

��� 2���6�� ��4����2������

���� %�!�����������4����2������

�� ����������4����2�������������� ������������������"����!������$�������"����!����$���"������������+ ���

/0

��� �� 78 ���������� ��������������42+ ���

�� ��������4����2�����������������������!���+ ���

�� ��������42����6

%����������������������&�����+�����$�������$��+ ���

��� �� ���������������������������9 �+ ���

�� ��������(9 ����������� �������������������������������:��;��#��;�1+���

�� <��������������-�������������0����� ���������:��#��+

������������������������!!�, ���

������:���;��

������#���;��

��������;���

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

���������� �

/0

�� �� )���������������������������������������9 ������ ��������= ���

�� ��������9 ����������� ��������������������������������

���������;�*���;�*���

�� 78 ����������� � ���������%���������������8�! ��+ ���

�� �� )����������!�������(96� ����!�=�>�����������4�"������������!�� ����!����(9� ����!+ ���

�� ������5�������������+�%���?�%4�������@2���A������2������42����

2������������ �����9�"�������?�%4���

�������������+ ���

/0

������ �����������8 �����0����"������0����"������!��������������+���

�� )���������B�-���$���������!=�?�������������"������� ����!�����4����2������= ���

���

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

CEGP0

1309

1

49.2

48.2

16.2

38 2

7/11

/201

7 09

:20:

31

������������� �����������

��������������� �����

��������� ���� ��������� ������������� �����������

������������ ��������������������

����������� ������������������������������������������������

�� ����������� ���������������������������������� ���� � ���������� �� ���������� ����!�����"��� ������ �� ���#� ���� $ ��!�����"�

�����

��� �� �������� ����� � ���

�� ������������ ����������������������������������������������������� ���

�� ����������� ��������� ����������!����� " ���

#����$� � �

� � %�& ' % '

%�' %�'

� " %�'

()

��� �� �������� ����� "� � ����� ����������*��+*�����!������ �����������*���*�����

�������������!�������, ����-�����

.����#��� (������/� �/�

� � � � � � � � � � � � � � � � �

���������

����

CEGP0

1309

1

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36CEG

P013

091

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36

CEGP0

1309

1

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36

����� �� ����

�� ������������� �������������������������������������!���

����+���������������� {0,1}� � � ���

�� �� �����������!���!����������-���� ���

�� )�����-�������0���������

��� .�������������������!���1��2��3�/�1��2��3

�� ���������������� ��������������� {0,1}� � ����������!���)�����-��������1��2���32�1��2���3 ���

�� 4������������������������������&��������5/%������ 6�7�'������������ ���

()

��� �� 8�����������������!���������-�������� ���

�� ������ �������!���������-��������� � "�� ���������� � "�������������������1�2��3���1�2�� ���

�� 4������������������������������&��������5/%����'������������ ���

��� �� 8��� ������ ����� 9#������� ����:!��� ����� ������-� ���������� ���

�� 8��� ��������������������������������!��������������������#��

��� 6� ���

�� 8�������-��������������������!�����������1�2��3��1�2��3����

���

CEGP0

1309

1

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36CEG

P013

091

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36

CEGP0

1309

1

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36

����� �� ����

()

� � �� ;��������"������������������������< ���

��=�6�=�

=��=6�=6�

�� 8�����5��������!�����< ���

#��=6�

��6�#6�

=��6�#6�==

�� 8����� ����������"����������������������"������������� ���#�� 6�=

���6� 6�

=��=6� 6�

���6�

���

���

CEGP0

1309

1

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36CEG

P013

091

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36

CEGP0

1309

1

49.2

48.2

16.2

38 0

8/08

/201

7 11

:02:

28 S

ERV

ER36