$Y_{i}$ is the total of $i^{th}$ currency held, when all currencies are exchanged for $i$. The $i^{th}$ element in $Y$ represents the amount of money you hold in the $i^{th}$ currency, given you exchange all other currencies for the $i^{th}$ currency. This is shown through $Y = Rx$, where $Y_{i}$ is the exchange rate of currencey $j$ for currency $i$ multiplied by the amount of currency $i$ held, summed across $i$ currencies.
$A$ starts as an identity matrix, where the elements in each row to the left of the $1$ are $(1+r)^{x}$, $x$ being equal to how many elements moved left from $1$.
Example:
$A = $
$\left(\begin{array}{cc}
1 & 0 & 0 & 0\\
(1+r) & 1 & 0 & 0\\
(1+r)^{2} & (1+r) & 1 & 0\\
(1+r)^{3} & (1+r)^{2} & (1+r) & 1
\end{array}\right)
$
This is shown through satisfying the $b = (1+r) \cdot b_{t-1}+c_{t}$ condition, where when multiplying the matrix $A$ by the vector $c_{1}$ for each element in $b$ we sum $c_{t} \cdot 1$ and $(1+r) \cdot b_{t-1}$. Lastly, $b_{t-1}(1+r)$ can be found through writing $b_{t-1}$ in terms of $c_{1}$ and multiplying $(1+r)$ through each $c$ term.
a)
$c \cdot \overrightarrow{1}$
This is because $c$ is a vector for dollars spent on each advertising channel, so $c \cdot \overrightarrow{1}$ is the total dollars spent.
b)
$v = Rc$
This is because each element in R represents impressions per dollar for each segment for each channel when multiplied by $c$ you get: $\cfrac{impressions}{$} \cdot ({$})$ = impressions for each segment.
c)
$a \cdot c$
This is because $a$ is a vector for profit per impressions, and $c$ is a vector of impressions, so $\cfrac{profit}{impressions} \cdot (impressions)$ = profit.
d)
For the $i_{th}$ row corresponding to market segment 3 in $R$, I would find the $i,j$ that is greatest, and find the channel associated with this $j$ value.
e)
The impressions per dollar spent for channel 5 for the 3rd market segment is very low; the 5th marketing channel is relatively ineffective at producing impressions for the 3rd market segment.
a)
$Y = Rx$
This is because for the $i_{th}$ resource we sum the resource per job times units of job, for all the jobs, resulting in the amount of each resource that's needed.
b)
$c = R^{T}p$
This is becuase for job $j$ we sum the resource per job times price per resource, which gives us the cost per unit of job type.
The height of the river is most dependent on the rainfall from 2 and 3 days prior, because the function/vector $g$ has highest values in the 2nd and 3rd indices (indexing from 1). It would take 5 days for a heavy rainfall day's effect on the river height to dissapate because $g$ has a length of 4.
a)
Given:
$h*c \approx e_{i}$
$y = c*u$
$h*(c*u) = (h*c)*u$
We find:
$h*(y) = (e_{i})*u$
$z = (e_{i})*u$
Assuming the equalizer is proficient ($h*c$ is approximately equal to $e_i$), z should be approximately equal to u for each time step.
b)
import numpy as np
import matplotlib.pyplot as plt
import random as rnd
#Generate random -1, 1 array
def random_values(output_values, output_length):
random_signal = np.random.choice(output_values, output_length, replace = True)
return random_signal
#Declare inputs
output_values = [-1,1]
output_length = 50
#Produce signal
random_signal = random_values(output_values, output_length)
#Channel impulse response
c = np.array([1, .7, -.3])
#Equalizer
h = np.array([.9, -.5, .5, -.4, .3, -.3, .2, -.1])
#Receiver signal
y = np.convolve(c, random_signal)
#Equalized Receiver signal
z = np.convolve(h, y)
#Plot signal, receiver signal, equalized signal
plt.figure()
#Signal
plt.plot(random_signal, label = 'Signal')
#Receiver signal
plt.plot(y, label = "Receiver Signal")
#Equalized signal
plt.plot(z, label = "Equalized Signal")
plt.ylabel("Signal Magnitude")
plt.xlabel("Time")
plt.legend()
plt.show()
Given:
$x =$ $ \left(\begin{array}{cc} 1\\ 2\\ 3\\ 4\\ 5\\ 6\\ 7\\ 8\\ 9 \end{array}\right) =$ $ \left(\begin{array}{cc} 1 & 4 & 7\\ 2 & 5 & 8\\ 3 & 6 & 9\\ \end{array}\right)$
a)
$y = $
$
\left(\begin{array}{cc}
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0
\end{array}\right)x
$
Achieves the matrix:
$ \left(\begin{array}{cc} 3 & 6 & 9\\ 2 & 5 & 8\\ 1 & 4 & 7\\ \end{array}\right)$
b)
$y = $
$
\left(\begin{array}{cc}
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0
\end{array}\right) x$
Achieves the matrix:
$ \left(\begin{array}{cc} 3 & 2 & 1\\ 6 & 5 & 4\\ 9 & 8 & 7\\ \end{array}\right)$
c)
$y = $
$
\left(\begin{array}{cc}
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
\end{array}\right) x$
Achieves the matrix:
$ \left(\begin{array}{cc} 0 & 2 & 5\\ 0 & 3 & 6\\ 0 & 0 & 0\\ \end{array}\right)$
d)
$y = $
$
\left(\begin{array}{cc}
0 & \cfrac{1}{2} & 0 & \cfrac{1}{2} & 0 & 0 & 0 & 0 & 0\\
\cfrac{1}{3} & 0 & \cfrac{1}{3} & 0 & \cfrac{1}{3} & 0 & 0 & 0 & 0\\
0 & \cfrac{1}{2} & 0 & 0 & 0 & \cfrac{1}{2} & 0 & 0 & 0\\
\cfrac{1}{3} & 0 & 0 & 0 & \cfrac{1}{3} & 0 & \cfrac{1}{3} & 0 & 0\\
0 & \cfrac{1}{4} & 0 & \cfrac{1}{4} & 0 & \cfrac{1}{4} & 0 & \cfrac{1}{4} & 0\\
0 & 0 & \cfrac{1}{3} & 0 & \cfrac{1}{3} & 0 & 0 & 0 & \cfrac{1}{3}\\
0 & 0 & 0 & \cfrac{1}{2} & 0 & 0 & 0 & \cfrac{1}{2} & 0\\
0 & 0 & 0 & 0 & \cfrac{1}{3} & 0 & \cfrac{1}{3} & 0 & \cfrac{1}{3}\\
0 & 0 & 0 & 0 & 0 & \cfrac{1}{2} & 0 & \cfrac{1}{2} & 0
\end{array}\right) x$
Achieves each value to be the average of its neighbors. The fraction used is chosen based on how many qualified neighbors the value has (2, 3, or 4).
$A\theta = b$
$ \left(\begin{array}{cc} 1 & x_{1} & y_{1} & x_{1}y_{1}\\ 1 & x_{1} & y_{2} & x_{1}y_{2}\\ 1 & x_{2} & y_{1} & x_{2}y_{1}\\ 1 & x_{2} & y_{2} & x_{2}y_{2} \end{array}\right) $ $ \left(\begin{array}{cc} \theta_{1}\\ \theta_{2}\\ \theta_{3}\\ \theta_{4} \end{array}\right)= $ $ \left(\begin{array}{cc} F_{11}\\ F_{12}\\ F_{21}\\ F_{22} \end{array}\right) $
This A matrix satisfies the necessary conditions because:
$ \left(\begin{array}{cc} \theta_{1} + \theta_{2}x_{1} + \theta_{3}y_{1} + \theta_{4}x_{1}y_{1}\\ \theta_{1} + \theta_{2}x_{1} + \theta_{3}y_{2} + \theta_{4}x_{1}y_{2}\\ \theta_{1} + \theta_{2}x_{2} + \theta_{3}y_{1} + \theta_{4}x_{2}y_{1}\\ \theta_{1} + \theta_{2}x_{2} + \theta_{3}y_{2} + \theta_{4}x_{2}y_{2} \end{array}\right)= $ $ \left(\begin{array}{cc} F_{11}\\ F_{12}\\ F_{21}\\ F_{22} \end{array}\right) $