My brain hurts, but I "think" you may have it nailed

The trick is to have ALL the 4 Combinations contained in minimum of 6 numbers

Some 4 combinations will appear more than once but that has to be.]]>

Input: A set S, a natural r

Output: All possible subsets of S containing exactly r elements

I could try but I don't know what the terms are

Trust me I have looked and looked for examples

Thought I would ask here, as I always use the www link to create the "combinations"

I have an Excel that I use that displays where the 4 combinations are found in the 6 numbers

And at the end I export a CSV file of the 6 numbers

The person that knows exactly what you want all the time is you, have you thought about programming this yourself?

]]>Lets say I have 12 Numbers 1 to 12, so there are 495 sets of 4 combinations

Sample: Using this link (below) and Selecting 12 numbers and 4 numbers to choose

Is Order important?= No Is Repetition allowed?=No

https://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html

Now I want to list the minimum number of 6 number sets that contain the 4 number combinations

Manually I worked out I could do it in 42 sets of 6 numbers that contained all 495 combinations

That is we would have all the 4 combinations in a set of 6 numbers of the 12 numbers.

I donâ€™t know what you call this Subsets?

EG The 12 Numbers are 1,2,3,4,5,6,7,8,9,10,11,12

There are 495 combinations of 4 numbers

-In say 1,2,3,4,5,6 (6 Numbers) there are 15 Combinations of 4

(1,2,3,4)(1,2,3,5)(1,2,3,6)(1,2,4,5)(1,2,4,6)(1,2,5,6)(1,3,4,5)(1,3,4,6)(1,3,5,6)(1,4,5,6)(2,3,4,5)(2,3,4,6)(2,3,5,6)(2,4,5,6)(3,4,5,6)

-In say 1,2,3,7,8,9 (6 Numbers) there are 15 combinations of 4

(1,2,3,7)(1,2,3,8)(1,2,3,9)(1,2,7,9)(1,2,8,9)(1,3,7,8)(1,3,8,9)(1,7,8,9)(2,3,7,8)(2,3,7,9)(2,7,8,9)(3,7,8,9)(1,3,7,9)(2,3,8,9)(1,2,7,8)

So in 42 Lines of sets of 6 number combinations I created a list that contain all 495 combinations of 4

42 Lines was the minimum, and I believe the sets of 6 was balanced because I used each number in the set of 6 numbers 21 times each

The Program I need is:

Enter the Total number of Numbers EG 12 (But can be any number to 50)

Enter the Total number used in each SET EG 6 (But can be any number to 10)

Enter the Total number of Combinations to cover EG 4 (But can be any number to 10)

Then display 2 things:

-The string of the 6 Numbers (1 Row for every set of 6 numbers)

-All the Combinations of 4 and what row they appear in (for error checking)

-Note: It needs to be done in the Minimum of Rows of 6 numbers

Yes some duplication of obtain the 4 combinations may happen as it did in my 42 set of 6