Bioinformatics with Swift: Ep. 4 — Rabbits and Recurrence Relations

Today we cover the fourth challenge of Rosalind’s bioinformatics puzzle tree, exploring dynamic programming in Swift!

Ocean Paradise (they/them)
6 min readOct 30, 2023

Welcome to the next installment of Rosalind with Swift, where we journey into bioinformatics using the Swift programming language and the fourth Rosalind bioinformatics challenge! Today we explore recursion and dynamic programming to solve the classic rabbit reproduction problem. This problem allows us to explore the fascinating world of recurrence relations, which play a crucial role in generating sequences. If you’re ready to join us on this mathematical journey, let’s get started!

Dear reader, it really helps me out when you clap for my work, highlight sections you find interesting or important, and comment below (and most importantly following me!), so if you enjoy the following article, please consider doing any of those tiny things to really brighten my day! :-D

Understanding the Problem

A sequence is an ordered collection of objects, which can include numbers, and it can be finite or infinite. Sequences can be defined using recurrence relations, which determine the terms of a sequence based on the values of previous terms. This problem…

--

--

Ocean Paradise (they/them)

amateur computational biologist & software engineer |sentient astrolotl | open-source enthusiast | let's tinker together!