Ten points are marked around a circle, as illustrated in the figure.

![](https://cdn.mathpix.com/cropped/2024_05_01_0308bd91a070e7a80796g-2.jpg?height=297&width=280&top_left_y=454&top_left_x=1068)

(a) How many chords can be formed by connecting any two of these points? (A chord is a line segment connecting two points on a circle.)

(b) How many triangles can be formed by connecting any three of these points?
(a) From each point, 9 strings come out and we have 10 points. But each string is counted twice (a string $A B$ is counted for coming out of $A$ and for coming out of $B$), so we have $9 \times 10 / 2 = 45$ strings.

(b) Each string is a side of 8 triangles (it is enough to choose a point that is not an endpoint of the chosen string), but each triangle is counted three times (once for each string). Since we have 45 strings, we have $8 \times 45 / 3 = 120$ triangles.

## Counting Subsets

Let's solve a more general problem where we have $n$ points distributed on the circumference. Since each string is determined by two points, we need to count in how many ways we can choose 2 points from the $n$.

The first point can be chosen in $n$ ways, and the second can be chosen in $n-1$ ways, as it must be different from the first selected. Thus, we have $n(n-1)$ choices of ordered pairs, but the order in which they were selected does not matter, because they generate the same subset and thus the same segment. Therefore, the number of subsets of two points or equivalently the number of segments is $n(n-1) / 2$.

Following this reasoning, finding all the triangles is equivalent to finding all the subsets of three points among the $n$ points. Thus, the ordered choice of three points can be done in $n(n-1)(n-2)$ ways, but since the order does not matter, the subset with three elements $\{a, b, c\}$ is being counted six times: $a b c, a c b, b a c, b c a, c a b, c b a$. Thus, the number of subsets with three points, or equivalently, the number of triangles with vertices in the $n$ points is $n(n-1)(n-2) / 6$.

In the general case, if we want to know how many convex polygons with $k$ vertices exist (or equivalently, how many subsets of $k$ points we have among the $n$ points), the answer is given by $\binom{n}{k}$ (read as " $n$ choose $k$"), which is calculated as

$$
\binom{n}{k}=\frac{n(n-1)(n-2) \ldots(n-k+1)}{1 \cdot 2 \cdot 3 \cdot \ldots \cdot k}
$$