1

If I have a straight line consisting of n points, and I have to get from the first to the last point, using any combination of "hops" along points, how do I calculate how many possible combinations there are?

Example: a line with points A, B, C. I can either go from A -> C, or A -> B -> C. That's two possible combinations.

Asaf Karagila
  • 393,674
Henri
  • 11

1 Answers1

1

Assuming the hops can be of arbitrary length and each hop must go forward:

Pick any subset of the $n-2$ points in the middle. Then hop from the first point to each of the points in that subset in order, and then to the last point. Each subset of the $n-2$ points in the middle yields a unique combination of hops, so we have $2^{n-2}$ combinations of hops.

JimmyK4542
  • 54,331