Part 1: Computation of E[X].
Let V={1,…,n} be the set of hipsters. The friendships form a d-regular graph G=(V,E). Let N(v) denote the set of neighbors of hipster v. ∣N(v)∣=d for all v∈V.
Let hv(t) be the indicator variable that hipster v is wearing a hat after step t. hv(0)=0 for all v.
The process is defined by a random permutation π=(π(1),…,π(n)).
At step i, let v=π(i). The state updates as follows: hv(i)=1, and for u∈N(v), hu(i)=0. For any other hipster w∈/{v}∪N(v), hw(i)=hw(i−1).
Let X be the number of hipsters wearing a hat after step n. X=∑v∈Vhv(n).
By linearity of expectation, E[X]=∑v∈VE[h.
Consider a hipster v. hv(n)=1 if and only if v is wearing a hat at the end of the process.
Let be the step at which is chosen, i.e., . At step , is set to 1.
For to remain 1, none of 's neighbors must act after step . If any neighbor acts at step , then would be set to 0.
So, if and only if for all , the step when is chosen satisfies .
This means that must be the last among the set to be chosen in the permutation .
The set has size . Since is a random permutation, any element of is equally likely to be the last one among them in the sequence .
The probability that is the last element of is .
Therefore, .
This probability is the same for all .
.
Part 2: Variance of X.
Var(.
where .
.
.
For v=u, Cov(h.
Let . .
If and are neighbors (), then and . The condition requires . The condition requires . These are contradictory, so .
for .
There are ordered pairs of adjacent vertices. The sum for adjacent pairs is .
If v and u are not neighbors (v∼u), let S and . Let . Let , where .
The event occurs if and only if is the last element chosen from and is the last element chosen from . This happens if and only if the last element chosen from in the permutation is either or .
The probability of this event is .
for .
Var(X)=n.
.
.
Let's analyze the asymptotic behavior. There are NNA=n(n−1−d) non-adjacent pairs.
. So . Thus .
.
.
.
So .
The question asks to show Var(X)=O(nd).
If d is fixed, Var(X). . So is not .
If , . . So is not .
If , . . This matches.
There might be a subtlety missed in the calculation, or the statement O(nd) might hold only under certain conditions (e.g. specific types of graphs, or regimes of d). Based on the derivation, Var(X)=O(n. If is fixed, this is . If we assume the statement is correct, maybe there is cancellation that occurs in the sum for typical regular graphs, leading to a smaller variance. Without further constraints on the graph structure or definition of , seems the most accurate bound. If we assume is true as stated, then for fixed , .
Part 3: Concentration Inequality.
We want to show Pr[X<21E[X]] is O( for every .
Let . We want .
Using Chebyshev's inequality:
.
Using and :
.
If is fixed, . Chebyshev gives .
is not for . Chebyshev's inequality is too weak.
If we assume Var(X)=O(nd) is correct, then for fixed d, Var(X)=.
Chebyshev gives .
matches for . But it does not hold for . For instance, is not .
To obtain a bound O(n−c) for every c>0, we typically need exponential decay, like O(e. This can be obtained using Chernoff bounds. Chernoff bounds apply to sums of independent random variables, or sums of weakly dependent variables. The indicator variables are not independent, but their dependency might be weak enough for Chernoff bounds to apply.
If we assume Chernoff bounds are applicable:
Let . We are interested in the lower tail probability . Let .
A standard Chernoff bound states: For , .
.
Let . Then the probability is .
decays faster than any polynomial for . As , for any .
Thus, for every .
This requires assuming (for fixed ) and applicability of Chernoff bounds.
Final Answer Summary:
- E[X]=d+1n.
- The derived variance is . This is for fixed . This contradicts the requirement unless or . Assuming the problem statement is correct, possibly due to unstated assumptions or subtler analysis, implies for fixed .
Final Answer: The final answer is E[X]=d+1n