Need Help ?

Expert Answers

(Solved): a. (12 points) Give a grammar that generates the language A ...

a. (12 points) Give a grammar that generates the language A = {a?bn 20 and m >0} A - aasos lows - bs ofter CS usiopu Bb. (9 points) Which of the strings below can be generated by the grammar for language A? (For full credit either state that t

a. (12 points) Give a grammar that generates the language A = {a?"b""n 20 and m >0} A - aasos lows - b's ofter C'S usiopu B 6S C-> aasos plan S - A forces nyo when it shouldn't 5-73 s->c So e allows empty string where sucht b. (9 points) Which of the strings below can be generated by the grammar for language A? (For full credit either state that the string cannot be derived, or show its valid derivation.) i aabb Can be derived. S-> A ->aa ScS -> a abcs-> aabscS - aabB cS aabbs.S: aabocs -> aabbe your gromnos ii. aac Cannot be derived. aaoo l correct only based on iii. aabcc : Cannot be derived Show transcribed image text a. (12 points) Give a grammar that generates the language A = {a?"b""n 20 and m >0} A - aasos lows - b's ofter C'S usiopu B 6S C-> aasos plan S - A forces nyo when it shouldn't 5-73 s->c So e allows empty string where sucht
b. (9 points) Which of the strings below can be generated by the grammar for language A? (For full credit either state that the string cannot be derived, or show its valid derivation.) i aabb Can be derived. S-> A ->aa ScS -> a abcs-> aabscS - aabB cS aabbs.S: aabocs -> aabbe your gromnos ii. aac Cannot be derived. aaoo l correct only based on iii. aabcc : Cannot be derived

 

(Solved): .2.1a.  Find the 16-bit 2’s complementary binaryrepresen...

.
2.1

a.  Find the 16-bit 2’s complementary binaryrepresentation for the decimal number 1987.

b.   Find the 16-bit 2’s complementary binaryrepresentation for the decimal number
?1987.

What are the 16-bit 1’s and 2’s complements of the followingbinary numbers?

a.   10000
b.   100111100001001

Convert the decimal number 19557 to floating point. Use theformat SEEMMMM. All digits are decimal. The exponent is storedexcess-40 (not excess-50). The implied decimal point is at thebeginning of the mantissa. The sign is 1 for a positive number, 7for a negative number. Hint: Note carefully the
number of digits in the mantissa

What is the floating point representation for0.0000019557

(Solved): . Add two sliders (to control n and r) and modify the code a...

. Add two sliders (to control n and r) and modify the code asnecessary to change the model into one that implements the generalchaos game. Make sure you still get the expected results with n =3, r = 0.5.

(Solved): a. (3pt.) Two engineers were independently testing a cubic p...

a. (3pt.) Two engineers were independently testing a cubic polynomial regression model on the same dataset. Both of them used

a. (3pt.) Two engineers were independently testing a cubic polynomial regression model on the same dataset. Both of them used leave-one-out cross-validation. They had almost identical R code, except that one of the engineers had setaseed(3) on the first line of his R code, while the other one had setaseed(7). Would these engineers end up with different results? Why? b. (3pt.) If one of the two engineers in Problem la used the validation set approach, while the other one used 10-fold cross-validation. Both of them performed the test multiple times with different seed numbers. What would you expect to see in terms of the mean square errors? Why? c. (4pt., three points on the code and one point on the answer.) In this question, you will analyze the Default data set. Perform logistics regression to predict default using 2 models. • default-balanse student defaultzbalanse*student Use 10-fold cross-validation to evaluate the model. Also check whether the predictors are significant. Which model is the best? Explain. Please use set.seed(1) on the first line of your R code. You will need to put cost function as a parameter for healmc) in order to get the logistic regression error rate. See the example on cxalm page. You need to declare cost function as following: cost=function(arrobs) { pred=rep (e. length(Y)) pred[probs>.5151 mean(predb=Y) Show transcribed image text a. (3pt.) Two engineers were independently testing a cubic polynomial regression model on the same dataset. Both of them used leave-one-out cross-validation. They had almost identical R code, except that one of the engineers had setaseed(3) on the first line of his R code, while the other one had setaseed(7). Would these engineers end up with different results? Why? b. (3pt.) If one of the two engineers in Problem la used the validation set approach, while the other one used 10-fold cross-validation. Both of them performed the test multiple times with different seed numbers. What would you expect to see in terms of the mean square errors? Why? c. (4pt., three points on the code and one point on the answer.) In this question, you will analyze the Default data set. Perform logistics regression to predict default using 2 models. • default-balanse student defaultzbalanse*student Use 10-fold cross-validation to evaluate the model. Also check whether the predictors are significant. Which model is the best? Explain. Please use set.seed(1) on the first line of your R code. You will need to put cost function as a parameter for healmc) in order to get the logistic regression error rate. See the example on cxalm page. You need to declare cost function as following: cost=function(arrobs) { pred=rep (e. length(Y)) pred[probs>.5151 mean(predb=Y)

(Solved): . The The assembly code below was generated by compiling the...

. The The assembly code below was generated by compiling the C code given below the assembly code. Find the values for the miC code for mystery function. Each instance of (i) e {a,b,c, d, e} represents an unknown variable or expression. long mystery

. The The assembly code below was generated by compiling the C code given below the assembly code. Find the values for the missing parts of the C code as indicated by the '(i)' and then answer the following questions: i registers hold the values for: x, n, result, and mask? (assume the 64-bit register identifier in each case) (b) Complete the table below (next page) in order to identify the missing C ex- pressions and the line of assembly code at which each C expression is defined. Assembly code for mystery function. Note that the line numbers in the first column have no functional value, but are supplied to help you answer the assignment. 1. loop: movl %esi, %ecx movl $1, %edx movl $0, %eax jmp .L2 3: In two nooos movq %rdi, %r8 anda %rdx, %r8 orq %r8, %rax salq %cl, "rdx .L2: testq %rdx, %rdx jne .L3 rep; ret C code for mystery function. Each instance of (i) e {a,b,c, d, e} represents an unknown variable or expression. long mystery (long x, long n) long result = (a) ; long mask; for (mask = (b); mask (c); mask = (d)) result = (e) ; return result; location of C expression at location unknown (of unknown line of assembly at which unknown C expression defined Show transcribed image text . The The assembly code below was generated by compiling the C code given below the assembly code. Find the values for the missing parts of the C code as indicated by the '(i)' and then answer the following questions: i registers hold the values for: x, n, result, and mask? (assume the 64-bit register identifier in each case) (b) Complete the table below (next page) in order to identify the missing C ex- pressions and the line of assembly code at which each C expression is defined. Assembly code for mystery function. Note that the line numbers in the first column have no functional value, but are supplied to help you answer the assignment. 1. loop: movl %esi, %ecx movl $1, %edx movl $0, %eax jmp .L2 3: In two nooos movq %rdi, %r8 anda %rdx, %r8 orq %r8, %rax salq %cl, "rdx .L2: testq %rdx, %rdx jne .L3 rep; ret
C code for mystery function. Each instance of (i) e {a,b,c, d, e} represents an unknown variable or expression. long mystery (long x, long n) long result = (a) ; long mask; for (mask = (b); mask (c); mask = (d)) result = (e) ; return result; location of C expression at location unknown (of unknown line of assembly at which unknown C expression defined

(Solved): a. Apply the dynamic programming algorithm to the followingi...

a. Apply the dynamic programming algorithm to the followinginstance of the 0-1 knapsack problem:

Item ?? Weight Value

1 ?? 3 $30

2 2 ?? ? $20

3 1 $15

4 4 ? $40

5 5 ? $50

with capacity W = 6.

Show your pseudo codes for the dynamic programming solution.

You should include a procedure to retrieve an optimalsolution.

b. How many different optimal subsets does the instance of part(a) have? Show all optimal subsets.

c. In general, how can we use the table generated by the dynamicprogramming algorithm to tell whether there is more than oneoptimal subset for the knapsack problem’s instance?

(Solved): . Consider a single-platter disk with the following paramete...

. Consider a single-platter disk with the following parameters:rotation speed: 7200 rpm; the number of tracks on one side of theplatter: 30,000; the number of sectors per track: 600; seek time:one ms for every hundred tracks traversed. Let the disk receive arequest to access a random sector on a random track and assume thedisk head starts at track 0.

a. What is the average seek time?

b. What is the average rotational latency?

c. What is the transfer time for a sector?

d. What is the total average time to satisfy a request?

(Solved): a. Compose the substitution sets {a/X, Y/Z} and {X/W, b/Y}.b...

a. Compose the substitution sets {a/X, Y/Z} and {X/W, b/Y}.

b. Prove that composition of substitution sets isassociative.

c. Construct an example to show that composition is notcommutative.

(Solved): Please show all the work with details.I. CONVERSION FROM DEC...

Please show all the work with details.
I. CONVERSION FROM DECIMAL 1. Convert 879, to binary base-2), show work. 2. Convert 110710 to binary (base-2). show work3. Convert 87920 to hexadecimal base-16, show work.2. Convert 11001101, to decimal, show work.I. CONVERSION FROM DECIMAL 1. Convert 879, to binary base-2), show work. 2. Convert 110710 to binary (base-2). show work 3. Convert 87920 to hexadecimal base-16, show work. 2. Convert 11001101, to decimal, show work. Show transcribed image text I. CONVERSION FROM DECIMAL 1. Convert 879, to binary base-2), show work. 2. Convert 110710 to binary (base-2). show work
3. Convert 87920 to hexadecimal base-16, show work.
2. Convert 11001101, to decimal, show work.

(Solved): 2017 The patient is: Jackie Fowler Their age is: 27 Their I...

2017 The patient is: Jackie Fowler Their age is: 27 Their ID is: 345543 Their Attending Physician is: Doctor Octavian Research Their bill is: Doctor Fee: 750.0 Medicine Fee: 349.99 Room Fee: 1229.89 Their Date of Birth is: October 30