CS 475/575 Final Exam
Spring 2012
Preview / Study guide
Your score on this exam is based on your best 10 of these 11 problems: 1(a,b,c), 2(a,b,c,d), 3(a,b,c), 4.
1. Let language L1 = .
a. Write a regular expression that generates L1.
b. Draw a non-determi
CS 475/575 Exam 3
Spring 2012
Name _
Your score on this exam is based on your best 7 of these 8 problems.
1. The ambiguous grammar below generates strings that represent regular expressions.
Draw all five distinct parse trees for the input string abc* usi
CS 475/575 Exam 3
Spring 2012
Solution
Your score on this exam is based on your best 7 of these 8 problems.
1. The ambiguous grammar below generates strings that represent regular expressions.
Draw all five distinct parse trees for the input string abc* u
CS 475/575 Exam 5
Spring 2012
Name _
Your score on this exam is based on your best 5 of these 6 problems.
1. Write an accepting computation sequence for the input string aa using this
non-deterministic Turing machine. Hint: Not all paths lead to acceptanc
CS 475/575 Exam 4
Spring 2012
Name _
Your score on this exam is based on your best 6 of these 7 problems.
1. The pushdown automaton below accepts by both final state and empty stack; that is, both
conditions must occur to accept an input string. Determine
CS 475/575 Exam 5
Spring 2012
Solution
Your score on this exam is based on your best 5 of these 6 problems.
1. Write an accepting computation sequence for the input string aa using this
non-deterministic Turing machine. Hint: Not all paths lead to accepta
CS 475/575 Exam 2
Spring 2012
Solution
Your score on this exam is based on your best 7 of these 8 problems.
1. Write a regular expression that generates the set of strings over alphabet cfw_a, b that do not
contain two consecutive identical characters. Th
CS 475/575 Exam 1
Spring 2012
Name _
Your score on this exam is based on your best 5 of these 6 problems.
1. Let language L be the strings over alphabet cfw_a,b,c that do not contain two consecutive
identical characters. That is, the following substrings
CS 475/575 Exam 1
Spring 2012
Solution
Your score on this exam is based on your best 5 of these 6 problems.
1. Let language L be the strings over alphabet cfw_a,b,c that do not contain two consecutive
identical characters. That is, the following substring
CS 475/575 Exam 2
Spring 2012
Name _
Your score on this exam is based on your best 7 of these 8 problems.
1. Write a regular expression that generates the set of strings over alphabet cfw_a, b that do not
contain two consecutive identical characters. That
CS 475/575 Exam 5
Spring 2012
Preview / Study guide
Your score on this exam is based on your best 5 of these 6 problems.
1. Given a Turing machine, write an accepting computation sequence for an input string.
2. Prove that a given problem is undecidable.
CS 475/575 Exam 3
Spring 2012
Preview / Study guide
Your score on this exam is based on your best 7 of these 8 problems.
1. Given an ambiguous grammar, draw each distinct parse tree for a given input string.
2. Given an ambiguous grammar, write each leftm
CS 475/575 Exam 4
Spring 2012
Preview / Study guide
Your score on this exam is based on your best 6 of these 7 problems.
1. Given a pushdown automaton, write accepting computation sequences for some input
strings.
2. Given a pushdown automaton, determine
CS 475/575 Exam 1
Spring 2012
Preview / Study guide
Your score on this exam is based on your best 5 of these 6 problems.
1. Draw a deterministic finite-state machine that accepts a given language.
2. Prove by mathematical induction something related to st
CS 475/575 Exam 2
Spring 2012
Preview / Study guide
Your score on this exam is based on your best 7 of these 8 problems.
1. Write a regular expression that generates a given language.
2. Determine whether each identity is true or false, and write a convin
CS 475/575 Exam 4
Spring 2012
Solution
Your score on this exam is based on your best 6 of these 7 problems.
1. The pushdown automaton below accepts by both final state and empty stack; that is, both
conditions must occur to accept an input string. Determi