Hi can somebody help me solve these 3 questions please Compu
Hi can somebody help me solve these 3 questions please
Compute the following sums. 1 + 3 + 5 + 7 +. .. + 999 2 + 4 + 8 + 16 +. .. + 1024 sigma_i =3^n + 1 1 sigma_i = 3^n + 1 i sigma_i = 0^n - 1i(i + 1) sigma_j = 1^n 3^j + 1 sigma_i = 1^n sigma_j = 1^n ij sigma_i = 1^n 1/i(i + 1) Find the order of growth of the following sums. Use the Theta(g(n)) notation with the simplest function g(n) possible. sigma_i = 0^n - 1(i^2 + 1)^2 sigma_i = 2^n - 1 lg i^2 sigma_i = 1^n (i + 1) 2^i - 1 sigma_i = 0^n - 1 sigma_j = 0^i - 1 (i + j) The sample variance of h measurements x_1, .. ., x_n can be computed as either sigma_i = 1^n (x_i - x^bar)^2/n - 1 where x^bar = sigma_i = 1^n x_i/n or sigma_i =1^n - (sigma_i = 1^n x_i)^2/n/n - 1. Find and compare the number of divisions, multiplications, and additions/subtractions (additions and subtractions are usually bunched together) that are required for computing the variance according to each of these formulas.Solution
1.) a.) 1 + 3 + ...+ 999 = (1 + 2 + 3 + ... + 1000) - (2 + 4 + 6 +...+ 1000) //as sum of first n natural numbers = n*(n+1)/2
= (1 + 2 + 3 + ... + 1000) - 2*(1 + 2 + 3 + ... + 500)
= 1000*(1000 + 1)/2 - 500*(500+1)/2 = 500*1001 - 2*250*501 = 250000
b.) 2 + 4 + 6 +...+ 1024 = 2*(1+2+3+...+512) = 2* (512) *(512+1)/2 = 512 * 513 = 262656
c.) Given summation = (1+1+..n-1 times) as i starts from 3 and ends at i+1; therefore 1 is added n-1 times
= n-1
d.) given summation = (3 + 4+ ...+ n+1) = (1+2+3+..+n+1) - (1+2) = ((n+1)*(n+2)/2) - 2 = (n^2 + 2n+ n + 2)/2 - 2
= (n^2+3n+2)/2 - 2 = (n^2 + 3n + 2 - 4)/2 = n^2 + 3n -2
Hope it helps.

