---
title: Problem set 8
heading: "Problem set 8: metric and normed spaces"
eyebrow: A14 · Problem set 8
type: problems
---

::: hook
These problems use lessons 32 to 37: metric spaces and their examples, completeness and contractions, existence and uniqueness for ODEs, and normed and inner-product spaces.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = 2 | -1; b = 1 | 4; c = -1 | 3; d = 5 | 0

## The points ({a}, {b}) and ({c}, {d}).

::: part
answer: abs(a - c) + abs(b - d)
tolerance: 0.01%

### Manhattan distance?

::: misses
- [any] $\lvert\Delta x\rvert + \lvert\Delta y\rvert$.
:::
:::

::: part
answer: sqrt((a - c)^2 + (b - d)^2)
tolerance: 0.01%

### Euclidean distance?

::: misses
- [any] $\sqrt{\Delta x^2 + \Delta y^2}$.
:::
:::
:::

::: check
kind: parts
given: x = 0.6 | 2; y = 0.8 | 1.5; p = 3 | 6

## The vector ({x}, {y}).

::: part
answer: (x^p + y^p)^(1/p)
tolerance: 0.01%

### Its p-norm for p = {p}?

::: misses
- [any] $(\lvert x\rvert^p + \lvert y\rvert^p)^{1/p}$.
:::
:::

::: part
answer: (x + y + abs(x - y))/2
tolerance: 0.01%

### Its max norm?

::: misses
- [any] The larger coordinate.
:::
:::
:::

::: check
kind: parts
given: a = 170 | 85; b = 165 | 103; d = 6 | 9

## Codes.

::: part
answer: abs((floor(a/1) - 2*floor(a/2)) - (floor(b/1) - 2*floor(b/2))) + abs((floor(a/2) - 2*floor(a/4)) - (floor(b/2) - 2*floor(b/4))) + abs((floor(a/4) - 2*floor(a/8)) - (floor(b/4) - 2*floor(b/8))) + abs((floor(a/8) - 2*floor(a/16)) - (floor(b/8) - 2*floor(b/16))) + abs((floor(a/16) - 2*floor(a/32)) - (floor(b/16) - 2*floor(b/32))) + abs((floor(a/32) - 2*floor(a/64)) - (floor(b/32) - 2*floor(b/64))) + abs((floor(a/64) - 2*floor(a/128)) - (floor(b/64) - 2*floor(b/128))) + abs((floor(a/128) - 2*floor(a/256)) - (floor(b/128) - 2*floor(b/256)))
tolerance: 0

### Hamming distance between {a:bin8} and {b:bin8}?

::: misses
- [any] Count the differing bits.
:::
:::

::: part
answer: floor((d - 1)/2)
tolerance: 0

### Errors correctable with minimum distance {d}?

::: misses
- [any] $\lfloor(d - 1)/2\rfloor$.
:::
:::
:::

::: check
kind: parts
given: a = 0.2 | 0.4 | 0.6 | 0.8 | 1 | 1.2 | 1.5

## sin x against x on [0, {a}].

::: part
answer: a - sin(a)
tolerance: 0.01%

### Sup distance?

::: misses
- [any] At the right end.
:::
:::

::: part
answer: a^2/2 - (1 - cos(a))
tolerance: 0.01%

### $L^1$ distance $\int_0^a(x - \sin x)\,dx$?

::: misses
- [any] $\frac{a^2}{2} - (1 - \cos a)$.
:::
:::
:::

::: check
kind: parts
given: q = 0.4 | 0.75; b = 3 | -2; s = 0.002 | 0.05

## A contraction $T(x) = \given{q}x + (\given{b})$.

::: part
answer: b/(1 - q)
tolerance: 0.01%

### Fixed point?

::: misses
- [any] $\frac{b}{1 - q}$.
:::
:::

::: part
answer: q/(1 - q)*s
tolerance: 0.5%

### A posteriori bound after a step of {s}?

::: misses
- [any] $\frac{q}{1 - q}s$.
:::
:::
:::

::: check
kind: parts
given: q = 0.55 | 0.9; d = 0.4 | 3; e = 0.000003 | 0.00000007

## Iteration counts.

::: part
answer: ceil(ln(e*(1 - q)/d)/ln(q))
tolerance: 0

### Iterations for error below {e}, q = {q}, first step {d}?

::: misses
- [any] Smallest n with $\frac{q^nd}{1 - q} < \varepsilon$.
:::
:::

::: part
answer: q^10/(1 - q)*d
tolerance: 0.5%

### The a priori bound after 10 steps?

::: misses
- [any] $\frac{q^{10}d}{1 - q}$.
:::
:::
:::

