DOKK Library

Sublinear-Time Computation in the Presence of Online Erasures

Authors Iden Kalemaj, Sofya Raskhodnikova, Nithin Varma,

License CC-BY-3.0

Plaintext
                           T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48
                                        www.theoryofcomputing.org




         Sublinear-Time Computation in the
            Presence of Online Erasures
           Iden Kalemajโˆ—                   Sofya Raskhodnikovaโ€                      Nithin Varma
                    Received June 13, 2022; Revised June 29, 2023; Published August 23, 2023




       Abstract. We initiate the study of sublinear-time algorithms that access their input
       via an online adversarial erasure oracle. After answering each input query, such
       an oracle can erase ๐‘ก input values. Our goal is to understand the complexity of
       basic computational tasks in extremely adversarial situations, where the algorithmโ€™s
       access to data is blocked during the execution of the algorithm in response to its
       actions. Specifically, we focus on property testing in the model with online erasures.
       We show that two fundamental properties of functions, linearity and quadraticity,
       can be tested for constant ๐‘ก with asymptotically the same complexity as in the
       standard property testing model. For linearity testing, we prove tight bounds in
       terms of ๐‘ก, showing that the query complexity is ฮ˜(log ๐‘ก). In contrast to linearity and
       quadraticity, some other properties, including sortedness and the Lipschitz property
       of sequences, cannot be tested at all, even for ๐‘ก = 1. Our investigation leads to a
       deeper understanding of the structure of violations of linearity and other widely
       studied properties. We also consider implications of our results for algorithms that
       are resilient to online adversarial corruptions instead of erasures.
     A preliminary version of this paper appeared in the Proceedings of the 13th โ€œInnovations in Theoretical Computer
Scienceโ€ Conference (ITCSโ€™22). [43].
   โˆ— Supported by NSF award CCF-1909612 and Boston Universityโ€™s Deanโ€™s Fellowship.
   โ€  Supported by NSF award CCF-1909612.



ACM Classification: F.2
AMS Classification: 68Q25
Key words and phrases: randomized algorithms, property testing, Fourier analysis, linear
functions, quadratic functions, Lipschitz and monotone functions, sorted sequences


ยฉ 2023 Iden Kalemaj, Sofya Raskhodnikova, and Nithin Varma
c b Licensed under a Creative Commons Attribution License (CC-BY)
                        I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

1    Introduction
We initiate the study of sublinear-time algorithms that compute in the presence of an online
adversary that blocks access to some data points in response to the algorithmโ€™s queries. A
motivating scenario is when a user wishes to remove their data from a dataset due to privacy
concerns, as enabled by right to be forgotten laws such as the EU General Data Protection
Regulation [48]. The online aspect of our model suitably captures the case of individuals who
are prompted to restrict access to their data after noticing an inquiry into their or othersโ€™ data.
The user could decide to remove their data after noticing, for example, that their phone number
is available on websites that scrape personal contact information. We choose to model such
user actions as adversarial in order to perform worst-case analysis and refrain from making
distributional and other assumptions on how the data access is affected. We give two other
motivating scenarios that are naturally adversarial and justify a worst-case analysis. In one, an
algorithm is trying to detect some fraud (e.g., tax fraud) and the adversary wants to obstruct
access to data in order to make it hard to uncover any evidence. In the other scenario, an
algorithmโ€™s goal is to determine an optimal course of action (e.g., whether to invest in a stock or
to buy an item), whereas the adversary leads the algorithm astray by adaptively blocking access
to pertinent information.
    In our model, after answering each query to the input object, the adversary can hide a small
number of input values. Our goal is to understand the complexity of basic computational tasks
in extremely adversarial situations, where the algorithmโ€™s access to data is blocked during the
execution of the algorithm in response to its actions. Specifically, we represent the input object
as a function ๐‘“ on an arbitrary finite domain1, which the algorithm can access by querying a
point ๐‘ฅ from the domain and receiving the answer ๐’ช(๐‘ฅ) from an oracle. At the beginning of
computation, ๐’ช(๐‘ฅ) = ๐‘“ (๐‘ฅ) for all points ๐‘ฅ in the domain of the function. We parameterize our
model by a natural number ๐‘ก that controls the number of function values the adversary can
erase after the oracle answers each query2. Mathematically, we represent the oracle and the
adversary as one entity. However, it might be helpful to think of the oracle as the data holder
and of the adversary as the obstructionist. A ๐‘ก-online-erasure oracle can replace values ๐’ช(๐‘ฅ) on
up to ๐‘ก points ๐‘ฅ with a special symbol โŠฅ, thus erasing them. The new values will be used by
the oracle to answer future queries to the corresponding points. The locations of erasures are
unknown to the algorithm. The actions of the oracle can depend on the input, the queries made
so far, and even on the publicly known code that the algorithm is running, but not on future
coin tosses of the algorithm.
    We focus on investigating property testing in the presence of online erasures. In the
   1Input objects such as strings, sequences, images, matrices, and graphs can all be represented as functions. For
example, an ๐‘› ร— ๐‘› real-valued matrix is equivalent to a function mapping [๐‘›]2 to โ„.
   2If the adversary were allowed to erase the query of the algorithm before answering it, the algorithm would
only see erased values. We give several motivating scenarios for the adversarial behavior in our model. The first
example is a situation where the adversary reacts by deleting additional data after some bank records are pulled by
authorities as part of an investigation. In the GDPR example mentioned previously, we argued that individuals
could be prompted to restrict access to their data only after noticing an inquiry into their or othersโ€™ data. Finally, in a
legal setting, if the adversary is served a subpoena, they are legally bound to answer the query, but could nonetheless
destroy related evidence that is not included in the subpoena.


                           T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                          2
               S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

property testing model, introduced by [64, 37] with the goal of formally studying sublinear-time
algorithms, a property is represented by a set ๐’ซ (of functions satisfying the desired property). A
function ๐‘“ is ๐œ€-far from ๐’ซ if ๐‘“ differs from each function ๐‘” โˆˆ ๐’ซ on at least an ๐œ€ fraction of domain
points. The goal is to distinguish, with constant probability, functions ๐‘“ โˆˆ ๐’ซ from functions that
are ๐œ€-far from ๐’ซ. We call an algorithm a ๐‘ก-online-erasure-resilient ๐œ€-tester for property ๐’ซ if, given
parameters ๐‘ก โˆˆ โ„• and ๐œ€ โˆˆ (0, 1), and access to an input function ๐‘“ via a ๐‘ก-online-erasure oracle,
the algorithm accepts with probability at least 2/3 if ๐‘“ โˆˆ ๐’ซ and rejects with probability at least
2/3 if ๐‘“ is ๐œ€-far from ๐’ซ.
    We study the query complexity of online-erasure-resilient testing of several fundamental
properties. We show that for linearity and quadraticity of functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1}, the
query complexity of ๐‘ก-online-erasure-resilient testing for constant ๐‘ก is asymptotically the same
as in the standard model. For linearity, we also prove tight bounds in terms of ๐‘ก, showing that
the query complexity is ฮ˜(log ๐‘ก). A function ๐‘“ (๐‘ฅ) is linear if it can be represented as a sum
of monomials of the form ๐‘ฅ[๐‘–], where ๐‘ฅ = (๐‘ฅ[1], . . . , ๐‘ฅ[๐‘‘]) is a vector of ๐‘‘ bits; the function is
quadratic if it can be represented as a sum of monomials of the form ๐‘ฅ[๐‘–] or ๐‘ฅ[๐‘–]๐‘ฅ[๐‘—].
    To understand the difficulty of testing in the presence of online erasures, consider the case of
linearity and ๐‘ก = 1. The celebrated tester for linearity in the standard property testing model was
proposed by Blum, Luby, and Rubinfeld [21]. It looks for witnesses of non-linearity that consist
of three points ๐‘ฅ, ๐‘ฆ, and ๐‘ฅ โŠ• ๐‘ฆ satisfying ๐‘“ (๐‘ฅ) + ๐‘“ (๐‘ฆ) โ‰  ๐‘“ (๐‘ฅ โŠ• ๐‘ฆ), where addition is mod 2, and โŠ•
denotes bitwise XOR. Bellare et al. [8] show that if ๐‘“ is ๐œ€-far from linear, then a triple (๐‘ฅ, ๐‘ฆ, ๐‘ฅ โŠ• ๐‘ฆ)
is a witness to non-linearity with probability at least ๐œ€ when ๐‘ฅ, ๐‘ฆ โˆˆ {0, 1} ๐‘‘ are chosen uniformly
and independently at random. In our model, after ๐‘ฅ and ๐‘ฆ are queried, the oracle can erase the
value of ๐‘ฅ โŠ• ๐‘ฆ. To overcome   this, our tester considers witnesses with more points, namely, of the
form ๐‘ฅโˆˆ๐‘‡ ๐‘“ (๐‘ฅ) โ‰  ๐‘“ ( ๐‘ฅโˆˆ๐‘‡ ๐‘ฅ) for sets ๐‘‡ โŠ‚ {0, 1} ๐‘‘ of even size.
      ร                ร‰

    Witnesses of non-quadraticity are even more complicated. The tester of Alon et al. [2] looks
for witnesses consisting of points ๐‘ฅ, ๐‘ฆ, ๐‘ง, and all four of their linear combinations. We describe a
two-player game that models the interaction between the tester and the adversary and give a
winning strategy for the tester-player. We also consider witness structures in which all specified
tuples are witnesses of non-quadraticity (to allow for the possibility of the adversary erasing
some points from the structure). We analyze the probability of getting a witness structure
under uniform sampling when the input function is ๐œ€-far from quadratic. Our investigation
leads to a deeper understanding of the structure of witnesses for both properties, linearity and
quadraticity.
    In contrast to linearity and quadraticity, we show that several other properties, specifically,
sortedness and the Lipschitz property of sequences, and the Lipschitz property of functions
 ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1, 2}, cannot be tested in the presence of an online-erasure oracle, even
with ๐‘ก = 1, no matter how many queries the algorithm makes. Interestingly, witnesses for
these properties have a much simpler structure than witnesses for linearity and quadraticity.
Consider the case of sortedness of integer sequences, represented by functions ๐‘“ : [๐‘›] โ†’ โ„• .
A sequence is sorted (or the corresponding function is monotone) if ๐‘“ (๐‘ฅ) โ‰ค ๐‘“ (๐‘ฆ) for all ๐‘ฅ < ๐‘ฆ
in [๐‘›]. A witness of non-sortedness consists of two points ๐‘ฅ < ๐‘ฆ, such that ๐‘“ (๐‘ฅ) >p๐‘“ (๐‘ฆ).
In the standard model, sortedness can be ๐œ€-tested with an algorithm that queries ๐‘‚( ๐‘›/๐œ€)

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                           3
                     I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

                                                                                            log ๐œ€๐‘›
uniform and independent points [32]. (The fastest testers for this property have ๐‘‚( ๐œ€ ) query
complexity [29, 28, 18, 23, 12], but they make correlated queries that follow a more complicated
distribution.) Our impossibility result demonstrates that even the simplest testing strategy of
querying independent points can be thwarted by an online adversary. To prove this result,
we use sequences that are far from being sorted, but where each point is involved in only one
witness, allowing the oracle to erase the second point of the witness as soon as the first one is
queried. Using a version of Yaoโ€™s principle that is suitable for our model, we turn these examples
into a general impossibility result for testing sortedness with a 1-online-erasure oracle.
     Our impossibility result for testing sortedness uses sequences with many (specifically, ๐‘›)
distinct integers. We show that this is not a coincidence by designing a ๐‘ก-online-erasure-resilient
sortedness tester that works for sequences that have ๐‘‚( ๐œ€ ๐‘ก ๐‘› ) distinct values. However, the
                                                                     2


number of distinct values does not have to be large to preclude testing the Lipschitz property
in our model. A function ๐‘“ : [๐‘›] โ†’ โ„• , representing an ๐‘›-integer sequence, is Lipschitz if
| ๐‘“ (๐‘ฅ) โˆ’ ๐‘“ (๐‘ฆ)| โ‰ค |๐‘ฅ โˆ’ ๐‘ฆ| for all ๐‘ฅ, ๐‘ฆ โˆˆ [๐‘›]. Similarly, a function ๐‘“ : {0, 1} ๐‘‘ โ†’ โ„ is Lipschitz if
| ๐‘“ (๐‘ฅ) โˆ’ ๐‘“ (๐‘ฆ)| โ‰ค k๐‘ฅ โˆ’ ๐‘ฆk 1 for all ๐‘ฅ, ๐‘ฆ โˆˆ {0, 1} ๐‘‘ . We show that the Lipschitz property of sequences,
as well as ๐‘‘-variate functions, cannot be tested even when the range has size 3, even with ๐‘ก = 1,
no matter how many queries the algorithm makes.

    Comparison to related models. Our model is closely related to (offline) erasure-resilient
testing of Dixit et al. [27]. In the model of Dixit et al., also investigated in [61, 58, 13, 54, 47, 51],
the adversary performs all erasures to the function before the execution of the algorithm. An
(offline) erasure-resilient tester is given a parameter ๐›ผ โˆˆ (0, 1), an upper bound on the fraction
of the values that are erased. The adversary we consider is more powerful in the sense that it
can perform erasures online, during the execution of the tester. However, in some parameter
regimes, our oracle cannot perform as many erasures. Importantly, all three properties that we
show are impossible to test in our model, are testable in the model of Dixit et al. with essentially
the same query complexity as in the standard model [27]. It is open if there are properties that
have lower query complexity in the online model than in the offline model. The models are not
directly comparable because the erasures are budgeted differently.
    Another widely studied model in property testing is that of tolerant testing [56]. As
explained by Dixit et al., every tolerant tester is also (offline) erasure-resilient with corresponding
parameters. As pointed out in [56], the BLR tester is a tolerant tester of linearity for ๐›ผ significantly
smaller than ๐œ€. Tolerant testing of linearity with distributional assumptions was studied in [46]
and tolerant testing of low-degree polynomials over large alphabets was studied in [38].
Tolerant testing of sortedness is closely related to approximating the distance to monotonicity
and estimating the longest increasing subsequence. These tasks can be performed with
polylogorithmic in ๐‘› number of queries [56, 1, 65]. As we showed, sortedness is impossible to
test in the presence of online erasures.
    Adversarial models are also studied in related contexts, such as sampling from a stream [15],
more general stream computations [14], and dynamic algorithms [7]. Notably, in these models,
the input is formed adversarially online while the algorithm is running; there is no notion
of corrupted input. In contrast, in our model, algorithms solve problems on the original,

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                             4
               S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

ground-truth input while the access to the input is degrading.

1.1   Our results
We design ๐‘ก-online-erasure-resilient testers for linearity and quadraticity, two properties widely
studied because of their connection to probabilistically checkable proofs, hardness of approxi-
mating NP-hard problems, and coding theory. Our testers have 1-sided error, that is, they always
accept functions with the property. They are also nonadaptive, that is, their queries do not depend
on answers to previous queries. This is despite the adversary being allowed to respond online
(i.e., adaptively) to the algorithmโ€™s queries.

    Linearity. Starting from the pioneering work of [21], linearity testing has been investigated,
e.g., in [10, 11, 30, 8, 9, 71, 70, 67, 40, 16, 66, 68, 69, 44] (see [59] for a survey). Linearity can be
๐œ€-tested in the standard property testing model with ๐‘‚(1/๐œ€) queries by the BLR tester. We say
that a pair (๐‘ฅ, ๐‘ฆ) violates linearity if ๐‘“ (๐‘ฅ) + ๐‘“ (๐‘ฆ) โ‰  ๐‘“ (๐‘ฅ โŠ• ๐‘ฆ). The BLR tester repeatedly selects a
uniformly random pair of domain points and rejects if it violates linearity. A tight lower bound
of ฮ˜(๐œ€) on the probability that a uniformly random pair violates linearity was proven by Bellare
et al. [8] and Kaufman et al. [44].
    We show that linearity can be ๐œ€-tested with ๐‘‚(log  e      ๐‘ก/๐œ€) queries with a ๐‘ก-online-erasure oracle.

Theorem 1.1. There exist a constant ๐‘ 0 โˆˆ (0, 1) and a 1-sided error, nonadaptive, ๐‘ก-online-erasure-
resilient ๐œ€-tester for linearity                         ๐‘‘                                          ๐‘‘/4
                                of functions ๐‘“ : {0, 1} โ†’ {0, 1} that works for all ๐‘ก โ‰ค ๐‘0 ยท ๐œ€ ยท 2 and
                                                                                                5/4
                          ๐‘ก ๐‘ก
makes ๐‘‚ min ๐œ€ log ๐œ€ , ๐œ€ queries.
                  1


    Our linearity tester has query complexity ๐‘‚(1/๐œ€) for constant ๐‘ก, which is optimal even in the
standard property testing model, with no erasures. The tester looks for more general witnesses
                                                                                           ๐‘‘
of non-linearity thanร‰the BLR tester, namely, it looks for tuples ๐‘‡ of elements from {0, 1} such
that ๐‘ฅโˆˆ๐‘‡ ๐‘“ (๐‘ฅ) โ‰  ๐‘“ ( ๐‘ฅโˆˆ๐‘‡ ๐‘ฅ) and |๐‘‡ | is even. We call such tuples violating. The analysis of our
     ร
linearity tester crucially depends on the following structural theorem.

Theorem 1.2. Let ๐‘‡ be a tuple of a fixed even size, where each element of ๐‘‡ is sampled uniformly and
independently at random from {0, 1} ๐‘‘ . If a function ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} is ๐œ€-far from linear, then
                                         hร•                  รŠ      i
                                    Pr         ๐‘“ (๐‘ฅ) โ‰  ๐‘“ (         ๐‘ฅ) โ‰ฅ ๐œ€.
                                    ๐‘‡
                                         ๐‘ฅโˆˆ๐‘‡                 ๐‘ฅโˆˆ๐‘‡

Our theorem generalizes the result of [8], which dealt with the case |๐‘‡ | = 2. We remark that
the assertion in Theorem 1.2 does not hold for odd |๐‘‡ |. Consider the function ๐‘“ (๐‘ฅ) = ๐‘ฅ[1] + 1
(mod 2), where ๐‘ฅ[1] is the first bit of ๐‘ฅ. Function ๐‘“ is 12 -far from linear, but has no violating
tuples of odd size.
    The core procedure of our linearity tester queries ฮ˜(log(๐‘ก/๐œ€))ร‰uniformly random points from
{0, 1} ๐‘‘ to build a reserve and then queries sums of the form        ๐‘ฅโˆˆ๐‘‡ ๐‘ฅ, where ๐‘‡ is a uniformly
random tuple of reserve elements such that |๐‘‡ | is even. The quality of the reserve is the probability
that ๐‘‡ is violating. The likelihood that the procedure catches a violating tuple depends on the

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                             5
                     I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

quality of the reserve (which is a priori unknown to the tester) and the number of sums queried.
Instead of querying the same number of sums in each iteration of the core procedure, we obtain
a better query complexity by guessing different reserve qualities for each iteration and querying
the number of sums that is inversely proportional to the reserve quality. We decide on the
number of sums to query based on the work investment strategy by Berman, Raskhodnikova, and
Yaroslavtsev [17], which builds on an idea proposed by Levin and popularized by Goldreich [35].
    Next, we show that our tester has optimal query complexity in terms of the erasure budget ๐‘ก.

Theorem 1.3. For all ๐œ€ โˆˆ (0, 14 ], every ๐‘ก-online-erasure-resilient ๐œ€-tester for linearity of functions
๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} must make more than log2 ๐‘ก queries.

    The main idea in the proof of Theorem 1.3 is that when a tester makes blog2 ๐‘กc queries, the
adversary has the budget to erase all linear combinations of the previous queries after every
step. As a result, the tester cannot distinguish a random linear function from a random function.

    Quadraticity. Quadraticity and, more generally, low-degree testing have been studied,
e.g., in [6, 5, 34, 30, 33, 64, 62, 2, 3, 50, 49, 45, 66, 68, 42, 19, 39, 63, 25]. Low-degree testing is
closely related to local testing of Reed-Muller codes. The Reed-Muller code ๐’ž(๐‘˜, ๐‘‘) consists of
codewords, each of which corresponds to all evaluations of a polynomial ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} of
degree at most ๐‘˜. A local tester for a code queries a few locations of a codeword; it accepts if the
codeword is in the code; otherwise, it rejects with probability proportional to the distance of the
codeword from the code.
    In the standard property testing model, quadraticity can be ๐œ€-tested with ๐‘‚(1/๐œ€) queries by
the tester of Alon et al. [2] that repeatedly selects ๐‘ฅ, ๐‘ฆ, ๐‘ง โˆผ {0, 1} ๐‘‘ and queries ๐‘“ on all of their
linear combinationsโ€”the points themselves, the double sums ๐‘ฅ โŠ• ๐‘ฆ, ๐‘ฅ โŠ• ๐‘ง, ๐‘ฆ โŠ• ๐‘ง, and the triple
sum ๐‘ฅ โŠ• ๐‘ฆ โŠ• ๐‘ง. The tester rejects if the values of the function on all seven queried points sum to
1, since this cannot happen for a quadratic function. A tight lower bound on the probability
that the resulting 7-tuple is a witness of non-quadraticity was proved by Alon et al. [2] and
Bhattacharyya et al. [19].
    We prove that quadraticity can be ๐œ€-tested with ๐‘‚(1/๐œ€) queries with a ๐‘ก-online-erasure-oracle
for constant ๐‘ก. Our tester can be easily modified to give a local tester for the Reed-Muller code
๐’ž(2, ๐‘‘) that works with a ๐‘ก-online-erasure oracle.

Theorem 1.4. There exists a 1-sided error, nonadaptive, ๐‘ก-online-erasure-resilient ๐œ€-tester for quadraticity
of functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} that makes ๐‘‚( 1๐œ€ ) queries for constant ๐‘ก.

   The dependence on ๐‘ก in the query complexity of our quadraticity tester is at least doubly
exponential, and it is an open question whether it can be improved. The main ideas behind our
quadraticity tester are explained in Section 1.2.

    Sortedness. Sortedness testing (see [57] for a survey) was introduced by Ergun et al. [29].
                                                   log(๐œ€๐‘›)
Its query complexity has been pinned down to ฮ˜( ๐œ€ ) by [29, 31, 24, 12].
    We show that online-erasure-resilient testing of integer sequences is, in general, impossible.

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                              6
                 S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

Theorem 1.5. For all ๐œ€ โˆˆ (0, 12
                             1
                                ], there is no 1-online-erasure-resilient ๐œ€-tester for sortedness of integer
sequences.
                                                                        p
    In the case without erasures, sortedness can be tested with ๐‘‚( ๐‘›/๐œ€) uniform and independent
queries [32]. Theorem 1.5 implies that a uniform tester for a property does not translate into the
existence of an online-erasure-resilient tester, counter to the intuition that testers that make only
uniform and independent queries should be less prone to adversarial attacks. Our lower bound
construction demonstrates that the structure of violations to a property plays an important role
in determining whether the property is testable.
    The hard sequences from the proof of Theorem 1.5 have ๐‘› distinct values. Pallavoor et al.
[53, 55] considered the setting when the tester is given an additional parameter ๐‘Ÿ, the number
                                                              log ๐‘Ÿ
of distinct elements in the sequence, and obtained an ๐‘‚( ๐œ€ )-query tester. Two lower bounds
                                                                              log ๐‘Ÿ
apply to this setting: ฮฉ(log ๐‘Ÿ) for nonadaptive testers [20] and ฮฉ( log log ๐‘Ÿ ) for all testers for the
                                                                                                 โˆš
case when ๐‘Ÿ = ๐‘› 1/3 [12]. Pallavoor et al. also showed that sortedness can be tested with ๐‘‚( ๐‘Ÿ/๐œ€)
uniform and independent queries. We extend the result of Pallavoor et al. to the setting with
online erasures for the case when ๐‘Ÿ is small.

Theorem 1.6. Let ๐‘0 > 0 be a constant. There exists a 1-sided error, nonadaptive, ๐‘ก-online-erasure-
resilient
    โˆš
          ๐œ€-tester for sortedness of ๐‘›-element sequences with at most ๐‘Ÿ distinct values. The tester makes
      ๐‘Ÿ
๐‘‚( ๐œ€ ) uniform and independent queries and works when ๐‘Ÿ < ๐œ€๐‘0๐‘›๐‘ก .
                                                                   2



    Thus, sortedness is not testable with online erasures when ๐‘Ÿ is large and is testable in the
setting when ๐‘Ÿ is small. For example, for Boolean sequences, it is testable with ๐‘‚(1/๐œ€) queries.

     The Lipschitz property. Lipschitz testing, introduced by [41], was subsequently studied
in [23, 26, 17, 4, 22]. Lipschitz testing of functions ๐‘“ : [๐‘›] โ†’ {0, 1, 2} can be performed with
๐‘‚( 1๐œ€ ) queries [41]. For functions ๐‘“ : {0, 1} ๐‘‘ โ†’ โ„, it can be done with ๐‘‚( ๐‘‘๐œ€ ) queries [41, 23].
     We show that the Lipschitz property is impossible to test in the online-erasures model even
when the range of the function has only 3 distinct values. This applies to both domains, [๐‘›] and
{0, 1} ๐‘‘ .

Theorem 1.7. For all ๐œ€ โˆˆ (0, 81 ], there is no 1-online-erasure-resilient ๐œ€-tester for the Lipschitz property
of functions ๐‘“ : [๐‘›] โ†’ {0, 1, 2}. The same statement holds when the domain is {0, 1} ๐‘‘ instead of [๐‘›].

    Yaoโ€™s minimax principle. All our lower bounds use Yaoโ€™s minimax principle. A formulation
of Yaoโ€™s principle suitable for our online-erasures model is described in Section 9.

1.2       The ideas behind our quadraticity tester
One challenge in generalizing the tester of Alon et al. [2] to work with an online-erasure oracle is
that its queries are correlated. First, we want to ensure that the tester can obtain function values
on tuples of the form (๐‘ฅ, ๐‘ฆ, ๐‘ง, ๐‘ฅ โŠ• ๐‘ฆ, ๐‘ฅ โŠ• ๐‘ง, ๐‘ฆ โŠ• ๐‘ง, ๐‘ฅ โŠ• ๐‘ฆ โŠ• ๐‘ง). Then we want to ensure that, if the
original function is far from the property, the tester is likely to catch such a tuple that is also a

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                               7
                      I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

