Permutations or combinations: 25 recipes, each containing 20 ingredients

wab

New member
Joined
Mar 21, 2019
Messages
5
Hi all,
I wasn't sure where to post this so sorry if it's in the wrong section.
I have a problem which is surely quite simple but I'm math illiterate.. ?

I want to create 25 recipes, each containing 20 ingredients, and I wanted each recipe to have no more than 30% of the same ingredients as any other. (So I don't want a solution where 30% of all the recipes' ingredients are the same)
1. What is the least amount of ingredients required to achieve this?
2. Is there a tool that can come up with all the proper combinations?
3. How many ingredients would be required if I wanted maximum 20% of same ingredients between the recipes?

Thanks in advance for enlightening me
 
thank you for your reply
There are 20 ingredients per recipe.
And what I meant by the 30% common ingredients not being the same for all 25 recipes, is that for example if I was trying to make 3 letter arrangements with only 1 common letter out of 7 letters abcdefg, I am looking for abc, cde, efg, and not acb, ade, afg.
Hope you understand what I mean.
 
Ok so if each recipe has 20 ingredients how many overall ingredients can these 20 be selected from?
 
  • Like
Reactions: wab
We that's my question. What's the least amount of ingredients I need to make 25 sets (recipes) of 20 ingredients that share no more than 30% ingredients in common?
 
Gotcha. Consider any two recipes. They can have at most 6 ingredients in common. (30% of 20)

They both then must have 14 ingredients each that are not in common.

To do this requires 2x14 + 6 = 34 ingredients

There are so many combinations of 20 from 34 ingredients that I'm sure you can find 25 that share no more than 30%.

If you only wanted 20% shared ingredients then any two recipes can only have 4 ingredients in common.

A total of 2x16+4 = 36 ingredients would be needed.

It shouldn't be too hard to use excel or something similar to gen these recipes for you.
 
  • Like
Reactions: wab
Top