Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Longest "why" answer: why(248418)

Subject: Longest "why" answer: why(248418)

From: enrique.vidal.sanchez@gmail.com

Date: 3 Mar, 2008 10:09:35

Message: 1 of 19

Hi,

It is certainly not important but I am just curious to know which is
the longest "why" answer you've got from Matlab.

I have run all the possibilities from 1 to 1 million and the longest
answer I get is "why(248418)", a 217 words sentence:

Some not excessively good and rich and rich and good and very good and
rich and tall and not excessively tall and rich and good and smart and
not excessively good and terrified and terrified and tall and not
excessively good and not excessively young and young and terrified and
smart and bald and not excessively good and good and smart and not
excessively tall and bald and rich and bald and tall and rich and good
and young and terrified and very young and terrified and good and not
very bald and good and tall and tall and very bald and not excessively
rich and bald and bald and very tall and very rich and good and very
tall and good and terrified and tall and very tall and good and young
and very bald and rich and good and bald and not excessively rich and
bald and not very rich and tall and very smart and tall and terrified
and not excessively young and not excessively tall and very bald and
rich and young and tall and not very terrified and smart and rich and
young and terrified and terrified and rich and smart and tall and
terrified and young and rich and tall and terrified and smart engineer
knew it was a good idea.

The function "why" resets the random generator to rand('state',n)
where "n" in the above case is 248418, so you should be able to get
the same answer. The "why" version I have used is: Revision: 5.15.

You are welcome to post a longer answer but please indicate the state
which the random generator has been reset to.

Regards,
Enrique

Subject: Longest "why" answer: why(248418)

From: marky

Date: 5 Mar, 2008 14:07:48

Message: 2 of 19


> You are welcome to post a longer answer but please indicate the state
> which the random generator has been reset to.

Between 1 and 1e9 the longest is

 >> why(752676551)
To fool a not very smart rich and not excessively tall and not very terrified and young and smart and young and smart and terrified and tall and smart and smart and young
and tall and not very bald and good and very rich and rich and not very good and smart and young and not excessively bald and young and not excessively good and bald and
not excessively bald and young and bald and good and terrified and smart and bald and good and bald and smart and not very good and smart and smart and very good and smart
and good and tall and good and tall and very young and bald and terrified and terrified and not excessively tall and rich and bald and not very rich and not very rich and
not very good and not very rich and good and smart and good and terrified and not excessively young and young and rich and terrified and very young and smart and young and
tall and terrified and tall and young and bald and not excessively tall and rich and rich and not very bald and bald and tall and young and bald and young and smart and
terrified and not excessively tall and young and terrified and rich and not excessively tall and rich and smart and very terrified and very good and smart and not very tall
and smart and rich and bald and not excessively terrified and not very rich and terrified and good and terrified and bald and terrified and tall and rich and not
excessively terrified and smart and young and not very terrified and smart and rich and not excessively good and smart and terrified and not excessively rich and tall and
smart and not excessively tall hamster.
 >>

with 298 words.

Subject: Longest

From: Paul

Date: 5 Mar, 2008 14:59:02

Message: 3 of 19

marky <no@email.com> wrote in message
<fqm9fc$bln$1@news.oulu.fi>...
>
> > You are welcome to post a longer answer but please
indicate the state
> > which the random generator has been reset to.
>
> Between 1 and 1e9 the longest is
>
> >> why(752676551)
> To fool a not very smart rich and not excessively tall and
not very terrified and young and smart and young and smart
and terrified and tall and smart and smart and young
> and tall and not very bald and good and very rich and rich
and not very good and smart and young and not excessively
bald and young and not excessively good and bald and
> not excessively bald and young and bald and good and
terrified and smart and bald and good and bald and smart and
not very good and smart and smart and very good and smart
> and good and tall and good and tall and very young and
bald and terrified and terrified and not excessively tall
and rich and bald and not very rich and not very rich and
> not very good and not very rich and good and smart and
good and terrified and not excessively young and young and
rich and terrified and very young and smart and young and
> tall and terrified and tall and young and bald and not
excessively tall and rich and rich and not very bald and
bald and tall and young and bald and young and smart and
> terrified and not excessively tall and young and terrified
and rich and not excessively tall and rich and smart and
very terrified and very good and smart and not very tall
> and smart and rich and bald and not excessively terrified
and not very rich and terrified and good and terrified and
bald and terrified and tall and rich and not
> excessively terrified and smart and young and not very
terrified and smart and rich and not excessively good and
smart and terrified and not excessively rich and tall and
> smart and not excessively tall hamster.
> >>
>
> with 298 words.

