Consider the two FAs
(a) Using the algorithm of Kleene’s theorem, Lemma 3, Rule 3, construct an FA for the product language FA1FA2.
(b) Describe (in English phrases) the language L1L2 (the language accepted by your answer to part a).
(c) Give an example of a word of length at least 5 that is not in the language L1L2.
Bro, please comment if you've any doubt...
I'm ready to help you...
Or give me thumbs up if you like.
Consider the two FAs (a) Using the algorithm of Kleene’s theorem, Lemma 3, Rule 3, construct...
(b) Using the Davis-Putnam-Logemann-Loveland (DPLL) algorithm, determine whether the following formula is satisfiable. Show each step. [3 marks] (c) Give an example of a conjunctive normal form (CNF) formula where the pure literal rule can be applied, but the unit propagation rule cannot. The formula must have at least 3 clauses. [3 marks (b) Using the Davis-Putnam-Logemann-Loveland (DPLL) algorithm, determine whether the following formula is satisfiable. Show each step. [3 marks] (c) Give an example of a conjunctive normal form...
1. Consider the following grammar A - aB B-Sb (a) Show a derivation tree for the string aabbbb using the grammar. (b) Give an English description of the language generated by the grammar 2. Let G be the grammar below: S-ASB ab | SS (a) Show that G is ambiguous. (b) Construct an unambiguous grammar equivalent to G. 3. Find a context free grammar for the language L3- fa"b"c+m :n,m21) 4. Find a context free grammar for the language L4...
3. Consider an editor that compares a typed in word say of length n and changes it to the nearest word in the dictionary, which can be of size m. For example, if you mistyped ”floyre”, it can change the word to ”flower” or ”flow” or ”floe” or ”floor”. To judge the best word, the spell checker computes the minimum number of changes between the typed word and the words in its dictionary. The changes can be as follows; (i)...
3. [10 points] Consider the following theorem. Theorem. Assume that m is an integer that leaves a remainder of 6 upon division by 8. Assume furthermore that n is an integer that leaves a remainder of 3 upon division by 8. Then the product m n leaves a remainder of 2 upon division by 8. Consider the tollowing theorern. (a) Illustrate the theorem using an example. (b) Prove the theorem.
Give the solution using Python programming for following with explanations: a. Take two numbers and display which number is positive and which number is negative. b. Take two numbers divide and display quotient and reminder. c. Take two numbers and check if they are same or not same. a. Write four differences between high level language and low level language? b. Write all the rules of naming any variables in python and provide at least one example for each rule?...
3. (25 pts) Consider the data points: t y 0 1.20 1 1.16 2 2.34 3 6.08 ake a least squares fitting of these data using the model yü)- Be + Be-. Suppose we want to m (a) Explain how you would compute the parameters β | 1 . Namely, if β is the least squares solution of the system Χβ y, what are the matrix X and the right-hand side vector y? what quantity does such β minimize? (b)...
Question 3 (a) Consider the data. 00 0 25 0.5 05 () Construct the divaded difference's table for the data (u) Construct the Newton form of the polynomial of lowest degree that interpolates /() at these points (3) (ii) Suppose that these data were generated by the function cos 2 ()=1+ 2 Use the next term rule to approximate the error Ip(z)- f() over the interval 0,0 5 Your answer should be a pumber 3 (b) Let F ((z) co+...
Question 2 (8 marks) (From the DPU textbook, Exercise 2.5) Using the Master theorem or recursion tree methods, solve the following recurence relations and give Θ bound for each of them a) T(n) 9T(n/3) +3n2 12n - 4, where n 21 b) T(n)-T(n-1) + n", where n > 1 and c > 0 c) T(n) = T(Vn) + 1, where n > b and T(b) = 2. Question 3: 10 marks) Suppose we have a subroutine merge2 to merge two...
In terms of the programming language required, the algorithm needs to be written in pseudocode Dynamic Programming Consider the following problem based on the transformation of a sequence (or collection) of coloured disks Assume that you have a very large collection of disks, each with an integer value representing the disk colour from the range [0, c. For example, the colour mapping might be 0-red. 1-yellow, 2-blue, 3-pink. , c-black For a given sequence of coloured disks e.g., ( 0,1,2,3,4...
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...