{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Homework 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is due on Thurs, 6/1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Consider the polynomial $p(x) = (x-2)^9 = x^9 - 18x^8 + 144x^7 - 672x^6 + 2016x^5 - 4032x^4 + 5376x^3 - 4608x^2 + 2304x - 512$\n",
"\n",
" a. Plot $p(x)$ for $x=1.920,\\,1.921,\\,1.922,\\ldots,2.080$ evaluating $p$ via its coefficients $1,\\,,-18,\\,144,\\ldots$\n",
"\n",
" b. Plot the same plot again, now evaluating $p$ via the expression $(x-2)^9$.\n",
"\n",
" c. Explain the difference.\n",
" \n",
" *(The numpy method linspace will be useful for this)*"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"2\\. How many different double-precision numbers are there? Express your answer using powers of 2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"3\\. Using the updated [Numbers Every Programmer Should Know](https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html), how much longer does a main memory reference take than an L1 cache look-up? How much longer does a disk seek take than a main memory reference?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"4\\. From the Halide Video, what are 4 ways to traverse a 2d array?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"5\\. Using the animations below ([source](https://www.youtube.com/watch?v=3uiEyEKji0M)), explain what the benefits and pitfalls of each approach. Green squares indicate that a value is being read; red indicates a value is being written. Your answers should be longer in length (give more detail) than just two words.\n",
"\n",
" a. \n",
" \n",
" b. \n",
" \n",
" c. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"6\\. Prove that if $A = Q B Q^T$ for some orthnogonal matrix $Q$, the $A$ and $B$ have the same singular values."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"7\\. What is the *stochastic* part of *stochastic gradient descent*?"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda root]",
"language": "python",
"name": "conda-root-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}