1. Compute the values: D2-2D1, D3-3D2, D4-4D3, D5-5D4, …, D10-10D9  2.What is the pattern?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

1. Compute the values: D2-2D1, D3-3D2, D4-4D3, D5-5D4, …, D10-10D9 

2.What is the pattern?

8.1 Examples Defined by Recurrence Equations
Example 8.1.1: Derangements
Imagine a party where couples arrive together, but at the end of the evening,
every person leaves with a new partner. For each n E P, let D„ denote the number of
different ways n couples can be "deranged" – that is, rearranged in couples so no
one is paired with the person they arrived with.
// one couple cannot be deranged.
/3 one and only one way to derange two couples.
// If the couples arrive as Aa, Bb, and Cc,
// then A would be paired with b or c.
//
Then D1 = 0
D2
D3 = 2
If A is paired with b, C must be paired with a (not c),
and then B with c.
//
//
If A is paired with
C,
B must be paired with a (not b),
//
and then C with b.
// How big are D4, D5, and D10? How can we calculate them? Is there a formula?
Let's develop a strategy for counting derangements when n >= 4. Suppose the
n women are A1, A2, A3,
Woman A1 may be "re-paired" with any of the n –
let's say she's paired with az where 2 <= k <= n. Now let's consider az's original
partner, woman Ag: she might take a, or she might refuse a1 and take someone else.
If A1 is paired with ar and Ak is paired with a1, there are n
derange, and that may be done in exactly D,–2
If Aj is paired with ak but Ak refuses a1, we could pretend that Ak and a1
together, so now, there are n
exactly Dn-1 different ways.
For each of the n –
An, and each A; arrives with man a;.
1 men az or az or . . . or an;
2 couples left to
different
ways.
arrived
1 couples left to derange which may be done in
1 men that A1 might choose, there are {Dn-2 + Dn-1}
different ways to complete the derangement. Therefore, when n >= 4,
D, = (n – 1){Dn-2+Dn-1}.
(8.1.2)
// This also applies when n =
// Equation 8.1.2 is an example of a second-order recurrence equation,
// where the generic entry is expressed in terms the previous two entries.
3.
Transcribed Image Text:8.1 Examples Defined by Recurrence Equations Example 8.1.1: Derangements Imagine a party where couples arrive together, but at the end of the evening, every person leaves with a new partner. For each n E P, let D„ denote the number of different ways n couples can be "deranged" – that is, rearranged in couples so no one is paired with the person they arrived with. // one couple cannot be deranged. /3 one and only one way to derange two couples. // If the couples arrive as Aa, Bb, and Cc, // then A would be paired with b or c. // Then D1 = 0 D2 D3 = 2 If A is paired with b, C must be paired with a (not c), and then B with c. // // If A is paired with C, B must be paired with a (not b), // and then C with b. // How big are D4, D5, and D10? How can we calculate them? Is there a formula? Let's develop a strategy for counting derangements when n >= 4. Suppose the n women are A1, A2, A3, Woman A1 may be "re-paired" with any of the n – let's say she's paired with az where 2 <= k <= n. Now let's consider az's original partner, woman Ag: she might take a, or she might refuse a1 and take someone else. If A1 is paired with ar and Ak is paired with a1, there are n derange, and that may be done in exactly D,–2 If Aj is paired with ak but Ak refuses a1, we could pretend that Ak and a1 together, so now, there are n exactly Dn-1 different ways. For each of the n – An, and each A; arrives with man a;. 1 men az or az or . . . or an; 2 couples left to different ways. arrived 1 couples left to derange which may be done in 1 men that A1 might choose, there are {Dn-2 + Dn-1} different ways to complete the derangement. Therefore, when n >= 4, D, = (n – 1){Dn-2+Dn-1}. (8.1.2) // This also applies when n = // Equation 8.1.2 is an example of a second-order recurrence equation, // where the generic entry is expressed in terms the previous two entries. 3.
Using Eq. 8.1.2 together with the values of D, and D2, we can evaluate D, for
any value of n:
// in principle
D3
D4
D5
D6
D7
D8
D9
D10
(3 – 1){D2+D1} = 2{1+0}
(4 – 1){D3 +D2} = 3{2+1}
(5 – 1){D4+D3} = 4{9+2}
(6 – 1){D5+D4} = 5{44+9}
(7 – 1){D6+D5} = 6{265 +44}
(8 – 1){D7+D6} = 7{1854+265}
(9 – 1){D8+D7} = 8{14833+1854}
(10 – 1){D9+Ds} = 9{133496 +14833}
2
44
265
1 854
14 833
133 496
1 334 961
// It's strange that 1 334 961 = 10 × (133 496) + 1. Or is it?
// Is there a (convenient and compact) formula for D, that we can use to calculate
// its values?
The sequence on P defined by S,= A × n! where A is any real number satisfies
the recurrence equation (8.1.2). If n >= 3 then
(n – 1){S„-2+Sn-1} = (n – 1){A(n – 2)! +A(n – 1)!}
(n – 1)A(n – 2)!{1+[n – 1]}
А(п — 1) (п — 2)!{n}
= A x n!
= Sn.
%3|
||
// But will this "formula" apply when n =
// Does there exist a real number A such that D,
// No, because
// and
1 or n =
2?
A(n!) when n = 1 or n = 2?
if 0 = D1 = A(1!), then A must equal 0,
if 1 =
D2 = A(2!), then A must equal ½.
We can however use this formula to prove that D, is O(n!) by proving
Theorem 8.1.1: For all n >= 2, (1/3)n! <= Dn <= (1/2)n!
Consider the table of values
n
(1/3)n!
Dn
(1/2)n!
1
1/3
1/2
2
2/3
1
1 = 2/2
3
6/3 = 2
2
3 = 6/2
4
24/3 = 8
9.
12 = 24/2
120/3 = 40
44
60
= 120/2
6.
720/3 = 240
265
360 = 720/2
|| || || ||| || ||||
Transcribed Image Text:Using Eq. 8.1.2 together with the values of D, and D2, we can evaluate D, for any value of n: // in principle D3 D4 D5 D6 D7 D8 D9 D10 (3 – 1){D2+D1} = 2{1+0} (4 – 1){D3 +D2} = 3{2+1} (5 – 1){D4+D3} = 4{9+2} (6 – 1){D5+D4} = 5{44+9} (7 – 1){D6+D5} = 6{265 +44} (8 – 1){D7+D6} = 7{1854+265} (9 – 1){D8+D7} = 8{14833+1854} (10 – 1){D9+Ds} = 9{133496 +14833} 2 44 265 1 854 14 833 133 496 1 334 961 // It's strange that 1 334 961 = 10 × (133 496) + 1. Or is it? // Is there a (convenient and compact) formula for D, that we can use to calculate // its values? The sequence on P defined by S,= A × n! where A is any real number satisfies the recurrence equation (8.1.2). If n >= 3 then (n – 1){S„-2+Sn-1} = (n – 1){A(n – 2)! +A(n – 1)!} (n – 1)A(n – 2)!{1+[n – 1]} А(п — 1) (п — 2)!{n} = A x n! = Sn. %3| || // But will this "formula" apply when n = // Does there exist a real number A such that D, // No, because // and 1 or n = 2? A(n!) when n = 1 or n = 2? if 0 = D1 = A(1!), then A must equal 0, if 1 = D2 = A(2!), then A must equal ½. We can however use this formula to prove that D, is O(n!) by proving Theorem 8.1.1: For all n >= 2, (1/3)n! <= Dn <= (1/2)n! Consider the table of values n (1/3)n! Dn (1/2)n! 1 1/3 1/2 2 2/3 1 1 = 2/2 3 6/3 = 2 2 3 = 6/2 4 24/3 = 8 9. 12 = 24/2 120/3 = 40 44 60 = 120/2 6. 720/3 = 240 265 360 = 720/2 || || || ||| || ||||
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Processes of 3D Graphics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education