Skip to main content
added 12 characters in body
Source Link
Bjørn Kjos-Hanssen
  • 24.8k
  • 3
  • 58
  • 114

Algorithm

  1. create the two-nearest-neighbors graph $N_2$ using the first data set. That is, let each station be connected to the two closest stations.
  2. for a path in the second data set, assume that the train must have been traveling along a geodesic (shortest path between two vertices) on $N_2$, and fill in the missing stations accordingly.

Example: BART

Bay Area Rapid Transit

If ourOn input the partial path is (MacArthur, Lafayette) then we will fill it in as (MacArthur, Rockridge, Orinda(MacArthur, Lafayette), Lafayette)the Algorithm outputs

(MacArthur, Rockridge, Orinda, Lafayette), 

which is correct. There is an, even though $N_2$ has a spurious edge between Rockridge and Ashby, but that's okay.

Algorithm

  1. create the two-nearest-neighbors graph $N_2$ using the first data set. That is, let each station be connected to the two closest stations.
  2. for a path in the second data set, assume that the train must have been traveling along a geodesic (shortest path between two vertices) on $N_2$, and fill in the missing stations accordingly.

Example: BART

Bay Area Rapid Transit

If our partial path is (MacArthur, Lafayette) then we will fill it in as (MacArthur, Rockridge, Orinda, Lafayette), which is correct. There is an edge between Rockridge and Ashby, but that's okay.

Algorithm

  1. create the two-nearest-neighbors graph $N_2$ using the first data set. That is, let each station be connected to the two closest stations.
  2. for a path in the second data set, assume that the train must have been traveling along a geodesic (shortest path between two vertices) on $N_2$, and fill in the missing stations accordingly.

Example: BART

Bay Area Rapid Transit

On input the partial path (MacArthur, Lafayette), the Algorithm outputs

(MacArthur, Rockridge, Orinda, Lafayette), 

which is correct, even though $N_2$ has a spurious edge between Rockridge and Ashby.

Source Link
Bjørn Kjos-Hanssen
  • 24.8k
  • 3
  • 58
  • 114

Algorithm

  1. create the two-nearest-neighbors graph $N_2$ using the first data set. That is, let each station be connected to the two closest stations.
  2. for a path in the second data set, assume that the train must have been traveling along a geodesic (shortest path between two vertices) on $N_2$, and fill in the missing stations accordingly.

Example: BART

Bay Area Rapid Transit

If our partial path is (MacArthur, Lafayette) then we will fill it in as (MacArthur, Rockridge, Orinda, Lafayette), which is correct. There is an edge between Rockridge and Ashby, but that's okay.