Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
316 lines (249 sloc) 7.59 KB
Product:
an assessment list of questions for incoming to discrete math
%\begin{enumerate}
%\item Matching symbolic representations (i.e., equations in figures) with algorithms in pseudocode:
%Stick breaking:\\
%Start with a unit length.\\ % stick.\\
%This unit serves as "what is in stock".\\
%Every time a fractional part is required, a random fraction of the remaining %stock is taken.// %the stick is broken, one piece will be provided as output of the process, and the remainder will be held for future breaking.\\
%When it is desired to have $p$ fractions, adding to length 1, $p-1$ iterations will satisfy this.\\
\begin{figure}[ht]
\centering
\includegraphics[width=0.7
\linewidth]{./pic8}
\caption{Equation (1)}
\end{figure}
\begin{figure}[ht]\centering
\[
\sum_{i=0}^k \frac{1}{2^i}
\]
\caption{Equation (2)}
\end{figure}
% \begin{algorithm}[H]
% factorization(n)\;
% \KwData{an integer $\geq 2$, which becomes bound to the variable n}
% \KwResult{a prime factorization of n}
% \eIf{$prime(n)$}{
% return n
% }{
% (factor1, factor2) = getFactors(n)\;
% return factorization(factor1) $\times$ factorization(factor2)
% }
% \caption{pseudocode for obtaining factorization }
% \end{algorithm}
\begin{multicols}{2}
\begin{algorithm}[H]
\caption{ }
\begin{algorithmic}[1]
%\IF{$A \rightarrow false$}
%\STATE $A = false$\\
%\ENDIF
\STATE num = rand()*10;\\
\STATE stock = 1;\\
\STATE amount = 0;\\
\STATE frac = 1/2;\\
getRandomFraction()
\WHILE{num $>0$}
\STATE{stock = stock*frac;
\STATE amount = stock+amount;\\
\STATE num = num-1;\\
} \ENDWHILE
return amount;\\
\}
\end{algorithmic}
\end{algorithm}
\columnbreak
\begin{algorithm}[H]
\caption{ }
\begin{algorithmic}[1]
%\IF{$A \rightarrow false$}
%\STATE $A = false$\\
%\ENDIF
\STATE num = rand()*10;\\
\STATE stock = 1;\\
\STATE amount = 0;\\
\STATE frac = 1/2;\\
getRandomFraction()
\STATE frac=rand(); \\
\STATE amount = stock*frac;\\
\STATE stock = stock - amount;\\
return amount;
\end{algorithmic}
\end{algorithm}
\end{multicols}
Circle your choice:\\
Equation 1 goes with Algorithm 1? Yes, No\\
Equation 1 goes with Algorithm 2? Yes, No\\
Equation 2 goes with Algorithm 1? Yes, No\\
Equation 2 goes with Algorithm 2? Yes, No\\
\newpage
%\item Matching figures/diagrams with symbolic representations\\
Show which equation goes with which diagram, if they can be matched.
\begin{enumerate}
\item \begin{figure}[ht]
\centering
\includegraphics[width=0.7\linewidth]{./pic2GNUPaint}
\caption{}
\label{fig:pic2}
\end{figure}
\item \begin{figure}[ht]
\centering
\includegraphics[width=0.7\linewidth]{./pic4}
\caption{}
\label{fig:pic4}
\end{figure}
\end{enumerate}
\begin{enumerate}
\item $b^2 + ab = (b+a/2)^2 - (a/2)^2$
\item $(a+b)^2 + (a-b)^2 = 2(a^2 + b^2)$
\end{enumerate}
Circle your choice:\\
Equation (a) goes with Figure 3? Yes, No\\
Equation (b) goes with Figure 3? Yes, No\\
Equation (a) goes with Figure 4? Yes, No\\
Equation (b) goes with Figure 4? Yes, No\\
\newpage
%\item Matching figures/diagrams with pseudocode
%\begin{enumerate}
\begin{figure}
\centering
\includegraphics[width=0.6\linewidth]{./pic9}
\caption{First}
\label{fig:pic9}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.6\linewidth]{./pic10GNU}
\caption{Second}
\label{fig:pic10}
\end{figure}
\begin{multicols}{2}
\begin{algorithm}[H]
\caption{ }
\begin{algorithmic}[1]
\STATE amount = 1;\\
getAmount(n)\{\\
\STATE amount = 0;
\FOR{$i=0$ to $n$}
\STATE \FOR{$j=0$ to $i$}
\STATE amount = amount +j;
\ENDFOR
\ENDFOR\\
return amount;\}
\end{algorithmic}
\end{algorithm}
\columnbreak
\begin{algorithm}[H]
\caption{ }
\begin{algorithmic}[1]
\STATE amount = 1;\\
getAmount(n)\{\\
\IF{$n=0$}
\STATE return (1)
\ELSE
\STATE return(2*getAmount(n-1)+1)
\ENDIF\\
\}
\end{algorithmic}
\end{algorithm}
\end{multicols}
\newpage
Circle your choice:\\
Figure 5 goes with Algorithm 3? Yes, No\\
Figure 5 goes with Algorithm 4? Yes, No\\
Figure 6 goes with Algorithm 3? Yes, No\\
Figure 6 goes with Algorithm 4? Yes, No\\
%\item
%\item
%\end{enumerate}
%\newpage
%\item Comprehending figures\\
%Explain why the figure matches the equation $\frac{a+b}{2} \geq \sqrt{ab}$ with equality if and only if $a=b$
%\begin{figure}
%\centering
%\includegraphics[width=0.7\linewidth]{./pic5}
%\caption{}
%\label{fig:pic5}
%\end{figure}
\newpage
%\item Comprehending symbolic representation\\
Describe in text what this symbolic statement means:\\
\[
\sum_{ k \in \mathbb{N}}^{\infty} (2k+1)
\]
\newpage
%\item Comprehending pseudocode
Describe in text, what this process is doing:\\
Challenge question: What is the significance of the process described by this pseudocode?
\begin{algorithm}[H]
\caption{ }
\begin{algorithmic}[1]
\STATE done = false;\\
\STATE a = 0;\\
\STATE b = 0;\\
\STATE c=0;\\
\STATE n = 2;\\
\WHILE{!done}
\STATE{ \WHILE{$a>0$}
\STATE{ a=a+1;
\WHILE{$b>0$}
\STATE{ b=b+1;
\WHILE{$c>0$}
\STATE{ c=c+1;\\
\WHILE{$n>0$}
\STATE{ n=n+1;\\
\IF{$a^n +b^n = c^n$}
\STATE done = true;
\ENDIF\\
} \ENDWHILE
} \ENDWHILE\\
} \ENDWHILE\\
} \ENDWHILE
} \ENDWHILE
\end{algorithmic}
\end{algorithm}
\newpage
Applying symbolic representation to figure
Label these figures mathematical symbols:\\
Challenge question: What is the significance of these figures taken together?
\vspace{1cm}
\begin{figure}[ht]
\centering
\includegraphics[width=0.7\linewidth]{./pic1}
\caption{}
\label{fig:pic1}
\end{figure}
\newpage
Applying figure to symbolic representation
Draw a figure that expresses:\\
Through any three points that are not collinear, two can be used to identify a line, and the third can be used, combined with that line, to identify a line parallel to the first line.
\newpage
Applying pseudocode to figure
Write pseudocode (e.g., as has been seen earlier in these questions) to count the little squares, according to the method suggested by the shading in the figure: \\
Hint: the bottom row could be row 1.\\
$n$ and $k$ could be parameters.%(p. 93)\\
\begin{figure}[ht]
\centering
\includegraphics[width=0.7\linewidth]{./p93}
\label{fig:p93}
\end{figure}
\newpage
Applying pseudocode to symbolic representation
Write pseudocode for the calculation below:\\
Hint: ${ n \choose k} $ means, from a set of size $n$ choose (without replacement) $k$ elements.\\
For example, from a list of friends of size $n$, choose a list of party guests of size $k$. (Without replacement means, you do not send two invitations to the same friend.)
Please say whether the concrete example (friends, guest list) aided your thinking.
${ n \choose k} = {n-1 \choose k-1}+ {n-1 \choose k}$
\newpage
Synthesis: word problems to figures
Draw a figure for this word problem:\\
Pick an angle between 0 and $\pi/2$ radians, call it $\theta$.\\
A right triangle can be drawn, the height of which is 1 plus the tangent of $\theta$, the base of which is 1 plus the cotangent of $\theta$. The angle $\theta$ is adjacent to the base. It will be the case that the hypotenuse of this triangle is the cosecant of $\theta$ plus the secant of $\theta$.
\newpage
Synthesis: word problems to symbolic representation\\
Express in symbols this word problem:\\
The number of moves in a game of size n is given by twice the number of moves in a game of size (n-1), plus one more move.
\newpage
Synthesis: word problems to pseudocode
Write pseudocode for this word problem:\\
Two trains, initially 40 miles apart on the same track, going opposite directions, are getting closer to each other at the rate of 40 miles per hour. An insect flies from one train to the other and back, at a constant speed of $v$, repeatedly. How far does the insect fly, before the trains collide?
You can’t perform that action at this time.