witness to not satisfying the property. Next, we formulate a two-player game3 that abstracts the
first task. In the game, the tester-player sees what erasures are made by the oracle-player. This
assumption is made to abstract out the most basic challenge and is not used in the algorithmsโ€™
analyses.


    Quadraticity testing as a two-player game. Player 1 represents the tester and Player 2
represents the adversary. The players take turns drawing points, connecting points with edges,
and coloring triangles specified by drawn points, each in their own color. Player 1 wins the
game if it draws in blue all the vertices and edges of a triangle and colors the triangle blue. The
vertices represent the points ๐‘ฅ, ๐‘ฆ, ๐‘ง โˆˆ {0, 1} ๐‘‘ , the edges are the sums ๐‘ฅ โŠ• ๐‘ฆ, ๐‘ฅ โŠ• ๐‘ง, ๐‘ฆ โŠ• ๐‘ง, and the
triangle is the sum ๐‘ฅ โŠ• ๐‘ฆ โŠ• ๐‘ง. A move of Player 1 consists of drawing a point or an edge between
two existing non-adjacent points or coloring an uncolored triangle between three existing points
(in blue). A move of Player 2 consists of at most ๐‘ก steps; in each step, it can draw a red edge
between existing points or color a triangle between three existing points (in red).

                                    y1                                       y1

                         x1    x2        x3   x4   x5     x6    x1     x2         x3   x4     x5   x6

                                                               y1,1
                                    y1                                       y1

                         x1    x2        x3   x4   x5     x6           x1         x2   x3     x4

                        y1,1                       y1,2               y1,1             y1,2




Figure 1: Stages in the quadraticity game for ๐‘ก = 1, played according to the winning strategy for
Player 1: connecting the ๐‘ฆ-decoys from the first tree to ๐‘ฅ-decoys (frames 1-4); drawing ๐‘ง and
connecting it to ๐‘ฆ-decoys and an ๐‘ฅ-decoy (frames 5-6), and creation of a blue triangle (frames
7โ€“8). Frame 5 contains edges from ๐‘ง to two structures, each replicating frame 4. We depict only
points and edges relevant for subsequent frames.

   Our online-erasure-resilient quadraticity tester is based on a winning strategy for Player 1
with ๐‘ก ๐‘‚(๐‘ก) moves. At a high level, Player 1 first draws many decoys for ๐‘ฅ. The ๐‘ฆ-decoys are
organized in ๐‘ก + 1 full (๐‘ก + 1)-ary trees of depth ๐‘ก. The root for tree ๐‘– is ๐‘ฆ ๐‘– , its children are ๐‘ฆ ๐‘–,๐‘— ,

   3This game has been tested on real children, and they spent hours playing it.


                         T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                            8
                 S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

where ๐‘— โˆˆ [๐‘ก + 1], etc. We jot the rest of the winning strategy for ๐‘ก = 1 and depict it in Fig. 1.
                                                                                  (๐‘–)           (๐‘–)
In this case, Player 1 does the following for each of two trees: it draws points ๐‘ฅ1 , . . . , ๐‘ฅ 12 , ๐‘ฆ ๐‘– ;
                                                (๐‘–)      (๐‘–)
connects ๐‘ฆ ๐‘– to half of ๐‘ฅ-decoys (w.l.o.g., ๐‘ฅ 1 , . . . , ๐‘ฅ 6 ); draws point ๐‘ฆ ๐‘–,1 , connects it to two of the
                                       (๐‘–)      (๐‘–)                                               (๐‘–)       (๐‘–)
๐‘ฅ-decoys adjacent to ๐‘ฆ1 (w.l.o.g., ๐‘ฅ 1 and ๐‘ฅ 2 ); draws point ๐‘ฆ ๐‘–,2 , connects it to two of ๐‘ฅ 3 , . . . , ๐‘ฅ 6
           (๐‘–)       (๐‘–)
(w.l.o.g., ๐‘ฅ 3 and ๐‘ฅ 4 ); draws ๐‘ง and connects it to one of the roots (w.l.o.g., ๐‘ฆ1 ), connects ๐‘ง to one
                                                               (1)   (1)             (1)
of ๐‘ฆ1,1 and ๐‘ฆ1,2 (w.l.o.g., ๐‘ฆ1,1 ), connects ๐‘ง to one of ๐‘ฅ1 and ๐‘ฅ 2 (w.l.o.g., ๐‘ฅ 1 ), and finally colors
                           (1)         (1)
one of the triangles ๐‘ฅ 1 ๐‘ฆ1 ๐‘ง and ๐‘ฅ 1 ๐‘ฆ1,1 ๐‘ง, thus winning the game. The decoys are arranged to
guarantee that Player 1 always has at least one available move in each step of the strategy.
    For general ๐‘ก, the winning strategy is described in full detail in Algorithm 3. Recall that the
๐‘ฆ-decoys are organized in ๐‘ก + 1 full (๐‘ก + 1)-ary trees of depth ๐‘ก. For every root-to-leaf path in
every tree, Player 1 draws edges from all the nodes in that path to a separate set of ๐‘ก + 1 decoys
for ๐‘ฅ. After ๐‘ง is drawn, the tester โ€œwalksโ€ along a root-to-leaf path in one of the trees, drawing
edges between ๐‘ง and the ๐‘ฆ-decoys on the path. The goal of this walk is to avoid the parts of the
tree spoiled by Player 2. Finally, Player 1 connects ๐‘ง to an ๐‘ฅ-decoy that is adjacent to all vertices
in the path, and then colors a triangle involving this ๐‘ฅ-decoy, a ๐‘ฆ-decoy from the chosen path,
and ๐‘ง. The structure of decoys guarantees that Player 1 always has ๐‘ก + 1 options for its next
move, only ๐‘ก of which can be spoiled by Player 2.




    From the game to a tester. There are two important aspects of designing a tester that are
abstracted away in the game: First, the tester does not actually know which values are erased
until it queries them. Second, the tester needs to catch a witness demonstrating a violation of
the property, not merely a tuple of the right form with no erasures. Here, we briefly describe
how we overcome these challenges.
    Our quadraticity tester is based directly on the game. It converts the moves of the winning
strategy of Player 1 into a corresponding procedure, making a uniformly random guess at each
step about the choices that remain nonerased. There are three core technical lemmas used in
the analysis of the algorithm. Lemma 5.4 lower bounds the probability that the tester makes
correct guesses at each step about which edges (double sums) and triangles (triple sums) remain
nonerased, thus addressing part of the first challenge. This probability depends only on the
erasure budget ๐‘ก. To address the second challenge, Lemma 5.3 gives a lower bound on the
probability that uniformly random sampled points (the ๐‘ฅ- and ๐‘ฆ- decoys together with ๐‘ง) form
a large violation structure, where all triangles that Player 1 might eventually complete violate
quadraticity. Building on a result of Alon et al., we show that even though the number of
triangles involved in the violation structure is large, namely ๐‘ก ๐‘‚(๐‘ก) , the probability of sampling
such a structure is ๐›ผ = ฮฉ(min(๐œ€, ๐‘ ๐‘ก )), where ๐‘ ๐‘ก โˆˆ (0, 1) depends only on ๐‘ก. Finally, Lemma 5.2
shows that despite the online adversarial erasures, the tester has a probability of ๐›ผ/2 of sampling
the points of such a large violation structure and obtaining their values from the oracle. These
three lemmas combined show that quadraticity can be tested with ๐‘‚(1/๐œ€) queries for constant ๐‘ก.

                           T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                 9
                    I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

1.3   Sublinear-time computation in the presence of online corruptions
Our model of online erasures extends naturally to a model of online corruptions, where the
adversary is allowed to modify values of the input function. Specifically, a ๐‘ก-online-corruption
oracle ๐’ช, after answering each query, can replace values ๐’ช(๐‘ฅ) on up to ๐‘ก domain points ๐‘ฅ with
arbitrary values in the range of ๐‘“ . Our algorithmic results in the presence of online erasures
have implications for computation in the presence of online corruptions.
    We consider two types of computational tasks in the presence of online corruptions. The
first one is ๐‘ก-online-corruption-resilient testing, defined analogously to ๐‘ก-online-erasure-resilient
testing. Specifically, we call an algorithm a ๐‘ก-online-corruption-resilient ๐œ€-tester for property ๐’ซ if,
given parameters ๐‘ก โˆˆ โ„• and ๐œ€ โˆˆ (0, 1), and access to an input function ๐‘“ via a ๐‘ก-online-erasure
oracle, the algorithm accepts with probability at least 2/3 if ๐‘“ โˆˆ ๐’ซ and rejects with probability at
least 2/3 if ๐‘“ is ๐œ€-far from ๐’ซ. In Lemma 1.8 we study a general computational task for which the
algorithm has oracle access to an input function and has to output a correct answer with high
probability. We consider algorithms that access their input via an online-erasure oracle and
show that if with high probability they output a correct answer and encounter no erased queries
during their execution, they also output a correct answer with high probability in the presence
of online corruptions. Note that the correctness of the answer is with respect to the original
function ๐‘“ , as opposed to the corrupted values represented by ๐’ช. Lemma 1.8 uses the notion
of an adversarial strategy. We model an adversarial strategy as a distribution on decision trees,
where each tree dictates the erasures to be made for a given input and queries of the algorithm.
Lemma 1.8. Let ๐‘‡ be an algorithm that is given access to a function via a ๐‘ก-online-erasure oracle and
performs a specified computational task. Suppose that for all adversarial strategies, with probability at
least 2/3, the algorithm ๐‘‡ outputs a correct answer and queries no erased values during its execution.
Then, for the same computational task, when ๐‘‡ is given access to a function via a ๐‘ก-online-corruption
oracle, it outputs a correct answer with probability at least 2/3.
    This lemma can be applied to our online-erasure-resilient testers for linearity and for
sortedness with few distinct values. These testers have 1-sided error, i.e., they err only when the
function is far from the property. We can amplify the success probability of the testers to 5/6 for
functions that are far from the property, without changing the asymptotic query complexity
of the testers. In addition, the resulting testers have a small probability (specifically, at most
1/6) of encountering an erasure during their computation. As a result, Lemma 1.8 implies
online-corruption-resilient testers for these properties. Their performance is summarized in
Corollaries 8.1 and 8.2.
    For the second type of computational tasks, we return to the motivation of the algorithm
looking for evidence of fraud. In Lemma 1.9, we show that every nonadaptive, 1-sided error,
online-erasure-resilient tester for any property ๐’ซ can be modified so that, given access to an
input function ๐‘“ that is far from ๐’ซ via an online-corruption oracle, it outputs a witness of ๐‘“ not
being in ๐’ซ. This result applies to our testers for sortedness with few distinct values, linearity,
and quadraticity. Note that the values of the witness could be corrupted values of ๐‘“ . For this
task, it is helpful to think of the input ๐‘“ as changing dynamically rather than there being a
ground truth input ๐‘“ as is the case for Lemma 1.8.

                      T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                            10
                 S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

Lemma 1.9. Let ๐’ซ be a property of functions that has a 1-sided error, nonadaptive, ๐‘ก-online-erasure-
resilient tester. Then there exists a nonadaptive algorithm with the same query complexity that, given a
parameter ๐œ€ and access via a ๐‘ก-online-corruption-oracle ๐’ช to a function ๐‘“ that is ๐œ€-far from ๐’ซ, outputs
with probability at least 2/3 a witness of ๐‘“ โˆ‰ ๐’ซ. The witness consists of queried domain points ๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘˜
and values ๐’ช(๐‘ฅ 1 ), . . . , ๐’ช(๐‘ฅ ๐‘˜ ) obtained by the algorithm, such that no ๐‘” โˆˆ ๐’ซ has ๐‘”(๐‘ฅ ๐‘– ) = ๐’ช(๐‘ฅ ๐‘– ) for all
๐‘– โˆˆ [๐‘˜].


1.4     Conclusions and open questions
We initiate a study of sublinear-time algorithms in the presence of online adversarial erasures.
We design efficient online-erasure-resilient testers for several important properties (linearity,
quadraticity, andโ€”for the case of small number of distinct valuesโ€”sortedness). For linearity,
we prove tight upper and lower bounds in terms of ๐‘ก. We also show that several basic properties,
specifically, sortedness of integer sequences and the Lipschitz properties, cannot be tested in
our model. We now list several open problems.

      โ€ข Sortedness is an example of a property that is impossible to test with online erasures,
        but is easy to test with offline erasures, as well as tolerantly. Is there a property that
        has smaller query complexity in the online-erasure-resilient model than in the (offline)
        erasure-resilient model of [27]?

      โ€ข We design a ๐‘ก-online-erasure-resilient quadraticity tester that makes ๐‘‚(1/๐œ€) queries for
        constant ๐‘ก. What is the query complexity of ๐‘ก-online-erasure-resilient quadraticity testing
        in terms of ๐‘ก and ๐œ€? Specifically, the dependence on ๐‘ก in the query complexity of our
        quadraticity tester is at least doubly exponential, and it is open whether it can be improved.

      โ€ข The query complexity of ๐œ€-testing if a function is a polynomial of degree at most ๐‘˜ is
        ฮ˜( 1๐œ€ + 2 ๐‘˜ ) [2, 19]. Is there a low-degree test for ๐‘˜ โ‰ฅ 3 that works in the presence of online
        erasures?

      โ€ข Our tester for linearity works in the presence of online corruptions, but our tester for
        quadraticity does not. The reason for this is that our linearity tester is unlikely to see
        erasures, but that is not the case for our quadraticity tester. Is there an online-corruption-
        resilient quadraticity tester?


2      An online-erasure-resilient linearity tester
To prove Theorem 1.1, we present and analyze two testers. Our main online-erasure-resilient
linearity tester (Algorithm 1) is presented in this section. Its query complexity has optimal
dependence on ๐‘ก and nearly optimal dependence on ๐œ€. Its performance is summarized in
Theorem 2.1. To complete the proof of Theorem 1.1, we give a ๐‘‚(๐‘ก/๐œ€)-query linearity tester in
Section 3. It has optimal query complexity for constant ๐‘ก.

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                  11
                         I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

Theorem 2.1. There exists ๐‘ 0 โˆˆ (0, 1) and a 1-sided error, nonadaptive, ๐‘ก-online-erasure-resilient ๐œ€-tester
for linearity of functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} that works for ๐‘ก โ‰ค ๐‘0 ยท ๐œ€5/4 ยท 2๐‘‘/4 and makes ๐‘‚( 1๐œ€ log ๐œ€๐‘ก )
queries.

      The ๐‘ก-online-erasure-resilient tester guaranteed by Theorem 2.1 is presented in Algorithm 1.

Algorithm 1 An Online-Erasure-Resilient Linearity Tester
Input: ๐œ€ โˆˆ (0, 12 ), erasure budget ๐‘ก โˆˆ โ„• , access to function ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} via a ๐‘ก-online-
    erasure oracle.
 1: Let ๐‘ž = 2 log 50๐‘ก๐œ€ .
 2: for all ๐‘— โˆˆ [log 8๐œ€ ]:
 3:       repeat 82ln๐‘— ๐œ€5 times:
 4:            for all ๐‘– โˆˆ [๐‘ž]:
 5:                 Sample ๐‘ฅ ๐‘– โˆผ {0, 1} ๐‘‘ and query ๐‘“ at ๐‘ฅ ๐‘– .
 6:            repeat 4 ยท 2 ๐‘— times:
 7:                 Sample a uniform     nonempty subset ๐ผ of [๐‘ž] of even size.
                    Query ๐‘“ at
                                 ร ๐‘–โˆˆ๐ผ ๐‘ฅ ๐‘– .
                                  ร‰
 8:
                    Reject if ๐‘–โˆˆ๐ผ ๐‘“ (๐‘ฅ ๐‘– ) โ‰  ๐‘“ ( ๐‘–โˆˆ๐ผ ๐‘ฅ ๐‘– ) and all points ๐‘ฅ ๐‘– for ๐‘– โˆˆ ๐ผ and   ๐‘–โˆˆ๐ผ ๐‘ฅ ๐‘– are
                                                ร‰                                           ร‰
 9:
    nonerased.
10: Accept.




2.1     Proof of Theorem 1.2
In this section, we prove Theorem 1.2, the main structural result used in Theorem 2.1. Recall
that a ๐‘˜-tuple (๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘˜ ) โˆˆ ({0, 1} ๐‘‘ ) ๐‘˜ violates linearity if ๐‘“ (๐‘ฅ 1 ) + ยท ยท ยท + ๐‘“ (๐‘ฅ ๐‘˜ ) โ‰  ๐‘“ (๐‘ฅ1 โŠ• ยท ยท ยท โŠ• ๐‘ฅ ๐‘˜ ).
(Addition is mod 2 when adding values of Boolean functions.) Theorem 1.2 states that if ๐‘“ is
๐œ€-far from linear, then for all even ๐‘˜, with probability at least ๐œ€, independently and uniformly
sampled points ๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘˜ โˆผ {0, 1} ๐‘‘ form a violating ๐‘˜-tuple. Our proof of Theorem 1.2 builds
on the proof of [8, Theorem 1.2], which is a special case of Theorem 1.2 for ๐‘˜ = 2. The proof
is via Fourier analysis. Next, we state some standard facts and definitions related to Fourier
analysis. See, e.g., [52] for proofs of these facts.
    Consider the space of all real-valued functions on {0, 1} ๐‘‘ equipped with the inner-product

                                             h๐‘”, โ„Ži =       ๐”ผ       [๐‘”(๐‘ฅ)โ„Ž(๐‘ฅ)],
                                                        ๐‘ฅโˆผ{0,1} ๐‘‘

                     ๐‘‘                                              ๐‘‘
    ร ๐‘”, โ„Ž : {0, 1} โ†’ โ„. The character functions ๐œ’๐‘† : {0, 1} โ†’ {โˆ’1, 1}, defined as ๐œ’๐‘† =
where
(โˆ’1) ๐‘–โˆˆ๐‘† ๐‘ฅ[๐‘–] for ๐‘† โІ [๐‘‘], form an orthonormal basis for the space of functions under consideration.
Hence, every function ๐‘” : {0, 1} ๐‘‘ โ†’ โ„ can be uniquely expressed as a linear combination of the
functions ๐œ’๐‘† , where ๐‘† โІ [๐‘‘]. The Fourier coefficients of ๐‘” are the coefficients on the functions
๐œ’๐‘† in this linear representation of ๐‘”.

                           T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                           12
                 S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

Definition 2.2 (Fourier coefficient). For ๐‘” : {0, 1} ๐‘‘ โ†’ โ„ and ๐‘† โІ [๐‘‘], the Fourier coefficient of ๐‘”
on ๐‘† is b
        ๐‘” (๐‘†) = h๐‘”, ๐œ’๐‘† i = ๐”ผ [๐‘”(๐‘ฅ)๐œ’๐‘† (๐‘ฅ)].
                                       ๐‘ฅโˆผ{0,1} ๐‘‘

    We will need the following facts about Fourier coefficients.
Theorem 2.3 (Parsevalโ€™s Theorem). For all functions ๐‘” : {0, 1} ๐‘‘ โ†’ โ„, it holds that h๐‘”, ๐‘”i =
        ๐‘” (๐‘†)2 . In particular, if ๐‘” : {0, 1} ๐‘‘ โ†’ {โˆ’1, 1} then ๐‘†โІ[๐‘‘] b
                                                                     ๐‘” (๐‘†)2 = 1.
ร                                                             ร
  ๐‘†โІ[๐‘‘] b

Theorem 2.4 (Plancherelโ€™s Theorem). For all functions ๐‘”, โ„Ž : {0, 1} ๐‘‘ โ†’ โ„, it holds that h๐‘”, โ„Ži =
        ๐‘” (๐‘†)b
             โ„Ž(๐‘†).
ร
  ๐‘†โІ[๐‘‘] b

    A function ๐‘” : {0, 1} ๐‘‘ โ†’ {โˆ’1, 1} is linear if ๐‘”(๐‘ฅ)๐‘”(๐‘ฆ) = ๐‘”(๐‘ฅ โŠ• ๐‘ฆ) for all ๐‘ฅ, ๐‘ฆ โˆˆ {0, 1} ๐‘‘ .
Lemma 2.5. The distance of ๐‘” : {0, 1} ๐‘‘ โ†’ {โˆ’1, 1} to linearity is 21 โˆ’ 21 max๐‘†โІ[๐‘‘] b
                                                                                   ๐‘” (๐‘†).
    Finally, we also use the convolution operation, defined below, and one of its key properties.
Definition 2.6 (Convolution). Let ๐‘”, โ„Ž : {0, 1} ๐‘‘ โ†’ โ„. Their convolution is the function ๐‘” โˆ— โ„Ž :
{0, 1} ๐‘‘ โ†’ โ„ defined by (๐‘” โˆ— โ„Ž)(๐‘ฅ) = ๐”ผ [๐‘”(๐‘ฆ)โ„Ž(๐‘ฅ โŠ• ๐‘ฆ)].
                                                       ๐‘ฆโˆผ{0,1} ๐‘‘

Theorem 2.7. Let ๐‘”, โ„Ž : {0, 1} ๐‘‘ โ†’ โ„. Then, for all ๐‘† โІ [๐‘‘], it holds ๐‘”
                                                                      ยš โˆ— โ„Ž(๐‘†) = b
                                                                                 ๐‘” (๐‘†)b
                                                                                      โ„Ž(๐‘†).
Proof of Theorem 1.2. Define ๐‘” : {0, 1} ๐‘‘ โ†’ {โˆ’1, 1} so that ๐‘”(๐‘ฅ) = (โˆ’1) ๐‘“ (๐‘ฅ) . That is, ๐‘” is obtained
from the function ๐‘“ by encoding its output with ยฑ1. Note that the distance to linearity of ๐‘” is the
same as the distance to linearity of ๐‘“ . We have that the expression 12 โˆ’ 12 ๐‘”(๐‘ฅ 1 ) . . . ๐‘”(๐‘ฅ ๐‘˜ )๐‘”(๐‘ฅ 1 โŠ• ยท ยท ยท โŠ•
๐‘ฅ ๐‘˜ ) is an indicator for the event that points ๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘˜ โˆผ {0, 1} ๐‘‘ violate linearity for ๐‘”. Define ๐‘” โˆ—๐‘˜
to be the convolution of ๐‘” with itself ๐‘˜ times, i.e., ๐‘” โˆ—๐‘˜ = ๐‘” โˆ— ยท ยท ยท โˆ— ๐‘”, where the โˆ— operator appears
๐‘˜ โˆ’ 1 times. We obtain

                       Pr              [(๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘˜ ) violates linearity]
               ๐‘ฅ 1 ,...,๐‘ฅ ๐‘˜ โˆผ{0,1} ๐‘‘
                                          h1
                                           1                                          i
               =          ๐”ผ              โˆ’ ๐‘”(๐‘ฅ 1 ) . . . ๐‘”(๐‘ฅ ๐‘˜ )๐‘”(๐‘ฅ 1 โŠ• ยท ยท ยท โŠ• ๐‘ฅ ๐‘˜ )
                 ๐‘ฅ1 ,...,๐‘ฅ ๐‘˜ โˆผ{0,1} ๐‘‘ 2    2
                 1 1
               = โˆ’                   ๐”ผ        [๐‘”(๐‘ฅ 1 ) . . . ๐‘”(๐‘ฅ ๐‘˜โˆ’1 ) ยท      ๐”ผ [๐‘”(๐‘ฅ ๐‘˜ )๐‘”(๐‘ฅ1 โŠ• ยท ยท ยท โŠ• ๐‘ฅ ๐‘˜ )]]
                 2 2 ๐‘ฅ1 ,...,๐‘ฅ ๐‘˜โˆ’1 โˆผ{0,1} ๐‘‘                              ๐‘ฅ ๐‘˜ โˆผ{0,1} ๐‘‘
                 1 1
               = โˆ’                   ๐”ผ        [๐‘”(๐‘ฅ 1 ) . . . ๐‘”(๐‘ฅ ๐‘˜โˆ’1 )(๐‘” โˆ— ๐‘”)(๐‘ฅ 1 โŠ• ยท ยท ยท โŠ• ๐‘ฅ ๐‘˜โˆ’1 )]             (2.1)
                 2 2 ๐‘ฅ1 ,...,๐‘ฅ ๐‘˜โˆ’1 โˆผ{0,1} ๐‘‘
                 1 1
               = โˆ’              ๐”ผ [๐‘”(๐‘ฅ1 ) ยท (๐‘” โˆ—๐‘˜ )(๐‘ฅ1 )]                                                        (2.2)
                 2 2 ๐‘ฅ1 โˆผ{0,1} ๐‘‘
                 1 1 ร•
               = โˆ’                  ๐‘” (๐‘†)๐‘”c
                                    b     โˆ—๐‘˜ (๐‘†)                                                                 (2.3)
                 2 2
                              ๐‘†โІ[๐‘‘]
                   1 1 ร•
               =    โˆ’    ๐‘” (๐‘†) ๐‘˜+1 ,
                         b                                                                                       (2.4)
                   2 2
                              ๐‘†โІ[๐‘‘]



                             T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                  13
                         I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

where (2.1) holds by the definition of convolution, (2.2) follows by repeated application of the
steps used to obtain (2.1), (2.3) follows from Plancherelโ€™s Theorem (Theorem 2.4), and (2.4)
follows from Theorem 2.7.
               ๐‘” (๐‘†)| โ‰ค 1 for all ๐‘† โІ [๐‘‘], because b
    Note that |b                                    ๐‘” (๐‘†) is the inner product of two functions with
