[R] [OT] Combinatorials wtih constraints

From: Doran, Harold <HDoran_at_air.org>
Date: Thu, 24 Jun 2010 15:47:38 -0400

This is not an R question, but a question on some combinatorial mathematics. Apologies for the OT if it is wildy inappropriate. The traditional C(n.k) method tells me how many combinations k I can make with n objects. However, suppose I want the number of combinations where an object cannot be used more than Q times where Q is a parameter that changes?

For instance:

combn(LETTERS[1:5], 3)

shows the number of triplets I can make with the 5 letters. But, suppose I want the constraint that no letter can be used more the twice (Q).

Are there well-known methods for identifying the number of possible combinations with this kind of constraint?


        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Jun 2010 - 20:17:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jun 2010 - 21:00:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive