1 / 15

The probabilistic method

The probabilistic method. Sometimes probability helps us solve problems that do not involve randomness at all. Friends and “non-friends”. Among every six people, there must be three that are all friends or are all “non-friends”. Proof:. I must have at least 3 friends,

lana-ramsey
Download Presentation

The probabilistic method

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The probabilistic method

  2. Sometimes probability helps us solve problems that do not involve randomness at all.

  3. Friends and “non-friends” Among every six people, there must be three that are all friends or are all “non-friends”. Proof: I must have at least 3 friends, or at least 3 non-friends If I have 3 friends: Either they are all non-friends with one another, Or a pair of them are friends, so the three of us are all friends.

  4. Ramsey’s theorem Among every 4n people, there must be n that are all friends or all “non-friends”. 4n is a very large number! E.g. when n = 40, 4n = 109 951 162 777 Do we really need that many people for that?

  5. Erdös’s theorem There can be 2n/2 - 1people among which no n of them are all friends or all non-friends. (for n≥ 3) Proof: Let N = 2n/2 - 1 Probability model: Every pair is friends with probability ½, independently of the others. Let X be the number of groups of n people that are all friends or all non-friends.

  6. Erdös’s theorem X = ∑ groups g of n peopleXg, where Xg is an indicator r.v. for the event “People in g are all friends or all non-friends.” E[Xg] = P(Xg= 1) = 2∙2-C(n, 2) E[X] = ∑ groups gE[Xg] • = C(N, n) ∙ 2 ∙ 2-C(n, 2) • ≤ Nn∙ 2 ∙ 2-C(n, 2) • = 2n log N + 1 – n(n – 1)/2 • < 1.

  7. Erdös’s theorem Because E[X] < 1, it must be that P(X = 0) > 0. So the event X = 0 can happen. But X = 0 means there is no group of npeople in which all are friends or all are non-friends. We used probability not to model any reality, but as a tool to solve a mathematical problem about friendships.

  8. Quicksort 1. Choose a pivot stick p. 2. Go over all other sticks from left to right: Move all sticks shorter than p to the left of p and all sticks longer than p to the right of p. 3. Recursively sort sticks to the left of p. 4. Recursively sort sticks to the right of p.

  9. Quicksort How to choose the pivot?

  10. Quicksort Every pivot works, but some take us there faster than others We will measure the number N of pairwise comparisons done by the algorithm N depends on the input and on the choice of pivot We want to choose the pivot so N is small regardless of the input

  11. Quicksort Example: What if we always chose the leftmost pivot? requires all possibleC(n, 2) comparisons for n sticks For any fixed pivot-choosing strategy there is an input that entails all possible C(n, 2) comparisons

  12. The randomized quicksort algorithm 1. Choose a pivot stick p uniformly at random. 2. Go over all other sticks from left to right: Move all sticks shorter than p to the left of p and all sticks longer than p to the right of p. 3. Recursively sort sticks to the left of p.

  13. Analysis of randomized quicksort The numberNof pairwise comparisons is now a random variable that depends on the pivot choices N = N12 + N13 + ... + N(n-1)n where Nij is an indicator r.v. for the event “the ith and jth shortest sticks were compared at some point” Nij = 0 happens if sticks i and j were split before either was chosen as pivot

  14. Analysis of randomized quicksort P(Nij = 0) = i j P(Nij = 1) = E[N] = E[N12] + E[N13] + ... + E[N(n-1)n] + ... + 1 × 2/n (n – 1) × 2/2 + (n – 2) × 2/3 = ≤ n × (2/2 + 2/3 + ... + 2/n) ≤ 2n ln n. j – i – 1 2 j – i + 1 j – i + 1

  15. What is next? If you like probability you will find lots of it... Computer networks [CSCI 4430, CSCI 5470] Algorithm design [CSCI 3160, CSCI 5450] Machine learning [CSCI 3320] Reliable communication [IERG 3010, IERG 5154] Secure communication and computation [CSCI 5440] Data privacy [CSCI 5520] The nature of efficient computation [CSCI 5170]

More Related