range in {โˆ’1, 1}. In addition, b๐‘” (๐‘†) โ‰ฅ 0 for ๐‘† such that ๐œ’๐‘† is the closest linear function to ๐‘”. Then,
for even ๐‘˜,
                    ร•                                  ร•
                         ๐‘” (๐‘†) ๐‘˜+1 โ‰ค max(b
                         b               ๐‘” (๐‘†) ๐‘˜โˆ’1 )                        ๐‘” (๐‘†) ๐‘˜โˆ’1 ) โ‰ค max b
                                                               ๐‘” (๐‘†)2 = max(b
                                                               b                              ๐‘” (๐‘†),
                                    ๐‘†โІ[๐‘‘]                              ๐‘†โІ[๐‘‘]             ๐‘†โІ[๐‘‘]
                 ๐‘†โІ[๐‘‘]                                 ๐‘†โІ[๐‘‘]


where the equality follows from Parsevalโ€™s Theorem (Theorem 2.3). By Lemma 2.5, the distance
                                      ๐‘” (๐‘†), which is at least ๐œ€, since ๐‘” is ๐œ€-far from linear. This
of ๐‘” to linearity is 12 โˆ’ 12 max๐‘†โІ[๐‘‘] b
concludes the proof.                                                                              

2.2    Proof of Theorem 2.1
In this section, we prove Theorem 2.1 using Theorem 1.2. In Lemma 2.8, we analyze the
probability of good events that capture, roughly, that the queries made in the beginning of
each iteration havenโ€™t already been โ€œspoiledโ€ by the previous erasures. Then we use the work
investment strategy of [17], stated in Lemma 2.9, together with Theorem 1.2 and Lemma 2.8 to
prove Theorem 2.1.
    Each iteration of the outer repeat loop in Steps 3-9 of Algorithm 1 is called a round. We say
a query ๐‘ฅ is successfully obtained if it is nonerased when queried, i.e., the tester obtains ๐‘“ (๐‘ฅ) as
opposed to โŠฅ.

Lemma 2.8 (Good events). Fix one round of Algorithm 1. Consider ร‰               the points ๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘ž queried in
Step 5 of this round, where ๐‘ž = 2 log(50๐‘ก/๐œ€), and the set ๐‘† of all sums             ๐‘–โˆˆ๐ผ ๐‘ฅ ๐‘– , where ๐ผ is a nonempty
subset of [๐‘ž] of even size. Let ๐บ1 be the (good) event that all points in ๐‘† are distinct. Let ๐บ2 be the
(good) event that all points ๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘ž are successfully obtained and all points in ๐‘† are nonerased at the
beginning of the round. Finally, let ๐บ = ๐บ1 โˆฉ ๐บ2 . Then Pr[๐บ] โ‰ค 2๐œ€ for all adversarial strategies.

Proof. First, we analyze event ๐บ1 . Consider points ๐‘ฅ ๐‘–1 , . . . , ๐‘ฅ ๐‘– ๐‘˜ , ๐‘ฅ ๐‘–10 , . . . , ๐‘ฅ ๐‘–โ„“0 โˆผ {0, 1} ๐‘‘ , where
{๐‘–1 , . . . , ๐‘– ๐‘˜ } โ‰  {๐‘–10 , . . . , ๐‘–โ„“0 }, ๐‘˜, โ„“ โˆˆ [๐‘ž] and ๐‘˜, โ„“ are even. Since the points are distributed uniformly
and independently, so are the sums ๐‘ฅ ๐‘–1 โŠ• ยท ยท ยท โŠ• ๐‘ฅ ๐‘– ๐‘˜ and ๐‘ฅ ๐‘–10 โŠ• ยท ยท ยท โŠ• ๐‘ฅ ๐‘–โ„“0 . The probability that two
uniformly and independently sampled points ๐‘ฅ, ๐‘ฆ โˆผ {0, 1} ๐‘‘ are identical is 21๐‘‘ . The number of
sets ๐ผ โІ [๐‘ž] of even size is 2๐‘žโˆ’1 because every subset of [๐‘ž โˆ’ 1] can be uniquely completed to
such a set ๐ผ. By a union bound over all pairs of sums, Pr[๐บ1 ] โ‰ค 4ยท2                 22๐‘ž
                                                                                        ๐‘‘.
     To analyze ๐บ2 , fix any adversarial strategy. The number of queries made by Algorithm 1 is
at most
            log(8/๐œ€)
              ร•        8 ln 5            ๐‘—
                                             8 ln 5    32 ln 5    8  8 ln 5    16 ln 5    40๐‘ž
                                ๐‘ž + 4 ยท 2    โ‰ค       ๐‘ž+         log โ‰ค        ๐‘ž+         ๐‘žโ‰ค     .                 (2.5)
                        2๐œ€๐‘—                      ๐œ€         ๐œ€       ๐œ€     ๐œ€         ๐œ€        ๐œ€
              ๐‘—=1


                           T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                     14
                    S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES


                                                            ๐œ€ points. Since each point ๐‘ฅ ๐‘– is sampled uniformly from
                                                           40๐‘ž๐‘ก
Hence, the oracle erases at most
{0, 1} ๐‘‘ ,
                                                                                                           40๐‘ž๐‘ก
                                               Pr         [๐‘ฅ ๐‘– is erased when queried] โ‰ค                               .
                                           ๐‘ฅ ๐‘– โˆผ{0,1} ๐‘‘                                                    ๐œ€ ยท 2๐‘‘
Additionally, before the queries ๐‘ฅ ๐‘– are revealed to the oracle, each sum                                                          ๐‘–โˆˆ๐ผ ๐‘ฅ ๐‘– is distributed
                                                                                                                               ร‰
uniformly at random. Therefore, for every {๐‘–1 , . . . , ๐‘– ๐‘˜ } โІ [๐‘ž],

                                                                                                                                       40๐‘ž๐‘ก
                    Pr                [๐‘ฅ ๐‘–1 โŠ• ยท ยท ยท โŠ• ๐‘ฅ ๐‘– ๐‘˜ is erased at the beginning of the round] โ‰ค                                          .
           ๐‘ฅ ๐‘–1 ,...,๐‘ฅ ๐‘– ๐‘˜ โˆผ{0,1} ๐‘‘                                                                                                    ๐œ€ ยท 2๐‘‘

By a union bound over the ๐‘ž points sampled in Step 5 and at most 2๐‘žโˆ’1 sums, we get

                                                                   40๐‘ž๐‘ก                        40๐‘ž๐‘ก ยท 2๐‘ž
                                                 Pr[๐บ2 ] โ‰ค                  ๐‘‘
                                                                              (๐‘ž + 2๐‘žโˆ’1 ) โ‰ค                    .
                                                                    ๐œ€2                            ๐œ€ ยท 2๐‘‘

Since ๐‘ž = 2 log 50๐‘ก
                                            40๐‘ž๐‘ก      ๐‘ž
                                             ๐œ€ โ‰ค 4 ยท 2 and, consequently,
                                                 3
                 ๐œ€ , we get


                                            22๐‘ž     40๐‘ž๐‘ก ยท 2๐‘ž   22๐‘ž   504 ยท ๐‘ก 4   50 ยท ๐‘ 0 ยท ๐œ€  ๐œ€
                                                                                                           4       4       5
                         Pr[๐บ] โ‰ค                ๐‘‘
                                                  +       ๐‘‘
                                                              โ‰ค   ๐‘‘
                                                                    โ‰ค      ๐‘‘
                                                                                โ‰ค              โ‰ค ,
                                           4ยท2       ๐œ€ยท2        2      ๐œ€ 2
                                                                        4             ๐œ€ 4       2

since ๐‘ก โ‰ค ๐‘ 0 ยท ๐œ€5/4 ยท 2๐‘‘/4 , as stated in Theorem 2.1, and assuming ๐‘0 is sufficiently small.                                                         

    Next, we state the work investment lemma.

Lemma 2.9 (Lemma 2.5 of [17]). Let ๐‘‹ be a random variable taking values in [0, 1]. Suppose ๐”ผ[๐‘‹] โ‰ฅ ๐›ผ.
Let ๐‘  = dlog( ๐›ผ4 )e and ๐›ฟ โˆˆ (0, 1) be the desired probability of error. For all ๐‘— โˆˆ [๐‘ ], let ๐‘ ๐‘— = Pr[๐‘‹ โ‰ฅ 2โˆ’๐‘— ]
                                      รŽ๐‘                     ๐‘˜๐‘—
and ๐‘˜ ๐‘— = 4 ln(1/๐›ฟ)
             2๐‘— ๐›ผ
                    . Then               ๐‘—=1 (1 โˆ’ ๐‘ ๐‘— )          โ‰ค ๐›ฟ.

                                                                                                                               ๐‘ž
Proof of Theorem 2.1. By (2.5), the query complexity of Algorithm 1 is ๐‘‚( ๐œ€ ) = ๐‘‚( ๐œ€ ). Algo-
                                                                                                                                         log(๐‘ก/๐œ€)

rithm 1 is nonadaptive and always accepts if ๐‘“ is linear. Suppose now that ๐‘“ is ๐œ€-far from linear
and fix any adversarial strategy. We show that Algorithm 1 rejects with probability at least 2/3.
    Consider the last round of Algorithm 1. For points ๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘ž โˆผ {0, 1} ๐‘‘ sampled in Step 5
of this last round, let ๐‘Œ denote the fraction of nonempty sets {๐‘–1 , . . . , ๐‘– ๐‘˜ } โІ [๐‘ž] such that ๐‘˜ is
even and (๐‘ฅ ๐‘–1 , . . . , ๐‘ฅ ๐‘– ๐‘˜ ) violates linearity. Recall the event ๐บ defined in Lemma 2.8. Let 1๐บ be the
indicator random variable for the event ๐บ for the last round.

Claim 2.10. Let ๐‘‹ = ๐‘Œ ยท 1๐บ , where ๐‘Œ is as defined above. Then ๐”ผ[๐‘‹] โ‰ฅ 2๐œ€ .

Proof. For all nonempty {๐‘–1 , . . . , ๐‘– ๐‘˜ } โІ [๐‘ž], such that ๐‘˜ is even, let ๐‘Œ๐‘–1 ,...,๐‘– ๐‘˜ be the indicator for the
event that (๐‘ฅ ๐‘–1 , . . . , ๐‘ฅ ๐‘– ๐‘˜ ) violates linearity. By Theorem 1.2 and the fact that ๐‘˜ is even,

                         ๐”ผ[๐‘Œ๐‘–1 ,...,๐‘– ๐‘˜ ] =                Pr               [(๐‘ฅ ๐‘–1 , . . . , ๐‘ฅ ๐‘– ๐‘˜ ) violates linearity] โ‰ฅ ๐œ€.
                                                 ๐‘ฅ ๐‘–1 ,...,๐‘ฅ ๐‘– ๐‘˜ โˆผ{0,1} ๐‘‘


                                 T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                                                 15
                     I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

We obtain a lower bound on ๐”ผ[๐‘Œ] by linearity of expectation.

                                              1                    ร•
                           ๐”ผ[๐‘Œ] =                                                    ๐”ผ[๐‘Œ๐‘–1 ,...,๐‘– ๐‘˜ ] โ‰ฅ ๐œ€.   (2.6)
                                        2๐‘žโˆ’1 โˆ’ 1
                                                        {๐‘– 1 ,...,๐‘– ๐‘˜ }โІ[๐‘ž],๐‘˜ even


    Observe that ๐‘‹ = ๐‘Œ when ๐บ occurs, and ๐‘‹ = 0 otherwise. By the law of total expectation,

           ๐”ผ[๐‘‹] = ๐”ผ[๐‘‹ |๐บ] ยท Pr[๐บ] + ๐”ผ[๐‘‹ |๐บ] ยท Pr[๐บ] = ๐”ผ[๐‘‹ |๐บ] ยท Pr[๐บ] = ๐”ผ[๐‘Œ|๐บ] ยท Pr[๐บ]
                 = ๐”ผ[๐‘Œ] โˆ’ ๐”ผ[๐‘Œ|๐บ] ยท Pr[๐บ] โ‰ฅ ๐œ€ โˆ’ 1 ยท (๐œ€/2) = ๐œ€/2,

where the inequality follows from (2.6), the fact that ๐‘Œ โ‰ค 1, and Lemma 2.8.                                    

    Fix any round of Algorithm 1 and the value of ๐‘— used in this round (as defined in Step 2).
Let ๐‘‹ 0 be defined as ๐‘‹, but for this round instead of the last one. The round is special if ๐‘‹ 0 โ‰ฅ 2โˆ’๐‘— .
Let ๐‘ 0๐‘— = Pr[๐‘‹ 0 โ‰ฅ 2โˆ’๐‘— ] and ๐‘ ๐‘— = Pr[๐‘‹ โ‰ฅ 2โˆ’๐‘— ]. Then ๐‘ 0๐‘— โ‰ฅ ๐‘ ๐‘— , since the number of erasures only
increases with each round. For each ๐‘—, there are ๐‘˜ ๐‘— = 82ln๐‘— ๐œ€5 rounds of Algorithm 1 that are run
with this particular value of ๐‘—. Since Algorithm 1 uses independent random coins for each
round, the probability that no round is special is at most

                                    log 8๐œ€                         log 8๐œ€
                                    ร–                              ร–                           1
                                             (1 โˆ’ ๐‘ 0๐‘— ) ๐‘˜ ๐‘— โ‰ค              (1 โˆ’ ๐‘ ๐‘— ) ๐‘˜ ๐‘— โ‰ค     ,
                                                                                               5
                                     ๐‘—=1                            ๐‘—=1


where the last inequality follows by Lemma 2.9 applied with ๐›ฟ = 1/5 and ๐›ผ = ๐œ€/2 and Claim 2.10.
Therefore, with probability at least 45 , Algorithm 1 has a special round.
    Consider a special round of Algorithm 1 and fix the value of ๐‘— for this round. We show       ร‰ that
Algorithm 1 rejects in the special round with probability at least 5/6. We call a sum               ๐‘–โˆˆ๐ผ ๐‘ฅ ๐‘–
violating if the tuple (๐‘ฅ ๐‘– : ๐‘– โˆˆ ๐ผ) violates linearity. Since ๐บ occurred, all ๐‘ž points queried in Step 5
of Algorithm 1 were successfully obtained. So, the algorithm will reject as soon as it successfully
obtains a violating sum. Since ๐บ occurred, there are at least 2๐‘žโˆ’1 โˆ’ 1 distinct sums that can be
queried in Step 8, all of them nonerased at the beginning of the round. Algorithm 1 makes at
most ๐‘ž + 4 ยท 2 ๐‘— queries in this round, and thus the fraction of these sums erased during the round
is at most

                       ๐‘ž + 4 ยท 2๐‘—        3 ยท 2๐‘— 
                                               1    ๐‘ก      12๐‘ก ยท 2 ๐‘—
                    ๐‘ก ยท ๐‘žโˆ’1    โ‰ค๐‘กยท      + ๐‘žโˆ’2 โ‰ค          +
                       2    โˆ’1     2๐‘ž/2  2        ๐‘ก ยท 50
                                                       ๐œ€   ๐‘ก 2 ยท ( 50
                                                                    ๐œ€)
                                                                       2

                                             8          12 ยท 82 ยท 2 ๐‘—             0.16 0.3072     1
                                    =               +                         โ‰ค      ๐‘—
                                                                                       +   ๐‘—
                                                                                              โ‰ค        ,
                                        50 ยท ๐œ€    8
                                                        502 ๐‘ก ยท ( 8๐œ€ )2            2     2      2 ยท 2๐‘—
                                                               ๐‘ž
where in the first inequality we used that 2๐‘žโˆ’1 โˆ’1 โ‰ค 2๐‘ž/2
                                                      1
                                                          for ๐‘ž โ‰ฅ 9 and that 2๐‘žโˆ’1 โˆ’ 1 โ‰ฅ (4/3) ยท 2๐‘žโˆ’2
for ๐‘ž โ‰ฅ 3 (note that ๐‘ž โ‰ฅ 2 log(50๐‘ก/๐œ€) โ‰ฅ 2 log 100 > 13), in the second inequality we used
๐‘ž โ‰ฅ 2 log(50๐‘ก/๐œ€), and in the third inequality we used 2 ๐‘— โ‰ค 8๐œ€ and ๐‘ก โ‰ฅ 1.

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                    16
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

    Since the round is special, at least a 2โˆ’๐‘— fraction of the sums that can be queried in Step 8 are
violating. Thus, the fraction of the sums that are violating and nonerased before each iteration
of Steps 8-9 in this round is at least 2โˆ’๐‘— โˆ’ 2โˆ’๐‘—โˆ’1 = 2โˆ’๐‘—โˆ’1 .
    Then, each iteration of Steps 8-9 rejects with probability at least 2โˆ’๐‘—โˆ’1 . Since there are 4 ยท 2 ๐‘—
iterations with independently chosen sums, the probability that the special round accepts is at
most
                                                      ๐‘—
                                        (1 โˆ’ 2โˆ’๐‘—โˆ’1 )4ยท2 โ‰ค eโˆ’2 โ‰ค 1/6.

That is, the probability that Algorithm 1 rejects in the special round is at least 5/6. Since the
special round exists with probability at least 45 , Algorithm 1 rejects with probability at least
5 ยท 6 = 3.                                                                                      
4 5     2




3    An online-erasure-resilient linearity tester with ๐‘‚(๐‘ก/๐œ€) queries
In this section, we present our online-erasure-resilient linearity tester with query complexity
๐‘‚(๐‘ก/๐œ€) (Algorithm 2) and prove Theorem 3.1 below. Theorem 3.1 together with Theorem 2.1
implies Theorem 1.1.

Theorem 3.1. There exist a constant ๐‘ 0 โˆˆ (0, 1) and a 1-sided error, nonadaptive, ๐‘ก-online-erasure-
resilient ๐œ€-tester for linearity of functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} that works for ๐‘ก โ‰ค ๐‘ 0 ยท ๐œ€ ยท 2๐‘‘/4 and makes
๐‘‚( ๐œ€๐‘ก ) queries.


Algorithm 2 An Online-Erasure-Resilient Linearity Tester
Input: ๐œ€ โˆˆ (0, 12 ), erasure budget ๐‘ก โˆˆ โ„• , access to function ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} via a ๐‘ก-online-
    erasure oracle.
 1: Let ๐‘ = 88 and ๐‘ž = ๐‘๐‘ก      ๐œ€.
 2: for all ๐‘– โˆˆ [๐‘ž]:
 3:      Sample ๐‘ฅ ๐‘– โˆผ {0, 1} ๐‘‘ and query ๐‘“ at ๐‘ฅ ๐‘– .
 4: repeat 24๐œ€ times:
 5:      Sample a uniform (๐‘–, ๐‘—) such that ๐‘–, ๐‘— โˆˆ [๐‘ž] and ๐‘– < ๐‘—, then query ๐‘“ at ๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— .
 6:      Reject if ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘— , and ๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— are nonerased and ๐‘“ (๐‘ฅ ๐‘– ) + ๐‘“ (๐‘ฅ ๐‘— ) โ‰  ๐‘“ (๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— ).
 7: Accept.


    In the analysis of Algorithm 2, we let ๐‘ฅ ๐‘– , for all ๐‘– โˆˆ [๐‘ž], be random variables denoting
the points queried in Step 3. Recall that a pair (๐‘ฅ, ๐‘ฆ) of domain points violates linearity if
๐‘“ (๐‘ฅ) + ๐‘“ (๐‘ฆ) โ‰  ๐‘“ (๐‘ฅ โŠ• ๐‘ฆ). The proof of Theorem 3.1 crucially relies on the following lemma about
the concentration of pairs violating linearity.

Lemma 3.2. Suppose ๐‘“ is ๐œ€-far from linear and ๐‘ž = ๐‘๐‘ก๐œ€ . Let ๐‘Œ denote       the number of pairs (๐‘–, ๐‘—) โˆˆ [๐‘ž]2
                                                                 ๐œ€   ๐‘ž
such that ๐‘– < ๐‘— and (๐‘ฅ ๐‘– , ๐‘ฅ ๐‘— ) violates linearity. Then Pr[๐‘Œ โ‰ค 4 ยท 2 ] โ‰ค 0.25.

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                17
                     I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

     We prove Lemma 3.2 in Section 3.1. In the rest of this section, we first prove an auxiliary
lemma (Lemma 3.3) and then use Lemmas 3.2 and 3.3 to prove Theorem 3.1.
     We say a query ๐‘ข โˆˆ {0, 1} ๐‘‘ is successfully obtained if it is nonerased right before it is queried,
i.e., the tester obtains ๐‘“ (๐‘ข) as opposed to the symbol โŠฅ.
Lemma 3.3. Let ๐บ1 be the (good) event that all 2๐‘ž sums ๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— of points queried in Step 3 of Algorithm 2
                                                             
are distinct, and ๐บ2 be the (good) event that all ๐‘ž points ๐‘ฅ ๐‘– queried in Step 3 are successfully obtained.
Then Pr[๐บ1 โˆช ๐บ2 ] โ‰ค 0.05 for all adversarial strategies.
Proof. First, we analyze event ๐บ1 . Consider points ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘— , ๐‘ฅ ๐‘˜ , ๐‘ฅโ„“ โˆผ {0, 1} ๐‘‘ , where {๐‘–, ๐‘—} โ‰  {๐‘˜, โ„“ }.
Since these points are distributed uniformly and independently, so are the sums ๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— and
๐‘ฅ ๐‘˜ โŠ• ๐‘ฅโ„“ . The probability that two uniformly and independently sampled points ๐‘ฅ, ๐‘ฆ โˆผ {0, 1} ๐‘‘
                                                                                                               ๐‘ž4
are identical is 21๐‘‘ . Therefore, by a union bound over all pairs of sums, Pr[๐บ1 ] โ‰ค 2๐‘ž ยท 21๐‘‘ โ‰ค 4ยท2๐‘‘ .
                                                                                                          2
    To analyze ๐บ2 , fix an arbitrary adversarial strategy. In Steps 2-3, the algorithm makes at
most ๐‘ž queries. Hence the oracle erases at most ๐‘ž๐‘ก points from {0, 1} ๐‘‘ . Since each point ๐‘ฅ ๐‘– is
sampled uniformly from {0, 1} ๐‘‘ ,
                                                                                         ๐‘ž๐‘ก
                                  Pr         [๐‘ฅ ๐‘– is erased when queried] โ‰ค                   .
                              ๐‘ฅ ๐‘– โˆผ{0,1} ๐‘‘                                               2๐‘‘
                                                                                                  ๐‘ž2 ๐‘ก
By a union bound over the ๐‘ž points sampled in Step 3, we get Pr[๐บ2 ] โ‰ค 2๐‘‘ . We substitute ๐‘ž = ๐‘๐‘ก๐œ€
and get

                                              ๐‘ž4         ๐‘ž2๐‘ก       ๐‘ž4         ๐‘4๐‘ก4
                      Pr[๐บ1 โˆช ๐บ2 ] โ‰ค               ๐‘‘
                                                     +       ๐‘‘
                                                               โ‰ค       ๐‘‘
                                                                         =            โ‰ค ๐‘ 4 ๐‘04 โ‰ค 0.05,
                                             4ยท2         2         2         ๐œ€4 ยท 2 ๐‘‘
since ๐‘ก โ‰ค ๐‘ 0 ยท ๐œ€ ยท 2๐‘‘/4 , as stated in Theorem 3.1, and assuming ๐‘ 0 is sufficiently small.                        
Proof of Theorem 3.1. The query complexity of Algorithm 2 is evident from its description. Clearly,
Algorithm 2 is nonadaptive and accepts if ๐‘“ is linear. Suppose now that ๐‘“ is ๐œ€-far from linear
and fix an arbitrary adversarial strategy. We show that Algorithm 2 rejects with probability at
least 23 .
    We call a sum ๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— queried in Step 5 violating if the pair (๐‘ฅ ๐‘– , ๐‘ฅ ๐‘— ) violates linearity. For
Algorithm 2 to reject, it must sample ๐‘–, ๐‘— โˆˆ [๐‘ž] such that ๐‘ฅ ๐‘– , ๐‘ฅ ๐‘— , and ๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— are successfully
obtained and ๐‘ฅ ๐‘– โŠ• ๐‘ฅ ๐‘— is a violating sum. Let ๐ธ ๐‘˜ , for all ๐‘˜ โˆˆ [24/๐œ€], be the event that in iteration ๐‘˜
of Step 4, the algorithm successfully obtains a violating sum. Let ๐ธ = ๐‘˜โˆˆ[24/๐œ€] ๐ธ ๐‘˜ . We define
                                                                                ร
the following good event concerning the execution of the for loop: ๐บ = ๐บ1 โˆฉ ๐บ2 โˆฉ ๐บ3 , where ๐บ1
and ๐บ 2 are as defined in Lemma 3.3, and ๐บ3 is the event that ๐‘Œ, defined in Lemma 3.2, is at least
๐œ€    ๐‘ž
4 ยท 2 . By a union bound and Lemmas 3.2 and 3.3, we know that Pr[๐บ] โ‰ฅ 0.7. Therefore, the
probability that Algorithm 2 rejects is at least

                             Pr[๐ธ โˆฉ ๐บ] = Pr[๐บ] ยท Pr[๐ธ|๐บ] โ‰ฅ 0.7 ยท Pr[๐ธ|๐บ].

   Suppose that ๐บ occurs for the execution of the for loop. Since ๐บ2 occurred, all ๐‘ž points
queried in Step 3 of Algorithm 2 were successfully obtained. So, the algorithm will reject as

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                     18
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

soon as it successfully obtains a violating sum. Since ๐บ1 occurred, there are at least 2๐‘ž distinct
                                                                                                                    

sums that can be queried in Step 5. Since ๐บ3 occurred, at least 4๐œ€ ยท 2๐‘ž of them are violating.
                                                                        
The total number of erasures the adversary makes over the course of the entire execution is at
most 2๐‘ž๐‘ก, since Algorithm 2 queries at most 2๐‘ž points. Therefore, the fraction of sums that are
nonerased and violating before each iteration of Step 5 is at least
                                   ๐œ€ 2๐‘ž๐‘ก   ๐œ€ 5๐‘ก  ๐œ€ 5๐œ€ ๐œ€ 5๐œ€   ๐œ€
                                     โˆ’ ๐‘ž โ‰ฅ โˆ’   = โˆ’   = โˆ’   > .
                                   4       4  ๐‘ž  4  ๐‘  4 88  6
                                            2

That is, Pr[๐ธ ๐‘˜ |๐บ] > ๐œ€/6 for all ๐‘˜ โˆˆ [24/๐œ€]. Observe that the indicator for the event ๐ธ ๐‘˜ , for every
fixed setting of random coins (of the algorithm and the adversary) used prior to iteration ๐‘˜ of
Step 5, is a Bernoulli random variable with the probability parameter equal to the fraction of
sums that are violating and nonerased right before iteration ๐‘˜. Since independent random coins
are used in each iteration of Step 5,
                                                   ร™
                                                                ๐ธ ๐‘˜ | ๐บ < (1 โˆ’ ๐œ€/6)24/๐œ€ โ‰ค eโˆ’4 .
                                                                      
                            Pr[๐ธ|๐บ] โ‰ค Pr
                                                     ๐‘˜โˆˆ[24/๐œ€]

