All Questions
3 questions
5
votes
1
answer
207
views
Combinatoric problem in Haskell
I am new to functional programming. Just now I solved my first "real world" task using Haskell and now I'm wondering whether I got it "right" and what can be improved.
The problem arises from tensor ...
5
votes
2
answers
709
views
Calculating the count of integer partitions of a number (uses stateful vectors internally)
I've written a Haskell function to count the number of partitions of an integer - it's basically an implementation of the same algorithm as this one, using Euler's Pentagonal Number Theorem:
$$P(n) = ...
3
votes
2
answers
2k
views
N-queens problem in Haskell by bruteforce
I wrote a Haskell program to solve the N-queens problem by bruteforce. It works and I find it reasonably readable
But it is pretty slow:
5 seconds for one solution of 8 queens.
1 minute for one ...