Question

In: Computer Science

Automata Question. Over the alphabet Σ = {a, b}: 1) Give a DFA, M1, that accepts...

Automata Question.

Over the alphabet Σ = {a, b}:

1) Give a DFA, M1, that accepts a Language L1 = { w | w has exactly 2 a’s }

2) Give a DFA, M2, that accepts a Language L2 = { w | w has at least 2 b’s }

3) Give acceptor for L1 intersection L2

4) Give acceptor for L1 - L2

Solutions

Expert Solution

Deterministic Finite Automaton (DFA)

In DFA, for each input symbol, one can determine the state to which the machine will move. Hence, it is called Deterministic Automaton. As it has a finite number of states, the machine is called Deterministic Finite Machine or Deterministic Finite Automaton.

Formal Definition of a DFA

A DFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where −

1. A DFA, M1, that accepts a Language L1 = { w | w has exactly 2 a’s }

sol:

Here b's are free to choose.It means there can be any number of b's.

2.A DFA, M2, that accepts a Language L2 = { w | w has at least 2 b’s }

sol:

3.Acceptor for L1 intersection L2

4. Acceptor for L1 - L2

NOTE: Always remember for constructing DFA ,for problems like start,exactly,atmost it will require dead state and no dead state required for end,atleast,contain.

  • Q is a finite set of states.

  • is a finite set of symbols called the alphabet.

  • δ is the transition function where δ: Q × ∑ → Q

  • q0 is the initial state from where any input is processed (q0 ∈ Q).

  • F is a set of final state/states of Q (F ⊆ Q).

  • Graphical Representation of a DFA

  • A DFA is represented by digraphs called state diagram.

  • The vertices represent the states.
  • The arcs labeled with an input alphabet show the transition.
  • The initial state is denoted by an empty single incoming arc.
  • The final state is indicated by double circles.

Related Solutions

3. Are the following languages A and B over the alphabet Σ = {a, b, c,...
3. Are the following languages A and B over the alphabet Σ = {a, b, c, d} regular or nonregular? • For a language that is regular, give a regular expression that defines it. • For a nonregular language, using the pumping lemma prove that it is not regular. (a) A = {d 2j+1c k+1 | j ≥ k ≥ 0} · {c r+2b 2s+3 | r ≥ 0 and s ≥ 0} (b) B = {a 2j+2b k+3c j+1...
Consider the language L1 over alphabet Σ = { 0, 1 } where the production rules...
Consider the language L1 over alphabet Σ = { 0, 1 } where the production rules for L1 are as follows: S → TT S → U T → 0T T → T0 T→ 1 U → 0U00 U → 1 Q → λ P → QU Transform this grammar into Chomsky Normal Form, consistent with the CNF specification in the Quick Reference, and using only Variables { S, T, U, V, W, X }. Implement that CNF grammar in...
Construct a dfa that accepts strings on {0, 1} if and only if the value of...
Construct a dfa that accepts strings on {0, 1} if and only if the value of the string, interpreted as a binary representation of an integer, is zero modulo five. For example, 0101 and 1111, representing the integers 5 and 15, respectively, are to be accepted.
Theory of computation: Consider the alphanumeric alphabet Σ = {a, b, . . . , z,...
Theory of computation: Consider the alphanumeric alphabet Σ = {a, b, . . . , z, A, B, . . . , Z, 0, 1, . . . , 9} and let L be the language of all regular expressions over Σ: L = {w ∈ Σ ∪ {∅,(,), ∪, ·, * }* | w is a syntactically legal regular expression over Σ} Give an unambiguous context-free grammar that generates L. The grammar should use the following precedence levels, from...
1. ​M2 consists of: a. ​M1 plus money market mutual funds only. b. ​M1 plus time...
1. ​M2 consists of: a. ​M1 plus money market mutual funds only. b. ​M1 plus time deposits only. c. ​only near-monies. d. ​coins, currency, and checkable deposits only. e. ​M1 plus savings accounts, small time deposits, money market mutual funds, and miscellaneous near-monies. 2. ​The demand for money in an economy is high when the: a. ​real GDP is low. b. ​price level is high. c. ​interest rate is high. d. ​personal tax rate is low. e. ​unemployment rate is...
Using the pigeonhole theorem prove that any set of 220 10-character strings over the alphabet {a,b,c,d}...
Using the pigeonhole theorem prove that any set of 220 10-character strings over the alphabet {a,b,c,d} contains a pair of anagrams.
QUESTION 1 In mice, an allele for brown eyes (B) is dominant over an allele for...
QUESTION 1 In mice, an allele for brown eyes (B) is dominant over an allele for apricot eyes (b). At an independently assorting locus, an allele for tan coat color (t) is recessive to an allele for black coat color (T). A mouse that is homozygous for brown eyes and black coat is crossed with a mouse having apricot eyes and a tan coat. The resulting F1 mice are crossed to produce the F2. a. Diagram the cross, including the...
English Alphabet (A..Z) are represented numerically by (0..25), e.g. A is 0, B is 1, etc....
English Alphabet (A..Z) are represented numerically by (0..25), e.g. A is 0, B is 1, etc. Use Caesar’s Cipher to encrypt the message HELLO WORLD with the Key being 4.
The following language over Σ = {1, #} contains #-separated lists of distinct unary values: A...
The following language over Σ = {1, #} contains #-separated lists of distinct unary values: A = {x1#x2# . . . #xk | k ≥ 0, xi = 1∗ for all i = 1 . . . k, xi 6= xj for all i 6= j} Use the pumping lemma to show A is not regular. In other words, give a string s ∈ A and argue that no matter how you partition s = xyz with |y| > 0,...
Question 1:The standard deviation for a population is σ = 14.7 . A sample of 21...
Question 1:The standard deviation for a population is σ = 14.7 . A sample of 21 observations selected from this population gave a mean equal to 142.30 . The population is known to have a normal distribution. Round your answers to two decimal places. a. Make a 99 % confidence interval for μ . ( Enter your answer; 99% confidence interval, lower bound ,Enter your answer; 99% confidence interval, upper bound  ) b. Construct a 95 % confidence interval for μ...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT