All Questions
Tagged with dynamic-programming haskell
7 questions
3
votes
1
answer
122
views
Haskell implementation of Needleman-Wunsch
The code below is a Haskell implementation of Needleman-Wunsch algorithm for sequence alignment (and string edit distance). It's an experiment in trying to closely imitate the dynamic programming ...
2
votes
1
answer
138
views
Haskell Dynamic Programming on a Tree
Here is my shot at Homework 8 of CIS-194 (from Spring '13). The problem is about a hierarchy of employees at a company (a tree), each node being of type Employee, ...
2
votes
1
answer
755
views
How can I use the State monad effectively in Haskell?
I have written a simple fibonacci function in Haskell that uses the State monad to save solutions to overlapping sub-problems. Now despite the function working I am not really happy with the solution, ...
4
votes
1
answer
1k
views
Solving the Burst Balloon problem using Dynamic Programming
Continuing where I left off previously to solve the problem described here, I've now solved the same using dynamic programming (following Tikhon Jelvis blog on DP).
To refresh, the challenge is to ...
2
votes
0
answers
471
views
Smith-Waterman algorithm for local sequence alignment with affine gap penalties
The following is a summary from the top of my head so please correct me if I'm wrong. See the Wikipedia article for more.
This is about determining the (score / edit distance of the) most similar ...
4
votes
1
answer
1k
views
HackerRank - Candies
Here is the solution I've written for Hacker Rank Candies challenge.
It uses dynamic programming (memoization in a boxed array).
I'm interested on what could be done to improve this code in term of ...
4
votes
1
answer
503
views
Dynamic programming with Project Euler #18
I just wanted to get an opinion on my dynamic-programming Haskell implementation of the solution to Project Euler problem 18.
The Problem:
By starting at the top of the triangle below and moving to ...