Ed Baker FLS ARCS

Picture of Ed Baker.

I am an interdisciplinary researcher investigating how technology can be used to monitor biodiversity, in particular using bioacoustic and ecoacoustic approaches.

GitHub Profile | CV | Media

Latest publications

Good practice guidelines for long-term ecoacoustic monitoring in the UK

Google Scholar

Talks

08/11/2024 - Digital Dimensions of Nature Recovery

05/10/2024 - BNA Encaenia

04/10/2024 - Soundings: The River

04/09/2024 - TDWG 2024

11/07/2024 - Ecoacoustic Congress

All talks

Notes

Prophalangopsis obscura

Linux audio recipes

Acoustics figures

SANE defaults

All notes

Some thoughts on:

Visualisation of Collatz Conjecture in R

Intro

Take any positive integer, n. If n is even divide it by 2 (n/2). If n is odd multiple by 3 and add 1 (3n+1). Repeat the process on the new value. The Collatz Conjecture is that this sequence will eventually reach 1 (and then get stuck in the loop 4 -> 2 -> 1 -> 4). The routes from n to 1 can be visualised as a graph.

Graph of Collatz COnjecture
Graph of the collatz conjecture from WikiMedia.

While this display is informative, prettier visualisations of many more numbers are possible (inspired by the below YouTube video).

Visualisation

The R code (link below) generates a graph of all numbers between 1 and the highest value (bigNumber in the script). When plotting the graph edges ending in an even number are plotted slightly anti-clockwise from the previous node, and odd numbers are plotted slightly clockwise. The amount of anti-clockwise rotation does not need to be the same as the amount of clockwise rotation, which allows the overall graph to be plotted relatively straight, and careful choice of values will prevent lines performing complete revolutions.

The graph is plotted just using R plot primitives (segments()) rather than any other package.

5000 terms of the Collatz Conjecture graphed in R
n=1-5000, odd-rotation=1.2, even-rotation=-0.54

Graph of Collatz COnjecture in R 1

50000 terms of the Collatz Conjecture graphed in R
n=1-50000, odd-rotation=4.1, even-rotation=-2.3

Graph of Collatz COnjecture in R 2

Code

The code is available on GitHub: Collatz Conjecture visualisation in R.

Interactive visualisation of Collatz conjecture