This yields that Pr[๐ธ โˆฉ ๐บ] > 0.7 ยท (1 โˆ’ eโˆ’4 ) > 2/3, completing the proof of the theorem.                                  

3.1   Concentration of pairs that violate linearity
In this section, we prove Lemma 3.2 on the concentration of pairs that violate linearity. The
proof relies on Claim 3.4 that gives upper bounds on the fraction of pairs (๐‘ฅ, ๐‘ฆ) โˆˆ ({0, 1} ๐‘‘ )2
that violate linearity and on the fraction of triples (๐‘ฅ, ๐‘ฆ, ๐‘ง) โˆˆ {0, 1} ๐‘‘ร—3 such that (๐‘ฅ, ๐‘ฆ) and (๐‘ฅ, ๐‘ง)
violate linearity. The upper bounds are stated as a function of the distance to linearity. The
distance of a function ๐‘“ to linearity, denoted ๐œ€ ๐‘“ , is the minimum over all linear functions ๐‘” over
the same domain as ๐‘“ of Pr๐‘ฅ [ ๐‘“ (๐‘ฅ) โ‰  ๐‘”(๐‘ฅ)].
    We remark that a tighter upper bound than (3.1) in Claim 3.4 is shown in [8, Lemma 3.2].
Since we only need a looser upper bound, we provide a proof for completeness.
Claim 3.4. For all ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1}, the following hold:
                                                Pr       [(๐‘ฅ, ๐‘ฆ) violates linearity] โ‰ค 3๐œ€ ๐‘“ ;                           (3.1)
                                           ๐‘ฅ,๐‘ฆโˆผ{0,1} ๐‘‘

                              Pr          [(๐‘ฅ, ๐‘ฆ) and (๐‘ฅ, ๐‘ง) violate linearity] โ‰ค ๐œ€ ๐‘“ + 4๐œ€2๐‘“ .                          (3.2)
                          ๐‘ฅ,๐‘ฆ,๐‘งโˆผ{0,1} ๐‘‘

Proof. Let ๐‘” be the closest linear function to ๐‘“ . Let ๐‘† โІ {0, 1} ๐‘‘ be the set of points on which ๐‘“
and ๐‘” differ, i.e., ๐‘† = {๐‘ฅ โˆˆ {0, 1} ๐‘‘ | ๐‘“ (๐‘ฅ) โ‰  ๐‘”(๐‘ฅ)}. Then |๐‘†| = ๐œ€ ๐‘“ ยท 2๐‘‘ .
   For a pair (๐‘ฅ, ๐‘ฆ) to violate linearity, at least one of ๐‘ฅ, ๐‘ฆ, and ๐‘ฅ โŠ• ๐‘ฆ must be in ๐‘†. By a union
bound,
             Pr         [(๐‘ฅ, ๐‘ฆ) violates linearity for ๐‘“ ] โ‰ค               Pr         [๐‘ฅ โˆˆ ๐‘† โˆจ ๐‘ฆ โˆˆ ๐‘† โˆจ ๐‘ฅ โŠ• ๐‘ฆ โˆˆ ๐‘†]
          ๐‘ฅ,๐‘ฆโˆผ{0,1} ๐‘‘                                                  ๐‘ฅ,๐‘ฆโˆผ{0,1} ๐‘‘

                                                                    โ‰ค3      Pr [๐‘ฅ โˆˆ ๐‘†] = 3๐œ€ ๐‘“ ,
                                                                          ๐‘ฅโˆผ{0,1} ๐‘‘



                           T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                           19
                            I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

completing the proof of (3.1).
   To prove (3.2), let ๐ธ ๐‘ฅ,๐‘ฆ,๐‘ง be the event that (๐‘ฅ, ๐‘ฆ) and (๐‘ฅ, ๐‘ง) violate linearity. By the law of total
probability,

       Pr          [๐ธ ๐‘ฅ,๐‘ฆ,๐‘ง ]
   ๐‘ฅ,๐‘ฆ,๐‘งโˆผ{0,1} ๐‘‘

                   = Pr[๐ธ ๐‘ฅ,๐‘ฆ,๐‘ง | ๐‘ฅ โˆˆ ๐‘†] Pr[๐‘ฅ โˆˆ ๐‘†] + Pr[๐ธ ๐‘ฅ,๐‘ฆ,๐‘ง | ๐‘ฅ โˆ‰ ๐‘†] Pr[๐‘ฅ โˆ‰ ๐‘†]
                    โ‰ค 1 ยท ๐œ€ ๐‘“ + Pr[๐ธ ๐‘ฅ,๐‘ฆ,๐‘ง | ๐‘ฅ โˆ‰ ๐‘†]
                    โ‰ค ๐œ€ ๐‘“ + Pr[(๐‘ฆ, ๐‘ง โˆˆ ๐‘†) โˆจ (๐‘ฅ โŠ• ๐‘ฆ, ๐‘ง โˆˆ ๐‘†) โˆจ (๐‘ฆ, ๐‘ฅ โŠ• ๐‘ง โˆˆ ๐‘†) โˆจ (๐‘ฅ โŠ• ๐‘ฆ, ๐‘ฅ โŠ• ๐‘ง โˆˆ ๐‘†) | ๐‘ฅ โˆ‰ ๐‘†]
                    โ‰ค ๐œ€ ๐‘“ + 4 Pr[๐‘ฆ, ๐‘ง โˆˆ ๐‘† | ๐‘ฅ โˆ‰ ๐‘†] = ๐œ€ ๐‘“ + 4๐œ€2๐‘“ ,

where, in the last line, we used symmetry and a union bound, and then independence of ๐‘ฅ, ๐‘ฆ,
and ๐‘ง.                                                                                   
Proof of Lemma 3.2. We prove the lemma by applying Chebyshevโ€™s inequality to ๐‘Œ. For all
๐‘–, ๐‘— โˆˆ [๐‘ž], where ๐‘– < ๐‘—, let ๐‘Œ๐‘–,๐‘— be the indicator for the event that (๐‘ฅ ๐‘– , ๐‘ฅ ๐‘— ) violates linearity. Then
๐‘Œ = ๐‘–<๐‘—โˆˆ[๐‘ž] ๐‘Œ๐‘–,๐‘— .
      ร
     First, we obtain a lower bound on ๐”ผ[๐‘Œ]. By linearity of expectation and symmetry,

                                                 ๐‘ž                                                       ๐‘ž
                                ร•                                                                       
              ๐”ผ[๐‘Œ] =                  ๐”ผ[๐‘Œ๐‘–,๐‘— ] =   ยท        Pr       [(๐‘ฅ ๐‘– , ๐‘ฅ ๐‘— ) violates linearity] โ‰ฅ   ๐œ€๐‘“ ,
                                                 2 ๐‘ฅ ๐‘– ,๐‘ฅ ๐‘— โˆผ{0,1} ๐‘‘                                     2
                            ๐‘–<๐‘—โˆˆ[๐‘ž]

where the inequality is due to [8, Theorem 1.2].
  Next, we obtain an upper bound on Var[๐‘Œ]. We have
                                                 ร•                        ร•
                                      Var[๐‘Œ] =          Var[๐‘Œ๐‘–,๐‘— ] +                  Cov[๐‘Œ๐‘–,๐‘— ๐‘Œ๐‘˜,๐‘™ ].
                                                  ๐‘–<๐‘—                    ๐‘–<๐‘—,๐‘˜<๐‘™
                                                                       {๐‘–,๐‘—}โ‰ {๐‘˜,โ„“ }

By (3.1), we get Var[๐‘Œ๐‘–,๐‘— ] โ‰ค ๐”ผ[๐‘Œ๐‘–,๐‘—
                                  2
                                     ] = ๐”ผ[๐‘Œ๐‘–,๐‘— ] โ‰ค 3๐œ€ ๐‘“ . Therefore,

                                                                              ๐‘ž
                                                    ร•                         
                                                            Var[๐‘Œ๐‘–,๐‘— ] โ‰ค 3      ๐œ€๐‘“ .                              (3.3)
                                                                              2
                                                      ๐‘–<๐‘—

When {๐‘–, ๐‘—} โˆฉ {๐‘˜, โ„“ } = โˆ…, the random variables ๐‘Œ๐‘–,๐‘— and ๐‘Œ๐‘˜,โ„“ are independent, and thus
Cov[๐‘Œ๐‘–,๐‘— ๐‘Œ๐‘˜,๐‘™ ] = 0. Consider the case when |{๐‘–, ๐‘—} โˆฉ {๐‘˜, โ„“ }| = 1. Suppose that ๐‘– = ๐‘˜. Then

                     Cov[๐‘Œ๐‘–,๐‘— ๐‘Œ๐‘–,โ„“ ] = ๐”ผ[๐‘Œ๐‘–,๐‘— ๐‘Œ๐‘–,โ„“ ] โˆ’ ๐”ผ[๐‘Œ๐‘–,๐‘— ]๐”ผ[๐‘Œ๐‘–,โ„“ ] โ‰ค ๐œ€ ๐‘“ + 4๐œ€2๐‘“ โˆ’ ๐œ€2๐‘“ = ๐œ€ ๐‘“ + 3๐œ€2๐‘“ ,

where the inequality follows from (3.2) and [8, Theorem 1.2]. By symmetry,

                                                                                    ๐‘ž                    ๐‘ž
                      ร•                                 ร•                                               
                                Cov[๐‘Œ๐‘–,๐‘— ๐‘Œ๐‘˜,๐‘™ ] = 6             Cov[๐‘Œ๐‘–,๐‘— ๐‘Œ๐‘–,๐‘™ ] โ‰ค 6   (๐œ€ ๐‘“ + 3๐œ€2๐‘“ ) โ‰ค 15   ๐œ€๐‘“ ,   (3.4)
                                                                                    3                    3
                 ๐‘–<๐‘—,๐‘˜<๐‘™                                ๐‘–<๐‘—<โ„“
               {๐‘–,๐‘—}โ‰ {๐‘˜,โ„“ }


                                T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                20
                 S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

where   the last inequality holds since ๐œ€ ๐‘“ โ‰ค 12 . Combining (3.3) with (3.4), we get that Var[๐‘Œ] โ‰ค
   ๐‘ž
18 3 ๐œ€ ๐‘“ .
   Finally, we use ๐œ€ ๐‘“ โ‰ฅ ๐œ€, our lower bound on ๐”ผ[๐‘Œ], and Chebyshevโ€™s inequality:

                 ๐‘ž ๐œ€          ๐‘ž ๐œ€๐‘“
                                                             
                                                               ๐”ผ[๐‘Œ]
          Pr ๐‘Œ โ‰ค     โ‰ค Pr ๐‘Œ โ‰ค                      โ‰ค Pr ๐‘Œ โ‰ค
                 2 4          2 4                               4
                                                                                           ๐‘ž
                                                                                              ๐œ€
                                                          
                                            3         16 Var[๐‘Œ]   16 ยท 18                  3 ๐‘“
                             โ‰ค Pr ๐‘Œ โˆ’ ๐”ผ[๐‘Œ] โ‰ฅ ยท ๐”ผ[๐‘Œ] โ‰ค   ยท       โ‰ค         ยท
                                                       9 ๐”ผ[๐‘Œ]                             ๐‘ž 2 2
                                                                                              ๐œ€๐‘“
                                            4                 2     9                       
                                                                                          2
                                 16 ยท 18 2   ๐‘žโˆ’2          22      22๐œ€     22  1
                             =          ยท ยท            <        =       โ‰ค    โ‰ค ,
                                   9     3 ๐‘ž(๐‘ž โˆ’ 1)๐œ€ ๐‘“   ๐‘ž ยท ๐œ€๐‘“   ๐‘๐‘ก๐œ€ ๐‘“   ๐‘๐‘ก  4

since ๐‘ž = ๐‘๐‘ก๐œ€ and ๐‘ = 88. This completes the proof of Lemma 3.2.                                         


4    A lower bound for online-erasure-resilient linearity testing
In this section, we prove Theorem 1.3 that shows that every ๐‘ก-online-erasure-resilient ๐œ€-tester for
linearity of functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} must make more than log2 ๐‘ก queries.

Proof of Theorem 1.3. The proof is via Yaoโ€™s minimax principle for the online-erasures model
(stated in Theorem 9.1 and Corollary 9.4). Let ๐’Ÿ + be the uniform distribution over all linear
Boolean functions on {0, 1} ๐‘‘ and ๐’Ÿ โˆ’ be the uniform distribution over all Boolean functions
functions on {0, 1} ๐‘‘ .
    We show that a function ๐‘“ โˆผ ๐’Ÿ โˆ’ is 14 -far from linear with probability at least 6/7. Let ๐‘”
be a linear function, ๐‘“ โˆผ ๐’Ÿ โˆ’ , and dist( ๐‘“ , ๐‘”) be the fraction of domain points on which ๐‘“ and
                                                                                                    2๐‘‘
๐‘” differ. Then, ๐”ผ[dist( ๐‘“ , ๐‘”)] = 12 . By the Hoeffding bound, Pr ๐‘“ โˆผ๐’Ÿ โˆ’ [dist( ๐‘“ , ๐‘”) โ‰ค 14 ] โ‰ค eโˆ’ 8 . By a
                                                                                                   2๐‘‘
union bound over the 2๐‘‘ linear functions, Pr ๐‘“ โˆผ๐’Ÿ โˆ’ [ ๐‘“ is 14 -far from linear] โ‰ฅ 1 โˆ’ 2๐‘‘ ยท eโˆ’ 8 . For ๐‘‘
large enough, this probability is at least 6/7.
    We fix the following strategy   for a ๐‘ก-online-erasure oracle ๐’ช: after responding to each query,
erase ๐‘ก sums of the form           ๐‘ฅ, where ๐‘‡ is a subset of the queries made so far, choosing the
                           ร‰
                              ๐‘ฅโˆˆ๐‘‡
subsets ๐‘‡ in some fixed order. If at most log2 ๐‘ก queries are made, the adversary erases all the
sums of queried points.
    Let ๐ด be a deterministic algorithm that makes ๐‘ž โ‰ค log2 ๐‘ก queries to the oracle ๐’ช. Assume
w.l.o.g. that ๐ด does not repeat queries. We describe two random processes ๐’ซ + and ๐’ซ โˆ’ that
interact with algorithm ๐ด in lieu of oracle ๐’ช and provide query answers consistent with a
random function from ๐’Ÿ + and ๐’Ÿ โˆ’ , respectively. For each query of ๐ด, both processes ๐’ซ + and
๐’ซ โˆ’ return โŠฅ if the value has been previously erased by ๐’ช; otherwise, they return 0 or 1 with
equal probability. Thus, the distribution over query-answer histories when ๐ด interacts with ๐’ซ +
is the same as when ๐ด interacts with ๐’ซ โˆ’ .
    Next, we describe how the processes ๐’ซ + and ๐’ซ โˆ’ assign values to the locations of ๐‘“ that
were either not queried by ๐ด or erased when queried, and show that they generate ๐’Ÿ + and ๐’Ÿ โˆ’ ,
respectively. After ๐ด finishes its queries, ๐’ซ โˆ’ sets the remaining unassigned locations (including

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                              21
                    I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

the erased locations) of the function to be 0 or 1 with equal probability. Clearly, ๐’ซ โˆ’ generates a
function from the distribution ๐’Ÿ โˆ’ .
     To describe ๐’ซ + fully, first let ๐‘„ โІ {0, 1} ๐‘‘ denote the queries of ๐ด that are answered with a
value other than โŠฅ. Since ๐‘ž โ‰ค log2 ๐‘ก, by our choice of the oracle ๐’ช, the sum of any subset of
vectors in ๐‘„ is not contained in ๐‘„. Hence, the vectors in ๐‘„ are linearly independent. Then, ๐’ซ +
completes ๐‘„ to a basis ๐ต for {0, 1} ๐‘‘ and sets the value of ๐‘“ on all vectors in ๐ต \ ๐‘„ independently
to 0 or 1 with equal probability.
     Since ๐ต is a basis, each vector ๐‘ฆ โˆˆ {0, 1} ๐‘‘ canร‰be expressed as a linear combination of vectors
in ๐ต (with coefficients in {0, 1}), that is, ๐‘ฆ =       ๐‘ฅโˆˆ๐‘‡ ๐‘ฅ for some ๐‘‡ โІ ๐ต. The process ๐’ซ sets
                                                                                               +

 ๐‘“ (๐‘ฆ) = ๐‘ฅโˆˆ๐‘‡ ๐‘“ (๐‘ฅ), where addition is mod 2. The function ๐‘“ is linear and agrees with all values
        ร
previously assigned by ๐’ซ + to the vectors in ๐‘„. Moreover, ๐‘“ is distributed according to ๐’Ÿ + , since
one can obtain a uniformly random linear function by first specifying a basis for {0, 1} ๐‘‘ , and
then setting the value of ๐‘“ to be 0 or 1 with equal probability for each basis vector.
     Thus, ๐’ซ + generates linear functions, ๐’ซ โˆ’ generates functions that are 14 -far from linear with
probability at least 67 , and the query-answer histories for any deterministic algorithm ๐ด that
makes at most log2 ๐‘ก queries and runs against our ๐‘ก-online-erasure oracle ๐’ช are identical under
๐’ซ + and ๐’ซ โˆ’ . Consequently, Corollary 9.4 implies the desired lower bound.                         


5    An online-erasure-resilient quadraticity tester
In this section, we state our online-erasure-resilient quadraticity tester (Algorithm 3) and prove
Theorem 1.4.
    The main idea behind Algorithm 3 and its representation as a two-player game appear in
Section 1.2, accompanied by explanatory figures for the case when ๐‘ก = 1. We now give a high
level overview of Algorithm 3. For a function ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} and ๐‘ฅ, ๐‘ฆ, ๐‘ง โˆˆ {0, 1} ๐‘‘ , let
                                                     ร•              รŠ 
                                 ๐‘‡๐‘“ (๐‘ฅ, ๐‘ฆ, ๐‘ง) =                 ๐‘“         ๐‘ข ,
                                                  โˆ…โ‰ ๐‘†โІ{๐‘ฅ,๐‘ฆ,๐‘ง}       ๐‘ขโˆˆ๐‘†


where the first sum is mod 2. We say a triple (๐‘ฅ, ๐‘ฆ, ๐‘ง) violates quadraticity if ๐‘‡๐‘“ (๐‘ฅ, ๐‘ฆ, ๐‘ง) = 1.
The tester of Alon et al. samples three vectors ๐‘ฅ, ๐‘ฆ, ๐‘ง โˆˆ {0, 1} ๐‘‘ uniformly and independently
at random and rejects if (๐‘ฅ, ๐‘ฆ, ๐‘ง) violates quadraticity. Our tester looks for the same kind of
violations as the tester of Alon et al.
    The main challenge in the design of our online-erasure-resilient tester is to ensure it can
query all three such points and their sums in the presence of a ๐‘ก-online-erasure adversary. In
each iteration of the repeat loop of Algorithm 3, the following steps are performed. For each
                                                                                                 (โ„“ )
โ„“ โˆˆ [๐‘ก + 1], we first query a reserve of uniformly and independently sampled points ๐‘ฅ ๐‘– for
๐‘– โˆˆ [(๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก ]. Next, for each โ„“ โˆˆ [๐‘ก + 1], we query a set of points that we visualize as
being the nodes of a (๐‘ก + 1)-ary tree of depth ๐‘ก. There is a one-to-one correspondence between
the nodes of such a tree and vectors of length up to ๐‘ก + 1 over the alphabet [๐‘ก + 1]. For ๐‘š โˆˆ [๐‘ก],
we represent by ๐‘ฆ(โ„“ ,๐‘—1 ,...,๐‘—๐‘š ) , the sampled point visualized as a node at depth ๐‘š in the โ„“ -th tree,
where the ๐‘—๐‘– โ€™s specify the unique path from the root to that node in the tree. Now, for โ„“ โˆˆ [๐‘ก + 1],

                      T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                           22
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

and for each node ๐‘ฆ ๐’‹ in the โ„“ -th tree, where ๐’‹ is shorthand for (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘š ), we associate with
that node a subset ๐‘† ๐’‹ of points from the reserve, and query the points ๐‘ฆ ๐’‹ โŠ• ๐‘ฅ for each ๐‘ฅ in ๐‘† ๐’‹ .
The set ๐‘† ๐’‹ is a subset of a specified cardinality of the set ๐‘† ๐’‹ (โˆ’1) , where ๐‘† ๐’‹ (โˆ’1) is the set associated
with the parent node of ๐‘ฆ ๐’‹ in the โ„“ -th tree. Finally, the algorithm queries a point ๐‘ง sampled
uniformly and independently at random from {0, 1} ๐‘‘ , and samples a uniformly random leaf ๐‘ฆ ๐’‹
of a uniformly random tree โ„“ โˆˆ [๐‘ก + 1]. The set ๐‘† ๐’‹ associated with the leaf ๐‘ฆ ๐’‹ has, by construction,
๐‘ก + 1 points in it. All the points in ๐‘† ๐’‹ , again, by construction, also belong to the sets ๐‘† ๐’‹0 associated
with the nodes ๐‘ฆ ๐’‹0 on the path from the root to the leaf ๐‘ฆ ๐’‹ of the โ„“ -th tree. Our algorithm queries
๐‘ฆ ๐’‹0 โŠ• ๐‘ง for all such nodes ๐‘ฆ ๐’‹0 . It then samples ๐‘ฅ uniformly at random from ๐‘† ๐’‹ and queries ๐‘ฅ โŠ• ๐‘ง.
Finally, it samples a uniformly random node ๐‘ฆ ๐’‹0 on the path from the root to the leaf ๐‘ฆ ๐’‹ and
queries ๐‘ฅ โŠ• ๐‘ฆ ๐’‹0 โŠ• ๐‘ง. Observe that, by design, the point ๐‘ฅ โŠ• ๐‘ฆ ๐’‹0 has already been queried in an
earlier step. The algorithm rejects if all the points involved in the sum ๐‘‡๐‘“ (๐‘ฅ, ๐‘ฆ ๐’‹0 , ๐‘ง) are nonerased
and the triple (๐‘ฅ, ๐‘ฆ ๐’‹0 , ๐‘ง) violates quadraticity.
      Algorithm 3 uses the following notation. For a vector ๐’‹ = (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘š ), where ๐‘š โˆˆ [0, ๐‘ก]
and โ„“ , ๐‘—1 , . . . , ๐‘—๐‘ก โˆˆ [๐‘ก + 1], we use the convention that ๐’‹ = (โ„“ ) for ๐‘š = 0. For ๐‘˜ โˆˆ [0, ๐‘š], let
๐’‹ (๐‘˜) = (โ„“ , ๐‘—1 , . . . , ๐‘— ๐‘˜ ) be the vector containing the first ๐‘˜ + 1 entries of ๐’‹. Finally, let ๐’‹ (โˆ’1) be the
vector ๐’‹ with its last entry removed. If ๐’‹ = (โ„“ ), then ๐’‹ (โˆ’1) is the empty vector โˆ….

Algorithm 3 A ๐‘ก-Online-Erasure-Resilient Quadraticity Tester
Input: ๐œ€ โˆˆ (0, 1), access to function ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} via a ๐‘ก-online-erasure oracle.
                                               (๐‘ก+1)(๐‘ก+1) โˆ’1
 1: Let ๐ผ = (๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก , ๐ฝ =                         , and ๐›ผ = min 2๐œ€ , (18ยท๐ผ๐ฝ(๐‘ก+1)) ๐ผ๐ฝ(๐‘ก+1) .
                                                                                        7
                                                                                                    
                                                     ๐‘ก
 2: repeat 4๐‘ ๐‘ก /๐›ผ times:                                     โŠฒ ๐‘ ๐‘ก is a constant from Lemma 5.4 that depends only on ๐‘ก .
 3:       for all โ„“ โˆˆ [๐‘ก + 1]:
                                                    (โ„“ )      (โ„“ )                          (โ„“ )        (โ„“ )
 4:            Query ๐‘“ at independent ๐‘ฅ 1 , . . . , ๐‘ฅ ๐ผ โˆผ {0, 1} ๐‘‘ , and let ๐‘†โˆ… = {๐‘ฅ 1 , . . . , ๐‘ฅ ๐ผ }.
 5:            for all integer ๐‘š โˆˆ [0, ๐‘ก]:
 6:                 for all (๐‘—1 , ๐‘—2 , . . . , ๐‘—๐‘š ) โˆˆ [๐‘ก + 1]๐‘š :         โŠฒ When ๐‘š = 0, the loop is run once.
 7:                       Let ๐’‹ = (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘š ) and query ๐‘“ at ๐‘ฆ ๐’‹ โˆผ {0, 1} ๐‘‘ .       โŠฒ ๐’‹ = (โ„“ ) for ๐‘š = 0.
 8:                       Let ๐‘† ๐’‹ be a uniformly random subset of ๐‘† ๐’‹ (โˆ’1) of size (๐‘ก + 1)(2๐‘ก + 1)๐‘กโˆ’๐‘š .
 9:                       Query ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ for all ๐‘ฅ โˆˆ ๐‘† ๐’‹ .
10:                       Remove ๐‘† ๐’‹ from ๐‘† ๐’‹ (โˆ’1) .
11:       Sample ๐‘ง โˆผ {0, 1} ๐‘‘ and query ๐‘“ at ๐‘ง.
12:       Sample ๐’‹ = (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘ก ) โˆผ [๐‘ก + 1](๐‘ก+1) and query ๐‘“ at ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง for all ๐‘š โˆˆ [0, ๐‘ก].
                                 (โ„“ )   (โ„“ )           (โ„“ )                                              (โ„“ )
13:       Suppose ๐‘† ๐’‹ = {๐‘ฅ 1 , ๐‘ฅ2 , . . . , ๐‘ฅ ๐‘ก+1 }. Sample ๐‘– โˆผ [๐‘ก + 1] and query ๐‘“ at ๐‘ฅ ๐‘– โŠ• ๐‘ง.
                                                                         (โ„“ )
14:       Sample integer ๐‘š โˆผ [0, ๐‘ก] and query ๐‘“ at ๐‘ฅ ๐‘– โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง.
                          (โ„“ )
15:     Reject if ๐‘‡๐‘“ (๐‘ฅ ๐‘– , ๐‘ฆ ๐’‹ (๐‘š) , ๐‘ง) = 1.                      โŠฒ All points needed for computing ๐‘‡๐‘“ are nonerased.
16: Accept.



Proof of Theorem 1.4. If ๐‘“ is quadratic, then Algorithm 3 always accepts. Suppose that ๐‘“ is
๐œ€-far from quadratic. Fix an adversarial strategy and a round of Algorithm 3. We show that
Algorithm 3 rejects with probability ฮฉ(๐œ€) in this round.

                         T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                         23
                        I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

                                                                                                                         (โ„“ )
        Observe that Algorithm 3 makes queries of three types: singletons (of the form ๐‘ฅ ๐‘– , ๐‘ฆ ๐’‹ (๐‘š) , and
                              (โ„“ )               (โ„“ )                                                                 (โ„“ )
๐‘ง), doubles (of the form ๐‘ฅ ๐‘– โŠ• ๐‘ฆ ๐’‹ (๐‘š) ,๐‘ฅ ๐‘– โŠ• ๐‘ง, and ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง), and triples (of the form ๐‘ฅ ๐‘– โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง),
                                                                                                                                (โ„“ )
where ๐‘– โˆˆ [๐ผ], ๐’‹ = (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘ก ) โˆˆ [๐‘ก + 1](๐‘ก+1) , ๐‘š โˆˆ [0, ๐‘ก]. We call points of the form ๐‘ฅ ๐‘– โŠ• ๐‘ฆ ๐’‹ (๐‘š) ,
 (โ„“ )                                                                                  (โ„“ )
๐‘ฅ ๐‘– โŠ• ๐‘ง, and ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง double decoys, and points of the form ๐‘ฅ ๐‘– โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง triple decoys. We refer to
double and triple decoys simply as decoys. Only some of the decoys become actual queries.
    Let ๐’ข denote the good event that, for the fixed round, all of the following hold:

        โ€ข all singleton queries are successfully obtained;
                                                        (โ„“ )
        โ€ข all double decoys of the form ๐‘ฅ ๐‘– โŠ• ๐‘ฆ ๐’‹ (๐‘š) are nonerased right before ๐‘ฆ ๐’‹ (๐‘š) is queried;
                                                                                        (โ„“ )
        โ€ข all double and triple decoys involving ๐‘ง (as well as ๐‘ฅ ๐‘– and/or ๐‘ฆ ๐’‹ (๐‘š) ) are nonerased right
          before ๐‘ง is queried.

    To lower bound the rejection probability of the algorithm, we consider the event that all
                       (โ„“ )
triples of the form (๐‘ฅ ๐‘– , ๐‘ฆ ๐’‹ (๐‘š) , ๐‘ง), where ๐‘– โˆˆ [๐ผ], ๐’‹ = (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘ก ) โˆˆ [๐‘ก + 1](๐‘ก+1) , ๐‘š โˆˆ [0, ๐‘ก], violate
quadraticity, and all queries in the round are successfully obtained.
                                                                                                              (โ„“ )
Definition 5.1 (Witness). The singleton queries form a witness if ๐‘‡๐‘“ (๐‘ฅ ๐‘– , ๐‘ฆ ๐’‹ (๐‘š) , ๐‘ง) = 1 for all
๐‘– โˆˆ [๐ผ], ๐’‹ = (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘ก ) โˆˆ [๐‘ก + 1](๐‘ก+1) , ๐‘š โˆˆ [0, ๐‘ก], and, in addition, all singletons and all decoys
are distinct.
        Let ๐‘Š be the event that the singleton queries form a witness. Let ๐›ผ be as defined in Step 1.
Lemma 5.2 (Probability of successful singleton queries). If ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} is ๐œ€-far from being
quadratic, then Pr[๐‘Š โˆฉ ๐’ข] โ‰ฅ ๐›ผ/2.
        In other words, Lemma 5.2 shows that for every adversarial strategy, with probability at least
