# HW3Answers - CS 341 Automata Theory Elaine Rich Homework 3...

This preview shows pages 1–5. Sign up to view the full content.

CS 341 Automata Theory Elaine Rich Homework 3 Answers 1. Construct a deterministic finite state machine to accept each of 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.

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

View Full Document
e) The set of binary strings with at most one pair of consecutive 0’s and at most one pair of consecutive 1’s. f) The set of all binary strings with the property that none of its prefixes ends in 0. g) {w is an element of {a, b}*: # a w + 2# b w is divisible by 5}. (# a w is the number of occurrences of the symbol a in w).
2. Construct a nondeterministic finite state machine to accept each of the following languages: a) { a n ba m : n, m ≥ 0, n ≡ 3 m} b) The set of binary strings that contain both substrings 101 and 010.

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

View Full Document
3. Let L be a subset of Σ*. Define the following languages. Pref (L) = {w is an element of Σ*: x=wy for some x an element of L, y element of Σ*} (The prefixes of L) Suf (L) = {w is an element of Σ*: x=yw for some x an element of L, y element of Σ*} (The suffixes of L) Max (L) = {w is an element of L: if x ≠ ε then wx is not an element of L} Show that if L is accepted by some finite automaton, then so is each of the
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/03/2009 for the course CS 341 taught by Professor Rich during the Fall '08 term at University of Texas.

### Page1 / 6

HW3Answers - CS 341 Automata Theory Elaine Rich Homework 3...

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

View Full Document
Ask a homework question - tutors are online