Presentation is loading. Please wait.

Presentation is loading. Please wait.

Welcome to CSCA67 Discrete Mathematics for Computer Scientists

Similar presentations


Presentation on theme: "Welcome to CSCA67 Discrete Mathematics for Computer Scientists"— Presentation transcript:

1 Welcome to CSCA67 Discrete Mathematics for Computer Scientists
Anna Bretscher and Richard Pancer AA112 Bretscher Fridays 10:10-12pm SY110 Pancer Fridays 13:10-14pm

2 Evaluation Assignments 4 each worth 10%
Late assignments will be accepted up to 24 hrs late with a penalty of 25% You are encouraged to discuss the problems with other students however, the actual write up must be an individual effort You must be able to reproduce any solution that you submit. The penalty for cheating ranges from a zero on the assignment to suspension from the university

3 Evaluation Term Test Week 7 or 8 worth 20% Final Exam Worth 40%

4 Resources Course Slides Posted each week. Print them and bring to class. Website Check the announcements daily. Textbook Stein, Drysdale and Bogart, Discrete Mathematics for Computer Scientists Office Hours Tutorials

5 Course Expectations Expectations of the lecturer
Give clear, organized lectures Assign fair, challenging assignments that ensure that you, the student, understand the material Be available for help in office hours Help every student achieve their goals in the course (this requires your help!)

6 Course Expectations Expectations of the student
Attend lectures and participate Bring course notes to class Review lecture notes after each class, not just before the exam Complete homework fully, neatly and independently Have respect for your classmates and lecturers

7 Discrete Mathematics Who needs it?
Anyone in computer science or a mathematical science Why? In CS we need to be able to speak precisely without ambiguity analyze problems and formulate solutions apply the concepts associated with probability, graph theory and counting theory.

8 CS is Applied Mathematics!
Specifically, we will work on: Thinking abstractly Expressing ourselves precisely Arguing logically – i.e., inferring conclusions that necessarily result from assumptions Writing rigorous solutions Learning how mathematics and computer science work together

9 Where Does Mathematics Appear in Computer Science?
Computer Graphics Multivariable calculus, physics-based modelling Digital Signal Processing Multivariable calculus, (eg., speech understanding) Numerical Analysis Multivariable calculus, linear algebra Cryptography Number theory Networking Algorithms Graph theory, statistics, combinatorics, probability, set theory

10 Where Does Mathematics Appear in Computer Science?
Databases Set theory, logic Artificial Intelligence Programming Languages Formal Methods Set theory, logic for the specification and verification of hardware and software; (e.g., nuclear, aviation – NASA!)

11 Course Outline Counting 3 weeks Probability 2 weeks Proofs
Graph Theory

12 How Do I Become Good At This Stuff?
BY FAILING! WHAT ??? Every time you fail at solving a problem, you learn something. You take a step closer to the solution.

13 Let’s Talk About Counting
Counting shows up everywhere… Even when ordering pizza.

14 Counting Pizza Toppings
Q. Are there really 1,048,576 possibilities? A. No! The commercial got it wrong. Let’s count it ourselves.

15 Counting Pizza Toppings*
The commercial’s deal was: • 2 pizzas • up to 5 toppings on each • 11 toppings to choose from • all for $7.98 (back in 1997). The commercial’s math kid claimed there are 1,048,576 possibilities. *

16 Let’s Do The Calculation
Q. How many ways can we order a pizza with 0 toppings? A. 1 Q. How many ways can we order a pizza with 1 topping? A. 11

17 Let’s Do The Calculation
Q. How many ways can we order a pizza with 2 toppings? A. 11 choices for the first topping (assume no “double” toppings) 10 choices for the second would give 10 x 11 = 110. Order does not matter, so 110/2 = 55.

18 Let’s Do The Calculation
Q. How many ways can we order a pizza with 3 toppings? A. 11 x 10 x 9 ways to select the toppings (assume no “double” toppings) Does the order the toppings are picked matter? How many times have we over counted?

19 Let’s Do The Calculation
Q. How many times have we over counted? Let our toppings be called x, y and z. Equivalent pizzas: xyz xzy yxz yzx zxy zyx Can think of this as 3 choices for the first topping, 2 for the second, 1 choice for the last topping. 3 x 2 x 1 = 6 Total: (11 x 10 x 9) / 6

20 Let’s Do The Calculation
Q. How many ways can we order a pizza with 4 toppings? A. 11 x 10 x 9 x 8 ways to select the toppings (assume no “double” toppings) How many times have we over counted? 4 x 3 x 2 x 1 = 4! = 24 So (11 x 10 x 9 x 8) / 4!

21 Let’s Do The Calculation
Q. How many ways can we order a pizza with 5 toppings? A. 11 x 10 x 9 x 8 x 7 ways to select the toppings (assume no “double” toppings) How many times have we over counted? 5 x 4 x 3 x 2 x 1 = 5! = 120 So (11 x 10 x 9 x 8 x 7) / 5!

22 Let’s Do The Calculation
So the total number of ways to order a pizza with up to 5 toppings choosing from 11 toppings is: (11 x 10)/2 + (11 x 10 x 9)/3! + (11 x 10 x 9 x 8)/4! + (11 x 10 x 9 x 8 x 7)/5! = = 1024 Q. How did they get 1,048,576 in the commercial?

23 Let’s Do The Calculation
Q. How did they get 1,048,576 in the commercial? A. Two pizzas. So for each of the 1024 choices for the first pizza, there are 1024 choices for the second pizza x 1024 = 1, 048, 576 Q. Is 1,048,576 the correct answer? A. No. Why not?

24 Let’s Do The Calculation
Q. Why isn’t 1,048,576 the correct answer? A. We have over counted something. The order of any two pizzas doesn’t matter (Pizzas A, B are the same as B, A). Q. How do we correct this? A. Divide by 2: 1,048,576 ÷ 2 = 524, 288.

25 Let’s Do The Calculation
Q. Is 524,288 the correct answer? A. No. We have under counted something. There are not two orderings when we order two identical pizzas (A, A). But we divided by 2 before. Q. How do we correct this?

26 Let’s Do The Calculation
Q. How do we correct this? A. Add back half of the number of identical pizzas. Q. How many pairs of identical pizzas are there? A Final answer: 524, ÷2 = 524, = 524,800


Download ppt "Welcome to CSCA67 Discrete Mathematics for Computer Scientists"

Similar presentations


Ads by Google