Presentation is loading. Please wait.

Presentation is loading. Please wait.

On Testing Dynamic Environments

Similar presentations


Presentation on theme: "On Testing Dynamic Environments"— Presentation transcript:

1 On Testing Dynamic Environments
Oded Goldreich, Weizmann Institute Dana Ron, Tel Aviv University

2 Testing – A quick reminder
? Let OBJ be an object. Given query access to OBJ and approximation parameter (0,1], a Testing Algorithm for a (prespecified) property P should accept if OBJ has P and reject if OBJ is -far from having P. Distance is normalized Hamming and algorithm should succeed with high constant probability (whp). For example, OBJ may be an array of n numbers and the property is that it is sorted (monotonically increasing). The algorithm may query OBJ[i] for i of its choice. It should accept whp if OBJ is sorted and reject whp if OBJ should be modified on more than n entries so that it become sorted.

3 Testing Dynamic Environments - Informal
The object, environment ENV, can change with time. time 0 time 1 Properties of dynamic environments: change is according to a prespecified local rule R (initial configuration may be constrained) Given query access to ENV during time steps 0,…,T, testing algorithm should accept whp if ENV evolved according to R and reject whp if -far from such an evolution. Restrictions on algorithm: (1) Cannot go back in time (2) Number of queries should be sublinear in each time step.

4 Testing Dynamic Environments - Formalized
Consider environments [n]d ENV(j,i1,…,id) is state of location (i1,…,id) in environment at time j. Evolution is local: ENV(j,i1,…,id) is determined by {ENV(j-1,i1+s1,…,id+sd)}, s1,…,sd  {-1,0,+1} . j-1 i-1 i i+1 V() j i On input (n,d,T,), algorithm asks queries (j,i1,…,id) and gets V(ENV(j,i1,…,id)) where V:’ is viewing function: V()’ is visible part of state . Time conforming: Algorithm cannot query (j,i1,…,id) after (j’,i’1,…,i’d) if j < j’.

5 Testing Dynamic Environments - Formalized
Consider environments [n]d (mainly d  {1,2,3}) ENV(j,i1,…,id) is state of location (i1,…,id) in environment at time j. Evolution is local: ENV(j,i1,…,id) is determined by {ENV(j-1,i1+s1,…,id+sd)}, s1,…,sd  {-1,0,+1} . On input (n,d,T,), algorithm asks queries (j,i1,…,id) and gets V(ENV(j,i1,…,id)) where V:’ is viewing function: V()’ is visible part of state . Algorithm must be time conforming: cannot query (j,i1,…,id) after (j’,i’1,…,i’d) if j > j’. If ENV evolves from ENV0=ENV(0,*) in times 1,…,T according to rule R, then alg should accept whp, and if V(ENV) is -far from V(ENV’) for any such ENV’, then alg should reject whp. Temporal query complexity: Algorithm should perform o(nd) queries per time j.

6 Our Results Separation and Hardness Results:
Time conformity can have a big (exponential) price. Adaptivity can give a big (exponential) benefit Testing may be as hard as learning (a learning algorithm should construct -close approximation of V(ENV)). Testing (with sublinear query complexity) may be computationally hard Specific Positive Results: Linear rules have sublinear query (and time) complexity. Environments of moving objects have sublinear query (and time) complexity.

7 Environments of Moving Objects
Consider environments in which initially a subset of the locations are occupied by objects (“basic creatures”). Each object either wants to move right , or to move left , or to stand in place. These, as well as empty location are states of environment. At each time step, each object moves according to its trajectory, unless the new location is occupied, in which case it stops moving.

8 Environments of Moving Objects - Results
We give a testing algorithm whose (total) query complexity and running time are poly(1/). The algorithm has two-sided error. This is unavoidable if complexity independent of n: We prove that any one-sided error algorithm must perform (log n) queries (if non-adaptive, as our algorithm is, then (n1/2) ) The algorithm performs a series of sub-tests (all but one have one-sided error, i.e., cause rejection based on “hard evidence”, and one has two-sided error since based on “statistical evidence”) The analysis has a contrapositive structure: Prove that if environment passes all sub-tests with constant probability, then close to legal environment.

9 Moving Objects – Some ideas and difficulties I
First high-level idea that comes to mind: Uniformly select locations in ENV0 and for each that contains an object, check that it “behaves as it should” (approximately) in future time steps. If ENV0(i) = , must have ENVj(i) = for all j If ENV0(i) = , must have ENVj(i+j) = for every j  st(i), where st(i) is stopping location of object. Analogous statement for ENV0(i) = as well as for ENVT(i) = : ENVj(i) = for j  st(i) j1 j1 j2 j2 T j3

