100 lines
5.0 KiB
TeX
100 lines
5.0 KiB
TeX
\documentclass[titlepage]{article}
|
|
\usepackage{amsmath}
|
|
|
|
\setcounter{section}{-1}
|
|
|
|
\begin{document}
|
|
|
|
\include{titlePage}
|
|
|
|
\section*{Introduction}
|
|
This document contains the work I, Uzair Hamed Mohammed, have done as required by this course. This is my first time using \LaTeX \ to format homework, so strange formatting may occur.\\[0.1in]
|
|
The current plan is to append homework assignments to this document as they are assigned. At the end of the semester, the resultant document should be a nice and comprehensive compilation of assignments.\\[0.1in]
|
|
My current workflow is as follows:
|
|
|
|
\begin{enumerate}
|
|
\item Read the homework instructions and try to understand the assignment.
|
|
|
|
\item Conduct research or referencing to relevant material if needed.
|
|
|
|
\item Work by hand, on my tablet, in the Samsung Notes app.
|
|
|
|
\item Beautify my work by transcribing it here using LaTeX.
|
|
\end{enumerate}
|
|
When it's time to submit an assignment, I will export this document as a PDF file and turn in just the relevant pages. Please let me know what you think of this format!
|
|
|
|
\newpage
|
|
|
|
\section{Homework 0}
|
|
\textit{By turning in this assignment, I agree to abide by SFSU's academic integrity code and declare that all of my solutions are my own work: }
|
|
|
|
\subsection{About You}
|
|
\begin{enumerate}
|
|
\item[a.] My pronouns are he/him.
|
|
\item[b.] I've taken a lot of math and computer science courses. I'm not sure if I can list them, as I took most of them at the College of San Mateo and their course numbers are different. However, off the top of my head, I've taken:
|
|
\begin{itemize}
|
|
\item Calculus 1
|
|
\item Calculus 2
|
|
\item Calculus 3
|
|
\item Discrete Mathematics
|
|
\item Linear Algebra
|
|
\item Analysis of Algorithms
|
|
\item Data Structures
|
|
\end{itemize}
|
|
This list consists of the courses I think are relevant to this class; I've taken other CS courses, of course.
|
|
\item [c.] Yes, I am okay with being called on. I won't always know the answer, and I might embarrass myself sometimes, but that's alright because I believe it will force me to pay more attention and learn better, and as a result be more prepared for assignments and exams.
|
|
\end{enumerate}
|
|
|
|
\subsection{Optimization}
|
|
\begin{itemize}
|
|
\item [a.] Let a, b, and c be positive real numbers. Consider the quadratic function
|
|
$$f(\theta) = a{\theta}^2 + b\theta + c$$
|
|
Note that $\theta$ here is a real number. What value of $\theta$ minimizes $f(\theta)$?\\[0.1in]
|
|
Solution:
|
|
Since this is a positive parabola, we can use the formula for the vertex of a parabola, $\frac{-b}{2a}$, to find the minimum:\\
|
|
$$
|
|
\boxed{\theta = \frac{-b}{2a}}
|
|
$$
|
|
|
|
\item [b.] Let $x_1,\dots,x_n$ be real numbers. Consider the quadratic function
|
|
$$g(\theta) = \sum^n_{i=1}(\theta - x_i)^2.$$
|
|
What value of $\theta$ minimizes $g(\theta)$?
|
|
|
|
{\LARGE{TODO}}
|
|
|
|
\item [c.] Let $x_1,\dots,x_n$ again be real numbers, and let $w_1,\dots,w_n$ be positive real numbers that we can interpret as representing the importance of each of the $x_i$'s. Consider the weighted quadratic function
|
|
$$h(\theta) = \sum_{i=1}^{n}w_i(\theta - x_i)^2.$$
|
|
What value of $\theta$ minimizes $h(\theta)$?
|
|
|
|
\item [d.] What issue could arise in the minimization of $h$ if some of the $w_i$'s are negative?
|
|
\end{itemize}
|
|
|
|
\subsection{Probability}
|
|
|
|
\begin{itemize}
|
|
\item [a.] Consider a standard 52-card deck of cards with 13 card values (Ace, King, Queen, Jack, and
|
|
2-10) in each of the four suits (clubs, diamonds, hearts, spades). If a card is drawn at random, what
|
|
is the probability that it is a spade or a two?
|
|
|
|
\item [b.] Two factories — Factory A and Factory B — design batteries to be used in mobile phones.
|
|
Factory A produces 60\% of all batteries, and Factory B produces the other 40\%. 2\% of Factory A's
|
|
batteries have defects, and 4\% of Factory B's batteries have defects. What is the probability that a
|
|
battery is both made by Factory A and defective?
|
|
|
|
\item [c.] Consider the following (made up) facts about COVID incidence and testing:
|
|
\begin{itemize}
|
|
\item In the absence of any special information, the probability that a person has COVID is 1\%.
|
|
\item If a person has COVID, the probability that a test will correctly read positive is 80\%.
|
|
\item If a person does not have COVID, the probability that a test will incorrectly produce a false positive is 10\%.
|
|
\end{itemize}
|
|
|
|
Suppose you take a COVID test and it reads positive. Given the facts above, what is the probability
|
|
that you have COVID?
|
|
|
|
\item [d. ] Suppose you repeatedly roll a fair six-sided die until you roll a 1 (and then you stop). Every
|
|
time you roll a 3, you win a points, and every time you roll a 6, you lose b points. You do not win or
|
|
lose any points if you roll a 2, 4, or 5. What is the expected number of points (as a function of a and
|
|
b) you will have when you stop?
|
|
\end{itemize}
|
|
|
|
\end{document} |