PithyLess - Barren, destitute, devoid of pith.
Filed under

ProjectEuler

 

Haskell statistics on Project Euler

I was curious about some statistics related to Project Euler and how well Haskell holds up in the contest. The table lists the most-often solved problems (in Haskell and overall). The question was to see if some problems are "easier" to solve in Haskell than in other languages.

Scraper

I put together a quick scraper in Haskell + tagsoup. You can find it here. If there is some interest in these kind of stats, I think I'll clean it up and look for more interesting correlations. ;-) In order to use the script, you need to be logged into ProjectEuler with a cookie set. Run this first (replacing USERNAME and PASSWORD): $ mkdir ~/.cookies/ $ curl --cookie-jar ~/.cookies/euler --data "username=USERNAME&password=PASSWORD&login=Login" "http://projecteuler.net/index.php"

Stats

Here's the first question I wanted to answer: what problems are "easier" to solve in Haskell? Given all users on Project Euler who have selected their language of preference as "Haskell", the first column gives us a percentage of how many solved the problem (second column). The third column is for comparison a ranking of difficulty of problems as judged by all languages.
% HaskelledHaskell RankEuler Rank
98%11
95%22
89%66
87%55
85%33
84%44
83%77
78%98
78%89
73%1010
73%1616
72%2020
67%1313
60%2511
58%1414
55%1112
54%4825
54%1515
54%1248
50%2118
47%1821
47%2217
46%1722
45%3019
44%2828
44%2430
43%2924
41%3667
40%3436
40%1929
39%6734
36%4035
35%3523
34%5240
33%5642
32%9727
32%5352
32%2345
31%3126
31%4231
31%2739
31%4537
31%2633
30%3953
28%3397
28%3756
28%4141
27%5532
26%3279
24%3855

More stats

In the top 50, there is almost no difference. But maybe some bigger patterns can emerge. Here's the entire list of problems, sorted by how many Haskellers solved it: [1, 2, 6, 5, 3, 4, 7, 9, 8, 10, 16, 20, 13, 25, 14, 11, 48, 15, 12, 21, 18, 22, 17, 30, 28, 24, 29, 36, 34, 19, 67, 40, 35, 52, 56, 97, 53, 23, 31, 42, 27, 45, 26, 39, 33, 37, 41, 55, 32, 38, 79, 63, 47, 43, 49, 46, 50, 59, 57, 44, 92, 69, 99, 58, 71, 81, 76, 65, 73, 62, 54, 74, 85, 112, 72, 51, 61, 70, 102, 87, 80, 82, 64, 124, 68, 77, 60, 89, 206, 66, 104, 75, 96, 83, 120, 116, 123, 91, 113, 78, 145, 117, 205, 114, 125, 108, 119, 115, 100, 95, 187, 93, 94, 179, 86, 204, 173, 90, 122, 107, 101, 203, 121, 110, 84, 191, 109, 98, 88, 164, 131, 188, 105, 132, 118, 103, 207, 174, 162, 148, 111, 137, 134, 183, 169, 138, 197, 151, 130, 139, 135, 133, 129, 106, 127, 225, 214, 149, 190, 166, 140, 136, 215, 128, 178, 231, 230, 172, 144, 211, 159, 155, 220, 158, 142, 216, 209, 165, 160, 126, 146, 202, 185, 235, 168, 150, 182, 234, 157, 221, 186, 171, 152, 141, 222, 200, 181, 176, 147, 189, 180, 175, 219, 217, 199, 154, 227, 226, 218, 213, 210, 193, 170, 208, 192, 156, 143, 196, 184, 161, 228, 201, 167, 163, 212, 194, 153, 232, 177, 195, 223, 198, 224, 236, 233, 237, 229, 239, 238] This has just been a teaser, maybe we can draw out some interesting correlations. Look forward to more stats! Suggestions, ideas, criticisms...?

Loading mentions Retweet
Filed under  //   haskell   ProjectEuler  

Comments [2]



Quantcast