Discrete Math for CS CMPSC 360 LECTURE 44 Last time:

Slides:



Advertisements
Similar presentations
Randomized Algorithms Randomized Algorithms CS648 Lecture 2 Randomized Algorithm for Approximate Median Elementary Probability theory Lecture 2 Randomized.
Advertisements

Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 1 (Part 1) Introduction/Overview Tuesday, 9/4/01.
Math 308 Discrete Mathematics Discrete Mathematics deals with “Separated” or discrete sets of objects (rather than continuous sets) Processes with a sequence.
Probability Distributions
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 1 (Part 1) Introduction/Overview Tuesday, 9/3/02.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Review Lecture Tuesday, 12/10/02.
Discrete Structures for Computer Science Ruoming Jin MW 5:30 – 6:45pm Fall 2009 rm MSB115.
Relationships Between Structures “→” ≝ “Can be defined in terms of” Programs Groups Proofs Trees Complex numbers Operators Propositions Graphs Real.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
More Computational Complexity Shirley Moore CS4390/5390 Fall August 29,
Instructor: Shengyu Zhang. First week Part I: About the course Part II: About algorithms and complexity  What are algorithms?  Growth of functions 
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 29.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Review Lecture Tuesday, 12/11/01.
Computational Complexity Shirley Moore CS4390/5390 Fall 2013 August 27, 2013.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
David Evans CS588: Security and Privacy University of Virginia Computer Science Lecture 15: From Here to Oblivion.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
PROBABILITY AND COMPUTING RANDOMIZED ALGORITHMS AND PROBABILISTIC ANALYSIS CHAPTER 1 IWAMA and ITO Lab. M1 Sakaidani Hikaru 1.
CS Lecture 22 Graph Theory. Can I draw the above figure in one continuous trace with no line being drawn twice?
A Prime Example CS Lecture 20 A positive integer p  2 is prime if the only positive integers that divide p are 1 and p itself. Positive integers.
Costas Busch - LSU 1 More NP-complete Problems. Costas Busch - LSU 2 Theorem: If: Language is NP-complete Language is in NP is polynomial time reducible.
P & NP.
Introduction to Discrete Probability
Now it’s time to look at…
ICS 253: Discrete Structures I
Chapter 7: Counting Principles
Richard Anderson Lecture 26 NP-Completeness
Lecture 5 0f 6 TOPIC 10 Independent Events.
More NP-complete Problems
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
More NP-complete Problems
Richard Anderson Lecture 26 NP-Completeness
ENGR 201: Statistics for Engineers
CHAPTER 12: Introducing Probability
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Discrete Math for CS CMPSC 360 LECTURE 4 Last time and recitations:
CS330 Discussion 6.
Intro to Theory of Computation
Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting.
Intro to Theory of Computation
Discrete Math for CS CMPSC 360 LECTURE 32 Last time: Review. Today:
Monte Carlo Approximations – Introduction
CS154, Lecture 16: More NP-Complete Problems; PCPs
Lecture 11 Sections 5.1 – 5.2 Objectives: Probability
Intro to Theory of Computation
Graph Theory.
More NP-complete Problems
Richard Anderson Lecture 25 NP-Completeness
Discrete Math for CS CMPSC 360 LECTURE 12 Last time: Stable matching
Decidability Turing Machines Coded as Binary Strings
Decidability Turing Machines Coded as Binary Strings
Discrete Math for CS CMPSC 360 LECTURE 13 Last time:
Now it’s time to look at…
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
Prabhas Chongstitvatana
Intro to Theory of Computation
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Now it’s time to look at…
Lecture 11: Binomial and Poisson Distributions
Applied Discrete Mathematics Week 12: Discrete Probability
CS154, Lecture 16: More NP-Complete Problems; PCPs
Randomized Algorithms CS648
CSE 589 Applied Algorithms Spring 1999
Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Today:
Concepts of Computation
Discrete Math for CS CMPSC 360 LECTURE 34 Last time:
Sofya Raskhodnikova; Intro Theory of Computation
Presentation transcript:

Discrete Math for CS CMPSC 360 LECTURE 44 Last time: Countable/uncountable sets Diagonalization argument Existence of problems that can’t be solved by computers. The Halting problem. Today: Review. Some topics of the exam problems. Wrap up. CMPSC 360 11/29/2018

Clicker question (frequency BC) Let X be the number of heads in 𝑛 independent coin tosses of a fair coin. What are the expectation and the variance of X? 0.5𝑛 and 0.25𝑛, respectively. (A) has correct expectation, but wrong variance. (A) has wrong expectation, but correct variance. Both expectation and variance are wrong in (A). 11/29/2018

Clicker question (frequency BC) The Triangle Fraternity is organizing a party. They invited 𝑛 guests (𝑛≥2). To keep track of which guests know which other guests, they've drawn a directed graph 𝐺 with 𝑛 nodes (one per guest), with an edge from guest 𝑥 to guest 𝑦 whenever 𝑥 knows 𝑦. A guest 𝑥 is a celebrity if every other guest knows 𝑥, but 𝑥 does not know any other guest. For this picture: A is a celebrity. B is a celebrity. C is a celebrity. D is a celebrity. There are no celebrities. A B C D 11/29/2018

