There are 12 train stops between Newyork and Boston. How many train tickets are to be printed, so that a person can travel between any of the two stations (irrespective of the direction of travel)?

Assuming that in order to get off at a stop you have to have a ticket explicitly saying that that's your stop, and similarly for getting on, then for each of the 12 stops you have to have at least one ticket marking that stop as your departure point and at least one ticket marking that stop as your arrival point.     So among all your tickets you're going to need at least 12 different arrival points and 12 different departure points.

Since each ticket only has one departure point and one arrival point you're going to need at least 12 tickets.

So if you figure out a way to do it with 12 tickets total, then you're done because you know it can't be done with less.
Math-wise, this is probably counting combinations ie asking: In a group of **12** stations, how many unique **pairings** of stations are there? ie **12** choose **2** aka C(12,2).

Formula for n choose k C(n,k) is n! / k!(n-k)!

In this case **n** is 12 and **k** is 2, so 12 choose 2 is 66.

**irrespective of the direction of travel** likely is meant to communicate that the *order* of the stations doesn't matter (ie count *combinations* not *permutations*). You only need 1 ticket to go from New York to Boston or Boston to New York rather than 1 ticket NY to Boston and 1 ticket Boston to NY.

&#x200B;

IRL one way is do not show destination:  1 ticket timestamped to avoid re-use that gets punched for each step in a journey, and you charge based on that when you get off.
by

0 like 0 dislike