diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-29 22:50:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-29 22:50:15 +0000 |
commit | 120c0c49c7474dd161886fd979a0126398043d3d (patch) | |
tree | 8f5d5bc99b6c321770f388c85d30b8b775d62c6e /Master/texmf-dist/doc/latex/brandeis-problemset/example.tex | |
parent | bc7aa0d51e3d33e22443fbc7eda7b5c63d58afbf (diff) |
brandeis-problemset (29dec18)
git-svn-id: svn://tug.org/texlive/trunk@49528 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/brandeis-problemset/example.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/brandeis-problemset/example.tex | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/brandeis-problemset/example.tex b/Master/texmf-dist/doc/latex/brandeis-problemset/example.tex index e558f7fb368..712c8d2b97c 100644 --- a/Master/texmf-dist/doc/latex/brandeis-problemset/example.tex +++ b/Master/texmf-dist/doc/latex/brandeis-problemset/example.tex @@ -10,10 +10,14 @@ \newcommand{\cpu}{\ac{cpu}} \begin{document} +\maketitle + \Bf{Note:} This example document is provided for illustrative purposes. The -solutions below are not guaranteed to be correct or relevant. +solutions below are not guaranteed to be correct, complete, or relevant. -\begin{problem} +\tableofcontents + +\begin{problem}[part] An assembly language program implements the following loop: \begin{lstlisting}[language=c] @@ -29,6 +33,9 @@ while(i <= 50) { where $x$ is the address of the memory location where the assembly program is loaded. Write the assembly program using the assembly language introduced in class. + + For a completely unrelated problem, see problem~\ref{schedule} (this + is an example of a \lstinline!\label! / \lstinline!\ref! pair). \end{problem} \begin{assembly} @@ -95,6 +102,10 @@ LOOP: STORE R2, @R1 ; *A = i \end{enumerate} \end{problem} +\begin{solution} +The blue text here is a solution; it will disappear if the +\Tt{solutions} class option is removed. + ``Rule $n$'' should be taken to refer to the $n$th rule on page 3 of the 5th lecture notes, and ``$a$ is faster-growing than $b$'' is written as ``$O(a) > O(b)$''. @@ -136,6 +147,7 @@ O(n^5)$. \item $c = 2, n_0 = 1$ \end{enumerate} +\end{solution} \begin{problem} What do the following two algorithms do? Analyze its worst-case @@ -177,7 +189,7 @@ $\Rm{Foo}(a, n)$ computes $a^n$, and will run in $O(n)$ time always. $\Rm{Bar}(a, n)$ \It{also} computes $a^n$, and runs in $O(\log n)$ time --- this is referred to as exponentiation by squaring. -\begin{problem}[number=5.4] +\begin{problem}[number=5.4, part=Scheduling, label=schedule] Consider the following set of processes, with the length of the \cpu\ burst given in milliseconds: |