0

# Combinatorics

Sat 19 Nov, 2022 12:10 am
Given the range 1-10
Form all possible pairs: [1,2], [1,3], [1,4], [1,5], [2,3], [2,4],[2,5],[3,4],[3,5],[4,5]

I would like some help with an algorithm to do the following:

Combine numbers into a minimal list of five numbers to ensure all pairs are covered with minimum duplication.
In the list below all pairs are covered i.e 1 with every other number, 2 with every other number etc.
For example the last line could be removed because the second and second last line already have these pairs represented.

1,2,3,4,5
1,6,7,8,9
1,10,2,6,7
2,8,9,10,3
3,6,7,8,9
3,10,4,6,7
4,8,9,10,5
5,10,6,7,8

• Topic Stats
• Top Replies
Type: Question • Score: 0 • Views: 2,374 • Replies: 3
No top replies

Agent Smith

0
Sat 19 Nov, 2022 07:19 am
@millamber,
10 * 10 = 100 pairs. Smooth sailing from there ...
millamber

-1
Sat 19 Nov, 2022 06:25 pm
@Agent Smith,
Hi Agent Smith,

I'm not after the formula for working out how many pairs there are, that part is pretty straight forward.

I am more interested in how to combine each of the pairs into groups of five numbers and doing this with a minimum number of groups.

Agent Smith

0
Sun 20 Nov, 2022 01:50 am
@millamber,
There are 100 unique permutations.

Permutations possible in fives = 100 * 100 * 100 * 100 * 100 = 10,000,000,000 or 10 billion
0 Replies

### Related Topics

1. Forums
2. » Combinatorics