you guys have a lot of free time!

Subject: Longest

From: Steve Amphlett

Date: 5 Mar, 2008 15:31:03

Message: 4 of 19

<snip, why oh why?...

>
> you guys have a lot of free time!
>

Obviously not as much time as the developer of that m-file.

Subject: Longest "why" answer: why(248418)

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 5 Mar, 2008 21:02:21

Message: 5 of 19

In article <fqm9fc$bln$1@news.oulu.fi>, marky <no@email.com> wrote:
>
>> You are welcome to post a longer answer but please indicate the state
>> which the random generator has been reset to.

>Between 1 and 1e9 the longest is

> >> why(752676551)

All answers from 2^32 onward (4294967296) are the same,

Barney obeyed the young mathematician.


The longest I have found so far working upwards from 10^9 is
why(1057432941), 1272 characters. This is shorter than the previously
presented best:


To fool some terrified and bald and not very good and not excessively
terrified and bald and not very smart and bald and bald and young and
rich and not excessively young and good and young and rich and tall and
good and smart and bald and smart and smart and very bald and rich and
bald and not very young and good and not very good and not very good
and not very terrified and rich and rich and bald and very terrified
and tall and tall and tall and terrified and terrified and bald and
terrified and bald and smart and young and good and tall and good and
bald and terrified and tall and terrified and tall and good and rich
and not excessively terrified and tall and tall and young and smart and
very smart and young and rich and terrified and very young and not very
tall and good and young and smart and terrified and bald and terrified
and bald and rich and smart and terrified and very tall and rich and
rich and very terrified and young and young and rich and bald and not
excessively bald and tall and smart and good and not excessively tall
and rich and rich and not excessively tall and very young and smart and
good and not very young and young and not excessively bald and good and
good and good and very smart and very tall and bald and terrified
engineer.

--
  "No sincere artist was ever completely satisfied with his labour."
                                              -- Walter J. Phillips

Subject: Longest

From: Tim Davis

Date: 6 Mar, 2008 02:19:03

Message: 6 of 19

I like why(42) which gives:

To satisfy the tall and good not excessively terrified
mathematician.

... at 6'2", and if you defined "not terrified at all" to be
one possible case of "not excessively terrified" then I'm 3
for 3 ...

So does that make me the Answer ... ?

;-)

Subject: Longest "why" answer: why(248418)

From: enrique.vidal.sanchez@gmail.com

Date: 6 Mar, 2008 09:02:12

Message: 7 of 19

On 5 Mar, 22:02, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote:
> In article <fqm9fc$bl...@news.oulu.fi>, marky =A0<n...@email.com> wrote:
>
> >> You are welcome to post a longer answer but please indicate the state
> >> which the random generator has been reset to.
> >Between 1 and 1e9 thelongestis
> > >> why(752676551)
>
> All answers from 2^32 onward (4294967296) are the same,
>
> Barney obeyed the young mathematician.
>
> ThelongestI have found so far working upwards from 10^9 is
> why(1057432941), 1272 characters. This is shorter than the previously
> presented best:
>
> To fool some terrified and bald and not very good and not excessively
> terrified and bald and not very smart and bald and bald and young and
> rich and not excessively young and good and young and rich and tall and
> good and smart and bald and smart and smart and very bald and rich and
> bald and not very young and good and not very good and not very good
> and not very terrified and rich and rich and bald and very terrified
> and tall and tall and tall and terrified and terrified and bald and
> terrified and bald and smart and young and good and tall and good and
> bald and terrified and tall and terrified and tall and good and rich
> and not excessively terrified and tall and tall and young and smart and
> very smart and young and rich and terrified and very young and not very
> tall and good and young and smart and terrified and bald and terrified
> and bald and rich and smart and terrified and very tall and rich and
> rich and very terrified and young and young and rich and bald and not
> excessively bald and tall and smart and good and not excessively tall
> and rich and rich and not excessively tall and very young and smart and
> good and not very young and young and not excessively bald and good and
> good and good and very smart and very tall and bald and terrified
> engineer.
>
> --
> =A0 "No sincere artist was ever completely satisfied with his labour."
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 -- Walter J. Phillips

