The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+17 votes
586 views

Construct DFA's for the following languages:

  1. $L=\left\{w \mid w \in \{a,b\}^*, \text{ w has baab as a substring } \right\}$
  2. $L=\left\{w \mid w \in \{a,b\}^*,  \text{ w has an odd number of a's and an odd number of b's } \right\} $
asked in Theory of Computation by Veteran (59.4k points)
edited by | 586 views

2 Answers

+19 votes
Best answer

DFA for A:

Part (B):

 

answered by Loyal (8.3k points)
selected by
+15 votes

DFA for (B)

answered by Boss (42.4k points)
edited by
+1
q3 will be final.

q1 is for odd no of a's and even no of b's as it accepting a, bba, etc.
0
Updated.


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

34,770 questions
41,730 answers
118,876 comments
41,381 users