b

DiscoverSearch
About
My stuff
On the minimal teaching sets of two-dimensional threshold functions
2013·arXiv
Abstract
Abstract

It is known that a minimal teaching set of any threshold function on the two-dimensional 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.

Keywords: threshold function, integer lattice, teaching set, arrangement of lines

AMS subject classifications: 05A15, 05A18, 05B35, 52C05, 52C30, 68Q32

A mapping of the domain  {0, 1, . . . , m − 1} × {0, 1, . . ., n − 1} into {0, 1}, is called a threshold function iff there exists a line separating the sets of its ones and zeros (points at which the function takes values 1 and 0, respectively).

A teaching set of a threshold function g is a subset of its domain such that the values of g at the points from this set uniquely define the function. A teaching set of g is called minimal (or irreducible) iff no its proper subset is teaching for g. It is known (e.g., see [3, 9, 13]) that the minimal teaching set T(g) for any threshold function g is unique (this also holds for threshold functions in higher dimensions). In [9, 11] it is proved that T(g) consists of 3 or 4 points if m  ≥ 2, n ≥2. Here we derive exact formulae for the number of threshold functions corresponding to these values. In the case when T(g) consists of 3 points, we further compute the number of threshold functions g with the specified number (one or two) of zeros in T(g), answering the question posed in [2]. We also prove that the average cardinality of the minimal teaching set is asymptotically 7/2 as m, n → ∞. Finally,we discuss some corollaries of this result concerning special arrangements of lines in the plane.

We remark that the cardinality of the minimal teaching set of threshold functions defined on many -dimensional grid is studied in a number of publications (e.g., see the bibliography in [12]). In particular, the bounds of the average cardinality of the minimal teaching set of threshold functions are given in [3, 10].

Let m  ≥ 2, n ≥ 2, Em = {0, 1, . . . , m − 1}, g : Em × En → {0, 1}. We denote by M0(g), M1(g) the set of zeros and the set of ones of g, respectively, that is

image

The function g is called threshold iff there exist real numbers a0, a1, a2 such that

image

Without loss of generality we can assume that the numbers a0, a1, a2 are integer and a1, a2 are not zero simultaneously. We call the line a1x1  + a2x2 = a0 aseparation line for the threshold function g. Note that for any line a1x1  + a2x2 = a0, there are two associated threshold functions: a function g defined by (1) holds and a function h with M0(h)  = {(x1, x2) ∈ Em × En : a1x1 + a2x2 > a0}, which also satisfy g(x) + h(x) = 1 for any x  ∈ Em × En.

LetT (m, n)be the setofall threshold functionsdefined on Em×En and t(m, n) = |T (m, n)|.

image

Two distinct points p, p′ in Em × Enare called adjacent if and only if the line segment [p, p′] contains no other point from Em  × En.

image

9

image

Figure 1: Threshold functions g, h on E10 ×E10 with |T(g)| =3 (left panel) and |T(h)| = 4 (right panel) and their separation lines. The empty dots represent zeros of the function, while the circled dots form its minimal teaching set.

Lemma 1 ([1, 6]). The number of ordered pairs (p, p′)of adjacent points in Em×En equals f1(m, n).

Lemma 2 ([5]). If m  ≤ n then

image

Denote by l(m, n) the number of lines passing through at least two points in Em  × En.

Lemma 3 ([7, 4]).

image

Theorem 4 ([6]).

image

Corollary 5.

image

where asymptotics holds for m  ≤ n.

We remark that the asymptotic behavior of t(m, n) was studied by many authors (sometimes using different terminology), for example, [6, 1, 8, 2, 14, 5].

A set T  ⊆ Em × En is called teaching for g ∈ T (m, n) ifffor any other function h  ∈ T (m, n)there exists x  ∈ T such that g(x) � h(x). A teaching set of g is called minimal or irreducible iff no its proper subset is teaching for g. A point x  ∈ Em × En is called essential for g ∈ T (m, n)iff there exists h  ∈ T (m, n) such that g(x)  � h(x) and g(y) = h(y) for all y � x.

Lemma 6 ([3, 9, 13]). For any function g  ∈ T (m, n), the minimal teaching set of g is unique and consists of all essential points of g.

We remarkthatLemma 6 alsoholdsforthreshold functionsdefined on many-dimensional

