diff --git a/www/statics/euler/Euler_Problem-012_explanation.md b/www/statics/euler/Euler_Problem-012_explanation.md index c455f6a..8cc99a5 100644 --- a/www/statics/euler/Euler_Problem-012_explanation.md +++ b/www/statics/euler/Euler_Problem-012_explanation.md @@ -1 +1 @@ -Here I was desperately in need of an efficient algorithm. So I copied [this](http://www.mathblog.dk/triangle-number-with-more-than-500-divisors/) one from mathblog.dk and translated it into befunge. And I have to say it's amazingly fast. \ No newline at end of file +Here I was desperately in need of an efficient algorithm. So I copied [this](https://web.archive.org/web/20150314051848/http://www.mathblog.dk/triangle-number-with-more-than-500-divisors/) one from mathblog.dk and translated it into befunge. And I have to say it's amazingly fast. \ No newline at end of file diff --git a/www/statics/euler/Euler_Problem-051_explanation.md b/www/statics/euler/Euler_Problem-051_explanation.md index e69afb3..8e39c9c 100644 --- a/www/statics/euler/Euler_Problem-051_explanation.md +++ b/www/statics/euler/Euler_Problem-051_explanation.md @@ -1,4 +1,4 @@ -This is effectively an optimized implementation of [this algorithm](http://www.mathblog.dk/project-euler-51-eight-prime-family/). +This is effectively an optimized implementation of [this algorithm](https://web.archive.org/web/20150307042855/http://www.mathblog.dk/project-euler-51-eight-prime-family/). You can see the ten patterns on the left side and beside them the area were we build our numbers. So what we do is iterate through the numbers from `100` to `1 000`, through the ten patterns and through the digits `0`, `1` and `2`. diff --git a/www/statics/euler/Euler_Problem-058_explanation.md b/www/statics/euler/Euler_Problem-058_explanation.md index 16dc7ee..8c9e287 100644 --- a/www/statics/euler/Euler_Problem-058_explanation.md +++ b/www/statics/euler/Euler_Problem-058_explanation.md @@ -1,4 +1,4 @@ It's obvious that the bottleneck of this program is the primality test. The numbers become here too big to create a sieve and "normal" prime testing takes too long. -So we use the [Miller-Rabin primality test](https://en.wikipedia.org/wiki/Miller-Rabin_primality_test) that I implemented a while ago (thank [mathblog.dk](http://www.mathblog.dk)). +So we use the [Miller-Rabin primality test](https://en.wikipedia.org/wiki/Miller-Rabin_primality_test) that I implemented a while ago (thank [mathblog.dk](https://web.archive.org/web/20150314052138/http://www.mathblog.dk/project-euler-58-primes-diagonals-spiral/)). The rest is just enumerating all the diagonals until `primes*10<all` \ No newline at end of file diff --git a/www/statics/euler/Euler_Problem-060_explanation.md b/www/statics/euler/Euler_Problem-060_explanation.md index 3e4b005..f08ea12 100644 --- a/www/statics/euler/Euler_Problem-060_explanation.md +++ b/www/statics/euler/Euler_Problem-060_explanation.md @@ -2,12 +2,12 @@ Wow, so this is now officially my biggest (in terms of file size) befunge progra The file has around ten megabyte. And probably also in terms of unique variables (26 variables plus two 2D-arrays) The problem was also not that *befunge-compatible*. -My solution is pretty similar with the one from [MathBlog](http://www.mathblog.dk/project-euler-60-primes-concatenate/). +My solution is pretty similar with the one from [MathBlog](https://web.archive.org/web/20150407005005/http://www.mathblog.dk/project-euler-60-primes-concatenate/). We generate primes from `1` to `3300` and save verified pairs in an Hashmap. And when I say Hashmap I mean an *fucking* `3000x3000` array where every possible pair has an field (yay for befunge). I had to use quite a few codesnippets from older project: -My standard [sieve of eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes), an implementation of the [Miller-Rabin primality test](https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test) and method to [concatenate two numbers](http://www.mathblog.dk/files/euler/Problem60.cs). +My standard [sieve of eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes), an implementation of the [Miller-Rabin primality test](https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test) and method to [concatenate two numbers](https://web.archive.org/web/20150103211935/http://www.mathblog.dk/files/euler/Problem60.cs). In the end is to say that in befunge the program size is normally an good indicator for the runtime (not really, but its kinda correct for all my programs). So as you probably guessed this program takes a pretty loooooong time to complete. diff --git a/www/statics/euler/Euler_Problem-069_explanation.md b/www/statics/euler/Euler_Problem-069_explanation.md index 6a3bba0..f97f269 100644 --- a/www/statics/euler/Euler_Problem-069_explanation.md +++ b/www/statics/euler/Euler_Problem-069_explanation.md @@ -1,3 +1,3 @@ I had a really complicated solution where I tried to generate an Phi Sieve and had to work around a lot of corner cases. -Then I looked at [this](http://www.mathblog.dk/project-euler-69-find-the-value-of-n-%E2%89%A4-1000000-for-which-n%CF%86n-is-a-maximum/) solution and - well - it's faster and simpler than mine. +Then I looked at [this](https://web.archive.org/web/20150326003453/http://www.mathblog.dk/project-euler-69-find-the-value-of-n-%E2%89%A4-1000000-for-which-n%CF%86n-is-a-maximum/) solution and - well - it's faster and simpler than mine. So I translated it to befunge. \ No newline at end of file diff --git a/www/statics/euler/Euler_Problem-070_explanation.md b/www/statics/euler/Euler_Problem-070_explanation.md index 16fa9de..e2248a1 100644 --- a/www/statics/euler/Euler_Problem-070_explanation.md +++ b/www/statics/euler/Euler_Problem-070_explanation.md @@ -1,4 +1,4 @@ -The solution is practically identical to the one from [Mathblog](http://www.mathblog.dk/project-euler-70-investigate-values-of-n-for-which-%CF%86n-is-a-permutation-of-n/). +The solution is practically identical to the one from [Mathblog](https://web.archive.org/web/20150326005645/http://www.mathblog.dk/project-euler-70-investigate-values-of-n-for-which-%CF%86n-is-a-permutation-of-n/). But Kristian explains it much better than I :). We use our trustworthy [Sieve of Eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) snippet and the *GetCombinatoricHash*-function from problem-62 diff --git a/www/statics/euler/Euler_Problem-078_explanation.md b/www/statics/euler/Euler_Problem-078_explanation.md index 4ba2648..8afef15 100644 --- a/www/statics/euler/Euler_Problem-078_explanation.md +++ b/www/statics/euler/Euler_Problem-078_explanation.md @@ -1,4 +1,4 @@ -Again the algorithm is from [MathBlog](http://www.mathblog.dk/project-euler-78-coin-piles/). +Again the algorithm is from [MathBlog](https://web.archive.org/web/20150326121651/http://www.mathblog.dk/project-euler-78-coin-piles/). I can't really say that I understand the algorithm fully (and the MathBlog guy says he neither). But for the best explanation you better read his article. \ No newline at end of file diff --git a/www/statics/euler/Euler_Problem-094_explanation.md b/www/statics/euler/Euler_Problem-094_explanation.md index 5d5dfac..e9a3684 100644 --- a/www/statics/euler/Euler_Problem-094_explanation.md +++ b/www/statics/euler/Euler_Problem-094_explanation.md @@ -1,5 +1,5 @@ Nothing much to say about this one, we play a bit with the triangle formulas until we reach something that looks like a [Pell equation](https://en.wikipedia.org/wiki/Pell%27s_equation). -My approach is basically the same as the one on [mathblog.dk](http://www.mathblog.dk/project-euler-94-almost-equilateral-triangles/), but he explains it better. +My approach is basically the same as the one on [mathblog.dk](https://web.archive.org/web/20150420081602/http://www.mathblog.dk/project-euler-94-almost-equilateral-triangles/), but he explains it better. (And I improved my approach a bit after I read his article, his math skills are pretty good :D). The code is in a way interesting because it only has a single conditional operator.