Uncategorized

Remove algorithmic filters from what you read

I typically announce new blog posts from my most relevant twitter account: data science from @DataSciFact, algebra and miscellaneous math from @AlgebraFact, TeX and typography from @TeXtip, etc.

If you’d like to be sure that you’re notified of each post, regardless of what algorithms Twitter applies to your feed, you can subscribe to this blog via email or RSS.

RSS and email logos

If you subscribe via email you’ll see each post in your RSS stream as it is published. If you subscribe by email you’ll get one email each day around 11:00 AM Central Time.

You can also get an email once a month with highlights from the blog.

If you’d like to follow one or more of my Twitter accounts without going through Twitter, you can subscribe via RSS using BazQuz.

***

I highly recommend RSS in general. It’s a simple way to keep up with what you choose to keep up with, unfiltered by any corporate algorithms. To get started with RSS, you need an RSS client. There are many to choose from. I use Inoreader.

Your RSS client will probably be able to find the RSS feed of a site from its URL. If not, you can usually find the RSS feed of a site by appending /rss or /feed to its URL. Or look for the orange icon above.

Van Aubel’s theorem

Van Aubel’s theorem is analogous to Napoleon’s theorem, though not a direct generalization of it.

Napoleon’s theorem says to start with any triangle and draw equilateral triangles on each side. Connect the centers of the three new triangles, and you get an equilateral triangle.

Illustration of Napoleon's theorem

Now suppose you start with a quadrilateral and draw squares on each side. Connect the centers of the squares. Do you get a square? No, but you do get something interesting.

Van Aubel’s theorem says that if you connect the centers of squares on opposite faces of the quadrilateral (dashed lines below), the two line segments are the same length and perpendicular to each other.

The solid gray lines show that if you connect the centers of the square you do not get a square.

Further development

Van Aubel’s theorem dates to 1878 [1], and there have been numerous extensions ever since. Recently [2] Pellegrinetti found that six points related to Van Aubel’s theorem all lie on a circle. The six points are the midpoints of the two Van Aubel line segments (the dashed line segments above), the intersection of these two line segments, the midpoints of the two diagonals of the quadrilateral, and one more point.

The final point in Pellegrinetti’s theorem comes from flipping each of the squares over, connecting the centers, and noting where the connecting lines intersect. This is analogous to the messy case of Napoleon’s theorem: When you draw the squares on the inside of the quadrilateral rather than on the outside, the picture is hard to take in.

[1] Van Aubel, H., Note concernant les centres des carrés construits sur les cotés dun polygon quelconque, Nouv. Corresp. Math., 4 (1878), 40-44.

[2] Dario Pellegrinetti. The Six-Point Circle for the Quadrangle. International Journal of Geometry. 4 (2019) No 2, pp. 5–13.

Probability problem with Pratt prime proofs

In the process of creating a Pratt certificate to prove that a number n is prime, you have to find a number a that seems kinda arbitrary. As we discussed here, a number n is prime if there exists a number a such that

an-1 = 1 mod n

and

a(n-1)/p ≠ 1 mod n

for all primes p that divide n – 1. How do you find a? You try something and see if it works. If it doesn’t, you try again.

How many values of a might you have to try? Could this take a long time?

You need to pick 2 ≤ an – 2, and there are φ(n-1) values of a that will work. Here φ is Euler’s totient function. So the probability of picking a value of a that will work is

p = φ(n-1) / (n – 3).

The number of attempts before success has a geometric distribution with parameter p, and an expected value of 1/p.

So about how big is p? There’s a theorem that says that φ(n)/n is asymptotically bounded below by

exp(-γ) / log log n

where γ = 0.577… is the Euler-Mascheroni constant. So for a 50-digit number, for example, we would expect p to be somewhere around 0.12, which says we might have to try eight or nine values of a. This estimate may be a little pessimistic since we based it on a lower bound for φ.

Hidden messages in music

Geoff Lindsey contacted me recently to ask whether he could use the sheet music from one of my blog posts in a video he was making on Morse code snippets hidden in music. The sheet music appears about a minute into the video.

YouTube video screen shot

After watching the video, his previious video played, a video about words hidden in music. The title of a movie or television show is often hidden in the theme song, even if the theme has no lyrics.