grid.

Denote by T(g) the minimal teaching set of g. In [9, 11] it is shown that  |T(g)| ∈ {3, 4}

image

Theorem 7.

image

Proof. Denote by h(m, n, i, j) the number of threshold functions defined on the domain Em  × Ensuch that the point (i, j) is essential. By Lemma 6,

image

Let us consider all lines containing the point (i, j) and at least one other point from Em  × En. Denote by L(m, n, i, j) the set of all such lines (see Fig. 2) and let l(m, n, i, j) = |L(m, n, i, j)|. The lines from L(m, n, i, j) partition the plane into 2  · l(m, n, i, j) sectors.

It is easy to see that any line  ℓ′ � L(m, n, i, j) containing the point (i, j) is associated with two threshold functions, for which the point (i, j) is essential and a zero (Fig. 2). It is clear that these functions are uniquely determined by the two lines from L(m, n, i, j) adjacent to ℓ′. Moreover, there is no other function in T (m, n), for which the point (i, j) is essential and a zero.

Thus, we have 2  · l(m, n, i, j) threshold functions for which the point (i, j) is essential and a zero. We have the same number of functions for which the point (i, j) is essential and not a zero (i.e., the value at (i, j) is 1). Hence h(m, n, i, j) = 4 · l(m, n, i, j). Now from (7) we get

image

Let L(m, n) be the set of all lines passing through at least two points from Em  × En andl(m, n) = |L(m, n)|. For a line  ℓ ∈ L(m, n), we denote by z(m, n, ℓ) the number of points in

image

Figure 2: The lines forming L(4, 4, 1, 1) with l(4, 4, 1, 1) = 8 and a line  ℓ′ � L(4, 4, 1,1) defining two threshold functions.

Em  × Enbelonging to  ℓ. Now from (8) we get

image

We remark that if  ℓcontains exactly k points from Em  × En, then they form k  −1 adjacent pairs of points. Then by Lemma 1,

image

Substituting here the expressions (2) and (3), we obtain (6). □

Theorem 7 and Lemma 2 imply the following asymptotics for

Corollary 8. For m  ≤ n,

image

Denote by tκ(m, n) the number of functions g  ∈ T (m, n) such that  |T(g)| = κ (κ ∈ {3, 4}).Corollary 8 implies that each of the quantities t3(m, n) and t4(m, n) is asymptotically 12t(m, n). Below we give exact formulae for t3(m, n) and t4(m, n).

Theorem 9.

image

Proof. From the conditions

image

we obtain

image

Substitution of the expressions (3) and (6) here completes the proof. □

It is known that a minimum teaching set of a non-constant threshold function g with |T(g)| = 4 always contains two zeros [11]. The threshold functions g with |T(g)| = 3 can be classified depending on whether their minimal teaching sets contain one or two zeros. The question of counting threshold functions in these classes was posed and partially answered in [2]. Below we give a complete answer to this question.

Let uν,κ(m, n) be the number of threshold functions g on Em  × En with |T(g)| = 3 suchthat g(0, 0) = ν (ν ∈ {0, 1}) and a minimum teaching set of g consists of  κzeros and 3  − κones (κ ∈ {1, 2}). The number u0,1(m, n) enumerates so-called unstable threhold functions [2]:

image

which can be also expressed as

image

Theorem 11.

image

Furthermore, for any  ν ∈ {0, 1}, κ ∈ {1, 2}, and m ≤n, we have

image

Proof. Trivially, we have u0,1(m, n)+u0,2(m, n)+u1,1(m, n)+u1,2(m, n) = t3(m, n). Furthermore, the bijection g  �→ 1− gimplies that uν,κ(m, n) = u1−ν,3−κ(m, n) and thus we can focus only on the case  ν =0, for which u0,1(m, n) + u0,2(m, n) = 12t3(m, n). The exact formulae now easily follow from Theorem 9 and Lemma 10. To obtain the asymptotics, we use Lemma 2 and notice that s(m, n) = O(mn). □

image

Figure 3: The partition of the plane  {(a1, a2) ∈ R2}by the lines a1x1  + a2x2 =1, where (x1, x2) ∈ E3 × E3 \ {(0, 0)}.There are c(3, 3) = 29 cells, c3(3, 3) =20 generalized 3-polygons, c4(3, 3) = 9 generalized 4-polygons, e(3, 3) = 43 edges, and v(3, 3) = 15 vertices in this partition.

