A Conversation for The H2G2 Programmers' Corner

Myth 42 needs your help!

Post 1

The Artist Formerly Known as Nerd42

OK, you hitchhiking programmers! There's a major thingy that needs doing that has to do with H2G2 and the Ultimate Question of Life, the Universe, and Everything! (which is 42 just in case anybody doesn't know by now) The people from the Myth of 42 believe that every single H2G2 researcher number can, in some remote way, be mathmatically twisted to become equal to.. you guessed it: 42! (their page explains it better than me)

This looks like a job for... the H2G2 Programmer's Corner! There's a program here that needs to be written, so go to it! I'm going to have a good try at it after I've figured out mine, but maybe it will be done by then. As far as letting everybody see your program, upload it to your website and put a link to the URL here is pretty much all you can do, as far as I know. Maybe if we do it well enough, H2G2 might get a page with a script for doing it.

Well, anyway look them up.
The Myth of 42: A530560

I'm not with them as of now, but, like the original guide says, I "thought it was a good idea at the time."
smiley - towelNerd42


Myth 42 needs your help!

Post 2

The Artist Formerly Known as Nerd42

Oops, I wrote "Question" where I should have wrote "Answer." OhWell.
smiley - towelNerd42


Myth 42 needs your help!

Post 3

Chovinano.

The link worked. smiley - smiley

It would be no good ME trying to do a programme, I havent even sorted my SPACE out yet! smiley - biggrin

Janesmiley - rainbow
smiley - magic


Myth 42 needs your help!

Post 4

Ion the Naysayer

Oh man...

I thought about the intricacies of this type of a problem when I first found out about the myth of 42 and they are quite numerous.

1) You can split the number anywhere
2) You can use almost any math operation, many of which are quite time consuming and processor intensive
3) Deriving a formula from a number is a lot more difficult than the other way around

I don't know if this is even feasible. My first thought is don't work forwards. If you don't work backwards from 42 you'll never solve it due to the sheer volume of calculations you can perform on a user number.


Myth 42 needs your help!

Post 5

Ion the Naysayer

Okay, numerous is probably the wrong word to use... More like intensive.


Myth 42 needs your help!

Post 6

Ion the Naysayer

I've thought about it a bit more and as long as the user number has a 9 (or a calculation that will reach 9) and a 6 (or a calculation that will reach 6), you can use *(0^a) or +(a^0) to cancel out all the other digits leaving just 6*9.

Strictly speaking this will work. Is it considered cheating?


Myth 42 needs your help!

Post 7

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

Would it save a little time here if I just disproved the myth...? smiley - geek

See Santa at U12 for details... smiley - santasmiley - tongueout


Myth 42 needs your help!

Post 8

DoctorMO (Keeper of the Computer, Guru, Community Artist)

can't we just use a super computer to spit out all the posibilities smiley - winkeye

-- DoctorMO --


Myth 42 needs your help!

Post 9

Martin Harper

uh, 6*9 is 54, not 42.
And you can only use zeros if they occur in the username or you can create them.


Myth 42 needs your help!

Post 10

Potholer

Thinking about a computer solution, I suppose a program that used RPN for the calculations would save the hassle of parentheses, but the number of potential multiple unary operators would make the total number of calculations possible on a given user number infinite, even with a strictly limited set of operators.


Myth 42 needs your help!

Post 11

Captain_SpankMunki [Keeper & Former ACE] Thanking <Diety of choice> for the joy of Goo.

Ladies and Gentlemen The winner of the 2002 'Look how many technical words I can use in a single sentence' award is....

*drumroll*

Potholer!

Here endeth my valuable contribution to the thread until I've actually read what it's all about.

Liam.


Myth 42 needs your help!

Post 12

manda1111

smiley - laughsmiley - laughsmiley - laughsmiley - laughsmiley - laugh
smiley - oksmiley - ok

manda smiley - magic


Myth 42 needs your help!

Post 13

Potholer

Thanks smiley - ok

I *could* have tried to explain things in more detail, but was wary of appearing patronising, and I suppose my habit of writing paragraph-length sentences in an attempt to mirror my conventional thinking style is partly to blame, and despite the fact I am well aware of that, having been reminded whenever my writings come under the scrutiny of a style-checker (which is the primary reason I don't use them any more), I do find it rather difficult to chop things down into shorter sentences, being naturally averse to appearing like a journalist on a tabloid newspaper. smiley - winkeye

Seriously, (assuming a usernumber 'abcdef') if people are allowed to do things like :-

(-a * (b!)!) * -(acos(srqt(c+d))!) / (cos(e)^(sin(f)!)

(or in RPN, using '+/-' for unary minus)
a +/- b ! ! c d + srqt acos ! +/- * e cos f sin ^ ! /

there isn't any limit to the number of possible calculations based on a given number.


Myth 42 needs your help!

Post 14

manda1111

I knew that smiley - winkeye

manda smiley - magic


Myth 42 needs your help!

Post 15

DoctorMO (Keeper of the Computer, Guru, Community Artist)

The theory of numbers tells my brain that it must be finite, just because it's realy realy big, dosn't make it infinite. a finite number of operations plus a finite number with finite length.

It would probly take an age to program anyway. smiley - winkeye

P.S, Potholer, I userstud your post completly smiley - laugh

-- DoctorMO --


Myth 42 needs your help!

Post 16

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

But as I've already pointed out, the original assertion is false, as there are some user numbers which are too small to generate a "42" from by any means... Of course no-one ever listens to me. Here I am, brain the size of a planet... smiley - steam


Myth 42 needs your help!

Post 17

DoctorMO (Keeper of the Computer, Guru, Community Artist)

There just being stuborn smiley - laugh


Myth 42 needs your help!

Post 18

Potholer

If only binary operators were allowed, the potential calculations (formulas?) per usernumber would be finite, since each operator would be a net 'consumer' of one operand, and one only starts with a (current) maximum of 6, but with unary operators like !,sqrt,and trig functions, there isn't any linmit to the length of a single formula if formulas of the form

a!!!! + sqrt(sqrt(cos(cos(b)))) + ...

are allowed. If multiple successive unary operators are banned, then the potential number of formulas is finite.


Myth 42 needs your help!

Post 19

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)


I thought the plural of "formula" was "formulae"... smiley - erm


Myth 42 needs your help!

Post 20

26199

As it happens I've already written a program which does (nearly) that... I'll see if I can adapt it.


Key: Complain about this post

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more