If we assume that tickets from point A to point B are not different from those that go from point B to point A then the number of tickets is just C(m,2):
2 1
3 3
4 6
5 10
6 15
7 21
8 28
9 36
10 45
11 55
12 66
13 78
14 91
15 105
16 120
17 136
18 153
19 171
20 190
21 210
22 231
23 253
24 276
25 300
26 325
27 351
28 378
29 406
30 435
31 465
32 496
33 528
34 561
35 595
36 630
37 666
38 703
39 741
40 780
41 820
42 861
43 903
44 946
45 990
46 1035
47 1081
48 1128
49 1176
50 1225
51 1275
If the number of stations goes from 10 to 14 (4 extra stations), the number of ticket types goes from 45 to 91. But it's also true that if the number of stations goes from 46 to 47 (only one new station) the number of ticket types goes from 1035 to 1091, also an increase of 46.
10 14 45 91 10 old, 2 new stations
46 47 1035 1081 46 old, 47 new stations
On the other hand, if tickets from point A to point B differ from thase that go from point B to point A, there are P(m,2) ticket types in each case, that is, twice the previous table values. Below list old and new station numbers and old and new numbers of ticket types:
11 13 110 156 11 old, 2 new stations
23 24 506 552 23 old, 1 new station
Around here, NJ Transit has 162 train stations. That would entail at least 13041 different tickets if direction doesn't matter, but they are printed as needed in the ticket machine or the printer at the ticket agent's window.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For present = 2 To 10000
tktsnow = present * (present - 1) / 2
For future = present + 1 To 1010
tktsthen = future * (future - 1) / 2
If tktsthen - tktsnow = 46 Then
Text1.Text = Text1.Text & present & Str(future) & " "
Text1.Text = Text1.Text & tktsnow & Str(tktsthen) & crlf
End If
Next
Next
Text1.Text = Text1.Text & crlf
For present = 2 To 10000
tktsnow = present * (present - 1)
For future = present + 1 To 10100
tktsthen = future * (future - 1)
If tktsthen - tktsnow = 46 Then
Text1.Text = Text1.Text & present & Str(future) & " "
Text1.Text = Text1.Text & tktsnow & Str(tktsthen) & crlf
End If
Next
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub