Re: Walking on integers
From: Phil Carmody (thefatphil_demunged_at_yahoo.co.uk)
Date: 11/02/04
- Next message: Charlie-Boo: "Re: (Not quite) Cantor's diagonal proof"
- Previous message: Mitch Harris: "Re: Walking on integers"
- In reply to: Glen Able: "Walking on integers"
- Next in thread: stephen_at_nomail.com: "Re: Walking on integers"
- Messages sorted by: [ date ] [ thread ]
Date: 02 Nov 2004 16:01:57 +0200
"Glen Able" <smDELETEecklers@hotmTHISail.com> writes:
> Not sure if this is a known problem, or something that mutated out of known
> problems in my head...
>
> Start with some integer and repeatedly choose steps of either +1 or -1.
> Stop when you reach some randomly chosen (and, obviously, unknown to you)
> integer. What strategy would minimise the no. steps taken?
It's impossible to answer unless we know with what distribution function
the target was chosen. However, I assume that it will be sign-symmetric
and some kind of bell-shaped curve.
With that in mind, I think you could do a lot worse than chosing a value
v (which will depend on the distribution, if it's a narrow bell curve,
then make v small, if it's a flat and broad bell curve, then make v
larger), and zig-zag as follows
0 -> v -> -2v -> 4v -> -8v ->16v -> -32v ...
To cover [-v, v] requires 3v steps.
To cover [-2v, 2v] requires 8v steps.
To cover [-4v, 4v] requires 18v steps.
To cover [-8v, 8v] requires 38v steps
For very flat distributions, then you probably want to reduce the quantity
of zig-zagging, and therefore could chose a path as follows
0 -> v -> -v^2 -> v^3 -> -v^4
Phil
-- They no longer do my traditional winks tournament lunch - liver and bacon. It's just what you need during a winks tournament lunchtime to replace lost ... liver. -- Anthony Horton, 2004/08/27 at the Cambridge 'Long Vac.'
- Next message: Charlie-Boo: "Re: (Not quite) Cantor's diagonal proof"
- Previous message: Mitch Harris: "Re: Walking on integers"
- In reply to: Glen Able: "Walking on integers"
- Next in thread: stephen_at_nomail.com: "Re: Walking on integers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|