Friday, January 20, 2023

Cannabis vs Cognition

Searching through papers this morning curious about evidence-based studies on cannabis (and synthetic cannabis[1][2]) in relation to psychosis, schizophrenia, and general effects on cognition.

Saturday, December 24, 2022

FrodoPIR

This morning I'm currently staring down a stack of research papers on my desk. But I just saw a headline from Hacker News that Brave, a privacy-preserving browser I'm a fan of, published a paper and code for an improved private information retrieval system.

Saturday, November 19, 2022

James Garfield's Pythagorean Proof

Today I learned James Garfield, who once worked as a lawyer, Civil War General, and served as the 20th President of the United States, was math savvy and published a novel Pythagorean theorem proof.[1]

\[ \text{Area}_{\text{trapezoid } ACED} = \frac{1}{2} \cdot (AC + DE) \cdot CE = \frac{1}{2} \cdot (a + b) \cdot (a + b) = \frac{(a + b)^2}{2} \] \[ \begin{aligned} \text{Area}_{\text{trapezoid } ACED} &= \text{Area}_{\Delta ACB} + \text{Area}_{\Delta ABD} + \text{Area}_{\Delta BDE} \\ &= \frac{1}{2}(a \times b) + \frac{1}{2}(c \times c) + \frac{1}{2}(a \times b) \end{aligned} \] \[ (a + b) \times \frac{1}{2}(a + b) = \frac{1}{2}(a \times b) + \frac{1}{2}(c \times c) + \frac{1}{2}(a \times b) \] \[ a^{2} + b^{2} = c^{2} \]

Small Pieces

We can take this in smaller pieces. First, we can find the area of the right-angled trapezoid with the following equation:

\[ \text{Area}_{\text{trapezoid}} = \frac{1}{2} \cdot (a + b) \cdot (a + b) = \frac{(a + b)^2}{2} \]

We can find the area of each of the two outer triangles with the following:

\[ \text{Area}_{\text{triangle}} = \frac{ab}{2} \]

And the area of the inner triangle with:

\[ \text{Area}_{\text{inner triangle}} = \frac{c^2}{2} \]

Proof

Reducing, we can go to the end, beginning with our substituted and now simplified area equation demonstrated above:

\[ \frac{(a + b)^2}{2} = 2 \cdot \frac{ab}{2} + \frac{c^2}{2} \]

Then we expand \( (a + b)^2 \) on the left hand side. And our equation on the right can also be simplified since we're both multiplying and dividing \( ab \) by 2:

\[ \frac{a^2 + 2ab + b^2}{2} = ab + \frac{c^2}{2} \]

Multiply both sides by 2 to eliminate denominators:

\[ a^2 + 2ab + b^2 = 2ab + c^2 \]

Lastly, subtract \( 2ab \) from both sides:

\[ a^2 + b^2 = c^2 \]

Footnotes

  1. Mathematical Treasure: James A. Garfield’s Proof of the Pythagorean Theorem ↩︎

Wednesday, October 05, 2022

Casio F-91 Repair

Exposure to harsh weather wore my watch band down until eventually breaking. So, I re-strapped my F-91W with a sport-grade band (and spring bars) from a W-216H.

Saturday, September 03, 2022

Euler's Equation

Euler's number, e, the constant 2.71828, is the base of the natural logarithms. Given n approaching infinity, Euler's number is the limit of:

\begin{align*}\displaystyle{\displaylines{(1 + 1/n)n}}\end{align*}

It's used frequently abroad across the sciences. It can also be elegantly expressed as an infinite series, like so:

\begin{align*} {\displaystyle e=\sum \limits _{n=0}^{\infty }{\frac {1}{n!}}=1+{\frac {1}{1}}+{\frac {1}{1\cdot 2}}+{\frac {1}{1\cdot 2\cdot 3}}+\cdots .} \end{align*}

Separately, the imaginary unit i, \({\displaystyle {\sqrt {-i}}}\), represents the imaginary solution to the quadratic equation, x2 + 1 = 0. The value can also be used to extend real numbers to complex numbers.

And π is pi, the irrational number we all know and love, roughly approximate to 3.14159, representing the ratio of the circle's circumference to its diameter.

While it isn't absolutely understood, we can join the three numbers in a seemingly bizarre proof that just works.

\( {\displaystyle e^{i\pi }=-1} \)

Tuesday, August 30, 2022

Abelian Groups

Commutative groups, those groups in which operand order does not change an equation's result, form Abelian groups that commute: "7 × 3 = 3 × 7". When this condition is not satisfied, we say the expression is non-commutative.

Cyclic groups are a special case of commutative Abelian groups—sets that are monogenous—generated by a single element—and invertible with a single operation.

Consider a set that, if we iterated over every other element with a particular operation, we'd be able to derive all of the elements of the set.

For a finite cyclic group, let G be the group, n be the size of the set, and e be the identity element, such that gi = gj whenever ij (mod n); like so.

G = {e, g, g2, ... , gn−1}

The commutative property also holds over the additive group of ℤ, or the integers, which are isomorphic to any infinite cyclic group. Similarly, the additive group of ℤ/nℤ, integers modulo n, is isomorphic to the finite cyclic group of order n.

Since all cyclic groups commute, they are all abelian groups, and all finitely produced abelian groups are the direct products of cyclic groups.

For example, the powers of 10 form an infinite subset G = {…, 0.001, 0.01, 0.1, 1, 10, 100, 1000, …} over the rational numbers.

With 10 as a generator, set G is a multiplicative cyclic group. For any element a of the group, one can derive log10 a.

Our set contains 10 and 100. The product \(10^1 \cdot 10^2\) is equivalent to \(10^{1+2} = 1000\). Every cyclic group G is Abelian because if \({\displaystyle x}, {\displaystyle y}\) are in \({\displaystyle G}\), then:

\( {\displaystyle xy=a^{m}a^{n}=a^{m+n}=a^{n}a^{m}=yx}\)

This homomorphic property is relevant in cryptography. It's also useful for computing commitments. For example, we can perform operations to verify information, like so. Let m be a message and r be a random value:

\( {\displaystyle C(m_{1},r_{1})\cdot C(m_{2},r_{2})=C(m_{1}+m_{2},r_{1}+r_{2})}\)

That is to say, with this special property, one could compute and verify the sums of values without knowing the actual values being committed.

Saturday, August 13, 2022

WHOIS, TLS, and Recon

While doing reconnaissance against web applications, I wanted to speed up the process of finding new attack surfaces that some subdomain tools might miss.

Using Python To Access archive.today, July 2025

It seems like a lot of the previous software wrappers to interact with archive.today (and archive.is, archive.ph, etc) via the command-line ...