1
$\begingroup$

I'm not sure what this type of question is called, but this what I'm trying to solve:

I own

  • 3 hats

    • 1 hat is red
    • 2 hats are blue
  • 4 shirts

    • 1 shirt is red
    • 1 shirt is blue
    • 2 shirts are green
  • 5 pairs of pants

    • 4 pairs are red
    • 1 pair is green

There will be 5 total outfits (this limit is set by the number of pants). How do I make sure those 5 outfits are unique?

  • Each item must be used exactly once (until they run out).

  • The lack of a hat/shirt counts towards the uniqueness of an outfit.

So my questions are:

  1. Is this a well known question? I've been having issues googling suggestions because I don't know what it's even called
  2. How can I find out if the problem is impossible to solve(ie. too few color variations)?
  3. Is there an algorithm I can use to find the unique outfits?

This example is a scaled down version of what I'm working on. For my actual project, I'm trying to find 10,000 unique "outfits", and there are 20 separate types of clothing with their own distribution of colors

$\endgroup$
3
  • 2
    $\begingroup$ You seem to have fewer shirts than pairs of pants. So do you wash and reuse, or go topless? $\endgroup$
    – Henry
    Commented Sep 22, 2021 at 0:45
  • $\begingroup$ I go topless. Each item can only be used once, so there will be an "outfit" that is just a pair of pants and nothing else $\endgroup$
    – anboio
    Commented Sep 22, 2021 at 1:04
  • $\begingroup$ related to math.stackexchange.com/questions/4257696/… $\endgroup$
    – Biggytiny
    Commented Sep 23, 2021 at 0:30

0

You must log in to answer this question.

Browse other questions tagged .