Saturday, 20 March 2021

Prime number sided die

Puzzle

Assume you roll 3 p-sided die, with p a prime larger than 3, and instead of looking at the individual value, you look at the sum of all three die, and the sum of the squares, and take these 2 values modulo p.

For example, if you have 7 sided die and you roll 3,4,5, then the sum is 12 and the sum of squares is 50, so the result would be (5,1), as $12\equiv 5 \pmod 7$ and $50 \equiv 1 \pmod 7$

This procedure generates p2 possible values. Proof that p2 − p of these outcomes are equally likely, and that the remaining p values also are equally likely.

Solution

For the the rest of the solution, if we use , we mean $\equiv \pmod p$

Call the values of the die a, b and c

To get the likelihood of an outcome (x, y) we have to count the number of solutions of
$$\begin{cases}a+b+c &\equiv x \\a^2+b^2+c^2 &\equiv y\end{cases}$$

Now call f(x, y) the number of solutions matching these equations

Define α :  ≡ a − x/3, β :  ≡ b − x/3, γ :  ≡ c − x/3, ω :  ≡ y/2 − x2/6

As p is coprime with 2 and 3 and prime, this is well defined.

Using these definitions, after some simple aritmatic, our equations become the following:


α + β + γ ≡ 0

α2 + β2 + γ2 ≡ 2ω

Note that for every solution that exists for these equations, there exist p in the original one, namely, one solution for every value of x. In other words, the number of solutions f(x, y), is the number of solutions for the above equation, if we state that ω :  ≡ y/2 − x2/6. Let us call this f(ω)

In our equations, γ ≡  − α − β so


α2 + β2 + ( − α − β)2 ≡ 2ω


2α2 + 2β2 + 2αβ ≡ 2ω


α2 + β2 + αβ ≡ ω

This is a quadratic equation in α, and thus, The number of solutions for a given β is determined by the determinant:


D ≡  − 3β2 + ω

Call Θ(d) a function that is the number of solutions that x2 ≡ d has. This function can be refined in detail using Eulers Criteria, but in essence, this function is always 0 or 2, except when d = 0, then it is one. This function also has the nice property that Θ(r) = 2 ⇒ Θ(d) = Θ(rd)

The total number of possible solutions for different β can now be stated as


βΘ( − 3β2 + ω)

Now assume that ω is nonzero.

Now as p is an odd prime, we can always find an n such that
ω ≡ 4n

Now define ξ ≡ b/2n.

As there exists one β for each ξ, so the number of solutions for ξ is equal to the number of solutions for β.


ξΘ((1 − 3ξ2)4n) = ∑ξΘ((1 − 3ξ2))

So the counting function is independent on the value of ω as long as it is not zero. This makes up p2 − p of original cases.

Now assume ω is zero.


βΘ( − 3β2) = ∑βΘ( − 3) = pΘ( − 3)

So this counting function is also constant if ω is p, which makes the other p cases.

Friday, 12 March 2021

Dice

Imagine you try to simulate a single six-sided die roll by rolling a large number of die, using the following system: 1. Roll a die 2. Check what number appears the most frequent 3. If there is a single number, take that number 4. If there is a tie, scrap both and continue.

For example, if you roll

132 ⚀’s, 144 ⚁’s, 120 ⚂’s, 97 ⚃’s, 101 ⚄’s and 118 ⚅’s

Then your result is ⚁ cause 144 is the highest.

If you roll 144 ⚀’s, 144 ⚁’s, 120 ⚂’s, 97 ⚃’s, 101 ⚄’s and 118 ⚅’s

Then ⚀ and ⚁ tie, so they are scrapped, so the highest remaining is ⚂.

The question now is the following:

For what number of dice (n) is this method: 1. Well defined 2. Does it produce the numbers 1 to 6 with equal chance

and does this work for dice with other than 6 sides?

First off, the fact that it produces all number with equal chance can be explained by a simple isomorphism argument.

The only thing that is needed to proof this is well defined, is to make sure that not all numbers are tied. There are different ways in which the frequencies can all tie, namely

