Question: 7 . Find two errors in the following attempted formal definition of a finite automaton: Q: a set of states Sigma : a finite
Find two errors in the following attempted formal definition of a finite automaton:
Q: a set of states
Sigma : a finite input alphabet
delta : Q times Sigma Q
q in Sigma
F Q
marks Provide a DFA that recognizes the following language over Sigma ab:
w w in ab contains exactly as
marks Consider the following language:
L w w is a nonempty string of the form abc
For example, aaabcc and ac are in the language, but cb and abbccb are not. Prove that L
is regular.
marks Consider a DFA represented by the following state diagramABCD
a Give a formal definition of this DFA as a tuple QSigma delta q F
b Describe the language recognized by this DFA.
marks Which strings are accepted by the following NFA:AB
a
b
c
d
marks Design a nondeterministic finite automaton NFA for the following language
by providing the state diagram:
w w is a binary string containing the substring and containing the substring
Try to minimize the number of states and transitions.
marks Design a simple NFA to recognize the language of the following regular expression,
where Sigma is the set of all letters in the English alphabet:
Sigma funSigma cup Sigma boredSigma
marks State which of the following five strings belong to the language of the given regular
expression: abb, abba, bababb, baaaa.
aa cup baba cup b
b babab
c a cup ab
marks Program in C Recall the optimized program from the notes that generates lists
all binary strings of length n with exactly k s in lexicographic order. Apply this program
to determine how many subsets of n of size k have elements that sum to exactly
m For instance when n k and m the subset which corresponds to
the length n binary string has k elements and sums to m
HAND IN: The source code. Separately, provide output for the following values of n k m:
a
b
c
For each case, also provide the clock time your program took to execute in seconds.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
