Blog

  • 243, 324, 432

    The sequence (243, 324, 432) is a geometric series; 324/243 = 4/3, and 432/324 = 4/3. However, the other important thing is that all the elements of this sequence are anagrams.

    There are some trivial methods of generating infinitely more of these:

    • Multiply all the elements by 10
    • Concatenate two sequences that have the same ratio
    • Make the ratio be 1, as any number is an anagram of itself.

    Here is a list of all of these sequences I’ve found at the time of writing1, ignoring these trival methods of generating infinitely many sequences:

    • (243, 324, 432)
    • (486, 648, 864)
    • (19844, 44198, 98441)
    • (20325, 32520, 52032)
    • (23409, 30294, 39204)
    • (44649, 64944, 94464)
    • (142857, 285714, 571428)

    The common ratios of these sequences are 4/3, 4/3, 49/22, 8/5, 22/17, 16/11, and 2 respectively.

    What I find interesting is that all but one of these can be achieved by cycling the digits by the same amount. Cycling digits of a k-digit number leftward by n is equivalent to multiplying by 10n modulo 10k-1. For example, the sequence (20325, 32520, 52032) multiplies by 100 modulo 99999.

    As long as the amounts subtracted when taking the values modulo 10k-1 (which will just be the first n digits) also have the same ratio(e.g. 32/20 = 520/325 = 32520/20325), the sequence will also be a geometric series.

    This would speed up the search process tremendously, but it would miss the sequence (23409, 30294, 39204), which a more exhaustive search would detect.

    The last of the aforementioned sequences consists of the repeating sections of the numbers 1/7, 2/7, and 4/7, and it turns out that any of these sequences that consist of cyclically permuting the digits like this can be written similarly, e.g. (20325, 32520, 52032) are the repeating sections in 25/123, 40/123, and 64/123. A key component in this is that 8/5 is congruent to 100 modulo 123.

    There are also several possible variants on the concept:

    We could write numbers a different way. In base 2, the smallest of these is (1100001, 1000110, 1100100). In “base 10 but you prime factorize numbers before writing them”, the smallest is (13*13, 13*31, 31*31). In balanced ternary, (1T, T1, 1T) is valid. I’m not sure if any exist in Roman numerals, due to how few valid anagrams each number will have.

    We could use arithmetic sequences. One of the smallest of those is (127, 172, 217), with common difference 45, but I haven’t done the casework to prove that it is in fact the smallest.

    We could use different lengths of sequences. A sequence shorter than three numbers would be trivial no matter which numbers they are, but longer sequences can be non-trivial. Here’s a length-4 sequence: (2*(1016-1)/17, 4*(1016-1)/17, 8*(1016-1)/17, 16*(1016-1)/17). And a length-5 sequence: (16*(1096-1)/97, 24*(1096-1)/97, 36*(1096-1)/97, 54*(1096-1)/97, 81*(1096-1)/97).

    We could allow lead zeros. That would make construction simpler but exhaustive search harder, as sequences such as (001337, 013370, 133700)23 would be allowed but there’d no longer be a finite number of possible second terms for any given first term.

    And now combining all of these variants, here’s an arithmetic sequence of length 4 in binary that uses lead zeros: (00111, 01101, 10011, 11001).

    1. I used some Javascript code that I wrote myself to find the middle five of these. ↩︎
    2. 1337 was the best number I could think of to demonstrate a construction that works for any number. ↩︎
    3. If you treat these two footnotes as an exponent applying to all elements of the sequence, it still works. ↩︎
  • Symmetries of common variant sudoku constraints

    In variant sudoku, there are many constraints that are popular to add to puzzles. Some of these constraints behave exactly the same if you switch around the digits in certain ways. For example, many constraints behave the same when you map every digit x to 10-x. In cycle notation, that’s written as:

    (19)(28)(37)(46)

    German Whispers (resp. Dutch Whispers) are lines drawn in the grid where adjacent digits along the line must differ by 5 (resp. 4) or more.

    Renbans are lines drawn in the grid, and they must have a non-repeating set of consecutive digits on them in any order.

    White Kropki dots require that the digits in the two cells they touch must be consecutive.

    In the non-consecutive global constraint, no two cells that touch may be consecutive.

    However, some clues treat all digits differently, meaning they’re only preserved by the trivial permutation, also known as:

    e

    Killer Cages have to sum to the clue in the corner and may not repeat digits, digits along an Arrow add up to the attached circle, and digits along Region Sum Lines add up to the same value in each box.

    Thermometers increase moving away from the bulb.

    Counting Circles count how many Counting Circles have the same digit.

    This is also where the full set of Kropki dots goes.

    But some clues treat all digits the same. To notate this compactly, I’ll write:

    [123456789]

    Killer Cages without corner clues go here, as well as the Antiking and Antiknight global constraints where digits a king’s move (resp. knight’s move) apart cannot be identical.

    [13579][2468]

    Even Squares and Odd Circles force the digits on them to be even and odd respectively. Parity Lines are lines where the digits on them alternate between even and odd.

    The next clues have quite a complicated symmetry group, which I’ll write as:

    [[123][456][789]]

    That contains (1435)(26)(78), (284395)(186), (123)(45), and several other permutations. As long as the sets {1, 2, 3}, {4, 5, 6}, and {7, 8, 9} are still those three sets in some order, the permutation is in that subgroup. That sounds complicated, and yet somehow there are two common variant sudoku constraints with that subgroup:

    Entropic lines require that any three consecutive cells on them must have one digit from {123}, one digit from {456}, and one digit from {789}. Global Entropy requires that every 2×2 region has at least one digit from {123}, one digit from {456}, and one digit from {789}.

    [[147][258][369]]

    These symmetries are for the Modular Lines and Global Modularity, which are like Entropic Lines and Global Entropy mentioned earlier but using the sets {147}, {258}, and {369} instead.

    Unique Subgroups

    The Dutch Flatmates global constraint requires any 5 to have a 1 above it and/or a 9 below it, so its symmetries are [234678].

    A given digit 3 has symmetries consisting of just [12456789], and different given digits have different symmetries.

    Some clues have symmetry groups more complicated than this notation can handle, so in those cases I’ll just have to list a small set of generators for the subgroup.

    Black Kropki Dots require the two digits they touch to have a ratio of 2, and their symmetries are generated by (18)(24), (36), and [579].

    XV sudoku involves X clues that require the two digits touching them to add to 10, and V clues that require the two digits touching them to add to 5. Individually they have a lot of symmetries (X’s symmetries are generated by (19), (12)(89) and (1234)(9876), and V’s symmetries are generated by (14), (13)(24), and [56789]) but together their symmetries are generated by just (14)(69) and (12)(34)(67)(89).

    That is all the common constraints I can think of, so that’s where this article ends.

  • More on the Exceptional Outer Automorphism of S6

    As anyone who’s read the Wikipedia article about the Exceptional Outer Automorphism of S6 knows, the Outer Automorphism of S6 switches:

    • Single swaps with triple swaps
    • Single 3-cycles with double 3-cycles
    • Single 6-cycles with combination 3-cycle+2-cycles

    and preserves all the other conjugacy classes (i.e. the identity, 4-cycles, double swaps, combination 4-cycle+2-cycles, 5-cycles).

    But what I find really fascinating1 is what it does to subgroups of S6.

    Consider how the rotations of a cube permute its six faces. This forms a subgroup of S6. Apply the Exceptional Outer Automorphism, and it just turns into all the permutations of four objects, namely the four diagonals. Allow reflections in the first group, and chirality corresponds to swaps of the other two objects. And if we color pairs of opposite edges in identical colors and ask about the permutations of those, it corresponds to the even subgroup of the aforementioned S4*S2 subgroup.

    How about the permutations of the flags of a triangle under symmetries of the triangle? Turns out that cleanly corresponds to the permutations of the triangle’s vertices. What if we allow 60-degree rotations on the triangle, making it a hexagon whose edges get permuted? Once again, central inversion corresponds to swaps of two of the other objects.

    Take a dodecahedron and color pairs of opposite faces in six colors. Rotating the dodecahedron permutes these colors. Take the subgroup that corresponds to those permutations and it maps cleanly onto A5, as the permutations of the five cubes inside the dodecahedron.

    A subgroup generated by three non-intersecting swaps corresponds to a subgroup generated by the other representation of the Klein 4-group in S4, plus an additional swap. Its even subgroup {e, (12)(34), (12)(56), (34)(56)} corresponds to just that Klein 4-group in S4.

    An A32 subgroup corresponds to another A32 subgroup. Turning both of them into their Cayley graph with the 3-cycles as generators explains why the 3 by 3 torus graph is its own complement.

    According to A000638 on the Online Encyclopedia of Integer Sequences, there are 56 subgroups of S6 up to conjugacy. 18 of them map to the same conjugacy class under the Exceptional Outer Automorphism of S6, and the other 38 make 19 pairs.

    In conclusion, the Exceptional Outer Automorphism of S6 is my favorite isomorphism.

    1. One of the least formal things I’ve written on this blog. ↩︎
    2. This footnote should also be treated as an exponent. ↩︎
  • Proving the Pigeonhole Principle, constructively

    Constructive set theory is the theory where to prove the existence of an object, you must construct that object. That means the Law of Excluded Middle doesn’t work, which makes the proofs difficult to make but easy to follow.

    Let’s start by constructing the empty set. That’s the set with nothing in it, {}. Let’s also call it 0, for reasons which will become clear later. Each natural number is the set that contains the previous natural number as well as all of the previous natural number’s elements, e.g. 1 = {0}, 2 = {0, 1}, and so on.

    A natural number is any set that is the empty set or the set that contains some other natural number (its predecessor) as well as all of that number’s elements.

    The function succ takes in a natural number n and returns its successor, which is the number whose predecessor is n. I was unable to prove that a number’s predecessor is unique, so you’ll just have to assume that.

    Let’s also assume that reverse induction works, i.e. if a function takes in [statement that includes succ(N)] and outputs [same statement but with N instead], we can make a function that takes in [that statement again] for any N and outputs [same statement with 0 instead].

    If we’re given a natural number X that contains itself, then it is its own successor (because all elements of its successor are elements of it), and thus also its own predecessor.

    Therefore, the identity function restricted to numbers that contain themselves can be interpreted as a function that takes in a natural number succ(N) that contains itself and outputs a number N that contains itself. Then, by reverse induction, we get a function that takes in a number that contains itself and outputs the number 0 that contains itself.

    The statement of the Pigeonhole Principle which we will prove is: “If you have a bijection from a natural number to an element of that natural number, then an element of the empty set can be constructed.” Some may notice that this only implies that the conventional statement of the Pigeonhole Principle can’t be false, rather than implying that it must be true, but we will ignore these objections.

    We have been given a function F from N to M, where N contains M, and its inverse G. M is a natural number, so there are two cases to check: M is the empty set, or M is a successor.

    If M is the empty set, {} contains F({}).

    If M is a successor, then there are two cases to check for N:

    If N is the empty set, {} contains M.

    If N is also a successor, then N and M both have predecessors, which we’ll name L and K respectively. Every element of N is L or an element of L, and every element of M is K or an element of K. F(L) is an element of M, so it’s equal to K or an element of K.

    If F(L) = K, then construct a bijection from L to K by removing L and K themselves from F’s input and output set, respectively. (Unless L contains itself and/or K contains itself, in which case 0 contains itself and thus 0 is an element of the empty set)

    If F(L) is an element of K, then either G(K) = L (in which case F(G(K)) is both K and an element of K, so K contains itself, which means 0 is an element of the empty set) or G(K) is an element of L. In that case, construct a bijection from L to K that maps G(K) to F(L) and is otherwise1 identical to F.

    The previous proof is a function that takes in a bijection from N to M where N contains M, and returns either an element of the empty set or the same format as its input but with the predecessors of the input numbers.

    Now, construct a function that takes in an element of the empty set or a bijection from a number containing succ(M) to succ(M) and outputs an element of the empty set or a bijection from a number containing M to M. The function is constructed as follows: if the input is already an element of the empty set, output the same input, otherwise apply the previous proof’s function.

    Then, by reverse induction, we get a function that takes in an element of the empty set or a bijection from N to M with N > M and outputs an element of the empty set or a bijection from a number containing 0 to 0.

    If the previous function outputs a bijection from a number containing 0 to 0, then applying that function to 0 gives an element of the empty set, which means we have constructed a function of the type that proves the previous statement of the Pigeonhole Principle.

    1. Natural numbers are always equal or unequal, right? ↩︎
  • An expression that has a different value for every interpretation of PEMDAS

    PEMDAS (or BODMAS in some other places) is a mnemonic used to teach the order of operations, but there are several possible interpretations, especially when considering implicit multiplication.

    The interpretations of PEMDAS we will be considering are:

    1. All six types of operation, done one after the other.
    2. The same but with BODMAS.
    3. The proper groupings with implicit multiplication before exponents.
    4. The proper groupings with implicit multiplication between exponents and multiplication.
    5. The proper groupings with implicit multiplication grouped with multiplication and division.

    For the first two, implicit multiplication will either A) be treated just like ordinary multiplication or B) be placed before exponents. This makes for seven possible interpretations.

    The parentheses in the expression a/b(c-d+e)^f get placed in these ways when following each interpretation:

    1A: a/(b*((c-(d+e))^f))
    1B: a/((b*(c-(d+e)))^f)
    2A: (a/b)*((c-(d+e))^f)
    2B: a/((b*(c-(d+e)))^f)
    3: a/((b*((c-d)+e))^f)
    4: a/(b*(((c-d)+e)^f))
    5: (a/b)*(((c-d)+e)^f)

    All of these are different except 1B and 2B. Let’s just say that’s close enough for our purposes. Next, I want to place actual numbers here. I want all evaluation steps to be only positive integers, and have all possible results be as low as possible.

    After some deliberation, I have come to the expression 64/2(4-1+1)^2. The results of each interpretation of this expression are the following:

    1A: 8
    1B and 2B: 4
    2A: 128
    3: 1
    4: 2
    5: 512

    I have set up two polls on other social media to see which interpretation people will go with. (Both polls have an option for something else.)

    The first of these polls got 27 votes: 11 votes for 512, 10 votes for 2, 2 votes for 4, and 1 vote for all the other options. The second got 26 votes: 11 votes for 2, 5 votes for 512, 5 votes for something else, 2 votes for 1, and 1 vote for all the other options. These votes sum to:

    2: 21 votes
    512: 16 votes
    Something else: 6 votes
    1: 3 votes
    4: 3 votes
    8: 2 votes
    128: 2 votes

    I am unsure of what conclusion to draw from this, so I will end the article here.

  • Optimizing settings

    Let’s say you’re making some sort of program with options, and it’s possible to turn on option A or option B, but not both. You could just leave them as two settings and disable one if the other is on, or you could turn them into one setting with three choices: off, A, B.

    However, if there are three independent options, it’s better to leave it as three separate settings rather than one setting with eight choices.

    What if the three options can’t be turned on all at once but are otherwise independent? I’d say that three settings that just can’t be all turned on at once is best.

    A somewhat more formal statement of the general problem:

    We have a set of Boolean variables {A,B,…} (options) and some constraint that they have to satisfy.
    Each setting controls one or more options, but no option can be controlled by multiple settings.
    Each setting has all possibilities for its relevant options available, but no more.
    The valid combinations are connected via changing one setting at a time.

    I haven’t figured out what exactly should be optimized for, but I know it should follow a few obvious rules:

    • Rearranging the options preserves the optimal solution
    • Swapping any option’s off with its on preserves the optimal solution
    • Taking the disjoint union of two different sets of options and taking the Cartesian product (logical AND) of their constraints yields an optimal solution that is the disjoint union of the two original optimal solutions.
    • If a solution is optimal and you can add another possibility to the constraint and have it still be a valid solution, the resulting solution is still optimal.

    Let’s say our constraint is (A AND B) OR C. I’d say the optimal solution is one setting for A and C and another for B, or one setting for B and C and another for A.
    If our constraint is A XOR B XOR C, it’s forced to be one setting for all three, because I’m not able to represent “One setting each for A and B, and C is whatever it has to be to work” in this system.
    What if our constraint is C IMPLIES B AND B IMPLIES A? It seems pretty obvious to me that the answer is just one setting for all three. (If you think about it, this is how difficulty levels in certain games work)
    However, for the constraint (A XOR B) OR (A AND B AND C), I feel like there should be one setting for A and B and one setting for C.

    I could keep listing examples of various constraints and what I feel like should be the optimal solution, but I think I should stop there. It seems to me that my criteria for an optimal solution is: “Never have two settings that can only change when the other is in a specific state, and of those possibilities, minimize the maximum number of choices for each setting.”

  • Life in a four-dimensional universe

    There are a number of differences between four-dimensional space and three-dimensional space. This article will go through those differences and how they may affect 4D life.

    Space grows like x^4 instead of x^3

    Seeing lights from afar would be more difficult, as the sphere of directions is now 3D.

    Diameters of different sized objects tend to be much closer, which is an effect that perfectly cancels out with more efficient packing of objects of the same diameter.

    You may think objects of the same size would have more surface area, but if you compensate for the different dimensionality (surface volume ^ 2/3 vs surface area), cubes of the same volume have less surface area in 4D.

    1D objects can no longer be tangled

    Earphones in pockets and electrical wiring no longer get accidentally tangled, but knots in rope have to rely purely on friction.

    Flat surfaces are now 3D instead of 2D

    Let’s subdivide this section into several more sections based on the differences between 3D and 2D:

    Space grows like x^3 instead of x^2

    Cities can expand out more easily, with a smaller diameter relative to building size. Buildings in general also decrease in diameter due to floorspace increasing relative to smaller diameters.

    1D objects can cross over each other

    It’s possible to connect five places with roads without needing any intersections aside from those places. This also means that maps can require arbitrarily many colors instead of just 4.

    Trains are no longer forced to cross over other roads.

    Flat surfaces are now 2D instead of 1D

    Boundaries between countries would now be 2D rather than 1D, making them much harder to defend.

    The space of sideways directions can now be rotated through. This rotation is called twirl, and it actually deserves a major section of its own.

    Twirl

    Mixing up left and right (and the new sideways directions) is way more common. I’m pretty sure they wouldn’t even have specific names for sideways directions.

    The convention for writing text would have to be changed. Maybe each line is a spiral spiraling outward?

    You can no longer rely on muscle memory to locate things unless you twirl yourself into a consistent orientation beforehand.

  • Unintuitive examples of non-transitivity

    A transitive relation is a relation r where if A r B and B r C, then A r C. A non-transitive relation is any relation that isn’t transitive.

    The most famous example is rock-paper-scissors: rock beats scissors, scissors beats paper, but rock doesn’t beat paper. However, there are other ways to make nontransitive relations.

    All of the examples I’ll give in this article will be shown non-transitive by finding a basic rock-paper-scissors cycle in an antisymmetric relation.

    It’s possible to make three random variables such that A > B, B > C, and C > A, each with over 60% probability: Set A to 3, B to 61% 2 and 39% 5, and C to 61% 4 and 39% 1. A 4-cycle can allow for the winning probability to be 2 in 3. It is impossible for the winning probability in any cycle to be larger than 75% if the variables are uncorrelated (Past 75%, each one has to have a lower median than the previous, which can’t happen in a cycle). If the variables are correlated, the probability can be arbitrarily large (To get 99%, you need 100 variables.)

    Now, consider the functions f(x) = 3+3*round(x/3), g(x) = f(x+1)-1, and h(x) = f(x+2)-2. For any x, f(g(x)) > g(f(x)), g(h(x)) > h(g(x)), and h(f(x)) > f(h(x)). This means that comparing functions by which application order makes the result greater is a non-transitive relation.

    Now for a non-theoretical place where non-transitivity shows up:
    Say you’re hosting a vote for which of three things to use, and people submit their votes as rankings of the three things. It turns out that it’s possible for the majority rule on individual pairs to lead to a non-transitive relation, e.g. if the votes are A > B > C, B > C > A, and C > A > B, then A > B, B > C, and C > A all appear in 2/3 the votes. This is called the Condorcet paradox.

  • 3 + 40 = 4 + 15 + 24

    Replace every number in the above equation with its reciprocal and the equation is still true. Any equation using the four basic operations that has this property can be rewritten as an equality of two sums that still has this property by using the distributive properties of multiplication and division, applying the multiplications and divisions, and moving subtractions to the other side. (e.g. 3 + 4*(10 – 1) = 30/2 + 24 -> 3 + 4*10 – 4 = 30/2 + 24 -> 3 + 40 – 4 = 15 + 24 -> 3 + 40 = 4 + 15 + 24)

    Equations of the form a + b = x + y + z are the simplest possibility that exists non-trivially in the real numbers, and I have found several such equations.

    Multiplying all the numbers in the equation by the same number will preserve the property. This scale invariance means that these equations can be put into equivalence classes by scaling. The equivalence class including a + b = x + y + z will be denoted as (a,b|x,y,z). For convenience, I will write numbers on each side in ascending order.

    The first six equivalence classes I found that fit within the integers are (3,40|4,15,24), (3,40|5,8,30), (5,45|8,15,24), (8,72|15,24,45), (5,56|7,24,30), and (15,168|28,35,120). There is a simple involution that is very important: (a,b|x,y,z) -> (1/b,1/a|1/z,1/y,1/x).

    The way I generate new solutions is quite simple:
    Generate three random somewhat-composite numbers1 to go on the right side, then use the formulas S = a + b + c and P = Sabc/(ab+ac+bc) to determine the sum and product of the two numbers on the left side, then (S/2)+-sqrt((S/2)^2-P) to determine the two numbers on the left. Then I have the computer do this over and over until the results are integers or half-integers.

    After performing the above search for around an hour, I have come across the solutions (15,760|19,72,684), (55,561|80,264,272), and (48,364|105,112,195).

    You may notice that that’s not a particularly useful way of writing these. I’ll write them in prime factorization instead: (3*5, 2*2*2*5*19 | 19, 2*2*2*3*3, 2*2*3*3*19), (5*11, 3*11*17 | 2*2*2*2*5, 2*2*2*3*11, 2*2*2*2*17), and (2*2*2*2*3,2*2*7*13|3*5*7,2*2*2*2*7,3*5*13).
    This lets us find their duals in integer form easily – the first has a LCM of 2*2*2*3*3*5*19, the second has an LCM of 2*2*2*2*3*5*11*17, and the third has an LCM of 2*2*2*2*3*5*7*13.
    Therefore, their duals are (3*3, 2*2*2*3*19 | 2*5, 5*19, 2*2*2*3*3*5), (2*2*2*2*5, 2*2*2*2*3*17 | 3*5*11, 2*5*17, 3*11*17), and (2*2*3*5,5*7*13|2*2*2*2*7,3*5*13,2*2*2*2*13), which can be written in standard decimal notation as (9,456|10,95,360), (80,816|165,170,561), and (60,455|112,195,208). I also previously found (75,550|152,209,264) (dual: (228,1672|475,600,825)) earlier.

    Consider a prime p, and consider the five numbers’ p-adic valuations. Because p-adic valuations are preserved by negation, we can move all the numbers to one side of the bar (e.g. (|-40,-3,4,15,24)).
    Now the left side sum’s p-adic valuation is 0 (because the empty sum equals 0). The only way for the sum of two numbers to have a smaller p-adic valuation than either of them is if the two numbers have equal p-adic valuation, so the smallest p-adic valuation in the sum must occur at least twice. Applying this logic to the dual means that the largest p-adic valuation in the sum must also occur at least twice.

    If all the p-adic valuations are equal, then you can divide all the numbers by a power of p and get a solution in the integers mod p. For example, the title equation corresponds to (3,5|4,12,3) mod 7, or (3,7|4,4,2) mod 11. I haven’t found any that reduce to (1,1|1,2,2) mod 3 or (1,1|4,4,4) mod 5, despite those being valid in the fields of integers mod 3 and 5. There are none in the field of integers mod 2.

    Here’s a proof that there are no self-dual solutions in the rational numbers:
    For the sake of contradiction, assume there is such a solution. Then it can be scaled so that the middle of the right side is 1, so it’s: (a/b, b/a|c/d, 1, d/c). This means that a/b + b/a = c/d + 1 + d/c. Then, do the following algebra:

    • a/b + b/a = c/d + 1 + d/c
    • (a^2+b^2)/ab = (c^2+d^2)/cd + 1
    • (a^2+b^2)/ab – (c^2+d^2)/cd = 1
    • Note that ab and cd must be equal because of how fractions work
    • (a^2+b^2)-(c^2+d^2) = ab = cd
    • (a-c)(a+c)-(b-d)(b+d) = (a-d)(a+d)-(b-c)(b+c) = ab = cd

    If the value of each side of that final expression is odd, then a, b, c, and d are all odd, but then the first two parts would be even – even = even.
    However, if the value of each side of that final expression is even, then one of a and b is even and one of c and d is even. Because a/b and c/d were fractions written in simplest form, only one of a and b is even and only one of c and d is even. Then one of the first two expressions would be… Huh, I thought it would be odd. I guess this isn’t a complete proof after all.

    I have not found any way to generate all of these deterministically like Pythagorean triples can. Further research on this topic is needed.

    1. The way I did this was by taking the LCM of two random numbers from 1 to 100. ↩︎
    2. You may notice that this number appears to be less than the previous number. However, this is actually the number 1 in the integers mod 7, and the integers mod 7 does not have an ordering. ↩︎

  • Almost-associative Latin squares

    A group can be interpreted as a set with an associative operation whose Cayley table is a Latin square, as seen in the secret Simon Tatham puzzle called Group. (Ignore infinite groups for now.)

    What if we only want it to be almost associative, i.e. as associative as possible without actually being associative?

    I claim that any non-associative bibijective1 operation ○ must have at least eight non-associative triples. The proof is as follows:

    For any B and C, the functions x -> x ○ (B ○ C) and (x ○ B) ○ C are both bijective, so they must differ in at least two inputs. Therefore, for any A, B, and C such that A ○ (B ○ C) is unequal to (A ○ B) ○ C, there must be some other choice of A that does so. A similar line of reasoning proves that there is some other choice of B that does so, and some other choice of C that does so.

    That means that for any non-associative triple, for any of its elements, there’s a different value that still makes it non-associative. Therefore, there are at least two different possible values for the first value in a non-associative triple, and for each of them there are at least two possible values for the second value, and similarly for the third, making at least 2 * 2 * 2 = 8 non-associative triples.

    Now, an example of an almost-associative operation:

    ○A1A2B1B2
    A1A1A2B1B2
    A2A2A1B2B1
    B1B2B1A1A2
    B2B1B2A2A1

    Notice how it differs from the Klein 4-group in the bottom left 2 by 2, which is A ○ B. For a triple to be non-associative, it has to involve a different parity of such pairs in the two calculation orders. It can be checked that A ○ A ○ B is the only such case, and thus that it and eight equivalent triples are the only non-associative triples of ○.

    1. The first “bi” prefix in this word is used in the same sense as the word “bilinear”. ↩︎