slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CS 23022 Discrete Mathematical Structures PowerPoint Presentation
Download Presentation
CS 23022 Discrete Mathematical Structures

Loading in 2 Seconds...

play fullscreen
1 / 27

CS 23022 Discrete Mathematical Structures - PowerPoint PPT Presentation


  • 137 Views
  • Uploaded on

CS 23022 Discrete Mathematical Structures. Mehdi Ghayoumi MSB rm 132 mghayoum@cs.kent.edu Ofc hr : Thur , 9:30-11:30a. Announcements. Homework 6 available. Due 07/10, 8a. Today’s lecture covers material from Rosen , sections 6.2-6.3. Product Rule. Counting.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CS 23022 Discrete Mathematical Structures' - agrata


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

CS 23022Discrete Mathematical Structures

Mehdi Ghayoumi

MSB rm 132

mghayoum@cs.kent.edu

Ofchr: Thur, 9:30-11:30a

slide2

Announcements

Homework 6 available. Due 07/10, 8a.

Today’s lecture covers material

from

Rosen, sections 6.2-6.3.

slide3

Product Rule

Counting

Suppose you have 4 shirts, 3 pairs of pants, and 2 pairs of shoes. How many different outfits do you have?

slide6

B

64

4

4

4

Product Rule

How many functions are there from set A to set B?

A

To define each function we have to make 3 choices, one for each element of A.

How many ways can each choice be made?

slide7

B

24

2

4

3

Product Rule

How many one-to-one functions are there from set A to set B?

A

To define each function we have to make 3 choices, one for each element of A.

How many ways can each choice be made?

example of product rule1
Example of Product Rule

How many Strings of 4 digits…

Do not contain the same digit twice?

End with an odd digit?

Start with an even digit?

How many Strings of 4 decimal digits…

Do not contain the same digit twice?

End with an odd digit?

Start with an even digit?

slide11

Pigeonhole Principle

If n pigeon fly into k pigeonholes and k < n, then some pigeonhole contains at least two pigeons.

slide12

We can use this simple little fact to prove amazingly complex things.

Pigeonhole Principle

If n pigeons fly into k pigeonholes and k < n, then some pigeonhole contains at least two pigeons.

slide13

0, 1, 2, 3, or 4

Pigeonhole Principle

Let S contain any 6 positive integers.

Then, there is a pair of numbers in S whose difference is divisible by 5.

Let S = {a1,a2,a3,a4,a5,a6}.

Each of these has a remainder when divided by 5. What can these remainders be?

6 numbers, 5 possible remainders…what do we know?

slide14

Some pair has the same remainder, by PHP.

Pigeonhole Principle

6 numbers, 5 possible remainders…what do we know?

Consider that pair, ai and aj, and their remainder r.

ai = 5m + r, and aj = 5n + r.

Their difference:

ai - aj = (5m + r) - (5n + r) = 5m - 5n = 5(m-n), which is divisible by 5.

generalized pigeonhole principle
Generalized Pigeonhole Principle

If N objects are placed in k boxes, then there is at least

one box containing at least N/k =˥ objects.

Example 1.

In a class of 73 students, there are at least ? who are born in the same month.

Example 2.

How many student in a class must there be to ensure that 6 student get the same grade(one of A,B,C,D or F)?

more applications of pigeonhole principle
More applications of pigeonhole principle

A bowl contain 10 red and 10 yellow balls

How many balls must be selected to ensure 3 yellow balls?

Consider the worst case:

Consider 10 red balls and 2 yellow balls ,

Answer?

slide17

Permutations

There are basically two types of permutation:

Repetition is Allowed:

such as 4 digits above. It could be "3333".

No Repetition:

such as 4 digits above. It could be "3624".

slide18

Permutations with Repetition

When we have n things to choose from ... then

we have n choices each time!

When choosing r of them, the permutations are:

n × n × ... (r times)

(In other words, there are n possibilities for the first choice, THEN there are n possibilites for the second choice, and so on, multplying each time.)

Which is easier to write down using an exponent of r:

n × n × ... (r times) = nr

slide19

Permutations with Repetition

Example: in a lock , there are 10 numbers to choose from (0,1,...9) and we choose 3 of them:

10 × 10 × ... (3 times) = 103 = 1,000 permutations

So, the formula is simply:

slide20

Permutations without Repetition

In this case, we have to reduce the number of available choices each time.

So, our first choice would have 10 possibilites, and our next choice would then have 9 possibilities, then 8, 7, etc. And the total permutations would be:

  • 10 × 9 × 8 × 7 × ...×2×1 = …

But maybe we don't want to choose them all, just 3 of them, so that would be only:

  • 10 × 9 × 8 = 720

In other words, there are 720 different ways that 3 digits code could be selected out of 10 digits.

slide21

Permutations without Repetition

For example, what order could 16 pool balls be in?

After choosing, say, number "14" we can't choose it again

But how do we write that mathematically? Answer: we use the "factorial function"

So, if we wanted to select all of the billiard balls the permutations would be:

16! = 20,922,789,888,000

But if we wanted to select just 3, then we have to stop the multiplying after 14. How do we do that? There is a neat trick ... we divide by 13! ...

Do you see? 16! / 13! = 16 × 15 × 14

slide22

Permutations without Repetition

Our "order of 3 out of 16 pool balls example" would be:

How many ways can first and second place be awarded to 10 people?

slide23

P(n,r) = n! / (n-r)!

  • 60
  • 125
  • 12!/7!
  • 512
  • No clue

Permutations

In a running race of 12 sprinters, each of the top 5 finishers receives a different medal. How many ways are there to award the 5 medals?

11

10

9

8

12

A permutation is an ordered arrangement of objects.

The number of permutations of r distinct objects chosen from n distinct objects is denoted P(n,r).

slide24

P(17,10) = 17x16x15x14x13x12x11

Permutations

Suppose you have time to listen to 10 songs on your daily jog around campus. There are 6 Cake tunes, 8 Moby tunes, and 3 Eagles tunes to choose from.

How many different jog playlists can you make?

slide25

P(6,4) x P(8,4) x P(3,2)

Permutations

Suppose you have time to listen to 10 songs on your daily jog around campus. There are 6 Cake tunes, 8 Moby tunes, and 3 Eagles tunes to choose from.

Now suppose you want to listen to 4 Cake, 4 Moby, and 2 Eagles tunes, in that band order. How many playlists can you make?

slide26

P(6,4) x P(8,4) x P(3,2) x 3!

Permutations

Suppose you have time to listen to 10 songs on your daily jog around campus. There are 6 Cake tunes, 8 Moby tunes, and 3 Eagles tunes to choose from.

Finally, suppose you still want 4 Cake, 4 Moby, and 2 Eagles tunes, and the order of the groups doesn’t matter, but you get dizzy and fall down if all the songs by any one group aren’t played together.

How many playlists are there now?