Category: Uncategorized

  • 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”. ↩︎
  • The exceptional outer automorphism of S6

    Consider the complete graph on 6 vertices. There are, up to color permutation, 6 ways of coloring its edges in 5 colors such that each vertex has exactly one edge of each color, one of which is shown below:

    It turns out that every permutation of the 6 vertices permutes the 6 edge-colorings in a unique way, leading to an isomorphism between the group of permutations of the 6 vertices and the group of permutations of the edge-colorings.

    These groups are, of course, both S6. Rotating the above image by 60 degrees maps every vertex to a different vertex but it maps the shown coloring to itself, meaning that this isomorphism from S6 to S6 is not just a relabeling of the six objects. This means that it is an outer automorphism.

    A much more elegant construction of the exceptional outer automorphism of S6 involves this arrangement of the numbers 1 to 6:

    The single swap of 6 and another element X is mapped to a triple swap that includes the swap of 6 and X, as well as two other swaps between the pairs of elements equally far away from X around the circle. For example, the swap (16) maps to the triple-swap (16)(25)(34). All permutations of six objects can be generated by swaps of the form (X6), and it can be confirmed that all equations involving said swaps are preserved.

  • Numbering systems that get more cursed

    We traditionally use a base-10 numbering system. There are the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9, and after 9 we reset back to 0 and count the number of resets to the left. As an example sequence to demonstrate the numeral systems, I will use the OEIS sequence A000055, starting at the final 1: 1, 2, 3, 6, 11, 23, 47, 106, 235.

    Another famous numbering system is base 12, which has two new digits for the values 10 and 11. I’ll use X and E, but they aren’t standardized across places. Some say that it’s better than base 10, but it really isn’t. The sequence is now 1, 2, 3, 6, E, 1E, 3E, 8X, 177.

    Bijective base 10 is a numbering system that is similar to ordinary base 10, but instead of a digit A for 0 it has a single digit for 10. Expressions aren’t unique if we allow for decimals to terminate at different lengths due to the implied 0s at the end (e.g. 2 = 1.A = 1.9A = 1.99A = 1.999A). Again, the sequence: 1, 2, 3, 6, 11, 23, 47, A6, 235.

    Binary is just base 2. Two is the smallest possible base that actually works. Multiplication can be done with fewer carries, due to any product of digits being also a digit. The numbers do get very long, however that can be mitigated by just using narrow characters for the digits, such as . and |. The sequence: | |. || ||. |.|| |.||| |.|||| ||.|.|. |||.|.||

    A mixed radix system is a numbering system where the base is different in each digit. For example, alternating between 6 and 10 gives us the system used by clocks (at least at the seconds/minutes level). (1, 2, 3, 6, 11, 23, 47, 1:46, 3:55).

    Roman numerals are kinda just a base 10 system but the digits’ representations are sorta additive but also have subtraction and the digits have different representations depending on which place they appear. It’s also (by some definitions) limited to a maximum of 3999, although you could also allow it to have an unlimited amount of Ms at the start, which makes for a very interesting puzzle: What happens if you sort all possible Roman numerals in alphabetical order? Anyway, the sequence: I, II, III, XI, XXIII, XLVII, CVI, CCXXXV.

    Balanced Ternary is like base 3, but it has a digit T for -1 instead of 2. It allows you to write negatives without a negative sign (e.g. -100T1T = T001T1) and do multiplication with very few carries. However, because it has 3 digits, the digits can’t be made as narrow as binary digits. Of course, the sequence: 1, 1T, 10, 1T0, 11T, 10TT, 1T1T, 11T1, 100T01.

    Base phi makes each place value phi times the previous. For example, 2 is written as 10.01 in base phi, because 2 = phi + 1/phi^2, and 3 is written as 100.01 for a similar reason. Note that writing “11” anywhere is forbidden, because 1 + phi = phi^2. I’m not doing the sequence because decimal-to-phinary conversion is a bit difficult.

    Factoradic is a numbering system where each place counts successively larger factorials. It does require infinitely many digits, but the rate at which it requires them isn’t very fast. And the sequence: 1, 10, 11, 100, 121, 321, 1321, 4120, 14301.

    Base 1.5…? In this numbering system, you have digits 0, H, and 1, where H represents one-half. So, for example, 8 is 1H0HH: 1.5^4 + 0.5*1.5^3 + 0*1.5^2 + 0.5*1.5 + 0.5 = 8. This makes numbers even longer than binary. So, the sequence: 1, 1H, 1H0, 1H10, 1H11H, 1H1010H, 1H0HH1H1H, 1H0HH1H0111, 1H0HH1H010H01. I hope I didn’t make any mistakes there.

    Bijective Unary. Only one symbol, and you just write it that many times. It’s really easy to add numbers, at the cost of only being able to represent natural numbers. The sequence: 1, 11, 111, 111111, 11111111111, 11111111111111111111111, 11111111111111111111111111111111111111111111111, 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111, 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.

    The fundamental theorem of arithmetic states that every natural number can be factorized into primes in only one way, up to ordering. So, if we just assign each prime a symbol, we can make a system where multiplication is really easy, at the cost of addition being very difficult. It also requires infinite symbols. Again, the sequence: , 2, 3, 23, E, V, G, 2L, 5G.

    We could make the above two infinite-digit-requiring notations just call themself when indexing a digit, so that only finitely many digits are needed. So, e.g. the factoradic sequence would be 1, 10, 11, 100, 1(10)1, (11)(10)1, 1(11)(10)1, ((10)0)1(10)0, 1((10)0)(11)01. The prime factorization version could have the x’th prime be written using a digit that represents x, so the sequence there would be , (), (()), ()(()), (((()))), ((())(())), ((())((()))), ()(()()()()), ((()))((())((()))).

    Another based on prime factorization: The x’th space represents the x’th prime, 0 is 0, and you can place a – before the whole thing to make it negative. So -[0][[0]] = -3, and [[-[0]]] = sqrt(2). This can represent many important numbers (even irrationals), with the slight downside that addition might not be always possible. I don’t want to do the sequence for this one, because that’d completely skip over the cursed part

    What if we want a system that can write any rational number in its range in finitely many digits, but can only write numbers in the range [0,1)? Try Reverse-Factoradic, where each decimal place counts the next reverse factorial. You could glue this system to ordinary factoradic to allow for writing all reals. Instead of the standard sequence I’ve used for the rest of these, I’ll use the reciprocal integers from 1/2 to 1/7: .1, .02, .012, .0104, .01, .003206.

    Here’s a similar system to the above: The nth decimal place represents 1/n, but the maximum of each place is 1. For example, 1 is written as 1, 2 can be written as 1.11001, and 3 can be written as 1.11111011100001001010001. I’m not doing the ordinary sequence here because integers get exponentially long. Multiplication in this one still sorta works with few carries (e.g. 1.1 * 1.01 = 1.11001), but any time two of the 1s land on each other, they create even more 1s, which can quickly cause a chain reaction if we aren’t careful.

    At this point, we may as well just give every number its own symbol. This system takes the least space of all these systems, with the slight downside that there are no patterns in the operations at all and this font doesn’t have every symbol. Again, the sequence: 1, 2, 3, 6, E, V, G, Ü, Ǯ.

  • Tic-Tac-Toe variants

    Ordinary Tic-Tac-Toe has 9 spaces and 8 lines. It’s been played for a while, and you probably already know the optimal strategy for it. This post will go through a few Tic-Tac-Toe variants.

    The Fano plane has 7 spaces and 7 lines. It’s not a very good variant, because if the first player blocks the second player’s lines at all, the first player wins. The same applies to a 3 by 3 torus (9 spaces, 12 lines).

    Next, an infinitely large variant. Spaces are integers, and lines are sets of three that add to zero. This one actually has some interesting strategy, and I called it The Zero Game. (Infinite spaces, infinite lines.)

    What if we were to base the layout on the lines? How about 4 lines, and each pair of lines has one space that precisely those lines go through, totaling 6 spaces? That turns out to only be ties as well.

    We’ve also got a few with longer line lengths: for length 4 we have the 4 by 4 torus (16 spaces, 16 lines) which is pretty balanced, as well as the finite projective plane of order 3 (13 spaces, 13 lines). For length 5 there’s Torus Games’s implementation of Gomoku (36 spaces, 144 lines), and regular Gomoku (Infinite spaces, Infinite lines).

    Here are a few more gimmicky ones that don’t really fit into the established system above, of which I invented two:
    Tic-Tac-Veto – On your turn, you pick two of your possible moves and your opponent picks which one happens.
    Politic-Tac-Toe – There are three players, the board is 5 by 5, the lines are 5 long (including diagonals!), and wins are shared by two players if a line fills up with only those two players’ symbols.
    HeXO – Infinite hexagonal grid, 6-in-a-row wins, every turn after the first lets you place two of your symbol.

  • A universe without the number two

    How would that work? For starters, there are no even numbers and addition is a ternary operation. So the natural numbers here are 1, 3, 5, 7, and so on.

    There are five basic operations: addition (5 + 3 + 1 = 9), subtraction (5 – 3 – 1 = 1), middle (5 + 3 – 1 = 7, or 5 – 3 + 1 = 3. There are multiple ways of writing it.), multiplication (5 * 3 = 15), and division (51 / 3 = 17). Note that subtraction and middle could also be written using negative numbers.

    A big issue you may notice is that we can’t just pick an arbitrary predicate and count how many numbers satisfy it. This could probably be fixed with ternary logic, but I’ll just ignore it and move in a different direction:

    Adjusting the field axioms to this type of number system (we will call them threelds), we get:
    1) a + b + c = a + c + b = c + a + b. (Commutativity of addition)
    3) a + -a + b = b (Inverse of addition)
    5) a + b + (c + d + e) = a + (b + c + d) + e = (a + b + c) + d + e (Associativity of addition)
    7) 1 * x = x (Identity)
    9) x * y = y * x (Commutativity of multiplication)
    11) x * (y * z) = (x * y) * z (Associativity of multiplication)
    13) (a + b + c) * x = a * x + b * x + c * x (Distributivity)
    15) x * 1/x = 1. (Inverse of multiplication. Note that this applies to all numbers due to the nonexistence of zero.)

    Here’s a proof that the only threeld of odd size is the threeld of order 1:
    Because of the commutativity and associativity of addition, the sum of all elements in a set makes sense if that set has an odd size.
    Consider the sum S of the set of all elements in the threeld. Multiplication is a group, and thus multiplication by any element permutes them. Thus, S is preserved when multiplying by any element. That is, for any elements a and b, a * S = b * S. Dividing by S on both sides, we get that a = b for any elements a and b, and thus that there is only one element.

  • Situations where expected value doesn’t work

    Consider a lottery where you have a 1 in 2 chance of winning $2, a 1 in 4 chance of winning $4, a 1 in 8 chance of winning $8, and so on. The expected value of this is $(2/2 + 4/4 + 8/8 + …), which is infinite. But obviously you wouldn’t buy these tickets if they cost $50 each. This is because you’d probably run out of money before getting to the long run that the expected value measures.

    I’m thinking of a natural number. What distribution do you put on this natural number? In particular, what is its median, or even its mode?

    You’re playing a game where you have a 40% chance to win your bet and a 60% chance to lose, but you employ the Martingale strategy, where you double your bet each time? The only states where you stop betting are when you win 1, so your expected value is +1. However, after n bets, your expected value is 1-(6/5)^n, which diverges to negative infinity as n approaches infinity.

    You get to have a 1 in X chance for $X, but you get to pick any value for X in the range [1, inf). What value do you pick? Why specifically that value?

    Some guy runs up to you in the street, and he’s like “You should believe in my god Zulu, who will grant you his wealth if you believe in him.”
    You: “I think that’s very unlikely. I think that only has like a 1 in [X] chance of being true.”
    Guy: “Well, lucky for you, the amount of wealth that he’ll give you is $[X],000. So, your expected value for believing is $1,000.”

    By the way, the number I was thinking of earlier was 9.

  • Don’t multiply ordered fields

    First, the standard definition of multiplication on these structures makes a ring and not a field. Second, the resultant ring isn’t a very interesting one: it doesn’t have any elements that aren’t either a unit or a zero divisor. Third, the ordering is completely lost when you do this. Fourth, there is no reason I can think of that you would ever multiply ordered fields. Fifth, why is there a link? Wait, don’t leave yet! There’s still eleven to fourteen words left depending on how you count! Sixth, Happy April Fools!

  • The third-smallest asymmetric graph

    The smallest asymmetric graph is the empty graph, and the second smallest is the one-vertex graph. What about the third-smallest?

    Any two-vertex graph has a nontrivial automorphism (swapping the two vertices), so it can’t be a two-vertex graph.
    Any vertex connected to all others or disconnected from all others could be removed without increasing the amount of automorphisms, so it can’t be any graph that has such a vertex. This means it can’t be any three-vertex graph.
    Any disconnected graph would contain a smaller graph with at most as many automorphisms, so it can’t be a disconnected graph.
    The complement of any graph has the same number of isomorphisms, so it can’t be the complmement of any already-excluded graph.
    Any graph larger than 1 vertex that is isomorphic to its own complement has a non-trivial automorphism: applying said isomorphism twice. (Corollary: the third-smallest asymmetric graph is not unique)
    The previous three sentences excluded the three remaining four-vertex graphs: complement of 4-cycle, 4-cycle, and path graph respectively.
    Any remaining five-vertex graph with four edges must be a tree, and either include no vertices with degree larger than two (in which case it is the path graph, which has reversal as a non-trivial automorphism), or include one vertex with degree larger than two (in which case it can only include one such vertex and the distances from said vertex to the degree-one vertices cannot be all distinct, creating a non-trivial automorphism). This also excludes the five-vertex graphs with six edges (they are complements of five-vertex graphs with four edges).
    The only remaining five-vertex graphs have five edges. Either they have five vertices of degree 2 (in which case it is the pentagon graph, which is isomorphic to its complement), three vertices of degree 2 and one vertex each of degree 1 and 3 (in which case it is a cycle graph with a stick attached, which has a non-trivial isomorphism of reversing the cycle), or one vertex of degree 2 and two vertices each of degree 1 and 3 (there is only one graph that has those degrees, so it’s isomorphic to its complement).

    Therefore, the third-smallest asymmetric graph must have at least 6 vertices. There are asymmetric graphs with 6 vertices:

    and their complements. I am uncertain of if those four are the only asymmetric graphs with 6 vertices.

  • 1d6 + 1d6 = 1d11 + 1?

    It’s possible for two D6s to be correlated in such a way that their sum is 1 + a D11. You’ll see how later. For convenience, the rest of this article will make a Dn be randomly from 0 to n-1 rather than 1 to n.

    The first thing you might try after seeing an example might be trying D2 + D2 = D3. This one is simple, and also unique: (0,0) with probability 1/3, (0,1) and (1,0) with probability 1/6 each, and (1,1) with probability 1/3. The next may be D2 + D3 = D4, which is also unique, and in fact any D2 + Dn = D(n+1) is unique: (0,x) has probability (n-x)/(n^2+n), and (1,x) has probability (x+1)/(n^2+n).

    It’s also possible for three D2s to be correlated so that any two of them make a D3 and their entire sum is a D4. A similar thing can be done for four D2s where any two make a D3, any three make a D4, and all four make a D5, and this can also be done for any number of D2s: the chance for any specific combination with m of n D2s landing on 1 is 1/(n*(n choose m)). This means it can also be represented by rolling a D(n+1) and picking a random combination with that many 1s, which provides a neat way to physically build this distribution.

    This new probability distribution gives us an answer to the question at the start: How can we make D6 + D6 equal D11? The most elegant answer: use the construction above with ten D2s, and consider the first five as one D6 and the other five as the other D6.

  • A Compendium of Infinitely Large Sudoku Variants

    I’ve been thinking: Sudoku is nice, but the middle phase where you get interesting deductions is just not long enough. So, to solve that problem, here’s a few infinitely large sudoku variants I came up with. Feel free to implement any of these.

    The Staircase: Each row is offset from the next by one cell, allowing for infinitely many rows and columns while each of them contains only nine digits. Regions can be whatever nine adjacent cells you want, like Jigsaw sudoku.

    The Fractal: Every cell in an n by n grid contains an n-1 by n-1 grid, and that grid’s digits are the digits in the n by n grid other than the one in the cell. Regions are jigsaw again. Technically that one only has O(n!2) cells, But given that humans can only live for about three hundred million seconds, that’s probably close enough to infinity. You could also make it one-dimensional: instead of an n by n grid, you use a single row of size n.

    The Cone: Row N contains digits from 1 to N and column N also has digits from 1 to N. Regions are jigsaw (one region of each possible size). In case you don’t understand what shape the grid is, here’s an image of the grid shape recreated in Desmos:

    The Hypercube: Each cell has infinitely many coordinates, each of which only has nine possibilities. The 2D slices fixing all but two of the coordinates have to all be normal Sudoku grids.

    All of these have downsides: The Staircase only really has two places to make deductions from, The Fractal still sorta has starts and ends, The Fractal (1D) is one-dimensional, The Cone has only 55 cells available before you’re forced to worry about digits other than 1 to 9, and The Hypercube is hard to visualize, and actually has no valid solutions past four dimensions.