All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Making a Multiple of Four (Posted on 2014-04-30) Difficulty: 3 of 5
I want to make a multiple of four in a curious way: First I choose a random integer 1 to 4, each equally likely. If I get the '4', I stop immediately and that is my number. As long as I do not have a multiple of four, I continue to choose more random integers 1 to 4, keeping track of the running total. When the running total is a multiple of four, then I stop.

What is the expected number of random integers I need to get my multiple of four and what is the expected value of the running total?

Variation: The first random integer is the same, but the second and subsequent integers are equal to, one less, or one more than the previous integer. (If the previous random integer was 3, then I would choose one of 2, 3, or 4.)

In this case what is the expected number of integers needed and what is the expected total?

No Solution Yet Submitted by Brian Smith    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Not so simple | Comment 2 of 6 |
Part 1)

I agree that the expected number of turns is 4.

But I think that the calculation of the expected total is going to require a computer program.  It is not just 2.5 * expected number of turns, although it is probably close.

One pick suffices with probability 1/4.  The total is 4, which happens to be 4 times the number of turns.

It takes two picks with probability 3/16.  The total is 4, which is 2 times the number of turns.

It takes 3 picks with probability 9/64.  This can occur in 9 different ways, 3 of which give a total of 4, and 6 of which are a total of 8, so the expected total if finishing in three turns is 20/3, which is 20/9 (2.2222..) per turn.

I can think of a couple of ways of approximating the expected total, none of them simple.  Stay tuned for a follow up.

Part II) I assume that we get into negative numbers.
A multiple of 4, for instance, can be achieved as 1 + 0 + (-1).

Both of these are interesting random walks.  

  Posted by Steve Herman on 2014-04-30 10:56:42
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2019 by Animus Pactum Consulting. All rights reserved. Privacy Information