mp1: correction

This commit is contained in:
Claudio Maggioni 2020-10-07 17:13:37 +02:00
parent 00971fbb87
commit 11b57929e1
2 changed files with 19 additions and 4 deletions

View file

@ -104,7 +104,13 @@ By choosing $\alpha$ close to $\lambda_1$, the convergence is sped up. To furthe
\subsubsection{What is the difference in cost of a single iteration of the power method, compared to the inverse iteration?} \subsubsection{What is the difference in cost of a single iteration of the power method, compared to the inverse iteration?}
Inverse iteration is generally more expensive than a regular application of the power method, due to the overhead caused by the intermediate matrix B. One must either recompute B every time $\alpha$ changes, which is rather expensive due to the inverse operation in the definition of B, or one must solve the matrix equation $(A - \alpha I)v_k = v_{k-1}$ in every iteration. Inverse iteration is generally more expensive than a regular application of the
power method, due to the fact that the computation is based on the solution of a
linear system, which compared to the matrix vector multiplication performed by
the power method it is quite expensive. One must either recompute B every time
$\alpha$ changes, which is rather expensive due to the inverse operation in the
definition of B, or one must solve the matrix equation
$(A - \alpha I)v_k = v_{k-1}$ in every iteration.
\subsubsection{What is a Rayleigh quotient and how can it be used for eigenvalue computations?} \subsubsection{What is a Rayleigh quotient and how can it be used for eigenvalue computations?}
@ -696,7 +702,7 @@ maintained during the computation thus saving memory costs.
However, since my \texttt{pagerank2.m} implementation is a simplified However, since my \texttt{pagerank2.m} implementation is a simplified
implementation of the algorithm and indeed uses system solution implementation of the algorithm and indeed uses system solution
(MATLAB's \texttt{mldivide}), this (MATLAB's \texttt{mldivide}), this
theoretical advantages are voided: my implementation is 3 times as long as the theoretical advantages are voided: my implementation takes 3 times as long as the
original one and uses approximately the same amount of memory. Advantages over original one and uses approximately the same amount of memory. Advantages over
\texttt{pagerank1.m} (due to the intentionally increased rate of convergence) \texttt{pagerank1.m} (due to the intentionally increased rate of convergence)
are clear: in are clear: in

9
mp2/submit.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
PID="2"
dname="Project.$PID.Maggioni.Claudio"
zname="project.$PID.Maggioni.Claudio"
rm -v $zname.zip
zip $zname.zip ex*.tex $zname.{pdf,tex} $dname/ex?.m $dname/example.m $dname/degcentrality.m \
$dname/pagerank.m 1_*.pdf