hw2f03-sol-post - CS 373 Fall 2003 NMG * SOLUTION *...

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

View Full Document Right Arrow Icon
CS 373 – Fall 2003 – NMG ****** SOLUTION ****************** September 11, 2003, updated 9/18/03 – P10 corrected Homework Assignment 2 Due 9/19/03 (Friday) at the end of class Problems related to chapter 2 : You are advised to study related exercises if solutions are given in the back of the book (3 rd edition). In all problems below, if an NFA is requested, the resulting NFA must have some non- deterministic element. All problems are 10 points each. P1 Consider the “mystery” automata below. Give a reasonably simple explanation of the language it recognizes. Simply sketching a graph for this automata is not an acceptable answer. M = ({s, q, p, f}, {a, b}, δ , s, f ) where δ is given by: δ (s, a) = q δ (s, b) = p δ (q, a) = f δ (q, b) = q δ (p, a) = p δ (p, b) = p δ (f, a) = q δ (f, b) = f Answer: The graph for this automata (not acceptable for an answer) is: L = { (ab n ab m ) p : n, m 0, p > 0 }, where = {a, b} Some students may use a regular expression: (ab*ab*) + or some equivalent. P2
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.

This note was uploaded on 05/07/2010 for the course COMPUTER S 138 taught by Professor Icamarra during the Spring '10 term at UCLA.

Page1 / 7

hw2f03-sol-post - CS 373 Fall 2003 NMG * SOLUTION *...

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