wu :: forums
« wu :: forums - The robot and the coins »

Welcome, Guest. Please Login or Register.
Nov 26th, 2024, 10:43am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   easy
(Moderators: william wu, towr, ThudnBlunder, Eigenray, Icarus, Grimbal, SMQ)
   The robot and the coins
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: The robot and the coins  (Read 775 times)
BNC
Uberpuzzler
*****





   


Gender: male
Posts: 1732
The robot and the coins  
« on: Oct 21st, 2003, 9:17am »
Quote Quote Modify Modify

In a room there are many coins on the floor (assume a very large number). They display either "heads" or "tails" randomally.
 
A robot enters the room. It walks around randomaly, and is programed as follows:
- If it sees a coin diplaying "heads" it will turn it over to display "tails".
- If it sees a coin displaying "tails", it will flip the coin (all coins are fair).
 
After a long enough time, will the ratio of heads to tails converge? If no, why? And if yes, to what value?
IP Logged

How about supercalifragilisticexpialidociouspuzzler [Towr, 2007]
aero_guy
Senior Riddler
****





   
Email

Gender: male
Posts: 513
Re: The robot and the coins  
« Reply #1 on: Oct 21st, 2003, 9:36am »
Quote Quote Modify Modify

If we take an simplified version of the riddle and say there are C coins with t0=.5*C where t is the number of tails and the subscript is a pass through all of the coins.  Lets make this simplified version say that the robot goes through all coins once and then repeats himself.

thus, tn=C-tn-1+.5*tn-1
 
or
 
tn=C-.5*tn-1

Now to check to see the convergence of series.. man has that been a long time.
IP Logged
James Fingas
Uberpuzzler
*****





   
Email

Gender: male
Posts: 949
Re: The robot and the coins  
« Reply #2 on: Oct 21st, 2003, 9:43am »
Quote Quote Modify Modify

Sounds like the robot will just get stuck on the first coin it finds ...
 
"A head, eh? Better turn 'er over ... okay, now it's a tail. Time to flip it ... still a tail; flip it again ..."
IP Logged

Doc, I'm addicted to advice! What should I do?
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: The robot and the coins  
« Reply #3 on: Oct 21st, 2003, 9:46am »
Quote Quote Modify Modify

Well, it will converge.. But I don't know whereto.. something like 0.5 +-0.1
 
on Oct 21st, 2003, 9:43am, James Fingas wrote:
"A head, eh?
A canadian robot ? Wink
« Last Edit: Oct 21st, 2003, 9:48am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
aero_guy
Senior Riddler
****





   
Email

Gender: male
Posts: 513
Re: The robot and the coins  
« Reply #4 on: Oct 21st, 2003, 9:48am »
Quote Quote Modify Modify

With the idea of passing over all coins in series I finally figured out how to find the limit... and of course feel stupid I forgot how.
 
So, the series method converges to 2/3 tails.  I am not sure how confiident we can be that this expands to the general solution.
IP Logged
ThudnBlunder
wu::riddles Moderator
Uberpuzzler
*****




The dewdrop slides into the shining Sea

   


Gender: male
Posts: 4489
Re: The robot and the coins  
« Reply #5 on: Oct 21st, 2003, 10:15am »
Quote Quote Modify Modify

on Oct 21st, 2003, 9:43am, James Fingas wrote:

"A head, eh? Better turn 'er over ... okay, now it's a tail. Time to flip it ... still a tail; flip it again ..."

Yeah right, assuming multiple operations on the same coin. However, the other interpretation is more interesting and must surely be the intended one. That is, we move from coin to coin.  
:
We can model it as a differential equation:  
 
Let the initial number of heads in the room be H  
Let the initial number of tails in the room be T  
 
Then  
dH/dt = (T/2)/(T+H)  
dT/dt = (T/2 + H)/(T+H)  
 
Giving dT/dH = 2(H/T) + 1  
 
I can't remember offhand how to solve this.  Embarassed  Integrating factor perhaps?  
Or am I using a sledgehammer to crack a nut?

on Oct 21st, 2003, 9:46am, towr wrote:

A canadian robot ? Wink

 Grin
 
« Last Edit: Oct 21st, 2003, 11:30am by ThudnBlunder » IP Logged

THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: The robot and the coins  
« Reply #6 on: Oct 21st, 2003, 10:16am »
Quote Quote Modify Modify

::If the series converges, then both processes that cause change will have to be in equilibrium, so
ph (chance of loosing a head) must equal (1-ph)/2 (chance of gaining a head)
so ph = 1/3, and the ratio ph/pt =1/2
::
« Last Edit: Oct 21st, 2003, 10:20am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
ThudnBlunder
wu::riddles Moderator
Uberpuzzler
*****




The dewdrop slides into the shining Sea

   


Gender: male
Posts: 4489
Re: The robot and the coins  
« Reply #7 on: Oct 21st, 2003, 10:28am »
Quote Quote Modify Modify

Quote:
If the series converges,

All you have to do now is prove that it does converge.  Wink
« Last Edit: Oct 21st, 2003, 11:31am by ThudnBlunder » IP Logged

THE MEEK SHALL INHERIT THE EARTH.....................................................................er, if that's all right with the rest of you.
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: The robot and the coins  
« Reply #8 on: Oct 21st, 2003, 10:58am »
Quote Quote Modify Modify

That's easy enough to show, since there are two processes that work against each other, and they get stronger as the result of the other grows..
 
More notably, for ph < 1/3 the probability we gain a head (and loose a tail) is greater than the reverse
and for ph > 1/3 vice versa.
 
Or you could just run a simulation and see that it converges Tongue
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
aero_guy
Senior Riddler
****





   
Email

Gender: male
Posts: 513
Re: The robot and the coins  
« Reply #9 on: Oct 21st, 2003, 11:21am »
Quote Quote Modify Modify

Excellent, then the series method is indicitave of the larger problem.  I guess it would be the discritized version.
 
It actually converges pretty quickly too.
« Last Edit: Oct 21st, 2003, 11:22am by aero_guy » IP Logged
TimMann
Senior Riddler
****






   
WWW

Gender: male
Posts: 330
Re: The robot and the coins  
« Reply #10 on: Oct 23rd, 2003, 10:37pm »
Quote Quote Modify Modify

I did this one by looking at the flipping of each coin as a Markov process, with transition matrix:
 
  1/2  1
  1/2  0
 
We then want the steady-state vector. The answer will be an eigenvector of this matrix with eigenvalue 1, normalized to have components summing to 1, i.e.:
 
  1/3   //heads
  2/3   //tails
 
The coins don't interact with each other at all, so the probability of any coin being a head in the long run is the same as the expected proportion of heads among all the coins. The number of coins doesn't matter.
IP Logged

http://tim-mann.org/
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