| {"paper_meta":{"paper_id":"arxiv:0708.2105","title":"0708.2105","authors":[],"year":null,"published":null,"updated":null,"venue_or_source":"arxiv-papers-shard","primary_category":"cs","secondary_categories":[],"doi":null,"license":"unknown","source_type":"pdf+shard","source_url":null,"pdf_url":null},"abstract":{"raw":"","cleaned":"","offsets":[]},"full_paper_text":{"raw_ordered_text":"arXiv:0708.2105v1 [cs.CC] 15 Aug 2007\ntesting.07.rev.tex\nAttribute Estimation and Testing Quasi-Symmetry\nKrzysztof Majewski\nkrzys@ifi.uio.no\nDepartment of Informatics\nUniversity of Oslo\nBoks 1072 Blindern\nNO-0316 Oslo, Norway\nNicholas Pippenger\nnjp@hmc.edu\nDepartment of Mathematics\nHarvey Mudd College\n1250 North Dartmouth Avenue\nClaremont, CA 91711 USA\nAbstract: A Boolean function is symmetric if it is invariant under all permutations of its arguments; it is\nquasi-symmetric if it is symmetric with respect to the arguments on which it actually depends. We present a\ntest that accepts every quasi-symmetric function and, except with an error probability at most δ > 0, rejects\nevery function that differs from every quasi-symmetric function on at least a fraction ε > 0 of the inputs. For\na function of n arguments, the test probes the function at O\n (n/ε) log(n/δ)\n \ninputs. Our quasi-symmetry\ntest acquires information concerning the arguments on which the function actually depends. To do this, it\nemploys a generalization of the property testing paradigm that we call attribute estimation. Like property\ntesting, attribute estimation uses random sampling to obtain results that have only “one-sided” errors and\nthat are close to accurate with high probability.\n\n1. Introduction\nSuppose that we are given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and that we wish\nto determine whether or not it is symmetric. (Such a function f is symmetric if it is invariant under all\nn! permutations of its arguments: f(x1, . . . , xn) = f(xπ(1), . . . , xπ(n)) for all (x1, . . . , xn) ∈{0, 1}n and all\nbijections π : {1, . . ., n} →{1, . . ., n}. Equivalently, f is symmetric if it is constant on sets of settings of\nits arguments that have equal Hamming weight: f(x) = f(y) if |x| = |y|, where the Hamming weight |x| of\nx ∈{0, 1}n is the number P\n1≤i≤n xi of 1s among x1, . . . , xn.) We seek to do this by querying the value of\nthe function at various points (settings of its argument values), and we endeavor to minimize the number of\nqueries that we make.\nIt is not hard to see that in the worst case, we may need to make 2n −2 queries. For if f is the “all\n0s” constant function, we are bound to find that it is symmetric, but we dare not announce this conclusion\nbefore querying all 2n −2 points other than “all 0s” (0, . . . , 0) ∈{0, 1}n and “all 1s” (1, . . . , 1) ∈{0, 1}n.\n(For if (x1, . . . , xn) is such a point not queried, then the function g that assumes the value 1 at and only at\nthe point (x1, . . . , xn) would be a non-symmetric function that assumes the same value as f at all queried\npoints.)\nThis situation may be summarized by saying that a “witness” for symmetry (a set of points at which the\nvalues of a function ensure its symmetry) must contain 2n −2 points. A witness for non-symmetry, however,\nmay consist of just two points, x and y, such that |x| = |y|, but for which f(x) ̸= f(y). This suggests that\nwe may test for symmetry more efficiently if we are willing to allow a small probability of a “false positive”\n(when we declare a function to be symmetric when in fact it is not).\nThis suggestion leads us to the paradigm of “property testing”. To introduce this notion to the current\ncontext, we shall need some definitions. If f and g are Boolean functions of n arguments, the distance\n∆(f, g) between them is the fraction of their truth-table entries on which they differ. This fraction may be\nwritten as ∆(f, g) = |f ⊕g|/2n, where f ⊕g denotes the “exclusive-or” or “sum modulo 2” of f and g, and\nthe Hamming weight |f| of a Boolean function f is the number P\nx∈{0,1}n f(x) of 1s in its truth-table. This\nis a proper metric on the set Bn of Boolean functions of n arguments (that is, it is non-negative, vanishes\nonly when the functions are equal, is symmetric and satisfies the triangle inequality). Furthermore, if we\nextend it by agreeing that functions of different numbers of arguments are at “infinite distance”, it remains\na metric, now defined on the set B = S\nn≥0 Bn of all Boolean functions. If F and G are sets of Boolean\nfunctions, we define ∆(f, G) = ming∈G ∆(f, g) and ∆(F, G) = minf∈F ∆(f, G). If ∆(f, G) ≥ε, we shall say\nthat f is ε-far from G.\nBy a test for some property of Boolean functions (reified as a set G of Boolean functions), we shall mean\na randomized algorithm that takes a Boolean function f and two parameters ε > 0 and δ > 0, queries the\nvalue of f at a finite sequence of points (where the number of queries, and choice of later points may depend\non the outcomes of earlier queries), and announces an answer yes or no, where (1) if f has the property in\nquestion (that is, f ∈G), then the algorithm answers yes, and (2) if f is ε-far from the set of functions with\nthe property in question (that is, ∆(f, G) ≥ε), then the algorithm answers no unless an event of probability\nat most δ has occurs. (Note that “probability” here refers to the randomization of the algorithm; the bound\nδ applies uniformly to all f that are ε-far from G.)\nProperty testing, in the sense used here, was introduced by Rubinfeld and Sudan [R] and further\ndeveloped by Goldreich, Goldwasser and Ron [G3]. The definition has many variants and has been applied\n1\n\nto properties of many types of objects. A central example involving Boolean functions is testing monotonicity\n(see Goldreich, Goldwasser, Lehman and Ron (and, in the later version, Samorodnitsky) [G1, G2]).\nIn Section 2, we shall give a test for symmetry that makes at most O\n (1/ε) log(1/δ)\n \nqueries. Although\nthe test is randomized, this bound on the number of queries is uniform (not merely a bound on expectation,\nnor merely one that holds with high probability), and it is independent of the number of arguments. When\nthe algorithm returns no, it also provides a witness to the non-symmetry of f. (Of course, when yes is\nreturned, it may be a false positive, and in any case a witness to symmetry would be too large establish\nwithin the stated number of queries.)\nWe shall say that a Boolean function f : {0, 1}n →{0, 1} of n arguments is quasi-symmetric if it is a\nsymmetric function of those of its arguments that it actually depends on. (We say that f depends on its i-th\nargument if there are Boolean values x1, . . . , xi−1, xi+1, . . . , xn such that f(x1, . . . , xi−1, 0, xi+1, . . . , xn) ̸=\nf(x1, . . . , xi−1, 1, xi+1, . . . , xn).)\nIn Section 4, we shall give a test for quasi-symmetry that makes at most O\n (n/ε) log(n/δ)\n \nqueries.\nIn this case, the number of queries depends on the number of n of arguments as well as on ε and δ. This\nhappens because the test begins by attempting to determine the set J (f) ⊆{1, . . . , n} of arguments on\nwhich the function f actually depends, and this set could be as large as the full set of n arguments.\nUpon considering the subproblem of determining the set J (f) from the function f, we see that it\npresents many of the same characteristics as testing for symmetry: a witness for the fact that f depends on\nits i-th arguments can comprise just two points (as exemplified in the definition), but a witness for the fact\nthat f does not depend on some particular argument cannot be smaller than all 2n points. Thus, instead\nof determining J (f) exactly, we shall introduce a notion of “estimating” such an attribute that is exactly\nanalogous to the notion of “testing” a property.\nA function D : B →C defined on the set of all Boolean functions, and taking values in a partially ordered\nset C, will be called an attribute of Boolean functions. An estimate for the attribute D is a randomized\nalgorithm that takes a Boolean function f and two parameters ε > 0 and δ > 0, queries the value of f\nat a finite sequence of points (where the number of queries, and choice of later points may depend on the\noutcomes of earlier queries), and announces an output D ∈C, where (1) D(f) ≥D, and (2) f is ε-far from\nthe set D−1(D) of functions for which D takes on the value D only if an event of probability at most δ\noccurs. If we take C = {yes, no} with yes < no, then estimating such an attribute reduces to testing the\ncorresponding property D−1(yes).\nIn Section 3 we shall give an estimate for the set J (f) of arguments that f depends on (with\nthe codomain, the power set of {1, . . . , n}, ordered in the usual way by inclusion) that makes at most\nO\n (n/ε) log(n/δ)\n \nqueries. The algorithm will also provide a witness for the fact that the value it returns is\na lower bound for J (f). This estimate will be used in Section 4 as the basis for our quasi-symmetry test,\nand the witness that it provides will be used to construct a witness for non-quasi-symmetry when that is\ndetected.\nThe problem of testing whether a Boolean function depend on a small subset of arguments has been\nattacked by Parnas, Ron and Samordnitsky [P1, P2], and later by Fischer, Kindler, Ron, Safra and Samorod-\nnitsky [F]. Their work, however, lies entirely within the framework of property testing: their algorithms test\nwhether the cardinality #J (f) is at most k (k a constant), without giving further information about the\nset J (f) (and they do this with a number of queries that is independent of n). Our quasi-symmetry test,\n2\n\nhowever, requires more information about J (f) than merely its cardinality, and this requirement led us to\nour formulation of the notion of attribute estimation.\nDespite its naturalness and its analogy to property testing, attribute estimation does not appear to have\nbeen described in the previous literature. We hope, however, that it will find other applications, and indeed\nthat the notion of attribute estimation, both as used here and as extended to other domains such as graphs,\nwill prove a fruitful contribution to the theory of statistical algorithms.\n2. Testing Symmetry\nIn this section, we shall present our symmetry test and analyze its performance. We shall begin by\ndescribing what we shall call a “basic step” of the algorithm.\nSymmetry Test—Basic Step: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, return yes\nif 0 ≤n ≤1. (1) Choose point x = (x1, . . . , xn) at random, with all 2n −2 points other than (0, . . . , 0)\nand (1, . . . , 1) being equally likely. (2) Choose point y = (y1, . . . , yn) at random, with all\n n\n|x|\n \n−1 points\nother than x, but having the same Hamming weight as x, being equally likely.\n(Since n ≥2 and x ̸∈\n{(0, . . . , 0), (1, . . . , 1)}, there is at least one possible choice for y.) (3) Query f(x) and f(y). If f(x) = f(y),\nthen return yes, else return no.\nClearly, if f is symmetric, then this procedure returns yes. Let S denote the set of all symmetric Boolean\nfunctions. We shall see that if f is not symmetric, then the procedure returns no with probability at least\n∆(f, S). To see this, let A ⊆{0, 1}n be a set of points of minimum cardinality such that complementing\nthe value of f at just those points in A yields a symmetric function. This minimum cardinality is #A =\n∆(f, S) 2n.\nFor any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that |y| = |x| but\nf(y) ̸= f(x). The probability that the basic step chooses x ∈A is ∆(f, S) 2n/(2n −2) ≥∆(f, S). Given\nthat x ∈A, the probability that the basic step chooses y ∈Bx is at least 1\n2\n n\n|x|\n \n/\n n\n|x|\n \n−1\n \n≥1\n2 (since if\n#Bx were less than 1\n2\n n\n|x|\n \n, we could replace the points of A having Hamming weight |x| by those of Bx,\nreducing the cardinality of A and contradicting the definition of A). The procedure returns no if x ∈A\nand y ∈Bx, which occurs with probability at least 1\n2∆(f, S), and also if y ∈A and x ∈By, which occurs\ndisjointly with a probability that is also at least 1\n2∆(f, S) (since the joint distribution of x and y is invariant\nunder the exchange of x and y). This completes the proof that the basic step returns no with probability at\nleast ∆(f, S).\nNow we present our complete symmetry test.\nSymmetry Test: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers 0 < ε < 1\nand 0 < δ < 1, if 0 ≤n ≤1, then return yes. (1) Otherwise compute\nk =\n 1\nε log 1\nδ\n \n.\n(2) Perform the basic step until it returns no, or until it has returned yes k times. (3) If any performance\nof the basic step returned no, then return no; if all k performances returned yes, then return yes.\nClearly, if f is symmetric, then this procedure returns yes. We shall see that if f is ε-far from the\nsymmetric functions, then the procedure returns no with probability at least 1 −δ.\nIf f is ε-far from\nthe symmetric functions, then each performance of the basic step returns yes with probability at most\n1 −∆(f, S) ≤1 −ε. The symmetry test returns yes only if k performances of the basic step return yes,\n3\n\nand this occurs with probability at most (1 −ε)k ≤e−εk ≤δ (where we have used the inequality 1 + x ≤ex\nand the definition of k). This completes the proof that, if if f is ε-far from the symmetric functions, then\nthe procedure returns no with probability at least 1 −δ.\nWe now have the following theorem.\nTheorem 2.1: There is a test for symmetry that makes at most O\n (1/ε) log(1/δ)\n \nqueries.\nProof: The number of queries made is at most\n2k = O\n 1\nε log 1\nδ\n \n.\n⊓⊔\nWe conclude this section by observing that when the basic step returns no, the two points it has queried\nwitness the non-symmetry of the function, and when the complete symmetry test returns no, such a witness\nis provided by the final performance of the basic step.\n3. Estimating Dependence\nIn this section we shall present an estimate, as defined in the introduction, for the set J (f) of arguments\nthat f depends on. We begin by describing a constancy test analogous to the symmetry test presented in\nthe preceding section.\nConstancy Test—Basic Step: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, return yes\nif n = 0. (1) Choose point x = (x1, . . . , xn) at random, with all 2n points being equally likely. (2) Choose\npoint y = (y1, . . . , yn) at random, with all 2n −1 points other than x being equally likely. (3) Query f(x)\nand f(y). If f(x) = f(y), then return yes, else return no.\nClearly, if f is constant, then this procedure returns yes. Let C denote the set of all constant Boolean\nfunctions. We shall see that if f is not constant, then the procedure returns no with probability at least\n∆(f, C). To see this, let A ⊆{0, 1}n be a set of points of minimum cardinality such that complementing the\nvalue of f at just those points in A yields a constant function. This minimum cardinality is #A = ∆(f, C) 2n.\nFor any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that f(y) ̸= f(x). The probability\nthat the basic step chooses x ∈A is ∆(f, C). Given that x ∈A, the probability that the basic step chooses\ny ∈Bx is at least 2n−1/(2n −1) ≥1\n2 (since if #Bx were less than 2n−1, we could replace the points of A\nby those of Bx, reducing the cardinality of A and contradicting the definition of A). The procedure returns\nno if x ∈A and y ∈Bx, which occurs with probability at least 1\n2∆(f, C), and also if y ∈A and x ∈By,\nwhich occurs disjointly with a probability that is at least 1\n2∆(f, C) (since the joint distribution of x and y\nis invariant under the exchange of x and y). This completes the proof that the basic step returns no with\nprobability at least ∆(f, C).\nNow we present our complete constancy test.\nConstancy Test: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers 0 < ε < 1\nand 0 < δ < 1, if n = 0, then return yes. (1) Otherwise compute\nk =\n 1\nε log 1\nδ\n \n.\n(2) Perform the basic step until it returns no, or until it has returned yes k times. (3) If any performance\nof the basic step returned no, then return no; if all k performances returned yes, then return yes.\n4\n\nClearly, if f is constant, then this procedure returns yes. We shall see that if f is ε-far from the constant\nfunctions, then the procedure returns no with probability at least 1 −δ. If f is ε-far from the constant\nfunctions, then each performance of the basic step returns yes with probability at most 1 −∆(f, C) ≤1 −ε.\nThe complete test returns yes only if k performances of the basic step return yes, and this occurs with\nprobability at most (1 −ε)k ≤e−εk ≤δ (where we have used the inequality 1 + x ≤ex and the definition of\nk). This completes the proof that, if if f is ε-far from the constant functions, then the procedure returns no\nwith probability at least 1 −δ.\nWe now have the following lemma.\nLemma 3.1: There is a test for constancy that makes at most O\n (1/ε) log(1/δ)\n \nqueries.\nProof: The number of queries made is at most\n2k = O\n 1\nε log 1\nδ\n \n.\n⊓⊔\nWe observe that when the basic step returns no, the two points it has queried witness the non-constancy\nof the function, and when the complete constancy test returns no, such a witness is provided by the final\nperformance of the basic step.\nThe next component we shall need is a procedure that takes a pair of points that witness the non-\nconstancy of a function and returns a particular argument on which the function depends. We shall call this\noperation a “dependency search”.\nDependency Search: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and a pair of points\nx, y ∈{0, 1}n such that f(x) ̸= f(y), set x′ := x and y′ := y. (1) If |x′ ⊕y′| = 1, then return the unique\ni ∈{1, . . . , n} such that x′\ni ̸= y′\ni. (2) Otherwise, let z ∈{0, 1}n be such that |x′ ⊕z| and |y′ ⊕z| are each at\nmost ⌈|x′ ⊕y′|/2⌉(so that z is about half-way between x′ and y′). (3) Query f(z). If f(x′) ̸= f(z), then set\ny′ := z, else set x′ := z. (4) Go back to step (1).\nLemma 3.2: There is a procedure for dependency search that makes O(log n) queries.\nProof: In the procedure given above, the quantity |x′ ⊕y′| is initially at most n. The procedure reduces this\nquantity by multiplying it by a factor at most 2/3 whenever it makes a query, and stops when this quantity\nreaches 1. Thus it makes at most log3/2 n queries. ⊓⊔\nWe observe that the final values of x′ and y in this dependency search provide a witness that f actually\ndepends on the i-th argument.\nWe now present our complete dependency estimate.\nDependency Estimate: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers\n0 < ε < 1 and 0 < δ < 1, let δ′ = δ/n and set J′ := ∅. (1) Set xJ′ = {xj : j ∈J′} to random Boolean values,\nwith all 2#J′ assignments being equally likely, and let f ′ : {0, 1}n−#J′ →{0, 1} be the Boolean function\nobtained from f by substituting the values xJ′ for the arguments in J′. (2) Perform a constancy test on the\nfunction f ′ with parameters ε and δ′. (3) If this test returns yes, then return J′. (4) Otherwise, perform a\ndependency search on the witness returned by the constancy test, and adjoin the argument j returned by\nthe dependency search to J′: J′ := J′ ∪{j}. (5) Go back to step (1).\nIf J denotes the set returned by this procedure, it is clear that J ⊆J (f). Indeed, this fact is witnessed\nby the set of pairs of points x′, y′ that terminate the dependency searches that found the arguments in J.\n5\n\nLet BJ be the set of Boolean functions that actually depend only on the arguments in J. We shall show\nthat that if f is ε-far from any function in BJ, then an event of probability at most δ has occurred. If f\nis ε-far from any function in BJ, we have ∆\n f, BJ\n \n≥ε. For each performance of the constancy test, we\nhave J′ ⊆J; this implies ∆\n f, BJ′ \n≥∆\n f, BJ\n \n, and thus we have ∆\n f, BJ\n \n≥ε. One of these at most n\nconstancy tests must return yes, and each test returns yes with probability at most δ′ = δ/n. Thus the\nprobability that any of these tests returns yes is at most nδ′ = δ. Finally, the number of queries made is at\nmost\nn\n \nO\n 1\nε log 1\nδ′\n \n+ O(log n)\n \n= n\n \nO\n 1\nε log n\nδ\n \n+ O(log n)\n \n= O\n n\nε log n\nδ\n \n.\nWe now have the following theorem.\nTheorem 3.3: There is an estimate for the dependency set that makes at most O\n (n/ε) log(n/δ)\n \nqueries.\n4. Testing Quasi-Symmetry\nIn this section, we present our quasi-symmetry test. Again we begin by describing a basic step.\nQuasi-Symmetry Test—Basic Step: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, a real\nnumber 0 < ε < 1, and a set J of arguments, set I = {1, . . . , n} \\ J. (1) Set xI = {xi : i ∈I} to random\nBoolean values, with all 2#I assignments being equally likely, and let f ′ : {0, 1}#J →{0, 1} be the Boolean\nfunction obtained from f by substituting the values xI for the arguments in I. (2) Perform a symmetry test\non f ′, with parameters ε and 1/2, and return the value returned by this symmetry test as the value of the\nbasic step.\nSuppose that the basic step is performed on a function f that actually depends on all the arguments\nin J. If f is quasi-symmetric, then because f actually depends on all the arguments in J and f ′ depends\nonly on these arguments, f ′ is symmetric and the basic step will return yes. Let g ∈BJ be a function that\nminimizes ∆(f, g). This minimum distance is ∆(f, g) = ∆(f, BJ). Now suppose further that ∆(f, g) ≤ε.\nThen we shall show that if f is 4ε-far from the set Q of quasi-symmetric functions, the basic step returns\nno with probability at least 1/4. By the triangle inequality we have ∆(f, g) + ∆(g, Q) ≥∆(f, Q) ≥4ε,\nand thus ∆(g, Q) ≥3ε. Let g′ be obtained from g by substituting the random values xI for the arguments\nin I. Of course g′ is independent of these random values, since g does not depend on the arguments in\nI. Furthermore, ∆(g′, S) ≥∆(g′, Q) ≥∆(g, Q) ≥3ε, since S ⊆Q and g does not depend on any of its\narguments that are not arguments of g′. On the other hand, ∆(g′, f ′) is a random variable, since f ′ may\ndepend on the random values xI.\nThe expected value of ∆(g′, f ′) is clearly ∆(g, f) = ∆(f, g) ≤ε, so\nwith probability at least 1/2 we have ∆(f ′, g′) ≤2ε, by Markov’s inequality. When this happens, we have\n∆(g′, f ′) + ∆(f ′, S) ≥∆(g′, S) ≥3ε, again by the triangle inequality, and thus ∆(f ′, S) ≥ε. This condition\nensures that the symmetry test returns no with probability at least 1/2. This completes the proof that when\nf is 4ε-far from the set Q of quasi-symmetric functions, then the basic step returns no with probability at\nleast 1/4.\nQuasi-Symmetry Test: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers\n0 < ε < 1 and 0 < δ < 1, let ε′ = ε/4 and δ′ = δ/2, and compute\nk =\n \nlog4/3\n1\nδ′\n \n.\n6\n\n(1) Perform a dependency estimate on f, with parameters ε′ and δ′, and let J be the value returned by\nthat procedure. (2) Perform the basic step with parameters f, ε′, and J, until it returns no, or until it\nhas returned yes k times. (3) If any performance of the basic step returned no, then return no; if all k\nperformances returned yes, then return yes.\nSuppose first that f is quasi-symmetric. The function f actually depends on all the arguments in the\nset J found in step (1). Thus each performance of the basic step returns yes, and so the quasi-symmetry test\nreturns yes after k such performances. Suppose on the other hand that f is ε-far from any quasi-symmetric\nfunction. Then, except with probability at most δ′, ∆\n f, BJ\n \n≤ε′ for the set J found by step (1). Thus\neach performance of the basic step returns no with probability at least 1/4, and therefore returns yes with\nprobability at most 3/4. The probability that all k performances of the basic step return yes is thus at\nmost (3/4)k ≤δ′. Thus if f is ε-far from the quasi-symmetric functions, the quasi-symmetry test returns no\nunless an event of probability at most δ′ + δ′ = δ occurs.\nFinally, the number of queries made is at most\nO\n n\nε′ log n\nδ′\n \n+ O\n 1\nε′ log 1\nδ′\n \n= O\n 4n\nε log 2n\nδ\n \n+ O\n 4\nε log 2\nδ\n \n= O\n n\nε log n\nδ\n \n.\nWe now have the following theorem.\nTheorem 4.3: There is a test for quasi-symmetry that makes at most O\n (n/ε) log(n/δ)\n \nqueries.\nWe observe that when the quasi-symmetry test returns no, a witness to the non-quasi-symmetry of f\ncan be obtained from the witnesses provided by the dependency estimate and the final performance of the\nsymmetry test.\n5. Acknowledgments\nPreliminary versions of the results presented here appeared in the first author’s thesis, and were sup-\nported by a Canada Research Chair and a Discovery Grant to the second author from the National Science\nand Engineering Research Council of Canada. Subsequent work was supported by Grant CCF 043056 to the\nsecond author by the National Science Foundation of the United States.\n6. References\n[F] E. Fischer, G. Kindler, D. Ron, S. Safra and A. Samoridnitsky, “Testing Juntas”, Proc. IEEE Symp.\non Foundations of Computer Science, 43 (2002) 103–112.\n[G1] O. Goldreich, S. Goldwasser, E. Lehman and D. Ron, “Testing Monotonicity”, Proc. IEEE Symp. on\nFoundations of Computer Science, 39 (1998) 426–435.\n[G2] O. Goldreich, S. Goldwasser, E. Lehman, D. Ron and A. Samoridnitsky, “Testing Monotonicity”, Com-\nbinatorica, 20 (2000) 301–337.\n[G3] O. Goldreich, S. Goldwasser and D. Ron, “Property Testing and Its Connection to Learning and Ap-\nproximation”, J. ACM, 45 (1998) 653–750.\n[M] K. Majewski, Probabilistic Testing of Boolean Functions, M. Sc.\nThesis, Department of Computer\nScience, University of British Columbia, 2003.\n7\n\n[P1] M. Parnas, D. Ron and A. Samoridnitsky,\n“Proclaiming Dictators and Juntas or Testing Boolean\nFormulae”,\nin: M. Goemans, K. Jansen, J. D. P. Rolim and L. Treviasan (Ed’s),\nApproximation,\nRandomization, and Combinatorial Optimization, Lecture Notes in Computer Science, v. 2129, Springer-\nVerlag, Berlin, 2001, pp. 273–284.\n[P2] M. Parnas, D. Ron and A. Samoridnitsky, “Proclaiming Dictators and Juntas or Testing Boolean For-\nmulae”, Electronic Colloq. on Computational Complexity, http://eccc.uni-trier.de/eccc/, 2001,\nno. 63, 31 pp..\n[P3] M. Parnas, D. Ron and A. Samoridnitsky, “Testing Basic Boolean Formulae”, Electronic Colloq. on\nComputational Complexity, http://eccc.uni-trier.de/eccc/, 2001, no. 63, rev. 1, 29 pp..\n[R] R. Rubinfeld and M. Sudan, “Robust Characterizations of Polynomials with Applications to Program\nTesting”, SIAM J. Computing, 25:2 (1996) 252-271.\n8","paragraphs":[{"paragraph_id":"p1","order":1,"text":"arXiv:0708.2105v1 [cs.CC] 15 Aug 2007\ntesting.07.rev.tex\nAttribute Estimation and Testing Quasi-Symmetry\nKrzysztof Majewski\nkrzys@ifi.uio.no\nDepartment of Informatics\nUniversity of Oslo\nBoks 1072 Blindern\nNO-0316 Oslo, Norway\nNicholas Pippenger\nnjp@hmc.edu\nDepartment of Mathematics\nHarvey Mudd College\n1250 North Dartmouth Avenue\nClaremont, CA 91711 USA\nAbstract: A Boolean function is symmetric if it is invariant under all permutations of its arguments; it is\nquasi-symmetric if it is symmetric with respect to the arguments on which it actually depends. We present a\ntest that accepts every quasi-symmetric function and, except with an error probability at most δ > 0, rejects\nevery function that differs from every quasi-symmetric function on at least a fraction ε > 0 of the inputs. For\na function of n arguments, the test probes the function at O\n (n/ε) log(n/δ)"},{"paragraph_id":"p2","order":2,"text":"inputs. Our quasi-symmetry\ntest acquires information concerning the arguments on which the function actually depends. To do this, it\nemploys a generalization of the property testing paradigm that we call attribute estimation. Like property\ntesting, attribute estimation uses random sampling to obtain results that have only “one-sided” errors and\nthat are close to accurate with high probability."},{"paragraph_id":"p3","order":3,"text":"1. Introduction\nSuppose that we are given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and that we wish\nto determine whether or not it is symmetric. (Such a function f is symmetric if it is invariant under all\nn! permutations of its arguments: f(x1, . . . , xn) = f(xπ(1), . . . , xπ(n)) for all (x1, . . . , xn) ∈{0, 1}n and all\nbijections π : {1, . . ., n} →{1, . . ., n}. Equivalently, f is symmetric if it is constant on sets of settings of\nits arguments that have equal Hamming weight: f(x) = f(y) if |x| = |y|, where the Hamming weight |x| of\nx ∈{0, 1}n is the number P\n1≤i≤n xi of 1s among x1, . . . , xn.) We seek to do this by querying the value of\nthe function at various points (settings of its argument values), and we endeavor to minimize the number of\nqueries that we make.\nIt is not hard to see that in the worst case, we may need to make 2n −2 queries. For if f is the “all\n0s” constant function, we are bound to find that it is symmetric, but we dare not announce this conclusion\nbefore querying all 2n −2 points other than “all 0s” (0, . . . , 0) ∈{0, 1}n and “all 1s” (1, . . . , 1) ∈{0, 1}n.\n(For if (x1, . . . , xn) is such a point not queried, then the function g that assumes the value 1 at and only at\nthe point (x1, . . . , xn) would be a non-symmetric function that assumes the same value as f at all queried\npoints.)\nThis situation may be summarized by saying that a “witness” for symmetry (a set of points at which the\nvalues of a function ensure its symmetry) must contain 2n −2 points. A witness for non-symmetry, however,\nmay consist of just two points, x and y, such that |x| = |y|, but for which f(x) ̸= f(y). This suggests that\nwe may test for symmetry more efficiently if we are willing to allow a small probability of a “false positive”\n(when we declare a function to be symmetric when in fact it is not).\nThis suggestion leads us to the paradigm of “property testing”. To introduce this notion to the current\ncontext, we shall need some definitions. If f and g are Boolean functions of n arguments, the distance\n∆(f, g) between them is the fraction of their truth-table entries on which they differ. This fraction may be\nwritten as ∆(f, g) = |f ⊕g|/2n, where f ⊕g denotes the “exclusive-or” or “sum modulo 2” of f and g, and\nthe Hamming weight |f| of a Boolean function f is the number P\nx∈{0,1}n f(x) of 1s in its truth-table. This\nis a proper metric on the set Bn of Boolean functions of n arguments (that is, it is non-negative, vanishes\nonly when the functions are equal, is symmetric and satisfies the triangle inequality). Furthermore, if we\nextend it by agreeing that functions of different numbers of arguments are at “infinite distance”, it remains\na metric, now defined on the set B = S\nn≥0 Bn of all Boolean functions. If F and G are sets of Boolean\nfunctions, we define ∆(f, G) = ming∈G ∆(f, g) and ∆(F, G) = minf∈F ∆(f, G). If ∆(f, G) ≥ε, we shall say\nthat f is ε-far from G.\nBy a test for some property of Boolean functions (reified as a set G of Boolean functions), we shall mean\na randomized algorithm that takes a Boolean function f and two parameters ε > 0 and δ > 0, queries the\nvalue of f at a finite sequence of points (where the number of queries, and choice of later points may depend\non the outcomes of earlier queries), and announces an answer yes or no, where (1) if f has the property in\nquestion (that is, f ∈G), then the algorithm answers yes, and (2) if f is ε-far from the set of functions with\nthe property in question (that is, ∆(f, G) ≥ε), then the algorithm answers no unless an event of probability\nat most δ has occurs. (Note that “probability” here refers to the randomization of the algorithm; the bound\nδ applies uniformly to all f that are ε-far from G.)\nProperty testing, in the sense used here, was introduced by Rubinfeld and Sudan [R] and further\ndeveloped by Goldreich, Goldwasser and Ron [G3]. The definition has many variants and has been applied\n1"},{"paragraph_id":"p4","order":4,"text":"to properties of many types of objects. A central example involving Boolean functions is testing monotonicity\n(see Goldreich, Goldwasser, Lehman and Ron (and, in the later version, Samorodnitsky) [G1, G2]).\nIn Section 2, we shall give a test for symmetry that makes at most O\n (1/ε) log(1/δ)"},{"paragraph_id":"p5","order":5,"text":"queries. Although\nthe test is randomized, this bound on the number of queries is uniform (not merely a bound on expectation,\nnor merely one that holds with high probability), and it is independent of the number of arguments. When\nthe algorithm returns no, it also provides a witness to the non-symmetry of f. (Of course, when yes is\nreturned, it may be a false positive, and in any case a witness to symmetry would be too large establish\nwithin the stated number of queries.)\nWe shall say that a Boolean function f : {0, 1}n →{0, 1} of n arguments is quasi-symmetric if it is a\nsymmetric function of those of its arguments that it actually depends on. (We say that f depends on its i-th\nargument if there are Boolean values x1, . . . , xi−1, xi+1, . . . , xn such that f(x1, . . . , xi−1, 0, xi+1, . . . , xn) ̸=\nf(x1, . . . , xi−1, 1, xi+1, . . . , xn).)\nIn Section 4, we shall give a test for quasi-symmetry that makes at most O\n (n/ε) log(n/δ)"},{"paragraph_id":"p6","order":6,"text":"queries.\nIn this case, the number of queries depends on the number of n of arguments as well as on ε and δ. This\nhappens because the test begins by attempting to determine the set J (f) ⊆{1, . . . , n} of arguments on\nwhich the function f actually depends, and this set could be as large as the full set of n arguments.\nUpon considering the subproblem of determining the set J (f) from the function f, we see that it\npresents many of the same characteristics as testing for symmetry: a witness for the fact that f depends on\nits i-th arguments can comprise just two points (as exemplified in the definition), but a witness for the fact\nthat f does not depend on some particular argument cannot be smaller than all 2n points. Thus, instead\nof determining J (f) exactly, we shall introduce a notion of “estimating” such an attribute that is exactly\nanalogous to the notion of “testing” a property.\nA function D : B →C defined on the set of all Boolean functions, and taking values in a partially ordered\nset C, will be called an attribute of Boolean functions. An estimate for the attribute D is a randomized\nalgorithm that takes a Boolean function f and two parameters ε > 0 and δ > 0, queries the value of f\nat a finite sequence of points (where the number of queries, and choice of later points may depend on the\noutcomes of earlier queries), and announces an output D ∈C, where (1) D(f) ≥D, and (2) f is ε-far from\nthe set D−1(D) of functions for which D takes on the value D only if an event of probability at most δ\noccurs. If we take C = {yes, no} with yes < no, then estimating such an attribute reduces to testing the\ncorresponding property D−1(yes).\nIn Section 3 we shall give an estimate for the set J (f) of arguments that f depends on (with\nthe codomain, the power set of {1, . . . , n}, ordered in the usual way by inclusion) that makes at most\nO\n (n/ε) log(n/δ)"},{"paragraph_id":"p7","order":7,"text":"queries. The algorithm will also provide a witness for the fact that the value it returns is\na lower bound for J (f). This estimate will be used in Section 4 as the basis for our quasi-symmetry test,\nand the witness that it provides will be used to construct a witness for non-quasi-symmetry when that is\ndetected.\nThe problem of testing whether a Boolean function depend on a small subset of arguments has been\nattacked by Parnas, Ron and Samordnitsky [P1, P2], and later by Fischer, Kindler, Ron, Safra and Samorod-\nnitsky [F]. Their work, however, lies entirely within the framework of property testing: their algorithms test\nwhether the cardinality #J (f) is at most k (k a constant), without giving further information about the\nset J (f) (and they do this with a number of queries that is independent of n). Our quasi-symmetry test,\n2"},{"paragraph_id":"p8","order":8,"text":"however, requires more information about J (f) than merely its cardinality, and this requirement led us to\nour formulation of the notion of attribute estimation.\nDespite its naturalness and its analogy to property testing, attribute estimation does not appear to have\nbeen described in the previous literature. We hope, however, that it will find other applications, and indeed\nthat the notion of attribute estimation, both as used here and as extended to other domains such as graphs,\nwill prove a fruitful contribution to the theory of statistical algorithms.\n2. Testing Symmetry\nIn this section, we shall present our symmetry test and analyze its performance. We shall begin by\ndescribing what we shall call a “basic step” of the algorithm.\nSymmetry Test—Basic Step: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, return yes\nif 0 ≤n ≤1. (1) Choose point x = (x1, . . . , xn) at random, with all 2n −2 points other than (0, . . . , 0)\nand (1, . . . , 1) being equally likely. (2) Choose point y = (y1, . . . , yn) at random, with all\n n\n|x|"},{"paragraph_id":"p9","order":9,"text":"−1 points\nother than x, but having the same Hamming weight as x, being equally likely.\n(Since n ≥2 and x ̸∈\n{(0, . . . , 0), (1, . . . , 1)}, there is at least one possible choice for y.) (3) Query f(x) and f(y). If f(x) = f(y),\nthen return yes, else return no.\nClearly, if f is symmetric, then this procedure returns yes. Let S denote the set of all symmetric Boolean\nfunctions. We shall see that if f is not symmetric, then the procedure returns no with probability at least\n∆(f, S). To see this, let A ⊆{0, 1}n be a set of points of minimum cardinality such that complementing\nthe value of f at just those points in A yields a symmetric function. This minimum cardinality is #A =\n∆(f, S) 2n.\nFor any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that |y| = |x| but\nf(y) ̸= f(x). The probability that the basic step chooses x ∈A is ∆(f, S) 2n/(2n −2) ≥∆(f, S). Given\nthat x ∈A, the probability that the basic step chooses y ∈Bx is at least 1\n2\n n\n|x|"},{"paragraph_id":"p10","order":10,"text":"/\n n\n|x|"},{"paragraph_id":"p11","order":11,"text":"−1"},{"paragraph_id":"p12","order":12,"text":"≥1\n2 (since if\n#Bx were less than 1\n2\n n\n|x|"},{"paragraph_id":"p13","order":13,"text":", we could replace the points of A having Hamming weight |x| by those of Bx,\nreducing the cardinality of A and contradicting the definition of A). The procedure returns no if x ∈A\nand y ∈Bx, which occurs with probability at least 1\n2∆(f, S), and also if y ∈A and x ∈By, which occurs\ndisjointly with a probability that is also at least 1\n2∆(f, S) (since the joint distribution of x and y is invariant\nunder the exchange of x and y). This completes the proof that the basic step returns no with probability at\nleast ∆(f, S).\nNow we present our complete symmetry test.\nSymmetry Test: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers 0 < ε < 1\nand 0 < δ < 1, if 0 ≤n ≤1, then return yes. (1) Otherwise compute\nk =\n 1\nε log 1\nδ"},{"paragraph_id":"p14","order":14,"text":".\n(2) Perform the basic step until it returns no, or until it has returned yes k times. (3) If any performance\nof the basic step returned no, then return no; if all k performances returned yes, then return yes.\nClearly, if f is symmetric, then this procedure returns yes. We shall see that if f is ε-far from the\nsymmetric functions, then the procedure returns no with probability at least 1 −δ.\nIf f is ε-far from\nthe symmetric functions, then each performance of the basic step returns yes with probability at most\n1 −∆(f, S) ≤1 −ε. The symmetry test returns yes only if k performances of the basic step return yes,\n3"},{"paragraph_id":"p15","order":15,"text":"and this occurs with probability at most (1 −ε)k ≤e−εk ≤δ (where we have used the inequality 1 + x ≤ex\nand the definition of k). This completes the proof that, if if f is ε-far from the symmetric functions, then\nthe procedure returns no with probability at least 1 −δ.\nWe now have the following theorem.\nTheorem 2.1: There is a test for symmetry that makes at most O\n (1/ε) log(1/δ)"},{"paragraph_id":"p16","order":16,"text":"queries.\nProof: The number of queries made is at most\n2k = O\n 1\nε log 1\nδ"},{"paragraph_id":"p17","order":17,"text":".\n⊓⊔\nWe conclude this section by observing that when the basic step returns no, the two points it has queried\nwitness the non-symmetry of the function, and when the complete symmetry test returns no, such a witness\nis provided by the final performance of the basic step.\n3. Estimating Dependence\nIn this section we shall present an estimate, as defined in the introduction, for the set J (f) of arguments\nthat f depends on. We begin by describing a constancy test analogous to the symmetry test presented in\nthe preceding section.\nConstancy Test—Basic Step: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, return yes\nif n = 0. (1) Choose point x = (x1, . . . , xn) at random, with all 2n points being equally likely. (2) Choose\npoint y = (y1, . . . , yn) at random, with all 2n −1 points other than x being equally likely. (3) Query f(x)\nand f(y). If f(x) = f(y), then return yes, else return no.\nClearly, if f is constant, then this procedure returns yes. Let C denote the set of all constant Boolean\nfunctions. We shall see that if f is not constant, then the procedure returns no with probability at least\n∆(f, C). To see this, let A ⊆{0, 1}n be a set of points of minimum cardinality such that complementing the\nvalue of f at just those points in A yields a constant function. This minimum cardinality is #A = ∆(f, C) 2n.\nFor any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that f(y) ̸= f(x). The probability\nthat the basic step chooses x ∈A is ∆(f, C). Given that x ∈A, the probability that the basic step chooses\ny ∈Bx is at least 2n−1/(2n −1) ≥1\n2 (since if #Bx were less than 2n−1, we could replace the points of A\nby those of Bx, reducing the cardinality of A and contradicting the definition of A). The procedure returns\nno if x ∈A and y ∈Bx, which occurs with probability at least 1\n2∆(f, C), and also if y ∈A and x ∈By,\nwhich occurs disjointly with a probability that is at least 1\n2∆(f, C) (since the joint distribution of x and y\nis invariant under the exchange of x and y). This completes the proof that the basic step returns no with\nprobability at least ∆(f, C).\nNow we present our complete constancy test.\nConstancy Test: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers 0 < ε < 1\nand 0 < δ < 1, if n = 0, then return yes. (1) Otherwise compute\nk =\n 1\nε log 1\nδ"},{"paragraph_id":"p18","order":18,"text":".\n(2) Perform the basic step until it returns no, or until it has returned yes k times. (3) If any performance\nof the basic step returned no, then return no; if all k performances returned yes, then return yes.\n4"},{"paragraph_id":"p19","order":19,"text":"Clearly, if f is constant, then this procedure returns yes. We shall see that if f is ε-far from the constant\nfunctions, then the procedure returns no with probability at least 1 −δ. If f is ε-far from the constant\nfunctions, then each performance of the basic step returns yes with probability at most 1 −∆(f, C) ≤1 −ε.\nThe complete test returns yes only if k performances of the basic step return yes, and this occurs with\nprobability at most (1 −ε)k ≤e−εk ≤δ (where we have used the inequality 1 + x ≤ex and the definition of\nk). This completes the proof that, if if f is ε-far from the constant functions, then the procedure returns no\nwith probability at least 1 −δ.\nWe now have the following lemma.\nLemma 3.1: There is a test for constancy that makes at most O\n (1/ε) log(1/δ)"},{"paragraph_id":"p20","order":20,"text":"queries.\nProof: The number of queries made is at most\n2k = O\n 1\nε log 1\nδ"},{"paragraph_id":"p21","order":21,"text":".\n⊓⊔\nWe observe that when the basic step returns no, the two points it has queried witness the non-constancy\nof the function, and when the complete constancy test returns no, such a witness is provided by the final\nperformance of the basic step.\nThe next component we shall need is a procedure that takes a pair of points that witness the non-\nconstancy of a function and returns a particular argument on which the function depends. We shall call this\noperation a “dependency search”.\nDependency Search: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and a pair of points\nx, y ∈{0, 1}n such that f(x) ̸= f(y), set x′ := x and y′ := y. (1) If |x′ ⊕y′| = 1, then return the unique\ni ∈{1, . . . , n} such that x′\ni ̸= y′\ni. (2) Otherwise, let z ∈{0, 1}n be such that |x′ ⊕z| and |y′ ⊕z| are each at\nmost ⌈|x′ ⊕y′|/2⌉(so that z is about half-way between x′ and y′). (3) Query f(z). If f(x′) ̸= f(z), then set\ny′ := z, else set x′ := z. (4) Go back to step (1).\nLemma 3.2: There is a procedure for dependency search that makes O(log n) queries.\nProof: In the procedure given above, the quantity |x′ ⊕y′| is initially at most n. The procedure reduces this\nquantity by multiplying it by a factor at most 2/3 whenever it makes a query, and stops when this quantity\nreaches 1. Thus it makes at most log3/2 n queries. ⊓⊔\nWe observe that the final values of x′ and y in this dependency search provide a witness that f actually\ndepends on the i-th argument.\nWe now present our complete dependency estimate.\nDependency Estimate: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers\n0 < ε < 1 and 0 < δ < 1, let δ′ = δ/n and set J′ := ∅. (1) Set xJ′ = {xj : j ∈J′} to random Boolean values,\nwith all 2#J′ assignments being equally likely, and let f ′ : {0, 1}n−#J′ →{0, 1} be the Boolean function\nobtained from f by substituting the values xJ′ for the arguments in J′. (2) Perform a constancy test on the\nfunction f ′ with parameters ε and δ′. (3) If this test returns yes, then return J′. (4) Otherwise, perform a\ndependency search on the witness returned by the constancy test, and adjoin the argument j returned by\nthe dependency search to J′: J′ := J′ ∪{j}. (5) Go back to step (1).\nIf J denotes the set returned by this procedure, it is clear that J ⊆J (f). Indeed, this fact is witnessed\nby the set of pairs of points x′, y′ that terminate the dependency searches that found the arguments in J.\n5"},{"paragraph_id":"p22","order":22,"text":"Let BJ be the set of Boolean functions that actually depend only on the arguments in J. We shall show\nthat that if f is ε-far from any function in BJ, then an event of probability at most δ has occurred. If f\nis ε-far from any function in BJ, we have ∆\n f, BJ"},{"paragraph_id":"p23","order":23,"text":"≥ε. For each performance of the constancy test, we\nhave J′ ⊆J; this implies ∆\n f, BJ′ \n≥∆\n f, BJ"},{"paragraph_id":"p24","order":24,"text":", and thus we have ∆\n f, BJ"},{"paragraph_id":"p25","order":25,"text":"≥ε. One of these at most n\nconstancy tests must return yes, and each test returns yes with probability at most δ′ = δ/n. Thus the\nprobability that any of these tests returns yes is at most nδ′ = δ. Finally, the number of queries made is at\nmost\nn"},{"paragraph_id":"p26","order":26,"text":"O\n 1\nε log 1\nδ′"},{"paragraph_id":"p27","order":27,"text":"+ O(log n)"},{"paragraph_id":"p28","order":28,"text":"= n"},{"paragraph_id":"p29","order":29,"text":"O\n 1\nε log n\nδ"},{"paragraph_id":"p30","order":30,"text":"+ O(log n)"},{"paragraph_id":"p31","order":31,"text":"= O\n n\nε log n\nδ"},{"paragraph_id":"p32","order":32,"text":".\nWe now have the following theorem.\nTheorem 3.3: There is an estimate for the dependency set that makes at most O\n (n/ε) log(n/δ)"},{"paragraph_id":"p33","order":33,"text":"queries.\n4. Testing Quasi-Symmetry\nIn this section, we present our quasi-symmetry test. Again we begin by describing a basic step.\nQuasi-Symmetry Test—Basic Step: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, a real\nnumber 0 < ε < 1, and a set J of arguments, set I = {1, . . . , n} \\ J. (1) Set xI = {xi : i ∈I} to random\nBoolean values, with all 2#I assignments being equally likely, and let f ′ : {0, 1}#J →{0, 1} be the Boolean\nfunction obtained from f by substituting the values xI for the arguments in I. (2) Perform a symmetry test\non f ′, with parameters ε and 1/2, and return the value returned by this symmetry test as the value of the\nbasic step.\nSuppose that the basic step is performed on a function f that actually depends on all the arguments\nin J. If f is quasi-symmetric, then because f actually depends on all the arguments in J and f ′ depends\nonly on these arguments, f ′ is symmetric and the basic step will return yes. Let g ∈BJ be a function that\nminimizes ∆(f, g). This minimum distance is ∆(f, g) = ∆(f, BJ). Now suppose further that ∆(f, g) ≤ε.\nThen we shall show that if f is 4ε-far from the set Q of quasi-symmetric functions, the basic step returns\nno with probability at least 1/4. By the triangle inequality we have ∆(f, g) + ∆(g, Q) ≥∆(f, Q) ≥4ε,\nand thus ∆(g, Q) ≥3ε. Let g′ be obtained from g by substituting the random values xI for the arguments\nin I. Of course g′ is independent of these random values, since g does not depend on the arguments in\nI. Furthermore, ∆(g′, S) ≥∆(g′, Q) ≥∆(g, Q) ≥3ε, since S ⊆Q and g does not depend on any of its\narguments that are not arguments of g′. On the other hand, ∆(g′, f ′) is a random variable, since f ′ may\ndepend on the random values xI.\nThe expected value of ∆(g′, f ′) is clearly ∆(g, f) = ∆(f, g) ≤ε, so\nwith probability at least 1/2 we have ∆(f ′, g′) ≤2ε, by Markov’s inequality. When this happens, we have\n∆(g′, f ′) + ∆(f ′, S) ≥∆(g′, S) ≥3ε, again by the triangle inequality, and thus ∆(f ′, S) ≥ε. This condition\nensures that the symmetry test returns no with probability at least 1/2. This completes the proof that when\nf is 4ε-far from the set Q of quasi-symmetric functions, then the basic step returns no with probability at\nleast 1/4.\nQuasi-Symmetry Test: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers\n0 < ε < 1 and 0 < δ < 1, let ε′ = ε/4 and δ′ = δ/2, and compute\nk ="},{"paragraph_id":"p34","order":34,"text":"log4/3\n1\nδ′"},{"paragraph_id":"p35","order":35,"text":".\n6"},{"paragraph_id":"p36","order":36,"text":"(1) Perform a dependency estimate on f, with parameters ε′ and δ′, and let J be the value returned by\nthat procedure. (2) Perform the basic step with parameters f, ε′, and J, until it returns no, or until it\nhas returned yes k times. (3) If any performance of the basic step returned no, then return no; if all k\nperformances returned yes, then return yes.\nSuppose first that f is quasi-symmetric. The function f actually depends on all the arguments in the\nset J found in step (1). Thus each performance of the basic step returns yes, and so the quasi-symmetry test\nreturns yes after k such performances. Suppose on the other hand that f is ε-far from any quasi-symmetric\nfunction. Then, except with probability at most δ′, ∆\n f, BJ"},{"paragraph_id":"p37","order":37,"text":"≤ε′ for the set J found by step (1). Thus\neach performance of the basic step returns no with probability at least 1/4, and therefore returns yes with\nprobability at most 3/4. The probability that all k performances of the basic step return yes is thus at\nmost (3/4)k ≤δ′. Thus if f is ε-far from the quasi-symmetric functions, the quasi-symmetry test returns no\nunless an event of probability at most δ′ + δ′ = δ occurs.\nFinally, the number of queries made is at most\nO\n n\nε′ log n\nδ′"},{"paragraph_id":"p38","order":38,"text":"+ O\n 1\nε′ log 1\nδ′"},{"paragraph_id":"p39","order":39,"text":"= O\n 4n\nε log 2n\nδ"},{"paragraph_id":"p40","order":40,"text":"+ O\n 4\nε log 2\nδ"},{"paragraph_id":"p41","order":41,"text":"= O\n n\nε log n\nδ"},{"paragraph_id":"p42","order":42,"text":".\nWe now have the following theorem.\nTheorem 4.3: There is a test for quasi-symmetry that makes at most O\n (n/ε) log(n/δ)"},{"paragraph_id":"p43","order":43,"text":"queries.\nWe observe that when the quasi-symmetry test returns no, a witness to the non-quasi-symmetry of f\ncan be obtained from the witnesses provided by the dependency estimate and the final performance of the\nsymmetry test.\n5. Acknowledgments\nPreliminary versions of the results presented here appeared in the first author’s thesis, and were sup-\nported by a Canada Research Chair and a Discovery Grant to the second author from the National Science\nand Engineering Research Council of Canada. Subsequent work was supported by Grant CCF 043056 to the\nsecond author by the National Science Foundation of the United States.\n6. References\n[F] E. Fischer, G. Kindler, D. Ron, S. Safra and A. Samoridnitsky, “Testing Juntas”, Proc. IEEE Symp.\non Foundations of Computer Science, 43 (2002) 103–112.\n[G1] O. Goldreich, S. Goldwasser, E. Lehman and D. Ron, “Testing Monotonicity”, Proc. IEEE Symp. on\nFoundations of Computer Science, 39 (1998) 426–435.\n[G2] O. Goldreich, S. Goldwasser, E. Lehman, D. Ron and A. Samoridnitsky, “Testing Monotonicity”, Com-\nbinatorica, 20 (2000) 301–337.\n[G3] O. Goldreich, S. Goldwasser and D. Ron, “Property Testing and Its Connection to Learning and Ap-\nproximation”, J. ACM, 45 (1998) 653–750.\n[M] K. Majewski, Probabilistic Testing of Boolean Functions, M. Sc.\nThesis, Department of Computer\nScience, University of British Columbia, 2003.\n7"},{"paragraph_id":"p44","order":44,"text":"[P1] M. Parnas, D. Ron and A. Samoridnitsky,\n“Proclaiming Dictators and Juntas or Testing Boolean\nFormulae”,\nin: M. Goemans, K. Jansen, J. D. P. Rolim and L. Treviasan (Ed’s),\nApproximation,\nRandomization, and Combinatorial Optimization, Lecture Notes in Computer Science, v. 2129, Springer-\nVerlag, Berlin, 2001, pp. 273–284.\n[P2] M. Parnas, D. Ron and A. Samoridnitsky, “Proclaiming Dictators and Juntas or Testing Boolean For-\nmulae”, Electronic Colloq. on Computational Complexity, http://eccc.uni-trier.de/eccc/, 2001,\nno. 63, 31 pp..\n[P3] M. Parnas, D. Ron and A. Samoridnitsky, “Testing Basic Boolean Formulae”, Electronic Colloq. on\nComputational Complexity, http://eccc.uni-trier.de/eccc/, 2001, no. 63, rev. 1, 29 pp..\n[R] R. Rubinfeld and M. Sudan, “Robust Characterizations of Polynomials with Applications to Program\nTesting”, SIAM J. Computing, 25:2 (1996) 252-271.\n8"}],"pages":[{"page":1,"text":"arXiv:0708.2105v1 [cs.CC] 15 Aug 2007\ntesting.07.rev.tex\nAttribute Estimation and Testing Quasi-Symmetry\nKrzysztof Majewski\nkrzys@ifi.uio.no\nDepartment of Informatics\nUniversity of Oslo\nBoks 1072 Blindern\nNO-0316 Oslo, Norway\nNicholas Pippenger\nnjp@hmc.edu\nDepartment of Mathematics\nHarvey Mudd College\n1250 North Dartmouth Avenue\nClaremont, CA 91711 USA\nAbstract: A Boolean function is symmetric if it is invariant under all permutations of its arguments; it is\nquasi-symmetric if it is symmetric with respect to the arguments on which it actually depends. We present a\ntest that accepts every quasi-symmetric function and, except with an error probability at most δ > 0, rejects\nevery function that differs from every quasi-symmetric function on at least a fraction ε > 0 of the inputs. For\na function of n arguments, the test probes the function at O\n (n/ε) log(n/δ)\n \ninputs. Our quasi-symmetry\ntest acquires information concerning the arguments on which the function actually depends. To do this, it\nemploys a generalization of the property testing paradigm that we call attribute estimation. Like property\ntesting, attribute estimation uses random sampling to obtain results that have only “one-sided” errors and\nthat are close to accurate with high probability."},{"page":2,"text":"1. Introduction\nSuppose that we are given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and that we wish\nto determine whether or not it is symmetric. (Such a function f is symmetric if it is invariant under all\nn! permutations of its arguments: f(x1, . . . , xn) = f(xπ(1), . . . , xπ(n)) for all (x1, . . . , xn) ∈{0, 1}n and all\nbijections π : {1, . . ., n} →{1, . . ., n}. Equivalently, f is symmetric if it is constant on sets of settings of\nits arguments that have equal Hamming weight: f(x) = f(y) if |x| = |y|, where the Hamming weight |x| of\nx ∈{0, 1}n is the number P\n1≤i≤n xi of 1s among x1, . . . , xn.) We seek to do this by querying the value of\nthe function at various points (settings of its argument values), and we endeavor to minimize the number of\nqueries that we make.\nIt is not hard to see that in the worst case, we may need to make 2n −2 queries. For if f is the “all\n0s” constant function, we are bound to find that it is symmetric, but we dare not announce this conclusion\nbefore querying all 2n −2 points other than “all 0s” (0, . . . , 0) ∈{0, 1}n and “all 1s” (1, . . . , 1) ∈{0, 1}n.\n(For if (x1, . . . , xn) is such a point not queried, then the function g that assumes the value 1 at and only at\nthe point (x1, . . . , xn) would be a non-symmetric function that assumes the same value as f at all queried\npoints.)\nThis situation may be summarized by saying that a “witness” for symmetry (a set of points at which the\nvalues of a function ensure its symmetry) must contain 2n −2 points. A witness for non-symmetry, however,\nmay consist of just two points, x and y, such that |x| = |y|, but for which f(x) ̸= f(y). This suggests that\nwe may test for symmetry more efficiently if we are willing to allow a small probability of a “false positive”\n(when we declare a function to be symmetric when in fact it is not).\nThis suggestion leads us to the paradigm of “property testing”. To introduce this notion to the current\ncontext, we shall need some definitions. If f and g are Boolean functions of n arguments, the distance\n∆(f, g) between them is the fraction of their truth-table entries on which they differ. This fraction may be\nwritten as ∆(f, g) = |f ⊕g|/2n, where f ⊕g denotes the “exclusive-or” or “sum modulo 2” of f and g, and\nthe Hamming weight |f| of a Boolean function f is the number P\nx∈{0,1}n f(x) of 1s in its truth-table. This\nis a proper metric on the set Bn of Boolean functions of n arguments (that is, it is non-negative, vanishes\nonly when the functions are equal, is symmetric and satisfies the triangle inequality). Furthermore, if we\nextend it by agreeing that functions of different numbers of arguments are at “infinite distance”, it remains\na metric, now defined on the set B = S\nn≥0 Bn of all Boolean functions. If F and G are sets of Boolean\nfunctions, we define ∆(f, G) = ming∈G ∆(f, g) and ∆(F, G) = minf∈F ∆(f, G). If ∆(f, G) ≥ε, we shall say\nthat f is ε-far from G.\nBy a test for some property of Boolean functions (reified as a set G of Boolean functions), we shall mean\na randomized algorithm that takes a Boolean function f and two parameters ε > 0 and δ > 0, queries the\nvalue of f at a finite sequence of points (where the number of queries, and choice of later points may depend\non the outcomes of earlier queries), and announces an answer yes or no, where (1) if f has the property in\nquestion (that is, f ∈G), then the algorithm answers yes, and (2) if f is ε-far from the set of functions with\nthe property in question (that is, ∆(f, G) ≥ε), then the algorithm answers no unless an event of probability\nat most δ has occurs. (Note that “probability” here refers to the randomization of the algorithm; the bound\nδ applies uniformly to all f that are ε-far from G.)\nProperty testing, in the sense used here, was introduced by Rubinfeld and Sudan [R] and further\ndeveloped by Goldreich, Goldwasser and Ron [G3]. The definition has many variants and has been applied\n1"},{"page":3,"text":"to properties of many types of objects. A central example involving Boolean functions is testing monotonicity\n(see Goldreich, Goldwasser, Lehman and Ron (and, in the later version, Samorodnitsky) [G1, G2]).\nIn Section 2, we shall give a test for symmetry that makes at most O\n (1/ε) log(1/δ)\n \nqueries. Although\nthe test is randomized, this bound on the number of queries is uniform (not merely a bound on expectation,\nnor merely one that holds with high probability), and it is independent of the number of arguments. When\nthe algorithm returns no, it also provides a witness to the non-symmetry of f. (Of course, when yes is\nreturned, it may be a false positive, and in any case a witness to symmetry would be too large establish\nwithin the stated number of queries.)\nWe shall say that a Boolean function f : {0, 1}n →{0, 1} of n arguments is quasi-symmetric if it is a\nsymmetric function of those of its arguments that it actually depends on. (We say that f depends on its i-th\nargument if there are Boolean values x1, . . . , xi−1, xi+1, . . . , xn such that f(x1, . . . , xi−1, 0, xi+1, . . . , xn) ̸=\nf(x1, . . . , xi−1, 1, xi+1, . . . , xn).)\nIn Section 4, we shall give a test for quasi-symmetry that makes at most O\n (n/ε) log(n/δ)\n \nqueries.\nIn this case, the number of queries depends on the number of n of arguments as well as on ε and δ. This\nhappens because the test begins by attempting to determine the set J (f) ⊆{1, . . . , n} of arguments on\nwhich the function f actually depends, and this set could be as large as the full set of n arguments.\nUpon considering the subproblem of determining the set J (f) from the function f, we see that it\npresents many of the same characteristics as testing for symmetry: a witness for the fact that f depends on\nits i-th arguments can comprise just two points (as exemplified in the definition), but a witness for the fact\nthat f does not depend on some particular argument cannot be smaller than all 2n points. Thus, instead\nof determining J (f) exactly, we shall introduce a notion of “estimating” such an attribute that is exactly\nanalogous to the notion of “testing” a property.\nA function D : B →C defined on the set of all Boolean functions, and taking values in a partially ordered\nset C, will be called an attribute of Boolean functions. An estimate for the attribute D is a randomized\nalgorithm that takes a Boolean function f and two parameters ε > 0 and δ > 0, queries the value of f\nat a finite sequence of points (where the number of queries, and choice of later points may depend on the\noutcomes of earlier queries), and announces an output D ∈C, where (1) D(f) ≥D, and (2) f is ε-far from\nthe set D−1(D) of functions for which D takes on the value D only if an event of probability at most δ\noccurs. If we take C = {yes, no} with yes < no, then estimating such an attribute reduces to testing the\ncorresponding property D−1(yes).\nIn Section 3 we shall give an estimate for the set J (f) of arguments that f depends on (with\nthe codomain, the power set of {1, . . . , n}, ordered in the usual way by inclusion) that makes at most\nO\n (n/ε) log(n/δ)\n \nqueries. The algorithm will also provide a witness for the fact that the value it returns is\na lower bound for J (f). This estimate will be used in Section 4 as the basis for our quasi-symmetry test,\nand the witness that it provides will be used to construct a witness for non-quasi-symmetry when that is\ndetected.\nThe problem of testing whether a Boolean function depend on a small subset of arguments has been\nattacked by Parnas, Ron and Samordnitsky [P1, P2], and later by Fischer, Kindler, Ron, Safra and Samorod-\nnitsky [F]. Their work, however, lies entirely within the framework of property testing: their algorithms test\nwhether the cardinality #J (f) is at most k (k a constant), without giving further information about the\nset J (f) (and they do this with a number of queries that is independent of n). Our quasi-symmetry test,\n2"},{"page":4,"text":"however, requires more information about J (f) than merely its cardinality, and this requirement led us to\nour formulation of the notion of attribute estimation.\nDespite its naturalness and its analogy to property testing, attribute estimation does not appear to have\nbeen described in the previous literature. We hope, however, that it will find other applications, and indeed\nthat the notion of attribute estimation, both as used here and as extended to other domains such as graphs,\nwill prove a fruitful contribution to the theory of statistical algorithms.\n2. Testing Symmetry\nIn this section, we shall present our symmetry test and analyze its performance. We shall begin by\ndescribing what we shall call a “basic step” of the algorithm.\nSymmetry Test—Basic Step: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, return yes\nif 0 ≤n ≤1. (1) Choose point x = (x1, . . . , xn) at random, with all 2n −2 points other than (0, . . . , 0)\nand (1, . . . , 1) being equally likely. (2) Choose point y = (y1, . . . , yn) at random, with all\n n\n|x|\n \n−1 points\nother than x, but having the same Hamming weight as x, being equally likely.\n(Since n ≥2 and x ̸∈\n{(0, . . . , 0), (1, . . . , 1)}, there is at least one possible choice for y.) (3) Query f(x) and f(y). If f(x) = f(y),\nthen return yes, else return no.\nClearly, if f is symmetric, then this procedure returns yes. Let S denote the set of all symmetric Boolean\nfunctions. We shall see that if f is not symmetric, then the procedure returns no with probability at least\n∆(f, S). To see this, let A ⊆{0, 1}n be a set of points of minimum cardinality such that complementing\nthe value of f at just those points in A yields a symmetric function. This minimum cardinality is #A =\n∆(f, S) 2n.\nFor any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that |y| = |x| but\nf(y) ̸= f(x). The probability that the basic step chooses x ∈A is ∆(f, S) 2n/(2n −2) ≥∆(f, S). Given\nthat x ∈A, the probability that the basic step chooses y ∈Bx is at least 1\n2\n n\n|x|\n \n/\n n\n|x|\n \n−1\n \n≥1\n2 (since if\n#Bx were less than 1\n2\n n\n|x|\n \n, we could replace the points of A having Hamming weight |x| by those of Bx,\nreducing the cardinality of A and contradicting the definition of A). The procedure returns no if x ∈A\nand y ∈Bx, which occurs with probability at least 1\n2∆(f, S), and also if y ∈A and x ∈By, which occurs\ndisjointly with a probability that is also at least 1\n2∆(f, S) (since the joint distribution of x and y is invariant\nunder the exchange of x and y). This completes the proof that the basic step returns no with probability at\nleast ∆(f, S).\nNow we present our complete symmetry test.\nSymmetry Test: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers 0 < ε < 1\nand 0 < δ < 1, if 0 ≤n ≤1, then return yes. (1) Otherwise compute\nk =\n 1\nε log 1\nδ\n \n.\n(2) Perform the basic step until it returns no, or until it has returned yes k times. (3) If any performance\nof the basic step returned no, then return no; if all k performances returned yes, then return yes.\nClearly, if f is symmetric, then this procedure returns yes. We shall see that if f is ε-far from the\nsymmetric functions, then the procedure returns no with probability at least 1 −δ.\nIf f is ε-far from\nthe symmetric functions, then each performance of the basic step returns yes with probability at most\n1 −∆(f, S) ≤1 −ε. The symmetry test returns yes only if k performances of the basic step return yes,\n3"},{"page":5,"text":"and this occurs with probability at most (1 −ε)k ≤e−εk ≤δ (where we have used the inequality 1 + x ≤ex\nand the definition of k). This completes the proof that, if if f is ε-far from the symmetric functions, then\nthe procedure returns no with probability at least 1 −δ.\nWe now have the following theorem.\nTheorem 2.1: There is a test for symmetry that makes at most O\n (1/ε) log(1/δ)\n \nqueries.\nProof: The number of queries made is at most\n2k = O\n 1\nε log 1\nδ\n \n.\n⊓⊔\nWe conclude this section by observing that when the basic step returns no, the two points it has queried\nwitness the non-symmetry of the function, and when the complete symmetry test returns no, such a witness\nis provided by the final performance of the basic step.\n3. Estimating Dependence\nIn this section we shall present an estimate, as defined in the introduction, for the set J (f) of arguments\nthat f depends on. We begin by describing a constancy test analogous to the symmetry test presented in\nthe preceding section.\nConstancy Test—Basic Step: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, return yes\nif n = 0. (1) Choose point x = (x1, . . . , xn) at random, with all 2n points being equally likely. (2) Choose\npoint y = (y1, . . . , yn) at random, with all 2n −1 points other than x being equally likely. (3) Query f(x)\nand f(y). If f(x) = f(y), then return yes, else return no.\nClearly, if f is constant, then this procedure returns yes. Let C denote the set of all constant Boolean\nfunctions. We shall see that if f is not constant, then the procedure returns no with probability at least\n∆(f, C). To see this, let A ⊆{0, 1}n be a set of points of minimum cardinality such that complementing the\nvalue of f at just those points in A yields a constant function. This minimum cardinality is #A = ∆(f, C) 2n.\nFor any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that f(y) ̸= f(x). The probability\nthat the basic step chooses x ∈A is ∆(f, C). Given that x ∈A, the probability that the basic step chooses\ny ∈Bx is at least 2n−1/(2n −1) ≥1\n2 (since if #Bx were less than 2n−1, we could replace the points of A\nby those of Bx, reducing the cardinality of A and contradicting the definition of A). The procedure returns\nno if x ∈A and y ∈Bx, which occurs with probability at least 1\n2∆(f, C), and also if y ∈A and x ∈By,\nwhich occurs disjointly with a probability that is at least 1\n2∆(f, C) (since the joint distribution of x and y\nis invariant under the exchange of x and y). This completes the proof that the basic step returns no with\nprobability at least ∆(f, C).\nNow we present our complete constancy test.\nConstancy Test: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers 0 < ε < 1\nand 0 < δ < 1, if n = 0, then return yes. (1) Otherwise compute\nk =\n 1\nε log 1\nδ\n \n.\n(2) Perform the basic step until it returns no, or until it has returned yes k times. (3) If any performance\nof the basic step returned no, then return no; if all k performances returned yes, then return yes.\n4"},{"page":6,"text":"Clearly, if f is constant, then this procedure returns yes. We shall see that if f is ε-far from the constant\nfunctions, then the procedure returns no with probability at least 1 −δ. If f is ε-far from the constant\nfunctions, then each performance of the basic step returns yes with probability at most 1 −∆(f, C) ≤1 −ε.\nThe complete test returns yes only if k performances of the basic step return yes, and this occurs with\nprobability at most (1 −ε)k ≤e−εk ≤δ (where we have used the inequality 1 + x ≤ex and the definition of\nk). This completes the proof that, if if f is ε-far from the constant functions, then the procedure returns no\nwith probability at least 1 −δ.\nWe now have the following lemma.\nLemma 3.1: There is a test for constancy that makes at most O\n (1/ε) log(1/δ)\n \nqueries.\nProof: The number of queries made is at most\n2k = O\n 1\nε log 1\nδ\n \n.\n⊓⊔\nWe observe that when the basic step returns no, the two points it has queried witness the non-constancy\nof the function, and when the complete constancy test returns no, such a witness is provided by the final\nperformance of the basic step.\nThe next component we shall need is a procedure that takes a pair of points that witness the non-\nconstancy of a function and returns a particular argument on which the function depends. We shall call this\noperation a “dependency search”.\nDependency Search: (0) Given Boolean function f : {0, 1}n →{0, 1} of n arguments, and a pair of points\nx, y ∈{0, 1}n such that f(x) ̸= f(y), set x′ := x and y′ := y. (1) If |x′ ⊕y′| = 1, then return the unique\ni ∈{1, . . . , n} such that x′\ni ̸= y′\ni. (2) Otherwise, let z ∈{0, 1}n be such that |x′ ⊕z| and |y′ ⊕z| are each at\nmost ⌈|x′ ⊕y′|/2⌉(so that z is about half-way between x′ and y′). (3) Query f(z). If f(x′) ̸= f(z), then set\ny′ := z, else set x′ := z. (4) Go back to step (1).\nLemma 3.2: There is a procedure for dependency search that makes O(log n) queries.\nProof: In the procedure given above, the quantity |x′ ⊕y′| is initially at most n. The procedure reduces this\nquantity by multiplying it by a factor at most 2/3 whenever it makes a query, and stops when this quantity\nreaches 1. Thus it makes at most log3/2 n queries. ⊓⊔\nWe observe that the final values of x′ and y in this dependency search provide a witness that f actually\ndepends on the i-th argument.\nWe now present our complete dependency estimate.\nDependency Estimate: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers\n0 < ε < 1 and 0 < δ < 1, let δ′ = δ/n and set J′ := ∅. (1) Set xJ′ = {xj : j ∈J′} to random Boolean values,\nwith all 2#J′ assignments being equally likely, and let f ′ : {0, 1}n−#J′ →{0, 1} be the Boolean function\nobtained from f by substituting the values xJ′ for the arguments in J′. (2) Perform a constancy test on the\nfunction f ′ with parameters ε and δ′. (3) If this test returns yes, then return J′. (4) Otherwise, perform a\ndependency search on the witness returned by the constancy test, and adjoin the argument j returned by\nthe dependency search to J′: J′ := J′ ∪{j}. (5) Go back to step (1).\nIf J denotes the set returned by this procedure, it is clear that J ⊆J (f). Indeed, this fact is witnessed\nby the set of pairs of points x′, y′ that terminate the dependency searches that found the arguments in J.\n5"},{"page":7,"text":"Let BJ be the set of Boolean functions that actually depend only on the arguments in J. We shall show\nthat that if f is ε-far from any function in BJ, then an event of probability at most δ has occurred. If f\nis ε-far from any function in BJ, we have ∆\n f, BJ\n \n≥ε. For each performance of the constancy test, we\nhave J′ ⊆J; this implies ∆\n f, BJ′ \n≥∆\n f, BJ\n \n, and thus we have ∆\n f, BJ\n \n≥ε. One of these at most n\nconstancy tests must return yes, and each test returns yes with probability at most δ′ = δ/n. Thus the\nprobability that any of these tests returns yes is at most nδ′ = δ. Finally, the number of queries made is at\nmost\nn\n \nO\n 1\nε log 1\nδ′\n \n+ O(log n)\n \n= n\n \nO\n 1\nε log n\nδ\n \n+ O(log n)\n \n= O\n n\nε log n\nδ\n \n.\nWe now have the following theorem.\nTheorem 3.3: There is an estimate for the dependency set that makes at most O\n (n/ε) log(n/δ)\n \nqueries.\n4. Testing Quasi-Symmetry\nIn this section, we present our quasi-symmetry test. Again we begin by describing a basic step.\nQuasi-Symmetry Test—Basic Step: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, a real\nnumber 0 < ε < 1, and a set J of arguments, set I = {1, . . . , n} \\ J. (1) Set xI = {xi : i ∈I} to random\nBoolean values, with all 2#I assignments being equally likely, and let f ′ : {0, 1}#J →{0, 1} be the Boolean\nfunction obtained from f by substituting the values xI for the arguments in I. (2) Perform a symmetry test\non f ′, with parameters ε and 1/2, and return the value returned by this symmetry test as the value of the\nbasic step.\nSuppose that the basic step is performed on a function f that actually depends on all the arguments\nin J. If f is quasi-symmetric, then because f actually depends on all the arguments in J and f ′ depends\nonly on these arguments, f ′ is symmetric and the basic step will return yes. Let g ∈BJ be a function that\nminimizes ∆(f, g). This minimum distance is ∆(f, g) = ∆(f, BJ). Now suppose further that ∆(f, g) ≤ε.\nThen we shall show that if f is 4ε-far from the set Q of quasi-symmetric functions, the basic step returns\nno with probability at least 1/4. By the triangle inequality we have ∆(f, g) + ∆(g, Q) ≥∆(f, Q) ≥4ε,\nand thus ∆(g, Q) ≥3ε. Let g′ be obtained from g by substituting the random values xI for the arguments\nin I. Of course g′ is independent of these random values, since g does not depend on the arguments in\nI. Furthermore, ∆(g′, S) ≥∆(g′, Q) ≥∆(g, Q) ≥3ε, since S ⊆Q and g does not depend on any of its\narguments that are not arguments of g′. On the other hand, ∆(g′, f ′) is a random variable, since f ′ may\ndepend on the random values xI.\nThe expected value of ∆(g′, f ′) is clearly ∆(g, f) = ∆(f, g) ≤ε, so\nwith probability at least 1/2 we have ∆(f ′, g′) ≤2ε, by Markov’s inequality. When this happens, we have\n∆(g′, f ′) + ∆(f ′, S) ≥∆(g′, S) ≥3ε, again by the triangle inequality, and thus ∆(f ′, S) ≥ε. This condition\nensures that the symmetry test returns no with probability at least 1/2. This completes the proof that when\nf is 4ε-far from the set Q of quasi-symmetric functions, then the basic step returns no with probability at\nleast 1/4.\nQuasi-Symmetry Test: (0) Given a Boolean function f : {0, 1}n →{0, 1} of n arguments, and real numbers\n0 < ε < 1 and 0 < δ < 1, let ε′ = ε/4 and δ′ = δ/2, and compute\nk =\n \nlog4/3\n1\nδ′\n \n.\n6"},{"page":8,"text":"(1) Perform a dependency estimate on f, with parameters ε′ and δ′, and let J be the value returned by\nthat procedure. (2) Perform the basic step with parameters f, ε′, and J, until it returns no, or until it\nhas returned yes k times. (3) If any performance of the basic step returned no, then return no; if all k\nperformances returned yes, then return yes.\nSuppose first that f is quasi-symmetric. The function f actually depends on all the arguments in the\nset J found in step (1). Thus each performance of the basic step returns yes, and so the quasi-symmetry test\nreturns yes after k such performances. Suppose on the other hand that f is ε-far from any quasi-symmetric\nfunction. Then, except with probability at most δ′, ∆\n f, BJ\n \n≤ε′ for the set J found by step (1). Thus\neach performance of the basic step returns no with probability at least 1/4, and therefore returns yes with\nprobability at most 3/4. The probability that all k performances of the basic step return yes is thus at\nmost (3/4)k ≤δ′. Thus if f is ε-far from the quasi-symmetric functions, the quasi-symmetry test returns no\nunless an event of probability at most δ′ + δ′ = δ occurs.\nFinally, the number of queries made is at most\nO\n n\nε′ log n\nδ′\n \n+ O\n 1\nε′ log 1\nδ′\n \n= O\n 4n\nε log 2n\nδ\n \n+ O\n 4\nε log 2\nδ\n \n= O\n n\nε log n\nδ\n \n.\nWe now have the following theorem.\nTheorem 4.3: There is a test for quasi-symmetry that makes at most O\n (n/ε) log(n/δ)\n \nqueries.\nWe observe that when the quasi-symmetry test returns no, a witness to the non-quasi-symmetry of f\ncan be obtained from the witnesses provided by the dependency estimate and the final performance of the\nsymmetry test.\n5. Acknowledgments\nPreliminary versions of the results presented here appeared in the first author’s thesis, and were sup-\nported by a Canada Research Chair and a Discovery Grant to the second author from the National Science\nand Engineering Research Council of Canada. Subsequent work was supported by Grant CCF 043056 to the\nsecond author by the National Science Foundation of the United States.\n6. References\n[F] E. Fischer, G. Kindler, D. Ron, S. Safra and A. Samoridnitsky, “Testing Juntas”, Proc. IEEE Symp.\non Foundations of Computer Science, 43 (2002) 103–112.\n[G1] O. Goldreich, S. Goldwasser, E. Lehman and D. Ron, “Testing Monotonicity”, Proc. IEEE Symp. on\nFoundations of Computer Science, 39 (1998) 426–435.\n[G2] O. Goldreich, S. Goldwasser, E. Lehman, D. Ron and A. Samoridnitsky, “Testing Monotonicity”, Com-\nbinatorica, 20 (2000) 301–337.\n[G3] O. Goldreich, S. Goldwasser and D. Ron, “Property Testing and Its Connection to Learning and Ap-\nproximation”, J. ACM, 45 (1998) 653–750.\n[M] K. Majewski, Probabilistic Testing of Boolean Functions, M. Sc.\nThesis, Department of Computer\nScience, University of British Columbia, 2003.\n7"},{"page":9,"text":"[P1] M. Parnas, D. Ron and A. Samoridnitsky,\n“Proclaiming Dictators and Juntas or Testing Boolean\nFormulae”,\nin: M. Goemans, K. Jansen, J. D. P. Rolim and L. Treviasan (Ed’s),\nApproximation,\nRandomization, and Combinatorial Optimization, Lecture Notes in Computer Science, v. 2129, Springer-\nVerlag, Berlin, 2001, pp. 273–284.\n[P2] M. Parnas, D. Ron and A. Samoridnitsky, “Proclaiming Dictators and Juntas or Testing Boolean For-\nmulae”, Electronic Colloq. on Computational Complexity, http://eccc.uni-trier.de/eccc/, 2001,\nno. 63, 31 pp..\n[P3] M. Parnas, D. Ron and A. Samoridnitsky, “Testing Basic Boolean Formulae”, Electronic Colloq. on\nComputational Complexity, http://eccc.uni-trier.de/eccc/, 2001, no. 63, rev. 1, 29 pp..\n[R] R. Rubinfeld and M. Sudan, “Robust Characterizations of Polynomials with Applications to Program\nTesting”, SIAM J. Computing, 25:2 (1996) 252-271.\n8"}]},"section_tree":[],"assets":{"figures":[],"tables":[],"images":[]},"math_expressions":{"inline":[],"block":[{"equation_id":"eq1","equation_number":null,"raw_text":"n! permutations of its arguments: f(x1, . . . , xn) = f(xπ(1), . . . , xπ(n)) for all (x1, . . . , xn) ∈{0, 1}n and all","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq2","equation_number":null,"raw_text":"its arguments that have equal Hamming weight: f(x) = f(y) if |x| = |y|, where the Hamming weight |x| of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq3","equation_number":null,"raw_text":"may consist of just two points, x and y, such that |x| = |y|, but for which f(x) ̸= f(y). This suggests that","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq4","equation_number":null,"raw_text":"written as ∆(f, g) = |f ⊕g|/2n, where f ⊕g denotes the “exclusive-or” or “sum modulo 2” of f and g, and","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq5","equation_number":null,"raw_text":"a metric, now defined on the set B = S","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq6","equation_number":null,"raw_text":"functions, we define ∆(f, G) = ming∈G ∆(f, g) and ∆(F, G) = minf∈F ∆(f, G). If ∆(f, G) ≥ε, we shall say","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq7","equation_number":null,"raw_text":"argument if there are Boolean values x1, . . . , xi−1, xi+1, . . . , xn such that f(x1, . . . , xi−1, 0, xi+1, . . . , xn) ̸=","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq8","equation_number":null,"raw_text":"occurs. If we take C = {yes, no} with yes < no, then estimating such an attribute reduces to testing the","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq9","equation_number":null,"raw_text":"if 0 ≤n ≤1. (1) Choose point x = (x1, . . . , xn) at random, with all 2n −2 points other than (0, . . . , 0)","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq10","equation_number":null,"raw_text":"and (1, . . . , 1) being equally likely. (2) Choose point y = (y1, . . . , yn) at random, with all","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq11","equation_number":null,"raw_text":"{(0, . . . , 0), (1, . . . , 1)}, there is at least one possible choice for y.) (3) Query f(x) and f(y). If f(x) = f(y),","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq12","equation_number":null,"raw_text":"the value of f at just those points in A yields a symmetric function. This minimum cardinality is #A =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq13","equation_number":null,"raw_text":"For any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that |y| = |x| but","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq14","equation_number":null,"raw_text":"f(y) ̸= f(x). The probability that the basic step chooses x ∈A is ∆(f, S) 2n/(2n −2) ≥∆(f, S). Given","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq15","equation_number":null,"raw_text":"k =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq16","equation_number":null,"raw_text":"2k = O","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq17","equation_number":null,"raw_text":"if n = 0. (1) Choose point x = (x1, . . . , xn) at random, with all 2n points being equally likely. (2) Choose","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq18","equation_number":null,"raw_text":"point y = (y1, . . . , yn) at random, with all 2n −1 points other than x being equally likely. (3) Query f(x)","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq19","equation_number":null,"raw_text":"and f(y). If f(x) = f(y), then return yes, else return no.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq20","equation_number":null,"raw_text":"value of f at just those points in A yields a constant function. This minimum cardinality is #A = ∆(f, C) 2n.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq21","equation_number":null,"raw_text":"For any x ∈{0, 1}n, let Bx ⊆{0, 1}n denote the set of points y such that f(y) ̸= f(x). The probability","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq22","equation_number":null,"raw_text":"and 0 < δ < 1, if n = 0, then return yes. (1) Otherwise compute","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq23","equation_number":null,"raw_text":"k =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq24","equation_number":null,"raw_text":"2k = O","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq25","equation_number":null,"raw_text":"x, y ∈{0, 1}n such that f(x) ̸= f(y), set x′ := x and y′ := y. (1) If |x′ ⊕y′| = 1, then return the unique","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq26","equation_number":null,"raw_text":"i ̸= y′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq27","equation_number":null,"raw_text":"most ⌈|x′ ⊕y′|/2⌉(so that z is about half-way between x′ and y′). (3) Query f(z). If f(x′) ̸= f(z), then set","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq28","equation_number":null,"raw_text":"y′ := z, else set x′ := z. (4) Go back to step (1).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq29","equation_number":null,"raw_text":"0 < ε < 1 and 0 < δ < 1, let δ′ = δ/n and set J′ := ∅. (1) Set xJ′ = {xj : j ∈J′} to random Boolean values,","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq30","equation_number":null,"raw_text":"the dependency search to J′: J′ := J′ ∪{j}. (5) Go back to step (1).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq31","equation_number":null,"raw_text":"constancy tests must return yes, and each test returns yes with probability at most δ′ = δ/n. Thus the","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq32","equation_number":null,"raw_text":"probability that any of these tests returns yes is at most nδ′ = δ. Finally, the number of queries made is at","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq33","equation_number":null,"raw_text":"= n","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq34","equation_number":null,"raw_text":"= O","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq35","equation_number":null,"raw_text":"number 0 < ε < 1, and a set J of arguments, set I = {1, . . . , n} \\ J. (1) Set xI = {xi : i ∈I} to random","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq36","equation_number":null,"raw_text":"minimizes ∆(f, g). This minimum distance is ∆(f, g) = ∆(f, BJ). Now suppose further that ∆(f, g) ≤ε.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq37","equation_number":null,"raw_text":"The expected value of ∆(g′, f ′) is clearly ∆(g, f) = ∆(f, g) ≤ε, so","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq38","equation_number":null,"raw_text":"0 < ε < 1 and 0 < δ < 1, let ε′ = ε/4 and δ′ = δ/2, and compute","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq39","equation_number":null,"raw_text":"k =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq40","equation_number":null,"raw_text":"unless an event of probability at most δ′ + δ′ = δ occurs.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq41","equation_number":null,"raw_text":"= O","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq42","equation_number":null,"raw_text":"= O","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"}],"equation_refs":[]},"symbol_table":[],"references":{"in_text_markers":[],"bibliography":[]},"claims":[],"flow_graph":{"nodes":[],"edges":[]},"quality":{"text_char_count":25942,"parse_confidence":0.5,"equation_parse_rate_proxy":1.0,"citation_resolution_rate_proxy":0.0,"structure_coverage_proxy":0.0,"asset_coverage_proxy":0.0,"accepted_for_training":true}} |