










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Two algorithms related to probability and set theory: one for generating a random subset of a given set with a specified probability, and another one for generating a random independent set of a graph. The first algorithm uses a loop to iterate over the elements of the set, adding each one to the subset with a specified probability, and then randomly removing one endpoint of each edge between elements in the subset. The second algorithm initializes an empty set, then iterates over the vertices of the graph, adding each one to the set with a specified probability. Then, for each edge between vertices in the set, it deletes one endpoint of the edge from the set. The algorithm returns the set of vertices that remain in the set after this process.
Typology: Study notes
1 / 18
This page cannot be seen from the preview
Don't miss anything!











^ C =^ x ∨^ x ∨^ x^1 2 3 4 C =^ x ∨^ x ∨^ x^2 2 3 4 C =^ x ∨^ x ∨^ x^3 1 2 4 C =^ x ∨^ x ∨^ x^4 1 2 3 C =^ x ∨^ x ∨^ x^5 1 2 ^
'
^ ^
6
=
"/! "ρ^
8 9 ρ^ A()*
^ ^ ^ ^
^ ^ ∞ E [ X ] = j^ ⋅^ Pr[ X^ =^ j ]=^ ^ j =^0 ∞ pj −^1 j^ (1−^ p )^ p =^ j^ (1−^ p ) ^1 −^ p^ j =^0 ∞ p^1 −^ p^1 j^ =^ ⋅^ =^ ^2 1 −^ p^ p^ pj =^0
(
^ +^
Pr[ E ∩^ E ^ ∩^ E ]^ =^ Pr^1 2 n −^2
[ E ]^ ×^ Pr[ E |^ E ]^ ×^ ^ ×^ Pr^12
[ E |^ E ∩^ E ^ ∩^ E ] n −^2 1 2 n −^3 (^222) ≥ 1 − 1 −^ ^1 −^1 −( )^ (^ )(^ )^ n^ n −^14 (^2) ( )^3 n^ −^2 n^ −^321 = ^ ( )^ ( )( )^ (^ )^^ n^ n^ −^1432 = n ( n −1) (^2) ≥ 2 n
L
n −^1 n E [ X ] = E [ X^ ]^ ^ =^ j^ n^ −^ j =^0 n −^1^ n^1 ^ =^ n^^ ^ =^ n H ( n )^ j^ ij =^0 i =^1 !"#$% ^ ^ ! %"#$
B
^ ^ ^ ' *
(