Proposal for next week's ruby quiz

D

Daniel Amelang

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
 
P

Paolo Capriotti

=20
What do you guys think?
=20

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
 
L

Lyndon Samson

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'"
 
J

James Edward Gray II

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
 
O

Olaf Klischat

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 :)
 
J

Joe Van Dyk

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)?
=20
That would make for an interesting challenge, although I suspect the
solution will have less to do with Ruby and more with mathematics :)

I'd be more interested in quizzes that weren't heavily math related,
as I've literally forgot all math beyond basic algebra.
 
J

James Edward Gray II

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 :)

Solutions like this were provided. Where's yours? ;)

James Edward Gray II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,175
Messages
2,570,946
Members
47,498
Latest member
yelene6679

Latest Threads

Top