So that this does not have to be a computer problem, n = 1 1 . This can be done easily on a calculator that has factorial on it, paper and a writing instrument, for example.
Given that you have n letters addressed to n different people and n envelopes, which are addressed each to a different person of the same group of people, how many (permutations, if you will) are there to put every letter into an incorrect envelope. Note: if even one letter gets into its correct envelope, that is a failure.
To help you, here a table for values of n from 1 to 5 : n 1 2 3 4 5 count 0 1 2 9 4 4
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The problem ask for finding the number of ways q ( n ) of getting all n letters into the wrong n addressed envelopes. From first few n and q ( n ) given we note that q ( n ) = ( n − 1 ) ( q ( n − 1 ) + q ( n − 2 ) ) for n ≥ 3 . Using the recursive relation we have:
n 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 q ( n ) \ 0 1 2 9 4 4 2 6 5 1 8 5 4 1 4 8 3 3 1 3 3 4 9 6 1 3 3 4 9 6 1 1 4 6 8 4 5 7 0 1 7 6 2 1 4 8 4 1 2 2 9 0 7 9 2 9 3 2
The Note is correct. If even one letter gets into its correct envelope, that case can not be counted (it is a failure).
The proof of the binomial theorem is recursive in its iteration. It is not necessary to evaluate a binomial coefficient that way though. They can be evaluated as ( k n ) = k ! ( n − k ) ! n ! , which is found on some calculators directly and can be done on any calculator with factorial (!).
Using the binomial expansion of ( s − f ) 5 , one can see that it is − 1 0 f 3 s 2 + 1 0 f 2 s 3 + 5 f 4 s − f 5 − 5 f s 4 + s 5 . where s represents successes (that is, letters in wrong envelopes) and f represents failures (letters in correct envelopes). This can be generalized using the binomial theorem, noting that the sign changes follow the failures, and there is only one way to have success gives ∑ j = 0 5 ( − 1 ) j ( j 5 ) f j s 5 − j . Failures ( f ! ) are just ( 5 − j ) ! . Expanding the ( j n ) to its definition and doing the f substitution gives ∑ j = 0 5 j ! ( 5 − j ) ! 5 ! ( − 1 ) j ( 5 − j ) ! which evaluates to 4 4 . Generalizing that formula for arbitrary n with a term cancellation and moving a constant n ! out of the summation gives n ! ∑ j = 0 n j ! ( − 1 ) j as was stated in the original solution.
As a check, for n from 1 to 9, all the permutations of n objects were generated and the successful permutations were counted directly. The results were the same.
A recursive evaluation of the following table would a very long time. Using the formula method, it takes milliseconds. n 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 count 0 1 2 9 4 4 2 6 5 1 8 5 4 1 4 8 3 3 1 3 3 4 9 6 1 3 3 4 9 6 1 1 4 6 8 4 5 7 0 1 7 6 2 1 4 8 4 1 2 2 9 0 7 9 2 9 3 2 3 2 0 7 1 1 0 1 0 4 9 4 8 1 0 6 6 5 1 5 7 3 4 7 6 9 7 0 6 4 2 5 1 7 4 5 1 3 0 8 5 0 0 9 2 2 7 9 6 6 4 2 3 5 5 3 0 1 6 6 1 0 3 3 9 5 3 4 4 7 5 0 7 3 1 5 5 9 6 4 5 1 0 6 8 9 5 0 1 4 6 3 1 1 9 2 9 0 2 1 2 1 1 8 7 9 5 3 0 7 2 5 5 0 5 0 9 4 4 5 4 0 4 1 3 4 9 6 7 5 9 6 1 1 1 2 0 7 7 9 8 8 1 9 5 1 0 4 2 5 4 7 1 0 5 5 7 7 7 9 3 7 2 6 2 2 2 8 2 5 0 2 1 1 3 0 5 3 3 8 6 7 0 4 9 4 2 8 9 5 7 0 6 2 5 5 2 8 2 6 3 3 4 6 6 7 6 2 3 5 7 2 2 4 1 4 8 3 6 2 6 3 7 3 4 8 4 7 0 1 3 5 8 2 1 2 8 7 8 2 5 4 0 0 5 7 9 1 2 0 8 4 0 8 6 9 3 6 6 7 1 7 4 7 7 1 2 7 4 1 1 2 1 6 2 1 5 3 8 3 5 4 4 3 4 2 2 6 8 0 8 9 3 5 9 5 6 7 3 3 2 5 2 7 0 2 4 6 1 2 2 7 8 5 9 2 5 7 7 4 5 9 1 4 2 7 4 5 1 6 9 7 5 8 1 0 7 3 8 3 6 8 3 5 7 7 7 7 3 2 3 7 7 4 2 8 2 3 5 4 8 1
Now, read Derangement . Therefore, the limit as n → ∞ of derangments of n objects, also known as, Subfactorial ( n ) or ! n , divided by n ! can seen easily as e − 1 . The n ! terms cancel and what remains is the series expansion for e − 1 .
Log in to reply
@Jane Doe , sorry, I misread "to put every letter into an incorrect envelope" as correct.
Problem Loading...
Note Loading...
Set Loading...
Note the expansion of ( s − f ) 5 is − 1 0 f 3 s 2 + 1 0 f 2 s 3 + 5 f 4 s − f 5 − 5 f s 4 + s 5 , which is just the binomial expansion, with f representing failure and s representing success .
From this, the formula t → t ! ∑ n = 0 t n ! ( − 1 ) n can be derived.
For 1 1 , that evaluates to 1 4 6 8 4 5 7 0 .