๐›ผ
2 , the tester successfully obtains singleton queries that form a witness and, in addition, right
before each singleton is queried, the decoys involving that singleton are nonerased. The proof
of Lemma 5.2 (in Section 5.1) relies on the following key structural result about the fraction of
large structures where all triples of a certain form violate quadraticity.
Lemma 5.3 (Probability of singletons forming a violation structure). Let ๐ผ, ๐ฝ, ๐‘ก โˆˆ โ„• . Suppose
                                                                  (โ„“ )   (โ„“ )
๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} is ๐œ€-far from being quadratic. For points ๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง โˆผ {0, 1} ๐‘‘ , where (๐‘–, ๐‘—, โ„“ ) โˆˆ
[๐ผ] ร— [๐ฝ] ร— [๐‘ก + 1],                                                  
                                                 ร™
                                                                       (โ„“ )   (โ„“ )
                                     Pr                          [๐‘‡๐‘“ (๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง) = 1] โ‰ฅ ๐›ผ,                                         (5.1)
                                          ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ],โ„“ โˆˆ[๐‘ก+1]

where ๐›ผ = min 2๐œ€ , (18ยท๐ผ๐ฝ(๐‘ก+1)) ๐ผ๐ฝ(๐‘ก+1) .
                           7
                                           

        We prove Lemma 5.3 in Section 5.2, building on a result of [2]. To prove Lemma 5.2, we use
                                                                  ร๐‘ก                             (๐‘ก+1) โˆ’1
Lemma 5.3 with ๐ผ = (๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก and ๐ฝ =                        ๐‘š=0 (๐‘ก + 1)
                                                                                     ๐‘š = (๐‘ก+1)
                                                                                                 ๐‘ก          , which is the number of
nodes in each tree.

                          T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                                           24
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

    Next, in Lemma 5.4, we show that the probability of successfully obtaining all double and
triple queries in the round, given the event ๐‘Š โˆฉ ๐’ข, depends only on ๐‘ก. The proof of Lemma 5.4
appears in Section 5.3.
Lemma 5.4 (Probability of all double and triple queries being nonerased). The probability that all
queries made in one round of Algorithm 3 are successfully obtained, conditioned on the event ๐‘Š โˆฉ ๐’ข, is
at least 1/๐‘ ๐‘ก , where ๐‘ ๐‘ก depends only on ๐‘ก.
    Let ๐ป denote the event that all queries in the round are successfully obtained, and recall
that ๐‘Š is the event that the singleton queries form a witness. The probability that Algorithm 3
rejects in the given round is at least Pr[๐‘Š โˆฉ ๐ป]. Note that

                     Pr[๐‘Š โˆฉ ๐ป] โ‰ฅ Pr[๐‘Š โˆฉ ๐ป โˆฉ ๐’ข] = Pr[๐ป | ๐‘Š โˆฉ ๐’ข] Pr[๐‘Š โˆฉ ๐’ข].

By Lemma 5.2 and Lemma 5.4, we have that Algorithm 3 rejects with probability at least ๐‘1๐‘ก ยท ๐›ผ2
for a fixed round. Thus, after 4๐‘๐›ผ๐‘ก rounds, Algorithm 3 rejects with probability at least 23 .      

5.1   Proof of Lemma 5.2
In this section, we prove Lemma 5.2 that bounds from below the probability that the singleton
queries are successfully obtained and form a witness, and, in addition, right before each singleton
is queried, the decoys involving that singleton are nonerased. We show that if the fraction of
large violation structures is at least ๐›ผ (Lemma 5.3), then, despite the adversarial erasures, the
probability of successful singleton queries, as described above, is at least ๐›ผ/2.

Proof of Lemma 5.2. The key idea of the proof is to keep track of active witnesses during the
execution of the round. To simplify notation, let ๐พ = (๐ผ + ๐ฝ)(๐‘ก + 1) + 1 and denote by ๐‘ข1 , . . . , ๐‘ข๐พ
the singleton queries made by Algorithm 3 in the given round.
Definition 5.5 (Active witness). For ๐‘– โˆˆ [๐พ], let ๐‘ข1 , . . . , ๐‘ข๐‘– denote the singleton queries made
by Algorithm 3 up until a given timepoint of the fixed round. We say a witness (๐‘ฃ 1 , . . . , ๐‘ฃ ๐พ ) โˆˆ
({0, 1} ๐‘‘ )๐พ is ๐‘–-active if

   1. The first ๐‘– entries of the tuple are equal to ๐‘ข1 , ๐‘ข2 , . . . , ๐‘ข๐‘– .

   2. All decoys involving ๐‘ข ๐‘— , where ๐‘— โ‰ค ๐‘–, were nonerased right before ๐‘ข ๐‘— was queried.

    Furthermore, let ๐ด ๐‘– be a random variable denoting the number of active witnesses right after
the ๐‘–-th singleton query, and let ๐ต ๐‘– denote the number of active witnesses right before the ๐‘–-th
singleton query. Let ๐ต1 denote the number of witnesses at the beginning of the round, such that all
singletons and decoys for the witness are nonerased. Note that Pr[๐‘Š โˆฉ ๐’ข] = Pr[๐ด๐พ = 1] = ๐”ผ[๐ด๐พ ].
To lower bound ๐”ผ[๐ด๐พ ], we first show a lower bound on ๐ต1 , obtained in turn by a lower bound
on the total fraction of witnesses. We then bound the difference between ๐ด ๐‘– and ๐ต ๐‘–+1 and show
a relationship between ๐”ผ[๐ด ๐‘– ] and ๐”ผ[๐ต ๐‘– ] for general ๐‘–. All expectations in this proof are over the
choice of singletons ๐‘ข1 , . . . , ๐‘ข๐พ โˆผ {0, 1} ๐‘‘ .

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                       25
                      I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

Claim 5.6. Let ๐›ผ be as defined in Lemma 5.3. If ๐‘“ is ๐œ€-far from being quadratic then

                                                                                            7๐›ผ
                                      Pr              [(๐‘ข1 , . . . , ๐‘ข๐พ ) is a witness] โ‰ฅ      .
                              ๐‘ข1 ,...,๐‘ข๐พ   โˆผ{0,1} ๐‘‘                                          8

Proof. The probability that the event of Lemma 5.3 is true for the singleton queries ๐‘ข1 , . . . , ๐‘ข๐พ is at
least ๐›ผ. Let ๐‘† denote the set of all singletons and decoys associated with the ๐พ-tuple (๐‘ข1 , . . . , ๐‘ข๐พ ).
The number of triple decoys associated with the ๐พ-tuple is at most ๐ผ๐ฝ(๐‘ก + 1), whereas the number
of double decoys associated with the ๐พ-tuple is at most ๐ผ(๐ฝ + 1)(๐‘ก + 1). Therefore, |๐‘†| โ‰ค 3๐ผ๐ฝ(๐‘ก + 1).
Any two elements in ๐‘† are uniformly and independently distributed. Thus, the probability
that two elements in ๐‘† are identical is 21๐‘‘ . By a union bound over all pairs of elements in ๐‘†, the
probability that not all elements in ๐‘† are distinct is at most |๐‘†|
                                                                                       2

                                                                2๐‘‘
                                                                   . For ๐‘‘ large enough, we have
|๐‘†| 2
 2๐‘‘
      โ‰ค ๐›ผ8 . Hence, with probability at least ๐›ผ โˆ’ ๐›ผ8 = 7๐›ผ
                                                        8 , the singleton queries ๐‘ข1 , . . . , ๐‘ข๐พ form a
witness.                                                                                                  

Claim 5.7. For all adversarial strategies, ๐ต1 โ‰ฅ 3๐›ผ   ๐พ๐‘‘
                                                 4 ยท2 .


Proof. Recall that ๐ต1 counts the number of witnesses at the beginning of the round, such that all
singletons and decoys for the witness are nonerased. Algorithm 3 makes at most |๐‘†| queries in
each round, so it makes at most 4๐‘๐›ผ๐‘ก |๐‘†| queries in total. Therefore, the oracle can erase at most
4๐‘กยท|๐‘†|ยท๐‘ ๐‘ก
    ๐›ผ      points from {0, 1} ๐‘‘ . Each erasure can deactivate at most |๐‘†| ยท 2(๐พโˆ’1)๐‘‘ witnesses, since the
point erased could be any one of the |๐‘†| singletons and decoys associated with the witness. By
                                ๐พ๐‘‘ โˆ’ 4๐‘กยท|๐‘†| ยท๐‘ ๐‘ก ยท 2(๐พโˆ’1)๐‘‘ . Since |๐‘†| โ‰ค 3๐ผ๐ฝ(๐‘ก + 1), for ๐‘‘ large enough,
                                                          2
Claim 5.6, we obtain ๐ต1 โ‰ฅ 7๐›ผ
                           8 ยท2          ๐›ผ
we have 4๐‘กยท|๐‘†|๐›ผ ยท๐‘๐‘ก ยท 2(๐พโˆ’1)๐‘‘ โ‰ค ๐›ผ8 ยท 2๐พ๐‘‘ . Therefore, ๐ต1 โ‰ฅ 3๐›ผ   ๐พ๐‘‘
               2
                                                            4 ยท2 .                                        

Claim 5.8. For all ๐‘– โˆˆ [๐พ โˆ’ 1] and all adversarial strategies,

                               ๐ด ๐‘– โˆ’ ๐ต ๐‘–+1 โ‰ค (๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก ยท |๐‘†| ยท 2(๐พโˆ’1โˆ’๐‘–)๐‘‘ .

Proof. Observe that Algorithm 3 makes at most (๐‘ก + 1)(2๐‘ก + 1)๐‘ก decoy queries between any two
singleton queries (this is the number of double queries made in Step 9 for ๐‘š = 0). Therefore,
in the period right after the ๐‘–-th singleton query and before the (๐‘– + 1)-st singleton query, the
oracle can perform at most ((๐‘ก + 1)(2๐‘ก + 1)๐‘ก + 1) ยท ๐‘ก โ‰ค (๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก erasures. Let ๐‘ข1 , ๐‘ข2 , . . . , ๐‘ข๐‘–
be the first ๐‘– singleton queries of the algorithm. For each erasure, the oracle can deactivate
at most |๐‘†| ยท 2(๐พโˆ’1โˆ’๐‘–)๐‘‘ witnesses whose first ๐‘– entries are ๐‘ข1 , ๐‘ข2 , . . . , ๐‘ข๐‘– , by erasing one of the
remaining singletons or decoys. Therefore, the number of active witnesses between right after
the ๐‘–-th singleton query and right before the (๐‘– + 1)-st singleton query can decrease by at most
(๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก ยท |๐‘†| ยท 2(๐พโˆ’1โˆ’๐‘–)๐‘‘ .                                                                     

Claim 5.9. For all ๐‘– โˆˆ [๐พ], it holds that ๐”ผ[๐ด ๐‘– ] = 21๐‘‘ ๐”ผ[๐ต ๐‘– ].

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                              26
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

Proof. For ๐‘ฃ โˆˆ {0, 1} ๐‘‘ , let ๐ต ๐‘–,๐‘ฃ denote the number of witnesses that are active right before the
๐‘–-th singleton query and whose ๐‘–-th entry is equal to ๐‘ฃ. Then, ๐ต ๐‘– = ๐‘ฃโˆˆ{0,1} ๐‘‘ ๐ต ๐‘–,๐‘ฃ . Let 1(๐‘ฃ) be the
                                                                      ร
indicator random variable for the event that the ๐‘–-th singleton query is equal to ๐‘ฃ. Then,
                               h ร•                   i                 h ร•             i      1
                 ๐”ผ[๐ด ๐‘– ] = ๐”ผ               ๐ต ๐‘–,๐‘ฃ 1(๐‘ฃ) = ๐”ผ[1(๐‘ฃ)]๐”ผ                    ๐ต ๐‘–,๐‘ฃ =      ๐”ผ[๐ต ๐‘– ] .   
                                                                                              2๐‘‘
                               ๐‘ฃโˆˆ{0,1} ๐‘‘                                ๐‘ฃโˆˆ{0,1} ๐‘‘

      We combine the claims above to complete the proof of the lemma. By Claim 5.9,
                      1            1                        1            1
           ๐”ผ[๐ด๐พ ] =     ๐‘‘
                          ๐”ผ[๐ต๐พ ] = ๐‘‘ ๐”ผ[๐ด๐พโˆ’1 + ๐ต๐พ โˆ’ ๐ด๐พโˆ’1 ] = ๐‘‘ ๐”ผ[๐ด๐พโˆ’1 ] โˆ’ ๐‘‘ ๐”ผ[๐ด๐พโˆ’1 โˆ’ ๐ต๐พ ]
                      2           2                        2            2
                                                                                           ๐พโˆ’1
                                                                                  ร• ๐”ผ[๐ด โˆ’ ๐ต ]
                       1              1                             1                  ๐‘–      ๐‘–+1
                  =       ๐”ผ[๐ต ๐พโˆ’1 ] โˆ’    ๐”ผ[๐ด ๐พโˆ’1 โˆ’ ๐ต ๐พ ] = ยท ยท ยท =     ๐”ผ [๐ต   ] โˆ’                 .
                                      2๐‘‘                           2๐พ๐‘‘
                                                                            1           (๐พโˆ’๐‘–)๐‘‘
                      22๐‘‘                                                         ๐‘–=1
                                                                                      2

By Claim 5.7,
                                                    1            3๐›ผ
                                                     ๐พ๐‘‘
                                                        ๐”ผ[๐ต1 ] โ‰ฅ    .
                                                   2              4
In addition, Claim 5.8 yields that
                        ๐พโˆ’1                        ๐พโˆ’1
                        ร•   ๐”ผ[๐ด โˆ’ ๐ต
                                 ๐‘–      ๐‘–+1 ]
                                                   ร•   (๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก ยท |๐‘†| ยท 2(๐พโˆ’1โˆ’๐‘–)๐‘‘
                                              โ‰ค
                                2 (๐พโˆ’๐‘–)๐‘‘                                2(๐พโˆ’๐‘–)๐‘‘
                         ๐‘–=1                        ๐‘–=1
                                                    ๐พ ยท (๐‘ก + 1)2 (2๐‘ก + 1)๐‘ก ยท |๐‘†|  ๐›ผ
                                               โ‰ค                  ๐‘‘
                                                                                 โ‰ค ,
                                                                2                 4
where the last inequality holds for large enough ๐‘‘. We obtain that
                                                                    3๐›ผ ๐›ผ  ๐›ผ
                                  Pr[๐‘Š โˆฉ ๐’ข] = ๐”ผ[๐ด๐พ ] โ‰ฅ                 โˆ’ = .                                 
                                                                     4  4 2

5.2    Proof of Lemma 5.3
In this section, we prove Lemma 5.3 on the fraction of large violation structures for which all
           (โ„“ )  (โ„“ )
triples (๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง), where (๐‘–, ๐‘—, โ„“ ) โˆˆ [๐ผ] ร— [๐ฝ] ร— [๐‘ก + 1], violate quadraticity. Our proof builds on a
result of [2].

Proof of Lemma 5.3. Let ๐œ‚ denote the fraction of violating triples for ๐‘“ , i.e.,

                                      ๐œ‚ :=          Pr        [๐‘‡๐‘“ (๐‘ฅ, ๐‘ฆ, ๐‘ง) = 1].
                                              ๐‘ฅ,๐‘ฆ,๐‘งโˆผ{0,1} ๐‘‘

The distance of ๐‘“ to quadraticity, denoted by ๐œ€ ๐‘“ , is the minimum of Pr๐‘ฅ [ ๐‘“ (๐‘ฅ) โ‰  ๐‘”(๐‘ฅ)] over all
quadratic functions ๐‘” over the same domain as ๐‘“ . Using this notation, we state a result from [2]
for the special case of quadraticity.
Claim 5.10 (Theorem 1 of [2]). For all ๐‘“ , we have ๐œ‚ โ‰ฅ min( 73 ๐œ€ ๐‘“ , 40
                                                                      1
                                                                        ).

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                 27
                                    I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

                                                                                                                                                                       (โ„“ )   (โ„“ )
    Let ๐œ‚0 denote the left-hand side of (5.1), that is, the probability that for ๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง โˆผ {0, 1} ๐‘‘ ,
                 (โ„“ )        (โ„“ )
all triples (๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง) are violating, where (๐‘–, ๐‘—, โ„“ ) โˆˆ [๐ผ] ร— [๐ฝ] ร— [๐‘ก + 1]. Claim 5.11 lower bounds
๐œ‚0 in terms of ๐œ‚ for all values of ๐œ€ ๐‘“ . Claim 5.13 lower bounds ๐œ‚0 for small values of ๐œ€ ๐‘“ . We
combine these results and use Claim 5.10 to conclude the proof of the lemma.
                                                           (โ„“ )       (โ„“ )
Claim 5.11. For all ๐‘“ and points ๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง โˆผ {0, 1} ๐‘‘ , where ๐‘– โˆˆ [๐ผ], ๐‘— โˆˆ [๐ฝ], โ„“ โˆˆ [๐‘ก + 1], it holds that
                                             h            ร™                                                                        i
                                                                              [๐‘‡๐‘“ (๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง) = 1] โ‰ฅ ๐œ‚ ๐ผ๐ฝ(๐‘ก+1) .
                                                                                          (โ„“ )         (โ„“ )
                                        Pr
                                                 ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ],โ„“ โˆˆ[๐‘ก+1]


Proof. The proof uses the Hรถlderโ€™s inequality as its key ingredient.

Claim 5.12 (Hรถlderโ€™s inequality). Let ๐‘, ๐‘ž โ‰ฅ 1 such that ๐‘1 + 1๐‘ž = 1. For all vectors (๐‘Ž 1 , . . . , ๐‘Ž ๐‘› ),
(๐‘1 , . . . , ๐‘ ๐‘› ) โˆˆ โ„ ๐‘› ,
                                                 ร•                           ร•                       1/๐‘  ร•                                 1/๐‘ž
                                                                                                 ๐‘                                        ๐‘ž
                                                         |๐‘Ž ๐‘– ๐‘ ๐‘– | โ‰ค                 |๐‘Ž ๐‘– |                                     |๐‘ ๐‘– |               .
                                                 ๐‘–โˆˆ[๐‘›]                        ๐‘–โˆˆ[๐‘›]                                  ๐‘–โˆˆ[๐‘›]

          (โ„“ )     (โ„“ )                                    (โ„“ )                                               (โ„“ )        (โ„“ )
    For ๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง โˆผ {0, 1} ๐‘‘ , let ๐‘‡๐‘–๐‘— be the event ๐‘‡๐‘“ (๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง) = 1. Then
                        h            ร™                        i         ร•                  h                    ร™                                              i
                                                      (โ„“ )                                                                                    (โ„“ )
                 Pr                                 ๐‘‡๐‘–๐‘—           =                 Pr                                                  ๐‘‡๐‘–๐‘— | ๐‘ง = ๐‘ข Pr[๐‘ง = ๐‘ข]
                            ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ],โ„“ โˆˆ[๐‘ก+1]                      ๐‘ขโˆˆ{0,1} ๐‘‘                  ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ],โ„“ โˆˆ[๐‘ก+1]
                                                                      1        ร•                      h                   ร™                                         i
                                                                                                                                                     (โ„“ )
                                                                  =                        Pr                                                    ๐‘‡๐‘–๐‘— | ๐‘ง = ๐‘ข
                                                                      2๐‘‘
                                                                             ๐‘ขโˆˆ{0,1} ๐‘‘                    ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ],โ„“ โˆˆ[๐‘ก+1]
                                                                      1        ร•                      h         ร™                                           i ๐‘ก+1
                                                                                                                                    (1)
                                                                  =                        Pr                                    ๐‘‡๐‘–๐‘— | ๐‘ง = ๐‘ข
                                                                      2๐‘‘
                                                                             ๐‘ขโˆˆ{0,1} ๐‘‘                    ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ]
                                                                      1         ร•                        h          ร™                                       i  ๐‘ก+1
                                                                                                                                       (1)
                                                                  โ‰ฅ                              Pr                                ๐‘‡๐‘–๐‘— | ๐‘ง = ๐‘ข
                                                                        2๐‘‘
                                                                              ๐‘ขโˆˆ{0,1} ๐‘‘                       ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ]
                                                                              ร™                            ๐‘ก+1
                                                                                                     (1)
                                                                  = Pr                           ๐‘‡๐‘–๐‘—                  ,
                                                                             ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ]


where the first equality holds by the law of total probability; the third equality holds because,
                                                                   (โ„“ )
conditioned on ๐‘ง taking a specific value, the events ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ] ๐‘‡๐‘–๐‘— for โ„“ โˆˆ [๐‘ก + 1] are independent
                                                    ร‘

and have the same probability; the inequality follows from the Hรถlderโ€™s inequality.
   We use a similar argument to obtain
                                                          h       ร™                   i                       hร™                         i๐ผ
                                                                                (1)                                               (1)
                                                   Pr                         ๐‘‡๐‘–๐‘—          โ‰ฅ Pr                              ๐‘‡1๐‘—                 ,
                                                              ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ]                                            ๐‘—โˆˆ[๐ฝ]


                                     T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                                                                            28
                  S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

                                                    (1)                 (1)
where we condition on the values of ๐‘ฆ1 , . . . , ๐‘ฆ ๐ฝ , and ๐‘ง. Similarly, by conditioning on the values
      (1)
of ๐‘ฅ 1 and ๐‘ง, we obtain
                                                    hร™                  i
                                                                            โ‰ฅ (Pr[๐‘‡11 ])๐ฝ .
                                                                  (1)                (1)
                                              Pr                ๐‘‡1๐‘—
                                                        ๐‘—โˆˆ[๐ฝ]

            (1)
Since Pr[๐‘‡11 ] = ๐œ‚, the claim follows.                                                                         
                                                                         ๐‘‘
                  ร‰ the case when ๐œ€ ๐‘“ is small. For ๐‘ข1 , ๐‘ข2 , ๐‘ข3 โˆˆ {0, 1} , let span(๐‘ข1 , ๐‘ข2 , ๐‘ข3 ) be
    Next, we consider
