Live data from Hacker News

Universal Method to Sort Complex Information Found

quantamagazine.org

41–50 of 68 posts

Re: Universal Method to Sort Complex Information Found

#41
post #26

> For example, “Manhattan” distance forces you to make 90-degree turns, as if you were walking on a street grid. Using Manhattan distance, a point 5 miles away as the crow flies might require you to go across town for 3 miles and then uptown another 4 miles. It's interesting that this is called Manhattan distance because it's only relevant in a town where everyone jaywalks... Like Manhattan. It's far from true anywhe…

The measure is concerned only with the distance traveled, not the time.

Re: Universal Method to Sort Complex Information Found

#42
post #10
post #5

Earlier quoted context omitted.

Incidentally, the zone system for the Danish public transit system is not a metric space. (The ticket you need from A to B is not necessarily the same as from B to A.) That's a kind of practical graph where you want efficient shortest path algorithms for.

Really?? Is that true only when there are multiple paths between A & B or is there something else involved?

For busses, the B stop on the way out may be in another zone as the B stop on the way back because they're geographically displaced. For busses and trains, depending on your type of ticket (2-8 zones, 8+ zones, commuter card) and whether the zone intersection is on or between stops/stations, you may have to pay for that zone one way but not the other. Those are edge cases.

But the most confusing part is the ring topology (here shown with the zone-ring center being the actual city center):

https://passagerpulsen.taenk.dk/sites/default/files/styles/f...

When buying 2-8 zones you don't pay for individual zones, but rather rings from your origin zone. Going one way, the zone rings look one way. Going back they look different, because the origin zone is different.

A practical example of this peculiarity:

You go from Hellerup (zone 2) to Friheden (zone 33) via the central station (zone 1). Your ring 0 is zone 2, and zone 1 and 33 are both in ring 1, so you only pay for two zone(-ring)s: https://dinoffentligetransport.dk/media/1413/svanemollen-fri...

You go back from Friheden to Hellerup via the central station: Your ring 0 is zone 33, zone 2 is in ring 1, but zone 1 is in ring 2 this time, so you pay for three zone(-ring)s: https://dinoffentligetransport.dk/media/1411/friheden-svanem...

Your origin zone on the way out was adjacent to both other zones needed (needing only 1 ring), but your origin zone on the way back was not (needing 2 rings).

So they're not just different prices: The graph that spans train stations via zones in the ring topology is not metric. So getting a return ticket is not the inverse of getting the ticket out. And while you have a ticket that's valid for the timespan of your return, it may not be valid for your return path.

Re: Universal Method to Sort Complex Information Found

#43

Earlier quoted context omitted.

It is illegal because the railway byelaws make it illegal. The railway doesn't just have its own law, it also has its own police force, The British Transport Police, though as far as I know they don't do the ticket enforcement. You are not allowed to break a journey either, so a ticket inspector can spot a ticket for a longer journey at one end of the other. The multiple tickets ruse is more of a grey area.

BREAK OF JOURNEY Rules vary by train company and route. In general you cannot break your outward journey (except for necessary changes of train) but you can break your return journey. Source: https://www.splityourticket.co.uk/info/fare-types.aspx I've already dealt with the legality of split ticketing in another post.

And how do they enforce it? Chain you to the train?

Re: Universal Method to Sort Complex Information Found

#44

Earlier quoted context omitted.

The rail network in the UK is also strange. On some routes it is cheaper to split your journey across multiple tickets. On others it is cheaper to buy a ticket for a longer journey. However, this is illegal and the train companies do attempt prosecutions.

It's legal: https://www.telegraph.co.uk/money/consumer-affairs/fare-spli... https://www.bbc.co.uk/news/uk-england-19217111 and there are web sites which do split ticketing: http://www.raileasy.co.uk/home/split-ticketing/ http://www.splitticketing.co.uk https://www.splityourticket.co.uk

Fair enough for split ticketing, but they prosecuted someone last year for overlong ticketing. It only failed because they got the facts (as opposed to the law) wrong.

Re: Universal Method to Sort Complex Information Found

#45

Earlier quoted context omitted.

BREAK OF JOURNEY Rules vary by train company and route. In general you cannot break your outward journey (except for necessary changes of train) but you can break your return journey. Source: https://www.splityourticket.co.uk/info/fare-types.aspx I've already dealt with the legality of split ticketing in another post.

And how do they enforce it? Chain you to the train?

No, they fine at exit.

Re: Universal Method to Sort Complex Information Found

#46
post #5

The subtitle claims that a “universal way” was found to solve the nearest-neighbour-search problem for any kind of data, but actually the result is restricted to the (rather huge, of course) set of normed spaces, i.e. spaces whose distance measures obey the triangle inequality.

Incidentally, the zone system for the Danish public transit system is not a metric space. (The ticket you need from A to B is not necessarily the same as from B to A.) That's a kind of practical graph where you want efficient shortest path algorithms for.

The same goes for airfares.

A round-trip can be cheaper depending on direction of travel.

One-way trip can be significantly cheaper if you are flying through a major hub like FRA and starting your journey from a less wealthy country.

Re: Universal Method to Sort Complex Information Found

#47
post #42
post #10

Earlier quoted context omitted.

Really?? Is that true only when there are multiple paths between A & B or is there something else involved?

For busses, the B stop on the way out may be in another zone as the B stop on the way back because they're geographically displaced. For busses and trains, depending on your type of ticket (2-8 zones, 8+ zones, commuter card) and whether the zone intersection is on or between stops/stations, you may have to pay for that zone one way but not the other. Those are edge cases. But the most confusing part is the ring topo…

[deleted]

Re: Universal Method to Sort Complex Information Found

#48
post #36

Earlier quoted context omitted.

my gut feeling tells me - ln((1+Similarity_cosine(A,B))/2) would satisfy the triangle inequality.

It produces negative distances, which disqualifies it as a metric.

For a Riemannian metric yes, but a lot of physics gets done in Lorentzian (psuedo-)metric spaces.

Re: Universal Method to Sort Complex Information Found

#49
post #26

> For example, “Manhattan” distance forces you to make 90-degree turns, as if you were walking on a street grid. Using Manhattan distance, a point 5 miles away as the crow flies might require you to go across town for 3 miles and then uptown another 4 miles. It's interesting that this is called Manhattan distance because it's only relevant in a town where everyone jaywalks... Like Manhattan. It's far from true anywhe…

The measure is concerned only with the distance traveled, not the time.

That's quite a narrow view. You can certainly model time in a metric space, i.e. it you go one block west and one new-york minute forward.

Re: Universal Method to Sort Complex Information Found

#50
post #17

Earlier quoted context omitted.

I await this paper with eager anticipation.

This is the second paper, where we present an actual fast algorithm for general normed spaces: https://ilyaraz.org/static/papers/daher.pdf . Enjoy!

Does any of this have implications for libraries like your FALCONN https://falconn-lib.org? Have not read the paper yet.
Post reply on HN