test post transfer

$\text{V}_5^6$ and $\text{V}_2^4$

both $\text{V}_5^6$ and $\text{V}_2^4$ have tendency note in the bass

  • dominants
  • $\text{V}_5^6-\text{I}$: good
  • $\text{V}_5^6-\text{I}^6$: bad (bass leading tone should not leap)
  • $\text{V}_2^4-\text{I}$: bad (bass chordal 7th must step down)
  • $\text{V}_2^4-\text{I}^6$: good
  • $\text{I},\text{I}^6,\text{V},\text{V}^6,\text{V}^7$ could be followed by $\text{V}_5^6$

$^6,^7$, $\hat{6}$

$\widehat{6}$

$\text{^6}$

$_{\text{#3}}^{\phantom{\text{#}}5}$: 5 and $\text{#}3$ above bass. Abbreviation: $^{\text{#}}$

Test

alt attribute is required. if the image could not be loaded, the alt text will be displayed.

sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts
prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!
X:1 T:The Legacy Jig M:6/8 L:1/8 R:jig K:G GFG BAB | gfg gab | GFG BAB | d2A AFD | GFG BAB | gfg gab | age edB |1 dBA AFD :|2 dBA ABd |: efe edB | dBA ABd | efe edB | gdB ABd | efe edB | d2d def | gfe edB |1 dBA ABd :|2 dBA AFD |]
X:4347 T:Für Elise T:Bagatelle No.25 in A, WoO.59 C:Ludwig van Beethoven V:1 Program 1 0 %Piano V:2 Program 1 0 bass %Piano M:3/8 L:1/16 Q:3/8=40 K:Am V:1 e^d|e^deB=dc|A2 z CEA|B2 z E^GB|c2 z Ee^d| V:2 z2|z6|A,,E,A, z z2|E,,E,^G, z z2|A,,E,A, z z2|

test image-grid

test

test

test

test

test embedded video

bilibili, multi-p, starting from

test mathjax

$$\prod_{i=a}^{b} f(i)$$

$\lim_{x\to\infty} f(x)$

$\exists A$

$A \Rightarrow B$

$N(1,p)=\binom{p}{0} + \binom{p}{1}$

$N(2,p)=\binom{p}{0} + \binom{p}{1} + \binom{p}{2}$

$\ldots$

$N(n,p)=\binom{p}{0} + \binom{p}{1} + \ldots + \binom{p}{n}$

$$ N(1,p)=\binom{p}{0} + \binom{p}{1} \\ N(2,p)=\binom{p}{0} + \binom{p}{1} + \binom{p}{2} \\ \ldots \\ N(n,p)=\binom{p}{0} + \binom{p}{1} + \ldots + \binom{p}{n} \\ $$

Consider the Procrustes problem \begin{eqnarray} \min\limits_{X} ||AX-B||_F \text{ subject to } X^TX= I_n, \\ \text{where } A = \begin{pmatrix} 1 & 0 & 0 \\ -1& 1 & 0 \\ 0& 1 & -1 \\ 0 & 0 & 1\end{pmatrix}, \quad B = \begin{pmatrix} 1 & 0 & 0 \\ 1& 1 & 0 \\ 1& 0 & 0 \\ 1 & 0 & 1\end{pmatrix} \nonumber \end{eqnarray}

$I_n \in \mathbb{R}^{n\times n}$ is the identity matrix. (Hint: learn more about Frobenius norm of a matrix.)

Since for any $m \times n$ matrix $S$, $||S||_F= \sqrt{ tr(S^TS) }$, with $X^TX=I_n$, we have: \begin{align*} ||AX-B||_F & = \sqrt{ tr((AX-B)^T(AX-B)) } \\ & = \sqrt{ tr((X^TA^T-B^T)(AX-B)) }\\ & = \sqrt{ tr(X^TA^TAX)-tr(B^TAX)-tr(X^TA^TB) +tr(B^TB) }\\ & = \sqrt{ tr(XX^TA^TA)-2tr(B^TAX) +tr(B^TB) }\\ & = \sqrt{ tr(A^TA)+tr(B^TB)-2tr(B^TAX) }\\ \end{align*} (For the above derivation, we use the property of trace: a matrix and its transpose have the same trace; the cyclic property of trace)

Since $tr(A^TA)+tr(B^TB)$ is fixed given $A$ and $B$, minimizing $||AX-B||_F$ is equivalent to maximizing $tr(B^TAX)$.

Thus the problem can be reduced to : $\max\limits_{X} tr(B^TAX) \text{ subject to } X^TX= I_n$

Suppose $B^TA= U\Sigma V^T$ (singular value decomposition), then we have:

$tr(B^TAX) = tr(U\Sigma V^T X) = tr(\Sigma V^T X U)$

Let $Z=V^T X U$, then $Z$ is orthogonal because $V^T,X,U$ are all orthogonal. Then we will be maximizing: $tr(\Sigma Z) = \sum_i \Sigma_{ii}Z_{ii}$. Because $\Sigma$ is a diagonal matrix with non-negative values on its diagonal, and $Z$ is orthogonal, $tr(\Sigma Z)$ is maximized when $Z=I$. Therefore $V^T X U = I \Rightarrow X= VU^T$.

\begin{eqnarray} f(x) =\begin{cases} (1/2) ||x||_2^2, \quad ||x||_2 \le 1\\ ||x||_2 - 1/2, \quad ||x||_2 > 1\end{cases} \nonumber \end{eqnarray}

\begin{equation*} \begin{aligned} & {\text{minimize}} && (1/2)x^TP_0x+c^Tx+d \\ &\text{subject to} && (1/2)x^TP_ix+G_i^Tx-h_i \leq 0 \\ & && Ax=b \\ & && P_i = 0, i=0, 1,2,\ldots, m \end{aligned} \end{equation*}

Because $||Ax+b||_2 \leq (c^Tx+d) \iff \begin{bmatrix} (c^Tx+d)I & Ax+b \\ (Ax+b)^T & c^Tx+d \end{bmatrix} \succeq 0$

def test():
    pass
ifconfig
uname -a
drawing drawing
test img

test img