Checking pair counts when direction matters
Whether a pair has a direction decides whether you count 10 or 20 pairs from five items. This guide compares combinations with permutations of size two and shows how the choice about self-pairs changes the totals again.
The question to ask first
Before choosing a formula for counting pairs, decide what makes two pairs different. If the pair {A, B} and the pair {B, A} describe the same thing, the pair is unordered. A handshake is like that. If they describe different things, the pair is directed. A message from A to B is a different event from a message from B to A. This guide uses five distinct items and counts both kinds. The first is handled by the combination calculator with n = 5 and r = 2. The second is handled by the permutation calculator with the same inputs. The difference between the two answers, 10 versus 20, is a factor of 2, and the sections below explain exactly where that factor comes from.
Counting unordered pairs
The number of ways to choose 2 items from 5 without regard to order is C(5, 2) = 5! ÷ (2! × 3!) = 120 ÷ (2 × 6) = 10. A direct count agrees. Label the items 1 to 5 and list the pairs: 12, 13, 14, 15, 23, 24, 25, 34, 35 and 45. That is ten, and each pair appears once. A shortcut formula for two items is n × (n − 1) ÷ 2, which gives 5 × 4 ÷ 2 = 10. The division by 2 removes the double counting that arises when you pick a first item and then a second, since each pair can be reached in two orders. The combination calculator performs this same computation and returns 10, matching the first case below the article.
Counting directed pairs
For directed pairs, the order matters, so each choice of a first item and a different second item counts separately. There are 5 choices for the first position and 4 for the second, which is 20. The permutation formula P(5, 2) = 5! ÷ 3! = 120 ÷ 6 = 20 gives the same count. The list now includes both 12 and 21, both 13 and 31, and so on. In a network of five nodes where any node can send to any other, there are twenty distinct sender and recipient combinations. The permutation calculator returns 20 for n = 5 and r = 2, which matches the second case. Each unordered pair from the previous count now appears twice, once in each orientation.
The factor of two
Every unordered pair {A, B} corresponds to exactly two directed pairs, (A, B) and (B, A), as long as A and B are different items. So the directed count is twice the unordered count: 10 × 2 = 20. The basic calculator can confirm this with a multiplication, and the third case below the article does just that. The relation can also be read in reverse. If you know the number of directed pairs and need unordered pairs, divide by 2. In formula terms, P(n, 2) = 2 × C(n, 2), a special case of the general relation P(n, r) = C(n, r) × r!. For r = 2, the factorial r! equals 2, which is why the factor is so small here and why larger group sizes have much larger gaps.
The self-pair decision
The counts so far exclude pairing an item with itself. That is a modeling choice, and it changes the answer. Allow self-pairs and the directed count becomes n × n, which for five items is 25: the 20 distinct directed pairs plus 5 self-pairs. The unordered count with self-pairs allowed becomes n × (n + 1) ÷ 2, which is 15: the 10 distinct pairs plus 5 self-pairs. Whether to include them depends on the situation. A message to oneself might be meaningful in one system and impossible in another. In a round-robin schedule, a team does not play itself. State the rule explicitly before comparing counts, because two people can use the same formula and disagree only because they assumed different self-pair rules.
A larger example
Take eight items as an illustration. Unordered pairs number 8 × 7 ÷ 2 = 28. Directed pairs number 8 × 7 = 56, which is twice as many. For twelve items, the figures are 66 and 132. For one hundred items, they are 4,950 and 9,900. The counts grow with the square of n, roughly, so doubling the number of items multiplies the pairs by almost four. This quadratic growth explains why fully connected systems get expensive quickly. Ten people need 45 conversations if each pair talks once. Twenty people need 190. The permutation and combination calculators handle these inputs directly, so there is no need to expand factorials by hand, and the results can be checked against the formulas n × (n − 1) and n × (n − 1) ÷ 2. A useful sanity check is the ratio of the two counts. For any number of items greater than one, the directed count divided by the unordered count is exactly 2, so a pair of results that fails this ratio means one of the two inputs was typed incorrectly.
Why n choose 2 shows up in practice
The unordered count appears wherever two members of a group interact symmetrically. A full mesh network with n nodes has n(n − 1)/2 links. A tournament in which every competitor meets every other once has the same number of matches. In data work, comparing every record with every other record involves that many comparisons, which is why pairwise methods slow down quickly for large datasets. The directed count appears when roles differ, such as sender and receiver, lender and borrower, or origin and destination. A table of travel between n locations has n(n − 1) off-diagonal cells if travel in both directions is tracked. Recognizing which situation you are in is the whole task.
Distinct items are assumed
Both formulas assume the items are distinguishable and that each can be used at most once in a pair. If duplicates exist, the counts change, because swapping two identical items produces no new pair. The worksheet states five distinct items and does not cover multisets. Likewise, a pair of items from a larger set where some pairs are forbidden needs a subtraction of those forbidden pairs from the totals. The standard formulas count every possible pair, and any restriction is an extra rule that you have to apply yourself. Writing down the restriction alongside the result prevents the standard figures from being applied where they do not fit. Another assumption is that the group is fixed. Adding one more item to the five changes the unordered count from 10 to 15 and the directed count from 20 to 30, because the new item pairs with each of the five existing ones, and in the directed case it can sit on either side.
The grid view of pairs
A square grid with one row and one column per item shows all the counts at once. For five items the grid has 25 cells. The diagonal holds the 5 self-pairs. The 20 cells off the diagonal are the directed pairs with different endpoints. Cutting along the diagonal splits those 20 into two triangles of 10, and each triangle lists every unordered pair once. So 10 is the upper triangle, 20 is the whole off-diagonal area and 25 is the whole grid. Drawing this grid is a reliable way to settle disputes about which count applies, because every cell can be assigned to a definition. It also makes the growth visible, since the cell count goes up with the square of the number of items while the diagonal grows only linearly.
From pairs to larger groups
The same distinction extends beyond two items. Choosing 3 items from 5 without regard to order gives C(5, 3) = 10 groups. Arranging 3 of the 5 in order gives P(5, 3) = 60 sequences. The ratio is 6, which equals 3!, the number of ways to order three items. In general the ordered count is the unordered count multiplied by r!, and for pairs r! is 2, which explains the factor seen in this guide. A round-robin schedule for six teams in which each pair meets once has C(6, 2) = 15 matches. If each pair meets twice, once at each venue, the count is P(6, 2) = 30. Matching the formula to the rules of the situation is the key step, and the calculators handle the arithmetic.
Choosing n and r for the calculators
Both calculators take n, the number of distinct items available, and r, the number chosen. For pairs, r is 2. Enter 5 and 2 into the combination calculator for the unordered count and into the permutation calculator for the directed count. If the answer looks wrong, check whether n includes items that should be excluded, such as the sender itself when counting recipients, or whether r should reflect a group larger than two. The calculators assume r does not exceed n and that all items are distinct. They return counts of possibilities and nothing about likelihood, so a result of 20 means 20 distinct ordered pairs exist, not that any of them is more probable than another. Read the output as a size of a set.
Using the count responsibly
The numbers in this guide describe abstract relationships. Counting 20 directed pairs does not mean 20 messages are sent, and the example performs no communication action of its own. The result is a size of a set of possibilities, useful for estimating the number of rows in a table, the number of links in a design or the number of comparisons in an algorithm. When you turn the count into a plan, keep the assumptions with it: whether order matters, whether self-pairs are allowed and whether any pair is excluded. A sentence such as 5 distinct items, directed, no self-pairs, 20 pairs lets a reader reproduce the figure and challenge the assumptions instead of the arithmetic.
Reproduce the checks
Unordered distinct pair
Open the Combination calculator and enter:
- Total items n
5- Items selected r
2
Expected output:
Combinations
10Each two-item subset is counted once.
Directed distinct pair
Open the Permutation calculator and enter:
- Total items n
5- Positions r
2
Expected output:
Permutations
20The first and second positions are distinguished.
Two orientations per pair
Open the Basic calculator and enter:
- First number
10- Operation
multiply- Second number
2
Expected output:
Result
20Every unordered pair produces two directed pairs.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.