Coding Contest

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Nathaniel
Forum Contributor
Posts: 396
Joined: Wed Aug 31, 2005 5:58 pm
Location: Arkansas, USA

Post by Nathaniel »

@tim: nerd. :D
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Nathaniel wrote:It's more being able to analyze a problem than "math", although the skills you learn in math would help with that.
well my math skills are at high school level. This really limits what I can do with php or any other programming language.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

I didn't think there was a formula for calulating this sequence.
There wasn't while I was at school :?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I didn't know either.. Untill i was asked to come up with a proof for this function in a course.
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post by R4000 »

Heh, my version owns all of you!

Code: Select all

MoO moO MoO mOo MOO OOM MMM moO moO
 MMM mOo mOo moO MMM mOo MMM moO moO
 MOO MOo mOo MoO moO moo mOo mOo moo
written in the 'COW Programming Language'
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Tell me that it works! Please! :D
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post by R4000 »

That honestly does compile... you can convert it into c code using a moo2c thingy :P
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Grim... wrote:write a function to find what the nth number in the Fibonacci squence is.
But it doesn't do that, it just prints out the sequence :(
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post by R4000 »

meh, near enough :P

i never even wrote it :P

i still don't understand how it works so heh :D
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

i had to prove once that for every two rational number there lies an irrational number between them...also had to prove that for every postage after 5 cents it can be payed with a combination fo 2 cent and 3 cent stamps.i.e.-retarded. i've proved a lot of crap I'd rather not recall... : sighs : math likes me, a shame i hate it.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Charles256 wrote:math likes me, a shame i hate it.
Well, when i was forced to do it, in order to pass the courses, i didn't like it much either..
These days i find it challenging to find proofs for your statements (actually, i remember i prooved the first statement in a course, and the second seems relatively easy if you know a bit about restclasses.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

We need a new coding challenge.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

actually.the second one you just prove two consecutive cases and then you prove the n+1 case by showing how it is related to the first case.it's a bit of circular reasoning..shame I don't keep my notes... :-D
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Well it would go like:

(1) Proof that we can compose 5 as combination of 2 and 3, namely 2 * 1 + 3 *1 = 5.

(2) We assume that for a given n >= 5 that n can be composed as a combination of 2 and 3 let's say, 2 * x + 3 * y
We need to prove that n + 1 can be composed as a combination of 2 and 3 too.

From n = 2 * x + 3 * y and 1 = 2 * 2 + 3 * -1 we can write n + 1 = 2 * x + 3 * y + 2 * 2 + 3 * -1 <-> n + 1 = 2 (x + 2) + 3 (y - 1).

Case closed ;)
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

R4000 wrote:Heh, my version owns all of you!

Code: Select all

MoO moO MoO mOo MOO OOM MMM moO moO
 MMM mOo mOo moO MMM mOo MMM moO moO
 MOO MOo mOo MoO moO moo mOo mOo moo
written in the 'COW Programming Language'
ROFLMFAO... :lol: :lol: :lol:

That is the most retarded thing I think I have ever read in my entire life...

Stupid people humor me....thats fantastic...

Thats like ths email I got from a friend...with an easter context...

Two chocolate easter bunnies are facing each other...

One with it's bum eaten says (in a caption bubble) Ouch my Arse hurts...

The other, with it's ears eaten, says (in a caption bubble) What???

I seen that and just about s**t myself from laughing so hard...ok maybe I didn't do that, but still it was sooooo lame it was funny :)
Post Reply