Combinations and Permutations

Hunter Carver
5 min readApr 21, 2021

How many possible starting lineups can an NBA team create?

Photo by jesse orrico on Unsplash

The job of being a coach is one of the most thankless jobs out there. If a team is doing good, fans usually assume it is because of the players. Whereas if a team is struggling the blame quickly falls on the coach. Managing people, in general, is a challenge but today I want to shine a light on just how difficult being a coach is. I’ll do this by showing you how complicated just selecting a starting lineup is. Today we will calculate how many possible starting lineups a coach can make with an NBA team.

NBA teams are allowed to have 15 players on their roster during the regular season. Of these 15 players, only 13 can be active at any time. This means that an NBA coach has a total of 13 players who can start a game on any given night.

How may possible starting line ups can a coach make with 13 players?

Basketball is played with 5 players from each team meaning that the coach can pick 5 of his 13 active players to start the game. A player is also not allowed to start 2 positions at a time, meaning the coach must select 5 separate players. We are trying to answer how many different groups of 5 players can we create out of the 13 players available to start.

To answer this question we must first consider if we care about the order that a player is selected to the starting lineup. In basketball order might matter as there are 5 different positions, point guard, shooting guard, small forward, power forward, and center. These positions are also referred to as the 1 through 5 respectively.

Let's first calculate the number of possible starting line ups while considering that the order a player is selected to the starting lineup matters. For example, let us say if a coach selects a player first that means they are playing point guard. Whereas, if a player is selected to start fifth they are going to start at center.

If the order of our starting lineup matters then we must use an algorithm that calculates possible permutations rather than combinations. This means that a starting lineup made up of Lebron, Harden, Luka, AD, and Kawhi would be different if LeBron was selected at a different position each time. Combinations do not consider order, the 5 starting line ups listed in the table below would all be considered the same since the 5 same players are used to create them.

Order matters to Permutation but not Combination

Count of Permutations of “r” out of “n” possible = n!/(n − r)!

Calculating for permutations is easier than calculating for combinations. This algorithm may seem complicated but it is quite simple if you understand factorials. Factorials are simply an easy way to represent the product of an integer and all the integers below it. For example 3! is equal to (1*2*3), 4! is equal to (1*2*3*4), 5! is equal to (1*2*3*4*5), or 6,24, and 120 respectively. Writing out factorials can become tedious as the base integer increases and this is why mathematicians created the shorthand of adding ! to an integer to represent an integer to its factorial value.

That means the total possible permutations of starting line ups an NBA coach has to choose from is the factorial of available players divided by the factorial of available players minus the count of players we are selecting. This algorithm written out is 13!/(13–5)! which is equal to 154,440 possible line ups when the position or order a player is selected to the starting line up matters.

In the modern NBA, positions are starting to fade away. Versatile players like Lebron James can play any position and players switch positions fluidly throughout the games. If this trend continues, coaches may not need to consider the order or position that players are selected to the starting lineup but rather simply need to select their best 5 players to start. How many starting line-ups can be made without considering player positions or the order they were selected to start.

Count of Combinations of “r” out of “n” possible = n! / (r! (n — r)!)

If the order does not matter when calculating the total number of possible starting groups then we must update our algorithm to calculate total possible combinations. To update the algorithm we simply must not consider the cases where our 5 players are the same but playing a different position. In the table listed above, we can see that when calculating total possible combinations all the rows of the table are considered the same group and would only add one possible starting lineup to our total possible lineup count.

To solve for total possible starting lineup combinations we simply take 13!/(5! *(13–5)!) which is equal to 1,287 possible starting line ups when order or player position does not matter. This means that at a minimum a coach must choose one group out of 1,000 different possible starting groups. Positions still matter in the NBA for most players making it fairer to say that coaches have to choose their best group out of closer to 100,000 possible groups. Considering this is only one part of their job I hope this gives some perspective on the difficult job that coaches have.

In this article, we have only considered how to calculate combinations and permutations if a group can not contain a repeat. We did this since a player can not start two positions but if you are answering a problem that allows for repeats then the above formulas must be changed to account for repeats. I have listed the algorithms for both repeatable permutations and combinations below.

Repeatable Permutations of “r” out of n possible= n^r

Repeatable Combinations of “r” out of n possible = (r+n-1)!/r!(n-1)

--

--