Download presentation
Presentation is loading. Please wait.
Published byChristal Josephine McGee Modified over 6 years ago
1
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
2
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
3
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
4
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
5
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
6
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
7
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
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
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
17
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
18
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
19
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.