gvsu/cs677/hw5/hw.tex
josh 446b8464b3 updating hw.tex, added src from hw7
git-svn-id: svn://anubis/gvsu@227 45c1a28c-8058-47b2-ae61-ca45b979098e
2008-11-01 16:56:50 +00:00

54 lines
1.4 KiB
TeX

% Preamble
\documentclass[11pt,fleqn]{article}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{fancyhdr}
\oddsidemargin -0.25in
\textwidth 6.75in
\topmargin -0.5in
\headheight 0.75in
\headsep 0.25in
\textheight 8.75in
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\lhead{HW Chap. 5\\\ \\\ }
\rhead{Josh Holtrop\\2008-11-05\\CS 677}
\rfoot{\thepage}
\begin{document}
\noindent
\begin{enumerate}
\item[1.]{
The best known sequential sorting algorithms have a complexity of $O (n \log n)$.
So, the speedup factor is given by
$$ s = \frac{T_s}{T_p} = \frac{n \log n}{cn} = \frac{\log n}{c} $$
}
\item[2.]{
The total processing time when the program is run on $p$ processors
will be given by the initialization phase plus the compute phase
divided by $p$ processors.
So, the speedup is given by
$$ s = \frac{T_s}{T_p} = \frac{n + n^3}{n + \frac{n^3}{p}} $$
}
\item[3.]{
Using Amdahl's law, the maximum speedup is $1/f$, where $f$ is the
serial fraction of execution time.
So, the maximum fraction of execution time a program can spend on
serial code if the parallel version must achieve a speedup
factor of 10 is 10\%.
}
\vskip 1em
\item[4.]{
Using Gustafson's law, the scaled speedup factor is given by
$$ S_G = p + (1 - p) T_s = 8 + (1 - 8) \frac{1}{24} = 7.708 $$
}
\end{enumerate}
\end{document}