Overlap

Overlap score is defined for two routes X and Y, in terms of number of stops they have in common. Overlap of route X with route Y is the number of stops in common divided by the total number of stops in route X.
X = {sx1, sx2, sx3, . . . . . , sxn }, n : number of stops in route x
Y = {sy1, sy2, sy3, . . . . . , sym}, m : number of stops in route y
Ox(y) = Σi ε X Σj ε Y F(sxi, syj) / n
where
F(i, j) = 1, (i = j)
F(i, j) = 0, (i j)
Please select the city