Project Euler: Difference between revisions
mNo edit summary |
Answer Checking |
||
Line 63: | Line 63: | ||
On 15 June 2014, Project Euler was taken offline due to the discovery of a security breach, with no indication given as to when it would return.<ref>https://projecteuler.net/news</ref> |
On 15 June 2014, Project Euler was taken offline due to the discovery of a security breach, with no indication given as to when it would return.<ref>https://projecteuler.net/news</ref> |
||
As of 20 June 2014, problems are now accessible again |
As of 20 June 2014, problems are now accessible again and their solutions can be checked. However registering and logging into accounts remains disabled, and no new problems are being added. |
||
==Notes== |
==Notes== |
Revision as of 02:38, 28 June 2014
![]() | |
Type of site | Problem Solving Website |
---|---|
Created by | Colin Hughes (aka euler) |
URL | projecteuler.net |
Commercial | No |
Registration | Free |
Project Euler (named after Leonhard Euler) is a website dedicated to a series of computational problems intended to be solved with computer programs. The project attracts adults and students interested in mathematics and computer programming. Since its creation in 2001 by Colin Hughes, Project Euler has gained notability and popularity worldwide.[2] It includes over 450[3] problems, with a new one added every weekend. Problems are of varying difficulty but each is solvable in less than a minute using an efficient algorithm on a modestly powered computer. A forum specific to each question may be viewed after the user has correctly answered the given question.[4] As of January 2014[update] Project Euler has over 360000 users from all over the world (who solved at least one problem).[5]
Participants can track their progress through seventeen achievement levels based on number of problems solved. A special Eulerians level exists to track achievement based on the fastest fifty solvers of recent problems so that newer members can compete without solving older problems.[6]
A subset of the Project Euler problems was used in an APL programming contest.[7]
There are 68 sequences[8] in the On-Line Encyclopedia of Integer Sequences (OEIS) referencing Project Euler problems.
Example problem and solutions
The first Project Euler problem was
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.[note 1]
Though this problem is much simpler than the typical problem, it serves to illustrate the potential difference that an efficient algorithm makes. The brute-force algorithm examines every natural number less than 1000 and keeps a running sum of those meeting the criteria. This method is simple to implement, as shown by the following pseudocode:
Set TOTAL to 0; for every number NUM from 1 to 999 do if NUM mod 3 = 0 or if NUM mod 5 = 0 then add NUM to TOTAL; output TOTAL
For harder problems, it becomes increasingly important to find an efficient algorithm. For this problem, we can reduce 1000 operations to a handful by using the inclusion-exclusion principle and a closed form summation formula.
Here, denotes the sum of multiples of below . In Big O notation, the brute-force algorithm is O(n) and the efficient algorithm is O(1) (assuming constant time arithmetic operations).
Closure
On 15 June 2014, Project Euler was taken offline due to the discovery of a security breach, with no indication given as to when it would return.[9] As of 20 June 2014, problems are now accessible again and their solutions can be checked. However registering and logging into accounts remains disabled, and no new problems are being added.
Notes
- ^ This is the inclusive OR, not the exclusive OR
See also
References
- ^ "projecteuler.net site info". Alexa. Retrieved 26 June 2014.
- ^ James Somers (June 2011). "How I Failed, Failed, and Finally Succeeded at Learning How to Code - Technology". The Atlantic. Retrieved 2013-12-14.
- ^ "Project Euler (list of problems)". Retrieved 2014-01-25.
- ^ "Project Euler - About". Retrieved 2008-04-04.
- ^ "Project Euler (Statistics) - not accessible for anonymous users". Retrieved 2012-11-16.
- ^ "Project Euler (News Archives)". Retrieved 2010-09-13.
- ^ "APL programming contest". Retrieved 2010-11-02.
- ^ "OEIS sequences referencing Project Euler problems". Retrieved 2011-04-15.
- ^ https://projecteuler.net/news