Question: Algorithms amd Data Structure Please code with C language only This was the only informatin given,what other information do you need? Here is an example
Please code with C language only

Algorithms with loop nests, and memoization Purpose of laboratory work Purpose of laboratory work N2. "Algorithms with loop nests, memoization" is learning of the theoretical material and acheaving the practical skills of using various cyclic control structures, nested cycles, dynamic programming method and calculation of the number of the algorithm operations. Formulation of the problem 1. The positive integer n is specified. Calculate the value of a formula given due to the variant 2. To solve the problem, write two programs: 1) the first program should be used to calculate the formula with a nested cycles; 2) the second program must perform the formula calculation in one cycle using the memoization programming method. 3. Calculate the number of operations for each of the algorithms according to the methodology described in the lesson, adding to it calculating the number of standard function calls. 4. The program must correctly solve the problem at any given parameter n for which the result of the calculation can be correctly represented by the type double 5. Output to the screen the output data in seven-character format after dots. 6. Draw the charts of the complexity dependence on the parameter n. Contents of the report 1. General task statement and task for a particular variant 2. The text of both programs. 3. Calculations of the number of operations for each of the algorithms according to the methodology described in the lesson. 4. Program testing. In order to create a benchmark for testing, one need to prove the correctness of the programs in the calculation of the given formula for n=3 with the substitution of the actual numbers and perform the calculation of this formula on the usual calculator 5. As a result of testing, print the results of both programs for n=1, n=2 and n=3. 6. Calculation results with both programs and with the calculator must match. 7. The results of calculations by both programs for a given set of values n. 8. Tables and charts of the calculated complexity in both programs for a set of n from 2 to 10 with the step 2. ifi +1) Variant 10 P= (1 + sinj0)) 2i Ini + 3) P: " (2j+1) 1 2. - 1. intmain() double p= 1; ints, n; printf("Enter n: "); scanf("%d", &n); for (inti = 1;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
