0% found this document useful (0 votes)
22 views5 pages

MC 220204003

This document contains the solutions to two questions on a CS402 assignment. Question 1 involves finding the new values of A and B and the output value for a sequential circuit with given input, old A, and old B values. Question 2 involves (a) proving a language is regular or non-regular using the Myhill-Nerode theorem and (b) finding the set of prefixes of strings in T that are also in set U.

Uploaded by

Hurayra Kayani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

MC 220204003

This document contains the solutions to two questions on a CS402 assignment. Question 1 involves finding the new values of A and B and the output value for a sequential circuit with given input, old A, and old B values. Question 2 involves (a) proving a language is regular or non-regular using the Myhill-Nerode theorem and (b) finding the set of prefixes of strings in T that are also in set U.

Uploaded by

Hurayra Kayani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

CS402 Assig nment 2

Mc220204003

Question: 1 Marks =3+3+4 3

a) Consider the following sequential circuit.

If

Input=1

Old A= 0

Old B= 1

Then find:

1. New Value of A
2. New Value of B
3. Value of Output

Solution:-

New Value of B = old A = 0

New A = (input) XOR (is old A OR old B)

= (1) XOR (0 OR 1)

= 1 XOR 1
New value of A = 0

Output = (Input) AND (OLD B)

= 1 AND 1

=1

a) Consider the following TG1 and TG2 and find the resultant TGr which is equal to the
concatenation of TG1 and TG2.

TG1

TG2
SOLUTION:-

b) Find the complement of the following FA:


SOLUTION:-

Question, 2: Marks =5+5

a) Prove by Myhill Nerode theorem that the following language is regular or non-regular.

The language L defined over Σ = {u, v} in which all the strings ends with v.

SOLUTION:-
It can be observed that the L partitions into the following two classes that are

C1=set of all the string ending in v

C2=set of all the string not ending in v

Since there are finite many classes generated by L is regular

a) Let T = {xx, xyxxxyy, yyxxxxx, yyyyyyyyyy} U = {y, yyyy, yyyxxx, yyyxxxxx,


xyxxxyyxx, xyyxxyyyxx}

Then find pref (T in U).

SOLUTION:-

Pref(T in U) = {y, xyxxxyy, yyyx, yyyxxx}

You might also like