Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

calc operations +- x $frac{}{}$$^$ ! functions $_$ || $e^$e$ln$ln $10^$10$log_$log $log$log symbols i UN DEFDNE relations =NO SOL sets ()[] (][) {} vectors $ivec$i

calc operations +- x $\\frac{}{}$$^$ ! functions $_$ || $e^$e$\\ln$ln $10^$10$\\log_$log $\\log$log symbols i UN DEFDNE relations <> =NO SOL sets ()[] (][) {} vectors $\\ivec$i $\\jvec$j$\\kvec$k trig sincos tansec cotcsc $\\sin^{-1}$sin1$\\cos^{-1}$cos1 $\\tan^{-1}$tan1$\\sec^{-1}$sec1 $\\cot^{-1}$cot1$\\csc^{-1}$csc1 sinhcosh tanhsech cothcsch greek Help WebAssign Welcome, su200088357::app-22@strayer (log out) Thursday, September 8 2016 10:45 PM EDT Home My Assignments Grades Communication Calendar My eBooks Notifications Help My Options MAT311, section 003VA016-1166-001, Summer 1 2016 My Assignments Week 10 Homework (Homework) Katina Howard MAT311, section 003VA016-1166-001, Summer 1 2016 Instructor: KATHERINE RUDE Current Score : 17 / 30 Due : Monday, September 12 2016 09:00 AM EDT Print Assignment Question Points 1 2 3 4 5 6 7 8 9 10 3/3 0/3 2/3 -/3 3/3 3/3 3/3 1.5/3 1.5/3 -/3 Total 17/30 (56.7%) Description Week 10 Homework Instructions Week 10 Homework Assignment Submission For this assignment, you submit answers by question parts. The number of submissions remaining for each question part only changes if you submit or change the answer. Assignment Scoring Your last submission is used for your score. 1. 3/3 points | Previous Answers HunterDM2 4.5.006. My Notes Question Part Points Submissions Used 1 3/3 1/5 Consider the following algorithm. for i do {1, 2, 3, 4} beep for j do {1, 2, 3, 4} beep for k do {1, 2, 3} for l do {1, 2, 3, 4, 5} beep for m do {1, 2, 3, 4, 5, 6} beep How many times does a beep statement get executed? 1 152 Submit Answer Save Progress Your work in question(s) will also be submitted or saved. Submit Assignment Save Assignment Progress Practice Another Version Viewing Saved Work Revert to Last Response 2. 0/3 points | Previous Answers HunterDM2 4.5.010a. My Notes Question Part Points Submissions Used 1 0/3 1/5 Total 0/3 Consider the following algorithm. x1 for i do {1, 2, 3, 4} for j do {1, 2, 3} xx+x for k do {1, 2, 3, 4, 5, 6} xx+1 xx+5 Count the number of + operations done by this algorithm. 1 42 Submit Answer Save Progress Your work in question(s) will also be submitted or saved. Submit Assignment Save Assignment Progress Practice Another Version Viewing Saved Work Revert to Last Response 3. 2/3 points | Previous Answers HunterDM2 4.5.014. My Notes Question Part Points Submissions Used 1 2 3 1/1 1/1 0/1 1/5 1/5 4/5 Total 2/3 An urn containing n balls can be represented by the set U = {b1, b2, ... , bn}. Interpret the following algorithm in the context of urn problems. Does it represent drawing with or without replacement? How many lines does it print? for i do {1, 2, ... , n} for j do {1, 2, ... , n} for k do {1, 2, ... , n} print bi, bj, bk The algorithm prints out all the possible ways to draw 1 with 3 balls in sequence, 2 replacement. It prints n3 lines. Submit Answer Save Progress Your work in question(s) will also be submitted or saved. Save Assignment Progress Viewing Saved Work Revert to Last Response 4. -/3 points HunterDM2 4.5.008a. My Notes Question Part Points Submissions Used Submit Assignment 1 2 -/1.5 -/1.5 0/5 0/5 Total -/3 For the algorithm below, compute the number of multiplications performed, as well as the final value of s. p1 s0 for i do {1, 2, 3, 4} pp4 ss+p number of multiplications 1 final value of s Submit Answer s= 2 Save Progress Your work in question(s) will also be submitted or saved. Submit Assignment Save Assignment Progress Practice Another Version Viewing Saved Work Revert to Last Response 5. 3/3 points | Previous Answers HunterDM2 4.5.024. My Notes Question Part Points Submissions Used 1 2 1.5/1.5 1.5/1.5 1/5 1/5 3/3 Let x1, x2, ... , xn be an array. Consider the following algorithm. for {1, 2, ... , n/2} i do t xi xi xn i + 1 xn i + 1 t (a) How many "" operations does this algorithm perform? 1 n 3 n/2 n/2 3n 3n/2 (b) What does this algorithm do to the array? 2 It reverses the order of the elements in the array. It subtracts 1 from each element of the array. It adds 1 to each element of the array. It shifts the first element to the end of the array and every other element one place to the left. It shifts the last element to the beginning of the array and every other element one place to the right. Submit Answer Save Progress Your work in question(s) will also be submitted or saved. Submit Assignment Save Assignment Progress Viewing Saved Work Revert to Last Response 6. 3/3 points | Previous Answers HunterDM2 4.5.018. My Notes Question Part Points Submissions Used 1 3/3 1/5 Total 3/3 Write a pseudocode algorithm to compute the product of the first n positive integers. How many multiplications does your algorithm perform? x=1 for i = {1 to n} {x=x*i} N multiplications 1 Score: 3 out of 3 Comment: Submit Answer Save Progress Your work in question(s) will also be submitted or saved. Submit Assignment Save Assignment Progress Viewing Saved Work Revert to Last Response 7. 3/3 points | Previous Answers HunterDM2 5.1.004. My Notes Question Part Points Submissions Used 1 3/3 2/5 Total 3/3 Give a postcondition for the following algorithm that completely describes how the final value of i is related to x. Precondition: x is a positive odd integer. i0 while i 1. 1 This answer has not been graded yet. Give descriptive preconditions and postconditions. (Hint: See Example 3.10.) precondition n2 3 1 H(n) = postcondition Submit Answer Save Progress Your work in question(s) will also be submitted or saved. Save Assignment Progress Viewing Saved Work Revert to Last Response 10. -/3 points HunterDM2 5.1.008. My Notes Question Part Points Submissions Used 1 2 3 -/1 -/1 -/1 Submit Assignment 0/5 0/5 0/5 Total -/3 Consider the following pseudocode function. Z) function W(n if n>0 then if n is odd then return 2n else return n + 1 else return n 1 Compute the values returned by the following function calls. (a) W(6) = 1 (b) W(19) = 2 (c) W(5) = 3 Submit Answer Save Progress Practice Another Version Your work in question(s) will also be submitted or saved. Save Assignment Progress Viewing Saved Work Revert to Last Response Submitted Submit Assignment Home My Assignments Save Assignment Progress Submit Assignment WebAssign 4.0 1997-2016 Advanced Instructional Systems, Inc. All rights reserved

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

An Introduction to the Mathematics of Financial Derivatives

Authors: Ali Hirsa, Salih N. Neftci

3rd edition

012384682X, 978-0123846822

More Books

Students also viewed these Mathematics questions

Question

Rearrange for x in the following equation. 3 7hx

Answered: 1 week ago