# Upper and lower bounds

**Upper and lower bounds for [math]c_n[/math] for small values of n.**

## Basic constructions

For all [math]n \geq 1[/math], a basic example of a mostly line-free set is

- [math]D_n := \{ (x_1,\ldots,x_n) \in [3]^n: \sum_{i=1}^n x_i = 0 \ \operatorname{mod}\ 3 \}[/math].

This has cardinality [math]|D_n| = 2 \times 3^{n-1}[/math]. The only lines in [math]D_n[/math] are those with

- A number of wildcards equal to a multiple of three;
- The number of 1s equal to the number of 2s modulo 3.

One way to construct line-free sets is to start with [math]D_n[/math] and remove some additional points.

Another useful construction proceeds by using the slices [math]\Gamma_{a,b,c} \subset [3]^n[/math] for [math](a,b,c)[/math] in the triangular grid

- [math]\Delta_n := \{ (a,b,c) \in {\Bbb Z}_+^3: a+b+c = n \},[/math].

where [math]\Gamma_{a,b,c}[/math] is defined as the strings in [math][3]^n[/math] with [math]a[/math] 1s, [math]b[/math] 2s, and [math]c[/math] 3s. Note that

- [math]|\Gamma_{a,b,c}| = \frac{n!}{a! b! c!}.[/math]

Given any set [math]B \subset \Delta_n[/math] that avoids equilateral triangles [math] (a+r,b,c), (a,b+r,c), (a,b,c+r)[/math], the set

- [math]\Gamma_B := \bigcup_{(a,b,c) \in B} \Gamma_{a,b,c}[/math]

is line-free and has cardinality

- [math]|\Gamma_B| = \sum_{(a,b,c) \in B} \frac{n!}{a! b! c!},[/math]

and thus provides a lower bound for [math]c_n[/math]:

- [math]c_n \geq \sum_{(a,b,c) \in B} \frac{n!}{a! b! c!}.[/math]

All lower bounds have proceeded so far by choosing a good set of B. Note that [math]D_n[/math] is the same as [math]\Gamma_{B_n}[/math], where [math]B_n[/math] consists of those triples [math](a,b,c) \in \Delta_n[/math] in which [math]a \neq b\ \operatorname{mod}\ 3[/math].

Note that if one takes a line-free set and permutes the alphabet [math]\{1,2,3\}[/math] in any fashion (e.g. replacing all 1s by 2s and vice versa), one also gets a line-free set. This potentially gives six examples from any given starting example of a line-free set, though in practice there is enough symmetry that the total number of examples produced this way is less than six. (These six examples also correspond to the six symmetries of the triangular grid [math]\Delta_n[/math] formed by rotation and reflection.)

Another symmetry comes from permuting the [math]n[/math] indices in the strings of [math][3]^n[/math] (e.g. replacing every string by its reversal). But the sets [math]\Gamma_B[/math] are automatically invariant under such permutations and thus do not produce new line-free sets via this symmetry.

## The basic upper bound

Because [math][3]^{n+1}[/math] can be expressed as the union of three copies of [math][3]^n[/math], we have the basic upper bound

- [math]c_{n+1} \leq 3 c_n.[/math]

Note that equality only occurs if one can find an [math]n+1[/math]-dimensional line-free set such that every n-dimensional slice has the maximum possible cardinality of [math]c_n[/math].

## n=0

Clearly [math]c_0=1[/math].

## n=1

The three sets [math]D_1 = \{1,2\}[/math], [math]\{2,3\}[/math], and [math]\{1,3\}[/math] are the only two-element sets which are line-free in [math][3]^1[/math], and there are no three-element sets, so [math]c_1=2[/math].

## n=2

There are three six-element sets in [math][3]^2[/math] which are line-free, which we denote x, y, and z, and are displayed graphically as follows.