class: center, middle name: title # CS 10C - Written HW ![:newline] .Huge[*Prof. Ty Feng*] ![:newline] .Large[UC Riverside - SQ 2026] ![:newline 6]  .footnote[Copyright © 2026 Joël Porquet-Lupine and Ty Feng - [CC BY-NC-SA 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/)] --- layout: true # Homework questions --- ## Q3 - (Thoroughly) justify your answers when specified. - For example, to prove \\(3N^2+2N+4 = O(N^2)\\) .lcol[ Insufficient answer: $c = 9, n_0 = 1$ ] .rcol[ Correct answer: To prove $3N^2+2N+4 = O(N^2)$, we need to find $c$ and $n_0$ such that: - $3N^2+2N+4 \leq cN^2$ - $3N^2 \leq 3N^2$, $2N \leq 2N^2$, $4 \leq 4N^2$ - $3N^2+2N+4 \leq 9N^2$ for $N \geq 1$ - Therefore, for $c = 9$ and $n_0 = 1$, $3N^2+2N+4 \leq 9N^2$ when $N \geq n_0$. $T(N) = O(N^2)$. ] --- ## Q5 - Question has to do with proportionality - $N \propto T$ means that $\frac{N_1}{N_2} = \frac{T_1}{T_2}$ - Knowing $N_1, T_1, T_2$, find $N_2$ -- ![:newline 2] ### But careful! - Proportionality is not always linear - $\log N \propto T$ means that $\frac{\log N_1}{\log N_2} = \frac{T_1}{T_2}$ - Knowing $N_1, T_1, T_2$, find $N_2$... --- layout: true # Gradescope submission --- ## Admin - Type in your answers directly in the box below each question - Supports LaTeX *(see next slide)* - You can submit (*save*) as many times as you want before the deadline ![:newline]  --- ## What is LaTeX? - Document preparation system (very popular in scientific publishing) - Especially good for formatting math equations ![:newline]  - To get started, visit [LaTeX math cheatsheet](https://wch.github.io/latexsheet/latexsheet.pdf) ??? - Keep it simple