[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Proposal for next week's ruby quiz

Daniel Amelang

7/17/2005 4:06:00 AM

So, let's make next week's quiz an exploration of this whole 'what is
random' and 'what is a fair solution' question (see the [QUIZ]
Sampling (#39) thread for details):

Next week's quiz: Random Sample Test

Input: 9 output files from this current quiz. 3 from each of the top 3
fastest algorithms.
Output: The 9 output files grouped by which algorithm produced it.

If the outputs were truly random, noone should be able to determine
which program it came from (barring good luck). Oh, and we better drop
the size of the output files so we don't need to download a several
megabytes long file for our input. In addition, it would be better if
the top performers didn't reveal their source code at the end of this
quiz.

James: if you want to do this, you better send out an annoucment so
people won't post their solutions if they want to be 'tested' for
randomness.

What do you guys think?

Dan


4 Answers

Paolo Capriotti

7/17/2005 7:34:00 AM

0

On 7/17/05, Daniel Amelang <daniel.amelang@gmail.com> wrote:
>
> What do you guys think?
>

I think that 3 samples are clearly not enough to determine the
distribution, not even for a 2/4 sample. To get a reasonable number of
samples needed, I suggest to use Berry-Essen estimates. I don't have
much time to do the computation, right now, but maybe later I will
try.

Paolo


Lyndon Samson

7/17/2005 9:00:00 AM

0

A related and somewhat interesting quiz would be to write a program
that generated programs that generated a particular output. Shortest
program being the optimal. Although you could go by run time.

Simple contrived example

Output
1010

Program
puts "puts '1010'"


James Gray

7/17/2005 3:35:00 PM

0

On Jul 16, 2005, at 11:05 PM, Daniel Amelang wrote:

> So, let's make next week's quiz an exploration of this whole 'what is
> random' and 'what is a fair solution' question (see the [QUIZ]
> Sampling (#39) thread for details):
>
> Next week's quiz: Random Sample Test
>
> Input: 9 output files from this current quiz. 3 from each of the top 3
> fastest algorithms.
> Output: The 9 output files grouped by which algorithm produced it.
>
> If the outputs were truly random, noone should be able to determine
> which program it came from (barring good luck). Oh, and we better drop
> the size of the output files so we don't need to download a several
> megabytes long file for our input. In addition, it would be better if
> the top performers didn't reveal their source code at the end of this
> quiz.
>
> James: if you want to do this, you better send out an annoucment so
> people won't post their solutions if they want to be 'tested' for
> randomness.
>
> What do you guys think?

If people are interested in this, don't let me stop you. However,
I've already chosen next week's quiz.

Thanks for the idea though.

James Edward Gray II



Olaf Klischat

7/18/2005 11:46:00 AM

0

How about the same quiz again, but this time with the additional
requirement that the program have O(1) memory complexity and thus be
scalable to members/limits of virtually any size (while still
producing really random outputs)?

That would make for an interesting challenge, although I suspect the
solution will have less to do with Ruby and more with mathematics :)