hw3 - A 1 , and a DFA M 2 = ( Q 2 , 2 , 2 , q 2 , F 2 )...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 181 — Winter 2006 Problem Set #3 Formal Languages and Automata Theory Due January 30, 2008 Problem 3.1. (8 points) Give a regular expression for the language ( rb ) * || ( br ) * , where || is the shuFe operator from Homework 2. (±irst construct an ε -move-free ²nite automaton that accepts this language; then transform the automaton into an equivalent regular expression. Hint: At each step of the construction, try to ²nd the simplest automaton for the language). Problem 3.2. (12 points) Given two words x Σ * 1 and y Σ * 2 , we write x ./ y for the word over the alphabet Σ 1 Σ 2 which “zips together” the letters of x and the letters of y : the ²rst letter of x ./ y is the ²rst letter of x ; the second letter of x ./ y is the ²rst letter of y ; the third letter of x ./ y is the second letter of x ; the fourth letter of x ./ y is the second letter of y ; etc. ±or example, finite ./ automata = faiuntiotmeata , deterministic ./ automata = daeutteormmaitnaistic . ±or two languages A 1 Σ * 1 and A 2 Σ * 2 , let A 1 ./ A 2 = { x ./ y : x A 1 and y A 2 } . a. Given a DFA M 1 = ( Q 1 , Σ 1 , δ 1 , q 1 , F 1 ) that accepts
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A 1 , and a DFA M 2 = ( Q 2 , 2 , 2 , q 2 , F 2 ) that accepts A 2 , construct a nite automaton M that accepts A 1 ./ A 2 . Is M deterministic? b. Give a regular expression for the language ( rb ) * ./ ( br ) * , where ./ is the zip operator from Problem 2.1. (irst construct an -move-free nite automaton that accepts this language; then transform the automaton into an equivalent regular expression.) Problem 3.3. (10 points) 1. The construction translating GNAs to regular expressions shows that every GNA is equiv-alent to a GNA with only two states. Show that this property is not true for DAs. In particular, show that for each k > 1, there is a regular language A k { , 1 } * that is recog-nized by a DA with k states but not by any DA with only k-1 states. 2. Show that { w | w contains an equal number of occurrences of the substrings 01 and 10 } is regular....
View Full Document

This note was uploaded on 06/03/2008 for the course CS 181 taught by Professor Rupak during the Winter '08 term at UCLA.

Ask a homework question - tutors are online