Project Euler

Cerebral distractions of every kind, mostly but not exclusively Countdown-related.

Moderator: Michael Wallace

Post Reply
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Project Euler

Post by Charlie Reams »

I've recently been getting my teeth into Project Euler, a nice collection of mathematical/programming puzzles. It provides automatic validation, difficulty ratings for each puzzle and other nice bits and pieces. The programs required are usually pretty brief and straightforward once you work out what needs to be done, and the maths generally doesn't require anything beyond about GCSE level, although more powerful techniques might yield the solutions more easily.

Anyway it's quite fun, and I just reached Level 1 (25 problems solved) after a couple of days of messing about with it. I can see it appealing to some of the regulars here.
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

As a quick addendum, the cutest one I've seen yet is this one, which can easily be answered with pen & paper and doesn't require any programming.
Ryan Taylor
Postmaster General
Posts: 3661
Joined: Sun Oct 25, 2009 6:18 pm

Re: Project Euler

Post by Ryan Taylor »

Charlie Reams wrote:As a quick addendum, the cutest one I've seen yet is this one, which can easily be answered with pen & paper and doesn't require any programming.
I'm not writing out a million permutations.
Gavin Chipper
Post-apocalypse
Posts: 13276
Joined: Mon Jan 21, 2008 10:37 pm

Re: Project Euler

Post by Gavin Chipper »

Charlie Reams wrote:As a quick addendum, the cutest one I've seen yet is this one, which can easily be answered with pen & paper and doesn't require any programming.
Is it 2783915604?
Hugh Binnie
Enthusiast
Posts: 290
Joined: Fri Jul 24, 2009 9:46 pm

Re: Project Euler

Post by Hugh Binnie »

That was fun but I spent a while trying to find the 1,000,001th by mistake. :roll:
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

Hugh Binnie wrote:That was fun but I spent a while trying to find the 1,000,001th by mistake. :roll:
Did exactly the same. I suspected I had made an out-by-one error, but compensated in the wrong direction and wasted another ten minutes checking everything else.

Edit: As did Gevin :)
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

I fear that I could regret clicking the link in your opening post, Charlie, or my wife may not see me again for a few days.

I wonder how long I'll be able to resist that simple click.
User avatar
Chris Davies
Series 61 Champion
Posts: 404
Joined: Thu Dec 11, 2008 5:50 pm

Re: Project Euler

Post by Chris Davies »

I've solved 4 of the puzzles now and I can see myself becoming completely addicted. Thanks Charlie :D
Bob De Caux
Enthusiast
Posts: 265
Joined: Wed Sep 09, 2009 3:18 pm

Re: Project Euler

Post by Bob De Caux »

Thanks Charlie, these are great. Most of them (so far anyway) seem doable just using something like MS Excel, as long as you can come up with an efficient method rather than brute force (I think problem 18 and its extension, 67, are my favourites for this)
User avatar
James Doohan
Enthusiast
Posts: 323
Joined: Mon May 04, 2009 4:20 pm

Re: Project Euler

Post by James Doohan »

Didn't have time to look at these when the link was originally posted because of exams but have been looking at a few tonight. I can see many Summer hours going by while i'm figuring them out, cheers for the heads up Charlie :)
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Well, I finally succombed, and went to the link a few minutes ago.

Got number one out of the way pretty quickly. Might give it to one or two of my C2 students, as it's an ideal question for that course. No programming, nor even excel needed for this one. Simply a calculator.

I've resisted the temptation to read on, or feel I'll be rather late to bed.
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Another one, number two, this morning, and then I quickly realised that I'm going to have to be rather selective in which ones I go for, as I haven't had access to a programming language since retiring 14 years ago.
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Bob De Caux wrote:Thanks Charlie, these are great. Most of them (so far anyway) seem doable just using something like MS Excel, as long as you can come up with an efficient method rather than brute force (I think problem 18 and its extension, 67, are my favourites for this)
Since you mentioned them, Bob, I went straight to these two after doing 1 and 2. Nice ones. Only hard part for 67 was working out an efficient way of turning the data for 67 into the format I'd typed in to Excel for 18, but once that was done it was no problem at all.

Considering investing in a programming language tool. Any recommendations, anyone, for someone who's not seen anything for over 14 years, and who's spent the majority of his programming years working with assembler?
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

Howard Somerset wrote:
Bob De Caux wrote:Thanks Charlie, these are great. Most of them (so far anyway) seem doable just using something like MS Excel, as long as you can come up with an efficient method rather than brute force (I think problem 18 and its extension, 67, are my favourites for this)
Since you mentioned them, Bob, I went straight to these two after doing 1 and 2. Nice ones. Only hard part for 67 was working out an efficient way of turning the data for 67 into the format I'd typed in to Excel for 18, but once that was done it was no problem at all.