::: check
kind: parts
given: a = 3 | 0.6; y0 = 0.5 | 4

## Lipschitz constants and blow-up.

::: part
answer: 1/a
tolerance: 0.1%

### Contraction interval for $\dot y = \given{a}\sin y + t$?

::: misses
- [any] $h < 1/L$.
:::
:::

::: part
answer: 1/y0
tolerance: 0.1%

### Blow-up time of $\dot y = y^2$, y(0) = {y0}?

::: misses
- [any] $1/y_0$.
:::
:::
:::

::: check
kind: parts
given: t = 0.5 | 1.5; h = 0.75 | 2; n = 3 | 5

## Picard for $\dot y = y$, y(0) = 1.

::: part
answer: 1 + t + t^2/2 + t^3/6
tolerance: 0.01%

### $y_3$ at t = {t}?

::: misses
- [any] Taylor polynomial of degree 3.
:::
:::

::: part
answer: exp(h)*h^(n + 1)/(n + 1)!
tolerance: 0.1%

### Error bound of $y_{\given{n}}$ at t = {h}?

::: misses
- [any] $\frac{e^hh^{n+1}}{(n + 1)!}$.
:::
:::
:::

::: check
kind: parts
given: t = 1.5 | 2 | 3 | 4 | 5 | 6

## Non-uniqueness.

::: part
answer: t^2/4
tolerance: 0.01%

### The nonzero solution of $\dot y = \sqrt y$, y(0) = 0, at t = {t}?

::: misses
- [any] $t^2/4$.
:::
:::

::: part
answer: (t - 1)^2/4
tolerance: 0.01%

### Another solution waits at 0 until t = 1, then follows the same shape. What's it at t = {t}?

::: misses
- [any] $\frac{(t - 1)^2}{4}$ for t ≥ 1.
:::
:::
:::

::: check
kind: parts
given: k = 2 | 6; c = 3 | 0.5

## Projections onto $\sin(kx)$ on [−π, π].

::: part
answer: 2*c*(-1)^(k + 1)/k
tolerance: 0.1%

### Best coefficient of $\sin(\given{k}x)$ for $f = \given{c}x$?

::: misses
- [any] $\frac{2c(-1)^{k+1}}{k}$.
:::
:::

::: part
answer: pi
tolerance: 0.1%

### $\lVert\sin(\given{k}x)\rVert^2$ on [−π, π]?

::: misses
- [any] $\int\sin^2 = \pi$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 3; b = 2 | 0; c = 2 | 1; d = 1 | 4

## Angles.

::: part
answer: a*c + b*d
tolerance: 0.1%

### $\langle(\given{a}, \given{b}), (\given{c}, \given{d})\rangle$?

::: misses
- [any] Sum of products.
:::
:::

::: part
answer: (a*c + b*d)/(sqrt(a^2 + b^2)*sqrt(c^2 + d^2))
tolerance: 0.1%

### $\cos\theta$ between them?

::: misses
- [any] Divide by the lengths.
:::
:::
:::

::: check
kind: parts
given: A = 2 | 5; T = 0.004 | 0.5

## Signal energy and orthogonal tones.

::: part
answer: A^2*T/2
unit: J
tolerance: 0.1%

### Energy of $\given{A}\sin(2\pi t/T)$ over one period, T = {T} s?

::: misses
- [any] $\frac{A^2T}{2}$.
:::
:::

::: part
answer: 1/(2*T)
unit: Hz
tolerance: 0.1%

### Smallest orthogonal tone spacing for duration {T} s?

::: misses
- [any] $\frac{1}{2T}$.
:::
:::
:::

::: check
kind: parts
given: a = -0.9 | -0.8 | -0.6 | -0.5 | -0.3 | -0.2

## $h[n] = (\given{a})^n$, n ≥ 0.

::: part
answer: 1/(1 - abs(a))
tolerance: 0.5%

### What is $\lVert h\rVert_1$?

::: misses
- [1/(1 - a)] Take absolute values.
- [any] $\sum\lvert a\rvert^n$.
:::
:::
:::

::: check
kind: parts
given: q = 0.1 | 0.2 | 0.4 | 0.5 | 0.6 | 0.8

## $\lVert A\rVert$ = {q}.

::: part
answer: 1/(1 - q)
tolerance: 0.5%

### What bound holds on $\lVert(I - A)^{-1}\rVert$?

::: misses
- [any] The Neumann series.
:::
:::
:::

::: check
kind: parts
given: m = 1..9 int

## Project $x^{\given{m}}$ onto the constants in $L^2[0, 1]$.

::: part
answer: 1/(m + 1)
tolerance: 0.5%

### What is the best constant?

::: misses
- [any] The average value.
:::
:::
:::
:::