Interesting. Which "why" gives the largest amount of words starting
from 10^9?

Subject: Longest

From: enrique.vidal.sanchez@gmail.com

Date: 6 Mar, 2008 09:03:40

Message: 8 of 19

On 5 Mar, 16:31, "Steve Amphlett" <Firstname.Lastn...@Where-I-
Work.com> wrote:
> <snip, why oh why?...
>
>
>
> > you guys have a lot of free time! =A0
>
> Obviously not as much time as the developer of that m-file.

The funny thing is that the developer got paid for it! :o)

Subject: Longest "why" answer: why(248418)

From: enrique.vidal.sanchez@gmail.com

Date: 6 Mar, 2008 09:05:26

Message: 9 of 19

On 5 Mar, 15:07, marky <n...@email.com> wrote:
> > You are welcome to post a longer answer but please indicate the state
> > which the random generator has been reset to.
>
> Between 1 and 1e9 thelongestis
>
> =A0>> why(752676551)
> To fool a not very smart rich and not excessively tall and not very terrif=
ied and young and smart and young and smart and terrified and tall and smart=
 and smart and young
> and tall and not very bald and good and very rich and rich and not very go=
od and smart and young and not excessively bald and young and not excessivel=
y good and bald and
> not excessively bald and young and bald and good and terrified and smart a=
nd bald and good and bald and smart and not very good and smart and smart an=
d very good and smart
> and good and tall and good and tall and very young and bald and terrified =
and terrified and not excessively tall and rich and bald and not very rich a=
nd not very rich and
> not very good and not very rich and good and smart and good and terrified =
and not excessively young and young and rich and terrified and very young an=
d smart and young and
> tall and terrified and tall and young and bald and not excessively tall an=
d rich and rich and not very bald and bald and tall and young and bald and y=
oung and smart and
> terrified and not excessively tall and young and terrified and rich and no=
t excessively tall and rich and smart and very terrified and very good and s=
mart and not very tall
> and smart and rich and bald and not excessively terrified and not very ric=
h and terrified and good and terrified and bald and terrified and tall and r=
ich and not
> excessively terrified and smart and young and not very terrified and smart=
 and rich and not excessively good and smart and terrified and not excessive=
ly rich and tall and
> smart and not excessively tall hamster.
> =A0>>
>
> with 298 words.

Nice! Certainly better than the largest "why" between 1 and 1e6.

Subject: Longest

From: Steve Amphlett

Date: 6 Mar, 2008 10:23:02

Message: 10 of 19

"Tim Davis" <davis@cise.ufl.edu> wrote in message
<fqnkan$dlt$1@fred.mathworks.com>...
> I like why(42) which gives:
>
> To satisfy the tall and good not excessively terrified
> mathematician.
>
> ... at 6'2", and if you defined "not terrified at all" to
be
> one possible case of "not excessively terrified" then I'm
3
> for 3 ...
>
> So does that make me the Answer ... ?
>
> ;-)

... this is heading back to that brilliant coincidence:

>> sum *

(Or was that a coincidence at all?)

Subject: Longest "why" answer: why(248418)

From: marky

Date: 6 Mar, 2008 12:15:39

Message: 11 of 19

