\documentclass[12pt]{article}

\usepackage{fullpage,amsmath,amsfonts}

\begin{document}

\title{Algorithms and Data Structures}
\author{Summer Semester 2024}
\date{For discussion on Wednesday, April 24, 2022}
\maketitle

\begin{enumerate}
\item (GTG Exercise R-3.2)  The number of operations executed by
algorithms A and B is $8n \log n$ and
$2n^2$, respectively. Determine $n_0$ such that A is better than B for
$n \geq n_0$.

\item (GTG Exercise R-3.5) Explain why the plot of the function
$n^\gamma$ is a straight line with slope $\gamma$ on a log-log scale.

\item (GTG Exercise R-3.6) What is the sum of all the even numbers
from $0$ to $2n$, for any positive integer $n$?

\item (GTG Exercise R-3.7) Show that the following two statements are
equivalent:
\begin{enumerate}
\item The running time of algorithm A is always $O( f (n))$.
\item In the worst case, the running time of algorithm A is $O( f (n))$.
\end{enumerate}

\item (GTG Exercise R-3.11) Show that if $d(n)$ is $O( f (n))$ and
$e(n)$ is $O(g(n))$, then $d(n) + e(n)$ is $O( f (n) + g(n))$.


\item (GTG Exercise R-3.12) Show that if $d(n)$ is $O( f (n))$ and
$e(n)$ is $O(g(n))$, then $d(n) - e(n)$ is not necessarily
$O( f (n) - g(n))$.


\end{enumerate}
\end{document}
