I designed the original tariffing engine for Oyster back in 2003/4. Compared to similar work I did for cellphone operators this was interesting in that Oyster actively seek to charge the lowest amount possible. The engine is pretty simple in that it does a shortest-path (£-based) determination between start and end stations. The trick was dealing with trips where a weekly or monthly travel card covers part of the route, and pay-as-you-go the rest. There are other edge cases that cannot be handled at all - having a travel card for, say, a trip through zones 1 and 2, and a pre-purchased ticket for zones 3 and 4 for a trip from zone 2 to 4.