key6fa00 - COT3100.01, Fall 2000 S. Lang Solution Key to...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COT3100.01, Fall 2000 S. Lang Solution Key to Assignment #6 (40 pts.) 11/30/2000 Let a , b , c denote distinct symbols for the following questions: 1. Give a regular expression for each of the following languages (no proof is required but brief explanations are encouraged): (a) The set of strings over { a , b } that contain exactly two occurrences of symbol a and at least one occurrence of symbol b . bb * ab * ab * + b * abb * ab * + b * ab * abb *. Explanation (FYI): The first term bb * ab * ab * represents those strings that contain two a ’s with at least one b before the first a ; similarly, the second term b * abb * ab * represents those strings that contain two a ’s with at least one b between the two a ’s; and the third term b * ab * abb * represents those strings that contain two a ’s with at least one b after the second a . (b) The set of strings over { a , b } that contain the substring aa but do not contain the substring bb . ( a *( baa *)* + a *( baa *)* b ) aa ( a *( baa *)* + a *( baa *)* b ). Explanation (FYI): The expression ( baa *)* is used to ensure each b (if any) is followed by at least one a before the next b ; therefore guaranteeing no occurrences of two consecutive b ’s. Thus, the term a *( baa *)* represents strings with possible leading a ’s but no occurrences of substring bb ; the other term a *( baa *)* b covers those strings with an ending single b . 2. Prove the following identities of regular expressions based on the known properties and laws about regular expression (see below for a list of laws and properties). Be sure to explain each step of the proof by quoting the law or property being applied. When using Law 18 below, because it has many
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 06/09/2011.

Page1 / 2

key6fa00 - COT3100.01, Fall 2000 S. Lang Solution Key to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online