Nonlinear eigenproblem: Difference between revisions
en>Fly by Night wikify |
en>Hyarmendacil m Undid revision 576073309 by 143.160.124.34 (talk). rv vandalism. |
||
Line 1: | Line 1: | ||
{{Infobox Website | |||
| name = Project Euler | |||
| commercial = No | |||
| logo = | |||
| screenshot = [[Image:Leonhard Euler.jpg|Euler|125px]] | |||
| caption = | |||
| url = [http://projecteuler.net/ projecteuler.net] | |||
| alexa = {{IncreaseNegative}} 44,162 ({{as of|2014|2|2|alt=February 2014}})<ref name="alexa">{{cite web|url= http://www.alexa.com/siteinfo/projecteuler.net |title= Projecteuler.net Site Info | publisher= [[Alexa Internet]] |accessdate= 2014-02-02 }}</ref><!--Updated monthly by OKBot.--> | |||
| type = Problem Solving Website | |||
| registration = Free | |||
| owner = | |||
| author = Colin Hughes (aka euler) | |||
| launch date = October 5, 2001 | |||
| current version = | |||
| revenue = | |||
| employees = | |||
}} | |||
'''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.<ref>{{cite news | |||
| url=http://www.theatlantic.com/technology/print/2011/06/how-i-failed-failed-and-finally-succeeded-at-learning-how-to-code/239855/ | |||
| title=How I Failed, Failed, and Finally Succeeded at Learning How to Code - Technology | |||
| work=The Atlantic | |||
| author=James Somers | |||
| date=June 2011 | |||
| accessdate=2013-12-14 }} | |||
</ref> It includes over 450<ref>{{cite web|url=http://projecteuler.net/problems |title=Project Euler (list of problems) |accessdate = 2014-01-25}}</ref> 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.<ref>{{cite web|url=http://projecteuler.net/about |title=Project Euler - About |accessdate=2008-04-04}}</ref> {{as of|January 2014}} Project Euler has over 360000 users from all over the world (who solved at least one problem).<ref>{{cite web|url=http://projecteuler.net/statistics |title=Project Euler (Statistics) - not accessible for anonymous users |accessdate = 2012-11-16}}</ref> | |||
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.<ref>{{cite web|url=http://projecteuler.net/news=archives |title=Project Euler (News Archives) |accessdate = 2010-09-13}}</ref> | |||
A subset of the Project Euler problems was used in an [[APL (programming language)|APL]] programming contest.<ref>{{cite web|url=http://www.dyalog.com/contest2009/qanda.html|title=APL programming contest|accessdate=2010-11-02}}</ref> | |||
There are 68 sequences<ref>{{cite web|url=http://oeis.org/search?q=%22Project+Euler%22&sort=&language=english&go=Search|title=OEIS sequences referencing Project Euler problems|accessdate=2011-04-15}}</ref> in the [[On-Line Encyclopedia of Integer Sequences|On-Line Encyclopedia of Integer Sequences (OEIS)]] referencing Project Euler problems. | |||
== Example problem and solutions == | |||
The first Project Euler problem is | |||
<blockquote>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.<ref group="note">This is the [[Logical disjunction|inclusive OR]], not the [[exclusive OR]]</ref> | |||
</blockquote> | |||
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 search|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]]: | |||
<pre> | |||
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 | |||
</pre> | |||
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 expression|closed form]] [[summation]] formula. | |||
: <math>\begin{align} | |||
\mathrm{sum}_{\text {3 or 5}}(n) & = \mathrm{sum}_3(n) + \mathrm{sum}_5(n) - \mathrm{sum}_{15}(n) \\ | |||
\mathrm{sum}_k(n) & = \sum_{i=1}^{\left \lfloor \frac{n-1}{k} \right \rfloor} ki \\ | |||
\sum_{i=1}^n ki & = k\frac{(n)(n+1)}{2} | |||
\end{align}</math> | |||
Here, <math>\mathrm{sum}_k(n)</math> denotes the sum of multiples of <math>k</math> below <math>n</math>. | |||
In [[Big O notation]], the brute-force algorithm is O(n) and the efficient algorithm is O(1) (assuming constant time arithmetic operations). | |||
==Notes== | |||
{{reflist|group="note"}} | |||
==See also== | |||
* [[List of topics named after Leonhard Euler]] | |||
== References == | |||
{{primary sources|date=July 2013}} | |||
{{reflist}} | |||
== External links == | |||
*[http://projecteuler.net/ Home page] | |||
*[http://euler.jakumo.org/ Jakumo : Project Euler In Russian] | |||
*[http://projecteuler.javafling.org/ Project Euler in Romanian] | |||
[[Category:Mathematics education]] | |||
[[Category:Computer science competitions]] | |||
[[Category:Educational websites]] | |||
[[Category:Problem solving]] | |||
[[Category:Puzzles]] |
Revision as of 23:22, 31 October 2013
Template:Infobox Website 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.[1] It includes over 450[2] 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.[3] Template:As of Project Euler has over 360000 users from all over the world (who solved at least one problem).[4]
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.[5]
A subset of the Project Euler problems was used in an APL programming contest.[6]
There are 68 sequences[7] in the On-Line Encyclopedia of Integer Sequences (OEIS) referencing Project Euler problems.
Example problem and solutions
The first Project Euler problem is
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).
Notes
43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.
See also
References
Template:Primary sources 43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.
External links
Cite error: <ref>
tags exist for a group named "note", but no corresponding <references group="note"/>
tag was found