Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Problem 1 4 . 3 . 4 1 we defined the language S = Sigma a Sigma k of strings whose k
In Problem we defined the language S Sigma aSigma k of strings whose k st to last letter
exists and is aHere k is an arbitrary natural. Design an NFA for this language with k
states and apply the Subset Construction to it Minimize your DFA if necessary. You now
have an example that will prove a theorem of the following form: For every n with n n
there exists a language that has an nstate ordinary NFA and whose minimal DFA has f n
states. You get to pick n and the function f n should be as large as you can make it
Solution:
Let k be a natural, let Sigma a b and consider the regular language Sk Sigma aSigma k consisting of all those
strings whose k st to last letter exists and is an a Find the minimal DFA for each such language Sk
and prove that it is minimal.
Please check Piazza @ for some additional notes on the problem.
P pts
Here is another way to modify a lambda NFA. For every letter move s x t where x is a letter in
Sigma add a corresponding lambda move slambda t Keep the start state and final state set the same.
a Describe a threestate ordinary NFA whose language is ab Apply this modification
to your NFA and describe the result. What is the language of the modified lambda NFA?
b If this modification is applied to a lambda NFA with language L what is the resulting
language?
Solution:
a A threestate NFA with language ab would have a start state q that transitions to q
when given the letter a and q from q when given the letter b q would be the final
state. Applying the modification would add lambdas for every transition. This would
allow strings to be created from empty inputs as well as the original letter inputs. The
language would still be ab
b If this modification is applied to a lambda NFA with language L the resulting language
would still be L Adding lambda transitions dont affect the strings accepted by the
system. More paths can indeed be created however the overall functionality is not
changed. In order to get from the start state to the final state, the same steps need to
be taken as in the original NFA.
P pts
Formally prove the correctness of our construction for the star operator, as follows. Let N
be a lambda NFA constructed for the regular expression alpha and let N be the one constructed for
alpha with two new states and four new lambda moves. Let L be the language of alpha
a By induction on all naturals t prove that if w is any string in the language Lt then
there are wpaths from the start state of N to both the original final state of N and
to the final state of N The path to N s final state is a useful inductive hypothesis.
b Prove, by induction on all paths from the start state of N to either the original start
state of N the original final state of N or the final state of N that the string read
on the path is in the language L
Solution:
a Base case: if t the language would just be epsi If t the regular expression
would just be alpha and the NFA N would have N inside of it If w is a string in L
then there is a path in N from the start to the final state that has string w In N
this path would also exist. A new path would also exist using a lambda move. Base
case is complete.
Assume for any t greater than or equal to that if w is a string in Lt there exists t
paths of w from the start state in N to the final state in N and the new final state.
Let w be a string in Lt w is made up of wa where w is in Lt and a is in L By IH
there exists a t amount of w paths in N
from start state to the original final state and
new final state. Since w is in Lt these paths can be made by taking a lambda move
to the new start state inside of N From start state in N there is a path that is a and
goes to the final state of N There are then t paths of wa to the original final state.
These can also be extended with a lambda move. As a result there are indeed wpaths
from the start state of N
to both the original final state of N and final state of N
b Base case: length of path is equal to This move would be a lambda move from the
start state that would either go to the original start state, the original final state, or
the new final state N
This only allows lambda moves so the path would be the empty
string. The empty string is part of Lt so base case checks out.
Assume for any path t that is greater than or equal to that the string read is in Lt
If the path is more, it can be either a symbol transition or a lambda move. If it is a
symbol transition, the first t would be checked from IH which is part of LtThe final
symbol would also be in L because N is constructed from alpha so it would be part of the
language as well. This entire string would have to then be a part of Lt
If the path past the IH part ended in a lambda move, the lambda doesnt use a
symbol so the string would also be in Lt In either case the string read on the path
would be in L
P pts
Build succ
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started