10 Moving Objects – Some ideas and difficulties II
Note: If not time conforming then could find st(i) exactly by binary search. Since time conforming, can find st(i) approximately: Sample along diagonals and columns of “time  space” matrix to approximate st(i) for sampled i‘s (or find evidence for illegal environment, and reject). i i+j1 i+j2 i+j3 i+j4 j1 j2 < st(i) < j3 j2 j3 j4

11 Moving Objects – Some ideas and difficulties II
Refer to sub-test for approximately finding st(i) as “non-interruptible individual movement check”. (Sample along diagonals and columns of “time  space” matrix to approximate st(i) for sampled i‘s (or find evidence for illegal environment, and reject).) “For the same price” can perform “non crossing pairs check”

12 Moving Objects – Some ideas and difficulties III
At this point, if did not reject, “know” (with high confidence) that: “(almost) all objects move/stand in an (almost) non-interruptible way, (almost) without crossing each other” Source of two-sided error But, what is the relation between the moving and standing objects? Once a moving object stops, it should become a standing object. Perform a “matching of movement and standing check”. Use estimated times where sampled moving objects stopped moving and estimated times in which standing objects started to stand.

13 Moving Objects – Some ideas and difficulties IV
At this point, if did not reject, “know” (with high confidence) that close to an environment in which objects move, then stop and stand without interruptions and crossings. But, objects can’t just stop at their whim, there should be a reason for stopping (i.e., another object blocking their way). Perform “non-spaced standing check”. Roughly speaking, between certain pairs of object standing at time T, must have standing objects between them.

14 Moving Objects – Some ideas and difficulties IV
(Objects can’t just stop at their whim, there should be a reason for stopping (i.e., another object blocking their way).) Perform “non-spaced standing check”. Roughly speaking, between certain pairs of object standing at time T, must have standing objects between them. Full of standing objects

15 Moving Objects – Lower Bound for 1-sided error

16 Open Problems Price of time conformity when state is fully visible (viewing function V is identity) Benefit of adaptivity when state is fully visible Testing linear rules in polylog(n) (we show O(n) for <d, e.g., for d=1 binary field, get O(n0.8)). Extending the moving objects result to higher dimensions Extending the moving objects result to more complex (but natural) movement rules Sparse versions of moving objects (we have some results)

17 Thanks

18 Testing and Learning – quick reminder
? Let O be an object. 1 Given query access to O and approximation parameter (0,1], a Testing Algorithm for a (prespecified) property P should accept if O has P and reject if O is -far from having P. a Learning Algorithm should output hypothesis H s.t. H is -close to O. Alg has promise that O belongs to known class C (has the property of belonging to C) For both: distance is normalized Hamming (i.e. w.r.t. Uniform) and alg is allowed small constant error probability. Not hard to verify: Testing easier (not harder) than Learning

19 Dynamic Environments The object, environment E, can change with time.
1 t=0 t=1 The property: change is according to a prespecified rule R (or a rule that belongs to a prespecified class of rules R). Given query access to O and approximation parameter (0,1], a Testing Algorithm for a (prespecified) property P should accept if O has P and reject if O is -far from having P. a Learning Algorithm should output hypothesis H s.t. H is -close to O. Alg has promise that O belongs to known class C (has the property of belonging to C)

20 Environments of Moving Objects(*)
Consider environments in which initially a subset of the locations are occupied by objects (“basic creatures”). Each object either wants to move right, or to move left, or to stay in place. At each time step, each object moves according to its trajectory, unless the new location is occupied, in which case it stops moving. (*) Inspired by

21 Environments of Moving Objects
Consider environments in which initially a subset of the locations are occupied by objects (“basic creatures”). Each object either wants to move right, or to move left, or to stay in place. At each time step, each object moves according to its trajectory, unless the new location is occupied, in which case it stops moving.

22 Environments of Moving Objects - Definition
Environment ENV : {0,…,T} x [n]  {0,-1,+1,} where 0 = stand, -1 = move left, +1 = move right,  = empty location Denote: ENVj(i) = ENV(j,i). Assume initially dist > 1 between moving objects Evolution rule as described in previous slide. For example: ENVj(i) = +1 if ENVj-1(i-1) = and ENVj-1(i)  {0,-1} and ENVj-1(i+1)  -1 States are fully visible (viewing function V is identity).


Download ppt "On Testing Dynamic Environments"

Similar presentations


Ads by Google