I put together in a single file all the lectures given by me. On the class webpage you can also find the scribes of the two guest lectures, and the students’ presentations. Many thanks to Matthew Dippel, Xuangui Huang, Chin Ho Lee, Biswaroop Maiti, Tanay Mehta, Willy Quach, and Giorgos Zirdelis for doing an excellent job scribing these lectures. (And for giving me perfect teaching evaluations. Though I am not sure if I biased the sample. It went like this. One day I said: “Please fill the student evaluations, we need 100%.” A student said: “100% what? Participation or score?” I meant participation but couldn’t resist replying jokingly “both.”) Finally, thanks also to all the other students, postdocs, and faculty who attended the class and created a great atmosphere.
Guest lecture by Huacheng Yu on dynamic data structure lower bounds, for the 2D range query and 2D range parity problems. Thanks to Huacheng for giving this lecture and for feedback on the write-up.
What is covered.
- Overview of Larsen’s lower bound for 2D range counting.
- Extending these techniques for for 2D range parity.
Definition 1. 2D range counting
Give a data structure that maintains a weighted set of 2 dimensional points with integer coordinates, that supports the following operations:
- UPDATE: Add a (point, weight) tuple to the set.
- QUERY: Given a query point , return the sum of weights of points in the set satisfying and .
Definition 2. 2D range parity
Give a data structure that maintains an unweighted set of 2 dimensional points with integer coefficients, that supports the following operations:
- UPDATE: Add a point to the set.
- QUERY: Given a query point , return the parity of the number of points in the set satisfying and .
Both of these definitions extend easily to the -dimensional case, but we state the 2D versions as we will mainly work with those.
All upper bounds assume the RAM model with word size .
Upper bounds: Using range trees, we can create a data structure for 2D range counting, with all update and query operations taking time time. With extra tricks, we can make this work for 2D range parity with operations running in time .
Lower bounds. There are a series of works on lower bounds:
- Fredman, Saks ’89 – 1D range parity requires .
- Patrascu, Demaine ’04 – 1D range counting requires .
- Larsen ’12 – 2D range counting requires .
- Larsen, Weinstein, Yu ’17 – 2D range parity requires .
This lecture presents the recent result of [Larsen ’12] and [Larsen, Weinstein, Yu ’17]. They both use the same general approach:
- Show that, for an efficient approach to exist, the problem must demonstrate some property.
- Show that the problem doesn’t have that property.
All lower bounds are in the cell probe model with word size .
We consider a general data structure problem, where we require a structure that supports updates and queries of an unspecified nature. We further assume that there exists an efficient solution with update and query times . We will restrict our attention to operation sequences of the form . That is, a sequence of updates followed by a single query . We fix a distribution over such sequences, and show that the problem is still hard.
3.1 Chronogram method [FS89]
We divide the updates into epochs, so that our sequence becomes:
where and . The epochs are multiplicatively shrinking. With this requirement, we have that .
Let be the set of all memory cells used by the data structure when run on the sequence of updates. Further, let be the set of memory cells which are accessed by the structure at least once in , and never again in a further epoch.
Claim 2. There exists an epoch such that probes cells from when answering the query at the end. Note that this is simply our query time divided by the number of epochs. In other words, can’t afford to read cells from each set without breaking its promise on the query run time.
Claim 2 implies that there is an epoch which has the smallest effect on the final answer. We will call this the ”easy” epoch.
Idea. : The set contains ”most” information about among all memory cells in . Also, are not updated past epoch , and hence should contain no information relative to the updates in . Epochs are progressively shrinking, and so the total touched cells in during the query operation should be small.
Having set up the framework for how to analyze the data structure, we now introduce a communication game where two parties attempt to solve an identical problem. We will show that, an efficient data structure implies an efficient solution to this communication game. If the message is smaller than the entropy of the updates of epoch (conditioned on preceding epochs), this gives an information theoretic contradiction. The trick is to find a way for the encoder to exploit the small number of probed cells to send a short message.
The game. The game consists of two players, Alice and Bob, who must jointly compute a single query after a series of updates. The model is as follows:
- Alice has all of the update epochs . She also has an index , which still corresponds to the ”easy” epoch as defined above.
- Bob has all update epochs EXCEPT for . He also has a random query . He is aware of the index .
- Communication can only occur in a single direction, from Alice to Bob.
- We assume some fixed input distribution .
- They win this game if Bob successfully computes the correct answer for the query .
Theorem 3. If there is a data structure with update time and probes cells from in expectation when answering the final query , then the communication game has an efficient solution, with communication cost, and success probability at least . This holds for any choice of .
Before we prove the theorem, we consider specific parameters for our problem. If we pick
then, after plugging in the parameters, the communication cost is . Note that, we could always trivially achieve by having Alice send Bob all of , so that he can compute the solution of the problem with no uncertainty. The success probability is , which simplifies to . This is significantly better than , which could be achieved trivially by having Bob output a random answer to the query, independent of the updates.
We assume we have a data structure for the update / query problem. Then Alice and Bob will proceed as follows:
- Simulate on . While doing so, keep track of memory cell accesses and compute .
- Sample a random subset , such that .
- Send .
We note that in Alice’s Step 3, to send a cell, she sends a tuple holding the cell ID and the cell state before the query was executed. Also note that, she doesn’t distinguish to Bob which cells are in which sets of the union.
- Receive from Alice.
- Simulate on epochs . Snapshot the current memory state of the data structure as .
- Simulate the query algorithm. Every time attempts to probe cell , Bob checks if . If it is, he lets probe from . Otherwise, he lets probe from .
- Bob returns the result from the query algorithm as his answer.
If the query algorithm does not query any cell in , then Bob succeeds, as he can exactly simulate the data structure query. Since the query will check cells in , and Bob has a random subset of them of size , then the probability that he got a subset the data structure will not probe is at least . The communication cost is the cost of Alice sending the cells to Bob, which is
Theorem 1. Consider an arbitrary data structure problem where queries have 1-bit outputs. If there exists a data structure having:
- update time
- query time
- Probes cells from when answering the last query
Then there exists a protocol for the communication game with bits of communication and success probability at least , for any choice of . Again, we plug in the parameters from 2D range parity. If we set
then the cost is , and the probability simplifies to .
We note that, if we had different queries, then randomly guessing on all of them, with constant probability we could be correct on as many as . In this case, the probability of being correct on a single one, amortized, is .
Proof. The communication protocol will be slightly adjusted. We assume an a priori distribution on the updates and queries. Bob will then compute the posterior distribution, based on what he knows and what Alice sends him. He then computes the maximum likelihood answer to the query . We thus need to figure out what Alice can send, so that the answer to is often biased towards either or .
We assume the existence of some public randomness available to both Alice and Bob. Then we adjust the communication protocol as follows:
Alice’s modified steps.
- Alice samples, using the public randomness, a subset of ALL memory cells , such that each cell is sampled with probability . Alice sends to Bob. Since Bob can mimic the sampling, he gains additional information about which cells are and aren’t in .
Bob’s modified steps.
- Denote by the set of memory cells probed by the data structure when Bob simulates the query algorithm. That is, is what Bob ”thinks” D will probe during the query, as the actual set of cells may be different if Bob had full knowledge of the updates, and the data structure may use that information to determine what to probe. Bob will use to compute the posterior distribution.
Define the function to be the ”bias” when takes on the value . In particular, this function is conditioned on that Bob receives from Alice. We can then clarify the definition of as
In particular, has the following two properties:
In these statements, the expectation is over everything that Bob knows, and the probabilities are also conditioned on everything that Bob knows. The randomness comes from what he doesn’t know. We also note that when the query probes no cells in , then the bias is always , since the a posterior distribution will put all its weight on the correct answer of the query.
Lemma 2. For any with the above two properties, there exists a such that and
Note that the sum inside the absolute values is the bias when .
After (reading?) my previous post, a bank agent suggested I get a “buyer-ready” mortgage commitment from the bank. This, they said, would make me “compete with cash buyers”. Naturally, I was suspicious, but they insisted that my offer would be “indistinguishable” from a cash offer, from the point of view of the seller. What can I tell you? I fell for the cs terminology.
I spent months fishing out, producing, and emailing back-and-forth documents. I found a little strange that my being tenured did not affect their evaluation of my financial stability the least. I thought I could provide a small but stable cash flow that they could reliably bleed white over the course of my remaining lifetime. The only logical explanation I have is that they benefit if I default. Instead, they were very curious about exactly why I wrote multiple checks for a few thousand dollars that were cashed in California?
The barrage of bureaucracy got to the point that I had to switch lender, in favor of someone who was less demanding in that department. At long last, I got back into the market, however only to find out that the document I had chased so hard was almost completely worthless. To explain in one word: appraisal.
This buyer-ready commitment is still contingent on appraisal. This means that after the offer is accepted, the bank still has to go there and see the property, and decide if it is valued right. Only in that case I get the mortgage. That means that the seller can’t be sure I have the dough, so why should they bother with me? Indeed, they don’t. The only slight advantage that this document provides is a little saving in time over someone who has to get a mortgage from scratch. But that has nothing to do with competing against cash buyers.
For the benefit of posterity, let me list the three main contingencies related to buying real-estate the old way.
MORTGAGE: This is whether the bank thinks that you (the buyer) are financially stable enough to be given a loan. This is the check that you can preprocess with the “buyer-ready commitment.”
APPRAISAL: As mentioned above, this is whether the bank thinks that the *property* is actually worth the money they put down. This can’t be done until after an offer is accepted, requires one-two appraisers, and guess who pays for them. In today’s crazy market when properties are sold way over asking price, you can’t be sure at all that the appraiser will say the house is worth what you pay for. At least, I can’t. And if they don’t, you are supposed to pay for the difference, which most likely you don’t have. For example, putting down all your savings of $200k, you can get a loan of $800k, for a purchase price of $1M. The house which you saw listed for $800k is sold for $1M, but the appraiser says the right price is $900k. Either you find another $100k quick, or you lose the 5% you gave at the purchase and sale (and the deal is over). Appraisal should not be confused with assessment, which is how much the town thinks the house is worth for tax purposes.
INSPECTION: OK, you can forget this. Moreover, from my experience a general inspection is nearly useless. If you are paying $1M for a house, why do you care if the boiler needs to be updated? Anything which interests me, like does this house have lead/asbestos/mold/structural damage/pest etc. the inspector can’t answer on the spot. For each of those things you need a different specialist, which you can’t get in time, and who can’t even do the job until the house is yours (because for example they can’t collect samples).
The running joke in the area where I am looking continues to be to list houses ridiculously below market price, and then have inexperienced families stress over their offers just to see them wiped out by yet another $1M cash. There are reasons slightly more subtle than my poverty why I think this is outrageous. Today’s house-buying protocol does nothing but force poor people into gambling desperate offers which could result in their financial ruin. Why don’t we also legalize Russian Roulette then? I think today’s protocol should be made illegal. That is, we should find a way so that someone with a mortgage has a fair shot at buying a house. There are several ways in which this could be realized. For example, the offers should not reveal the appraisal contingency. The fact that the buyer pays for the appraisal prevents them from making baseless offers. And the millionaires who offered less can wait one day for the appraisal to come back.
Nevertheless, after a 3-year ordeal, I am now a homeowner. Here’s how my offer went. First, it so happens that I was sick on that fateful Thursday. At around noon, a new listing pops up. The open house is scheduled for the week-end, so I might just wait for that, right? I instantly call and schedule a showing for the afternoon. At around 6PM, with effort I manage to get to the house. As usual, there are already 5 other interested parties, and the broker is busy scheduling more visits over the phone. At 9PM we put in an offer with a 16-hour deadline. The offer is completely “clean:” here’s the money, no contingencies, no questions asked. Moreover, it is over asking, though not by very much. My wife has not seen the property.
I then go to a pharmacy to buy medications. There I meet someone who was checking out the house at the same time as me! They say the house needs $.5M in works, which I later take as a move to kick me out of the competition. They also ask me if I’d be interested in putting in an offer.
To my astonishment, our offer is accepted on Friday morning. For once, I was the annoying person who took the property out of the market before the open house! There is however a small caveat: you wouldn’t think that the above gets you a house where you can actually live, would you?
In this lecture we study lower bounds on data structures. First, we define the setting. We have bits of data, stored in bits of memory (the data structure) and want to answer queries about the data. Each query is answered with probes. There are two types of probes:
- bit-probe which return one bit from the memory, and
- cell-probe in which the memory is divided into cells of bits, and each probe returns one cell.
The queries can be adaptive or non-adaptive. In the adaptive case, the data structure probes locations which may depend on the answer to previous probes. For bit-probes it means that we answer a query with depth- decision trees.
Finally, there are two types of data structure problems:
- The static case, in which we map the data to the memory arbitrarily and afterwards the memory remains unchanged.
- The dynamic case, in which we have update queries that change the memory and also run in bounded time.
In this lecture we focus on the non-adaptive, bit-probe, and static setting. Some trivial extremes for this setting are the following. Any problem (i.e., collection of queries) admits data structures with the following parameters:
- and , i.e. you write down all the answers, and
- and , i.e. you can always answer a query about the data if you read the entire data.
Next, we review the best current lower bound, a bound proved in the 80’s by Siegel [Sie04] and rediscovered later. We state and prove the lower bound in a different way. The lower bound is for the problem of -wise independence.
Problem 1. The data is a seed of size for a -wise independent distribution over . A query is defined to be the -th bit of the sample.
Theorem 2. For the above problem with it holds that
It follows, that if then is . But if then nothing is known.
Proof. Let . We have the memory of bits and we are going to subsample it. Specifically, we will select a bit of with probability , independently.
The intuition is that we will shrink the memory but still answer a lot of queries, and derive a contradiction because of the seed length required to sample -wise independence.
For the “shrinking” part we have the following. We expect to keep memory bits. By a Chernoff bound, it follows that we keep bits except with probability .
For the “answer a lot of queries” part, recall that each query probes bits from the memory. We keep one of the queries if it so happens that we keep all the bits that it probed in the memory. For a fixed query, the probability that we keep all its probes is .
We claim that with probability at least , we keep queries. This follows by Markov’s inequality. We expect to not keep queries on average. We now apply Markov’s inequality to get that the probability that we don’t keep at least queries is at most .
Thus, if , then there exists a fixed choice of memory bits that we keep, to achieve both the “shrinking” part and the “answer a lot of queries” part as above. This inequality is true because and so . But now we have bits of memory while still answering as many as queries.
The minimum seed length to answer that many queries while maintaining -wise independence is . Therefore the memory has to be at least as big as the seed. This yields
from which the result follows.
This lower bound holds even if the memory bits are filled arbitrarily (rather than having entropy at most ). It can also be extended to adaptive cell probes.
We will now show a conceptually simple data structure which nearly matches the lower bound. Pick a random bipartite graph with nodes on the left and nodes on the right. Every node on the right side has degree . We answer each probe with an XOR of its neighbor bits. By the Vazirani XOR lemma, it suffices to show that any subset of at most memory bits has an XOR which is unbiased. Hence it suffices that every subset with has a unique neighbor. For that, in turn, it suffices that has a neighborhood of size greater than (because if every element in the neighborhood of has two neighbors in then has a neighborhood of size ). We pick the graph at random and show by standard calculations that it has this property with non-zero probability.
It suffices to have , so that the probability is strictly less than 1, because . We can match the lower bound in two settings:
- if for some constant , then suffices,
- and suffices.
Remark 3. It is enough if the memory is -wise independent as opposed to completely uniform, so one can have . An open question is if you can improve the seed length to optimal.
Theorem 5. You need .
Proof. Every query is answered by looking at bits. But queries are answered by the same 2-bit function of probes (because there is a constant number of functions on 2-bits). There are two cases for :
- is linear (or affine). Suppose for the sake of contradiction that . Then you have a linear dependence, because the space of linear functions on bits is . This implies that if you XOR those bits, you always get 0. This in turn contradicts the assumption that the distributions has small bias.
- is AND (up to negating the input variables or the output). In this case, we keep collecting queries as long as they probe at least one new memory bit. If when we stop we have a query left such that both their probes query bits that have already been queried. This means that there exist two queries and whose probes cover the probes of a third query . This in turn implies that the queries are not close to uniform. That is because there exist answers to and that fix bits probed by them, and so also fix the bits probed by . But this contradicts the small bias of the distribution.
In these lectures we prove the corners theorem for pseudorandom groups, following Austin [Aus16]. Our exposition has several non-major differences with that in [Aus16], which may make it more computer-science friendly. The instructor suspects a proof can also be obtained via certain local modifications and simplifications of Green’s exposition [Gre05b, Gre05a] of an earlier proof for the abelian case. We focus on the case for simplicity, but the proof immediately extends to other pseudorandom groups.
Theorem 1. Let . Every subset of density contains a corner, i.e., a set of the form .
For intuition, suppose is a product set, i.e., for . Let’s look at the quantity
where iff . Note that the random variable in the expectation is equal to exactly when form a corner in . We’ll show that this quantity is greater than , which implies that contains a corner (where ). Since we are taking , we can rewrite the above quantity as
where the last line follows by replacing with in the uniform distribution. If , then and . Condition on , , . Then the distribution is a product of three independent distributions, each uniform on a set of measure greater than . By pseudorandomness is close to uniform in statistical distance. This implies that the above quantity equals
Given this, it is natural to try to write an arbitrary as a combination of product sets (with some error). We will make use of a more general result.
Theorem 2.[Weak Regularity Lemma] For all , there exists a function where , and such that for all
The lemma is called ‘weak’ because it came after Szemerédi’s regularity lemma, which has a stronger distinguishing conclusion. However, the lemma is also ‘strong’ in the sense that Szemerédi’s regularity lemma has as a tower of whereas here we have polynomial in . The weak regularity lemma is also simpler. There also exists a proof of Szemerédi’s theorem (on arithmetic progressions), which uses weak regularity as opposed to the full regularity lemma used initially.
Proof. We will construct the approximation through an iterative process producing functions . We will show that decreases by each iteration.
- Start: Define (which can be realized setting ).
- Iterate: If not done, there exists such that . Assume without loss of generality .
- Update: where shall be picked later.
Let us analyze the progress made by the algorithm.
where the last line follows by taking . Therefore, there can only be iterations because .
Returning to the lower bound proof, we will use the weak regularity lemma to approximate the indicator function for arbitrary by rectangles. That is, we take to be the collection of indicator functions for all sets of the form for . The weak regularity lemma gives us as a linear combination of rectangles. These rectangles may overlap. However, we ideally want to be a linear combination of non-overlapping rectangles.
Claim 3. Given a decomposition of into rectangles from the weak regularity lemma with functions, there exists a decomposition with rectangles which don’t overlap.
Claim 4. The weights of the rectangles in the above claim can be the average of in the rectangle, at the cost of doubling the distinguisher error.
Consequently, we have that , where is the sum of non-overlapping rectangles with coefficients .
Proof. Let be a partition decomposition with arbitrary weights. Let be a partition decomposition with weights being the average of . It is enough to show that for all rectangle distinguishers
By the triangle inequality, we have that
To bound , note that the error is maximized for a that respects the decomposition in non-overlapping rectangles, i.e., is the union of some non-overlapping rectangles from the decomposition. This can be argues using that, unlike , the value of and on a rectangle from the decomposition is fixed. But, for such , ! More formally, .
We need to get a little more from this decomposition. The conclusion of the regularity lemma holds with respect to distinguishers that can be written as where and map . We need the same guarantee for and with range . This can be accomplished paying only a constant factor in the error, as follows. Let and have range . Write where and have range , and the same for . The error for distinguisher is at most the sum of the errors for distinguishers , , , and . So we can restrict our attention to distinguishers where and have range . In turn, a function with range can be written as an expectation for functions with range , and the same for . We conclude by observing that
Let us now finish the proof by showing a corner exists for sufficiently dense sets . We’ll use three types of decompositions for , with respect to the following three types of distinguishers, where and have range :
The last two distinguishers can be visualized as parallelograms with a 45-degree angle between two segments. The same extra properties we discussed for rectangles hold for them too.
Recall that we want to show
We’ll decompose the -th occurrence of via the -th decomposition listed above. We’ll write this decomposition as . We do this in the following order:
Claim 5. For all , the values are the same (over ) up to an error of .
Proof. We just need to get error for any product of three functions for the three decomposition types. By the standard pseudorandomness argument we saw in previous lectures,
Claim 6. .
Proof. By the previous claim, we can fix . We will relate the expectation over to by a trick using the Hölder inequality: For random variables ,
To apply this inequality in our setting, write
By the Hölder inequality, we get that
where is the set in the partition that contains . Finally, by non-negativity of , we have that . This concludes the proof.
Claim 7. .
Proof. Replace with in the uniform distribution to get
where the first inequality is by Cauchy-Schwarz.
Now replace and reason in the same way:
Replace to rewrite the expectation as
We want to view the last three terms as a distinguisher . First, note that has range . This is because and has range .
Fix . The last term in the expectation becomes a constant . The second term only depends on , and the third only on . Hence for appropriate functions and with range this expectation can be rewritten as
which concludes the proof.
There are similar proofs to show the remaining terms are small. For , we can perform simple manipulations and then reduce to the above case. For , we have a slightly easier proof than above.
Suppose our set has density . We apply the weak regularity lemma for error . This yields the number of functions . For say , we can bound from below by the same expectation with fixed to , up to an error . Then, . The expectation of terms with is less than . So the proof can be completed for all sufficiently small .
In this lecture fragment we discuss multiparty communication complexity, especially the problem of separating deterministic and randomized communication, which we connect to a problem in combinatorics.
In number-on-forehead (NOH) communication complexity each party sees all of the input except its own input . For background, it is not known how to prove negative results for parties. We shall focus on the problem of separating deterministic and randomizes communication. For , we know the optimal separation: The equality function requires communication for deterministic protocols, but can be solved using communication if we allow the protocols to use public coins. For , the best known separation between deterministic and randomized protocol is vs [BDPW10]. In the following we give a new proof of this result, for a simpler function: if and only if for .
Claim 1. has randomized communication complexity .
Proof. In the NOH model, computing reduces to -party equality with no additional communication: Alice computes privately, then Alice and Bob check if .
Definition 2. A corner in a group is , where are arbitrary group elements and .
For intuition, consider the case when is Abelian, where one can replace multiplication by addition and a corner becomes for .
Theorem 3. Suppose that every subset with contains a corner. Then the deterministic communication complexity of is .
It is known that when is Abelian, then implies a corner. We shall prove that when , then implies a corner. This in turn implies communication .
Proof. We saw that a number-in-hand (NIH) -bit protocol can be written as a disjoint union of rectangles. Likewise, a number-on-forehead -bit protocol can be written as a disjoint union of cylinder intersections for some :
The proof idea of the above fact is to consider the transcripts of , then one can see that the inputs giving a fixed transcript are a cylinder intersection.
Let be a -bit protocol. Consider the inputs on which accepts. Note that at least fraction of them are accepted by some cylinder intersection . Let . Since the first two elements in the tuple determine the last, we have .
Now suppose contains a corner . Then
This implies , which is a contradiction because and so .