Chapter 3.1 # 12

A symphony orchestra has in its repertoire 30 Haydn symphonies, 15 modern works, and 9 Beethoven symphonies. Its program always consists of a Haydn symphony followed by a modern work, and then a Beethoven symphony.

# Setting global varibles
h <- 30
m <- 15
b <- 9

(a) How many different programs can it play?

This is a counting problem where \(({ n }_{ 1 })*({ n }_{ 2 })*.....({ n }_{ n })\). In this case it is \((Haydn)*(Modern)*(Beethoven)\)

(a<- h*m*b)
## [1] 4050

(b) How many different programs are there if the three pieces can be played in any order?

With three types of music, the order can be in 6 different ways:

\[Set 1: Haydn, Modern, Beethoven\] \[Set 2: Haydn, Beethoven, Modern\] \[Set 3: Beethoven, Modern, Haydn\] \[Set 4: Beethoven, Haydn, Modern\] \[Set 5: Modern, Beethoven, Haydn\] \[Set 6: Modern, Haydn, Beethoven\]

Looking at how many different programs could happen (adding the repertoire numbers), we can take this 6 “sets” and multiply it to the 4,050 different programs already identified.

(Qb<- 6*a)
## [1] 24300

(c) How many different three-piece programs are there if more than one

piece from the same category can be played and they can be played in any order?

We are really looking at how many three-piece sets of the 54 pieces we can create when order and category does not factor. This is equal to: \[{ _{ 54 }{ P }_{ 3 } }=({ 54 }_{ 3 })=\frac { 54! }{ (54-3)! }\]

n<- h+m+b
(c<- factorial(n)/factorial(n-3))
## [1] 148824