Clicker question (frequency BC) The Triangle Fraternity is organizing a party. They invited 𝑛 guests (𝑛≥2). To keep track of which guests know which other guests, they've drawn a directed graph 𝐺 with 𝑛 nodes (one per guest), with an edge from guest 𝑥 to guest 𝑦 whenever 𝑥 knows 𝑦. A guest 𝑥 is a celebrity if every other guest knows 𝑥, but 𝑥 does not know any other guest. For this picture: A is a celebrity. B is a celebrity. C is a celebrity. D is a celebrity. There are no celebrities. A B C D 11/29/2018

Clicker question (frequency BC) A guest 𝑥 is a celebrity if every other guest knows 𝑥, but 𝑥 does not know any other guest. If a party has a celebrity, can it have a Eulerian cycle (the one that visits every edge exactly once)? Can it have a Hamiltonian cycle (the one that visits each node exactly once)? It can have both. Eulerian, but not Hamiltonian. Hamiltonian, but not Eulerian. It can have neither. A B C D 11/29/2018

Clicker question (frequency BC) A guest 𝑥 is a celebrity if every other guest knows 𝑥, but 𝑥 does not know any other guest. How many celebrities can a party have? 0 or 1. 0 or 1 or 2. 0 or 1 or 2 or 3. Any integer from 0 to 𝑛. None of the above. 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Examples: The probability that 𝑥 knows 𝑦 and 𝑦 also knows 𝑥 is 𝑝 2 . The probability that 𝑤 knows 𝑥 and 𝑦 but doesn’t know 𝑧 is 𝑝 2 1−𝑝 . 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. What is the probability space? Uniform over all directed graphs on 𝑛 nodes. Uniform over all undirected graphs on 𝑛 nodes. A pair knows each other with probability 𝑝 and does not know each other with probability 1−𝑝. 1/ 𝑛 2 The set of all directed graphs, where each graph with 𝑘 edges for 𝑘=0,1,…,𝑛(𝑛−1) has probability 𝑝 𝑘 1−𝑝 𝑛 𝑛−1 −𝑘 . 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. What is the probability that all guests know each other? 𝑝 𝑛 𝑝 𝑛(𝑛−1) 𝑝 𝑛 2 1/ 𝑛 2 𝑝 𝑛(𝑛−1)/2 . 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let X be the number of pairs of guests that know each other. What is the value of X for the depicted outcome? 1 2 𝑝 2 None of the above. A B C D 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let X be the number of pairs of guests that know each other. What is the expectation of X? 𝑝𝑛. 𝑝 2 𝑛. 𝑝 2 𝑛(𝑛−1)/2. 𝑝 2 𝑛 𝑛−1 . None of the above. 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let X be the number of pairs of guests that know each other. What is the variance of X? 𝑝 2 𝑛 2 −𝑝 4 𝑛 2 2 𝑝 2 𝑛. 𝑝 2 𝑛 2 𝑝 2 (1− 𝑝 2 ) 𝑛 2 None of the above. 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let’s pick a particular guest 𝑣. What is the probability that 𝑣 is a celebrity? 𝑝 𝑛 (1−𝑝) 𝑛 𝑝 𝑛−1 𝑝 𝑛 𝑝 𝑛−1 (1−𝑝) 𝑛−1 None of the above. 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let 𝑞 be the probability that 𝑣 is a celebrity (from the previous slide). What is the expected number of celebrities? 𝑝𝑛. 𝑞𝑛. 𝑝 𝑛 2 . 𝑞 𝑛 2 . None of the above. 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let 𝑞 be the probability that 𝑣 is a celebrity (from the previous slide). Let’s pick another guest 𝑢. What is the probability that 𝑢 knows 𝑣, given that 𝑢 is not a celebrity? 1−𝑝. 𝑝/𝑞. 𝑝/(1−𝑞). 𝑞/(1−𝑝). None of the above. 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let 𝑞 be the probability that 𝑣 is a celebrity (from the previous slide). What is the probability that one of 𝑢 and 𝑣 is a celebrity? 𝑞. 2𝑞. 𝑞− 𝑞 2 . 2𝑞− 𝑞 2 . None of the above. Hint: They can’t be celebrities together. 11/29/2018

Clicker question (frequency BC) Suppose G is generated randomly as follows. 𝑥 knows 𝑦 with probability 𝑝 for every two guests 𝑥 and 𝑦. All such events are independent. Let 𝑞 be the probability that 𝑣 is a celebrity (from the previous slide). What is the probability that there are no celebrities? 1−𝑛𝑞. 1−𝑞 𝑛 . 1− 𝑞 𝑛 . 𝑞 𝑛 . None of the above. Hint: They can’t be celebrities together. 11/29/2018

Wrap Up Some of the topics we covered: logic, proofs, modular arithmetic, polynomials, graphs, counting, probability, countability, computability. Applications we covered: RSA, error-correcting codes, secret sharing, hashing, load balancing, limits of computation. Skills we worked on: rigorous thinking about computer science problems; problem solving. 11/29/2018

What is next? CMPSC 465: Data Structures and Algorithms CMPSC 464: Theory of Computation More advanced classes: cryptography, randomized algorithms, sublinear algorithms, privacy, machine learning, quantum computing, programming languages,… Keep in touch! 11/29/2018