Create Texts with a Markov Chain Text Generator… and what this has to do with ChatGPT!


Everybody and their dog are talking about ChatGPT from OpenAI. If you want to get an intuition about what lies at the core of such Language Models, read on!
Continue reading “Create Texts with a Markov Chain Text Generator… and what this has to do with ChatGPT!”

Solving Einstein’s Puzzle with Constraint Programming


The following puzzle is a well-known meme in social networks. It is said to have been invented by young Einstein and back in the days I was ambitious enough to solve it by hand (you should try too!).

Yet, even simpler is to use Constraint Programming (CP). An excellent choice for doing that is MiniZinc, a free and open-source constraint modelling language. And the best thing is that you can control it by R! If you want to see how, read on!
Continue reading “Solving Einstein’s Puzzle with Constraint Programming”

Euler Coding Challenge: Build Maths’ Most Beautiful Formula in R


In this post, we will first give some intuition for and then demonstrate what is often called the most beautiful formula in mathematics, Euler’s identity, in R – first numerically with base R and then also symbolically, so read on!
Continue reading “Euler Coding Challenge: Build Maths’ Most Beautiful Formula in R”

Pseudo-Randomness: Creating Fake Noise


In data science, we try to find, sometimes well-hidden, patterns (= signal) in often seemingly random data (= noise). Pseudo-Random Number Generators (PRNG) try to do the opposite: hiding a deterministic data generating process (= signal) by making it look like randomness (= noise). If you want to understand some basics behind the scenes of this fascinating topic, read on!
Continue reading “Pseudo-Randomness: Creating Fake Noise”

Learning R: Build a Password Generator


It is not easy to create secure passwords. The best way is to let a computer do it by randomly combining lower- and upper-case letters, digits and other printable characters.

If you want to learn how to write a small function to achieve that read on!
Continue reading “Learning R: Build a Password Generator”

Learning R: Painting with Fire


A few months ago I published a post on recursion: To understand Recursion you have to understand Recursion…. In this post we will see how to use recursion to fill free areas of an image with colour, the caveats of recursion and how to transform a recursive algorithm into a loop-based version using a queue – so read on…
Continue reading “Learning R: Painting with Fire”