On the minimal teaching sets of two-dimensional threshold functions

It is known that a minimal teaching set of any threshold function on the twodimensional rectangular grid consists of 3 or 4 points. We derive exact formulae for the numbers of functions corresponding to these values and further refine them in the case of a minimal teaching set of size 3. We also prove that the average cardinality of the minimal teaching sets of threshold functions is asymptotically 7/2. We further present corollaries of these results concerning some special arrangements of lines in the plane.

We study cardinality properties of a teaching set of a threshold function. The teaching set of a threshold function is a subset of the domain such that the values of the function in the points of the set allow to identify the values of the function in all other points of the domain. A teaching set of f is called to be minimal (or irreducible) iff no its proper subset is teaching for f . It is known (see, for example, [3,10,14]) that the minimal teaching set T (f ) for any threshold function f is unique (it is also true for threshold functions for more than 2 dimensions). In [10,12] it is proved that T (f ) consists of 3 or 4 points if m ≥ 2, n ≥ 2. Here we propose exact formulae for the number of threshold functions corresponding to these values. We prove that the average cardinality of the minimal teaching set is asymptotically 7 2 (if m, n → ∞). Also, we discuss some corollaries of this result concerning a special arrangements of lines in the plane.
We note that the cardinality of the minimal teaching set of threshold functions defined on many -dimensional grid is studied in a number of papers; see, for example bibliography in [13]. In particular, the bounds of the average cardinality of the minimal teaching set of threshold functions is studied in [3,11].
1 The cardinality of the minimal teaching set M 0 (f ), M 1 (f ) the set of zeros and the set of ones of f , respectively, i. e.
The function f is called to be threshold iff there exist real numbers a 0 , a 1 , a 2 such that Without loss of generality we can assume that the numbers a 0 , a 1 , a 2 are integer and a 1 , a 2 are not zero simultaneously. We call the line a 1 x 1 + a 2 x 2 = a 0 the separation line for the threshold function f . Note that, with any line a 1 x 1 + a 2 x 2 = a 0 , two threshold functions associate: a function f such that (1) holds and a function f ′ such that M 0 (f ) = {x ∈ E m × E n : a 1 x 1 + a 2 x 2 ≥ a 0 }. We denote T (m, n) the set of all threshold functions defined on E m × E n . Let t(m, n) = |T (m, n)|.
A set T ⊆ E m × E n is called to be teaching for f ∈ T (m, n) iff for any other function f ′ ∈ T (m, n) there exists x ∈ T such that f (x) = f ′ (x). A teaching set of f is called to be minimal or irreducible iff no its proper subset is teaching for f . A point It is known (see, for example, [3,10,14]), that the minimal teaching set is unique and contains all essential points and only them. Note that this is also true for threshold functions defined on many-dimensional grid.
Denote by T (f ) the minimal teaching set of f . In [10,12] it is shown that |T We define the average cardinality of the minimal teaching set as Denote by l(m, n) the number of lines through at least 2 points in E m × E n .
Proof. [7] (Sketch) We associate a threshold function to each ordered pair (p, p ′ ) of adjacent points in E m × E n as follows. Draw a line through the points p, p ′ and turn it around p through a small angle in a clockwise direction; see Fig. 3. The new line is related to two threshold functions. Let us consider the function such that the set of its zeros is for definiteness "to the right" of the vector − → p p ′ . One can show [7,15] that this (the asymptotics is true for m ≤ n).
Denote by t κ (m, n) the number of functions f ∈ T (m, n) such that |T (f )| = κ (κ = 3, 4). From Corollary 2 we get that each of the quantity t 3 (m, n) and t 4 (m, n) is asymptotically 1 2 t(m, n). Let us give exact formulae for t 3 (m, n) and t 4 (m, n).

Special arrangements of lines
For a threshold function f the set of vectors (a 0 , a 1 , a 2 ), where a 0 , a 1 , a 2 are coefficients of its separating line, is a polyhedral cone defined by the following system of linear inequalities: Furthermore, minimal teaching set T (f ) consists of the points that correspond to irredundant inequalities in (9). If we are interested in the lines that strictly separate the sets M 0 (f ) and M 1 (f ), then all inequalities in (9) have to be substituted by strict ones. Thus, there is a bijection the set T (m, n) into the set of open cones in the partition of the space of parameters a 0 , a 1 , a 2 by all the planes a 1 x 1 + a 2 x 2 = a 0 , where (x 1 , x 2 ) ∈ E m ×E n . Moreover, the planes that form the boundary of each of these cones correspond to the points in T (f ). This construction is well-known in threshold logic; see, for example, [10,14].
If f ∈ T ν (m, n) then without loss of generality we can assume that a 0 = 1. In this case the set of (a 1 , a 2 ) such that the line a 1 x 1 + a 2 x 2 = 1 is separating for f is the set of all solutions to the following system: Moreover, the numbers of them are, respectively, Analogous results can be obtained for separations of the plane a 1 , a 2 by the lines a 1 x 1 + a 2 x 2 = 1, where (x 1 , x 2 ) ∈ {1, 2, . . . , m} × {1, 2, . . . , n} etc. In particular, Fig. 4 shows such a separation of the first quarter of the plane.