2-2-2 tie, for example 0x⚀ 0x⚁ 1x⚂ 1x⚃ 3x⚄ 3x⚅ (roll: ⚂⚃⚄⚄⚄⚅⚅⚅ for 8 dice) 2-4 tie, for example 1x⚄ 1x⚅ (roll:⚄⚅ for 2 dice) 3-3 tie for example 1x⚃,1x⚄,1x⚅ (roll: ⚃⚄⚅ for 3 dice)

But for the first two ties, this can only happen if the number of die is a multiple of 2, and for the last die, this can only happen if this is a multiple of 3.

This means that if the number of die is not a multiple of 2 or 3, the frequencies cannot tie.

The argument in the other direction is similar. If n is a multiple of 2, then n/2 fives and n/2 sixes will tie. Same if n is a multiple of 3, then n/3 fours, fives and sixes will tie.

For all other n

n = 2,3 or 4 has a similar argument.

And for 5, and all numbers starting from 7, there is a tie of the form

2-3-x with x a positive integer that is not one (if it was one, that one die would not be tied).

And if we assign a frequency of zero to the x, this turns into the question, can be find for each positive number n two positive integers p and q such that 2p + 3q = n. Ans this is obviously true if n is not one.

Sunday, 24 January 2021

What set is larger

Which set is larger for a given number c

  • All unordered distinct pairs of natural numbers (a, b) such that c = lcm(a, b)

  • All unordered distinct pairs of natural number (a, b) such that 1/a + 1/b = 1/c

I claim that both these sets are equal to the number of unordered distinct pairs (x, y) such that xy = c2

Do proof this, we just have to find two bijections that project x,y on a,b such that both expression are equivalant.

Least common multiple

