sampleex02

sampleex02 - procedure described in class. Question 4 (5...

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

View Full Document Right Arrow Icon
Exam 02 03/22/2007 SE3306 Mathematical Foundations of SE Name : WebCT ID : Instructions : Read through the whole exam first and plan your time. The exam is worth 25 points, with each question valued as indicated. Closed book : Reference to notes, the text or other material is not permitted . Time : You have one hour and fifteen minutes to complete all questions. Write all your answers on this paper. 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Question 1 (5 points) Let Σ = { 0 , 1 , . . ., 9 } . Construct a FSA that will describe L 1 = { x Σ * | the number represented by x is divisible by 3 } . Question 2 (5 points) Let Σ = { a, b, c } . Give a regular expression that describes the set of all odd-length words in Σ * that do not end in b. 2
Background image of page 2
Question 3 (5 points) Convert the regular expression ( ab b ) * a to a right regular grammar. You must use the
Background image of page 3

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

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

Unformatted text preview: procedure described in class. Question 4 (5 points) Classify the following grammars according to Chomskys hierarchy. 1. G 1 = ( { A, B, S, T, Z } , { a, b, c } , S, { S aSBc, S aTc, T b, TB bT, cB Bc, Z , Z S } ) 2. G 2 = ( { S, T } , { a, b } , S, { S aS, S bT, T a } ) 3. G 3 = ( { S, T } , { a, b } , S, { S aSb, S bTS, T a } ) 4. G 4 = ( { A, B, S, T, Z } , { a, b, c } , S, { S aSBc, S aTc, T b, TBT bT, cB Bc, Z , Z S } ) 3 Question 5 (5 points) Show that the set of all parenthesized expressions over the alphabet { a, b, + , ( , ) } is not a regular language. 4...
View Full Document

Page1 / 4

sampleex02 - procedure described in class. Question 4 (5...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online