mp2: done 1-5
This commit is contained in:
parent
c2e4b3933a
commit
c4e74d48c4
4 changed files with 35 additions and 5 deletions
8
mp2/Project.2.Maggioni.Claudio/ex4.m
Normal file
8
mp2/Project.2.Maggioni.Claudio/ex4.m
Normal file
|
@ -0,0 +1,8 @@
|
|||
clear;
|
||||
clc;
|
||||
load('householder/housegraph.mat')
|
||||
names = split(strtrim(convertCharsToStrings(name')));
|
||||
|
||||
common1 = names((A(:,Golub) .* A(:, Moler)) == 1)
|
||||
common2 = names((A(:,Golub) .* A(:, Saunders)) == 1)
|
||||
common3 = names((A(:,TChan) .* A(:, Demmel)) == 1)
|
Binary file not shown.
|
@ -91,11 +91,11 @@ blanks):
|
|||
|
||||
\[
|
||||
A := \begin{bmatrix}
|
||||
1 & 1 & 1 & \hdots & 1 \\
|
||||
1 & 1 & && 1 \\
|
||||
1 & & 1 && 1 \\
|
||||
n & 1 & 1 & \hdots & 1 \\
|
||||
1 & n + 1 & && 1 \\
|
||||
1 & & n + 2 && 1 \\
|
||||
\vdots & & & \ddots & \vdots \\
|
||||
1 & 1 & 1 & \hdots & 1 \\
|
||||
1 & 1 & 1 & \hdots & 2n - 1 \\
|
||||
\end{bmatrix}
|
||||
\]
|
||||
|
||||
|
@ -103,7 +103,14 @@ A := \begin{bmatrix}
|
|||
to solve $Ax = b$
|
||||
for a given righthand-side vector would be problematic.}
|
||||
|
||||
\textbf{A IS NOT POSITIVE DEFINITE: CHECK WITH EDOARDO}
|
||||
Solving $Ax = b$ would be a costly operation since the a Cholesky
|
||||
decomposition of matrix $A$ (performed using MATLAB's \texttt{chol(\ldots)})
|
||||
would drastically reduce the number of zero elements in the matrix in the very
|
||||
first iteration. This is due to the fact that the first row, by definition, is
|
||||
made of of only nonzero elements (namely 1s) and by subtracting the first row to
|
||||
every other row (as what would effectively happen in the first iteration of the
|
||||
Cholesky decomposition of A) the zero elements would become (negative) nonzero
|
||||
elements, thus making all columns but the first almost empty of 0s.
|
||||
|
||||
\section{Degree Centrality [10 points]}
|
||||
|
||||
|
@ -233,6 +240,21 @@ Varah 1: Golub
|
|||
|
||||
\section{The Connectivity of the Coauthors [10 points]}
|
||||
|
||||
The author indexes of the common authors between the author at index $i$ and the
|
||||
author at index $j$ can be computed by listing the indexes of the nonzero
|
||||
elements in the Schur product (or element-wise product) between $A_{:,i}$ and
|
||||
$A_{:,j}$ (respectively the i-th and j-th column vector of $A$). Therefore the set $C$ of common coauthor's indexes can be defined
|
||||
as:
|
||||
|
||||
\[C = \{i \in N_0 \;|\; (A_{:,i} \odot A_{:,j})_i = 1\}\]
|
||||
|
||||
The common Co-authors between Golub and Moler are Wilkinson and Van Loan.
|
||||
|
||||
The common Co-authors between Golub and Saunders are Golub, Saunders and Gill.
|
||||
|
||||
The common Co-authors between TChan and Demmel are Schreiber, Arioli, Duff and
|
||||
Heath.
|
||||
|
||||
\section{PageRank of the Coauthor Graph [10 points]}
|
||||
|
||||
\section{Zachary's karate club: social network of friendships between 34 members [50 points]}
|
||||
|
|
Reference in a new issue