Walter Roberson wrote:
> In article <fqm9fc$bln$1@news.oulu.fi>, marky <no@email.com> wrote:
>>> You are welcome to post a longer answer but please indicate the state
>>> which the random generator has been reset to.
>
>> Between 1 and 1e9 the longest is
>
>>>> why(752676551)
>
> All answers from 2^32 onward (4294967296) are the same,
>
> Barney obeyed the young mathematician.

So we can check them all then...? :-)

Since it's not my time but Intel Xeon's I just started the search
for max word and max character count between 1 and 2^32. The
~4*10e9 iterations were divided into four equal sized parts so
I expect it to finish again in couple of days.

Subject: Longest "why" answer: why(248418)

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 7 Mar, 2008 21:20:55

Message: 12 of 19

In article <fqm9fc$bln$1@news.oulu.fi>, marky <no@email.com> wrote:

>> You are welcome to post a longer answer but please indicate the state
>> which the random generator has been reset to.

>Between 1 and 1e9 the longest is
>
> >> why(752676551)

(With a length of 1571 characters.)

From 1E9 up to 2^32-1 (the point at which the answer becomes constant)
the longest is

why(1819119323) with a length of 1638 characters, 307 words

Because the smart hamster threatened a tall and young and tall and
tall and good and terrified and rich and terrified and smart and
tall and not very good and rich and rich and rich and not
excessively terrified and not very bald and terrified and smart and
good and bald and very smart and young and tall and very smart and
not excessively bald and not excessively smart and rich and not
excessively good and tall and terrified and tall and bald and not
excessively young and rich and tall and rich and bald and terrified
and tall and not very terrified and smart and smart and not
excessively young and terrified and smart and rich and terrified
and smart and bald and tall and smart and bald and rich and not
very terrified and not very tall and terrified and smart and bald
and not very terrified and smart and young and very young and young
and young and not very terrified and good and good and young and
rich and not excessively bald and not excessively good and good and
very young and good and good and rich and tall and tall and tall
and smart and very rich and bald and not very young and very rich
and young and terrified and bald and terrified and good and not
very good and bald and smart and rich and tall and bald and not
very terrified and not excessively terrified and not excessively
young and tall and terrified and young and smart and very terrified
and not excessively good and terrified and not very bald and very
bald and not excessively tall and good and rich and not excessively
tall and bald and young and tall and very tall and bald and tall
and very young and not excessively bald and smart smart
programmer.

--
  "No sincere artist was ever completely satisfied with his labour."
                                              -- Walter J. Phillips

Subject: Longest

From: us

Date: 7 Mar, 2008 21:30:36

Message: 13 of 19

roberson@ibd.nrc-cnrc.gc.ca and others:
<SNIP 307 words of why's why trash...

good to know...

us

Subject: Longest

From: Tim Davis

Date: 7 Mar, 2008 22:51:02

Message: 14 of 19

enrique.vidal.sanchez@gmail.com wrote in message ...
>
> The funny thing is that the developer got paid for it! :o)

I'd hazard a guess that Cleve Moler wrote it himself. I
might be wrong. If he did write it, then no one got paid
for it at all since the co-owner of The MathWorks wrote it
himself.

why ('not')? :-)

Subject: Longest

From: Loren Shure

Date: 10 Mar, 2008 11:55:55

Message: 15 of 19

In article <fqsgsm$3rn$1@fred.mathworks.com>, davis@cise.ufl.edu says...
> enrique.vidal.sanchez@gmail.com wrote in message ...
> >
> > The funny thing is that the developer got paid for it! :o)
>
> I'd hazard a guess that Cleve Moler wrote it himself. I
> might be wrong. If he did write it, then no one got paid
> for it at all since the co-owner of The MathWorks wrote it
> himself.
>
> why ('not')? :-)
>
>

Cleve is not the author of the current version of why. Don't know about
this, but don't owners get paid?

--
Loren
http://blogs.mathworks.com/loren/

Subject: Longest

From: Tim Davis

Date: 10 Mar, 2008 22:41:02

Message: 16 of 19

Loren Shure <loren@mathworks.com> wrote in message ...
> Cleve is not the author of the current version of why.
Don't know about
> this, but don't owners get paid?
>

