Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Many useful calculations in probability and physics require us to perform certain weighted sums related to pairs of integers (i,j). Consider the following sum: EM-

image text in transcribed

Many useful calculations in probability and physics require us to perform certain weighted sums related to pairs of integers (i,j). Consider the following sum: EM- =) E'=zi+]ci Assume that the coefficients Cij (for all i, j, i=1,2,...n, j=1,2,...n) are given to you as inputs as the entries of a matrix C. a. (25 points) Write a pseudo-code that computes the above sum given the n*n coefficient matrix C with entries Cij, b. ( 12 points) Find the number of operations (only arithmetic and logical) that your algorithm performs in the worst case. C. (8 points) Assume now that the coefficients Cij are not given to you but have to be calculated for each i.j using an algorithm that requires O(log n) steps. Give a big-O estimate for computing the sum under this assumption (you don't have to write the pseudo-code but explain all details). Many useful calculations in probability and physics require us to perform certain weighted sums related to pairs of integers (i,j). Consider the following sum: EM- =) E'=zi+]ci Assume that the coefficients Cij (for all i, j, i=1,2,...n, j=1,2,...n) are given to you as inputs as the entries of a matrix C. a. (25 points) Write a pseudo-code that computes the above sum given the n*n coefficient matrix C with entries Cij, b. ( 12 points) Find the number of operations (only arithmetic and logical) that your algorithm performs in the worst case. C. (8 points) Assume now that the coefficients Cij are not given to you but have to be calculated for each i.j using an algorithm that requires O(log n) steps. Give a big-O estimate for computing the sum under this assumption (you don't have to write the pseudo-code but explain all details)

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

Step: 3

blur-text-image

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

Effective Delivery Effective

Answered: 1 week ago