The Gateway to Computer Science Excellence
0 votes
36 views

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.  
in Compiler Design by Veteran (59.3k points) | 36 views

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,373 answers
198,511 comments
105,285 users