q2.tex 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. \documentclass[11pt]{article}
  2. \usepackage{amsthm,amsmath,amsfonts,amssymb}
  3. \usepackage[ruled,noline,noend]{algorithm2e}
  4. \usepackage[margin=1in]{geometry}
  5. \usepackage{enumerate}
  6. %%% Update the following commands with your name, ID, and acknowledgments.
  7. \newcommand{\YourName}{REPLACE WITH YOUR NAME}
  8. \newcommand{\YourStudentID}{REPLACE WITH ID NUMBER}
  9. \newcommand{\YourAck}{REPLACE this text with a full acknowledgement of all sources (people you discussed the question with and/or online/text sources you consulted) used while completing this question. If you completed the question without consulting any sources, say so here explicitly.}
  10. \newenvironment{solution}{\paragraph{Solution.}}{}
  11. \title{
  12. \vspace{-0.8in} \normalsize
  13. \begin{flushright} \YourName \\ \YourStudentID \end{flushright}
  14. \rule{\textwidth}{.5pt}\\[0.4cm] \huge Assignment 1: Question 2 \\
  15. \rule{\textwidth}{2pt}
  16. \vspace{-1in}
  17. }
  18. \date{}
  19. \begin{document}
  20. \maketitle
  21. \paragraph{Acknowledgments.} \YourAck
  22. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  23. \section*{Solving recurrences}
  24. Solve the following recurrence relations to obtain a closed-form big-$\Theta$ expression for $T(n)$.
  25. In each question, assume $T(c)$ is bounded by a constant for any small constant $c$.
  26. \begin{enumerate}[(a)]
  27. \item $T(n) = 9\,T(\frac{n}{3}) + n^2$
  28. \begin{solution}
  29. (ENTER YOUR SOLUTION HERE.)
  30. \end{solution}
  31. \item $T(n) = 4\,T(\frac{n}{4}) + n \log n$
  32. \begin{solution}
  33. (ENTER YOUR SOLUTION HERE.)
  34. \end{solution}
  35. \item $T(n) = T(\frac{n}{4}) + T(\frac{3n}{4}) + n$
  36. \begin{solution}
  37. (ENTER YOUR SOLUTION HERE.)
  38. \end{solution}
  39. \item $T(n) = \sqrt{n} \cdot T(\sqrt{n}) + n$ \\
  40. \emph{Hint.} The correct expression is somewhere between $\Omega(n)$ and $O(n \log n)$.
  41. \begin{solution}
  42. (ENTER YOUR SOLUTION HERE.)
  43. \end{solution}
  44. \end{enumerate}
  45. \end{document}