CS381-2002fa-prelim1 - What is the regular expression for 2...

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

View Full Document Right Arrow Icon
CS381 First Mid Term Monday Oct 7, 2002 Fall 2002 Olin 155 9:05-9;55 This is a 50 minute in class closed book exam. All questions are straight forward and you should have no trouble doing them. Please show all work and write legibly. Thank you. 1. Write a regular expression for the set of all strings of 0’s and 1’s such that the number of occurrences of the substring 01 is even. Zero occurrences is even. Argue in English that your regular expression is correct. 2. Let k ij R be the regular expression denoting all strings that take a finite automaton from state i to state j without going through any state numbered higher than k. (a) Give the formula for k ij R in terms of l ij R for l<k. (b) What is the regular expression for 2 34 R for the above state diagram? (c)
Background image of page 1

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

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

Unformatted text preview: What is the regular expression for 2 43 R for the above state diagram? You do not need to use the formula in (a) to get your answer to parts (b) and (c). Over 1 2 3 4 0 0 1 0 1 1 0 1 3. Let ) , , , , ( F q Q M = be a deterministic finite automata. Let K= |} | | | ), ( * | { x y M L y and x x = . (a) Describe in English the set K. (b) Construct a nondeterministic finite automaton ) , , , , ( 2 02 2 2 2 F q Q M = accepting the set K. 4.Let R be a regular set over the alphabet } , { b a = . For each string in R replace the first occurrence of the substring baa by ba. Let R be the resulting set of strings. Show by using homomorphisms, inverse homomorphisms and intersection with regular sets that R is regular....
View Full Document

This homework help was uploaded on 01/29/2008 for the course CS 3810 taught by Professor Hopcroft during the Fall '07 term at Cornell University (Engineering School).

Page1 / 2

CS381-2002fa-prelim1 - What is the regular expression for 2...

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