Oystercard weekly capping
On Mon, 15 Aug 2005 17:43:02 +0100, Tom Anderson
wrote:
If you do want a perfect system, then the complexity of the system
increases dramatically - i'm not at all certain, but my gut feeling is
that the problem of figuring out the optimal combination of tickets to
cover arbitrary travel patterns is what computer scientists call
'NP-hard', which is their way of saying 'bloody hard'!
I don't think NP-complete-ness is really the problem - I think it's
really the one which you described in detail, i.e. due to the
overlapping validity of weekly travelcards, it's impossible to decide
at any given time what the cheapest combination of tickets will be
without knowing about all future travel.
To extend your example:
sun - spend day going round Z1
mon - stay at home
tue - spend day going round Z1
wed - spend day going round Z1
thu - spend day going round Z1 [cheapest: 7DTC starting Sun]
fri - spend day going round Z1
sat - spend day going round Z1
sun - spend day going round Z1
mon - spend day going round Z1 [cheapest now: 7DTC starting Tue]
tue - spend day going round Z1
wed - spend day going round Z1
thu - spend day going round Z1 [cheapest now: 2x7DTC starting Suns]
fri - spend day going round Z1
sat - spend day going round Z1
sun - spend day going round Z1
mon - spend day going round Z1 [cheapest now: 2x7DTC starting Tues]
tue - spend day going round Z1
wed - spend day going round Z1
thu - spend day going round Z1 [cheapest now: 3x7DTC starting Suns]
....and so forth. Thus the system could have to be constantly
rearranging the combination of tickets you have owned for a
potentially unlimited time into the past.
In fact a similar problem exists with 1 day travelcards, due to the
fact that the current and next day's travelcard are valid for an
overlapping period between 0000 and 0429. Daily capping gets around
this by making the "capping day" last only from 0430 to 0429 the next
day - so any travel between 0000 and 0429 is always counted towards
the "previous" day's cap (and thus there are scenarios where a paper
ODTC is actually cheaper).
In theory the same sort of thing could be done to allow weekly capping
- by making the weekly cap only apply from (say) Sunday to the
following Saturday. If you wanted a "7DTC" starting on any other day
you would still have to buy it in advance in the usual way.
|