Crikey Math

Having fun exploring mathematics

  • Home
  • About
  • Blog
  • Contribute
en English
af Afrikaanssq Albanianam Amharicar Arabichy Armenianaz Azerbaijanieu Basquebe Belarusianbn Bengalibs Bosnianbg Bulgarianca Catalanceb Cebuanony Chichewazh-CN Chinese (Simplified)zh-TW Chinese (Traditional)co Corsicanhr Croatiancs Czechda Danishnl Dutchen Englisheo Esperantoet Estoniantl Filipinofi Finnishfr Frenchfy Frisiangl Galicianka Georgiande Germanel Greekgu Gujaratiht Haitian Creoleha Hausahaw Hawaiianiw Hebrewhi Hindihmn Hmonghu Hungarianis Icelandicig Igboid Indonesianga Irishit Italianja Japanesejw Javanesekn Kannadakk Kazakhkm Khmerko Koreanku Kurdish (Kurmanji)ky Kyrgyzlo Laola Latinlv Latvianlt Lithuanianlb Luxembourgishmk Macedonianmg Malagasyms Malayml Malayalammt Maltesemi Maorimr Marathimn Mongolianmy Myanmar (Burmese)ne Nepalino Norwegianps Pashtofa Persianpl Polishpt Portuguesepa Punjabiro Romanianru Russiansm Samoangd Scottish Gaelicsr Serbianst Sesothosn Shonasd Sindhisi Sinhalask Slovaksl Slovenianso Somalies Spanishsu Sudanesesw Swahilisv Swedishtg Tajikta Tamilte Teluguth Thaitr Turkishuk Ukrainianur Urduuz Uzbekvi Vietnamesecy Welshxh Xhosayi Yiddishyo Yorubazu Zulu

Implementation of the Exploding Dots Representation algorithm

September 16, 2017 By Gary Ernest Davis

Global Math Week is almost upon us!

Exploding Dots is a mind-blowing experience for mathematics at all age and experience levels: K- 12, undergraduate-graduate-research mathematics.

There has never, in my experience, been such a simple mathematical idea with such profound ability to unite people of all ages and experience levels in engaging with mathematics.

Exploding Dots can provide very visual and understandable representations for numbers in unusual “bases”.

A 2 \leftarrow 3 machine, for example, represents numbers in base \frac{3}{2}, but not quite in the “usual” mathematical meaning of a base representation: in the Exploding Dots scenario, the digits 0, 1, 2 are allowed.

More generally, for a q \leftarrow p machine, where p > q, the digtis 0, 1, …, p-1 are allowed. We call this the base \frac{p}{q} Exploding Dots representation of a number.

Playful explorations

One ongoing exploration of Exploding Dots representations is finding palindromes for a base \frac{p}{q} Exploding Dots representation.

For example, we can check that the base \frac{3}{2} Exploding Dots representations of the following numbers are all palindromes: they read the same backwards as forwards.

n (base 10) Exploding Dots digits, base 3/2
1 {1}
2 {2}
5 {2, 2}
8 {2, 1, 2}
17 {2, 1, 0, 1, 2}
35 {2, 1, 2, 2, 1, 2}
170 {2, 1, 2, 0, 2, 2, 0, 2, 1, 2}
278 {2, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2}},
422 {2, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 2}
494 {2, 1, 2, 0, 0, 1, 0, 1, 0, 0, 2, 1, 2}

Are there any more?

As of the date of writing no-one knows.

Searches have been done for more base \frac{3}{2} Exploding Dots palindromes, but so far – up to n= 10^8 – no more have been found.

To the contrary, there seem to be very many – possibly infinitely many – \frac{7}{2} Exploding Dots palindromes.

Some machinery to do the heavy lifting

It’s clear that we cannot search n= 10^8 numbers by hand to check if their  \frac{3}{2} Exploding Dots  representations are palindromes.

We need a computer implementation of an algorithm to do this.

The algorithm is already completely transparent in the way we represent numbers using Exploding Dots, which is one of the great intuitive powers of Exploding Dots.

Here’s an example for a 2 \leftarrow 3 machine:

The algorithm is very simple:

  • split the number n, whose \frac{3}{2} Exploding Dots representation we wish to find into as many groups of 3 as we can. This number of groups is the integer part of n/3;
  • record a digit, which is the remainder when we have split n into as many groups of 3 as we can. This number is n – 3(integer part of n/3);
  • Replace n by 2 for every group of 3. This number is 2(integer part of n/3);
  • repeat until n < 3, and record this n as the final digit.

There’s nothing fancy about this algorithm- it’s just what we do in finding the base \frac{3}{2} Exploding Dots representation  of a number.

The brilliance is in the Exploding Dots conceptualization – thanks Jim Tanton!

Now we can translate this algorithm into a suitable programming language.

I chose to do it in Mathematica® just because I happen to like Mathematica®.

But you may not have access to Mathematica® so you may want to program this algorithm in Python, or Sage, or GeoGebra.

Anyway, here’s my Mathematica® code, with a few extra bells and whistles – I generalized by allowing a  q\leftarrow p machine, where p > q and put in a command to stop the program and print a warning message if someone chose p, q with q \geq p :

ExplodingDotsRepresentation[p0_, q0_, n0_] := 

Module[{p = p0, q = q0, n = n0, digits}, digits = {}; 

While[n >= p && p > q,
digits = Prepend[digits, n – p*IntegerPart[n/p]];
n = q*IntegerPart[n/p]];

If[p > q, digits = Prepend[digits, n],
Print[“Whoa,stop! You must choose p greater than q. So go back and make sure p is greater than q.”]]]

This is actually pretty useful for larger numbers

ExplodingDotsRepresentation[7, 2, 1232423534631236787454]

{2,1,2,5,5,3,4,2,1,3,0,0,4,1,5,0,0,2,5,4,2,3,4,1,3,5,1,3,3,2,5,3,5,6,2,1,2,3,6}

and for extensive explorations, like finding (or not) palindromes to unusual bases.

 

http://www.crikeymath.com/wp-content/uploads/2017/09/crikey.wav

 

 

Filed Under: Uncategorized

Recent Posts

  • Does the DNA test say guilty or not guilty?
  • The Turtleback Diagram for Conditional Probability
  • Numbers that, base 2, are blindingly obviously divisible by 3
  • A mysterious sequence of 1s and 2s
  • Does one have to be a genius to do mathematics? Neither necessary nor sufficient.
  • Alexander Bogomolny
  • Binary disjoints of an integer
  • A cycle of length 5 for iterated squaring modulo a prime
  • The diagonal of the Wythoff array
  • Leonardo Bigollo, accountant, son of Bill Bonacci

Archives

Copyright © 2023 · Dynamik Website Builder on Genesis Framework · WordPress · Log in