

If a mathematician wants to cross a road - robdoherty2
http://blog.matthen.com/post/50908501869/if-a-mathematician-wants-to-cross-a-road-they

======
mrmaddog
I really like how the code + images enhance the post, but I think this model
is a little simplistic for how analytical minds actually cross roads. The post
assumes that my discomfort level is a constant, but in reality I become more
comfortable the further across the road I've walked (as I become more
confident that I'm not going to be flattened by a car). This leads to a
smoothed curve on the latter half of the street.

Does Fermat's principle allow for variable refractions?

~~~
btilly
_Does Fermat's principle allow for variable refractions?_

Yes, and a common example is how light from the sky can bend to run through a
layer of hot air right over hot sand, causing a mirage.

However Fermat's principle is a local rule. That is, there should be no way to
improve the path by adjusting it a little bit, but it might not be a global
minimum. The classic example demonstrating this is a mirror. The light
bouncing off the mirror often had a shorter path available (just go directly
there), but there was no local variant of the path which was better than the
one that it took.

Fermat's principle holds for different things for different reasons. For
instance light follows the principle because of how the wave front expands.
Ants follow the principle because ants that followed a faster path tend to lay
a fresher scent trail. But my other comments remain true regardless of why it
holds for any particular type of thing.

------
stephencanon
So my friend’s grandfather was hit by a car while jaywalking. His widow, who
was in operations research said: “he died of premature optimization."

------
JDGM
I think that by writing the article this way around (crossing the road ->
refraction of light in glass) the author has rather unfortunately invited the
kind of criticisms in this thread, that his "model is flawed" etc.

As a contrived scenario to help more intuitively understand refraction, it's
nice, and I think that was what he was going for. It's how I read it.

------
leephillips
Not only mathematicians, but ants:

[http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjourna...](http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0059739)

------
MereInterest
There was a similar problem involving a dog attempting to get to a thrown ball
into a lake. The dog wants to minimize its time to the ball, but has a slower
swimming speed than running speed.

<http://www.maa.org/features/elvisdog.pdf>

~~~
YokoZar
My high school math teacher once asserted that, if you try this
experimentally, the dog will in fact take something very close to the optimal
path. Therefore, he said, dogs can do calculus.

~~~
jacquesm
Watch a toddler intercept a ball thrown along a parabolic trajectory. Toddlers
can do calculus too!

------
Cogito
I think this model is flawed.

It tries to boil the problem down to a 'discomfort' level, where what really
matters is how long I think I can comfortably stay on the road, how fast I can
cross the road, and how long I expect to wait to cross the road.

Let's assume all sections of the road are equally good for crossing (no
pedestrian crossings etc). The road will then have a 'maximum angle of attack'
which is a function of how fast I am travelling and how long I can stay on the
road. I will walk in roughly the same pattern as in the link HOWEVER I will
never cross at an angle greater than the maximum and I will potentially cross
earlier or later depending on gaps in the traffic; it's faster to keep walking
then to wait for a gap in traffic.

The main shortcoming in the model is that there is no upper limit on the angle
of attack, and so it is easy to find example situations that are unrealistic.

~~~
raverbashing
> I think this model is flawed.

Because you're thinking "physics like" not "math like"

In physics, yes, you have the refraction factor, etc, and this calculation
works.

But it also works (from the math point of view) saying that light will take
the path that takes the least amount of time for it to cross between two
points.

~~~
Cogito
I'm not sure what you are trying to say here.

Light will travel in the fastest way possible under a certain set of well
known constraints. I think trying to apply this same model to how
'mathematicians' cross the road is flawed, although it is a good approximation
when the start and end point are not displaced too far along the road.

As a simple counter example, think of a laser pointing along the length of a
very long piece of glass. If you angle the laser slightly down, so that it
hits the glass at a very small angle of attack, the laser will travel for a
long distance inside the glass before exiting. It will not travel straight
through the glass, but neither will it 'cross' to the other side very quickly.
Regardless of the difference in the refractive index of the air and glass, you
can always point the laser at an angle that causes the laser beam to travel
for an arbitrary length of time in the glass.

