CamScanner 10-11-2023 23

.pdf

School

University of Missouri, St. Louis *

*We aren’t endorsed by this school

Course

3130

Subject

Computer Science

Date

Oct 30, 2023

Type

pdf

Pages

4

Uploaded by MajorSteelPheasant21

Report
Fall 2023, CS3130, Dr. W. He Homework Assignment 1 (25 Questions: Answers) (Due 10/7/2023 Saturday) Noqw V Name: ¢l l. Given a polynomial as follows, 2 4 6 8 1 \ e P(z) = ap 4+ a12® + apx® + azz®, <9, & Qd\. vugh + X to evaluate it for arbitrary coefficients {ag, a1, as, a3} and some given value z, the P ) X{ minimum number of multiplications that one needs is: = 44 4 Qq' + (qfl b Ak )q\ q 4 ) 5 (c¢) 6 (d) 7ormore Ko 2. Nobody can find a solution to find the minimum in an n-element array with fewer than n 1 comparisons, even after 100 years. (a) true false 3. Which of the following growth functions has the highest order of growth? (a) »n (b) logn (c¢) nlogn n2 4. When we use the linear search on many different input arrays, sometimes we have unordered arrays and sometimes we have ordered arrays. Which of the following statements about the efficiency is correct? (a) We will get better efficiency whenever we process the ordered arrays. (b) We will get better efficiency whenever we process the unordered arrays. ¢ We will get the same efficiency no matter we process the ordered or unordered arays aoes not contain any adjacent inversion, then it does not contain LON. i€ b} false ble that one can find the solution for the problem: Finding the minimum ray with n elements with an algorithm that is in ©(n)? yes (b) no 7. To evaluate a monomial z*® for a given value 2z, what is the minimum number of multiplications that you need? , : ) ( ] 7R 4 = ¢ * 4 q’(\(%;x\"x - N ,X-X; : ) TS Ans: K- A =% w2 KT X R X o *
A8y A good iden o APy the P wee fwotoresateon Mothod G Do Ve groadeat Sor ob o 1000t posttive intepera’ \;\‘ AR \\l\“ no O Let moand n be two posttive integers, and m e Phen we npply Lhee Diiaion Hgoniiim and get the following equation for some tntegers ¢ nnd r, me=gn e with 0 e Which of the following equalitios is correct? (&) god(mn) = ged(g.n) () ged(ryn) = ged(g,n) () god(m n) = ged(q, 1) w ped(mn) pod(n,r) 10. Given a polynomial as follows, 3 7 P(x) = ag + a,2° + aga” + aga! + a2 ) to evaluate it for arbitrary coeflicients {ay, ay,ay, a3, a4} and some given value z, the minimum number of multiplications that one needs is: (a) 5 @/ 6 (¢) 7 (d) 8ormore 11. Which of the following growth functions has the lowest order of growth? (a) vn*+4n+7 (b) 27 @ = (d) log n 12. § n + logn Vhich of the following growth functions has the lowest order of growth? e + 5n + 8 logn (b)) ——— B (c) n0000001 (d) /mlogn of the following functions increases faster in the long run? N (a) )1.0000001" (b) n34578% J 14. Given a 5-element array, say {z;, &2, 3, 24, T5}, it is known that 1 vy < @4 and Z; < o9. Based on the given information, which element cannot be the (a)) z;y (b) =z (c) / b median? zz (d) x4 15. Given a chessboard, we want to find those squares of different sizes with 2 black squares and 2 white squares at its 4 corners. Ho w many such squares can you find? AR = I8 = L/ 7/ \ / { «~ | : /,‘ + R) % L - 7
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: 987 m/s = = km/hr 4392 km/h = m/s
Q: The function f is graphed below. State the values that fulfill the following requirements. If there…
Q: Exercises for Input-Output Analysis 13. Suppose that you have been given the following data on the…
Q: How are universal religions different from other kinds of religions? How is this difference…
Q: There are 8 people at an office meeting. How many handshake
Q: define what it means to be an “American woman.” Despite the many differences that divide American…
Q: Table 1 contains price and quantity information for two products produced by Apple, the iPhone and…
Q: Action Travel has 10 employees each working 40 hours per week and earning $20 an hour. Federal…
Q: Problem 5. Remove the node with key '12' from the following red-black tree 3 4 5 7 6 8 10 11 12…
Q: Which of the following positions in options benefit if the underlying stock price increases? Assume…
Q: How many moles of Ag+ are needed to react with 25.75 mL of 0.432 M CrO42-? 2 Ag+ (aq) + CrO42- (aq)…
Q: 2. Suppose a random sample of 52 National Football League players from Greensboro had an average…
Q: Vaughn is a manufacturer that specializes in three types of toy instruments: xylophones, electronic…
Q: 20. When the reaction 2H₂S(g) 2H2(g) + S2(g) is carried out at 1065°C, Kp = 0.012. Starting with…
Q: An “unnatural” sugar found as a component of hemicellulose was found to contain 40.00% C and 6.71% H…
Q: In a group of 35 Virginia residents, 28 Maryland residents, and 23 Delaware residents, two people…
Q: 21. hall in terms of time. y -5-3 + postove x-ve HKH 3 X -4y = (x + 3)²-4
Q: Todine atoms combine to form molecular iodine in the gas phase I(g) + I(g) → 1₂ (g) This reaction…
Q: medication order states administered 1 gram in 500ML of DSW at 150mg/hr via infuse pump.  What is…
Q: Please help me answer question #29 meeting the requirements for both part a and part b. Note that…
Q: Find the derivative of: - 3 sin² ( – 5x6).
Q: Exercise 7.2.1 Find the eigenvalues and eigenvectors of the matrix 5 -18 -32 4 2 -5 -11 One…