Contact is a board game designed by Ken Garland in which players draw square tiles containing colored connections from a pile, attempting to form matches. Whilst the game is enjoyable to play — allowing the odd trading of cards in unfortunate circumstances — it seldom leads to a complete configuration, meaning a valid contacting arrangement using all available cards.
With the power of stochastically driven brute-force, however, finding such complete configurations turns out to be feasible — at least when playing with the 𝟣𝟦𝟢 cards my Contact version contains. Not surprisingly, many solutions are of rather linear nature since the game only contains two branching cards, i. e. cards where three sides boast connections. Thus, the search is further narrowed in by demanding a maximum dimension, that is the final configuration has to lie in a card rectangle of a given area. From my testing, a maximum dimension of 𝟧𝟢𝟢 is moderately quickly computed (~ 𝟥𝟢 sec @ 4.00 GHz), whilst lower maximum dimensions appear to be less likely.
From an implementation point of view, a generalized Contact card (defined as four sides, each with three nodes being blank or colored one of three colors) snuggly fits into 𝟤𝟦 bits, allowing for card rotation, reflection and match determination bei ng implemented through integer bit fiddling. The stochastic process is driven by an (ideally assumed) uniformly distributed random number generator, being recursively applied until all cards are consumed. Finally, an image is created as a portable pixmap .ppm and resized to a .png using ImageMagick.
C, Haskell, mathematics, programming, #algorithms, #false implementation, #probability theory
A shuffle of a finite sequence of length 𝑛 of distinguishable elements refers to an algorithmic process which — modulo pseudo-randomness — can be modeled as a random variable uniformly distributed on the permutations . However, most pseudo-random entropy sources provide only a pseudo-uniformly distributed realization of , leading to the necessity of finding an algorithmic transformation process if one wishes to achieve a shuffle. In the following, I will assume that a transforming process to a family of independent and uniformly on distributed random variables is already present for any .
One naive and seemingly correct (it is not) approach is to traverse the given sequence, uniformly swapping the current entry with another one, i. e.
as an exemplary C implementation where is independent and uniformly distributed on .
Yet, even though sensible on first sight, the above defined random variable is only in the most trivial cases uniformly distributed and — as empirical evidence suggests, see below — horrendously non-uniformly distributed otherwise. To prove the non-uniformity postulated above, I first present the following number-theoretic result.
Claim.In only three trivial cases does the factorial of a natural number divide its tetration; formally
Proof.Let be a natural number larger than two. By the definition of the factorial, is evident. Assume . Adhering to the uniqueness of prime factorizations, follows. Observe that has to be prime since , implying which cannot hold for 𝑛 > 𝟤.
Proof.Now suppose, falseShuffle was indeed non-trivially distributed uniformly. Without loss of generality, all involved probability spaces were finite. Then there had to exist a surjection from this algorithm’s entropic state to with fibers of the same finite cardinality, implying . By the above proven claim, 𝑛 < 𝟥 followed, making the distribution trivial.
One possible reason for the surprising nature of this non-uniformity is the striking source code resemblance to a correct implementation, i. e.
(Non-)commutative and (non-)associative operations have also been studied nearly twenty years ago by Christian van den Bosch, author of OEIS sequence A079195. Unfortunately, their site appears to be down, which is where they hosted Closed binary operations on small sets (resource found on web.archive.org).
V) Arbitrary polynomial extremum difference
Let 𝜀 > 𝟢 be an arbitrary distance, define . Then has two local maxima at - 𝟣 and 𝟣, whose vertical distance is 𝜀.
Five weeks of work including over six days of dedicated number crunching come to fruition as the thirteenth member of OEIS sequence A056154 is published,
Sequence A056154 is defined as binary exponents which have a ternary representation invariant under endomorphic addition modulo permutation, more formally
Due to the exponentially defined property, testing a given for membership quickly becomes non-trivial, as the trits of enter the billions. As an example, requires 30’974’976 trits. Assuming three thousand trits per page and two hundred pages per book, a ternary print-out of said number would require fifty-two books, filling a few book shelves.
For a discussion of the methodology I used to perform the search which lead to the discovery of , I refer to my paper Extending A056154.
Interessant war es auch, drei aufeinanderfolgende Zahlen zu nehmen, von denen die größte durch drei teilbar sein musste, sie zu addieren und aus dem Ergebnis so lange die Quersumme zu bilden, bis eine einstellige Zahl übrig blieb. Diese Zahl war immer sechs.
— Child, Lee: Der Anhalter. München: Blanvalet, 2015; p. 73
Jack Reacher’s at most tangentially to interpreting the sergeant’s reply related base ten factoid’s formal form is
Despite my personal disbelieve in and dislike of the colored blocks dragging simulator 3, I nevertheless wanted to extract functionality other than the hardcoded cat mascot path tracing from the aforementioned software; one of the most efficient visual result to build effort ratio yields a simple plot of the Mandelbrot set, formally known as
Recently, my stochastic professor introduced me to a problem he has been pondering for over two decades: on the two-dimensional integer lattice one shall flip a three-sided coin for each point and uniformly place one of three mirrors, , where denotes not placing a mirror. After having populated the world, one picks their favorite integer tuple and points a beam of light in one of the four cardinal directions. With what probability does the light fall into a loop, never fully escaping?