Turnpike Problem (F#)

The Problem This is a problem for which no polynomial time solution exists, although a pseudo-polynomial (polynomial in the degree of the maximum element) does exist. In this paper, the algorithm proposed for the sum-function with full information is simple enough. For the original problem with the difference funcition, the algorithm is simple as well: … Continue reading Turnpike Problem (F#)

Decomposition Problem with F#, Dynamic Programming

As my former boss and mentor used to say, in order to understand recursion one must first understand recursion. This is funny, ha-ha, but if we tweak it slightly we get a really useful statement: in order to understand dynamic programming, one must first understand recursion. Here is an example. Sources Github: http://github.com/fierval/BioInfo Decomposition Problem … Continue reading Decomposition Problem with F#, Dynamic Programming

Motif Finding with Gibbs Sampling (F#)

The Problem "Motif finding is a problem of finding common substrings of specified length in a set of strings. In bioinformatics, this is useful for finding transcription binding sites" (recap here). The problem is succinctly stated on Rosalind. Given a set of strings DNA of size t, find "most common" substrings of length k. "Most common" means, that substrings … Continue reading Motif Finding with Gibbs Sampling (F#)