the set of points  ๐‘–โˆˆ๐‘‡ ๐‘ข ๐‘– for โˆ… โ‰  ๐‘‡ โІ [3] and
                                                         ร˜
                                                                                    (โ„“ )   (โ„“ )
                                        ๐‘†=                                  span(๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง).
                                              ๐‘–โˆˆ[๐ผ],๐‘—โˆˆ[๐ฝ],โ„“ โˆˆ[๐‘ก+1]


The set ๐‘† has (๐ผ + ๐ฝ)(๐‘ก + 1) + 1 singletons, at most ๐ผ(๐ฝ + 1)(๐‘ก + 1) double sums, and at most ๐ผ๐ฝ(๐‘ก + 1)
triple sums. Therefore, |๐‘†| โ‰ค 3๐ผ๐ฝ(๐‘ก + 1).
                                                             ๐œ€๐‘“
Claim 5.13. Suppose ๐œ€ ๐‘“ โ‰ค 2|๐‘†|
                           1
                               . Then ๐œ‚0 โ‰ฅ 2 .

Proof. Let ๐‘” be a closest quadratic function to ๐‘“ . Any two elements of ๐‘† are uniformly and
                                                    (โ„“ )  (โ„“ )
independently distributed in {0, 1} ๐‘‘ . Then, for ๐‘ฅ ๐‘– , ๐‘ฆ ๐‘— , ๐‘ง โˆผ {0, 1} ๐‘‘ , we have

                      ๐œ‚0 โ‰ฅ Pr[ ๐‘“ (๐‘ง) โ‰  ๐‘”(๐‘ง) and ๐‘“ (๐‘ข) = ๐‘”(๐‘ข) โˆ€ ๐‘ข โˆˆ ๐‘† \ {๐‘ง}]
                                                                ร•
                         โ‰ฅ Pr[ ๐‘“ (๐‘ง) โ‰  ๐‘”(๐‘ง)] โˆ’                              [ ๐‘“ (๐‘ง) โ‰  ๐‘”(๐‘ง) and ๐‘“ (๐‘ข) โ‰  ๐‘”(๐‘ข)]
                                                            ๐‘ขโˆˆ๐‘†\{๐‘ง}

                         โ‰ฅ ๐œ€ ๐‘“ โˆ’ (|๐‘†| โˆ’ 1)๐œ€2๐‘“ = ๐œ€ ๐‘“ (1 โˆ’ (|๐‘†| โˆ’ 1)๐œ€ ๐‘“ ).

If ๐œ€ ๐‘“ โ‰ค 2|๐‘†|
          1
              , then 1 โˆ’ (|๐‘†| โˆ’ 1)๐œ€ ๐‘“ โ‰ฅ 1 โˆ’ |๐‘†| ยท 2|๐‘†|
                                                   1
                                                       โ‰ฅ 12 , which concludes the proof.                       
               1
    Suppose 2|๐‘†|  โ‰ค ๐œ€ ๐‘“ โ‰ค 7ยท40
                           3
                               . In this case, by Claim 5.10 and Claim 5.11 and using the fact that
|๐‘†| โ‰ค 3๐ผ๐ฝ(๐‘ก + 1), we have
                              7         ๐ผ๐ฝ(๐‘ก+1)             7  ๐ผ๐ฝ(๐‘ก+1)              7
                       ๐œ‚0 โ‰ฅ        ๐œ€๐‘“               โ‰ฅ                      โ‰ฅ                         .
                               3                            6 ยท |๐‘†|          (18 ยท ๐ผ๐ฝ(๐‘ก + 1))๐ผ๐ฝ(๐‘ก+1)

Finally, if ๐œ€ ๐‘“ โ‰ฅ 40
                   1
                     , then again by Claim 5.10 and Claim 5.11, we have ๐œ‚0 โ‰ฅ 40(๐ผ๐ฝ(๐‘ก+1))
                                                                                 1
                                                                                         . We have
                           ๐œ€
obtained that ๐œ‚ โ‰ฅ min 2 , (18ยท๐ผ๐ฝ(๐‘ก+1))๐ผ๐ฝ(๐‘ก+1) .
                 0
                                             
                                   7
                                                                                                 

5.3     Proof of Lemma 5.4
In this section, we prove Lemma 5.4, which shows that conditioned on the good event ๐‘Š โˆฉ ๐’ข,
all queries in one round of Algorithm 3 are successfully obtained. In particular, this probability
only depends on the per-query erasure budget ๐‘ก.

                        T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                   29
                        I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

Proof of Lemma 5.4. We first prove a lower bound on the probability that the queries made in
Step 9 are successfully obtained.
Claim 5.14. Conditioned on the event ๐‘Š โˆฉ ๐’ข, the probability that in one execution of Step 9 at level
๐‘š โˆˆ [0, ๐‘ก], all queries in the step are successfully obtained is at least
                                                                  (๐‘ก+1)(2๐‘ก+1)   ๐‘กโˆ’๐‘š
                                                      1
                                                                                        .
                                         (๐‘ก 2 + ๐‘ก)(2๐‘ก + 1)๐‘กโˆ’๐‘š + 1
Proof. Fix the values of โ„“ , ๐‘š, ๐‘—1 , . . . , ๐‘—๐‘š for the given execution of Step 9 and let ๐’‹ = (โ„“ , ๐‘—1 , . . . , ๐‘—๐‘š ).
We can assume, without loss of generality, that Step 6 considers the tuples (๐‘—1 , . . . , ๐‘—๐‘š ) in the
lexicographic order. When ๐‘—๐‘š = 1, then right before Step 9 is executed, we have |๐‘† ๐’‹ (โˆ’1) | =
(๐‘ก + 1)(2๐‘ก + 1)๐‘กโˆ’๐‘š+1 . The size of the set ๐‘† ๐’‹ (โˆ’1) decreases as the value of ๐‘—๐‘š increases, so that for
๐‘—๐‘š = ๐‘ก + 1, we have

                        |๐‘† ๐’‹ (โˆ’1) | = (๐‘ก + 1)(2๐‘ก + 1)๐‘กโˆ’๐‘š+1 โˆ’ ๐‘ก(๐‘ก + 1)(2๐‘ก + 1)๐‘กโˆ’๐‘š
                               = (๐‘ก + 1)(2๐‘ก + 1)๐‘กโˆ’๐‘š (2๐‘ก + 1 โˆ’ ๐‘ก) = (๐‘ก + 1)2 (2๐‘ก + 1)๐‘กโˆ’๐‘š .

Thus, right before Step 9 is executed, the size of ๐‘† ๐’‹ (โˆ’1) is at least (๐‘ก + 1) times the size of the subset
๐‘†๐’‹ .
     Let ๐‘  denote the size of ๐‘† ๐’‹ (โˆ’1) right before the execution of Step 8. In Step 8 we sample a
uniformly random subset ๐‘† ๐’‹ of ๐‘† ๐’‹ (โˆ’1) of size ๐‘  0 = (๐‘ก + 1)(2๐‘ก + 1)๐‘กโˆ’๐‘š and in Step 9 we query ๐‘ฅ โŠ• ๐‘ฆ ๐’‹
for all ๐‘ฅ โˆˆ ๐‘† ๐’‹ . Conditioned on the event ๐‘Š โˆฉ ๐’ข, all sums ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ , where ๐‘ฅ โˆˆ ๐‘† ๐’‹ , are distinct and
nonerased right before ๐‘ฆ ๐’‹ is queried. On the ๐‘–-th query of Step 9, the tester selects a uniformly
random ๐‘ฅ out of ๐‘  โˆ’ (๐‘– โˆ’ 1) elements. Right before the ๐‘–-th query of the tester, the oracle can
have erased at most ๐‘ก๐‘– of the sums ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ , for ๐‘ฅ โˆˆ ๐‘† ๐’‹ (โˆ’1) , since the adversary is not aware of the
points belonging to ๐‘† ๐’‹ until their sums with ๐‘ฆ ๐’‹ are queried in Step 9. Therefore, the probability
                                                                                        ๐‘ก๐‘–
that the tester successfully obtains the sum on its ๐‘–-th query is at least 1 โˆ’ ๐‘ โˆ’๐‘–+1        , where ๐‘– โˆˆ [๐‘  0].
We argued that, for all values of ๐‘—๐‘š , right before the execution of Step 9, it always holds that
๐‘  โ‰ฅ (๐‘ก + 1)๐‘  0. Therefore, the probability that the tester successfully obtains a sum is always
positive. In particular, using the bound ๐‘  โ‰ฅ (๐‘ก + 1)๐‘  0, the probability that all queries in Step 9 are
successfully obtained is at least
            ๐‘ 0 
                          ๐‘ก๐‘–           ๐‘ก๐‘  0    ๐‘                           ๐‘     1 ๐‘ 
            ร–                                             0                              0         0
                                                               1
                   1โˆ’          โ‰ฅ 1โˆ’               โ‰ฅ                           =           .
                        ๐‘ โˆ’๐‘–+1       ๐‘  โˆ’ ๐‘ 0 + 1        (๐‘ก + 1)๐‘  0 โˆ’ ๐‘  0 + 1       ๐‘  0๐‘ก + 1
            ๐‘–=1

Substituting ๐‘  0 = (๐‘ก + 1)(2๐‘ก + 1)๐‘กโˆ’๐‘š concludes the proof.                                                        
    In Steps 4-11, the tester makes only singleton and double queries. Conditioned on ๐‘Š โˆฉ ๐’ข,
all singleton queries are successfully obtained. All double queries are made in Step 9. By
Claim 5.14, the probability that all double queries in Step 9 are successfully obtained depends
only on ๐‘ก.
    Before ๐‘ง is queried in Step 11, conditioned on the event ๐‘Š โˆฉ ๐’ข, all double and triple sums
of the form ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง, ๐‘ฅ โŠ• ๐‘ง, and ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง, where ๐‘š โˆˆ [0, ๐‘ก], ๐’‹ = (โ„“ , ๐‘—1 . . . , ๐‘—๐‘ก ) โˆˆ [๐‘ก + 1](๐‘ก+1) ,

                          T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                   30
                 S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

and ๐‘ฅ โˆˆ ๐‘† ๐’‹ , are distinct and nonerased. After ๐‘ง is queried, the oracle can perform at most ๐‘ก
erasures. Therefore, there exists โ„“ โˆˆ [๐‘ก + 1], say โ„“ = 1, such that all double and triple sums
๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง, ๐‘ฅ โŠ• ๐‘ง, and ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง, where ๐‘š โˆˆ [0, ๐‘ก], ๐’‹ = (1, ๐‘—1 . . . , ๐‘—๐‘ก ) โˆˆ [๐‘ก + 1](๐‘ก+1) , and ๐‘ฅ โˆˆ ๐‘† ๐’‹ , are
nonerased after ๐‘ง is queried. With probability ๐‘ก+1             1
                                                                   , the tester samples โ„“ = 1 in Step 12. By a
similar reasoning, with probability (๐‘ก+1)๐‘ก the tester samples values of ๐‘—1 , . . . , ๐‘—๐‘ก in Step 12, say
                                                   1

๐‘—1 = ยท ยท ยท = ๐‘—๐‘ก = 1, such that all queries ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง, where ๐‘š โˆˆ [0, ๐‘ก], are successfully obtained. In
addition, right before ๐‘ฆ ๐’‹ (๐‘ก) โŠ• ๐‘ง is queried, all sums of the form ๐‘ฅ โŠ• ๐‘ง and ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง, where
๐’‹ = (1, . . . , 1, ๐‘—๐‘ก ) โˆˆ [๐‘ก + 1](๐‘ก+1) , ๐‘š โˆˆ [0, ๐‘ก], and ๐‘ฅ โˆˆ ๐‘† ๐’‹ , are nonerased.
      After ๐‘ฆ ๐’‹ (๐‘ก) โŠ• ๐‘ง is queried, the oracle performs at most ๐‘ก erasures, so there exists ๐‘ฅ โˆˆ ๐‘† ๐’‹ such
that ๐‘ฅ โŠ• ๐‘ง and ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง, where ๐’‹ = (1, 1, . . . , 1) and ๐‘š โˆˆ [0, ๐‘ก], are nonerased. With probability
๐‘ก+1 , the tester samples this ๐‘ฅ in Step 13, and with probability ๐‘ก+1 , it samples ๐‘š โˆˆ [0, ๐‘ก] such that
 1                                                                            1

the triple sum ๐‘ฅ โŠ• ๐‘ฆ ๐’‹ (๐‘š) โŠ• ๐‘ง is successfully obtained in Step 14. Thus, with probability (๐‘ก+1)           1
                                                                                                             ๐‘ก+3 , all

queries in Steps 12-14 are successfully obtained. Therefore the probability that all queries in one
round of Algorithm 3 are successfully obtained, conditioned on ๐‘Š โˆฉ ๐’ข, is 1/๐‘ ๐‘ก , where ๐‘ ๐‘ก is a
constant depending only on ๐‘ก.                                                                                       


6      Online-erasure-resilient sortedness testing
In this section, we prove Theorem 1.5 on the impossibility of general online-erasure-resilient
sortedness testing and Theorem 1.6 on online-erasure-resilient sortedness testing of sequences
with few distinct values.

6.1     Impossibility of online-erasure-resilient sortedness testing
In this section, we prove Theorem 1.5 which shows that online-erasure-resilient testing of
sortedness of integer sequences is impossible.

Proof of Theorem 1.5. By Yaoโ€™s principle (see Corollary 9.4), it is enough to give a pair of distribu-
tions, one over monotone functions over [๐‘›] and the other one over functions over [๐‘›] that are
far from monotone, and an adversarial strategy, such that there is no deterministic algorithm
that can distinguish the distributions with high probability, when given access to them via a
1-online-erasure oracle that uses the given strategy.
Let ๐‘› โˆˆ โ„• be even. Consider the following distributions on functions ๐‘“ : [๐‘›] โ†’ [๐‘›].
๐’Ÿ + distribution: Independently for all ๐‘– โˆˆ [๐‘›/2]:

      โ€ข ๐‘“ (2๐‘– โˆ’ 1) โ† 2๐‘– โˆ’ 1 and ๐‘“ (2๐‘–) โ† 2๐‘– โˆ’ 1, with probability 1/3.

      โ€ข ๐‘“ (2๐‘– โˆ’ 1) โ† 2๐‘– โˆ’ 1 and ๐‘“ (2๐‘–) โ† 2๐‘–, with probability 1/3.

      โ€ข ๐‘“ (2๐‘– โˆ’ 1) โ† 2๐‘– and ๐‘“ (2๐‘–) โ† 2๐‘–, with probability 1/3.

๐’Ÿ โˆ’ distribution: Independently for all ๐‘– โˆˆ [๐‘›/2]:

                         T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                      31
                     I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

      โ€ข ๐‘“ (2๐‘– โˆ’ 1) โ† 2๐‘– and ๐‘“ (2๐‘–) โ† 2๐‘– โˆ’ 1, with probability 1/3.

      โ€ข ๐‘“ (2๐‘– โˆ’ 1) โ† 2๐‘– โˆ’ 1 and ๐‘“ (2๐‘–) โ† 2๐‘–, with probability 2/3.

    Every function sampled from the distribution ๐’Ÿ + is monotone.
    For a function sampled from the distribution ๐’Ÿ โˆ’ , the expected number of index pairs
(2๐‘– โˆ’ 1, 2๐‘–) such that the respective function values are 2๐‘– and 2๐‘– โˆ’ 1 is equal to ๐‘›/6. By a
Chernoff bound, the probability that the number of such index-pairs is less than ๐‘›/12 is at most
exp(โˆ’๐‘›/48). In other words, with probability at least 1 โˆ’ exp(โˆ’๐‘›/48), a function sampled from
the ๐’Ÿ โˆ’ distribution is 1/12-far from being monotone.
    Consider a deterministic adaptive algorithm ๐‘‡ with two-sided error for online-erasure-
           1
resilient 12 -testing of monotonicity of functions from [๐‘›] to [๐‘›]. Assume that ๐‘‡ is given access
to a function sampled from ๐’Ÿ + or ๐’Ÿ โˆ’ with equal probability, where the access is via a 1-online-
erasures oracle. The oracle uses the following strategy. For each ๐‘– โˆˆ [๐‘›/2], if ๐‘‡ queries the point
2๐‘– โˆ’ 1, then the oracle erases the function value at the point 2๐‘–; if ๐‘‡ queries the point 2๐‘– then the
oracle erases the function value at the point 2๐‘– โˆ’ 1. The oracle erases exactly one function value
between queries. Given this strategy, the tester ๐‘‡ never sees a violation to monotonicity.
    The distribution of function values restricted to any particular index is identical for distribu-
tions ๐’Ÿ + and ๐’Ÿ โˆ’ . Hence, the tester ๐‘‡ cannot distinguish the distributions, no matter how many
queries it makes.                                                                                   

6.2     Online-erasure-resilient testing of sortedness with small ๐‘Ÿ
                                                              โˆš
                                                                  ๐‘Ÿ
In this section, we prove Theorem 1.6 by showing that ๐‘‚( ๐œ€ ) uniform queries are sufficient for
๐‘ก-online-erasure-resilient ๐œ€-testing of sortedness, when ๐‘Ÿ, the number of distinct values in the
sequence, is small. Pallavoor et al. [53] gave a 1-sided error ๐œ€-tester
                                                                     โˆš
                                                                        for sortedness of real-valued
                                                                      ๐‘Ÿ
sequences containing at most ๐‘Ÿ distinct values that makes ๐‘‚( ๐œ€ ) uniform and independent
queries. The proof of [53, Theorem 1.5] is the starting point for our analysis.

Proof of Theorem 1.6. We call (๐‘ข, ๐‘ฃ) โˆˆ [๐‘›]2 a violating pair if ๐‘ข < ๐‘ฃ and ๐‘“ (๐‘ข) > ๐‘“ (๐‘ฃ). The tester,
given
  โˆš
       input ๐œ€ โˆˆ (0, 1) and oracle access to a function ๐‘“ with image size at most ๐‘Ÿ, queries ๐‘“ on
2๐‘ ๐‘Ÿ
  ๐œ€ points selected uniformly and independently and rejects if and only if it queries ๐‘ข, ๐‘ฃ โˆˆ [๐‘›]
such that (๐‘ข, ๐‘ฃ) is a violating pair. Since the decision made by the tester does not depend on the
specific values being queried, but only on the ordering of the queried values, we can assume
without loss of generality that the input function is of the form ๐‘“ : [๐‘›] โ†’ [๐‘Ÿ]. Clearly, the tester
accepts all sorted functions. We show that for ๐‘ = 32, if ๐‘“ is ๐œ€-far from sorted, the tester rejects
with probability at least 23 .
   Suppose ๐‘“ is ๐œ€-far from sorted. Define the violation graph ๐บ([๐‘›], ๐ธ) to be the graph whose
edges are the violating pairs (๐‘ข, ๐‘ฃ) โˆˆ [๐‘›]2 . Dodis et al. [28, Lemma 7] show that ๐บ has a matching
๐‘€ of size at least ๐œ€๐‘›/2. For each range value ๐‘– โˆˆ [๐‘Ÿ], let ๐‘€ ๐‘– be the set of edges (๐‘ข, ๐‘ฃ) โˆˆ ๐‘€ whose
lower endpoint ๐‘ข has value ๐‘–, i.e., ๐‘“ (๐‘ข) = ๐‘–. Let ๐ฟ ๐‘– consist of the |๐‘€ ๐‘– |/2 smallest indices amongst
the lower endpoints of the edges in ๐‘€ ๐‘– . Let ๐‘ˆ ๐‘– consist of the |๐‘€ ๐‘– |/2 largest indices amongst

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                         32
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

the upper endpoints of the edges in ๐‘€ ๐‘– . It is not hard to see that, for every ๐‘– โˆˆ [๐‘Ÿ], all pairs in
๐ฟ ๐‘– ร— ๐‘ˆ ๐‘– are violating. By construction,
                              ร•                  ร•                  ร•                    |๐‘€|   ๐œ€๐‘›
                                      |๐ฟ ๐‘– | =           |๐‘ˆ ๐‘– | =           |๐‘€ ๐‘– |/2 =       โ‰ฅ    .                   (6.1)
                                                                                          2     4
                              ๐‘–โˆˆ[๐‘Ÿ]              ๐‘–โˆˆ[๐‘Ÿ]              ๐‘–โˆˆ[๐‘Ÿ]

We show that with probability at least 23 , for some ๐‘– โˆˆ [๐‘Ÿ], the tester samples a nonerased element
both from ๐ฟ ๐‘– and from ๐‘ˆ ๐‘– , in which case it rejects.
   Our proof relies on the following claim from [36], for which we first introduce some notation.
Let ๐ฟ1 , . . . , ๐ฟ๐‘Ÿ be disjoint subsets of [๐‘›]. Let ๐‘ ๐‘– = |๐ฟ๐‘›๐‘– | and ๐œŒ = ๐‘–โˆˆ[๐‘Ÿ] ๐‘ ๐‘– . Suppose we sample
                                                                        ร
 โˆš
๐‘ ๐‘Ÿ/๐œŒ uniform points from [๐‘›]. Let ๐ผ be a random variable denoting the set of indices ๐‘– โˆˆ [๐‘Ÿ]
such that the sample contains at least one element from the set ๐ฟ ๐‘– .
Claim 6.1 (Claim 1 of [36]). With probability 1 โˆ’ eโˆ’๐‘ over the choice of the sample,
                                          ร•          ๐œŒ
                                               ๐‘๐‘– โ‰ฅ โˆš .
                                           ๐‘–โˆˆ๐ผ
                                                      ๐‘Ÿ
                                                    โˆš
                                                   ๐‘ ๐‘Ÿ
                                                    ๐œ€ each. Let ๐ฟ ๐‘– โІ ๐ฟ ๐‘– be the set of nonerased indices
                                                                   0
    Split the sample into two parts of size
                                                                                                              |๐ฟ0 |
of ๐ฟ ๐‘– after the tester queries the first part of the sample, and define ๐‘ˆ ๐‘–0 similarly. Let ๐‘ 0๐‘– = ๐‘›๐‘– ,
       |๐‘ˆ 0 |
๐‘ž 0๐‘– = ๐‘›๐‘– , and ๐œŒ0 = ๐‘–โˆˆ[๐‘Ÿ] min(๐‘ 0๐‘– , ๐‘ž 0๐‘– ). Without loss of generality assume ๐‘ 0๐‘– โ‰ค ๐‘ž 0๐‘– for all ๐‘– โˆˆ [๐‘Ÿ]. The
                     ร
                                 โˆš
                                ๐‘ ๐‘Ÿ๐‘ก
adversary performs at most ๐œ€ erasures after the first part of the sample is queried, therefore
                             ร• |๐ฟ0 |  ร• |๐ฟ |  ๐‘ โˆš๐‘Ÿ๐‘ก                ๐œ€ ๐‘ ๐‘Ÿ๐‘ก
                                                                           โˆš
                                                                                  ๐œ€
                          0           ๐‘–               ๐‘–
                          ๐œŒ =                    โ‰ฅ                     โˆ’           โ‰ฅ         โˆ’        โ‰ฅ       ,
                                         ๐‘›                      ๐‘›            ๐œ€๐‘›          4       ๐œ€๐‘›       8
                                ๐‘–โˆˆ[๐‘Ÿ]                 ๐‘–โˆˆ[๐‘Ÿ]
                                                 โˆš            ๐œ€2 ๐‘›
where we use (6.1) and the assumption that ๐‘Ÿ โ‰ค ๐‘Ÿ โ‰ค 8๐‘           2 ๐‘ก . Let ๐ผ be a random variable denoting
                                                                           0

the set of indices ๐‘– โˆˆ [๐‘Ÿ] such that at least one element of ๐ฟ0๐‘– is contained in the first part of the
                                                     ๐‘
sample. By Claim 6.1, with probability 1 โˆ’ eโˆ’ 8 over the first part of the sample,
                                            ร•             ๐œ€
                                                  ๐‘ 0๐‘– โ‰ฅ โˆš .                                         (6.2)
                                            ๐‘–โˆˆ๐ผ 0       8   ๐‘Ÿ
The probability that the second part of the sample does not include a nonerased element from
โˆช๐‘–โˆˆ[๐‘Ÿ]๐‘ˆ ๐‘–0 is
                                         โˆš  ๐‘ โˆš๐‘Ÿ                 โˆš
                                                                ๐‘๐œ€๐‘Ÿ
                         ร•            ๐‘  ๐‘Ÿ๐‘ก   ๐œ€
                                                      ๐œ€    ๐œ€              ๐‘
                       1โˆ’       ๐‘ž 0๐‘– +            โ‰ค 1โˆ’ โˆš + โˆš         โ‰ค eโˆ’ 16 ,
                                         ๐œ€๐‘›           8 ๐‘Ÿ 16 ๐‘Ÿ
                          ๐‘–โˆˆ[๐‘Ÿ]

where we use (6.2) to lower bound ๐‘–โˆˆ[๐‘Ÿ] ๐‘ž 0๐‘– , and the assumption that ๐‘Ÿ < ๐œ€๐‘๐‘ก๐‘› to upper bound
                                                  ร                                                               2


the number of erasures. Therefore, the probability that for some ๐‘– โˆˆ [๐‘Ÿ] the tester samples a
nonerased element both from ๐ฟ ๐‘– and ๐‘ˆ ๐‘– and rejects is at least
                                                            ๐‘                  ๐‘       2
                                                 (1 โˆ’ eโˆ’ 8 ) ยท (1 โˆ’ eโˆ’ 16 ) โ‰ฅ            ,
                                                                                       3
where the inequality holds for ๐‘ = 32.                                                                                   

                         T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                           33
                    I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

7    Impossibility of online-erasure-resilient Lipschitz testing
In this section, we prove Theorem 1.7. We start by showing that 1-online-erasure-resilient
Lipschitz testing of functions ๐‘“ : [๐‘›] โ†’ {0, 1, 2} is impossible.

Proof of Theorem 1.7, part 1. We prove the theorem using Yaoโ€™s principle. The proof is analogous
to that of Theorem 1.5 once the hard distributions are described. In particular, the strategy of
the oracle is identical to that used in the proof of Theorem 1.5.
    Let ๐‘› โˆˆ โ„• be a multiple of 4. The following distributions are over functions ๐‘“ : [๐‘›] โ†’ {0, 1, 2}.

