BRYTNEE WRIGHT LING HOMEWORK

BRYTNEE WRIGHT LING HOMEWORK - Brytnee Wright Dr. De Haan...

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

View Full Document Right Arrow Icon
Dr. De Haan Ling. 178 5/1/08 Homework #10: Regular expressions, FSA and regular languages This homework consists of five sections (A – E). Answers must be typed (no exceptions) and are due in class on Thursday, May 1. You may draw the FSA by hand, but make sure they are legible. Note that honors students have a different assignment, see end of sheet. A. Regular expressions (24 points) Write regular expressions for the following cases. Make sure you account for all eventualities. Assume that the alphabet is {a, b, c, …, z}. 1. Match the string flea 2. Match either the string flea or the string dog 3. Match either the string flea or either the string dog or cat 4. Match any string starting with d, then two symbols that can be anything, then another d 5. Match any string containing at least one a 6. Match any string containing at least one a and two b’s in that order 1. / flea / 2. / flea | dog / 3. / flea | (dog | cat) / 4. / d . . d / 5. / . a* ./ 6. / . (abb)*. / B. FSA (30 points)
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.

Page1 / 3

BRYTNEE WRIGHT LING HOMEWORK - Brytnee Wright Dr. De Haan...

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