RU beehive logo ITEC dept promo banner
ITEC 420
2021fall
ibarland

DFAs
hw02

  1. Exercise 5.13.1 (describe-the-machine's language).
    hint: You should use the words even and/or odd, and might or might not need to include the phrases 0 or more or 1 or more.
    hint: My own solution has about 20 words filling in the blanks.
  2. Using the machine from the previous problem:
    1. Give the computation determined by the string aabaa.
      hint: The computation consists of a sequence of six configurations, separated by the yields turnstile . Each configuration is an ordered pair: ⟨current-state, remaining-input⟩. The book's Example 5.2 has an example as its last paragraph (but omitting the s, sadly).
    2. State whether or not the string is accepted, and use the formal definitions of the machine and of accepting/rejecting a string (p.42+15=57(pdf) to justify your answer.
      hint: Your answer will begin with The string aabaa is/isn't accepted because….
  3. Exercise 5.13.2 (draw DFAs), parts a,c,d,f,g,j. Give your answer as a drawing.
  4. Exercise 5.13.2 (specify DFAs), parts a,c. This time, specify your answer formally (in math), as in the second sentence of the book's Example 5.2 (pg 43 = 58-15).
  5. Exercise 5.13.3 (RPS-win-by-2).
    hint: I drew my answer with most states having three outgoing arrows, each of those arrow labeled with three elements of Σ.
    convenience: You may simply label an arrow Σ to denote that all inputs should follow that arrow.
    1. Give a DFA which accepts the language of strings starting with ba.
    2. Give a DFA which accepts the language of strings not starting with ba.
      hint: There is a no-brain solution, once you have solved part (a).
  6. Draw a DFA which accepts the language \( \{ w \in \{a,b\}^* : w \textrm{ contains }{\tt aa}\textrm{ somewhere.} \} \)
  7. Draw a DFA which accepts the language \( \{ w \in \{a,b\}^* : |w| ≥ 2 \textrm{ and } w \textrm{ has different first and last letters.} \} \)
  8. Draw a DFA which accepts the language {ε}. Assume the alphabet is {a,b}. Be sure to include all transitions.
  9. Draw a DFA which accepts the language {}. Assume the alphabet is {a,b}. Be sure to include all transitions.
  10. Exercise 5.13.4 (simple property).
    hint: Your answer should be three characters long, using math notation that involves some components of the five-tuple ⟨K, Σ, δ, s, A⟩.

I strongly recommend drawing your machines by hand. (though you might well redraw your machine more neatly, once you have it figured out). But if you want to run your machine to see if it works, you may use a site like automatonsimulator.com/. Some of the not-quite-intuitive directions for that page:

If you just want to get a pretty-picture of a FSM you type in, you can use ivanzuzak.info/noam/webapps/fsm_simulator/, but it doesn't have the nice testing feature of the previous site.


1 If a convention simplifies/streamlines code or a technical answer, it suggests that it's a superior spec.      
2 I mildly suggest creating an account on bit.ly so that you can later recover or create your URLs.      

logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.