Docsity

Permutations and Combinations - Notes | CSE 5231, Study notes of Computer Systems Networking and Telecommunications

Partial preview of the text

Download Permutations and Combinations - Notes | CSE 5231 and more Study notes Computer Systems Networking and Telecommunications in PDF only on Docsity!

Applied Statistics:

Probability

Probability for Computer Scientists

This material is provided for the educational useof students in CSE2400 at FIT. No further useor reproduction is permitted.

Copyright G.A.Marin, 2008,

All rights reserved.

Applied Statistics:

Probability

Permutations and Combinations

1

2

Suppose that we have

objects

,

,...,

.

A permutation of order

is an "ordered" selection of

of these for 1

n.

A combination of order

is an "unordered" selection of

of these.

Com

n

n

O O

O

k

k

k

k

k

≤

≤

mon notation:

,

or

(

(

,

.

!

Example: Given the 5 letters a,b,c,d,e how many ways can we list 3 of the 5when order is

n

k

k

k

n

k

P n k

P

n n

n

k

n

n

n

C n k

C

k

k

=

−

−

=

⎛

⎞

=

=

=

⎜

⎟

⎝

⎠

"

5

3

3

important?

Answer:

=5 =543=60.

Note that each choice of 3 letters (such as a,c,e) results in 6 different results: ace, aec, cae, cea, eac, eca...Example: Given the 5 letters above how ma

P

3

ny ways can we choose 3 of the 5

when order is NOT important?

5

5

54

Answer:

=

=

  1. In this case we have the 60 that result when we care about order

3

3!

32

divided by 6 (the number of orderi

⎛

⎞

=

⎜

⎟

⎝

⎠

ngs of 3 fixed letters).

Applied Statistics:

Probability

Permutations of Multiple Types

1

2

1

2

1

2

The number of permutations of

objects of which

are of

one type,

are of a second type, ..., and

are of an

type is

r

r

r

n

n

n

n

n

n

n

rth

n

n

n

n

Example: Suppose we have 2 red buttons, 3 white buttons, and 4 blue buttons.How many different orderings (permutations) are there?

Answer:

Applied Statistics:

Probability

Try These

There are 12 marbles in an urn. 8 are white and 4 are red. The white marblesare numbered w1,w2,...,w8 and the red ones are numbered r1,r2,r3,r4.For (a) - (d): Without looking into the urn you dra

5

w out 5 marbles.

(a) How many unique choices can you get if order matters? 12

95, 040

12

(b) How many unique choices can you get if order does not matter?

792

5

(c) How many ways can you choose 3

=

⎛

⎞

=

⎜

⎟

⎝

⎠

white marbles and 2 red marbles if

order matters? You will fill 5 "slots" by drawing. First determine which

5

two slots (positions) will be occupied by 2 red marbles:

  1. Next

2

⎛

⎞

=

⎜

⎟

⎝

⎠

3

2

multiply by orderings of 3 white and 2 red: 10 8

4

40,320.

(d) How many ways can you choose 3 white marbles and 2 red marbles if

8

4

order does not matter?

336

3

2

(e) How many marbles

=

⎛

⎞⎛

⎞

=

⎜

⎟⎜

⎟

⎝

⎠⎝

⎠

i

i

must you draw to be sure of getting two red ones? 10

Applied Statistics:

Probability

Try these…

Suppose

. What is

?

11

7

18

18

Suppose

. What is

?

2

n

n

n

r

r

r

⎛

⎞

⎛

⎞

=

⎜

⎟

⎜

⎟

⎝

⎠

⎝

⎠

⎛

⎞

⎛

⎞

=

⎜

⎟

⎜

⎟

−

⎝

⎠

⎝

⎠

Applied Statistics:

Probability

Examples*

Consider a machining operation in which a piece of sheet metalneeds two identical diameter holes drilled and two identical size notches cut. We denote adrilling operation as

d and a

notching operation as

n. In determining a schedule for a machine

shop, we might be interested in the number of different possible sequences of the fouroperations. The number of possible sequences for two drilling operations and two notching operationsis The six sequences are easily summarized:

ddnn,

dndn,

dnnd,

nddn,

ndnd,

nndd

.

*Applied Statistics and Probability for Engineers, Douglas C. Montgomery, George C. Runger, John Wiley & Sons, Inc. 2006

Applied Statistics:

Probability

Sample Space

Definition: The totality of the possibleoutcomes of a random experiment is calledthe Sample Space,



Finite



Countable



Continuous (We begin with the discrete cases.)

.

Ω

{

}

Outcome from one roll of one die

{

}

The number of attempts until a message is transmitted successfullywhen the probability of success on any one attempt is

1, 2,3, 4,5, 6,...

.

p

⇒ Ω =

=

]

The time (in seconds) until a lightbulb burns out

:

0 , where

is the set of all real numbers.

t

t

⇒ Ω =

∈

≥

\

\

Applied Statistics:

Probability

Events

ˆ

Definition:

An event is a collection of points from the

sample space. Example:

the result of one throw of die is

odd.

ˆ

We use sets to describe events.

ˆ

If

is finite or countable, then a “simple” event is an event

that contains only one point from the sample space.

ˆ

Suppose we toss a coin until first Head appears.

What are

the simple events?

ˆ

Unless stated otherwise, ALL SUBSETS of a sample spaceare included as possible events.

(Generally we will not be

interested in most of these, and many events will haveprobability zero.)

From the die example let the set of "even" outcomes be

2, 4, 6.

Let the set of "odd" outcomes be

1,3,.

E

O

=

=

Ω

{ }

{ }

{ }

1

2

6

For the die example the simple events are

1 ,

2 ,...,

S

S

S

=

=

=

Applied Statistics:

Probability

Describe: sample space and events ˆ

The number of hours of normal use of a lightbulb.



Lightbulbs that last between 1500 and 1800 hours.

The individual weights of automobiles crossing a

bridge measured in tons to nearest hundredth of aton.



Autos crossing that weigh more than 3,000 pounds.

A message is transmitted repeatedly untiltransmission is successful.



Those messages transmitted 3 or fewer times.

Applied Statistics:

Probability

Operations on Events

Both

and

occur.

At least one of

or

occurs.

does not occur.

occurs and

does not occur.

the empty set (a set that contains no elements).

and

are "mutually exclus

A

B

A

B

A

B

A

B

A

A

S

A

S

A

S

A

A

B

A

B

∩

⇒

∪

⇒

⇒

∩

=

−

⇒

∅ ⇒

∩

= ∅ ⇒

ive."

Every element of

is an element of

, or, if

occurs,

occurs.

Review Venn diagrams (in text).

A

B

A

B

A

B

⊂

⇒

Because the sample space is a set,

, and any event is a subset

, we

form new events from existing events by using the usual set theory operations.

A

Ω

⊂ Ω

Applied Statistics:

Probability

Venn Diagrams Identify the following events:

A

B

C

(

)

(

)

( ) ( ) ( ) (

)

(

)

(e)

a

A

b

A

B

c

A

B

C

d

B

C

A

B

C

′

∩

∩

∪

′

∪

′

∩

∪

Applied Statistics:

Probability

Mutually Exclusive & Collectively Exhaustive ˆ

A collection of events

is said to be

mutually exclusive if

A collection of events is collectively exhaustive if

A collection of events forms a partition of

if

they are mutually exclusive and collectivelyexhaustive. A collection of mutually exclusiveevents forms a partition of an event

if

1

2

,

,...

A

A

{

if

if

.

i

j

i

j

i

j

A

A

i

j

A

A

φ

≠

=

=

∩

=

.

i

i

A

∪

= Ω

Ω

E

i

i

A

E

Applied Statistics:

Probability

Probability measure

We use a probability measure to representthe relative likelihood that a random eventwill occur.

The probability of an event

is denoted

Axioms:

(

).

P

A

A

1

2

1

A 1.

For every event

A 2.
A 3.

If

and

are m utually exclusive, then

P (A
B )=P (A )+P (B ).
A 4.

If the events

, ... are m utually exclusive, then

n

n

n

n

A
P
A
P
A
B
A
A
P
A
P
A

∞

=

=

∪

1

∞

∑

Applied Statistics:

Probability

Theorem:

(

)

[

]

[

]

[

]

[

]

[

]

Given a sample space,

, a "well-defined" collection of events,

, and a probability measure,

, defined on these events then

the following hold:(a)

(b)

1

,

.

(c)

,

,

P

P

P A

P

A

A

P A

B

P A

P B

P A

B

A

Ω

∅

=

⎡

⎤

=

−

∀

∈

⎣

⎦

∪

=

−

∩

∀

F

F

[

]

[

]

.

(d)

,

,

.

B

A

B

P A

P B

A B

∈

⊂

⇒

≤

∀

∈

F

F

You must “know” these and be able to use them to solveproblems. Don’t worry about proving them.