Question: prove that the above function is fully correct using the definition of correctness in the picture below: please make sure your answer is easy to

prove that the above function is fully correct using the definition of correctness in the picture below:

please make sure your answer is easy to understand and well articulated
2. (8 marks) Consider the following algorithm that attempts to compute the value & SA, for any real number k and any positive integer n. Following the proof style from Lecture 11, prove that sumAlg(k,n) is fully correct. Algorithm 2 sumAlg(k,n) 1: //pre: (k R) A (1 Z) A(n > 0) 2: if n ==1 then answerk 4: else answer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