See this injection
$$\left\{ \begin{matrix}a = \gcd(x,\sqrt{xy})\\b = \gcd(y,\sqrt{xy})\end{matrix}\right. \Leftrightarrow \left\{ \begin{matrix}x=a^2/\gcd(a,b)\\y=b^2/\gcd(a,b)\end{matrix}\right. $$

We know have to proof 2 things. First that this is actually consistent, and secondly that it projects the right sets onto each other.

Consistency

Let us plug in the equations on the right, into the equations on the left
$$\begin{aligned} a' &= \gcd(x,\sqrt{xy})\\ &= \gcd(a^2/\gcd(a,b),\sqrt{a^2/\gcd(a,b)b^2/\gcd(a,b)})\\ &= \gcd(a^2/\gcd(a,b),ab/\gcd(a,b))\\ &= \frac{a}{\gcd(a,b)} \gcd(a,b)\\ &= a \end{aligned} $$

Analog for b.

Closed (left)

If
xy = c2

Then is
$$\begin{aligned} \gcd(x,y) &| x\\ \gcd(x,y) &| y\\ \gcd(x,y)^2 &| xy\\ \gcd(x,y)^2 &| c^2\\ \gcd(x,y) &| c\\ xy/c &|xy/\gcd(x,y) \\ c &|\text{lcm}(x,y) \end{aligned}$$
Thus


$$\begin{aligned} \text{lcm}(a,b) &= \text{lcm}(\gcd(x,\sqrt{xy}),\gcd(y,\sqrt{xy}))\\ &= \gcd(\sqrt{xy},\text{lcm}(x,y))\\ &= c \end{aligned}$$

Closed (right)

If
c = lcm(a, b)

Then


$$\begin{aligned} xy &= a^2/\gcd(a,b) \times b^2/\gcd(a,b)\\ &= \text{lcm}(a,b)^2\\ &= c^2 \end{aligned}$$

Sum of fractions

See this injection
$$\left\{ \begin{matrix}a = x+c\\b = y+c\end{matrix}\right. \Leftrightarrow \left\{ \begin{matrix}x=a-c\\y=b-c\end{matrix}\right. $$

The consistency of this injection is trivial.

That this is closed can be proved as follows:


$$\begin{aligned} \frac{1}{x+c} + \frac{1}{y+c} &= \frac{1}{c}\\ \frac{x+c+y+c}{(x+c)(y+c)} &= \frac{1}{c}\\ \frac{x+y+2c}{xy+xc+yc+c^2} &= \frac{1}{c}\\ xc+yc+2c^2 &= xy+xc+yc+c^2\\ c^2 &= xy\\ \end{aligned}$$

Friday, 8 January 2021

Two fake coins

Puzzle found here.

Among a pile of n gold coins, 2 of them are fake. Fake coins weigh the same, gold coins weight the same, but a fake coin weigh less than a gold coin. Given a balance scale with 2 weighting, the goal is to deduce which are the fake coins. 1. What is the maximum n and be able to achieve the goal? Support your answer with an algorithm. 2. What about with 3 weighting. 3. What about with 4 weighting.

Single fake coin

If there is only a single fake coin, the solution is very simple:

  1. Divide pile of coins into 3 equally sized piles (or as close as possible) certainly make sure the first two piles are exactly equal, the third pile may be one more or less.
  2. Weight one pile against the second
  3. If one of the piles is lighter, continue with lighter pile
  4. If the scale is balanced, continue with the third pile.
  5. Continue until only one coin is left.

There are solutions to a stricter form of the puzzle, like for example, if you have to write down all your weightings on the beforehand, and I will explain this in a future blog post.

Upper bound

Let us call a specific pair of fake coins a configuration. The different weighting have to be able to distinguish all configurations. A weighting itself can distinguish 3 configurations (if for one configuration left is heavier, for another right is heavier and for the last one the scale is balanced.)

This means that a maximum of w weightings can distinguish 3w different states.

Contrary to this, the number of possible configurations is ${2 \choose n} = \frac{n(n-1)}{2}$ for n weightings [source].

As all different configurations need to be distinguished, this means:

$3^w \geq \frac{n(n-1)}{2}$

$w \geq \log_3{ \frac{n(n-1)}{2}}$

as as the number of weightings is an integer

$w \geq \left\lceil \log_3{ \frac{n(n-1)}{2}} \right\rceil$

Is a lower bound for the number of weightings needed to distinguish n coins.

Anologous is

$\begin{aligned} 3^w &\geq \frac{n(n-1)}{2}\\ 2\times 3^w &\geq n(n-1)\\ 2\times 3^w &\geq n^2 - n\\ 0 &\geq n^2 - n - 2\times 3^w \\ n &\leq \frac{1 + \sqrt{1+8\times 3^w}}{2}\\ n &\leq \left\lfloor\frac{1 + \sqrt{1+8\times 3^w}}{2}\right\rfloor \end{aligned}$

An upper bound for the number of coins that can be distinguished.

To show that this upper bound can be reached, we just need a strategy that can reach the upper bound.

Sieving

Let call a subset of configurations that is still possible after a set of weighting a sieve. And let us call a sieve solvable in w weightings if there exists a strategy that can find the correct configuration of 2 fake coins in w or less weightings. Let us write out this definitions more mathematical, so we can more easily work with it.

The first thing we do is number each coin, with an index from 0 to n − 1

Definition 1 A configuration is a unordered pair of coins (integers). The set of all configurations C is the set of all unordered distinct pairs of integers in the range [0, n[

Definition 2 A weighting is an ordered pair of disjuct subsets of the integer range, of the same size. (the set of coins we put in the left scale and the set of coins we put on the right scale.)

Definition 3 Each weighting splits a sieve in three smaller sieves, depending on how the scale would react to the configuration. (so the configurations where the left side would be heavier, the configurations where the right side would be heavier, and the configurations would leave the scale balanced )

Theorem 1 If a sieve is solvable in w weightings, there exists a weighting that splits are sieve into 3 sieves that are solvable in w − 1 weightings.

Proof: Trivially proven by induction

Theorem 2 A sieve solvable in w weightings has at most 3w elements.

Proof: Trivial

Strategy

Using the previous chapter, we can devise an algorithm to search for a strategy. For each sieve, find a weighting that splits it into 3 sieves with at most 3w − 1 elements, but to make sure that we have margin for future weightings, we will try to split the sieve as evenly as possible. A good metric for how evenly something is split is the product of the sizes of the subsieves, but using this as an heuristic will put (0,0,2) on the same footing as (0,1,1), we will first add one to it, to prevent multiplication with zero.

To device the full strategy, we will use a Monte-Carlo simulation. This is the full algorithm:

  1. Select a limit l
  2. Start by creating a sieve containing all possible configurations.
  3. For each sieve:
    1. Generate l weightings
    2. Select all valid weightings (where all subservient are smaller than 3w − 1 with w the number of weightings left).
    3. Choose the valid weighting with the best heuristic. (As valid weightings always have better heuristics than invalid ones, these step can be switched with the previous one.)
    4. If there are no valid weightings, goto step 1 and increase the limit.
    5. Add the three new sieves to the set of step 3.
    6. If any of the sieves only has one element, this configuration is the correct configuration, do not add this sieve.

This algorithm does not guarantee a solution will be found, but it will usually find it.

The algorithms are displayed in interactive graphs. Each weighting is displayed as a box, with two sets of numbers in it, separated by <|>. The left set of numbers are the coins that have to be placed on the left set scale, the right numbers are the coins that have to be placed on the right scale. Each box can be clicked to expand or retract it. Expanding the box shows 3 path. The left one needs to be followed if the left scale is lighter, the right one if the right scale is lighter, and the middle one if the scale is balanced. If there are just 2 numbers with an ampersand between them, it means that those are the two fake coins.

Using this algorithm, I found solution for the following settings:

number of weightings upper limit number of coins for algorithm strategy link.
2 4 4 [link]
3 7 7 [link]
4 13 13 [link]
5 22 22 [link]
6 38 38 [link]
7 66 66 [link]
8 115 115 [link]

Further reading:

this paper contains solutions up to w = 10: http://www.chgk.info/~knop/math/ff.pdf

Thursday, 31 December 2020

Sum of periodic functions

Given the axiom of choice, you can write the identity function as a sum of two periodic functions. An example of a way to do this can be found here: https://mathblag.wordpress.com/2013/09/01/sums-of-periodic-functions/

Today, we are not going to solve this for the function ℝ → ℝ, but a simpler variant. Suppose 𝒬 is the set of all numbers that can be written as $q_1+q_2\sqrt{2}$ with q1, q2 ∈ ℚ. This set is closed under addition and multiplication. Now, find to periodic function of the form 𝒬 → 𝒬 that sum to the identity function. This is a way simpler proof that does not need the axiom of choice, but the solution follows the same recipe.

First, we will prove that q ∈ 𝒬, the decomposition into $q_1+q_2\sqrt{2}$ is unique, in other words, there exists only one pair q1, q2.

Proof:

Assume there are two pairs, q1, q2 and q1, q2 such that:

$q_1+q_2\sqrt{2}=q'_1+q'_2\sqrt{2}$

$q_1-q'_1=(q'_2-q_2)\sqrt{2}$

$\frac{q_1-q'_1}{q'_2-q_2}= \sqrt{2}$

This leads to a contradiction, as the left side is rational and the right side is irrational. The only way to solve this is if q2 − q2 = 0, because then the last step was not allowed. In this case we get: q1 − q1 = 0 Which means that both elements of the pair where equal.

Now that this is out of the way,

Define function $f: q_1+q_2\sqrt{2} \rightarrow q_1$

This function is well defined due to the previous theorem, and is periodic with period $\sqrt{2}$.

Proof:

$f(x + p\sqrt{2}) = f(q_1+q_2\sqrt{2} + p\sqrt{2}) = f(q_1+(q_2+p)\sqrt{2}) = q_1 = f(x)$

Analogous, define $g: q_1+q_2\sqrt{2} \rightarrow q_2\sqrt{2}$

g is for the same reason as above periodic with period 1

It is now easy to see that f + g is the identity function, so we found both our functions.

Sunday, 27 December 2020

Pokemon Types Battle

Consider the following two player game. Each player picks a Pokemon type, without revealing it to the other player. Each player then "deals damage" to the other player as if we are using the Pokemon advantage rules. So if your type is super effective on the opponents type, you will deal 200 damage, it is not very effective, it will deal 50 damage, if it has no effect, it will deal 0 damage, otherwise it will do 100 damage. This is played 10 times, and the player that has dealt the most damage wins. What is the optimal strategy?

As the amount of damage does not matter, only the fact whether or not you dealt more damage than the opponent, we can consider this a zero-sum game were each player only remembers the amount of damage that was dealt more than the enemy.

The type advantage table is this:
📦 🔥 💧 🌿 ❄️ 🥊 ☠️ ⛰️ 🐦 👁️ 🐞 🗿 👻 🐲 🌙 ⚙️
📦 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.5 0.0 1.0 1.0 0.5 1.0
🔥 1.0 0.5 0.5 1.0 2.0 2.0 1.0 1.0 1.0 1.0 1.0 2.0 0.5 1.0 0.5 1.0 2.0 1.0
💧 1.0 2.0 0.5 1.0 0.5 1.0 1.0 1.0 2.0 1.0 1.0 1.0 2.0 1.0 0.5 1.0 1.0 1.0
1.0 1.0 2.0 0.5 0.5 1.0 1.0 1.0 0.0 2.0 1.0 1.0 1.0 1.0 0.5 1.0 1.0 1.0
🌿 1.0 0.5 2.0 1.0 0.5 1.0 1.0 0.5 2.0 0.5 1.0 0.5 2.0 1.0 0.5 1.0 0.5 1.0
❄️ 1.0 0.5 0.5 1.0 2.0 0.5 1.0 1.0 2.0 2.0 1.0 1.0 1.0 1.0 2.0 1.0 0.5 1.0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0.0 0.0 0.0 0.0 0.0 1.0 0.5 0.0 0.0 1.0 0.5 0.0 0.0 0.0 -1.5 0.0 0.0
🐲 0.0 0.5 0.5 0.5 0.5 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.5 -2.0
🌙 0.0 0.0 0.0 0.0 0.0 0.0 -1.5 0.0 0.0 0.0 2.0 -1.0 0.0 1.5 0.0 0.0 0.0 -1.5
⚙️ 0.5 -1.5 -0.5 -0.5 0.5 1.5 -1.0 1.0 -1.0 0.5 0.5 0.5 1.5 0.0 0.5 0.0 0.0 1.5
0.0 -0.5 0.0 0.0 0.0 0.0 1.5 -1.5 0.0 0.0 0.0 0.5 0.0 0.0 2.0 1.5 -1.5 0.0

Using the technique described here we can find a Mixed strategy that solves this game.

The mixed strategy we use looks like this:
pick deal recieve overflow
Water 💧 0.1640 0.9932 0.9932 0.0000
Dragon 🐲 0.1040 1.0026 1.0026 0.0000
Grass 🌿 0.0982 1.0193 1.0193 -0.0000
Electric ⚡ 0.0907 0.9780 0.9780 0.0000
Fire 🔥 0.0898 1.0569 1.0569 0.0000
Ground ⛰️ 0.0865 1.2078 1.2078 0.0000
Steel ⚙️ 0.0793 0.9080 0.9080 0.0000
Ghost 👻 0.0617 1.0544 1.0544 0.0000
Fairy ✨ 0.0617 1.0121 1.0121 0.0000
Ice ❄️ 0.0582 1.1400 1.1400 -0.0000
Flying 🐦 0.0470 1.0132 1.0132 -0.0000
Poison ☠️ 0.0441 0.9845 0.9845 -0.0000
Dark 🌙 0.0147 1.0235 1.0235 0.0000
Normal 📦 0.0000 0.8986 0.9383 -0.0397
Bug 🐞 0.0000 0.9211 1.0444 -0.1233
Psychic 👁️ 0.0000 0.9897 1.0764 -0.0867
Fighting 🥊 0.0000 1.0141 1.1014 -0.0873
Rock 🗿 0.0000 1.1121 1.3377 -0.2256

In this table, "pick" decides the probability of each pure strategy of picking that specific type, "deal" is the expected amount of damage that the user deals if this type is used against this strategy, "receive" is the expected damage that will be received from this strategy, and overflow the difference between the two. Note that for a Nash Equilibrium, the overflow value has to be negative, because if it was positive increasing the probability of this strategy would create a strategy that would beat this. Analogous, for each type with a nonzero probability, the overflow cannot be negative, otherwise removing this type from the strategy would result in a new mixed strategy that can defeat this strategy.

putting the non zero values in a pie-chart looks like this: