Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

(a) Define a derangement.

(b) Why is counting the number of ways a hatcheck person can return hats tonpeople, so that no one receives the correct hat, the same as counting the number of derangements ofnobjects?

(c) Explain how to count the number of derangements ofnobjects.

Short Answer

Expert verified

(a) A derangement is a permutation of objects that leaves no object in its original position.

(b) If the hatcheck person returns hats at random, so thatithhat goes to thejthperson where alwaysij, then it can be considered as a permutation ofnobjects (i.e.nhats) that leaves no object in its original position (i.e. none of the hats goes to its rightful owner).

(c) We can count derangement of nobjects by using formulaDn=n!k=0n(-1)k1k!

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

  Given

(b) Counting the number of ways, a hatcheck person.

(c) The number of derangements ofnobjects

02

The Concept of derangement

A derangement is a permutation of objects that leaves no object in its original position.

We can count derangement of nobjects by using formulaDn=n!k=0n(-1)k1k!.

03

(a) Determine the derangement

A derangement is a permutation of objects that leaves no object in its original position

04

(b) Determine the count

If the hatcheck person returns hats at random, so that ithhat goes to the jthperson where alwaysij , then it can be considered as a permutation of nobjects (i.e. nhats) that leaves no object in its original position (i.e. none of the hats goes to its rightful owner).

05

(c) Determine the relation to count

The number of derangements of nobjects.

Suppose the number of derangement of a set with n elements is Dn.

Let Pithe property that a permutation fixes the ithobject for i=1,,2,,n.

If the permutation is a derangement, then it has none of the properties Pi,1in.

Thus, Dn=NP1'P2'Pn'.

According to the principle of inclusion-exclusion.

NP'1P2'Pm'=n+k=1,1i1<i2<<iknn(-1)kNPi1Pi2Pik

If the ithobject is fixed at its position, then the rest of them can be permuted in (n-1)ways for each i=1,2,,n.

In general if i1,i2,,ikare fixed at their respective positions, the other objects can be permuted in exactly (n -k) ! ways, for each of the n/k different choices of k objects.

Considering N=n! is the total number of permutations of objects among themselves the above formula reduces to:

\(\begin{array}{c}{D_n} = n! + \sum\limits_{k = 1}^n {{{( - 1)}^k}} \cdot \left( {\begin{array}{*{20}{c}}n\\k\end{array}} \right)(n - k)!\\ = n!\sum\limits_{k = 0}^n {{{( - 1)}^k}} \frac{1}{{k!}}\end{array}\)

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Use Exercise 16to construct a dynamic programming algorithm for computing the length of a longest common subsequence of two sequencesa1,a2,....,amand b1,b2,....,bn, storing the values ofL(i,j)as they are found.

How many ternary strings of length six do not contain two consecutive0'sor twoconsecutive1's?

In this exercise we construct a dynamic programming algorithm for solving the problem of finding a subset S of items chosen from a set of n items where item i has a weight , which is a positive integer, so that the total weight of the items in S is a maximum but does no exceed a fixed weight limit W. Let M(j,w)denote the maximum total weight of the items in a subset of the first j items such that this total weight does not exceed w. This problem is known as the knapsack problem.

a) Show that ifwj>w, thenM(j,w)=M(j-1,w).
b) Show that if wjw, thenM(j,w)=max(M(j-1,w),wj+Mj-1,w-wj).
c) Use (a) and (b) to construct a dynamic programming algorithm for determining the maximum total weight of items so that this total weight does not exceed W. In your algorithm store the valuesM(j,w) as they are found.
d) Explain how you can use the values M(j,w)computed by the algorithm in part (c) to find a subset of items with maximum total weight not exceeding W.

Show that if abdand nis a power of b, then f(n)=C1nd+C2nlogba, where C1=bdc/(bd-a)andC2=f(1)+bd/(a-bd)

Suppose that c1,c2,,cpis a longest common subsequence of the sequences a1,a2,,amandb1,b2,,bn.
a) Show that if am=bn, then cp=am=bnand c1,c2,,cp-1is a longest common subsequence of a1,a2,,am-1and b1,b2,,bn-1 when p>1.
b) Suppose that ambn. Show that if cpam, then c1,c2,,cpis a longest common subsequence of a1,a2,,am-1and b1,b2,,bnand also show that if cpbn, then c1,c2,,cpis a longest common subsequence of a1,a2,,amandb1,b2,,bn-1

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free