<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Online versus Offline Adversaries in Property Testing</title></titleStmt>
			<publicationStmt>
				<publisher>15th Innovations in Theoretical Computer Science Conference (ITCS)</publisher>
				<date>02/11/2025</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10631048</idno>
					<idno type="doi"></idno>
					
					<author>Esty Kelman</author><author>Ephraim Linger</author><author>Sofya Raskhodnikova</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We study property testing with incomplete or noisy inputs. The models we consider allow for adversarial manipulation of the input, but differ in whether the manipulation can be done only offline, i.e., before the execution of the algorithm, or online, i.e., as the algorithm runs. The manipulations by an adversary can come in the form of erasures or corruptions. We compare the query complexity and the randomness complexity of property testing in the offline and online models. Kalemaj, Raskhodnikova, and Varma (Theory Comput. `23) provide properties that can be tested with a small number of queries with offline erasures, but cannot be tested at all with online erasures. We demonstrate that the two models are incomparable in terms of query complexity: we construct properties that can be tested with a constant number of queries in the online corruption model, but require querying a significant fraction of the input in the offline erasure model. We also construct properties that exhibit a strong separation between the randomness complexity of testing in the presence of offline and online adversaries: testing these properties in the online model requires exponentially more random bits than in the offline model, even when they are tested with nearly the same number of queries in both models. Our randomness separation relies on a novel reduction from randomness-efficient testers in the adversarial online model to query-efficient testers in the standard model.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Property testing <ref type="bibr">[31,</ref><ref type="bibr">15]</ref> aims to lay algorithmic foundations for processing big data. It is a formal study of fast algorithms that accept objects with a given property and reject objects that are far. The goal of this work is to compare models of property testing that address the situations when the data that needs to be analyzed is not only large, but also incomplete or noisy. The models we consider allow for adversarial manipulation of the input, but differ in whether the manipulation can be done only offline, i.e., before the execution of the algorithm, or online, i.e., as the algorithm runs. The manipulations by an adversary can come in the form of erasures or corruptions. The offline erasure-resilient property testing model was proposed by Dixit et al. <ref type="bibr">[9]</ref>. The model that captures offline corruptions is called tolerant testing and was introduced by Parnas et al. <ref type="bibr">[25]</ref>. The online analogues of these models were recently defined by Kalemaj et al. <ref type="bibr">[21]</ref>.</p><p>We compare the query complexity and the randomness complexity of property testing in the offline and online models. In the offline-erasure model, a constant fraction of the input is erased adversarially before the execution of the algorithm, whereas in the online-erasure model, the adversary is allowed to make a fixed number of erasures after each query. It may seem that the online adversary has strictly more power, and thus testing in the online models should require more queries. Indeed, <ref type="bibr">[21]</ref> justify this intuition and show that simple properties -sortedness and the Lipschitz property of sequences -cannot be tested at all with online erasures<ref type="foot">foot_0</ref> , even though they are testable using a small number of queries when erasures are offline. Intuitively, <ref type="bibr">[21]</ref> show that testing in the presence of one online erasure per query (performed by an adversary with the knowledge of previous queries) can be harder than testing when a constant fraction of the input is adversarially erased offline (in advance). The following natural open question is stated in <ref type="bibr">[21]</ref>: "Is there a property that has smaller query complexity in the online-erasure-resilient model than in the (offline) erasure-resilient model of <ref type="bibr">[9]</ref>?" We answer this question in the affirmative: specifically, we construct a property that can be tested with a constant number of queries in the online-erasure model (and even in the (harder) online-corruption model), but requires a nearly linear number of queries in the offline-erasure model. We conclude that the two adversarial erasure models are incomparable.</p><p>Our second result concerns the randomness complexity of testing in the online and offline manipulation models. Randomness is an important tool in the design of a wide variety of algorithms, and extensive research has been conducted to understand the power of randomness in computation. The investigation of the randomness complexity of property testing algorithms was initiated by Goldreich and Sheffet <ref type="bibr">[18]</ref>. They showed that all property testers in the standard model can be derandomized to a large extent: they can be converted to testers that use the number of random bits that is logarithmic in the size of the input, while incurring at most a constant factor blowup in query complexity. The result of <ref type="bibr">[18]</ref> easily extends to all offline testing models, but does not apply in the online setting. Moreover, the existing testers in the online model <ref type="bibr">[21,</ref><ref type="bibr">24,</ref><ref type="bibr">6,</ref><ref type="bibr">33,</ref><ref type="bibr">3]</ref> use lots of randomness to fool the adversary. A natural question that arises is how much derandomization is possible in the online setting. We show that a lot of randomness is sometimes indeed necessary to test in the presence of an online adversary. In particular, we exhibit a property that requires exponentially more random bits to test in the online manipulation model than in the offline manipulation model. This result provides a natural converse to the statement of <ref type="bibr">[24]</ref> that "the (online) adversary cannot foil our plan if there is no plan" -i.e., random queries are robust to online manipulation of the input.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Our results</head><p>We represent the input to our property testing algorithm as a string. The algorithm is given access to its input string via queries (specifically, of the form "what is the character at index i?"). For each proximity parameter &#949; &#8712; (0, 1), the algorithm has to distinguish between strings that have a specified property and strings that are &#949;-far from having the propertyi.e., strings that need to be changed on at least an &#949;-fraction of indices in order to satisfy the property. The query complexity (the number of queries to the input) of the tester is measured in terms of &#949; and the input length n. In this section, for simplicity, &#949; is considered to be a constant and omitted from the statements.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1.1">Query complexity: Model Incomparability</head><p>We show that the online and offline adversarial models of property testing are incomparable in terms of the query complexity. Recall that <ref type="bibr">[21]</ref> prove that sortedness and Lipschitzness of sequences are efficiently testable with offline erasures, but cannot be tested at all even with one online erasure per query 2 . We complement this result with the following theorems, which show that testing in the presence of a small fraction of offline erasures can be harder than testing with online erasures. The first of this theorems (Theorem 1.1) considers the regime with many online erasures per query; the second (Theorem 1.1) considers the regime with one erasure per query. The former exhibits a logarithmic gap in query complexity, where as the latter exhibits a nearly linear gap.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#9654; Theorem 1.1 (Informal version of Corollary 3.2).</head><p>There exists a property that can be tested using a constant number of queries in the presence of an online adversary that makes O n log n erasures per query; but requires &#8486;(log n) queries 3 to test when the characters at &#920; n log log n indices are erased offline (in advance).</p><p>We cannot expect to prove an analogue of Theorem 1.1 for the case when the number of online erasures per query is the same as the total number of offline erasures. This is because, after the first query, an online adversary can erase the same part of the input that the offline adversary would have erased in advance.</p><p>&#9654; Remark 1.2. Although the online erasure rate in Theorem 1.1 is very large, the total number of erasures available to the online adversary is smaller than the number of offline erasures we considered. It is an intriguing open question whether there exists a property for which every tester in the online model accumulates at least as many erasures as the best tester in the offline model, but also requires fewer queries to test in the online model than in the offline model.</p><p>At the other end of the spectrum, we show that if the number of erasures is much smaller in the online model than in the offline model, then there is an exponentially large gap -i.e., there are properties that can be tested with a constant number of queries when the erasures are online but require a nearly linear number of queries in the offline erasure model.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#9654; Theorem 1.3 (Informal version of Corollary 3.3).</head><p>There exists a property that can be tested with a constant number of queries in the presence of an online adversary that makes one erasure per query, but requires &#8486;(n) queries to test when the characters at &#920; n log n indices are erased offline (in advance). 2 We note that there is an even simpler property than sortedness and Lipschitzness of sequences that is easily testable with offline erasures or corruptions, but is not testable at all with online erasures. Moreover, this property is over the alphabet &#931; = {0, 1}. Specifically, P = {ww : w &#8712; {0, 1} * }. We can estimate the distance to this property within additive error &#949; using O( 1 &#949; 2 ) queries (and therefore it is easily tolerantly testable). However, we cannot test it with online erasures because, whenever the tester queries some position p in an input string of length 2n, the adversary can erase the corresponding position (n + p if p &#8804; n and p -n if p &gt; n). 3 The notation &#8486;(f (n)) hides polylog f (n) factors, e.g., &#8486;(log n) = &#8486;(log n/ polyloglog n).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I T C S 2 0 2 5</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>65:4 Online Versus Offline Adversaries in Property Testing</head><p>In fact, the query complexity separations in Theorems 1.1 and 1.3 hold even if the online adversary can make corruptions instead of erasures.</p><p>To prove Theorems 1.1 and 1.3, we show that any property that separates the offline model from the standard one, i.e., a property that is easy to test in the standard model but hard in the offline model, can be "lifted" to separate the offline and online models. We can then leverage the state of the art separation (between the standard and offline-manipulation testing models) of <ref type="bibr">[5]</ref> to obtain strong separations between the online and offline manipulation models.</p><p>Our "lifting" operation is simply encoding the property with a repetition code. Intuitively, repetition won't make the property easier to test in the presence of offline erasures since the same erasures can be made on all copies. Our main technical proof for this part is to show that repetition code is robust against online adversaries. We prove the following general result.</p><p>&#9654; Lemma 1.4 (Informal version of Lemma 3.5). If a property P is testable when no adversary is present then the repeated version P r , given by concatenating each string in P with itself r times, is testable in the presence of an online adversary (as long as the number of erasures per query is not too large).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1.2">Randomness complexity separations</head><p>As discussed earlier, the investigation of the randomness complexity of property testing algorithms was initiated by Goldreich and Sheffet <ref type="bibr">[18]</ref> who showed that every property that is testable in the standard model using q queries can be tested using O(q) queries and O(log n) random bits. We build on their investigation by studying the randomness complexity of the erasure models. Though their result easily extends to the offline models, the same extension does not work in the online model. Indeed, we show that the derandomization of <ref type="bibr">[18]</ref> cannot be extended to the online testing model -that is, we construct a property that requires &#969;(log n) random bits to test in the online model.</p><p>Note that a randomness separation trivially holds for properties which are not testable with online erasures, or when the offline-erasure-resilient tester is allowed to query the entire input <ref type="foot">4</ref> . Prior to our work it was not clear if there is a randomness separation that applies to properties that are testable in the online model, and still holds if we require that the testers in both models to have a sublinear (in n) query complexity.</p><p>We demonstrate such a separation. In particular, we show that there exists a property that is testable in both models using a sublinear number of queries, and, moreover, testing this property in the online erasure model requires exponentially more random bits than testing it in the offline erasure model.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#9654; Theorem 1.5 (Informal version of Corollary 4.2).</head><p>There exists a property that can be tested using O( &#8730; n) queries in the presence of either an online or an offline adversary. The tester against the offline adversary uses O(log n) random bits, whereas every tester in the presence of an online adversary that makes one erasure per query requires &#8486;( &#8730; n) random bits to succeed with constant probability. Theorem 1.5 follows easily from a more general result, Theorem 4.1, which we prove in Section 4 and which yields meaningful separations for larger online erasure rates as well. The main technique we develop to prove a lower bound on the randomness complexity of testing with an online adversary is a transformation from randomness-efficient testers in the online model to query efficient testers in the standard model. A special case of the guarantees of our transformation is stated in Lemma 1.6. (The general version appears in <ref type="bibr">Lemma 4.3.)</ref> To prove Theorem 4.1, we combine our transformation with existing results regarding the property of strings called &#964; -Distinct-Elements, which is parametrized by &#964; &#8712; N, and consists of strings that have at most &#964; distinct characters. Testing &#964; -Distinct-Elements was recently investigated in <ref type="bibr">[17,</ref><ref type="bibr">2,</ref><ref type="bibr">1,</ref><ref type="bibr">20]</ref>, and it is a natural testing version of the distinct elements approximation problem studied in <ref type="bibr">[28,</ref><ref type="bibr">32]</ref>. For a more detailed exposition regarding the history of the &#964; -Distinct-Elements property and its variants see <ref type="bibr">[20]</ref>.</p><p>&#9654; Lemma 1.6 (Special case of Lemma 4.3 for one online erasure per query). Fix r &#8712; N. If a property P can be tested using r random bits in the presence of an online adversary that makes one erasure per query, then P can be tested in the standard model (with the same proximity parameter &#949;) using at most r queries.</p><p>The technique from Lemma 1.6, combined with the derandomization results of <ref type="bibr">[18]</ref>, immediately yields a separation for &#949; = o 1 log n : Consider the property P &#8838; {0, 1} n of being the zero string. By the folklore property testing bound, &#920;( 1 &#949; ) queries are necessary and sufficient to test P. By <ref type="bibr">[18]</ref>, there exists a tester in the offline erasure model that uses O(log n) random bits. However, by Lemma 1.6, every tester in the online model must use &#8486;( <ref type="formula">1</ref>&#949; ) = &#969;(log n) random bits. While this works for small &#949;, the separation we show in Theorem 1.5 (and the more general Theorem 4.1) holds for constant &#949; as well.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2">Related work</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Relationship between offline and standard models</head><p>In terms of query complexity, testing with offline erasures lies between standard and tolerant testing. By definition, an offline-erasure-resilient tester is also a property tester in the standard model, because it has to work on the inputs with no erasures. Not surprisingly, offline testing with erasures is no harder than offline testing with corruptions. This is formalized in [9, <ref type="bibr">Theorem 1.4</ref>] that shows that the existence of a tolerant tester for a property implies the existence of an offline-erasure-resilient tester for that property for a comparable setting of parameters. There are also separations that show that standard testing is strictly easier than offline-erasure-resilient testing, which in turn is strictly easier than tolerant testing. Specifically, Dixit et al. <ref type="bibr">[9]</ref> showed that a property defined by Fischer and Fortnow <ref type="bibr">[13]</ref> can be tested in the standard model with a constant number of queries, but requires n &#8486; (1) queries in the offline-erasure-resilient model. This separation was strengthened by Ben-Eliezer et al. <ref type="bibr">[5]</ref>, improving n &#8486; (1) to &#8486;(n). Finally, <ref type="bibr">Raskhodnikova et al. [29]</ref> prove a separation similar to that of [9] between offline-erasure-resilient testing and tolerant testing. Thus, at a high level, we have a complete picture in terms of the relative difficulty of testing in the three offline models.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Relationship between offline and online testing</head><p>Kalemaj et al. <ref type="bibr">[21]</ref> exhibit two properties of strings for which testing with online erasures is impossible for every proximity parameter &#949; &#8804; 1 2 , whereas testing in the offline models is easy. The first property, sortedness, consists of sorted arrays, i.e., strings x of length n such that x i &#8804; x i+1 for all i &#8712; [n -1]. The query complexity of testing sortedness (for constant &#949;) is &#920;(log n) in both the standard and the offline erasures model (when the erased part is at most a constant fraction of the input) <ref type="bibr">[11,</ref><ref type="bibr">10,</ref><ref type="bibr">26,</ref><ref type="bibr">12,</ref><ref type="bibr">7,</ref><ref type="bibr">8,</ref><ref type="bibr">27,</ref><ref type="bibr">4,</ref><ref type="bibr">9]</ref>. The second property, Lipschitzness, consists of strings</p><p>) queries in both the standard and the offline models <ref type="bibr">[19,</ref><ref type="bibr">9]</ref>. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Property testing</head><p>We start by stating standard property testing definitions. We represent an input to a property testing algorithm as a string of length n over some alphabet &#931; n that might depend on n.</p><p>For example, &#931; n might be {0, 1} or [n].</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#9654; Definition 2.1 (Relative Hamming distance, property, &#949;-far). The relative Hamming distance between two strings x, y of length</head><p>For a set S of strings of length n, define &#948; H (x, S) = min y&#8712;S &#948; H (x, y). A property P is a subset of &#931; * given by n&#8712;N P n , where each P n consists of strings of length n over some alphabet</p><p>&#9654; Definition 2.2 (&#949;-tester in the standard model <ref type="bibr">[31,</ref><ref type="bibr">15]</ref>). For every property P &#8838; &#931; * and proximity parameter &#949; &#8712; (0, 1), an algorithm T is an &#949;-tester for P if, given a parameter n &#8712; N and oracle access to input x &#8712; &#931; n , the algorithm T accepts with probability at least 2 3 whenever x &#8712; P and rejects with probability at least 2  3 whenever x is &#949;-far from P. A tester has a one-sided error if it always accepts inputs x &#8712; P.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Offline manipulations</head><p>The offline model with erasures was introduced by [9] and subsequently studied in <ref type="bibr">[30,</ref><ref type="bibr">29,</ref><ref type="bibr">5,</ref><ref type="bibr">23]</ref>. The definition we use here is adapted from <ref type="bibr">[23]</ref> and only differs from the original definition in how the parameter &#949; is interpreted. We use &#8869; to denote an erased symbol in the input. &#9654; Definition 2.3 (&#945;-erased string, completion). For each &#945; &#8712; (0, 1), a string x &#8712; (&#931; &#8746; {&#8869;}) n is &#945;-erased if at most an &#945; fraction of symbols in it are &#8869;. The indices of the &#8869; symbols in the string are called erased. A string y &#8712; &#931; n that differs from a string x &#8712; (&#931; &#8746; {&#8869;}) n only on indices erased in x is called a completion of x. &#9654; Definition 2.4 (Offline-erasure-resilient tester [9]). For every property P &#8838; &#931; * and parameters &#945; &#8712; [0, 1) and &#949; &#8712; (0, 1), an algorithm T is an &#945;-offline-erasure-resilient &#949;-tester for P if, given a parameter n &#8712; N and oracle access to an &#945;-erased input x &#8712; &#931; n , the algorithm T accepts with probability at least 2  3 whenever there exists a completion y &#8712; P of x and rejects with probability at least 2  3 whenever every completion y of x is &#949;-far from P. When &#945; = 0, the &#945;-offline-erasure-resilient model is the same as the standard model. Another generalization of property testing is tolerant testing, introduced by <ref type="bibr">[25]</ref> and extensively studied over the last decades. It can be viewed as guaranteeing resilience to an &#945; fraction of the input being corrupted by an offline adversary. &#9654; Definition 2.5 ((&#945;, &#949;)-tolerant tester <ref type="bibr">[25]</ref>). For every property P &#8838; &#931; * and parameters &#945;, &#949; &#8712; (0, 1), an algorithm T is an (&#945;, &#949;)-tolerant tester for P if, given a parameter n &#8712; N and oracle access to input x &#8712; &#931; n , the algorithm T accepts with probability at least 2  3 whenever x is &#945;-close to P and rejects with probability at least 2  3 whenever x is &#949;-far from P. When we want to stress comparison to other models we study, we call an (&#945;, &#949;)-tolerant tester an &#945;-offline-corruption-resilient &#949;-tester. E. Kelman, E. Linder, and S. Raskhodnikova</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>65:7</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Online manipulations</head><p>In this model, the input string x &#8712; &#931; n is accessed via an adversarial oracle O. After answering each query made by the algorithm, the adversary can erase or corrupt a small number of data points. At the beginning of the execution of the algorithm,</p><p>So, the first query is always answered correctly. The number of queries the adversary can manipulate after answering each query is parameterized by t &#8712; N. The manipulated values are used by the oracle to answer future queries to the corresponding indices. The algorithm does not know which input locations have been tempered with. As stated in <ref type="bibr">[21]</ref>, "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." &#9654; Definition 2.6 (Adversarial oracle, online testers <ref type="bibr">[21]</ref>). Fix t &#8712; N. A t-online-erasure oracle can replace values O(i) on up to t indices i &#8712; [n] with the erasure symbol &#8869; after answering each query. A t-online-corruption oracle is defined analogously, except that it replaces each symbol with an arbitrary symbol from &#931; instead of erasing it. For each t &#8712; N, a t-online-erasure-resilient &#949;-tester T is defined as in the standard model (Definition 2.2), except that it accesses its input via a t-online-erasure oracle as opposed to querying the input directly. The t-online-corruption-resilient &#949;-tester is defined analogously.</p><p>The standard property testing model is a special case of this enhanced model and corresponds to the case when t = 0. Moreover, it is clear from the definition that testing with online erasures is no harder than testing with online corruptions. Specifically, every t-online-corruption-resilient tester can be simulated by a tester that accesses its input via a t-online-erasure oracle -the tester can simply replace each &#8869; with an arbitrary value from &#931;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>3</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Query complexity separation</head><p>In this section, we prove that testing with an offline adversary can require more queries than testing with an online adversary.</p><p>&#9654; Theorem 3.1 (Query complexity separation). Fix &#8467; &#8712; N and let r = r(n) &lt; n be a function of the input length n. There exists a property P &#8838; {0, 1} * and a constant &#949; 1 = &#949; 1 (&#8467;) &#8712; (0, 1) such that: 5 1. For all &#949; &#8712; (0, 1) and t = ( &#949; 2 ) O(&#8467;) &#8226; r, the property P is t-online-corruption-resiliently &#949;-testable using ( 2 &#949; ) O(&#8467;) queries. 2. For all n &#8712; N, &#949; &#8712; (0, &#949; 1 ), and &#945; = &#8486;</p><p>queries on inputs of length n.</p><p>For &#8467; = 1 and r = n log n , we obtain the following corollary.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#9654; Corollary 3.2.</head><p>There exist a property P such that for all &#949; &#8712; (0, 1) and t &#8804; poly(&#949;) &#8226; n log n , the property P is &#949;-testable using poly( 1 &#949; ) queries in the t-online-corruption model. However, for all &#945; = &#8486; 1 log log n such that &#945; + &#949; &lt; 1, every &#945;-offline-erasure-resilient &#949;-tester requires &#8486;(log n) queries. 5 We use log (&#8467;) to denote the log function applied &#8467; times.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I T C S 2 0 2 5</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>65:8 Online Versus Offline Adversaries in Property Testing</head><p>While Corollary 3.2 shows that testing in the &#945;-offline-erasure model can be harder than testing in the t-online-model for large t and small &#945;, the difference in query complexity is quite mild. To obtain a large gap in query complexity from Theorem 3.1, we fix &#8467; &#8712; N and constant proximity parameter &#949; &#8804; &#949; 1 (&#8467;), and r = r(&#949;, &#8467;) such that t = 1. This yields the following corollary.</p><p>&#9654; Corollary 3.3. Fix &#8467; &#8712; N and a constant &#949; = &#949;(&#8467;). There exists a property P such that P is &#949;-testable in the 1-online-corruption model using constantly many queries. But, for all &#945; = &#8486; 1 log (&#8467;) n such that &#945; + &#949; &lt; 1, every &#945;-offline-erasure-resilient &#949;-tester requires</p><p>One feature of the results in Theorem 3.1 (as well as Corollaries 3.2 and 3.3) is that they hold even when the adversary in the online model is allowed to make corruptions, while the adversary in the offline model is restricted to erasures.</p><p>To prove Theorem 3.1, we introduce the following "lifting" result (Lemma 3.5). Informally, the lemma states that every property P that is testable in the standard model has an encoding P &#8242; that is testable with the same query complexity even in the presence of an online-corruption adversary. This result allows us to transfer existing separations between the standard model and the offline-erasure model to a separation between the online-corruption model and the offline-erasure model.</p><p>To "lift" a property P, we simply encoded it with a repetition code, that is, repeat the corresponding input string.</p><p>&#9654; Definition 3.4 (r-concatenated string x r and property P r ). For all r &#8712; N and strings x, let x r denote the concatenation of r copies of x, written</p><p>Additionally, for a property P of strings, let P r denote the property {x r : x &#8712; P}.</p><p>Our lifting lemma holds for properties of strings over any alphabet. &#9654; Lemma 3.5 (Lifting lemma). Let &#931; be an alphabet and &#948; &#8712; (0, 1) be a sufficiently small constant. Let P &#8838; &#931; * be a property of strings that is &#949;-testable in the standard model using q(m, &#949;) queries on inputs of length m, where q(m, &#949;) = &#8486; 1 &#949; . Then, for all r &#8712; N and t &#8804; &#948;&#8226;r [q(m, &#949;</p><p>2 ) log q(m, &#949;</p><p>2 )] 2 , the property P r is t-online-corruption-resiliently &#949;-testable using O(q(m, &#949;</p><p>2 )) queries on inputs of length n = m &#8226; r.</p><p>Next we use Lemma 3.5 to prove Theorem 3.1, deferring the proof of Lemma 3.5 to Section 3.1. We leverage the following result of Ben-Eliezer, Fisher, Levi, and Rothblum <ref type="bibr">[5]</ref>, which separates the offline-erasure-resilient model from the standard model. &#9654; Theorem 3.6 ([5, Theorem 6.2]). For all constant &#8467; &#8712; N, there exist a property Q (&#8467;) &#8838; {0, 1} * and a constant &#949; 1 = &#949; 1 (&#8467;) &#8712; (0, 1) such that the following hold: 1. For every &#949; &#8712; (0, 1), the property</p><p>Proof of Theorem 3.1. Fix &#8467; &#8712; N and let m, r &#8712; N be sufficiently large. Let P denote the property Q (&#8467;) of strings of length m given by Theorem 3.6. By Theorem 3.6, the property P can be &#949;-tested using 2 &#949; O(&#8467;) queries. Thus, Lemma 3.5 guarantees that for all t = ( &#949; 2 ) O(&#8467;) &#8226; r, the property P r is t-online-corruption-resiliently &#949;-testable using 2 &#949; O(&#8467;) queries on inputs of length n = mr. E. Kelman, E. Linder, and S. Raskhodnikova</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>65:9</head><p>Now we prove that P r requires &#8486; n r polylog (&#8467;) (n/r) queries to &#949;-test in the &#945;-offlineerasure-resilient model. To do that, we show how to use any &#945;-offline-erasure-resilient &#949;-tester T r for P r to construct an &#945;-offline-erasure-resilient &#949;-tester T for P with the same query complexity as T r . Given a string x r , let x r [i] j denote index j of the i-th copy of x. Observe that for every &#945;-erased input x, the string x r is also &#945;-erased and the distance of x from P is the same as the distance of x r from P r ; moreover, for all i &#8712; [r] and j &#8712; [m], we have x r [i] j = x j . Thus, the tester T , given query access to x, can simulate T r executed with query access to x r and output the result given by T r . By Theorem 3.6, the tester T r has query complexity</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Proof of the lifting lemma (Lemma 3.5)</head><p>Recall that Lemma 3.5 states that if a property P is testable in the standard model, then the property P r is testable in the online-corruption model. Let T be an &#949;-tester for P that has failure probability 1  12 , and query complexity c 0 &#8226; q(m, &#949;) for some constant c 0 &gt; 0 (we can obtain such a tester via standard amplification techniques). We construct a tester T &#8242; for P r (Algorithm 1) and show that it is t-online-corruption-resilient. The tester T &#8242; consists of two phases: first, T &#8242; (s) calls repetition-test (Algorithm 2) to test that s is a repetition of some string, w, and second, T &#8242; (s) simulates T with query access to w.</p><p>For a string s of length n = r &#8226; m composed of r substrings each of length m, we use the notation s[i] j to denote index j, in the i-th substring of s.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 1 t-online-corruption-resilient &#949;-tester T &#8242; .</head><p>Parameters: length parameter m, repetition parameter r, proximity parameter &#949; &#8712; (0, 1) Input: query access to string s = s <ref type="bibr">[1]</ref> </p><p>Subroutines: repetition-test (Algorithm 2) and c 0 &#8226; q(m, &#949;)-query tester T for P</p><p>2 ) rejects then reject 3: simulate T with proximity parameter &#949; 2 , answering each query j made by T as follows: sample a set of</p><p>else provide the answer s[i 1 ] j to T 4: if the simulation of T rejects then reject 5: else accept Algorithm 2 repetition-test.</p><p>Parameters: length parameter m, repetition parameter r, proximity parameter &#949; &#8712; (0, 1) Input: query access to string s </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>65:10 Online Versus Offline Adversaries in Property Testing</head><p>&#9655; Claim 3.7. For all alphabets &#931; and parameters &#949; &#8712; (0, 1) and r, m &#8712; N, repetition-test is a one-sided error &#949;-tester for the repetition code defined as C m,r = {s r : s &#8712; &#931; m }. It makes O( <ref type="formula">1</ref>&#949; ) queries and has error probability at most 1 6 .</p><p>where</p><p>, be the input string over the alphabet &#931;. If s &#8712; C m,r , then repetition-test always accepts s. Suppose that string s is &#949;-far from C m,r . Let plurality i&#8712;[r] (a i ) denote a function that takes inputs a 1 , . . . , a r &#8712; &#931; and outputs the most frequent among them, resolving ties arbitrarily. Let &#373; be the string of length m defined by &#373;j = plurality i&#8712;[r] s[i] j for all j &#8712; [m]. Since s is &#949;-far from C m,r , we can bound the distance between the input string and &#373; repeated r times:</p><p>For all j &#8712; [m] and a &#8712; &#931;, let p j (a) denote Pr i&#8712; <ref type="bibr">[r]</ref> [s[i] j = a], the probability that a randomly chosen repetition of the j-th character in s is equal to a. The probability that one iteration of the loop in repetition-test accepts s is</p><p>Hence, each iteration of the loop in repetition-test rejects with probability at least &#949;. Therefore, repetition-test accepts s with probability at most (1 -&#949;)</p><p>. &#9665; Next, we analyze the tester T &#8242; .</p><p>&#9655; Claim 3.8 (T &#8242; is a tester in the standard model). For all &#949; &#8712; (0, 1),r &#8712; N, alphabets &#931;, and properties P &#8712; &#931; * , Algorithm 1 is an &#949;-tester for P r in the standard model (without any adversary). Moreover, it accepts &#949;-far inputs with probability at most 1  6 , and has one-sided error whenever T has one-sided error.</p><p>Proof. If the input s is in P r then s = w r for some string w &#8712; P. In this case, repetitiontest accepts with probability 1, and T &#8242; accepts with the same probability as T . Next, suppose s is &#949;-far from P r . Consider the string &#373; &#8712; &#931; m , where &#373;j = plurality i&#8712;[r] s[i] j for all j &#8712; [m]. Recall that the repetition code is defined as C m,r = {s r : s &#8712; &#931; m }. Observe that the distance from s to C m,r is equal to &#948; H (s, &#373;r ). If this distance is at least &#949; 2 then, by Claim 3.7, repetition-test accepts with probability at most 1  6 , completing the proof. Now assume &#948; H (s, &#373;r ) &lt; &#949; 2 . We will show that, in this case, the simulation of T in Algorithm 1 accepts with probability at most 1  6 . Specifically, we consider two failure events: let E 1 be the event that the simulation of T feeds T at least one query answer inconsistent with &#373;, and E 2 be the event that the simulation of T accepts string &#373;. We will show that Pr[E 1 ] &#8804; 1  12 and Pr[E 2 ] &#8804; 1 12 . Then a union bound over E 1 and E 2 completes the proof.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>65:11</head><p>Since s is &#949;-far from P r and &#948; H (s, &#373;r ) &lt; &#949; 2 , we get</p><p>implying that &#948; H ( &#373;, P) &#8805; &#949; 2 . Since T is a tester for P with amplified success probability, and &#373; is &#949; 2 -far from P, algorithm T accepts with probability at most 1  12 when run on input &#373; and with proximity parameter &#949; 2 ; that is,</p><p>and let a j denote the answer provided by T &#8242; to query j in the simulation. If T &#8242; does not reject while simulating this query, then</p><p>The inequality in (2) follows from the following simple observation: once s[i 1 ] j has been sampled, if it is not the plurality, then for each k &#8712; {2, . . . , d}, every subsequent s[i k ] j is equal to s[i 1 ] j with probability at most 1 2 . By our choice of c 1 , and a union bound over all the c 0 &#8226; q(m, &#949;/2) queries made by T , the probability of E 1 is at most 1  12 . Since T &#8242; can accept only if E 1 &#8746; E 2 occurs, a union bound over E 1 and E 2 implies that T &#8242; is indeed a tester for P r , and has error probability at most 1  6 when no adversary is present. &#9665; Finally, we prove the lifting lemma.</p><p>Proof of Lemma 3.5. First, we argue that the probability T &#8242; (Algorithm 1) queries a corrupted index is small. Recall that n = m &#8226; r is the length of the input to T &#8242; and that c 0 &#8226; q(m, &#949;) is the query complexity of T with proximity parameter &#949;.</p><p>)) be the number of queries made by T &#8242; . Then, there are at most q &#8242; t corruptions at any point during the execution. Moreover, each query made by T &#8242; is an index that is uniform over the set of corresponding indices in the r different segments of s. It follows that each query made by T &#8242; is corrupted with probability at most q &#8242; t r . By a union bound over the q &#8242; queries,</p><p>The upper bound follows from the hypothesis that t &#8804;</p><p>&#949; , and that &#948; is a sufficiently small constant. By a union bound, the probability that T &#8242; errs in the presence of the adversary is at most the probability T &#8242; errs when no adversary is present plus the probability T &#8242; queries a corrupted index. By Claim 3.8 and (3), this probability is at most 1  3 , which completes the proof of Lemma 3.5. &#9664;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Randomness complexity separation</head><p>In this section, we prove our result separating the randomness complexity of testing in the online and offline models. n &#8838; [n] n , and an algorithm T that takes &#949; &#8712; (0, 1) as an input and, for all &#949; &#8712; (0, 1), is a one-sided error &#949;-tester for P (&#964; ) that make O( &#964; &#949; ) queries. Additionally, the following hold: 1. For all &#949;, &#945; &#8712; (0, 1), tester T is an &#945;-offline-erasure-resilient &#949;-tester for P (&#964; ) . Moreover, T can be simulated using O(log n) random bits and no additional queries.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>2.</head><p>For all &#949; &#8712; (0, 1) and t &#8804; 0.01&#949;</p><p>, tester T is a t-online-erasure-resilient &#949;-tester for P (&#964; ) . 3. There exists a constant &#949; &gt; 0 such that for all t &#8712; N and &#964; &#8804; 0.01 &#8730; n log n , every t-onlineerasure-resilient &#949;-tester for P (&#964; ) uses &#8486; &#964; log(t+1) log &#964; random bits. Moreover, if the tester has one-sided error, then it uses &#8486;(&#964; log(t + 1)) random bits. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#9654; Corollary 4.2. There exists a property that can be &#949;-tested (for every constant &#949;) using O</head><p>&#8730; n log n queries in the presence of either an online or offline adversary. The offline-erasureresilient tester uses O(log n) random bits, but there exists a constant &#949; such that every 1-online-erasure-resilient &#949;-tester, requires &#8486; &#8730; n polylog n random bits to succeed with constant probability. Moreover, if the 1-online-erasure-resilient tester has one-sided error then it requires &#8486;( &#8730; n) random bits.</p><p>To prove our randomness lower bound, we present a general reduction from randomnessefficient testers in the online-erasure model to query-efficient testers in the standard model. &#9654; Lemma 4.3 (Generalization of Lemma 1.6). For all r, t &#8712; N and properties P, if P is &#949;-testable in the presence of a t-online-erasure adversary using only r bits of randomness then P is &#949;-testable in the standard model using at most r log(t+1) queries. Proof. Let T be a t-online-erasure-resilient &#949;-tester for P that uses at most r random bits. We construct an adversary that allows T to make at most r log(t+1) non-erased queries. Consider the following random seed elimination adversary A. Given an input x, the description of algorithm T , and query-answer history of T on input x, the adversary simulates the next query of T on every random seed s &#8712; {0, 1} r that is consistent with the query-answer history of T thus far and erases the t most queried indices of x. Intuitively, these are the indices that are most likely to be queried by the tester at this step, based on the random seeds that are consistent with the current query-answer history. Each index that the oracle decides not to erase at this step can appear in at most 1 t+1 fraction of currently relevant random seeds. If T queries such an index, all random seeds that would have lead to a different query can be eliminated. Thus, each time T makes a non-erased query, at most a 1 t+1 fraction of the relevant random seeds remain. Consequently, T can make at most r log(t+1) non-erased queries before A can exactly determine the random seed being used. Once A determines the random seed, it can exactly predict the queries of T and erase all of them.</p><p>Next, we use the adversary strategy A to construct an r log(t+1) -query tester for P. Let T * be defined as follows. Draw a random seed s * &#8712; {0, 1} r and simulate T with random seed s * . After making each query, T * simulates A with the query-answer history of T . If A erases the next query of T , then T * answers the query with &#8869; and continues the simulation (the algorithm T * need not make any queries in this case). Otherwise, if A does not erase the next query of T , then T * queries x, provides T with the answer, and continues the simulation. Since T makes at most r log(t+1) non-erased queries and successfully tests P, the algorithm T * makes at most r log(t+1) queries and also successfully tests P. &#9664;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">The &#964; -Distinct-Elements property</head><p>The property testing problem we use to prove Theorem 4.1 is a version of support size approximation. In support size approximation, one is given sample access to a distribution D over the domain [n] and asked to approximate |supp(D)| up to additive error &#949;. We study the analogous testing problem over strings: Given parameters &#964; &#8712; N and &#949; &#8712; (0, 1), and a string x of length n, we wish to &#949;-test whether |{x 1 , x 2 , . . . , x n }| &#8804; &#964; , that is, to determine whether x has at most &#964; distinct elements or x is &#949;-far from every x &#8242; (of length n) with at most &#964; distinct elements.</p><p>&#9654; Definition 4.4 (&#964; -Distinct-Elements). For all n &#8712; N and &#964; = &#964; (n), let P (&#964; ) n be the set of strings in [n] n with at most &#964; distinct symbols. The property &#964; -Distinct-Elements is defined as</p><p>The following tester for &#964; -Distinct-Elements appeared in <ref type="bibr">[17]</ref>. We include the analysis of its guarantees here for completeness. &#9655; Fact 4.5 (A tester for &#964; -Distinct-Elements). For all &#949; &#8712; (0, 1), there exists a one-sided error tester for P (&#964; ) that uses O( &#964; &#949; ) samples and fails with probability at most 1  10 .</p><p>Proof. We first make the following observation: if x is &#949;-far from P (&#964; ) , then every collection of &#964; distinct elements occupies at most a 1 -&#949; fraction of the indices in x. Suppose we sample uniformly random elements from x until we have seen &#964; + 1 distinct elements. Notice that while we have seen at most &#964; distinct elements, our next sample is a new distinct element with probability at least &#949; (the at most &#964; distinct elements we have seen can have probability mass at most 1 -&#949;). Let X i be the number of samples to get the i-th distinct element given we have seen i -1 distinct elements, and set X = &#964; +1 i=1 X i . Then E[X] &#8804; (&#964; + 1)/&#949;, and hence, by Markov's inequality, the probability we need more than 3(&#964; + 1)/&#949; samples is at most 1  3 . This analysis inspires the following simple tester: Sample s = 3(&#964; + 1)/&#949; elements from x and accept if and only if there are at most &#964; distinct symbols from [n] in the sample (not counting the erasure symbol &#8869;).</p><p>Repeating the tester constantly many times suffices to make the failure probability smaller than 1  10 . &#9665;</p><p>Recall that Lemma 4.3 states that to prove a lower bound on the randomness complexity of testing in the online model, it suffices to prove a lower bound on the query complexity of testing in the standard model. In Lemma 4.6, we show a lower bound on the query complexity of testing &#964; -Distinct-Elements. Our lower bound is a direct corollary of the lower bound of <ref type="bibr">[32]</ref>.</p><p>&#9654; Lemma 4.6 (Query lower bound for testing &#964; -Distinct-Elements). There exists &#949; &#8712; (0, 1) such that for all input lengths n, if &#964; &#8804; &#8730; n log n , then the query complexity of &#949;-testing P (&#964; ) is &#8486;( &#964; log &#964; ). Moreover, the query complexity of &#949;-testing P (&#964; ) with one-sided error is &#8486;(&#964; ).</p><p>Proof. We use the following fact to argue that we can assume the tester is sample-based with no loss of generality.</p><p>I T C S 2 0 2 5 65:14 Online Versus Offline Adversaries in Property Testing &#9655; Fact 4.7 (Theorem 6.1 <ref type="bibr">[16]</ref>). A property of strings is symmetric if it is closed under permutations of the string indices (that is, under reordering of the characters in the string).</p><p>Let P be a symmetric property of strings that is &#949;-testable with query complexity q. Then there exists a sample-based tester for P with sample complexity O(q).</p><p>Since P (&#964; ) is symmetric, we can without loss of generality consider sample-based testers. First, we prove the lower bound for two-sided error testers. The essence of our proof is a reduction from the hard instances used in <ref type="bibr">[32]</ref> for estimating the support size of a distribution. While we cannot use the lower bound of <ref type="bibr">[32]</ref> as a black box, we can nonetheless leverage their hard instances. Indeed, combining Theorem 1, Fact 5, and the remarks regarding the support size of their hard distributions (following Definition 12) from <ref type="bibr">[32]</ref>, we obtain the following immediate corollary.</p><p>&#9655; Fact 4.8 (Support size approximation lower bound <ref type="bibr">[32]</ref>). Let &#945; &gt; 0 be a sufficiently small constant.</p><p>There exist distributions D + and D -over [m] such that 1. Every element in the support of D + or D -has probability mass at least 1 m . 2. |supp(D + )| &#8804; m 1 2 + &#945; , and D -is 1 2 -2&#945; -far from every distribution with support size at most m 1 2 + &#945; . Moreover, every algorithm that successfully distinguishes D + from D -with constant probability requires &#8486; m log m samples.</p><p>While the distributions in <ref type="bibr">[32]</ref> are defined over R, they all have support size at most m. Thus, we can, without loss of generality, consider distributions over n log n from D. Thus, for sufficiently large n, there exist strings x + , x -&#8712; [m] n such that x + has at most m( 1 2 + &#945;) distinct symbols, and the distributions generated by sampling from x + and x -have total variation distance 1 &#8730; n log n from D + and D -, respectively. Let &#964; = m( 1 2 + &#945;) and &#949; = 1 2 -2&#945; -o(1), then x + &#8712; P (&#964; ) and x -is &#949;-far from P (&#964; ) . By Fact 4.8, every algorithm for distinguishing x + from x -uses &#8486; m log m = &#8486; &#964; log &#964; samples. By Fact 4.7, every tester for P (&#964; ) has query complexity &#8486; &#964; log &#964; . To prove the one-sided error lower bound, it suffices to note that every one-sided error algorithm must accept if its sample contains at most &#964; symbols. Thus, every one-sided error tester requires &#8486;(&#964; ) samples. This completes the proof of Lemma 4.6. &#9664;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Proof of the randomness separation (Theorem 4.1)</head><p>To complete the proof of the theorem, we argue that the tester given by Fact 4.5 is a valid tester for &#964; -Distinct-Elements in both the online and offline erasure models. To prove the lower bound on the randomness complexity of testing &#964; -Distinct-Elements in the online model, we combine the query lower bound of Lemma 4.6 with the reduction stated in Lemma 4.3. To prove the upper bound on the randomness complexity of testing &#964; -Distinct-Elements in the offline model, we argue that the offline tester can be simulated with few bits of randomness at a small cost in error probability. We first prove the part of the theorem regarding testing &#964; -Distinct-Elements in the offline erasure model.</p><p>Proof of Theorem 4.1, Item 1. First, for all &#964; &#8712; N, we construct an offline-erasure-resilient tester for &#964; -Distinct-Elements, and second, we argue that the tester can be simulated with O(log n) random bits and no additional queries. Let T be the tester given by Fact 4.5. Recall that T accepts if and only if the number of nonerased symbols in the sample is at most &#964; . Below, we argue that T is an &#945;-offline-erasure-resilient &#949;-tester.</p><p>Let x be an &#945;-erased string in [n] n . If some completion of x is in P (&#964; ) , then the number of nonerased symbols in the sample drawn by T is at most &#964; , so the algorithm accepts. Next we argue that T accepts with probability at most 1  4 when every completion of x is &#949;-far from P (&#964; ) . Let x &#8869; denote the erased portion of x, and x &#8868; denote the nonerased portion of x. Notice that |x &#8868; | = (1 -&#945;)n, and thus if x &#8868; is &#949; 1-&#945; -close to P (&#964; ) , then there is a completion of x that is &#949;-close to P (&#964; ) (change &#949;n symbols in x &#8868; and fill out x &#8869; with an arbitrary symbol from x &#8868; ). Thus, if every completion of x is &#949;-far from P (&#964; ) , then x &#8868; is &#949; 1-&#945; -far from P (&#964; ) . By the proof of Fact 4.5, a set of O &#964; (1-&#945;) &#949; uniform and independent samples from x &#8868; contains at least &#964; + 1 distinct symbols with probability at least 9 10 . Moreover, a sample of O &#964; &#949; elements from x contains &#8486; &#964; (1-&#945;) &#949; such samples from x &#8868; with probability at least 9 10 . By the union bound, T accepts x with probability at most 1 4 . It remains to show that T can be simulated by a tester T &#8242; that uses O(log n) random bits and has the same query complexity as T . Fact 4.9 states that any randomized oracle machine that solves a promise problem can be simulated using log n + log log |&#931;| + O(1) random bits, where |&#931;| is the size of the alphabet. This fact was originally proven by Goldreich and Sheffet <ref type="bibr">[18]</ref> and is stated as an exercise in <ref type="bibr">[14]</ref>. We use the statement from the exercise since it is more convenient for our setting.</p><p>&#9655; Fact 4.9 (Exercise 1.21 <ref type="bibr">[14]</ref>). Fix n &#8712; N and let &#928; be a promise problem regarding strings in &#931; n . Suppose that M is a randomized q-query oracle machine that solves &#928; with error probability at most 1  4 . Then there exists a randomized q-query oracle machine M &#8242; that solves &#928; with error probability at most 1  3 and log n + log log |&#931;| + O(1) random bits.</p><p>Let &#928; be the promise problem defined by &#945;-offline-erasure-resilient &#949;-testing P (&#964; ) . By the first part of the proof, there exists a randomized oracle machine T that solves &#928; with error probability at most 1  4 . Applying Fact 4.9 directly, we see that T can be simulated by a tester T &#8242; using log n + log log |&#931;| + O(1) random bits; since &#931; = [n], tester T &#8242; uses O(log n) random bits, and has error probability at most 1 3 . To complete the proof, it suffices to note that T &#8242; has the same query complexity as T . &#9664;</p><p>Next, we prove the part of the theorem regarding testing &#964; -Distinct-Elements in the online erasure model.</p><p>Proof of Theorem 4.1, Items 2 and 3. We will show that for all &#964; &#8712; N, the tester given by Fact 4.5 is online-erasure-resilient. Let T be the tester for &#964; -Distinct-Elements given by Fact 4.5. Recall that T accepts if and only if the number of nonerased symbols in its sample is at most &#964; . We show that T can test in the presence of a t-online-erasure-oracle, by arguing that with high constant probability, none of the queries made by T are erased. Notice that with proximity parameter &#949;, the tester makes O &#964; &#949; queries. Thus, there are</p><p>T C S 2 0 2 5 65:16 Online Versus Offline Adversaries in Property Testing O t&#8226;&#964; &#949; erasures at every point during the execution of T . Since T makes uniform and independent queries, the probability that any particular query is erased is O t&#8226;&#964; n&#949; . Since T makes O &#964; &#949; queries, we can apply the union bound to see that some query is erased with probability at most O t&#8226;&#964; 2 n&#949; 2 . By the hypothesis that t &#8804; .01&#949; &#8730; n &#964; 2 , we have O t&#8226;&#964; 2 n&#949; 2</p><p>&#8804; .01 -that is, T sees an erasure with probability at most .01. By Fact 4.5, the algorithm T is a t-online-erasure-resilient &#949;-tester for P (&#964; ) . Moreover, since an erasure cannot increase number of distinct nonerased symbols in x, tester T has one-sided error. This completes the proof of Item 2.</p><p>To see why Item 3 holds, recall that by Lemma 4.6, there exists &#949; &#8712; (0, 1) such that for all n, &#964; &#8712; N with &#964; &#8804;</p><p>&#8730; n log n , every &#949;-tester for P (&#964; ) has query complexity &#8486; &#964; log &#964; . Similarly every tester with one-sided error has query complexity &#8486;(&#964; ). Thus, applying Lemma 4.3, the reduction from query complexity to randomness complexity, suffices to complete the proof.</p><p>&#9664;</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>In contrast, in the offline models, testing is always possible when the entire input is read.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_1"><p>In this case, the tester in the offline model is deterministic. Note that it is impossible to deterministically test any nontrivial property in the online model, since the adversary can erase all but the first query made by a deterministic tester.</p></note>
		</body>
		</text>
</TEI>