I suppose, but then they would end up paying themselves from
one pocket to another, for a net of zero, I would suppose.
That's what I meant.

Of course, this whole thread might be summed up:

Charge of the Light Brigade (2nd stanza), Lord Tennyson:

"Forward, the Light Brigade!"
Was there a man dismay'd?
Not tho' the soldier knew
Someone had blunder'd:
Their's not to make reply,
Their's not to reason why,
Their's but to do and die:
Into the valley of Death
Rode the six hundred.

http://poetry.eserver.org/light-brigade.html

which here may be taken here as:

Forward, the MathWorker!
Was there a man page err?
Not tho' the coder threw,
Some "try" had caught it:
Their's not to post reply,
Their's not to recode "why",
Their's but to code and fly:
Into the CVS post,
Wrote ver 6 MATLAB.

or better yet, try why(393) :-)!

Subject: Longest "why" answer: why(248418)

From: marky

Date: 13 Mar, 2008 08:06:07

Message: 17 of 19

Walter Roberson wrote:
> In article <fqm9fc$bln$1@news.oulu.fi>, marky <no@email.com> wrote:
>
>>> You are welcome to post a longer answer but please indicate the state
>>> which the random generator has been reset to.
>
>> Between 1 and 1e9 the longest is
>>
>>>> why(752676551)
>
> (With a length of 1571 characters.)
>
> From 1E9 up to 2^32-1 (the point at which the answer becomes constant)
> the longest is
>
> why(1819119323) with a length of 1638 characters, 307 words

I get that too, but also 346 words and 1782 characters in why(3282186255):

Some rich and very smart and young and bald and very young and smart and bald and terrified and rich and terrified and very bald and smart and not very smart and terrified
and terrified and tall and smart and not very bald and bald and tall and smart and good and smart and good and rich and smart and young and very tall and young and not
excessively smart and terrified and terrified and not very young and bald and smart and bald and very rich and terrified and young and young and terrified and rich and
terrified and good and very tall and rich and not excessively young and terrified and young and not very tall and tall and bald and good and tall and smart and young and
good and rich and terrified and good and bald and terrified and very tall and tall and good and terrified and not excessively tall and not very bald and young and young and
not very good and smart and good and young and good and good and bald and not excessively young and smart and terrified and young and young and young and young and bald and
young and good and young and terrified and tall and rich and young and rich and very terrified and terrified and good and very terrified and young and bald and not very
good and smart and good and very good and young and young and terrified and young and young and young and terrified and rich and bald and young and good and bald and rich
and good and not excessively good and not very rich and young and very bald and young and terrified and terrified and good and rich and young and good and smart and not
very tall and good and terrified and very good and very rich and good and tall and good and rich and rich and smart and tall and good and bald and good and rich engineer
obeyed some smart and rich very good and not excessively good and bald hamster.

Subject: Longest

From: Lars Olav Vestland

Date: 13 Mar, 2008 11:05:04

Message: 18 of 19

i guess you a familiar with "spy", try to write spy in the
command window (just spy, nothing more)

lars

Subject: Longest "why" answer: why(248418)

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 13 Mar, 2008 16:03:59

Message: 19 of 19

In article <francv$pbd$1@news.oulu.fi>, marky <no@email.com> wrote:
>Walter Roberson wrote:

>> From 1E9 up to 2^32-1 (the point at which the answer becomes constant)
>> the longest is

>> why(1819119323) with a length of 1638 characters, 307 words

>I get that too, but also 346 words and 1782 characters in why(3282186255):

Hmmm, I don't know how I missed that one; I had one session counting
up and one counting down and stopped when the one counting down
output the why(1819119323) of counting up. Unless perhaps I didn't
read carefully enough and there was a length 1638 counting down.

Looking at your answer I see that my length count was off by one.
I was counting using M = evalc(sprintf('why(%d)',K)) but I see
now that evalc leaves a newline at the end.
--
Current spam load: 750-800 messages per day (March 4, 2008)

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us