Are there any steps or rules to draw a DFA?

Are there any steps or rules to draw a DFA?

  • In my first lecture of "Theory of Automata", after giving some concepts of Alphabet, Language, transition function etc. and a couple of simple automata of an electric circuit with one and two switches, is this question. I understand what an Alphabet as well as the Language of a DFA is, but are there any rules or steps to followed to reach a correct automaton for a given Language? Or we just have to imagine and think in our mind and get to a solution which satisfies the given Language? Note:- Please keep your language as simple as you can, since this is my first lecture and I am not yet aware of concepts like regular expressions or any other thing in the subject for that matter.

  • Answer:

    Yes, there are procedures that help you draw a DFA. One of them is to draw first an NFA (Non deterministic finite automaton), if we cannot draw instantly a DFA. We humans cannot with ease draw a DFA, especially for a complex language as you've seen. So we draw a NFA which is closer to our understanding. Then, rules are applied on the NFA in order to transform it into DFA. You will see that later on class. Generally, in order to draw a NFA maybe we will use (only) a bit our imagination. With a given language, we firstly have to understand what is doing and after that we can start drawing pieces of the puzzle.

Solace at Computer Science Visit the source

Was this solution helpful to you?

Other answers

Do not confuse defining an automaton and drawing an automaton. The drawing is intended as a support for better intuition, and because it can often be read more easily in a single look. That is what drawing are usually for. However, you are supposed to actually (be able to) give a formal definition, with the mathematical notation you learned, including specifying the transitions (not necessarily one by one). In your example you could say, after specifying the transitions for the accepted string: this is completed by all transitions on terminals not yet considered in each state, each going to $q_{die}$, and all transitions on $q_{die}$ going back to it. Even this can be said more formally. It is up to you, and to your instructor, to decide on the proper level of formalism. A drawing is usually enough in simple cases, as it is clear how to get the formal mathematical definition from it. But for some more abstract problems, drawings are inconvenient, and the mathematical notation is much more easily used. Up to you to decide. Constructing the automaton, as drawing or as math definition, depends on the problem at hand. There are many way, and your problem may often be to find the right one. Much of your course will be to teach you ways of building automata. These are only early and very simple exercises. One point worth remembering. In order not to clutter drawings or descriptions, the state $q_{die}$ (or some equivalent states) is often onitted, as well as all transitions leading only to it (the reader is supposed to complete as I explained above). This is convenient, but dangerous ... some constructions or reasonnings based on automata rely on the fact that all transitions are taken into consideration ... and you may forget those that do not show explicitly.

babou

The answer to your first question is YES for regular languages: there are indeed some algorithms to compute a DFA for a given regular Language. These algorithms should be given in the future lessons of your course. Or we just have to imagine and think in our mind and get to a solution which satisfies the given Language? You can just apply one of the algorithms (or use a computer to do it for you). However, for simple cases, you can sometimes guess the solution by yourself, but this needs practice.

J.-E. Pin

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.