# Visualizing cycles in row-major transposition encodings

2021-01-23, post № 239

mathematics, programming, c++, shell, #matrix, #encoding, #permutation, #rainbow

A matrix $A\in \mathcal{D}^{h\times w}$ of discretely representable entries $\mathcal{D}$ may be linearly layed out in memory using row-major order, concatenating successive rows into a contiguous $(h\cdot w \cdot\texttt{sizeof}\,\mathcal{D})$-bytes long array. Such a representation, however, is disruptive to the matrix’ two-dimensional nature: whilst horizontally neighboring elements remain neighbors, vertically neighboring entries are torn apart by insertion of $w$ non-neighboring elements. As such, on matrices naturally defined operations get distorted by this encoding.
One such inherently two-dimensional operation is matrix transposition. In the realm of matrices, $\mathcal{D}^{h\times w}\neq\mathcal{D}^{w\times h}$ are for nonsquare dimensions semantically different, being mapped to one another by transposition. Projecting onto their encoding, this semantic is lost and one is left with a permutation on memory $\bullet^\top\in\mathrm{Sym}(\{1,\dots,hw\})$.
To visualize this permutation, its cycle decomposition is computed of which each cycle is given a color of the rainbow dyeing this cycle’s corresponding two-dimensional pixels when interpreting its path on the underlying array in the semantics of the original matrix.

## Initial transposition cycles

Above listed are all visualizations for $1\leq h\leq 8,1\leq w\leq 16$, shuffled. Whilst some behave extremely regularly — for example square matrices’ transposition permutations decompose into transpositions —, others are wildly intricate. Each of them adheres to a rotational symmetry; the top left and bottom right are fixed points.

# Factoids #2

2020-12-26, post № 238

mathematics, #bijection, #calculus, #Lipschitz, #naturals

## VII) Cardinality coercion: $\mathbb{R}\hookleftarrow\{\mathbb{N}\to\mathbb{N}\}\twoheadrightarrow\mathbb{R}$

Claim. There exist both $\iota:\{\mathbb{N}\to\mathbb{N}\}\hookrightarrow\mathbb{R}$ together with $\pi:\{\mathbb{N}\to\mathbb{N}\}\twoheadrightarrow\mathbb{R}$.
Proof. Iota. Define $\iota:\{\mathbb{N}\to\mathbb{N}\}\hookrightarrow\mathbb{R}$ via
and observe any sequence’s reconstructibility by dyadic expansion.
Pi. Define $\pi:\{\mathbb{N}\to\mathbb{N}\}\twoheadrightarrow\mathbb{R}$ via
and observe any real’s constructibility by dyadic expansion.

Thus, $\{\mathbb{N}\to\mathbb{N}\}\cong\mathbb{R}$ in $\mathbf{(SET)}$ is shown.

# A Month of Pining

2020-11-28, post № 237

hardware review, #opinion, #diary, #freedom

Precisely one month ago, I opened a long awaited parcel shipped directly from Hong Kong: my very own Pinebook Pro had arrived. Eager to further my grasp on both software and hardware freedom, I unwrapped my mail and began to incorporate pine64’s flagship laptop into my workflow. Accompanying this journey, I wrote a diary which I share in this post.

Whilst a Pinebook may not boast with specs of performance, novel input methods or included licenses, it is part of a niche computing sector which values and upholds principal human rights even in the alien realm of microprocessor-based technology. Following my steadily growing discomfort regarding my computing equipment over the past months, I hoped for the Pinebook Pro to introduce me to a world of productive, in part minimalist and most importantly truly free computing experience. After a month of usage, I can confidently proclaim it to have delivered on this front more satisfactory than any other of my multitude of computing devices I have amassed over the years.

Especially in current times, it is calming to interact with an intricately mingled system of physical machinery and abstract commandments in which I can at least to a certain extent trust, lifting an ever-present veil of fear cloaking most boxes of bits. A Pinebook comes with software switches to turn off the built-in camera, microphone and WiFi card as well as Manjaro KDE Plasma running out of the box. Whilst I would prefer not having a camera or microphone built into my device at all and have a real physical switch to turn both off, as well as a more minimalist desktop environment, I am capable to entrust it my presence infront of it; in contrast to e. g. a proprietary phone lying on a tabletop nearby.

I am unaffiliated with pine64 [1] and purchased my Pinebook Pro myself. I wrote the entirety of this blog post including the diary seen below using my Pinebook [2].

A detailed account of my experience with my Pinebook is given by a diary I wrote over the course of November 2020:

Jonathan Frech's blog; built 2021/04/16 20:21:20 CEST