All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Expanding the railroad line (Posted on 2017-12-26) Difficulty: 3 of 5
Each of the n stations on the national railroad sells tickets to all other stations.
If m new stations will be added, 46 additional sets of tickets will be printed.

How many stations are operating now?
How many new stations are to be added?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solutions Comment 2 of 2 |
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


  Posted by Charlie on 2017-12-26 13:51:49
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (21)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information