# More generalized derangement formula?

Hi, I'm curious...

Does anyone know a more general formula for derangements for groups that contain two or more indistinguishable elements?

For example, how many ways you could rearrange the letters in FOOLISH so that no letter ends up in the same spot?

i.e. In the new arrangement, the letter "O" can't appear in the second or third positions.

Note by Geoff Pilling
2 years, 11 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

You can label the similar letters as 1,2...., Now treat them as different letters .Now you can dearrange taking all the letters as different. As in this example FOOLISH YOU LABEL AS O1 AND O2 ANND NOW DERRANGE AS 7 DIFFERENT LETTERS . SUBTRACT CASES IN WHICH POSITION OF O1 AND O2 ARE INTERCHANGED AND OTHERS ARE DEARRANGED(AS REALLY O1AND O2 ARE INDISTINGUISHABLE).

EXTENDING THIS THOUGHT I FOUNDED A FORMULLA

DEARRANGEMENTS CONSIDERING ALL DIFFERENT - ( derangements of same letters considering them different*no of dearrangements of remaining letters)

Please tell whether my thought is correct or not.

- 2 years, 11 months ago

Thanks for your input Ayush! I'll need to think about it... For example, can you think of a generalized formula, for example, for GOOFING, where you have 2 pairs of identical letters, G and O?

- 2 years, 11 months ago

First dearrange all the seven letters treating them different. While you do so you have to delete these cases,

Case1 when position of one of two different types of letters get rearranged say G . No of cases in which two G interchanged = dearrangement of remaining five letters. Case 2 position of O is interchanged No of such cases =derangement of remaining 5 letters.

Here no of cases in which both O and G interchanged position is counted twice . so should be deleted once = dearrangement of non common letters is 3

Extending this thought it can be formulates Let total no of letters be n, no of same letters of A type n(A) ........

No of dearrangements =derangements of n - No of cases deleted= n(A U B U C....) HERE IT IS N(AUB) = N(A) U N(B)-N(AΠB) PLEASE REPLY

- 2 years, 11 months ago

- 2 years, 11 months ago

After giving a rethought I found several loop holes in the formula I formulated . IF we increase this question to three types ,then this formula would be inappropriate.

But going by basic approach we can solve these type of question.

- 2 years, 11 months ago

Staff - 2 years, 11 months ago

I did put together a problem for a specific case, "FOOLING" here but it would be great to see a more general solution! The one I have doesn't seem all that elegant. :/

- 2 years, 11 months ago