Considering investing in a programming language tool. Any recommendations, anyone, for someone who's not seen anything for over 14 years, and who's spent the majority of his programming years working with assembler?
Do you mean an IDE or do you want a specific language suggestion? I use Eclipse for Java, which is free and very good.
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Thanks for the mention of Eclipse, Charlie. :)

I was right to delay looking at this. If I had looked earlier there would be many things left undone in the past few weeks that should have been done (even more than in fact happened). But I really should have delayed longer, as I'm quite sure there'll be many things undone in the next few weeks that need doing.

I'll just blame you. :D
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Now reached level 1, using only spreadsheet or simply pen and paper so far. :)
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

Anyone else still playing? I'd forgotten until yesterday when Kai reminded me, I'm now making a push for Level 2.
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Charlie Reams wrote:Anyone else still playing? I'd forgotten until yesterday when Kai reminded me, I'm now making a push for Level 2.
I'd forgotten until you just reminded me now.
Dinos Sfyris
Series 80 Champion
Posts: 2707
Joined: Mon Jan 21, 2008 10:07 am
Location: Sheffield

Re: Project Euler

Post by Dinos Sfyris »

Might have a go at some tomorrow. Got opposing shifts with Emma this weekend :( :)
Eoin Monaghan
Kiloposter
Posts: 1462
Joined: Mon Dec 08, 2008 7:33 pm

Re: Project Euler

Post by Eoin Monaghan »

Dinos Sfyris wrote:Might have a go at some tomorrow. Got opposing shifts with Emma this weekend :( :)
Is it wrong that at first read, I thought this was dirty?
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

:D :D Level 2 :D :D

Looks like I've now picked off the majority of the ones where the approach is obvious and it's just a question of getting the implementation correct. If I get to Level 3 it'll take a bit more brain grease.
Liam Tiernan
Devotee
Posts: 799
Joined: Thu Jun 04, 2009 5:12 pm
Location: Kildare, Rep. of Ireland

Re: Project Euler

Post by Liam Tiernan »

Eoin Monaghan wrote:
Dinos Sfyris wrote:Might have a go at................................................................................................ Emma this weekend :( :)
Is it wrong that at first read, I thought this was dirty?
This might explain it
User avatar
James Doohan
Enthusiast
Posts: 323
Joined: Mon May 04, 2009 4:20 pm

Re: Project Euler

Post by James Doohan »

The Fibonacci series question had been doing my head in, so I skipped on and done some of the others in the meantime. Today I had another go at it and when I realised the mistake I was making I felt like kicking myself, repeatedly :evil: :oops:

Gonna leave any more questions for a while in case I fall out with myself again :roll:

Just tried the same problem in Excel and it takes 30 seconds to do, absolutely sickened :(
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

I've been hitting this pretty hard lately, made it to Level 3 and they're really starting to get hard now. Of the 107 I've solved so far, I think this was the most satisfying. There are certain facts from number theory that really make this a lot easier, but I didn't know them at the time so ended up deriving a lot of stuff from scratch. It took a couple of hours but it's such a fantastic feeling when you get the green tick after all that. Also the answer is a huge number which is always satisfying. Great stuff.

Edit: Oh yes, and if you solve more than 25 problems in a day, you get locked out of the site for 24 hours. I think this is meant to encourage you to go outside or something.
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

User avatar
Kai Laddiman
Fanatic
Posts: 2314
Joined: Wed Oct 15, 2008 3:37 pm
Location: My bedroom

Re: Project Euler

Post by Kai Laddiman »

I was over the moon when I hit Level 1. The most satisfying problem I've solved yet is probably this one (with a bit of help from Charlie :) ).
16/10/2007 - Episode 4460
Dinos Sfyris 76 - 78 Dorian Lidell
Proof that even idiots can get well and truly mainwheeled.
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

Hit the cap again :(
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

Stuck on 136, needing 14 more for Level 4. Think I might've burned myself out :(
User avatar
James Doohan
Enthusiast
Posts: 323
Joined: Mon May 04, 2009 4:20 pm

Re: Project Euler

Post by James Doohan »

Charlie Reams wrote:Stuck on 136, needing 14 more for Level 4. Think I might've burned myself out :(
Wow, well done Charlie, that's seriously impressive
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

James Doohan wrote:
Charlie Reams wrote:Stuck on 136, needing 14 more for Level 4. Think I might've burned myself out :(
Wow, well done Charlie, that's seriously impressive
Cheers mate. Seems I was too downbeat last night, as I approached them with a clear head this morning and picked off another two.

I know Kai and Raccoon are making good progress, is anyone else playing?
User avatar
James Doohan
Enthusiast
Posts: 323
Joined: Mon May 04, 2009 4:20 pm

Re: Project Euler

Post by James Doohan »

Charlie Reams wrote:
James Doohan wrote:
Charlie Reams wrote:Stuck on 136, needing 14 more for Level 4. Think I might've burned myself out :(
Wow, well done Charlie, that's seriously impressive
Cheers mate. Seems I was too downbeat last night, as I approached them with a clear head this morning and picked off another two.

I know Kai and Raccoon are making good progress, is anyone else playing?
My level of maths and is quite low and i'm a programming newbie so i'm slowly picking them off one at a time, but what I like most about the project is the new stuff that i'm needing to learn to make progress, I had never heard of Euclid's formula for the triples question and have also picked up some programming stuff too. It's now my second favourite website :D
Bob De Caux
Enthusiast
Posts: 265
Joined: Wed Sep 09, 2009 3:18 pm

Re: Project Euler

Post by Bob De Caux »

Charlie Reams wrote:
James Doohan wrote:
Charlie Reams wrote:Stuck on 136, needing 14 more for Level 4. Think I might've burned myself out :(
Wow, well done Charlie, that's seriously impressive
Cheers mate. Seems I was too downbeat last night, as I approached them with a clear head this morning and picked off another two.

I know Kai and Raccoon are making good progress, is anyone else playing?
When you sent it out originally, I hit it quite hard for a few days and got to 42, but I haven't had chance to have a go again recently. I did enjoy it though, so will try to pick it up again when I've got a bit of spare time.
User avatar
Michael Wallace
Racoonteur
Posts: 5458
Joined: Mon Jan 21, 2008 5:01 am
Location: London

Re: Project Euler

Post by Michael Wallace »

Amazing what a night's sleep does to your Eulering. I'd all but given up hope for the time being last night, but woke up with a few new ideas and have got myself to level 2. Unfortunately I now need to to do some actual work, so may have to leave it for a bit.
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Project Euler

Post by Charlie Reams »

Cool, seems like quite a few people are making progress. I've just completed the top 100 by difficulty, so I'm just about on track to make England's Top 50, which has been my ambition for a while. Just a few more...
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

I paused for a while as soon as I got to level 1, and for some reason haven't got out of that pause.

Well done Charlie - excellent progress.

Now I know why your urging everyone else to get on with historic recaps. It's so that you can push ahead on Euler. :)
User avatar
Kai Laddiman
Fanatic
Posts: 2314
Joined: Wed Oct 15, 2008 3:37 pm
Location: My bedroom

Re: Project Euler

Post by Kai Laddiman »

Image
16/10/2007 - Episode 4460
Dinos Sfyris 76 - 78 Dorian Lidell
Proof that even idiots can get well and truly mainwheeled.
User avatar
Kai Laddiman
Fanatic
Posts: 2314
Joined: Wed Oct 15, 2008 3:37 pm
Location: My bedroom

Re: Project Euler

Post by Kai Laddiman »

I'm currently stuck on 53 solutions, so I set about in search of another similar website. And I found one.

Once you've registered, it's worth checking out this problem. It's incredibly rewarding once you've solved it.
16/10/2007 - Episode 4460
Dinos Sfyris 76 - 78 Dorian Lidell
Proof that even idiots can get well and truly mainwheeled.
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Kai Laddiman wrote:I'm currently stuck on 53 solutions, so I set about in search of another similar website. And I found one.

Once you've registered, it's worth checking out this problem. It's incredibly rewarding once you've solved it.
How long does it take the confirmation email to come? It's been about 40 mins so far since I registered and was told that the email had been sent.
User avatar
Kai Laddiman
Fanatic
Posts: 2314
Joined: Wed Oct 15, 2008 3:37 pm
Location: My bedroom

Re: Project Euler

Post by Kai Laddiman »

Howard Somerset wrote:
Kai Laddiman wrote:I'm currently stuck on 53 solutions, so I set about in search of another similar website. And I found one.

Once you've registered, it's worth checking out this problem. It's incredibly rewarding once you've solved it.
How long does it take the confirmation email to come? It's been about 40 mins so far since I registered and was told that the email had been sent.
It arrived in my junk mail folder, trying checking yours.
16/10/2007 - Episode 4460
Dinos Sfyris 76 - 78 Dorian Lidell
Proof that even idiots can get well and truly mainwheeled.
Howard Somerset
Kiloposter
Posts: 1955
Joined: Mon Jan 21, 2008 9:02 am
Location: UK

Re: Project Euler

Post by Howard Somerset »

Kai Laddiman wrote:
Howard Somerset wrote:
Kai Laddiman wrote:I'm currently stuck on 53 solutions, so I set about in search of another similar website. And I found one.

Once you've registered, it's worth checking out this problem. It's incredibly rewarding once you've solved it.
How long does it take the confirmation email to come? It's been about 40 mins so far since I registered and was told that the email had been sent.
It arrived in my junk mail folder, trying checking yours.
Thanks!

I did think of that last night, and checked. But wasn't in junk mail either.

So tried again just now, with a different email addy, and it worked - in the junk mail. :)
Post Reply