Write recurrence relation corresponding to pseudo-code

Write recurrence relation corresponding to pseudo-code/Computer Science

Write a divide-and-conquer algorithm for summing an array of n in- tegers. The base case for this algorithm will be when the size of the sub-problems are smaller or equal to 4 in which case you will use an iterative loop to sum the integers of the sub-problems. You need to do the following: (a) Your program should be able to open and read a file named In- putArray that contains a single line of n integers where n is a power 2 less than 1000. (b) Your program will output on the standard output the solutions found for each pair of sub-problems as well as the level of the recursion from which the solutions are printed. The level of the initial call is 0. (c) On your solution sheet, i. Write the pseudo-code of your algorithm1 ii. Write the recurrence relation corresponding to the pseudo- code, don’t forget the cost of the base case. iii. Write the solution of your recurrence, showing how you have solved the recurrence.

Order from us and get better grades. We are the service you have been looking for.