All the data you need.

## Tag: Math

Sum of squares mod n uniformly distributed
Let s be an integer equal to at least 5 and let n be a positive integer. Look at all tuples of s integers, each integer being between 0 and n-1 inclusive, and look at the sum of their squares mod n. About 1/n will fall into each possible value. …
Day of the year
Occasionally it’s useful to find the day of the year. For example, today is 272nd day of 2022. How hard would it be to calculate the day of the year in your head? Each month has about 30 days, so the dth day of the mth month is approximately day …
The original Room square
A few days ago I wrote about Room squares, squares named after Thomas Room. This post will be about Room’s original square. You could think of a Room square as a tournament design in which the rows represent locations and the columns represent rounds (or vice versa). Every team plays …
Visualizing correlations with graphs
My local library had a book sale this weekend and I picked up a statistics textbook for geologists  for \$1. When I thumbed through the book an image similar to the one below caught my eye. This image approximates Figure 15.2 in , The nodes represent six factors of …
Room squares and Tournaments
A Room square is a variation on a Latin square. Room squares are named after Thomas Room, though there is an application to rooms as in compartments of a building that we’ll discuss below. In a Latin square of size n you have to assign one of n symbols to …
Field of order 9
This post will give a detailed example of working in a field with nine elements. This is important because finite fields are not often treated concretely except for the case of prime order. In my first post on Costas arrays I mentioned in a footnote that Lempel’s algorithm works more …
Costas arrays in Mathematica
A couple days ago I wrote about Costas arrays. In a nutshell, a Costas array of size n is a solution to the n rooks problem, with the added constraint that if you added wires between the rooks, no two wires would have the same length and slope. See the …
Costas arrays
The famous n queens problem is to find a way to position n queens on a n×n chessboard so that no queen attacks any other. That is, no two queens can be in the same row, the same column, or on the same diagonal. Here’s an example solution: Costas arrays …
Balanced tournament designs
Suppose you have an even number of teams that you’d like to schedule in a Round Robin tournament. This means each team plays every other team exactly once. Denote the number of teams as 2n. You’d like each team to play in each round, so you need n locations for …
Graphing Japanese Prefectures
The two previous posts looked at adjacency networks. The first used examples of US states and Texas counties. The second post made suggestions for using these networks in a classroom. This post is a continuation of the previous post using examples from Japan. Japan is divided into 8 regions and …
Classroom exercise with networks
In the previous post I looked at graphs created from representing geographic regions with nodes and connecting nodes with edges if the corresponding regions share a border. It’s an interesting exercise to recover the geographic regions from the network. For example, take a look at the graph for the continental …