Average value of the pivots found during LU factorization.

325 Views Asked by At

Following is an exercise from 'Linear algebra and its applications' by Gilbert Strang.

Find experimentally the average size (absolute value) of the first and second and third pivots for MATLAB's lu(rand(3, 3)). The average of the first pivot from

I wrote the following octave code for this exercise:

s1 = 0;
s2 = 0;
s3 = 0;
n = 1000;
for i=1:n
    [L, U] = lu(rand(3,3));
    s1 += abs(U(1,1));
    s2 += abs(U(2,2));
    s3 += abs(U(3,3));
end

disp(s1/n)
disp(s2/n)
disp(s3/n)

The exercise states that the average value of the first pivot shoult be 0.5, but the above code produces this output:

> octave t.m
 0.74990
 0.49116
 0.36700

Why do these results disagree with what's stated in the exercise? Is their a proof for the result stated in the exercise?

1

There are 1 best solutions below

1
On

With total pivoting, the first pivot is the element with the largest absolute value. In a set of nine uniformly distributed random numbers in $[0,1]$, the expectation is $\dfrac9{9+1}$.

Using partial pivoting only the first column is involved, and $\dfrac3{3+1}$.


$\dfrac12$ is the expectation of every single element.