let's say you have a finite and arbitrary set of sets, and each inner set has can contain integers from 1 to 4 not repeating. So a set could be {{1}, {1,4}, {1,4}, {1,2,3,4,4}, {2,3,4}}. And suppose you have a requirement that you have a set of numbers that have to be in the inner sets, but an inner set can only contribute one number to the requirement.

That was probably confusing, so let me given an example: Say the requirement is {1,2,3,4} and say the set is {{1,2, 3, 4}, {3,4}, {1,2}, {1,2}}. The, it meets the requirement, since you could take 3 from the first inner set, 4 from the second, 1 from the third, and 2 from the last. However, if the set is {{1,2,3,4}, {1,2}, {1,2}, {1,2}} then that does not meet the requirement since you could get a 3 or 4 from the first inner set, but not get the other from any of the other inner sets. 

Note that for the requirements, duplicates are fine: so a requirement of {1,1,3} is allowed. 

So my question is: Given a requirement and a set, how would you write an algorithm to determine if the set satisfies the condition?

Thanks for reading this!