0

I have a set of n objects which are related to each other in some manner. I have to determine the number of ways to select k objects out of this. The problem is that, when I select some object, few other objects get ruled out of selection. Is there any famous theorem in math or any good named algorithm which is generally used for these kinds of questions?

Since I am looking for a algorithm, I am not able to get the required result by googling or searching in related sites. Thanks for your time.

  • If brute force fits your performance requirements, you can recursively select each object. On every iteration you can prefilter objects for further recursive chaining. – iofjuupasli Oct 10 '18 at 14:36
  • 2
    related: [Haskell generating pre-filtered permutations](https://stackoverflow.com/q/52124356/849891). – Will Ness Oct 10 '18 at 14:37
  • also related: [Euler 43 - is there a monad to help write this list comprehension?](https://stackoverflow.com/q/9831374/849891). – Will Ness Oct 11 '18 at 01:22

0 Answers0