Question

Design a DFA with 2 states that accepts the language of all binary numbers that are...

Design a DFA with 2 states that accepts the language of all binary numbers that are divisible by 3. Demonstrate it with a two-state DFA and a proof that the accepted language is precisely binary strings representing numbers divisible by 3. Otherwise, prove that such a two-state DFA is impossible.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let us find the Minimal DFA that accepts the language of all binary numbers that are divisible by 3.

  • State q0 reached if reminder is 0. State q0 is the final state(accepting state) because if remainder is 0 it is divisible by 3. It is also an initial state.
  • As the divisor is 3 the number of remainders are {0,1,2} = 3. So take 3 states.
  • q0 is the state which accepts if the remainder is 0
  • q1 is the state which accepts if the remainder is 1
  • q2 is the state which accepts if the remainder is 2

  • Initially the transition is on the state q0. δ:(q0, 0)→q0.   On seeing the input the transition is on to the same state q0.
  • To process the number 1 then the binary string '1' there should be a transition rule δ:(q0, 1)→q1

  • To process the number 2 then the binary representation is '10', end-state should be q2, and to process '10', we just need to add one more transition rule δ:(q1, 0)→q2

  • To process the number 3 then the binary it is '11', end-state is q0, and we need to add a transition rule δ:(q1, 1)→ q0 because the remainder is 0 in where state q0 is already defined.

  • Decimal Binary Remainder End State
    0 0 0 q0
    1 1 1 q1
    2 10 2 q2
    3 11 0 q0
    4 100 1 q1
    5 101 2 q2
    6 110 0 q0
    7 111 1 q1
  • Similarly we can construct the minimal dfa that accepts strings that are divisible by 3.
  • Here q0 is final state and initial state.

This is the final and minimal DFA that accepts the laguage of all binary numbers that are divisible by 3.

with this minimal DFA we can not remove any state to form 2 state dfa that accepts the language of all binary numbers that are divisible by 3.

So we can conclude that a two state DFA is not possible such that it accepts the language of all binary numbers that are divisible by 3.

In general for accepting al language of all binary numbers that are divisible by "n" requires "n" - State DFA.

Add a comment
Know the answer?
Add Answer to:
Design a DFA with 2 states that accepts the language of all binary numbers that are...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Part B - Automata Construction Draw a DFA which accepts the following language over the alphabet...

    Part B - Automata Construction Draw a DFA which accepts the following language over the alphabet of {0,1}: the set of all strings such that the number of 0s is divisible by 2 and the number of 1s is divisible by 5. Your DFA must handle all intput strings in {0,1}*. Here is a methodical way to do this: Figure out all the final states and label each with the shortest string it accepts, work backwards from these states to...

  • Draw a DFA which accepts the following language over the alphabet of {0,1}: the set of...

    Draw a DFA which accepts the following language over the alphabet of {0,1}: the set of all strings such that there are no consecutive 0s, and the number of 1s is divisible by 5. Your DFA must handle all intput strings in {0,1}*. Here is a way to approach the problem: First focus only building the DFA which accepts the language: As you build your DFA, label your states with an explanation of what the state actually represents in terms...

  • Draw a DFA which accepts the following language over the alphabet of {0,1}: the set of...

    Draw a DFA which accepts the following language over the alphabet of {0,1}: the set of all strings such that there are two consecutive 0s or the number of 1s is not divisible by 5. Your DFA must handle all intput strings in {0,1}*. (Hint: look at solution of previous question)

  • I need to design DFA that accepts binary number divisible by 9. I know I need...

    I need to design DFA that accepts binary number divisible by 9. I know I need 9 states and use the mod operator. but having difficulty figuring all the edges thanks. This is not a question from my homework but related.

  • Question 1: Design a DFA with at most 5 states for the language L1 = {w...

    Question 1: Design a DFA with at most 5 states for the language L1 = {w ∈ {0, 1}∗ | w contains at most one 1 and |w| is odd}. Provide a state diagram for your DFA. Approaching the Solution --since we haven’t really practiced this type of assignment (i.e. had to define our machine based on only having the language given; not the formal 5 tuples), I am providing the steps for how to work through this; you are...

  • Draw a DFA that accepts all binary strings of length 4 modulo 7.

    Draw a DFA that accepts all binary strings of length 4 modulo 7.

  • Design a DFA that accepts the set of all strings with 3 consecutive zeros at anywhere?

    Design a DFA that accepts the set of all strings with 3 consecutive zeros at anywhere?

  • (g) If there is an NFA with s states which accepts a language L, then we...

    (g) If there is an NFA with s states which accepts a language L, then we can construct a DFA which accepts the same language and has: (circle the smallest correct answer a) s states b) 2s states d) 2 states (h) If there is a DFA which accepts a language A with s states and another whiclh accepts language B with t states, then we can construct a DFA which accepts An B which has (circle the smallest correct...

  • Create a DFA for the language L = {w ∈ {0, 1}∗ : w is a...

    Create a DFA for the language L = {w ∈ {0, 1}∗ : w is a set of strings with 011 as a substring AND is not divisible by 3 }. First, create two separate DFAs for is a set of strings with 011 as a substring and not divisible by 3. Then, create the intersection between those DFAs by using the product construction. Show all your work. Hint: Use the least amount of states as possible.

  • 2. Let L = {hMi: M is a Turing machine that accepts at least two binary strings}. a) Define the notions of a recognisabl...

    2. Let L = {hMi: M is a Turing machine that accepts at least two binary strings}. a) Define the notions of a recognisable language and an undecidable language. [5 marks] b) Is L Turing-recognisable? Justify your answer with an informal argument. [5 marks] c) Prove that L is undecidable. (Hint: use Rice’s theorem.) [20 marks] d) Bonus: Justify with a formal proof your answer to b). [20 marks] 2. Let L-M M): M is a Turing machine that accepts...

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