Finding permutations of a string using some or all of the letters in the string.

224 Views Asked by At

So I derived a pretty complex formula for a problem in my discrete math book, which I think algorithmically solves all the problems within this particular class of problem. Just wanted to check my work, and to know if this class of problems (and my solution) is formally defined somewhere else?

The question: "How many different strings can be made from the letters ORONO, using some or all of the letters?"

Let R be the sequence of all character classes in ORONO. 3 'O's, 1 'R' and 1 'N'. So let

$R: \big\{3, 1, 1\big\}$

$ \forall _{S\subset R} \bigg[ x \epsilon S \wedge q = |S| \rightarrow \sum_{x_1^\prime = 0}^{x_1} \sum_{x_2^\prime = 0}^{x_2} \cdots \sum_{x_q^\prime = 0}^{x_q}\big[ \big(\sum_{j = 1}^q x_j^\prime \big)! \prod_{i=1}^q \dfrac 1 {x^\prime_i!} \big]\bigg]$

Also: is there a better way to represent my series of sigmas after the arrow? Full disclosure: I'm not too sure about the proper notation for R, as it is a sequence (with possibly repeating elements). I wrote it as though it were a set, but I think perhaps I need to treat a sequence differently in the notation?