For example, the theme song to Murder on the Orient Express is based on the rhythm of the title. The title sequence makes this clear because the syllables of the title appear in rhythm with the music. Sometimes the effect is less obvious or even debatable, such as in Jurassic Park or Harry Potter.

Airport abbreviation origins

It doesn’t take much imagination to understand why DEN is the IATA abbreviation for the Denver airport, but the abbreviation MCO for the Orlando airport is more of a head scratcher.

Here is a list of the busiest airports in the US along with a brief indication of the reason behind their abbreviations. Some require more explanation, given below.

  1. ATL Hartsfield–Jackson ATLanta International Airport
  2. LAX Los Angeles International Airport (*)
  3. ORD Chicago O’Hare International Airport, formerly ORchardD Field Airport
  4. DFW Dallas/Fort Worth International Airport
  5. DEN DENver International Airport
  6. JFK John F. Kennedy International Airport in New York
  7. SFO San FranciscO International Airport
  8. SEA SEAttle-Tacoma International Airport
  9. MCO Orlando International Airport, formerly McCOy Air Force Base
  10. LAS Harry Reid International Airport in LAS Vegas
  11. CLT CharLoTte-Douglas International Airport
  12. EWR NEWaRk Liberty International Airport (*)
  13. PHX PHoeniX Sky Harbor International Airport
  14. IAH George Bush Intercontinental Airport in Houston (*)
  15. MIA MIAmi International Airport
  16. BOS BOSton Logan International Airport
  17. MSP Minneapolis-Saint Paul International Airport
  18. DTW DeTroit Metropolitan Wayne County Airport
  19. FLL Fort Lauderdale-HoLLywood International Airport
  20. PHL PHiLadelphia International Airport
  21. LGA New York LaGuardia Airport
  22. BWI Baltimore/Washington International Airport
  23. SLC Salt Lake City International Airport
  24. SAN SAN Diego International Airport
  25. IAD Washington Dulles International Airport, named after John Foster Dulles (*)
  26. DCA Ronald Reagan Washington National Airport in Washington DC
  27. TPA TamPA International Airport
  28. MDW Chicago MiDWay International Airport

The Los Angeles airport was originally abbreviated LA. When airports switched to 3-letter abbreviations in 1930, an X was added simply to pad LA to three letters.

In the United States, the initial letter N is reserved for the Navy, and so Newark airport is EWR rather than NEW. The initial letters W and K are also reserved to avoid confusion with radio stations, and initial Q is reserved to avoid confusion with Q codes.

Dulles was originally DIA, but was changed to IAD to avoid confusion with DCA.

Houston’s largest airport, IAH, has an awkward name because the name HOU was already assigned to the older Hobby Airport.

Related posts

Photo by Ronny Siegel from Pexels

Visually symmetric words

I recently ran into the following comic strip online:

[Update: Thanks to Bryan Cantanzaro for letting me know via the comments that the image above was created by Hannah Hillam. The version I found had had her copyright information edited out. I will replace the image above with a legitimate version shortly.]

[Update 2: I’m not sure this is a Hannah Hillam cartoon per se; I haven’t found the exact source. Hannah Hillam makes a template available to let people put their own words in the format above, and the template does not contain a copyright notice. Maybe someone besides her make the cartoon above. The fact that the words are not hand drawn suggests this is the case. If you know who created the image please let me know and I will gladly credit them. ]

The comic is unsettling because it points out that a palindrome is a symmetric sequence of characters, which is not the same as a visually symmetric sequence.

What words are symmetric in the sense that “()()” is symmetric, i.e. visually symmetric rather than a symmetric sequence of characters?

The question isn’t well defined without some assumptions. Visual symmetry depends on whether characters are written in lower case or upper case, and it depends on the choice of font.

Let’s look at upper case first. I will assume the following letters are symmetric: A, H, I, M, O, T, U, V, W, X, and Y. Then the following words are symmetric: A, AHA, HAH, HUH, I, MAAM, MUM, TAT, TIT, TOOT, TOT, TUT, WOW.

For lower case, I will assume the following letters are symmetric: i, l, m, o, u, v, w, x, y. And I will assume b and d are mirror images, as well as p and q.

With these assumptions, the following words are symmetric: bid, bud, dib, doob, dub, ulu, wow.

An ulu, according to dictionary.com, is “a knife with a broad, nearly semicircular blade joined to a short haft at a right angle to the unsharpened side: a traditional tool of Inuit or Yupik women.”