5.1 Partition of the plane

For a threshold function g  ∈ T (m, n), all vectors (a0, a1, a2) ∈ R3, where a0, a1, a2 are coef-ficients of its separating line, form a polyhedral cone defined by the following system of linear inequalities:

image

Furthermore, a minimal teachingsetT(g)consistsofthe pointsfrom Em×Enthatcorrespond to irredundant inequalities in (9). Thus, there is a bijection of the set T (m, n) into the set of cones in the partition of the space of parameters  {(a0, a1, a2) ∈ R3}by all the planes a1x1  + a2x2 = a0, where (x1, x2) ∈ Em × En \ {(0, 0)}. Moreover, the planes that form the boundary of each of these cones correspond to the points in T(g). This construction is well known in the threshold logic [9, 13].

For  ν ∈ {0, 1}, let Tν(m, n) = {g ∈ T (m, n) : g(0, 0) = ν}. The mapping g  �→ 1 − grepresents a bijection between the sets  T0(m, n) and T1(m, n), for which the teaching sets are invariant.

Without loss of generality, for g  ∈ T0(m, n), we can assume that a0 = 1. In this case the points (a1, a2) ∈ R2 such that the line a1x1  + a2x2 =1 is separating for g represent the solutions to the following system of linear inequalities:

image

So we have the bijection of the set  T0(m, n) into the set of all polygonal cells in the partition of the plane  {(a1, a2) ∈ R2}by the lines a1x1  + a2x2 =1, where (x1, x2) ∈ Em × En \ {(0, 0)}(see Fig. 3).

Let c(m, n), e(m, n), v(m, n) be respectively the number of cells, edges, and vertices (i.e., intersection points) in this partition. We call a convex polygon (possibly unbounded) by a generalized k-polygon if it can be obtained as the intersection of an k-faced polyhedral cone with a plane that does not contain the cone vertex. Every unbounded generalized k-polygon representing a cell in the partition has two parallel or two non-parallel infinite edges (i.e., rays). In the former case, the polygon has k  −1 vertices; in the latter case, it has k  −2 vertices.

Theorem 12. The cells in the partition of the plane  {(a1, a2) ∈ R2}by the lines a1x1  + a2x2 = 1,where (x1, x2) ∈ Em × En, are only generalized 3- and 4-polygons. The number of such cells is, respectively,

image

which imply that

image

Moreover,

image

where s(m, n) is defined in Lemma 10. Everywhere above the asymptotics holds for m  ≤ n.

Proof. The number of cells is c(m, n) = |T0(m, n)| = 12t(m, n).Among them there are c3(m, n) = 12t3(m, n)generalized 3-polygonsand c4(m, n) = 12t4(m, n)generalized 4-polygons, since the mapping g  �→ 1 − gis a bijection between  T0(m, n) and T1(m, n), for which the teaching sets are invariant. To obtain (10) and (11) it remains to apply Theorem 9 and Lemma 2.

Let v∞(m, n) be the number of infinite vertices (i.e., families of parallel lines) in the partition, which also equals the total number of infinitely-distant edges in the unbounded generalized polygons. Each family of parallel lines is defined by the slope, which may be zero (for the horizonal lines), infinite (for the vertical lines), or represent an irreducible fractionpq with 1  ≤ p ≤ m − 1 and 1 ≤ q ≤ n−1. Since the number of such fractions is given by s(m, n), we have v∞(m, n) = s(m, n) + 2.

Since 3c3(m, n) + 4c4(m, n) gives twice the number of edges including infinitely-distant ones, we have 3c3(m, n) + 4c4(m, n) = 2e(m, n) + 2v∞(m, n),which together with (10) implies (12).

To find the number of vertices, we apply Euler characteristic for the plane: v(m, n) −e(m, n) + c(m, n) = 1 and use (11) and (12) to obtain (13). □

image

Figure 4: The partition of the triangle by the lines a1x1  +a2x2 =1, where (x1, x2) ∈ {1, 2, 3, 4}×{1, 2, 3, 4}. Thereare c△(4, 4) = 47 cells, c△3 (4, 4) =33 triangles, c△4 (4, 4) =14 quadrilaterals, e△(4, 4) =82 edges, and v△(4, 4) = 36vertices in this partition.

