Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I cannot use double subscripts, 2d arrays, or nested for loops for this problem.

ID: 3829243 • Letter: I

Question

I cannot use double subscripts, 2d arrays, or nested for loops for this problem. Here is the algorithm I have come up with so far:

L0[1] = sqrt(a[1]);
L1[1] = 1 / L0[1];
L2[1] = b[1] / L0[1];
L0[2] = sqrt(a[2] - (L1[1] / L0[1]) * (L1[1] / L0[1]));
L1[2] = (0 - (L2[1]) * (L1[1])) / L0[2];
L0[3] = sqrt(a[3] - (L2[1]) * (L2[1]) - (L1[2]) * (L1[2]));

for(i = 3; i <= n; i++) {
     L2[i-2] = (b[i-2] - b[i-3] * b[i-4]) / b[i-2];
     L1[i-1] = (L0[i] - (L2[i]) * (L1[i])) / L0[i];
     L0[i] = sqrt(L0[i] - (L1[i]) * (L1[i]) - (L2[i]) * (L2[i]));
}

I'm not sure if I should add or change anything in this solution.

1) Let A be a symmetric pentadiagonal positive definite matrix of the form Cal 1 0 0 0 a, 0 bo 0 a 0 ba 0 0 2 0 b 0 bn 0 an n-4 m-2 0 b am-1 an n-2 Write an algorithm that generates a lower-triangular L such that A -LL'. That is, construct the vectors LO, LI, L2 so that LO L1 LO 0 L2 L1 LO 0 0 L2 LO L1 n-2 Use the given single subscripting and fully exploit the sparsity pattern. Assume that n 23. Hint: The number of special cases can be reduced by working one row at a time.

Explanation / Answer

The first 3 lines of your algorithm are correct. But when it comes to the 4th line

L0[2] = sqrt(a[2]*(L1[1]*L1[1])) IS CORRECT.

the fifth and sixth lines are correct.

and in the loop

IF i=3 b[i-3] and b[i-4] are not valid.

cholesky decomposition should be used to solve this. since it already mentioned that it is pentagonal it can be done without any 2d arrays.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote