{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw3 - A 1 and a DFA M 2 = Q 2 Σ 2 δ 2 q 2 F 2 that...

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 GN±As to regular expressions shows that every GN±A is equiv-alent to a GN±A with only two states. Show that this property is not true for D±As. In particular, show that for each k > 1, there is a regular language A k ⊆ { , 1 } * that is recog-nized by a D±A with k states but not by any D±A 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

  • Winter '08
  • Rupak
  • Formal language, Regular expression, Nondeterministic finite state machine, Automata theory, -move-free finite automaton

{[ snackBarMessage ]}

Ask a homework question - tutors are online