edited by
2,423 views
2 votes
2 votes

Write regular definitions for the following languages:

  1. All strings of lowercase letters that contain the five vowels in order.
  2. All strings of lowercase letters in which the letters are in ascending lexicographic order.
  3. Comments, consisting of a string surrounded by /* and */, without an intervening */, unless it is inside double-quotes ("). 
  4. All strings of digits with no repeated digits. Hint: Try this problem first with a few digits, such as $\{0,1,2\}$.
  5. All strings of digits with at most one repeated digit.
  6. All strings of a's and b's with an even number of a's and an odd number of b's.
  7. The set of Chess moves, in the informal notation, such as $p-k_{4}$ or $kbp \times qn$.
  8. All strings of a's and b's that do not contain the substring abb.
  9. All strings of a's and b's that do not contain the subsequence abb.  
edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
4