5.2 Partition of the triangle

Now we consider the triangle with vertices (0, 0), (1, 0), (0, 1) in the plane  {(a1, a2) ∈ R2} andits partition by the lines a1x1  + a2x2 =1, where (x1, x2) ∈ {1, 2, . . . , m} × {1, 2, . . . , n} (Fig. 4).Let c△(m, n), e△(m, n), v△(m, n) be respectively the number of cells, edges, and vertices in this partition.

Theorem 13. Every cell in the partition of the triangle with vertices (0, 0), (1, 0), (0, 1) by the lines a1x1  + a2x2 = 1, where (x1, x2) ∈ {1, 2, . . . , m} × {1, 2, . . . , n}, m ≥ 2, n ≥ 2, there is either a triangle or a quadrilateral. Moreover, the number of triangles and quadrilaterals is given by the following formulae:

image

which imply that

image

Moreover,

image

Everywhere above the asymptotics holds for m  ≤ n.

Proof. We notice that all cells incident to the axes are triangular and use Theorem 12 to obtain

image

The number e△(m, n) of edges satisfies the equality: 2e△(m, n) = 3c△3(m, n) + 4c△4(m, n) + m +n + 1, which implies (14). Now we use Euler characteristic for the triangle: v△(m, n) −e△(m, n) + c△(m, n) =1 to obtain (15). □

The first author was supported by the National Science Foundation under the grant No. IIS-1253614.

[1] D. M. Acketa and J. D. ˇZuni´c,On the number of linear partitions of the (m, n)-grid, Inform. Process. Lett., 38 (1991), pp. 163–168.

[2] M. A. Alekseyev, On the number of two-dimensional threshold functions, SIAM J. Discrete Math., 24 (2010), pp. 1617–1631.

[3] M. Anthony, G. Brightwell, and J. Shawe-Taylor, On specifying Boolean functions by labelled examples, Discrete Appl. Math., 61 (1995), pp. 1–25.

[4] P. Haukkanen and J. K. Merikoski, Some formulas for numbers of line segments and lines in a rectangular grid, Ars Combin., 104 (2012), pp. 353–361.

, Asymptotics of the number of threshold functions on a two-dimensional rectangular grid, Discrete Appl. Math., 161 (2013), pp. 13–18.

[6] J. Koplowitz, M. Lindenbaum, and A. Bruckstein, The number of digital straight lines on an N  × N grid, IEEE Trans. Inform. Theory, 36 (1990), pp. 192–197.

[7] S. Mustonen, On lines and their intersection points in a rectangular grid of points, preprint, (2009). http://www.survo.fi/papers/PointsInGrid.pdf.

[8] V. N. Shevchenko, Qualitative Topics in Integer Linear Programming, vol. 156 of Translations of Mathematical Monographs, AMS, 1997.

[9] V. N. Shevchenko and N. Y. Zolotykh, On the complexity of deciphering the threshold functions of k-valued logic, Dokl. Math., 58 (1998), pp. 268–270.

[10] M. A. Virovlyanskaya and N. Y. Zolotykh, An upper bound for the average cardinality of minimal teaching set of a threshold function of many-valued logic, Vestn. Nizhegorod. Univ. N. I. Lobachevskogo, Mat. Model. Optim. Upr., (2003), pp. 238–246. (in Russian).

[11] N. Y. Zolotykh, On the complexity of deciphering threshold functions in two variables, in Proceedings of XI International school-seminar “Synthesis and complexity of control systems”. Part I, Center of applied research of MSU Faculty of Mechanics and Mathematics, 2001, pp. 74–79. (in Russian).

[12]

, Bounds for the cardinality of the minimal teaching set of a threshold function of many-valued logic, Mathematical Topics in Cybernetics, 17 (2008), pp. 159–168. (in Russian).

[13] N. Y. Zolotykh and V. N. Shevchenko, Estimating the complexity of deciphering a threshold functions in a k-valued logic, Comput. Math. Math. Phys., 39 (1999), pp. 328– 334.

[14] J. Zunic, Note on the number of two-dimensional threshold functions, SIAM J. Discrete Math., 25 (2011), pp. 1266–1268.


Designed for Accessibility and to further Open Science