diff --git a/.gitignore b/.gitignore index 79ba647..3956a8b 100755 --- a/.gitignore +++ b/.gitignore @@ -143,5 +143,6 @@ sympy-plots-for-*.tex/ .DS_Store !*.pdf +*.zip *~ diff --git a/mp1/files_data/ETH500.mat b/mp1/Project.1.Maggioni.Claudio/ETH500.mat similarity index 100% rename from mp1/files_data/ETH500.mat rename to mp1/Project.1.Maggioni.Claudio/ETH500.mat diff --git a/mp1/files_data/pagerank.m b/mp1/Project.1.Maggioni.Claudio/pagerank.m similarity index 100% rename from mp1/files_data/pagerank.m rename to mp1/Project.1.Maggioni.Claudio/pagerank.m diff --git a/mp1/files_data/pagerank1.m b/mp1/Project.1.Maggioni.Claudio/pagerank1.m similarity index 100% rename from mp1/files_data/pagerank1.m rename to mp1/Project.1.Maggioni.Claudio/pagerank1.m diff --git a/mp1/files_data/pagerank2.m b/mp1/Project.1.Maggioni.Claudio/pagerank2.m similarity index 100% rename from mp1/files_data/pagerank2.m rename to mp1/Project.1.Maggioni.Claudio/pagerank2.m diff --git a/mp1/files_data/run1.mat b/mp1/Project.1.Maggioni.Claudio/run1.mat similarity index 100% rename from mp1/files_data/run1.mat rename to mp1/Project.1.Maggioni.Claudio/run1.mat diff --git a/mp1/files_data/run1rank.fig b/mp1/Project.1.Maggioni.Claudio/run1rank.fig similarity index 100% rename from mp1/files_data/run1rank.fig rename to mp1/Project.1.Maggioni.Claudio/run1rank.fig diff --git a/mp1/files_data/run1rank.txt b/mp1/Project.1.Maggioni.Claudio/run1rank.txt similarity index 100% rename from mp1/files_data/run1rank.txt rename to mp1/Project.1.Maggioni.Claudio/run1rank.txt diff --git a/mp1/files_data/run2.mat b/mp1/Project.1.Maggioni.Claudio/run2.mat similarity index 100% rename from mp1/files_data/run2.mat rename to mp1/Project.1.Maggioni.Claudio/run2.mat diff --git a/mp1/files_data/run2rank.fig b/mp1/Project.1.Maggioni.Claudio/run2rank.fig similarity index 100% rename from mp1/files_data/run2rank.fig rename to mp1/Project.1.Maggioni.Claudio/run2rank.fig diff --git a/mp1/files_data/run2rank.txt b/mp1/Project.1.Maggioni.Claudio/run2rank.txt similarity index 100% rename from mp1/files_data/run2rank.txt rename to mp1/Project.1.Maggioni.Claudio/run2rank.txt diff --git a/mp1/files_data/run3.mat b/mp1/Project.1.Maggioni.Claudio/run3.mat similarity index 100% rename from mp1/files_data/run3.mat rename to mp1/Project.1.Maggioni.Claudio/run3.mat diff --git a/mp1/files_data/run3rank.fig b/mp1/Project.1.Maggioni.Claudio/run3rank.fig similarity index 100% rename from mp1/files_data/run3rank.fig rename to mp1/Project.1.Maggioni.Claudio/run3rank.fig diff --git a/mp1/files_data/run3rank.txt b/mp1/Project.1.Maggioni.Claudio/run3rank.txt similarity index 100% rename from mp1/files_data/run3rank.txt rename to mp1/Project.1.Maggioni.Claudio/run3rank.txt diff --git a/mp1/files_data/run3spy.fig b/mp1/Project.1.Maggioni.Claudio/run3spy.fig similarity index 100% rename from mp1/files_data/run3spy.fig rename to mp1/Project.1.Maggioni.Claudio/run3spy.fig diff --git a/mp1/files_data/surfer.m b/mp1/Project.1.Maggioni.Claudio/surfer.m similarity index 100% rename from mp1/files_data/surfer.m rename to mp1/Project.1.Maggioni.Claudio/surfer.m diff --git a/mp1/assignment.sty b/mp1/assignment.sty index 54ff904..d8e8b12 100644 --- a/mp1/assignment.sty +++ b/mp1/assignment.sty @@ -3,6 +3,7 @@ \usepackage{graphics} \usepackage{graphicx} \usepackage{hyperref} +\usepackage{cleveref} \pagestyle{plain} \voffset -5mm @@ -13,7 +14,7 @@ \topmargin 0mm \headheight 0pt \headsep 0pt -\topskip 0pt +\topskip 0pt \textheight 255mm \textwidth 165mm @@ -37,13 +38,13 @@ \multicolumn{2}{|c|}{\large\textbf{submissions that don't comply with, won't be considered)}}\\ &\\ \textbullet & Assignments must be submitted to \href{https://www.icorsi.ch/course/view.php?id=10018}{iCorsi} (i.e. in electronic format).\\ -\textbullet & Provide both executable package and sources (e.g. C/C++ files, Matlab). +\textbullet & Provide both executable package and sources (e.g. C/C++ files, Matlab). If you are using libraries, please add them in the file. Sources must be organized in directories called:\\ \multicolumn{2}{|c|}{\textit{Project\_number\_lastname\_firstname}}\\ & and the file must be called:\\ \multicolumn{2}{|c|}{\textit{project\_number\_lastname\_firstname.zip}}\\ \multicolumn{2}{|c|}{\textit{project\_number\_lastname\_firstname.pdf}}\\ -\textbullet & The TAs will grade your project by reviewing your project write-up, and looking at the implementation +\textbullet & The TAs will grade your project by reviewing your project write-up, and looking at the implementation you attempted, and benchmarking your code's performance.\\ \textbullet & You are allowed to discuss all questions with anyone you like; however: (i) your submission must list anyone you discussed problems with and (ii) you must write up your submission independently.\\ diff --git a/mp1/template.pdf b/mp1/project.1.Maggioni.Claudio.pdf similarity index 94% rename from mp1/template.pdf rename to mp1/project.1.Maggioni.Claudio.pdf index 2571f25..aac45a0 100644 Binary files a/mp1/template.pdf and b/mp1/project.1.Maggioni.Claudio.pdf differ diff --git a/mp1/template.tex b/mp1/project.1.Maggioni.Claudio.tex similarity index 99% rename from mp1/template.tex rename to mp1/project.1.Maggioni.Claudio.tex index 985b58e..ab1dd77 100644 --- a/mp1/template.tex +++ b/mp1/project.1.Maggioni.Claudio.tex @@ -10,8 +10,8 @@ \setassignment \setduedate{Thursday, 8 October 2020, 12:00 AM} -\serieheader{Numerical Computing}{2020}{Student: Claudio Maggioni}{Discussed with: --}{Solution for Project 1}{} -ewline +\serieheader{Numerical Computing}{2020}{Student: Claudio Maggioni}{Discussed +with: --}{Solution for Project 1}{}\newline \assignmentpolicy The purpose of this assignment\footnote{This document is originally based on a SIAM book chapter from \textsl{Numerical Computing with Matlab} from Clever B. Moler.} is to learn the importance of numerical linear algebra algorithms to solve fundamental linear algebra problems that occur in search engines. @@ -68,7 +68,7 @@ factor $\gamma$ that will converge to a denormalized version of $x_1$, named $\beta x_1$. We can then simplify the $a_1\lambda_1^{i}x_1$ terms in the sequences with $\beta_{i} x_1$ since $\beta_i$ can be set freely. -Now we consider that if $|\lambda_2| > |\lambda_i| \forall i \in 3..n$ (since we +Now we consider that if $|\lambda_2| > |\lambda_i| \; \forall i \in 3 \dots n$ (since we sorted the eigenvalues), then $\left(\frac{\lambda_i}{\lambda_1}\right)^n$ for $i > 2$ will always converge faster to 0 than $\left(\frac{\lambda_2}{\lambda_1}\right)^n$ thus all terms other than @@ -116,7 +116,7 @@ is the corresponding eigenvalue, while if $x$ is an eigenvector approximation, f \subsection{Other webgraphs [10 points]} -The provided PageRank MATLAB implementation was run 3 times on the starting websites \texttt{http://atelier.inf.usi.ch/~maggicl}, \texttt{https://www.iisbadoni.edu.it}, and \texttt{https://www.usi.ch}, with results listed respectively in Figure \ref{fig:run1}, Figure \ref{fig:run2} and Figure \ref{fig:run3}. +The provided PageRank MATLAB implementation was run 3 times on the starting websites \texttt{http://atelier.inf.usi.ch/~maggicl}, \texttt{https://www.iisbadoni.edu.it}, and \texttt{https://www.usi.ch}, with results listed respectively in \Cref{fig:run1}, \Cref{fig:run2} and \Cref{fig:run3}. One patten that emerges on the first and third execution is the presence of 1s in the main diagonal. This indicates that several pages found have a link to themselves. @@ -153,8 +153,8 @@ Finally, we can always observe a line starting from the top-left of G and ending \end{verbatim} \caption{Top 10 webpages with highest PageRank} \end{subfigure} -\label{fig:run1} \caption{Results of first PageRank calculation (for starting website \texttt{http://atelier.inf.usi.ch/~maggicl/})} +\label{fig:run1} \end{figure} \begin{figure}[h] @@ -187,8 +187,8 @@ Finally, we can always observe a line starting from the top-left of G and ending \end{verbatim} \caption{Top 10 webpages with highest PageRank} \end{subfigure} -\label{fig:run2} \caption{Results of second PageRank calculation (for starting website \texttt{https://www.iisbadoni.edu.it/})} +\label{fig:run2} \end{figure} \begin{figure}[h] @@ -219,8 +219,8 @@ Finally, we can always observe a line starting from the top-left of G and ending \end{verbatim} \caption{Top 10 webpages with highest PageRank} \end{subfigure} -\label{fig:run3} \caption{Results of third PageRank calculation (for starting website \texttt{https://www.usi.ch/})} +\label{fig:run3} \end{figure} \subsection{Connectivity matrix and subcliques [10 points]} diff --git a/mp1/submit.sh b/mp1/submit.sh new file mode 100755 index 0000000..64c1ba6 --- /dev/null +++ b/mp1/submit.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +PID="1" +dname="Project.$PID.Maggioni.Claudio" +zname="project.$PID.Maggioni.Claudio" + +rm -v $zname.zip +zip $zname.zip $zname.{pdf,tex} $dname/run{1..3}.mat $dname/pagerank{1..2}.m