Top Banner
Discrete Problems CSCI 2824 Discrete Structures Prof. Mike Eisenberg TR, 2-3:15 ECCR 265
18

Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

May 23, 2018

Download

Documents

trandien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Discrete Problems!

CSCI 2824!Discrete Structures!

Prof. Mike Eisenberg!TR, 2-3:15 ECCR 265!

Page 2: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Let’s get started…

Mr. Smith and his wife invited four other couples for aparty. When everyone arrived, some of the people in theroom shook hands with some of the others. Of course,nobody shook hands with their spouse and nobody shookhands with the same person twice.

After that, Mr. Smith asked everyone how many times theyshook someone’s hand. He received different answers fromeverybody.

How many times did Mrs. Smith shake someone’s hand?

Page 3: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Administrivia • Class Website:!http://l3d.cs.colorado.edu/~ctg/classes/struct11/Home.html

• Textbook:!Ensley and Crawley, Discrete Mathematics (available at bookstore)!

•Prerequisites:!Mathematical fearlessness; or if not that, a willingness to cultivate

it!

• Assignments/Grading:!5 problem sets (60 %),final exam (25%), problem

projects (15%)!!

Page 4: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Assignments

•  This week: read Ensley and Crawley, 1.1-1.3

•  Next week: 1.4-1.6

Page 5: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

What is Discrete Mathematics?

•  It’s not this:

Page 6: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

What is Discrete Mathematics?

•  Or this:

Page 7: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

What is Discrete Mathematics?

•  Or this:

Page 8: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Converging on a description…

•  Things that aren’t calculus (or more generally, things that don’t involve infinitesimals)

•  A grab-bag of topics: logic, combinatorics, number theory, graph theory, set theory

Page 9: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

The Way I’d Like to Think About This Course.

•  How to solve problems:

Page 10: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Polya’s Strategies

•  Guess and check •  Make an orderly list •  Consider special or extreme cases •  Draw a picture •  Solve a simpler problem

Page 11: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Polya’s Strategies

•  Guess and check •  Make an orderly list •  Consider special or extreme cases •  Draw a picture •  Solve a simpler problem •  Write a program! (Not in Polya’s original

list…)

Page 12: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Heuristics

•  Analogy: can you find a related (or simpler) problem and solve that?

•  Working backward: what happens if you start with the goal?

•  Decomposition: Can you rope off and solve a part of the problem?

•  Solving again: Once you’ve solved a problem, suppose you try approaching it an entirely different way?

Page 13: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.
Page 14: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

A Graph Theory Problem

•  Imagine that we have a gathering of six people, some of whom know each other and some of whom do not. Show that there must be a trio of people who are mutual friends or who are mutually unknown to each other.

Page 15: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

A Counting Problem

•  Suppose we have an N-bit word (a word consisting of N elements, each “0” or “1”). How many distinct such words are there?

•  How many distinct N-bit words are there which do not have two consecutive 0’s?

Page 16: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

A Number Problem

•  Lockers numbered 1 to 100 stand in a row at the school gym. When the first student arrives, she opens all the lockers. The second student then goes through and recloses all the even-numbered lockers; the third student changes the state of every locker whose number is a multiple of 3. This continues until 100 students have passed through. Which lockers are now open? –  From P. Winkler, Mathematical Puzzles

Page 17: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Playing

There are three Styrofoam cups on the table. Imagine thatyou have eleven coins, and your job is to place all the coins in thecups so that there is an odd number of coins inside each cup.

No great difficulty doing this: you could put 7 coins, 3, and 1 in thethree cups, respectively.

Now, suppose you have ten coins. Can you place all the coins in thecups so that each cup contains an odd number of coins?

-- based on Gardner, "Aha! Insight"

Page 18: Discrete Problems - University of Colorado Boulderl3d.cs.colorado.edu/~ctg/classes/struct11/lecslides/DiscStruc2011L... · Discrete Problems! CSCI 2824! Discrete Structures! Prof.

Let’s Go to the Syllabus…