We are Permanently Move to vupk.net Please Join us there.

CS607 Assignment # 5 Idea Solution Spring July 2012



CS607 Assignment_05 -

MTH603 GDB Solution Spring July 2012

The topic for Graded Moderated Discussion Board is

“Compare the efficiency and characteristics of Predictor- Corrector methods available to you.”

Idea Solution

Predictor–corrector method is an algorithm thatproceeds in two steps. First, the prediction step calculates a roughapproximation of the desired quantity. Second, the corrector step refines theinitial approximation using another means. A predictor¬¬–corrector methodtypically uses an explicit method for the predictor step and animplicit method for the corrector step. A simple predictor–corrector method canbe constructed from the Eulermethod (an explicit method) and the trapezoidal rule (an implicit method). Effectiveness and Characteristics

The idea behind the predictor-corrector methods is to use a suitable combination of an explicit and an implicit technique to obtain method with better convergence characteristics Runge Kutta method Euler Method, Trapezoidal Rule are predictor corrector methods

CS301 Assignment No 5 Solution Spring July 2012

 CS301 Assignment No 5 Solution Spring July 2012

Question # 1:-
Consider the following MAX HEAP, represent this heap in the form of an array, start the array index from 1 instead of 0.

Solution:-


25 23 15 18 12 7 5 10 14 11 6 3 4 2
0       1       2       3       4     5   6     7    8       9       10   11    12      13     14

Question # 2:-
Consider the following array, the value on each index of this array represents the node value of a complete binary tree, you are required to create the complete binary tree from this array.
Solution:-


Hints:
If “i” is an index of a node then “2i”, “2i +1” and “i/2” represent the left child, right child and parent of the this node respectively.