Related posts

Top posts of 2022

These were the most popular posts on my site this year.

#10: How is portable radio possible? The length of an antenna is typically 1/2 or 1/4 of the length of the radio wave it’s designed to receive. How does an AM radio not need an antenna as long as a football field? See also Mathematics of radio.

#9: How to memorize the ASCII table Using landmarks, mnemonics, and the major memory system

#8: Org-mode as a lightweight notebook Emacs org-mode works like a Jupyter notebook, but is much simpler and much more transparent.

#7: Computing VIN checksums Python code to carry out a checksum for vehicle identification numbers

#6: The Chicken McNugget Monoid Finding the largest number of chicken nuggets you cannot buy.

#5: Phone tones in musical notation What is says on the tin.

#4: What use is mental math? Even though computers are cheap and ubiquitous, it’s useful to be about to quick, rough calculations in your head.

#3: Logarithms yearning to be free Theorems that have logarithmic special cases

#2: Hiragana, Katakana, and Unicode Japanese writing systems and how they map to Unicode

#1: Why a slide rule works Not how, but why. See also the post on circular slide rules.

Euler product for sine

Euler’s product formula for sine is

\sin(x) = x \prod_{n=1}^\infty \left(1 - \frac{x^2}{\pi^2n^2}\right)

To visualize the convergence of the infinite product, let’s look at the error in approximating sin(πx) with the Nth partial product of the infinite product, i.e.

\sin(\pi x) - \pi x \prod_{n=1}^N \left(1 - \frac{x^2}{n^2}\right)

Here’s a plot of the partial products.

We knew before making the plot that the error had to go to zero as N increases; otherwise Euler’s product wouldn’t converge. But it’s interesting to visualize how the error goes to zero.

Conformal map of rectangle to ellipse

The previous post looked at what the sine function does to circles in the complex plane. This post will look at what it does to an rectangle.

The sine function takes a rectangle of the form [0, 2π] × [0, q] to an ellipse with semi major axis cosh(q) and semi minor axis sinh(q).

The image of horizontal lines

is a set of concentric ellipses.

The sine function almost maps the interior of the rectangle to the interior of the ellipse.

If we add vertical lines to the rectangle

the results are a little puzzling.

The images of the dashed green vertical lines seem broken in the ellipse. Their images above the real axis don’t line up with their images below the real axis. This isn’t easy to see on the edges, but you can see it in the middle. There are 20 green lines in the preimage but 19 in the image. That’s because sine maps both vertical edges of the rectangle to the same line segment in the image.

It will be clearer if we make our rectangle slightly narrower, changing the base from [0, 2π] to [0, 6].

Now notice the split in the image;

Now we can see what’s going on. Sine doesn’t distort the rectangle into an ellipse from the inside out, not like the map between a circle and an ellipse. Instead it maps the left edge of the rectangle along the imaginary axis, then bends the rectangle around the real axis clockwise, then back around the real axis.

So sine conformally maps the interior of the rectangle, the open rectangle (0, 2π) × (0, q) to the interior of the ellipse with a couple slits removed, one slit along the positive imaginary axis and another slit along the real axis from -1 to 1.

So how would you map the interior of a rectangle to the interior of an ellipse with no slits? For the special case of a square, you could compose the maps from two previous posts: map the square to a disk, then map the disk to an ellipse.

Related posts

Sine of a circle

What does it look like when you take the sine of a circle? Not the angle of points on a circle, but the circle itself as a set of points in the complex plane?

Here’s a plot for the sine of circles of radius r centered at the origin, 0 < r < π/2.

Here’s the same plot but for π/2 < r < π.

Now let’s see what happens when we shift the center of the circle over by 1, first for 0 < r < π/2.

And now for π/2 < r < π.

Here’s the Python code that produced the first plot; the code for the other plots is very similar.

    import matplotlib.pyplot as plt
    from numpy import pi, exp, sin, linspace

    t = linspace(0, 2*pi, 500)

    for r in linspace(0.1, pi/2, 17):
        z = r*exp(1j*t) 
        w = sin(z)
        plt.plot(w.real, w.imag, 'b')

    plt.gca().set_aspect("equal")
    plt.title("$\sin(r\exp(it))$, $0 < r < \pi/2$")
    plt.show()

Related posts