Home4RegExs - CS 341 Automata Theory Elaine Rich Homework 4...

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

View Full Document Right Arrow Icon
CS 341 Automata Theory Elaine Rich Homework 4 Due Thursday, Sept. 28 at 11:00 1) Write regular expressions for the following languages: a) The set of binary representations, without leading 0’s, of integers that are divisible by 4. b) The set of binary representations, without leading 0’s, of integers that are powers of 4. c) The set of binary strings that have at least one occurrence of the substring 001. d) The set of binary strings that have no substring 001. e) The set of binary strings with at most one pair of consecutive 0’s and at most one pair of consecutive 1’s. (This one is tricky and there isn’t a simple answer.) f) The set of all binary strings with the property none of its prefixes ends in 0. g) { x {0, 1}* : 5 y {0, 1}* | xy | is even} 2) Let L = { w { a , b }* : w contains bba as a substring}. Find a regular expression for { a , b }* - L . 3) Consider the following FSM M . Show a regular expression that describes L ( M ). 0 a 1 b 3 b a b 2 4) Let L = { w { a , b }* : w contains an even number of a ’s and an odd number of b’s }. Write a regular grammar for L . 5) Let L = { w { a , b }* : w contains at least one of baaba or bababb as a substring}. a) Write a regular expression that describes L .
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 / 4

Home4RegExs - CS 341 Automata Theory Elaine Rich Homework 4...

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