Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Solved Homework 1 - Randomized Algorithms | CMSC 858, Assignments of Computer Science

Material Type: Assignment; Subject: Computer Science; University: University of Maryland; Term: Spring 2009;

Typology: Assignments

Pre 2010

Uploaded on 07/30/2009

koofers-user-93n
koofers-user-93n 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Solved Homework 1 - Randomized Algorithms | CMSC 858 and more Assignments Computer Science in PDF only on Docsity! CMSC 858C, Spring 2009: Ungraded Homework 1 Note: We will have ungraded homework assignments such as this one, as well as ones that will be graded. I will post the solutions for all the assignments some time after they are handed out. You will get the most out of this course if you do your best to solve all the homework problems (whether they are graded or not) by yourself. The suggested time period to finish this assignment is two weeks. 1. Recall the notions of distribution function and density function for continuous random variables. Let X be a random variable taking on values in [0, a], for some finite positive a. Assuming that X has a density function, prove that E[X] = ∫ a 0 Pr[X > y] dy. 2. Recall the different “levels” at which inclusion-exclusion can be truncated: odd levels give upper bounds on the probability of a union, and even levels give lower bounds. Choose, say, odd levels. Is it necessarily true that we get better (i.e., lower) upper bounds as we proceed to higher odd levels? Prove, or give a counterexample. 3. Luby’s (∆ + 1)-coloring algorithm took O(log n) steps with high probability, but we ignored message contentions due to adjacent nodes communicating at the same time. We fix this issue in this problem. Let us assume that: • time is discrete and is divided into equal-length time slots; • all nodes know the value of ∆; • a node can send a message to all its neighbors in one time slot (due to the broadcast nature of radio spectrum); however, if a node receives two or more messages (from different neighbors) at the same time step, or if a node receives message(s) during a time slot in which it transmits, then all these messages “collide” and will have to be retransmitted; • there are no acknowledgments, and there is no way for a node to know for sure if its transmission to its neighbors at a particular time t, has been successfully received by all of its neighbors. Show how contention resolution can be added to Luby’s protocol, so that even in the above model, we are done within a total of O(∆ log2 n) time slots with high probability (say, with probability at least 1− 1/n2). 4. Prove that in Luby’s (∆+1)-coloring algorithm, it is true that even if each node sleeps with probability zero in every iteration, the probability of success in a given iteration is at least 1/4 for every yet-uncolored node. (This may be a challenging problem.) 5. Recall the definition of the complexity class P: A language L is in P iff there exists a polynomial time algorithm A such that for all inputs x, x ∈ L → A accepts x 6∈ L → A rejects For the classRP [Randomized Polynomial Time], we say that a language L is inRP iff there exists a randomized polynomial-time algorithm (i.e., a deterministic polynomial-time algorithm that can generate and use up to polynomially many random bits) A such that for all inputs x, x ∈ L → Pr[A accepts] ≥ 1/2 1
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved