Theory of computation.
Please show all work.
3)
Now all strings having odd character as 'a' will only satisfy this turing machine and empty string also satisfied since first state acceptable final state.
4)
Regular expression will be a*x* | {x can be any character except 'a'}
since above turing machine is accepting empty string, so regular expression will be a*x* , a* means it accepts empty or more than one instance of 'a'
Theory of computation. Please show all work. Construct a TG for the language of all strings...
Theory of Computation. Please show all work. Given the following FAs for the language {a} and {b}: construct the FA that is product for the language {a} +{b}. Show the transition table and draw the transition diagram convert your FA from problem 1(an FA is also a TG) into a regular expression (show the steps that you take).
Construct a deterministic finite automaton accepting all and only strings in the language represented by the following regular expression: ((a U c)(b U c))* U = symbol for union in set theory
Construct a deterministic finite automaton accepting all and only strings in the language represented by the following regular expression: ((aa ∪ bb)c)*
Automata theory Q1: Assume S = {a, b}. Build a CFG for the language of all strings with a triple a in them. Give a regular expression for the same language. Convert the CFG into CNF grammar. Q2: Assume S = {a, b}. Build a CFG for the language defined by (aaa+b)*. Convert the CFG into CNF grammar. Q3: Explain when a CFG is ambiguous. Give an example of an ambiguous CFG. give vedio link also
1. Write regular expressions to capture the following regular languages: (a) The set of binary strings which have a 1 in every even position. (Note: odd positions may be either 0 or 1.) (b) The set of binary strings that do not contain 011 as a substring. (c) Comments in Pascal. These are delimited by (* and *) or by { and }, and can contain anything in between; they are NOT allowed to nest, however. 2. Write a DFA...
John Doe claims that the language L, of all strings over the alphabet Σ = { a, b } that contain an even number of occurrences of the letter ‘a’, is not a regular language. He offers the following “pumping lemma proof”. Explain what is wrong with the “proof” given below. “Pumping Lemma Proof” We assume that L is regular. Then, according to the pumping lemma, every long string in L (of length m or more) must be “pumpable”. We...
1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...
Examination #2 100 points CS248 Theory of Computation 1. Please read all instructions (including these) carefully. You should look through the entire exam before strategy. You have 50 minutes to complete the exam. This exam is closed books and closed notes. 2. Please write your solutions in the spaces provided on the exam. Make sure your solutions are neat and the exam pages as scratch paper. (Last 4 digits o NAME: (Print) First Last In accordance with both the letter...
Question2 in the photo. Please help. Thanks 1. Construct an NFA that accepts the language La = {zaaabyaaabzla, y, z E {a, b)' } 2. Eliminate the e-transitions (denoted as E's below) from the following NFA s.t. the resulting machine accepts the same language with the same mumber of states. ql a,b go q3 2 3. Text problem: page 62, number 3. Finish by reducing the DFA. Note that you may want to do this in stages, first eliminating the...
3 points) Question Three Consider the context-free grammar S >SS+1 SS 1a and the string aa Give a leftmost derivation for the string. 3 points) (4 poiots) (5 points) (3 points) sECTION IWOLAttcmpt.any 3.(or 2) questions from this.scction Suppose we have two tokens: (1) the keyword if, and (2) id-entifiers, which are strings of letters other than if. Show the DFA for these tokens. Give a nightmost derivation for the string. Give a parse tree for the string i) Is...