Skip to content

Commit

Permalink
asciidoc -> qmd
Browse files Browse the repository at this point in the history
  • Loading branch information
nessan committed Jul 25, 2024
1 parent deda8b6 commit 0c83e04
Showing 1 changed file with 21 additions and 30 deletions.
51 changes: 21 additions & 30 deletions docs/content/notes/danilevsky.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ a_{kj} &=
\end{cases}
\end{aligned}
$$
That last step puts row $k$ of $A$ into companion matrix form--the later rows of $A$ are already there.
That last step puts row $k$ of $A$ into companion matrix form --- the later rows of $A$ are already there.

.. If $k > 1$, then $k \leftarrow k-1$, and we go back to step 1. Otherwise, we are finished.

Expand Down Expand Up @@ -421,7 +421,7 @@ And of course as usual, the additive inverse of 0 is 0.
This means that in $\mathbb{F_2}$ negation is a no-op and any term like $-b$ can just be replaced with $b$.

We always have $1 * 1 = 1$ so the multiplicative inverse of $1$ is just $1$.
Also just like $\mathbb{R}$, the element $0$ has no multiplicative inverse in $\mathbb{F_2}$ either--you still cannot divide by zero.
Also just like $\mathbb{R}$, the element $0$ has no multiplicative inverse in $\mathbb{F_2}$ either --- you still cannot divide by zero.
This means that if $a, b \in \mathbb{F_2}$ then a term like $a/b$ makes no sense if $b=0$ but otherwise $a/b = a$.

Let's reconsider that very first step we took above to move our matrix $A$ closer to Frobenius form.
Expand Down Expand Up @@ -452,20 +452,19 @@ As before, it proceeds in a sequence of steps that move $A$ closer to companion/

### The Algorithm

. Initialize a counter $k$ to $n$ and $A$ to the input matrix.
1. Initialize a counter $k$ to $n$ and $A$ to the input matrix.

. If $a_{kk-1} = 0$ look for an earlier element in the same row that is 1.
That is, look for $j < k-1$ where $a_{kj} = 1$. +
If we are successful then swap both the _rows and columns_ $j$ and $k-1$ of $A$. +
Row and column swaps like that are permutation transformations and those preserve the eigen-structure.
2. If $a_{kk-1} = 0$ look for an earlier element in the same row that is 1. That is, look for an index $j < k-1$ such that $a_{kj} = 1$. If found then swap *both* the rows and the columns $j$ and $k-1$ of $A$. These swaps are permutation transformations that preserve the eigen-structure.

. If by now $a_{kk-1} = 1$:
3. If after step 2 we have $a_{kk-1} = 1$:

.. Capture the elements from row $k$ of the matrix $A$ by setting $m_ = \text{row}_k(A)$. +
Note that by assumption $m_{k-1} = a_{kk-1} = 1$.
+ Capture the elements from row $k$ of the matrix $A$ by setting
$$
m = \text{row}_k(A).
$$
Note that by assumption $m_{k-1} = a_{kk-1} = 1$.

.. Compute the elements of $B$ for rows $i = 1, ..., k-1$ as follows:
+
+ Compute the elements of $B$ for rows $i = 1, ..., k-1$ as follows
$$
b_{ij} =
\begin{cases}
Expand All @@ -474,8 +473,7 @@ b_{ij} =
\end{cases}
$$

.. Update $A$ for all columns $j = 1, \ldots, n$ as follows:
+
+ Update $A$ for all columns $j = 1, \ldots, n$ as follows
$$
\begin{aligned}
a_{ij} &= b_{ij} \text{ for } i = 1, \ldots, k-2, \\
Expand All @@ -487,36 +485,29 @@ a_{kj} &=
\end{cases}
\end{aligned}
$$
+
That last step puts row $k$ of $A$ into Frobenius form--the later rows of $A$ are already there.
That last step puts row $k$ of $A$ into Frobenius form --- later rows are already there.

.. If $k > 1$ then $k \leftarrow k-1$ and we go back to step 1, otherwise we are done.
+ If $k > 1$ then $k \gets k-1$ and we go back to step 1, otherwise, we are done.

. If $a_{kk-1} = 0$ even after trying the search in step 2 then we cannot perform step 3. +
Just like before, in this case the current $A$ matrix must have the following form:
+
4. If after step 2 we have $a_{kk-1} = 0$ then we cannot perform step 3. \
In this case, the current $A$ matrix must have the following form:
$$
A =
\begin{bmatrix}
A_1 & A_2 \\
0 & A_3
\end{bmatrix}
$$
hence the characteristic polynomial $c_A(x)$ we are after is the product of two other characteristic polynomials:
+
hence the characteristic polynomial $c_A(x)$ is the product of two others: \
$$
c_A(x) = c_{A_1}(x) c_{A_3}(x)
c_A(x) = c_{A_1}(x) c_{A_3}(x).
$$
+
and as $A_3$ is already in Frobenius form we can easily read off the coefficients for $c_{A_3}(x)$:
+
As $A_3$ is already in Frobenius form we can easily read off the coefficients for $c_{A_3}(x)$: \
$$
c_{A_3}(x) = 1+ a_{kk} x + a_{kk+1} x^2 + \ldots + a_{kn} x^{n-k+1}.
$$
+
The algorithm will store those coefficients and recurse using $A_1$ as the smaller $(k-1) \times (k-1)$ input matrix.
+
It can then convolve the coefficients of $c_{A_1}(x)$ and $c_{A_3}(x)$ to return the coefficients for $c_{A}(x)$.
Store those coefficients and recurse using $A_1$ as the $(k-1) \times (k-1)$ input matrix.
Convolve the coefficients of $c_{A_1}(x)$ and $c_{A_3}(x)$ to get the coefficients for $c_{A}(x)$.

::: {.callout-note}
# Recursion is to be expected here
Expand Down

0 comments on commit 0c83e04

Please sign in to comment.