wu :: forums
« wu :: forums - Randomly Orring »

Welcome, Guest. Please Login or Register.
Nov 25th, 2024, 4:48am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: Grimbal, ThudnBlunder, Icarus, SMQ, william wu, towr, Eigenray)
   Randomly Orring
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Randomly Orring  (Read 445 times)
k2xl
Newbie
*






  kiggyd12345   scratchfromstart
Email

Posts: 17
Randomly Orring  
« on: Feb 18th, 2008, 10:33am »
Quote Quote Modify Modify

This is a simple riddle (in terms of a question).
 
You have N bits (or an array of size N) Assume all the bits (or elements in the array) are set to 0.
 
You have created a function called Step that will OR a random bit (or element) with 1.  This means that if the element or bit is 1 it will stay 1, and if it is 0 it will turn into 1.
 
How many calls to Step will it take to fill up all the bits with 1's (or how many steps will it take to fill up the array with 1's)?
 
*Note: Prove your answer by showing values for the first few N values
« Last Edit: Feb 18th, 2008, 11:13am by k2xl » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Randomly Orring  
« Reply #1 on: Feb 18th, 2008, 11:10am »
Quote Quote Modify Modify

I'd guess N/N + N/(N-1) + N/(N-2) + ...  + N/1
Not quite sure, though..
« Last Edit: Feb 18th, 2008, 11:10am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
rmsgrey
Uberpuzzler
*****





134688278 134688278   rmsgrey   rmsgrey


Gender: male
Posts: 2873
Re: Randomly Orring  
« Reply #2 on: Feb 18th, 2008, 1:10pm »
Quote Quote Modify Modify

on Feb 18th, 2008, 11:10am, towr wrote:
I'd guess N/N + N/(N-1) + N/(N-2) + ...  + N/1
Not quite sure, though..

That's what I get too, using the fact that each transition time is independent of the previous transition times.
IP Logged
Eigenray
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 1948
Re: Randomly Orring  
« Reply #3 on: Feb 18th, 2008, 6:48pm »
Quote Quote Modify Modify

This is a classic problem.
IP Logged
ThudnBlunder
wu::riddles Moderator
Uberpuzzler
*****




The dewdrop slides into the shining Sea

   


Gender: male
Posts: 4489
Re: Randomly Orring  
« Reply #4 on: Feb 18th, 2008, 7:40pm »
Quote Quote Modify Modify

http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_eas y;action=display;num=1074795531;
IP Logged

THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board