Distribution ๐’Ÿ + : Independently, for all ๐‘– โˆˆ [๐‘›] such that ๐‘– mod 4 โ‰ก 1:

    โ€ข ๐‘“ (๐‘–) โ† 0 and ๐‘“ (๐‘– + 1) โ† 1, with probability 1/2.

    โ€ข ๐‘“ (๐‘–) โ† 1 and ๐‘“ (๐‘– + 1) โ† 2, with probability 1/2.

Independently, for all ๐‘– โˆˆ [๐‘›] such that ๐‘– mod 4 โ‰ก 3:

    โ€ข ๐‘“ (๐‘–) โ† 1 and ๐‘“ (๐‘– + 1) โ† 0, with probability 1/2.

    โ€ข ๐‘“ (๐‘–) โ† 2 and ๐‘“ (๐‘– + 1) โ† 1, with probability 1/2.

Distribution ๐’Ÿ โˆ’ : Independently, for all ๐‘– such that ๐‘– mod 4 โ‰ก 1:

    โ€ข ๐‘“ (๐‘–) โ† 0 and ๐‘“ (๐‘– + 1) โ† 2, with probability 1/2.

    โ€ข ๐‘“ (๐‘–) โ† 1 and ๐‘“ (๐‘– + 1) โ† 1, with probability 1/2.

Independently, for all ๐‘– such that ๐‘– mod 4 โ‰ก 3:

    โ€ข ๐‘“ (๐‘–) โ† 2 and ๐‘“ (๐‘– + 1) โ† 0, with probability 1/2.

    โ€ข ๐‘“ (๐‘–) โ† 1 and ๐‘“ (๐‘– + 1) โ† 1, with probability 1/2.

   Every function sampled from the distribution ๐’Ÿ + is Lipschitz. For a function sampled from
the distribution ๐’Ÿ โˆ’ , the expected distance to being Lipschitz is 1/4. The rest of the proof is
similar to that of Theorem 1.5.                                                               

   Next, we prove the second part of Theorem 1.7 showing that 1-online-erasure-resilient
Lipschitz testing of functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1, 2} is impossible.

Proof of Theorem 1.7, part 2. The proof is analogous to the proof of the first part of the theorem
once the hard distributions are described.
    The following distributions are over functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1, 2}. Let ๐‘’1 โˆˆ {0, 1} ๐‘‘ denote
the first standard basis vector.

                      T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                        34
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

      Distribution ๐’Ÿ + : Independently, for all ๐‘ฅ โˆˆ {0, 1} ๐‘‘ such that ๐‘ฅ 1 = 0:

      โ€ข ๐‘“ (๐‘ฅ) โ† 0 and ๐‘“ (๐‘ฅ โŠ• ๐‘’1 ) โ† 1, with probability 1/2.

      โ€ข ๐‘“ (๐‘ฅ) โ† 1 and ๐‘“ (๐‘ฅ โŠ• ๐‘’1 ) โ† 2, with probability 1/2.


      Distribution ๐’Ÿ โˆ’ : Independently, for all ๐‘ฅ โˆˆ {0, 1} ๐‘‘ such that ๐‘ฅ 1 = 0:

      โ€ข ๐‘“ (๐‘ฅ) โ† 0 and ๐‘“ (๐‘ฅ โŠ• ๐‘’1 ) โ† 2, with probability 1/2.

      โ€ข ๐‘“ (๐‘ฅ) โ† 1 and ๐‘“ (๐‘ฅ โŠ• ๐‘’1 ) โ† 1, with probability 1/2.

Every function sampled from the distribution ๐’Ÿ + is Lipschitz. For a function sampled from the
distribution ๐’Ÿ โˆ’ , the expected distance to being Lipschitz is 1/4. The rest of the proof is similar
to that of Theorem 1.5. This completes the proof of Theorem 1.7.                                  


8      Computation in the presence of online corruptions
This section discusses implications of our results to computation in the presence of online
corruptions.


8.1     Online-corruption-resilience from online-erasure-resilience in testing
In this section, we prove Lemma 1.8, showing that an algorithm that accesses its input via an
online-erasure oracle and, with high probability, encounters no erasures and outputs a correct
answer, is also correct with high probability for all adversarial strategies (and for the same
computational task) when it accesses its input via an online-corruption oracle.


Proof of Lemma 1.8. Fix an input function ๐‘“ and a strategy of the ๐‘ก-online-corruption oracle for
this function. Let ๐’ช (๐‘) denote an oracle that uses this strategy. Map the strategy of ๐’ช (๐‘) to a
strategy for a ๐‘ก-online-erasure oracle ๐’ช (๐‘’) , so that whenever ๐’ช (๐‘) modifies the value at a point
๐‘ฅ to ๐’ช (๐‘) (๐‘ฅ) โ‰  ๐‘“ (๐‘ฅ), the online-erasure oracle erases the value at the same point, i.e., it sets
๐’ช (๐‘’) (๐‘ฅ) =โŠฅ.
     Fix the random coins of an execution of ๐‘‡, where access to ๐‘“ is via ๐’ช (๐‘’) , and for which all
queries are successfully obtained and ๐‘‡ outputs a correct answer. Let ๐‘‡ (๐‘’) be the execution of ๐‘‡
with those coins. Similarly, let ๐‘‡ (๐‘) be the execution of ๐‘‡ with the same coins, when access to ๐‘“
is via ๐’ช (๐‘) . Since ๐‘‡ (๐‘’) encounters no erasures, ๐‘‡ (๐‘) will make the same queries as ๐‘‡ (๐‘’) and get
the same query answers. Consequently, ๐‘‡ (๐‘) will also output the same (correct) answer as ๐‘‡ (๐‘’) .
Therefore, when ๐‘‡ accesses ๐‘“ via an online-corruption oracle, it outputs a correct answer with
probability at least 2/3.                                                                         

                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                      35
                      I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

8.2   Online-corruption-resilient linearity tester
In this section, we show the existence of a 2-sided error, online-corruption-resilient tester for
linearity.
Corollary 8.1. There exists ๐‘ 0 โˆˆ (0, 1) and a nonadaptive, ๐‘ก-online-corruption-resilient ๐œ€-tester for
linearity of functions ๐‘“ : {0, 1} ๐‘‘ โ†’ {0, 1} that works for ๐‘ก โ‰ค ๐‘0 ยท ๐œ€5/4 ยท 2๐‘‘/4 and makes ๐‘‚( 1๐œ€ log ๐œ€๐‘ก )
queries.
Proof. Consider Algorithm 1, modified to use ๐‘ž = 2 log ๐ถ๐‘ก    ๐œ€2
                                                                for ๐ถ = 3000. Note that the larger the
size ๐‘ž of the reserve, the higher is the probability that Algorithm 1 detects a violation to linearity.
For the choice of ๐‘ž = 2 log 3000๐‘ก
                              ๐œ€2
                                  , Algorithm 1 is also a 1-sided error online-erasure-resilient tester.
Furthermore, for this choice of ๐‘ž, Algorithm 1 rejects with probability at least 5/6 (as opposed
to 2/3) when ๐‘“ is ๐œ€-far from linear.
    By Lemma 1.8, it remains to show that, for all adversarial strategies, Algorithm 1 queries an
erased point during its execution with probability at most 1/6. Fix an adversarial strategy and
one round of Algorithm 1. (Recall that each iteration of the outer repeat loop in Steps 3-9 is
                                                                                                     ๐œ€
called a round). Let ๐บ be the event defined in Lemma 2.8 for the fixed round. Then Pr[๐บ] โ‰ค 800         .
    Let ๐ต denote the event that the algorithm queries an erased point during the fixed round.
Then
                   Pr[๐ต] = Pr[๐ต | ๐บ] Pr[๐บ] + Pr[๐ต | ๐บ] Pr[๐บ] โ‰ค Pr[๐ต | ๐บ] + Pr[๐บ].
To upper bound Pr[๐ต | ๐บ] it suffices to upper bound the probability that the algorithm queries
an erased sum in some iteration of Step 8 of the fixed round. Since ๐บ occurred, there are at least
2๐‘žโˆ’1 โˆ’ 1 distinct sums that can be queried in Step 8, all of them nonerased at the beginning of the
round. Algorithm 1 makes at most ๐‘ž + 4 ยท 2 ๐‘— โ‰ค ๐‘ž + 32 ๐œ€ queries in this round. Thus, the fraction of
these sums erased during the round is at most
                  ๐‘ž + 32
                       ๐œ€
                                   1          70     ๐œ€2   70๐œ€3       
                                                                      2 1    8.75      ๐œ€2
            ๐‘กยท              โ‰ค๐‘กยท           +          โ‰ค    +       โ‰ค ๐œ€      +        โ‰ค         ,
                 2๐‘žโˆ’1 โˆ’ 1          2๐‘ž/2       ๐œ€ ยท 2๐‘ž   ๐ถ 4๐‘ก ยท ๐ถ 2        ๐ถ    ๐ถ2      88 ยท 32
                                                      ๐‘ž
where in the first inequality we used that 2๐‘žโˆ’1 โˆ’1 โ‰ค 2๐‘ž/2
                                                      1
                                                          for ๐‘ž โ‰ฅ 9 and that (2๐‘žโˆ’1 โˆ’ 1)/32 โ‰ฅ 2๐‘ž /70 for
๐‘ž โ‰ฅ 5 (note that ๐‘ž โ‰ฅ 2 log(3000๐‘ก/๐œ€ ) โ‰ฅ 25), in the second inequality we used ๐‘ž โ‰ฅ 2 log(3000๐‘ก/๐œ€2 ),
                                    2

and in the third inequality we used ๐œ€ โ‰ค 12 .
   Since there are at most 4 ยท 2 ๐‘— โ‰ค 32
                                      ๐œ€ iterations of Step 8, we obtain by a union bound that

                                            32    ๐œ€2     ๐œ€
                                          Pr[๐ต | ๐บ] โ‰ค
                                               ยท       =   .
                                             ๐œ€ 88 ยท 32 88
                       ๐œ€    ๐œ€     ๐œ€
Consequently, Pr[๐ต] โ‰ค 88 + 800 โ‰ค 80 . The number of rounds of Algorithm 1 is at most
                                    log 8/๐œ€                  log 8๐œ€
                                      ร•       8 ln 5 8 ln 5 ร• 1       8 ln 5
                                                    =               โ‰ค        .
                                               2๐œ€๐‘—      ๐œ€       2 ๐‘—      ๐œ€
                                     ๐‘—=1                    ๐‘—=1

Therefore, Algorithm 1 queries an erased point during its execution with probability at most
   ๐œ€ ยท Pr[๐ต] โ‰ค 6 . This concludes the proof.                                              
8 ln 5         1



                           T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                       36
                 S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

8.3    Online-corruption-resilient tester of sortedness with few distinct values
In this section, we show the existence of nonadaptive online-corruption-resilient tester for
sortedness of sequences with few distinct values.
Corollary 8.2. There exists a nonadaptive, ๐‘ก-online-corruption-resilient
                                                                      โˆš
                                                                         ๐œ€-tester for sortedness of ๐‘›-
                                                                                    ๐‘Ÿ
element sequences with at most ๐‘Ÿ distinct values. The tester makes ๐‘‚( ๐œ€ ) uniform and independent
queries and works when ๐‘Ÿ < ๐œ€๐‘0๐‘›๐‘ก , where ๐‘ 0 > 0 is a specific constant.
                             2


                                                                                       โˆš
                                                                                     2๐‘ ๐‘Ÿ
Proof. Recall that the online-erasure-resilient sortedness tester makes ๐œ€ uniform and indepen-
dent queries to ๐‘“ : [๐‘›] โ†’ [๐‘Ÿ]. The tester always accepts when ๐‘“ is sorted. We can easily modify
the tester, without affecting its asymptotic query complexity, to reject with probability at least
5/6 (as opposed to 2/3) when ๐‘“ is ๐œ€-far from sorted. Then, by Lemma 1.8, it suffices to show
that, for all adversarial strategies, this โˆštester queries an erased point with probability at most
                                              2๐‘ ๐‘Ÿ๐‘ก
1/6. The adversary performs at most ๐œ€ erasures during the execution of the algorithm. Since
the tester performs
             โˆš
                    its queries uniformly at random, the probability that a given query is erased
             2๐‘ ๐‘Ÿ๐‘ก
is at most ๐œ€๐‘› . By a union bound, the probability that some query of the tester is erased is at
                                                              ๐œ€2 ๐‘›
most 4๐‘๐œ€2 ๐‘›๐‘Ÿ๐‘ก . Set ๐‘ 0 = 24๐‘ 2 . By our assumption that ๐‘Ÿ < 24๐‘
        2
                                                                 2 ๐‘ก , we obtain that the probability that

the tester samples an erased point is at most 6 .   1
                                                                                                        

8.4    Finding witnesses in the presence of online corruptions
In this section, we prove Lemma 1.9. Specifically, we show how to modify a nonadaptive, 1-sided
error, online-erasure-resilient tester for a property ๐’ซ to get an algorithm that accesses the input
via an online-corruption oracle and outputs a witness demonstrating the violation of ๐’ซ.

Proof of Lemma 1.9. Let ๐‘‡ be a nonadaptive, 1-sided error, ๐‘ก-online-erasure-resilient tester for
๐’ซ. Let ๐‘“ be ๐œ€-far from ๐’ซ. Fix a strategy of the ๐‘ก-online-corruption oracle, and let ๐’ช (๐‘) denote
the oracle running this strategy. Define a a ๐‘ก-online-erasure oracle ๐’ช (๐‘’) that follows the same
strategy as ๐’ช (๐‘’) , except that ๐’ช (๐‘’) erases the value at each point ๐‘ฅ that ๐’ช (๐‘) modifies, i.e., it sets
๐’ช (๐‘’) (๐‘ฅ) =โŠฅ.
     If the tester ๐‘‡ accesses ๐‘“ via ๐’ช (๐‘’) , it rejects with probability at least 2/3. Fix the random coins
of an execution of ๐‘‡ for which it rejects. Let ๐‘‡ (๐‘’) be the execution of ๐‘‡ with those coins (where
access to ๐‘“ is via ๐’ช (๐‘’) ). Similarly, let ๐‘‡ (๐‘) be the execution of ๐‘‡ with the same coins when access
to ๐‘“ is via ๐’ช (๐‘) . Since ๐‘‡ is nonadaptive, ๐‘‡ (๐‘) and ๐‘‡ (๐‘’) make the same queries. By definition of ๐’ช (๐‘’) ,
if ๐‘‡ (๐‘’) obtains ๐‘‚ (๐‘’) (๐‘ฅ) = ๐‘“ (๐‘ฅ) for a query ๐‘ฅ, then ๐‘‡ (๐‘) obtains ๐‘‚ (๐‘) (๐‘ฅ) = ๐‘“ (๐‘ฅ) for the same query.
     Since ๐‘‡ (๐‘’) is a 1-sided error tester, it can reject only if it successfully obtains values of ๐‘“ on
some queried points ๐‘ฅ 1 , . . . , ๐‘ฅ ๐‘˜ such that no ๐‘” โˆˆ ๐’ซ has ๐‘”(๐‘ฅ ๐‘– ) = ๐‘“ (๐‘ฅ ๐‘– ) for all ๐‘– โˆˆ [๐‘˜]. Then, for the
same queries, ๐‘‡ (๐‘) obtains ๐’ช (๐‘) (๐‘ฅ 1 ) = ๐‘“ (๐‘ฅ 1 ), . . . , ๐’ช (๐‘) (๐‘ฅ ๐‘˜ ) = ๐‘“ (๐‘ฅ ๐‘˜ ). Therefore, ๐‘‡ (๐‘) finds a witness
of ๐‘“ โˆ‰ ๐’ซ. We modify ๐‘‡ to output a witness if it finds one. (Note that ๐‘‡ (๐‘) and ๐‘‡ (๐‘’) might output
different sets of points violating ๐’ซ, since ๐‘‡ (๐‘) will obtain additional values ๐’ช (๐‘) (๐‘ฅ) โˆˆ โ„ for the
queries ๐‘ฅ for which ๐‘‡ (๐‘’) obtained ๐’ช (๐‘’) (๐‘ฅ) =โŠฅ.) Now, if we run the modified ๐‘‡ with access to ๐‘“
via ๐’ช (๐‘) , it outputs a witness of ๐‘“ โˆ‰ ๐’ซ with probability at least 2/3.                                            

                         T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                      37
                       I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

9    Yaoโ€™s minimax principle for online erasure oracles
We extend Yaoโ€™s minimax principle [72] to the setting of online erasures, so that it can be used
to prove lower bounds on the query complexity of randomized online-erasure-resilient testers.
In the standard property testing model, Yaoโ€™s principle allows one to prove a lower bound on
query complexity by describing a distribution on inputs that is hard to test, in the sense that a
deterministic algorithm needs many queries to decide, with high probability over the input,
whether an input sampled from the distribution has the property or is far from it. In the setting
of online erasures, we show that one can prove a lower bound by describing a distribution on
inputs as well as an oracle erasure strategy such that every deterministic algorithm that accesses
the input selected from the distribution via the erasure oracle needs many queries to test a
specified property with high probability.

Theorem 9.1. To prove a lower bound ๐‘ž on the worst-case query complexity of online-erasure-resilient
randomized algorithms that perform a specified computational task with error probability strictly less
than 13 , it is enough to give a distribution ๐’Ÿ on inputs of size ๐‘› and a (randomized) oracle erasure strategy
๐’ฎ, such that every deterministic algorithm making at most ๐‘ž queries to an input drawn from ๐’Ÿ via an
online-erasure oracle that uses strategy ๐’ฎ, errs with probability at least 13 .

Proof. We prove a min-max inequality similar to Yaoโ€™s original min-max inequality [72]. The
inequality relates the error complexities of the algorithms, rather than their query complexity,
which we will fix beforehand. Consider a randomized algorithm for the specified task that,
given access to an input object of size ๐‘› via a ๐‘ก-online-erasure oracle, makes at most ๐‘ž queries,
and may be incorrect with some probability. We can represent the randomized algorithm as a
probability distribution ๐œ on the set of all (possibly incorrect) deterministic algorithms ๐ด with
query complexity at most ๐‘ž. Let ๐’œ ๐‘ž denote the set of such algorithms, and let ๐œ(๐ด) denote the
probability of drawing algorithm ๐ด from the set ๐’œ ๐‘ž .
     Denote by ๐‘‹๐‘› the set of inputs of size ๐‘› for the computational task. Let ๐’ฎ๐‘ž,๐‘› be the set
