User:Nippashish

= Dots =

\begin{align} x &= \begin{bmatrix} 1 \\ 0 \end{bmatrix} \\ v &= \begin{bmatrix} v_1, v_2 \end{bmatrix} \\

R &= \begin{bmatrix} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \\ Rx &= \begin{bmatrix}\cos(\theta) \\ \sin(\theta) \end{bmatrix}

\end{align} $$

...



\begin{align} dot(Rx,v) - |v| &= 0 \\ v_1\cos(\theta) + v_2\sin(\theta) - \sqrt{v_1^2+v_2^2} &= 0 \\ v_1\cos(\theta) + v_2\sin(\theta) &= \sqrt{v_1^2+v_2^2} \\ (v_1\cos(\theta) + v_2\sin(\theta))^2 = v_1^2+v_2^2 \\ v_1^2\cos^2(\theta) + v_2^2\sin^2(\theta) + v_1v_2\cos(\theta)\sin(\theta) &= v_1^2+v_2^2 \\ v_1^2\cos^2(\theta) + v_2^2\sin^2(\theta) + v_1v_2\cos(\theta)\sin(\theta) - v_1^2 - v_2^2 &= 0 \end{align} $$

...



\begin{align} F(v_1, v_2, \theta) &= v_1^2\cos^2(\theta) + v_2^2\sin^2(\theta) + v_1v_2\cos(\theta)\sin(\theta) - v_1^2 - v_2^2 \\

DF(v_1, v_2, \theta) &= \begin{bmatrix} 2v_1\cos^2(\theta) + v_2\cos(\theta)\sin(\theta) - 2v_1 \\ 2v_2\sin^2(\theta) + v_1\cos(\theta)\sin(\theta) - 2v_2 \\ (2v_2^2-2v_1^2)\cos(\theta)\sin(\theta) + v_1v_2(\cos^2(\theta)-\sin^2(\theta)) \\ \end{bmatrix}^T \end{align} $$

Not solvable when:

\begin{align} (2v_2^2-2v_1^2)\cos(\theta)\sin(\theta) + v_1v_2(\cos^2(\theta)-\sin^2(\theta)) = 0 \end{align} $$

= Monotonically Increasing =

Given a sequence of n numbers:

$$ S = \{ s_1, s_2, \ldots, s_n \} $$

Want to find the longest monotonically increasing subsequence.

Define the function $$\textstyle L(n)$$ as the length of the longest monotonically increasing subsequence in the first n elements.

$$ L(n) = \begin{cases} 1 &\quad\mbox{if }n=1 \\ \max_{i=1}^{n-1}(L(n-i)) + 1 &\quad\mbox{where } s_n \ge s_i \end{cases} $$

Test Work
Try this out...

$$S = \{ 1, 4, 2, 7, 8, 4, 5 \}$$

o---o---o---o---o---o---o---o o---o---o---o---o---o---o---o o---o---o---o---o---o---o---o
 * 1 | 4 | 2 | 7 | 8 | 4 | 5 |
 * 1 | 2 | 2 | 3 | 4 | 4 | 4 |

And this...

$$S = \{ 1, 3, 3, 7, 2, 6, 4, 5, 6, 1, 8, 3, 2, 6 \}$$

o---o---o---o---o---o---o---o---o---o---o---o---o---o---o o---o---o---o---o---o---o---o---o---o---o---o---o---o---o o---o---o---o---o---o---o---o---o---o---o---o---o---o---o o---o---o---o---o---o---o---o---o---o---o---o---o---o---o
 * 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10| 11| 12| 13| 14|
 * 1 | 3 | 3 | 7 | 2 | 6 | 4 | 5 | 6 | 1 | 8 | 3 | 2 | 6 |
 * 1 |1 2|2 3|3 4|1 2|3 4|3 4|7 5|8 6|1 2|9 7|3 4|5 3|9 7|