# Thread: CS402 4th assignment, July, 2010

1. ## CS402 4th assignment, July, 2010

Question No 1: Marks: 5

Find the prefixes of Q in R where Q and R are languages given below:

Q={ ababa , aabbbbbbb,baabba , babbaaaaaa }

R={ aababa , bbaabba , bbaababa, aaaabbbbbbb, abbabbaaaaaa}

Question No. 2

By marking the states, decide whether the following FA accepts any word or not? Marks: 5

Note: Show all steps

Question No. 3 Marks: 5

Describe the language (in English) generated by the following CFG:

S  XY
X  aX | bX | 
Y  baa | bab | bba | bbb

Question No. 4 Marks: 5

Construct the CFG that generates the language L = {w  {a, b}*: length(w)  2 and w begins with b and ends in aa or bb}.

plz give me solution................

3. is ki file upload karo in word format, cant understand

4. ## CS402 5th assignment, July, 2010

Question No 1:

Find the prefixes of Q in R where Q and R are languages given below:

Q={ ababa , aabbbbbbb,baabba , babbaaaaaa }

R={ aababa , bbaabba , bbaababa, aaaabbbbbbb, abbabbaaaaaa}

Question No. 2

Describe the language (in English) generated by the following CFG:

S --> XY
X --> aX | bX | lambda
Y --> baa | bab | bba | bbb

Question No. 3
Construct the CFG that generates the language L = {w belong to {a, b}*: length(w) >= 2 and w begins with b and ends in aa or bb}.

5. file dear upload karain na ais ki

6. ## Solution of CS402 Assignment 5 July 2010

Question No 1: Describe the language (in English) generated by the following CFG
S → aA | bB
A → aS | bC
B → aC | bS| Λ
C → bA | aB
This CFG accepts those strings that have even number of a’s and odd number of b’s.

CS402Assignment5Solution.pdf

7. ## cs402

this is respective assignment with 15th july due date

8. Due date 15th july

9. thanks good solution.

10. This wrong solution. U have uploaded solution of some other questions plz see my questions as uploaded.........

11. U r not smart enough dear.....................................wrong answers...