of deterministic erasure strategies of the ๐‘ก-online-erasure oracle for inputs of size ๐‘› against
algorithms of query complexity at most ๐‘ž. An adversarial strategy can be represented by a
decision tree that, based on the input and the queries of the algorithm, indicates which input
entries to erase next. Since we are only considering inputs of fixed size and algorithms of
bounded query complexity, the set of oracle strategies has finite cardinality. Oracle strategies can
be randomized, so we consider a distribution on deterministic strategies. For ease of notation,
we consider a joint distribution on inputs and oracle strategies, i.e., we let ๐œŽ be a distribution
on the input-strategy pairs ๐‘‹๐‘› ร— ๐’ฎ๐‘ž,๐‘› . Given an input ๐‘ฅ โˆˆ ๐‘‹๐‘› , an adversarial strategy ๐‘  โˆˆ ๐’ฎ๐‘ž,๐‘› ,
and an algorithm ๐ด โˆˆ ๐’œ ๐‘ž , let ๐ผ(๐ด, ๐‘ฅ, ๐‘ ) be the indicator function for ๐ด being incorrect on ๐‘ฅ,
i.e., ๐ผ(๐ด, ๐‘ฅ, ๐‘ ) = 1 if ๐ด is incorrect on ๐‘ฅ against an oracle that uses strategy ๐‘ , and ๐ผ(๐ด, ๐‘ฅ, ๐‘ ) = 0
otherwise.
     We prove the following min-max inequality
                                   ร•                                         ร•
            min       max                  ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œ(๐ด) โ‰ฅ max min                      ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œŽ(๐‘ฅ, ๐‘ ).   (9.1)
              ๐œ   (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›                            ๐œŽ   ๐ดโˆˆ๐’œ ๐‘ž
                                   ๐ดโˆˆ๐’œ ๐‘ž                                (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›


                         T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                   38
                S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

    We comment on how (9.1) implies Theorem 9.1. Suppose there exists some distribution ๐œŽ
on input-strategy pairs, such that every ๐‘ž-query deterministic algorithm errs with probability
at least 1/3 on an input-strategy pair drawn from ๐œŽ. This implies that the right-hand side
of (9.1) is at least 13 . (Note that we can express ๐œŽ as a distribution ๐’Ÿ on the inputs and a
randomized adversarial strategy ๐’ฎ). By (9.1), every ๐‘ž-query randomized algorithm errs with
probability at least 13 for every input and adversarial strategy. Therefore, an algorithm for the
given computational task that errs with probability strictly less than 13 has to make at least ๐‘ž
queries, which implies Theorem 9.1.
    We now prove (9.1). Fix distribution ๐œ on algorithms and distribution ๐œŽ on input-strategy
pairs. Then
                       ร•                                  ร•                                         ร•
          max                  ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œ(๐ด) =                        ๐œŽ(๐‘ฅ, ๐‘ )           max                  ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œ(๐ด)
      (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›                                                                 (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›
                       ๐ดโˆˆ๐’œ ๐‘ž                          (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›                                  ๐ดโˆˆ๐’œ ๐‘ž
                                                         ร•                       ร•
                                              โ‰ฅ                    ๐œŽ(๐‘ฅ, ๐‘ )              ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œ(๐ด)
                                                  (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›               ๐ดโˆˆ๐’œ ๐‘ž
                                                  ร•                     ร•
                                              =            ๐œ(๐ด)                       ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œŽ(๐‘ฅ, ๐‘ )                        (9.2)
                                                  ๐ดโˆˆ๐’œ ๐‘ž           (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›
                                                  ร•                              ร•
                                              โ‰ฅ            ๐œ(๐ด) min                         ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œŽ(๐‘ฅ, ๐‘ )
                                                                  ๐ดโˆˆ๐’œ ๐‘ž
                                                  ๐ดโˆˆ๐’œ ๐‘ž                    (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›
                                                                ร•
                                              = min                         ๐ผ(๐ด, ๐‘ฅ, ๐‘ )๐œŽ(๐‘ฅ, ๐‘ ).
                                                  ๐ดโˆˆ๐’œ ๐‘ž
                                                           (๐‘ฅ,๐‘ )โˆˆ๐‘‹๐‘› ร—๐’ฎ๐‘ž,๐‘›

Crucially, the fact that ๐’œ ๐‘ž , ๐‘‹๐‘› , and ๐’ฎ๐‘ž,๐‘› have finite cardinalities allows us to exchange the order
of the sums in (9.2).                                                                               

9.1   A version of Yaoโ€™s minimax with two distributions
In this section, we prove a corollary to Theorem 9.1 which refers to the more common usage of
Yaoโ€™s minimax principle for proving lower bounds, where separate distributions on positive
and negative instances are defined. The corollary is a generalization of Claim 5 in [60].
Definition 9.2. The statistical distance between two discrete distributions ๐’Ÿ1 and ๐’Ÿ2 is
                                                                                                                 
                ๐ถ๐ท(๐’Ÿ1 , ๐’Ÿ2 ) =                 max                          Pr [๐‘ฅ โˆˆ ๐‘†] โˆ’ Pr [๐‘ฅ โˆˆ ๐‘†] .
                                     ๐‘†โІsupport(๐’Ÿ1 )โˆชsupport(๐’Ÿ2 )           ๐‘ฅโˆผ๐’Ÿ1                 ๐‘ฅโˆผ๐’Ÿ2

Definition 9.3. Given a ๐‘ž-query deterministic algorithm ๐’œ, let ๐‘Ž(๐‘ฅ) be the string of ๐‘ž answers
that ๐’œ receives when making queries to input object ๐‘ฅ. For a distribution ๐’Ÿ and adversarial
strategy ๐’ฎ, let ๐’Ÿ-view be the distribution on strings ๐‘Ž(๐‘ฅ) where the input object ๐‘ฅ is sampled
from ๐’Ÿ and accessed via a ๐‘ก-online-erasure oracle using strategy ๐’ฎ.
Corollary 9.4. To prove a lower bound ๐‘ž on the worst-case query complexity of online-erasure-resilient
randomized algorithms for a promise decision problem, it is enough to give

                          T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                                                   39
                     I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

   โ€ข a randomized adversarial strategy ๐’ฎ,

   โ€ข a distribution ๐’Ÿ + on positive instances of size ๐‘›, and

   โ€ข a distribution ๐’Ÿ โˆ’ on instances of size ๐‘› that are negative with probability at least 67 ,

such that ๐ถ๐ท(๐’Ÿ + -view, ๐’Ÿ โˆ’ -view) < 16 for every deterministic ๐‘ž-query algorithm that accesses its input
via an online-erasure oracle using strategy ๐’ฎ.

   Our proof of Corollary 9.4 is similar to an argument in [60]. We rely on the following claim
from [60].

Claim 9.5 (Claim 4 of [60]). Let ๐ธ be an event that happens with probability at least 1 โˆ’ ๐›ฟ under
the distribution ๐’Ÿ and let โ„ฌ be the distribution ๐’Ÿ conditioned on ๐ธ. Then ๐ถ๐ท(๐’Ÿ, โ„ฌ) โ‰ค ๐›ฟ0, where
๐›ฟ0 = 1โˆ’๐›ฟ
       1
          โˆ’ 1.

Proof of Corollary 9.4. Let ๐ด be a deterministic ๐‘ž-query algorithm for the promise decision
problem. Given distributions ๐’Ÿ + and ๐’Ÿ โˆ’ , we define a distribution ๐’Ÿ satisfying the conditions
of Theorem 9.1. Let ๐ธ be the event that ๐‘ฅ โˆผ ๐’Ÿ โˆ’ is a negative instance, and let โ„ฌ be the distribution
๐’Ÿ โˆ’ conditioned on the event ๐ธ. To obtain a sample from ๐’Ÿ, with probability 1/2 draw a sample
from ๐’Ÿ + , and with probability 1/2 draw a sample from โ„ฌ. We show that ๐ด errs with probability
at least 1/3 when it accesses an input object ๐‘ฅ โˆผ ๐’Ÿ via the online-erasure oracle that uses
strategy ๐’ฎ. Let ๐‘„ be the set of query-answers strings ๐‘Ž on which ๐ด accepts. By the law of total
probability,

                                      1                     1
               Pr [๐ด(๐‘ฅ) is correct] =    Pr [๐ด(๐‘ฅ) accepts] + Pr [๐ด(๐‘ฅ) rejects]
              ๐‘ฅโˆผ๐’Ÿ                     2 ๐‘ฅโˆผ๐’Ÿ +               2 ๐‘ฅโˆผโ„ฌ
                                      1 1                                          
                                     = +      Pr [๐ด(๐‘ฅ) accepts] โˆ’ Pr [๐ด(๐‘ฅ) accepts]
                                      2 2 ๐‘ฅโˆผ๐’Ÿ +                   ๐‘ฅโˆผโ„ฌ
                                      1 1                                    
                                     = +        Pr [๐‘Ž โˆˆ ๐‘„] โˆ’ Pr [๐‘Ž โˆˆ ๐‘„]
                                      2 2 ๐‘Žโˆผ๐’Ÿ + -view          ๐‘Žโˆผโ„ฌ-view
                                      1 1
                                     โ‰ค + ๐ถ๐ท(๐’Ÿ + -view, โ„ฌ-view).
                                      2 2

    Note that โ„ฌ-view is the same as the distribution ๐’Ÿ โˆ’ -view conditioned on the event ๐ธ. By
Claim 9.5 and the assumption that Pr๐‘ฅโˆผ๐’Ÿ โˆ’ [๐ธ] โ‰ฅ 76 , we have ๐ถ๐ท(โ„ฌ-view, ๐’Ÿ โˆ’ -view) โ‰ค 16 . By the
triangle inequality,

                                                                                              1 1 1
  ๐ถ๐ท(๐’Ÿ + -view, โ„ฌ-view) โ‰ค ๐ถ๐ท(๐’Ÿ + -view, ๐’Ÿ โˆ’ -view) + ๐ถ๐ท(โ„ฌ-view, ๐’Ÿ โˆ’ -view, ) <                 + = .
                                                                                              6 6 3

Therefore, Pr๐‘ฅโˆผ๐’Ÿ [๐ด(๐‘ฅ) is correct] < 12 + 21 ยท 13 = 23 .                                               



                       T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                           40
             S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

References
 [1] Nir Ailon, Bernard Chazelle, Seshadhri Comandur, and Ding Liu: Estimating the distance
     to a monotone function. Random Struct. Algor., 31(3):371โ€“383, 2007. [doi:10.1002/rsa.20167]
     4

 [2] Noga Alon, Tali Kaufman, Michael Krivelevich, Simon Litsyn, and Dana Ron:
     Testing Reed-Muller codes.       IEEE Trans. Inform. Theory, 51(11):4032โ€“4039, 2005.
     [doi:10.1109/TIT.2005.856958] 3, 6, 7, 11, 24, 27

 [3] Sanjeev Arora and Madhu Sudan: Improved low-degree testing and its applications.
     Combinatorica, 23(3):365โ€“426, 2003. [doi:10.1007/s00493-003-0025-0] 6

 [4] Pranjal Awasthi, Madhav Jha, Marco Molinaro, and Sofya Raskhodnikova: Test-
     ing Lipschitz functions on hypergrid domains. Algorithmica, 74(3):1055โ€“1081, 2016.
     [doi:10.1007/s00453-015-9984-y] 7

 [5] Lรกszlรณ Babai, Lance Fortnow, Leonid A. Levin, and Mario Szegedy: Checking com-
     putations in polylogarithmic time. In Proc. 23rd STOC, pp. 21โ€“31. ACM Press, 1991.
     [doi:10.1145/103418.103428] 6

 [6] Lรกszlรณ Babai, Lance Fortnow, and Carsten Lund: Non-deterministic exponen-
     tial time has two-prover interactive protocols. Comput. Complexity, 1(1):3โ€“40, 1991.
     [doi:10.1007/BF01200056] 6

 [7] Amos Beimel, Haim Kaplan, Yishay Mansour, Kobbi Nissim, Thatchaphol Saranurak,
     and Uri Stemmer: Dynamic algorithms against an adaptive adversary: generic con-
     structions and lower bounds. In Proc. 54th STOC, pp. 1671โ€“1684. ACM Press, 2022.
     [doi:10.1145/3519935.3520064] 4

 [8] Mihir Bellare, Don Coppersmith, Johan Hรฅstad, Marcos A. Kiwi, and Madhu Sudan:
     Linearity testing in characteristic two. IEEE Trans. Inform. Theory, 42(6):1781โ€“1795, 1996.
     [doi:10.1109/18.556674] 3, 5, 12, 19, 20

 [9] Mihir Bellare, Oded Goldreich, and Madhu Sudan: Free bits, PCPs, and
     nonapproximabilityโ€“towards tight results. SIAM J. Comput., 27(3):804โ€“915, 1998.
     [doi:10.1137/S0097539796302531] 5

[10] Mihir Bellare, Shafi Goldwasser, Carsten Lund, and Alexander Russell: Efficient
     probabilistically checkable proofs and applications to approximations. In Proc. 25th STOC,
     pp. 294โ€“304. ACM Press, 1993. [doi:10.1145/167088.167174] 5

[11] Mihir Bellare and Madhu Sudan: Improved non-approximability results. In Proc. 26th
     STOC, pp. 184โ€“193. ACM Press, 1994. [doi:10.1145/195058.195129] 5

                    T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                     41
                   I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

[12] Aleksandrs Belovs: Adaptive lower bound for testing monotonicity on the line. In
     Proc. 22nd Internat. Conf. on Randomization and Computation (RANDOMโ€™18), pp. 31:1โ€“10.
     Schloss Dagstuhlโ€“Leibniz-Zentrum fuer Informatik, 2018. [doi:10.4230/LIPIcs.APPROX-
     RANDOM.2018.31] 4, 6, 7

[13] Omri Ben-Eliezer, Eldar Fischer, Amit Levi, and Ron D. Rothblum: Hard properties
     with (very) short PCPPs and their applications. In Proc. 11th Innovations in Theoret. Comp.
     Sci. Conf. (ITCSโ€™20), pp. 9:1โ€“27. Schloss Dagstuhlโ€“Leibniz-Zentrum fuer Informatik, 2020.
     [doi:10.4230/LIPIcs.ITCS.2020.9] 4

[14] Omri Ben-Eliezer, Rajesh Jayaram, David P. Woodruff, and Eylon Yogev: A frame-
     work for adversarially robust streaming algorithms. J. ACM, 69(2):17:1โ€“33, 2022.
     [doi:10.1145/3498334] 4

[15] Omri Ben-Eliezer and Eylon Yogev: The adversarial robustness of sampling. In Proc.
     39th Symp. on Principles of Database Systems (PODSโ€™20), pp. 49โ€“62. ACM Press, 2020.
     [doi:10.1145/3375395.3387643] 4

[16] Eli Ben-Sasson, Madhu Sudan, Salil P. Vadhan, and Avi Wigderson: Randomness-efficient
     low degree tests and short PCPs via epsilon-biased sets. In Proc. 35th STOC, pp. 612โ€“621.
     ACM Press, 2003. [doi:10.1145/780542.780631] 5

[17] Piotr Berman, Sofya Raskhodnikova, and Grigory Yaroslavtsev: ๐ฟ ๐‘ -testing. In Proc. 46th
     STOC, pp. 164โ€“173. ACM Press, 2014. [doi:10.1145/2591796.2591887] 6, 7, 14, 15

[18] Arnab Bhattacharyya, Elena Grigorescu, Kyomin Jung, Sofya Raskhodnikova, and
     David P. Woodruff: Transitive-closure spanners. SIAM J. Comput., 41(6):1380โ€“1425, 2012.
     [doi:10.1137/110826655] 4

[19] Arnab Bhattacharyya, Swastik Kopparty, Grant Schoenebeck, Madhu Sudan, and David
     Zuckerman: Optimal testing of Reed-Muller codes. In Proc. 51st FOCS, pp. 488โ€“497. IEEE
     Comp. Soc., 2010. A version of this paper, by the same title and authors, appeared as a
     chapter in โ€œProperty Testing: Current Research and Surveysโ€ (Oded Goldreich, ed.), 2010,
     pp. 269โ€“275, Springer LNCS vol. 6390. [doi:10.1109/FOCS.2010.54] 6, 11

[20] Eric Blais, Sofya Raskhodnikova, and Grigory Yaroslavtsev: Lower bounds for testing
     properties of functions over hypergrid domains. In Proc. 29th IEEE Conf. on Comput.
     Complexity (CCCโ€™14), pp. 309โ€“320. IEEE Comp. Soc., 2014. [doi:10.1109/CCC.2014.38] 7

[21] Manuel Blum, Michael Luby, and Ronitt Rubinfeld: Self-testing/correcting with applica-
     tions to numerical problems. J. Comput. System Sci., 47(3):549โ€“595, 1993. [doi:10.1016/0022-
     0000(93)90044-W] 3, 5

[22] Deeparnab Chakrabarty, Kashyap Dixit, Madhav Jha, and C. Seshadhri: Property testing
     on product distributions: Optimal testers for bounded derivative properties. ACM Trans.
     Algorithms, 13(2):20:1โ€“30, 2017. [doi:10.1145/3039241] 7

                     T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                     42
              S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

[23] Deeparnab Chakrabarty and C. Seshadhri: Optimal bounds for monotonicity and Lipschitz
     testing over hypercubes and hypergrids. In Proc. 45th STOC, pp. 419โ€“428. ACM Press, 2013.
     [doi:10.1145/2488608.2488661] 4, 7

[24] Deeparnab Chakrabarty and C. Seshadhri: An optimal lower bound for mono-
     tonicity testing over hypergrids. Theory of Computing, 10(17):453โ€“464, 2014.
     [doi:10.4086/toc.2014.v010a017] 6

[25] Irit Dinur and Venkatesan Guruswami: PCPs via low-degree long code and hardness for
     constrained hypergraph coloring. In Proc. 54th FOCS, pp. 340โ€“349. IEEE Comp. Soc., 2013.
     [doi:10.1109/FOCS.2013.44] 6

[26] Kashyap Dixit, Madhav Jha, Sofya Raskhodnikova, and Abhradeep Thakurta: Testing the
     Lipschitz property over product distributions with applications to data privacy. In Proc.
     Theory of Cryptography Conf. (TCCโ€™13), pp. 418โ€“436. Springer, 2013. [doi:10.1007/978-3-642-
     36594-2_24] 7

[27] Kashyap Dixit, Sofya Raskhodnikova, Abhradeep Thakurta, and Nithin Varma: Erasure-
     resilient property testing. SIAM J. Comput., 47(2):295โ€“329, 2018. [doi:10.1137/16M1075661]
     4, 11

[28] Yevgeniy Dodis, Oded Goldreich, Eric Lehman, Sofya Raskhodnikova, Dana Ron, and
     Alex Samorodnitsky: Improved testing algorithms for monotonicity. In Proc. 3rd Internat.
     Workshop on Randomization and Computation (RANDOMโ€™99), pp. 97โ€“108. Springer, 1999.
     [doi:10.1007/978-3-540-48413-4_10] 4, 32

[29] Funda Ergรผn, Sampath Kannan, Ravi Kumar, Ronitt Rubinfeld, and Mahesh Viswanathan:
     Spot-checkers. J. Comput. System Sci., 60(3):717โ€“751, 2000. [doi:10.1006/jcss.1999.1692] 4, 6

[30] Uriel Feige, Shafi Goldwasser, Lรกszlรณ Lovรกsz, Shmuel Safra, and Mario Szegedy: In-
     teractive proofs and the hardness of approximating cliques. J. ACM, 43(2):268โ€“292, 1996.
     [doi:10.1145/226643.226652] 5, 6

[31] Eldar Fischer: On the strength of comparisons in property testing. Inform. Comput.,
     189(1):107โ€“116, 2004. [doi:10.1016/j.ic.2003.09.003] 6

[32] Eldar Fischer, Eric Lehman, Ilan Newman, Sofya Raskhodnikova, Ronitt Rubinfeld, and
     Alex Samorodnitsky: Monotonicity testing over general poset domains. In Proc. 34th STOC,
     pp. 474โ€“483. ACM Press, 2002. [doi:10.1145/509907.509977] 4, 7

[33] Katalin Friedl and Madhu Sudan: Some improvements to total degree tests. In
     Proc. 3rd Isr. Symp. Theory Comp. Sys. (ISTCSโ€™95), pp. 190โ€“198. IEEE Comp. Soc., 1995.
     [doi:10.1109/ISTCS.1995.377032] 6

[34] Peter Gemmell, Richard J. Lipton, Ronitt Rubinfeld, Madhu Sudan, and Avi Wigderson:
     Self-testing/correcting for polynomials and for approximate functions. In Proc. 23rd STOC,
     pp. 33โ€“42. ACM Press, 1991. [doi:10.1145/103418.103429] 6

                     T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                      43
                   I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

[35] Oded Goldreich: On multiple input problems in property testing. In Proc. 18th Internat.
     Workshop on Randomization and Computation (RANDOMโ€™14), pp. 704โ€“720. Schloss Dagstuhlโ€“
     Leibniz-Zentrum fuer Informatik, 2014. [doi:10.4230/LIPIcs.APPROX-RANDOM.2014.704]
     6
[36] Oded Goldreich, Shafi Goldwasser, Eric Lehman, Dana Ron, and Alex Samorodnitsky:
     Testing monotonicity. Combinatorica, 20(3):301โ€“337, 2000. [doi:10.1007/s004930070011] 33
[37] Oded Goldreich, Shafi Goldwasser, and Dana Ron: Property testing and its connection to
     learning and approximation. J. ACM, 45(4):653โ€“750, 1998. [doi:10.1145/285055.285060] 3
[38] Venkatesan Guruswami and Atri Rudra: Tolerant locally testable codes. In Proc. 9th
     Internat. Workshop on Randomization and Computation (RANDOMโ€™05), pp. 306โ€“317. Springer,
     2005. [doi:10.1007/11538462_26] 4
[39] Elad Haramaty, Amir Shpilka, and Madhu Sudan: Optimal testing of multivariate polyno-
     mials over small prime fields. SIAM J. Comput., 42(2):536โ€“562, 2013. [doi:10.1137/120879257]
     6
[40] Johan Hรฅstad and Avi Wigderson: Simple analysis of graph tests for linearity and PCP.
     Random Struct. Algor., 22(2):139โ€“160, 2003. [doi:10.1002/rsa.10068] 5
[41] Madhav Jha and Sofya Raskhodnikova: Testing and reconstruction of Lipschitz
     functions with applications to data privacy. SIAM J. Comput., 42(2):700โ€“731, 2013.
     [doi:10.1137/110840741] 7
[42] Charanjit S. Jutla, Anindya C. Patthak, Atri Rudra, and David Zuckerman: Testing
     low-degree polynomials over prime fields. Random Struct. Algor., 35(2):163โ€“193, 2009.
     [doi:10.1002/rsa.20262] 6
[43] Iden Kalemaj, Sofya Raskhodnikova, and Nithin Varma: Sublinear-time computation
     in the presence of online erasures. In Proc. 13th Innovations in Theoret. Comp. Sci. Conf.
     (ITCSโ€™22), volume 215, pp. 90:1โ€“25. Schloss Dagstuhlโ€“Leibniz-Zentrum fuer Informatik,
     2022. [doi:10.4230/LIPIcs.ITCS.2022.90] 1
[44] Tali Kaufman, Simon Litsyn, and Ning Xie: Breaking the ๐œ–-soundness bound of the linearity
     test over GF(2). SIAM J. Comput., 39(5):1988โ€“2003, 2010. [doi:10.1137/080715548] 5
[45] Tali Kaufman and Dana Ron: Testing polynomials over general fields. SIAM J. Comput.,
     36(3):779โ€“802, 2006. [doi:10.1137/S0097539704445615] 6
[46] Swastik Kopparty and Shubhangi Saraf: Tolerant linearity testing and locally testable
     codes. In Proc. 13th Internat. Workshop on Randomization and Computation (RANDOMโ€™09), pp.
     601โ€“614. Springer, 2009. [doi:10.1007/978-3-642-03685-9_45] 4
[47] Amit Levi, Ramesh Krishnan S. Pallavoor, Sofya Raskhodnikova, and Nithin Varma:
     Erasure-resilient sublinear-time graph algorithms. ACM Trans. Comput. Theory, 14(1):1โ€“22,
     2021. Preliminary version in ITCSโ€™21. [doi:10.1145/3488250] 4

                     T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                     44
              S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

[48] Alessandro Mantelero: The EU proposal for a general data protection regulation and the
     roots of the โ€˜right to be forgottenโ€™. Computer Law & Security Review, 29(3):229โ€“235, 2013.
     [doi:10.1016/j.clsr.2013.03.010] 2

[49] Dana Moshkovitz: Low-degree test with polynomially small error. Comput. Complexity,
     26(3):531โ€“582, 2017. [doi:10.1007/s00037-016-0149-4] 6

[50] Dana Moshkovitz and Ran Raz: Sub-constant error low degree test of almost-linear size.
     SIAM J. Comput., 38(1):140โ€“180, 2008. [doi:10.1137/060656838] 6

[51] Ilan Newman and Nithin Varma: New sublinear algorithms and lower bounds for
     LIS estimation. In Proc. 48th Internat. Colloq. on Automata, Languages, and Program-
     ming (ICALPโ€™21), pp. 100:1โ€“20. Schloss Dagstuhlโ€“Leibniz-Zentrum fuer Informatik, 2021.
     [doi:10.4230/LIPIcs.ICALP.2021.100] 4

[52] Ryan Oโ€™Donnell: Analysis of Boolean Functions. Cambridge Univ. Press, 2014.
     [doi:10.1017/CBO9781139814782, arXiv:2105.10386] 12

[53] Ramesh Krishnan S. Pallavoor, Sofya Raskhodnikova, and Nithin Varma: Parame-
     terized property testing of functions. ACM Trans. Comput. Theory, 9(4):17:1โ€“19, 2018.
     [doi:10.1145/3155296] 7, 32

[54] Ramesh Krishnan S. Pallavoor, Sofya Raskhodnikova, and Erik Waingarten: Approximat-
     ing the distance to monotonicity of boolean functions. Random Struct. Algor., 60(2):233โ€“260,
     2022. [doi:10.1002/rsa.21029] 4

[55] Ramesh Krishnan Pallavoor Suresh: Improved Algorithms and New Models in Property Testing.
     Ph. D. thesis, Boston University, 2020. OpenBU. 7

[56] Michal Parnas, Dana Ron, and Ronitt Rubinfeld: Tolerant property testing and distance
     approximation. J. Comput. System Sci., 72(6):1012โ€“1042, 2006. [doi:10.1016/j.jcss.2006.03.002]
     4

[57] Sofya Raskhodnikova: Testing if an array is sorted. In Ming-Yang Kao, editor, Encyclopedia
     of Algorithms, pp. 2219โ€“2222. Springer, 2016. [doi:10.1007/978-1-4939-2864-4_700] 6

[58] Sofya Raskhodnikova, Noga Ron-Zewi, and Nithin Varma: Erasures versus errors
     in local decoding and property testing. Random Struct. Algor., 59(4):640โ€“670, 2021.
     [doi:10.1002/rsa.21031] 4

[59] Sofya Raskhodnikova and Ronitt Rubinfeld: Linearity testing/Testing Hadamard codes.
     In Ming-Yang Kao, editor, Encyclopedia of Algorithms, pp. 1107โ€“1110. Springer, 2016.
     [doi:10.1007/978-1-4939-2864-4_202] 5

[60] Sofya Raskhodnikova and Adam D. Smith: A note on adaptivity in testing properties of
     bounded degree graphs. Electron. Colloq. Comput. Complexity, TR06-089, 2006. [ECCC] 39,
     40

                     T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                       45
                   I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

[61] Sofya Raskhodnikova and Nithin Varma: Brief announcement: Erasure-resilience versus
     tolerance to errors. In Proc. 45th Internat. Colloq. on Automata, Languages, and Program-
     ming (ICALPโ€™18), pp. 111:1โ€“3. Schloss Dagstuhlโ€“Leibniz-Zentrum fuer Informatik, 2018.
     [doi:10.4230/LIPIcs.ICALP.2018.111] 4

[62] Ran Raz and Shmuel Safra: A sub-constant error-probability low-degree test, and a
     sub-constant error-probability PCP characterization of NP. In Proc. 29th STOC, pp. 475โ€“484.
     ACM Press, 1997. [doi:10.1145/258533.258641] 6

[63] Noga Ron-Zewi and Madhu Sudan: A new upper bound on the query complexity
     of testing generalized Reed-Muller codes. Theory of Computing, 9(25):783โ€“807, 2013.
     [doi:10.4086/toc.2013.v009a025] 6

[64] Ronitt Rubinfeld and Madhu Sudan:             Robust characterizations of polynomials
     with applications to program testing.          SIAM J. Comput., 25(2):252โ€“271, 1996.
     [doi:10.1137/S0097539793255151] 3, 6

[65] Michael E. Saks and C. Seshadhri: Estimating the longest increasing sequence in polyloga-
     rithmic time. SIAM J. Comput., 46(2):774โ€“823, 2017. [doi:10.1137/130942152] 4

[66] Alex Samorodnitsky: Low-degree tests at large distances. In Proc. 39th STOC, pp. 506โ€“515.
     ACM Press, 2007. [doi:10.1145/1250790.1250864] 5, 6

[67] Alex Samorodnitsky and Luca Trevisan: A PCP characterization of NP with opti-
     mal amortized query complexity. In Proc. 32nd STOC, pp. 191โ€“199. ACM Press, 2000.
     [doi:10.1145/335305.335329] 5

[68] Alex Samorodnitsky and Luca Trevisan: Gowers uniformity, influence of variables, and
     PCPs. SIAM J. Comput., 39(1):323โ€“360, 2009. [doi:10.1137/070681612] 5, 6

[69] Amir Shpilka and Avi Wigderson: Derandomizing homomorphism testing in general
     groups. SIAM J. Comput., 36(4):1215โ€“1230, 2006. [doi:10.1137/S009753970444658X] 5

[70] Madhu Sudan and Luca Trevisan: Probabilistically checkable proofs with low amor-
     tized query complexity. In Proc. 39th FOCS, pp. 18โ€“27. IEEE Comp. Soc., 1998.
     [doi:10.1109/SFCS.1998.743425] 5

[71] Luca Trevisan: Recycling queries in PCPs and in linearity tests (extended abstract). In Proc.
     30th STOC, pp. 299โ€“308. ACM Press, 1998. [doi:10.1145/276698.276769] 5

[72] Andrew Chi-Chih Yao: Probabilistic computations: Toward a unified measure of com-
     plexity (extended abstract). In Proc. 18th FOCS, pp. 222โ€“227. IEEE Comp. Soc., 1977.
     [doi:10.1109/SFCS.1977.24] 38




                     T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                      46
            S UBLINEAR -T IME C OMPUTATION IN THE P RESENCE OF O NLINE E RASURES

AUTHORS

    Iden Kalemaj
    Graduate student
    Department of Computer Science
    Boston University
    Boston, MA, USA
    ikalemaj bu edu
    https://cs-people.bu.edu/ikalemaj/


    Sofya Raskhodnikova
    Professor
    Department of Computer Science
    Boston University
    Boston, MA, USA
    sofya bu edu
    https://cs-people.bu.edu/sofya/


    Nithin Varma
    Assistant Professor
    Chennai Mathematical Institute
    Chennai, Tamil Nadu, India
    nithvarma gmail com
    https://www.cmi.ac.in/~nithinvarma/


ABOUT THE AUTHORS

    Iden Kalemaj is a Ph. D. student in Computer Science at Boston University, working
       under the wonderful supervision of Sofya Raskhodnikova, in the fields of
       Sublinear Algorithms and Differential Privacy.
       Iden grew up in Vlorรซ, Albania. Her math teacher and school master, Dafina
       Brokaj, with a rare sense of humour and wisdom, instilled in Iden the confidence
       to pursue mathematics.
       Iden completed her undergraduate studies in Mathematics at Princeton Univer-
       sity, and started to explore her interest in theoretical computer science via classes
       in graph theory and complexity theory. In her free time she enjoys climbing in
       the many Boston gyms and taking dance classes.




                   T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                        47
             I DEN K ALEMAJ , S OFYA R ASKHODNIKOVA , AND N ITHIN VARMA

Sofya Raskhodnikova is a professor of Computer Science at Boston University. Her
   office is located in the newly constructed Center for Computing and Data Sciences,
   colloquially known as the Jenga building. She received all her degrees (S. B., S. M.,
   and Ph. D.) from MIT, and then was a postdoctoral fellow at the Hebrew University
   of Jerusalem and the Weizmann Institute of Science. She was a Professor of
   Computer Science and Engineering at Penn State and held visiting positions at
   the Institute for Pure and Applied Mathematics at UCLA, Boston University,
   Harvard University, and at the Simons Institute for the Theory of Computing at
   Berkeley. Sofya works in the areas of randomized and approximation algorithms.
   Her main interest is the design and analysis of sublinear-time algorithms for
   combinatorial problems. She has also made important contributions to data
   privacy. Sofya has been a faculty member at Sigma Camp, a residential summer
   science camp for kids, for several years. As far as her hobbies go, recall that she
   works on privacy.


Nithin Varma is a researcher working in the fields of Sublinear Algorithms and
   Approximation Algorithms. He got his Ph. D. from the Computer Science
   Department at Boston University, where he was fortunate to be advised by
   Sofya Raskhodnikova. After that, he was a postdoctoral researcher at the
   Department of Computer Science, University of Haifa, where he was hosted
   and mentored by Ilan Newman and Noga Ron-Zewi. He was introduced to
   Theoretical Computer Science during his undergraduate years at the Department
   of Computer Science and Engineering at the National Institute of Technology
   Calicut through the wonderful courses offered by Prof. K Muralikrishnan. In his
   free time, Nithin enjoys meditation, singing Indian classical music and practicing
   the Mohiniyattam dance.




               T HEORY OF C OMPUTING, Volume 19 (1), 2023, pp. 1โ€“48                        48