20
06/13/22 MATH 106, Section 13 1 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

Embed Size (px)

Citation preview

Page 1: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 1

Section 13

Non-adjacent ObjectsQuestions about homework?

Submit homework!

Page 2: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 2

Jana attends a college which has 10 class periods, one right after another, for Monday-Wednesday-Friday classes. She is scheduling 3 Monday-Wednesday-Friday classes, and she wants to avoid having two or more classes in a row, that is, she does not want classes to be in adjacent class periods. For instance, the schedule format

would be acceptable to Jana, but the schedule format

would not be acceptable to Jana.

class free free class free class free free free free

class free free free class class free free free free

What is the total number of schedule formats possible regardless of whether or not they are acceptable to Jana?

10!——– = 120 7! 3!

#1

Page 3: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 3

What is the total number of schedule formats acceptable to Jana?

What is the total number of schedule formats with at least two classes in a row?

What is the total number of schedule formats with no adjacent free periods?

Let’s tackle this problem by first lining up the seven free periods:

free free free free free free free

There are “gaps” where we may insert exactly one class.8

The total number of schedule formats acceptable to Jana is equal to the number of ways we may choose 3 gaps to insert the 3 classes, and this is equal to C(8,3) = 56.

120 – 56 = 64

0 (zero) - this is not possible!

Page 4: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 4

Ten symbols consisting of seven Xs and three Ts are to be placed in a row.

What is the total number of arrangements possible?

What is the number of arrangements where no Ts may be adjacent?

What is the number of arrangements where no Xs may be adjacent?

10!——– = 120 7! 3!

C(8,3) = 56

0 (zero) - this is not possible!

#2

Page 5: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 5

Ten symbols consisting of Xs and Ts are to be placed in a row.

What is the total number of arrangements possible?

What is the number of arrangements where no Ts may be adjacent?

210 = 1024

C(11,0) = 1With 10 Xs and 0 Ts, the number arrangements with no adjacent Ts is

C(10,1) = 10With 9 Xs and 1 T, the number arrangements with no adjacent Ts is

C(9,2) = 36With 8 Xs and 2 Ts, the number arrangements with no adjacent Ts is

C(8,3) = 56With 7 Xs and 3 Ts, the number arrangements with no adjacent Ts is

#3

Page 6: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 6

What is the number of arrangements where no Ts may be adjacent?

C(11,0) = 1With 10 Xs and 0 Ts, the number arrangements with no adjacent Ts is

C(10,1) = 10With 9 Xs and 1 T, the number arrangements with no adjacent Ts is

C(9,2) = 36With 8 Xs and 2 Ts, the number arrangements with no adjacent Ts is

C(8,3) = 56With 7 Xs and 3 Ts, the number arrangements with no adjacent Ts is

With 6 Xs and 4 Ts, the number arrangements with no adjacent Ts is

With 5 Xs and 5 Ts, the number arrangements with no adjacent Ts isC(7,4) = 35

C(6,5) = 6With 4 Xs and 6 Ts, the number arrangements with no adjacent Ts is

This is not possible! There is no C(5,6).C(11,0) + C(10,1) + C(9,2) + C(8,3) + C(7,4) + C(6,5) = 144

Page 7: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 7

Eleven symbols consisting of Xs and Ts are to be placed in a row.

What is the total number of arrangements possible?

What is the number of arrangements where no Ts may be adjacent?

211 = 2048

C(12,0) = 1With 11 Xs and 0 Ts, the number arrangements with no adjacent Ts is

C(11,1) = 11With 10 Xs and 1 T, the number arrangements with no adjacent Ts is

C(10,2) = 45With 9 Xs and 2 Ts, the number arrangements with no adjacent Ts is

C(9,3) = 84With 8 Xs and 3 Ts, the number arrangements with no adjacent Ts is

#4

Page 8: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 8

What is the number of arrangements where no Ts may be adjacent?

C(12,0) = 1With 11 Xs and 0 Ts, the number arrangements with no adjacent Ts is

C(11,1) = 11With 10 Xs and 1 T, the number arrangements with no adjacent Ts is

C(10,2) = 45With 9 Xs and 2 Ts, the number arrangements with no adjacent Ts is

C(9,3) = 84With 8 Xs and 3 Ts, the number arrangements with no adjacent Ts is

C(8,4) = 70With 7 Xs and 4 Ts, the number arrangements with no adjacent Ts is

C(7,5) = 21With 6 Xs and 5 Ts, the number arrangements with no adjacent Ts is

C(6,6) = 1With 5 Xs and 6 Ts, the number arrangements with no adjacent Ts is

With 4 Xs and 7 Ts, the number arrangements with no adjacent Ts isThis is not possible! There is no C(5,7).

Page 9: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 9

What is the number of arrangements where no Ts may be adjacent?C(12,0) + C(11,1) + C(10,2) + C(9,3) + C(8,4) + C(7,5) + C(6,6) = 233

Each seat in a row is to be designated either to be for a man or to be for a woman, but seats for women are not allowed to be adjacent. Find the number of seating arrangements if the row contains

5 seats.

6 seats

13 seats

14 seats

Do the four parts of this problem for next class on a separate sheet of paper, so that you can submit it for homework.

DO NOT attempt to do the problems on the rest of this handout, since we will do these in class next time.

#5

Page 10: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 10

Each seat in a row is to be designated either to be for a man or to be for a woman, but seats for women are not allowed to be adjacent. Find the number of seating arrangements if the row contains

5 seats.

6 seats

13 seats

14 seats

#5

You were supposed to do the four parts of this problem for today’s class on a separate sheet of paper to be submitted for homework.

Copy your work and answers onto the handout (if you have not already done so), and then submit the separate sheet of paper.

Page 11: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 11

Each seat in a row is to be designated either to be for a man or to be for a woman, but seats for women are not allowed to be adjacent. Find the number of seating arrangements if the row contains

5 seats.

6 seats

13 seats

14 seats

C(6,0) + C(5,1) + C(4,2) + C(3,3) = 13

C(7,0) + C(6,1) + C(5,2) + C(4,3) = 21

C(15,0) + C(14,1) + C(13,2) + C(12,3) + C(11,4) + C(10,5) + C(9,6) + C(8,7) = 987

C(14,0) + C(13,1) + C(12,2) + C(11,3) + C(10,4) + C(9,5) + C(8,6) + C(7,7) = 610

#5

Page 12: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 12

If n symbols consisting of Xs and Ts are to be placed in a row, what is

the total number of possible arrangements

the number of arrangements where no Ts may be adjacent?

2n

Let us designate F(n) to be the number of strings (arrangements) of n symbols of two types (say Xs and Ts) where one of the symbols (say the Ts) are never adjacent.

From previous problems, we have seen

F(5) = F(6) = F(10) =

F(11) = F(13) = F(14) =

13 21 144

233 610 987

Let’s write a recipe to get a string of the n symbols with no adjacent Ts:

#6

Page 13: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 13

Let’s write a recipe to get a string of the n symbols with no adjacent Ts:

X __ __ __ … __

Start with X.Write any string of the n – 1 symbols with no adjacent Ts.

ORT X __ __ __ … __

Write any string of the n – 2 symbols with no adjacent Ts.

Start with TX.

number of strings of n symbols with no adjacent Ts

We find that F(n) = F(n – 1) + F(n – 2) .

number of strings of n – 1 symbols with no adjacent Ts

number of strings of n – 2 symbols with no adjacent Ts

Page 14: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 14

F(0) =

F(1) =

F(2) =

1 There is only 1 “empty” string (where no Ts are adjacent).

2 The strings are as follows: X and T

3 The strings are as follows: TX XT XX

Put a TX in front of each string of length 0.

Put a X in front of each string of length 1.

number of strings of n symbols with no adjacent Ts

We find that F(n) = F(n – 1) + F(n – 2) .

number of strings of n – 1 symbols with no adjacent Ts

number of strings of n – 2 symbols with no adjacent Ts

Page 15: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 15

Let’s see if we can find a pattern.

F(0) =

F(1) =

F(2) =

F(3) =

1 There is only 1 “empty” string (where no Ts are adjacent).

2 The strings are as follows: X and T

3 The strings are as follows: TX XT XX

The strings are as follows: TXX TXT

XTX XXT XXX

Put a TX in front of each string of length 1.

Put a X in front of each string of length 2.

5

Page 16: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 16

Let’s see if we can find a pattern.

F(0) = F(10) =

F(1) = F(11) =

F(2) = F(12) =

F(3) =

F(4) =

F(5) =

F(6) =

F(7) =

F(8) =

F(9) =

1

2

F(0) + F(1) = 3

F(1) + F(2) = 5

F(2) + F(3) = 8

F(3) + F(4) = 13

F(4) + F(5) = 21

F(5) + F(6) = 34

F(6) + F(7) = 55

F(7) + F(8) = 89

F(8) + F(9) = 144

F(9) + F(10) = 233

F(10) + F(11) = 377

This sequence of numbers is called the Fibonacci sequence.

An amazing but very non-intuitive formula for getting the nth Fibonacci number is F(n) =

1—–5

1 + 5——— 2

n + 2

– 1 – 5——— 2

n + 2

Note: This formula appears on page 101 of the textbook.

Page 17: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 17

Let’s try the formula to calculate F(12).

1—–5

1 + 5——— 2

14

– 1 – 5——— 2

14

= 377

It works!!!!

Page 18: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 18

Brian is attending a college which has 7 class periods, one right after another, for Monday-Wednesday-Friday classes.

3

What is the smallest number of classes he can take to avoid having two or more free periods in a row?

What is the number of schedule formats possible where he can avoid having two or more free periods in a row, that is, he can avoid adjacent free periods?

F(7) = 34

#7

Page 19: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 19

What is the number of schedule formats possible where he can avoid having two or more free periods in a row, if he takes no more than 5 classes?

C(6,2) + C(5,3) + C(4,4) = 26

Page 20: 11/18/2015MATH 106, Section 131 Section 13 Non-adjacent Objects Questions about homework? Submit homework!

04/21/23 MATH 106, Section 13 20

Homework Hints:In Section 13 Homework Problem #8,

In Section 13 Homework Problem #9,

use the GOOD = ALL BAD principle with the answers in the two previous homework problems.

keeping in mind that if there are no adjacent Bs, then all Bs are adjacent, consider the following possibilities:a string of 15 Bsa string of 14 Bs and 1 Aa string of 13 Bs and 2 As...a string of 2 Bs and 13 Asa string of 1 B and 14 Asa string of 15 As