3. Convert the following FA to a regular expression 2 0 S1 S2 0 S3 b....
Let S1 = { 1, 2, 3 }, S2 = { a, b }, S3 = { 4, 5, 6 }. Show a B-tree of minimum degree t = 3 that contains the 18 tuple keys in S1 × S2 × S3, ordered by the linear order defined in (a). Assume that a <2 b in S2. please show the 18 tuple at first which is a cartesian product of s1,s2 and s3 and insert them into a B tree...
4. A regular expression for the language over the alphabet fa, b) with each string having an even number of a's is (b*ab*ab*)*b*. Use this result to find regular expressions for the following languages a language over the same alphabet but with each string having odd number of a's. (3 points) a. b. a language over the same alphabet but with each string having 4n (n >- 0) a's. (3 points)
Given the following sequence of instructions: lw $s2, 0($s1) //1 lw $s1, 40($s3) //2 sub $s3, $s1, $s2 //3 add $s3, $s2, $s2 //4 or $s4, $s3, $zero //5 sw $s3, 50($s1) //6 a. List the read after write (current instruction is reading certain registers which haven’t been written back yet) data dependencies. As an example , 3 on 1 ($s2) shows instruction 3 has data dependency on instruction 1 since it is reading register $s2. b. Assume the 5...
Prove that the following languages are not regular. You may use the pumping lemma and the closure of the class of regular languages under union, intersection, and compliment. a){} b){} c) { is not a palindrome} *d)} 0"1"0" m,n>0
1) Convert the following C code into MIPS assembly For (b-0; b<N, ++b) C-Z[b] If (Z[b]>W) W-Z[b] note: assign array Z, integers C and integer W to registers $SO, $S1, $S2 respectively. Put comments for each assembly line to explain its purpose.
Incorrect Question 5 0/5 pts S3 = [y/g(h(a,b))] Consider the following substitutions: S1 = [y/f(a,g(h(a,b)))] S2 = [x/f(a,y)] Which are legal ground substitutions? (A) S1 and S3 (B) S2 and 53 (C) S1 and 52 (D) All of above mentioned (A) (B) (C) (D)
1. Complete the following exercises a) For Σ = {a, b} find regular expressions for the compliment of the following languages L = L(aa*bb) b) Let Li = L(ab*aa), L2 = L(a"bba"). Find a regular expression for (L1 n Ljl2. c) The symmetric difference of two sets Sı and S2 is defined as sı Θ s,-(x : x E Si or x E S2 but x is not in both S1 and S2). Show that the family of regular languages...
Exercise 4.1.1: Prove that the following are not regular languages a) (0"1n|n 2 1). This language, consisting of a string of 0's followed by an cqual-length string of 1's, is the language Loi we considered informally at the beginning of the scction. Here, you should apply the pumping lemma in the proof. b) The set of strings of balanced parentheses. These are the strings of char- acters "(" and " that can appear in a well-formed arithmetic expression *c) O"IO"...
My Output s1 (size 0): s1 is empty Testing push() s1 (size 1): 17 s1 is not empty s1 (size 4): 4 6 2 17 s1 is not empty Testing copy constructor s1 (size 4): 4 6 2 17 s2 (size 4): 4 6 2 17 Testing clear() s1 (size 0): s2 (size 4): 0 1477251200 1477251168 1477251136 s3 (size 4): 28 75 41 36 Testing assignment operator s3 (size 4): 28 75 41 36 s4 (size 4): 28 75...
Represent the FSM in Figure 1 in form of an ASM chart. DN/0 S1 N/0 S3 D/0 N/0 S2 DN/0 Figure 1 Mealy-type FSM for Question 2.