Compare this to a mathematician walking along a very long highway. The time
they will take to cross the road is NOT dependent on JUST how far they are
walking. If it has heavy traffic then they will cross just as soon as their is
a suitable gap. Extending the length of their journey (equivalent to
decreasing the angle of attack for the laser) does not continue to increase
the time they take crossing the road unboundedly.

The model is flawed for this obvious counter example, but it is flawed in
simpler situations as well, mostly because the reality is that every section
of road and every moment in time are not as ideal as each other for crossing
the road.

~~~
raverbashing
Yes, it doesn't work for a road analogy, especially a "real road" one

------
freefrag
Actually some "real" results in Mathematics use the laziness of light. For
example
[http://en.wikipedia.org/wiki/Brachistochrone_curve#Johann_Be...](http://en.wikipedia.org/wiki/Brachistochrone_curve#Johann_Bernoulli.27s_solution)

------
d23
Does the angle of the crossing change as the distance between the two points
gets larger? I'm curious because this seems to mimic the way most of us cross
if we're not at a crosswalk (i.e. slightly toward the destination, but mostly
perpendicular to the road), but that doesn't really change if the destination
is a lot longer down the road. All things equal, you still won't want to spend
that long in the road.

------
praptak
The edge case of this problem where the ratio is infinity, i.e. you want the
crossing perpendicular to the street/river edges makes a nice kids math
puzzle. It's usually formulated as "place a bridge over river so that the road
between two houses is the shortest".

------
gprasant
I remember listening to a lecture on quantum mechanics which said by suitably
exciting your molecules, you would be able to walk through walls. I imagine we
could take the shortest path, walking 'through' the traffic if this were
possible

------
Kurtz79
I would say that this is how most people would instinctively cross a road (a
low traffic road with no crossing and with one's destination along the road on
the other side, as in the model). A mathematician tries to find a proof for it
:)

------
Falling3
I've always thought very carefully about my paths' efficiency (despite not
being a mathematician). I walk in a similar way except I'm okay with spending
more time in the street.

------
Tycho
If you're crossing the road and there's traffic coming, should you walk
diagonally away from the oncoming cars, or walk straight across (perpandicular
to the pavement)?

~~~
benjoffe
<http://en.wikipedia.org/wiki/Negative_index_metamaterials>

------
santigepigon
I do remember my high school physics teacher mentioning this during optics...
he used an example of the most optimal path for a lifeguard.

------
abcd_f
Wasn't this a standard math quiz puzzle in a high school? Except it was
phrased in terms of a horseback rider needing to cross a river.

------
vacri
Unlike the mathematician, the light doesn't know where the other side of the
glass is. There's no guarantee that it's 'taking the shorter path' - for
example, light hitting the edge of a glass cube that refracts into the cube
will be taking a longer path than not refracting in the first place.

Not that light could have a motive anyway, but this strikes me as more of a
passing fancy than a rationale.

~~~
jblow
You may want to read up further on Fermat's principle.

Your response is a little bit ill-formed because Fermat's principle is about
the time to travel between two points. You assert that light is not "taking
the shorter path", but in doing so you are changing the destination point or
else leaving it undefined. Instead, pick a start point, pick an end point, and
see how light travels between those two points, with respect to your cube of
glass.

~~~
yen223
> "... but in doing so you are changing the destination point or else leaving
> it undefined."

That's kind of the point I think, because photons don't 'pick' a destination
point before travelling.

~~~
jblow
From the perspective of their own frame, photons don't travel. They are
everywhere along their path at once. From our perspective, a photon goes
through A first, then B. From the photon's perspective, that is not how it is.

So the concept of a photon 'picking' a destination point, or not, is mired in
an assumption that isn't true (that there would even be anything to pick).

