Number of ways to arrange objects, not all different, such that p are always separated

18 Views Asked by At

Say there are a objects of one kind, b of second and c of a third and so on. p particular objects in them, say x of type a, y of type b, z of type c and so on, should never be adjacent to each other. This can be solved by taking gaps or by inclusion-exclusion, but the process takes too much time. As an example Say, for example, in the word Preperation, the r, e, p should always be separated. Here, x=y=z=2. Is there a general formula for such a problem. I tried deriving one from inclusion-exclusion but didn't make progress.