Question

1. (15) Let I be the language over {a, b, c} accepting all strings so that: 1. No bs occur before the first c. 2. No as occ

1. Let L be the language over {a, b, c} accepting all strings so that: 

1. No b's occur before the first c. 

2. No a's occur after the first c. 

3. The last symbol of the string is b. 

4. Each b that is not the last symbol is immediately followed by at least two d's. 


Choose any constructive method you wish, and demonstrate that L is regular. You do not need an inductive proof, but you should explain how your construction accounts for each rule.

0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

Here is a DFA which accepts the given language. All missing transitions go to the reject state.

a b C C C 4

In the given DFA, the state 1 takes any number of 'a's before seeing a 'c'. Therefore it ensures that there are no 'a's after the first 'c'. Similarly, there will be no 'b' before the first 'c' as there is no allowed transition for that. After the first 'c' is seen, it moves to state 2.

At state 2, it allows any number of 'c's, and then if it sees a 'b', it moves to final state 3. Therefore, if 'b' is the last letter, the word will be accepted. Otherwise, if 'b' is not the last letter, then it goes to state 4 which comes back to state 2, therefore at least two 'c's have been seen after the 'b'.

This covers all the rules as required, proving that the language is regular.

Comment in case of any doubts.

Add a comment
Know the answer?
Add Answer to:
Let L be the language over {a, b, c} accepting all strings so that:
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • 1. (15) Let L be the language over {a,b,c} accepting all strings so that: 1. No...

    1. (15) Let L be the language over {a,b,c} accepting all strings so that: 1. No b's occur before the first c. 2. No a's occur after the first c. 3. The last symbol of the string is b. 4. Each b that is not the last symbol is immediately followed by at least two c's. Choose any constructive method you wish, and demonstrate that is regular. You do not need an inductive proof, but you should explain how your...

  • (20) Let L be the language over {a,b,c} accepting all strings so that: 1. No b's...

    (20) Let L be the language over {a,b,c} accepting all strings so that: 1. No b's occur before the first c. 2. No a's occur after the first c. 3. The last symbol of the string is b. 4. Each b that is not the last symbol is immediately followed by at least two c's. 5. There are exactly as many a's as b's. Construct a context-free grammar generating L. You do not need an inductive proof, but you should...

  • Choose any constructive method you wish, and demonstrate that L is regular. You do not need...

    Choose any constructive method you wish, and demonstrate that L is regular. You do not need an inductive proof, but you should explain how your construction accounts for each rule. Let L be the language over {a,b,c} accepting all strings so that: 1. No b's occur before the first c. 2. No a's occur after the first c. 3. The last symbol of the string is b. 4. Each b that is not the last symbol is immediately followed by...

  • Construct a context-free grammar generating L. You do not need an inductive proof, but you should...

    Construct a context-free grammar generating L. You do not need an inductive proof, but you should explain how your construction accounts for each rule. Let L be the language over {a,b,c} accepting all strings so that: 1. No b's occur before the first c. 2. No a's occur after the first c. 3. The last symbol of the string is b. 4. Each b that is not the last symbol is immediately followed by at least two d's. 5. There...

  • Construct a deterministic finite automaton accepting all and only strings in the language represented by the...

    Construct a deterministic finite automaton accepting all and only strings in the language represented by the following regular expression: ((a U c)(b U c))* U = symbol for union in set theory

  • Give regular expressions for the following languages: (a) The language of all strings over {a,b} except...

    Give regular expressions for the following languages: (a) The language of all strings over {a,b} except the empty string. (b) The language of all strings over {a,b} that contain both bab and bba as substrings. (c)L k = {w ∈ {a,b} * | w contains a substring having 3 more b’s than a’s}. (d) The language of all strings over {a,b} that have a b in every odd position (first symbol is considered position 1; empty string should be accepted)...

  • 1(a)Draw the state diagram for a DFA for accepting the following language over alphabet {0,1}: {w...

    1(a)Draw the state diagram for a DFA for accepting the following language over alphabet {0,1}: {w | the length of w is at least 2 and has the same symbol in its 2nd and last positions} (b)Draw the state diagram for an NFA for accepting the following language over alphabet {0,1} (Use as few states as possible): {w | w is of the form 1*(01 ∪ 10*)*} (c)If A is a language with alphabet Σ, the complement of A is...

  • 1. Construct a DFSM to accept the language: L = {w € {a,b}*: w contains at...

    1. Construct a DFSM to accept the language: L = {w € {a,b}*: w contains at least 3 a's and no more than 3 b's} 2. Let acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E ', let W denote the string w with the...

  • DO NUMBER 4 AND 5 2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta,...

    DO NUMBER 4 AND 5 2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E X", let W denote the string w with the a's and b's flipped. For example, for w aabbab: w bbaaba wR babbaa abaabb {wwR Construct a PDA to accept...

  • 3) Construct a regular expression defining each of the following languages over the alphabet {a, b}....

    3) Construct a regular expression defining each of the following languages over the alphabet {a, b}. (a) L = {aab, ba, bb, baab}; (b) The language of all strings containing exactly two b's. (c) The language of all strings containing at least one a and at least one b. (d) The language of all strings that do not end with ba. (e) The language of all strings that do not containing the substring bb. (f) The language of all strings...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT