Exercises

ex-ch01-01

Easy

A MapReduce job has N=20N = 20 workers storing equal disjoint partitions of a V=5V = 5 GB intermediate file. How much aggregate network traffic does an uncoded shuffle generate?

ex-ch01-02

Easy

Ten workers have i.i.d. exponential task-completion times with rate λ=1\lambda = 1. Find E[T(10)]\mathbb{E}[T_{(10)}], the expected wait for the slowest worker.

ex-ch01-03

Easy

A federated-learning round uses n=500n = 500 users, model size d=107d = 10^7 parameters, b=16b = 16 bits per scalar. Compute the total per-round uplink traffic.

ex-ch01-04

Easy

True or false: adding more workers to a synchronous distributed iteration always decreases the per-iteration wall-clock time.

ex-ch01-05

Medium

Derive the coded communication load Δcoded(μ)=(1μ)/(Nμ)\Delta_{\text{coded}}(\mu) = (1 - \mu)/(N\mu) for MapReduce with μ{1/N,2/N,,1}\mu \in \{1/N, 2/N, \ldots, 1\}, starting from the pair (μ,Δ)(\mu, \Delta) endpoints (μ=1/N,Δ=11/N)(\mu=1/N, \Delta = 1-1/N) and (μ=1,Δ=0)(\mu=1, \Delta = 0). Verify that the curve is convex and interpolates the two endpoints.

ex-ch01-06

Medium

For a redundant scheme with recovery threshold KNK \leq N and i.i.d. exponential task times (rate λ\lambda), derive E[T(K)]=(HNHNK)/λ\mathbb{E}[T_{(K)}] = (H_N - H_{N-K})/\lambda and compute its limit as NN \to \infty with K/Nα(0,1)K / N \to \alpha \in (0, 1).

ex-ch01-07

Medium

A parameter server has 11 Gbps of ingress bandwidth and a round must complete in under 11 second. The model has d=108d = 10^8 parameters at b=32b = 32 bits. What is the maximum number of users nn that can be aggregated per round in the plaintext (no-privacy) baseline?

ex-ch01-08

Medium

Suppose a federated-learning service claims "privacy by design" because "raw data never leaves the device". Identify at least three ways the service can still leak information to the cloud provider, and map each to the chapter of this book that addresses it.

ex-ch01-09

Medium

Consider a coded scheme with recovery threshold K=8K = 8 for an iteration that uses N=10N = 10 workers, each with i.i.d. exponential task times of rate λ=1\lambda = 1. Compute E[T(8)]\mathbb{E}[T_{(8)}] and compare with E[T(10)]\mathbb{E}[T_{(10)}].

ex-ch01-10

Medium

Describe a threat model where an honest-but-curious parameter server can be implemented with no privacy-preserving protocol at all, and explain what has to be true of the deployment for this to be defensible.

ex-ch01-11

Medium

Plot (analytically) the ratio R(N)=E[T(N)]/E[Ti]R(N) = \mathbb{E}[T_{(N)}] / \mathbb{E}[T_i] as a function of NN for i.i.d. exponential task times. What does this tell you about the "price of synchrony"?

ex-ch01-12

Hard

Show that for arbitrary i.i.d. task-time distributions (not necessarily exponential) with finite variance, the expected latency E[T(N)]\mathbb{E}[T_{(N)}] is monotone non-decreasing in NN. Find a counterexample to the claim "E[T(N)]E[T(N1)]\mathbb{E}[T_{(N)}] - \mathbb{E}[T_{(N-1)}] is decreasing in NN".

ex-ch01-13

Hard

A distributed-training protocol needs to tolerate BB Byzantine workers (who send adversarially crafted outputs). Argue informally that any such protocol must have communication complexity at least Ω(nd+Bd)\Omega(n d + B d) in the large-dd regime. (A precise proof requires tools from Chapter 11.)

ex-ch01-14

Hard

Suppose you deploy a federated-learning service with n=106n = 10^6 users, model d=109d = 10^9, 32-bit gradients, and a training budget of 100 GB of total per-round uplink (aggregate across users). What is the largest fraction of the model gradient that each user can upload? Propose a sparsification scheme consistent with that budget and discuss the convergence implications.

ex-ch01-15

Challenge

Consider a hybrid scheme: NN workers, recovery threshold KK, i.i.d. exponential task times rate λ\lambda, plus a limited asynchronous buffer that can absorb one worker's response one round early (i.e., the first-to-finish worker of the current round pre-starts its next round's work immediately). Derive the expected iteration latency and show where the scheme sits relative to the synchronous KK-of-NN latency.