Algebra Linear e Combinatória

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Lecture 3

Linear Algebra Methods in


Combinatorics
with Applications to Geometry and CS

= +

1 Matrices and rank (our tools today)


Look at these two matrices:
   
0 1 0 0 1 0
0 0 0 0 0 0
1 1 0 0 0 0

The determinant gives us the same answer (both nonsingular) but the one
on the left “looks reacher”.

The rank of a matrix is the maximum number of rows (or columns)


that are linearly independent.

Keep in mind the following:


• It is not obvious that the number of independent rows equals the num-
ber of independent columns (especially for non-square matrices);
• The rank depends on the underlying field, so we should write rankF (A)
when the matrix A ∈ Fn×m . For instance this matrix

1
0
··
·
1
1 0

can be singular over F2 , and nonsingular over Q.

In the sequel we simply write rank(A) when the result does not depend on
a particular field, or when the field has being specified at the beginning.

rank(A + B) ≤ rank(A) + rank(B) (1)

Today we solve a problem using this rank inequality (Section 2) and show
these properties of the rank (Section A).

2 Jigsaw puzzle with graphs


You have to cover all edges of the complete graph on n nodes using as few
complete bipartite graphs as possible, and every edge must be covered
exactly once.

What is the minimum number m = m(n) of bipartite graphs that


we must use?

Exercise 1. Show that m(n) ≤ n − 1.

Exercise 2. Suppose we allow edges to be covered more than once. Prove


that dlog2 ne bipartite graphs suffice, in this case.

2.1 First lower bound


a
For this problem it is a good idea to work over the field F = Q.
a
Maybe you can check what happens to the proof when F = F2 .

2
Consider the adjacency matrix of a bipartite graph, say Bi . The adjacency
matrix of the complete graph is K. The rank is the key:
rank(Bi ) = 2 and rank(K) = n (2)
Exercise 3. Prove these two identities.
Since every edge is covered exactly once
K = B1 + B2 + · · · + Bm
and (1) implies
n = rank(K) ≤ rank(B1 ) + · · · + rank(Bm ) = 2m
which implies our first lower bound:
You need m(n) ≥ n/2 bipartite graphs.

2.2 Improved lower bound


We want to replace the matrices Bi ’s with even “simpler” matrices that have
rank 1. We orient the edges of each bipartite graph from one side to the
other (no matter which one):
bipartite complete graph Xk ∪ Yk =⇒ matrix Ak
and Ak has 1 in column i and row j iff i ∈ Xi and j ∈ Yi (and 0 otherwise).
This picture shows how a matrix Bk changes into a matrix Ak (dark area
represent 1’s):

Bk Ak

Exercise 4. Prove that rank(Ak ) = 1.


Exercise 5 (wrong proof & and wrong bound). We have that
K = A1 + · · · + Am
which implies
n = rank(K) = rank(A1 + · · · + Am ) ≤ rank(A1 ) + · · · + rank(Am ) = m
Find the mistake in this proof, and explain why this bound cannot be true.

3
Correct proof. Consider the matrix
4
S = A1 + · · · + Am
We show that
rank(S) ≥ n − 1

which then implies a tight bound m(n) = n − 1.


Every edge of the complete graph is covered in “exactly one direction”
by our matrices Ak . That is, for every (i, j), either Sij = 1 or Sji = 1.
Translated in the matrix language
S + ST = K = J − I (3)
with J being the matrix with all 1’s and I the identity matrix (both n × n).

First trick: Sx = 0 =⇒ xT (S + S T )x = 0

Here is the proof:


xT (S T + S)x = xT (S T x + Sx) = xT (S T x + 0) = xT S T x = 0T x = 0.
By contradiction suppose rank(S) ≤ n − 2.
P
Second trick: rank(S) ≤ n − 2 =⇒ Sx = 0 with i xi = 0 for some
x 6= 0

To prove this recall that (for any m × n matrix A)


rank(A) ≤ n − 1 =⇒ Ax = 0 for some x 6= 0
If we add to S one row with all 1’s, the resulting matrix A has rank(A) ≤
rank(S) + 1 ≤ n − 1. Therefore Ax = 0 for some x 6= 0. The added row
4 P
1 = (1, . . . , 1) expresses the condition i xi = 0.

Put the things together


P
Since xi = 0 we have Jx = 0 and thus (3) gives us
0 = xT (S + S T )x = xT Kx = xT (J − I)x = xT (−x) = −||x||2 6= 0
This contradiction proves rank(S) ≥ n − 1. (Note: the last inequality,
−||x||2 6= 0, holds because we work with the field F = Q.)

4
2.3 The origin of this problem
Routing over an hypercube is very simple: look at the labels and move to
the neighbor that reduces your distance to the destination. For instance, to
go from 001 to 111 we follow the path

001 → 101 → 111

and the path is the shortest path in the graph.


I would like to put {0, 1}-address (a binary string) on the nodes of any
graph and do routing in the same way. For the triangle, I’m in trouble:
???

000 100

No matter what I write on the top node, two edges will be at distance 2
and routing will fail (try with “??? = 010”). The solution is to introduce a
jolly-joker “∗”, meaning that two coordinates are different only if one is 0
and the other one is 1:
1∗

00 01

If you label the edges by the coordinate in which the addresses of the end-
points are different, you should see the connection between this problem and
our “jigsaw puzzle with graph” (see the picture at page 1).

3 Subspace, Basis, and Dimension


In the sequel V is a linear space of finite dimension, that is, there exist a
finite subset of elements v1 , . . . , vN ∈ V such that V = span(v1 , . . . , vN ).

A subspace of V is a subset U ⊆ V such that the addition and scalar


product of V make U into a linear space.

5
A basis for U is a subset u1 , . . . , uk ∈ V such that

U = span(u1 , . . . , uk )
u1 , . . . , uk are linearly independent

In this case we say that U has dimension k,

dim(U ) = k

Remark 1. Note that any two basis for U must have the same cardinality.
If u1 , . . . , uk is a basis for U then every ui must be in U . (Exercise!)

3.1 Orthogonality
Consider the linear space of all vectors of lenght n over some field F

V = Fn

and the standard inner product between two such vectors


4
u · v = u1 v1 + · · · + un vn

(multiplications and additions over F.)


We say that u and v are orthogonal if their inner product is 0:

u⊥v ⇔ u·v =0

The orthogonal complement of a subset U ⊆ V is


4
U ⊥ = {v ∈ V | for all u ∈ U, v ⊥ u}

Exercise 6. Show that U ⊥ is always a subspace of V .

Rank Theorem

Theorem 1. For every subspace U of V

dim(U ) + dim(U ⊥ ) = n where n = dim(V )

We do not prove this theorem in this lecture.

6
3.1.1 Application to eventown
Recall from lecture 1:

Eventown Problem: All clubs must have even cardinality, their pair-
wise intersection must be even as well, and no two clubs can have the
same members: we want distinct subsets S1 , . . . , Sm ⊆ [n] such that

|Si | is even for all i (4)


|Si ∩ Sj | is even for all i 6= j (5)

What is the maximum number m = m(n) of such subsets?

We have seen in the first lecture a simple construction of 2bn/2c such subsets,
that is m(n) ≥ 2bn/2c . We now prove that this is the best possible
Theorem 2. The maximum number of clubs in Eventown is m(n) = 2bn/2c .
Proof. Consider the incidence vectors v1 , . . . , vm corresponding to the subsets
S1 , . . . , Sm satisfying the conditions of eventown above. This means that

vi · vi = 0 mod 2 for every i (6)


vi · vj = 0 mod 2 for every i 6= j. (7)

Now consider the subspace

U = span(v1 , . . . , vm )

and use (6)-(7) to show that (Exercise!)

U ⊆ U⊥

which then implies dim(U ) ≤ dim(U ⊥ ). This together with the Rank Theo-
rem
n = dim(V ) = dim(U ) + dim(U ⊥ )
implies dim(U ) ≤ bn/2c, that is

U = span(u∗1 , . . . , u∗k ) for k ≤ bn/2c

This tells us that |U | ≤ 2bn/2c (Exercise!).

7
4 What to remember and where to look
The rank of a matrix tells us “how rich/complex” is that matrix. The proof
for the jigsaw puzzle can be informally described in these terms:

If you want to build a “complex object” (high rank) using “simple


objects” (low rank), then you need many of them.

When working with vectors it might be a good idea to “pack” them into a
matrix and look at the rank to get a compact and elegant proof.

Another way to prove upper bounds on “the number of objects” based on


orthogonality and dimension of some subspace (an application to even-
town). We shall discuss these next exercise class together with the solution
to Eventown.

The jigsaw puzzle with graphs and its connection to the addressing problem
(Section 2.3) is described in [BF92, Section 1.4].

References
[BF92] L. Babai and P. Frankl. Linear algebra methods in combinatorics
with applications to geometry and computer science. The University
of Chicago, 1992.

A Linear Algebra: properties of the rank


In the following we fix an arbitrary field F. We consider matrices A, B, C ∈
Fn×m and linear independence of their columns (or rows) over F.

Definition 3. The row rank (resp., column rank) of a matrix is the


maximum number of rows (resp., columns) that are linearly independent.

Consider a generic matrix


  
− r1 −

| |
A = c1 · · · cm  = 
 .. 
 . 
| | − rn −

8
Let α and β be the row and the column rank of A, respectively. Then there
are α rows (and β columns) that “generate/span” all rows (all columns) of
A:

For α and β being the column and the row rank of A

span(c1 , . . . , cm ) = span( cj1 , . . . , cjα ) (8)


| {z }
independent
span(r1 , . . . , rn ) = span( ri1 , . . . , riβ ) (9)
| {z }
independent

Exercise 7. Prove (9) and (8).


This theorem says that we can simply talk about the rank of a matrix:

Theorem 4. The row rank is equal to the column rank.

Proof. For any matrix


  
− r1 −

| |
A = c1 · · · cm  = 
 .. 
 . 
| | − rn −

let α = rowrank(A) and thus c1 , . . . , cm ∈ span(ci1 , . . . , ciα ) by (8). Let us


consider the matrix with only these α columns from A:
 
| |
A 0 =  ci 1 · · · ci α 
| |

Every ci can be written as a linear combination of these columns, that is


ci = A0 λi for some vector λi of length α. In the “language” of matrix
multiplication we have
  
− r −
   
| | | | | | 1
A =  c1 · · · cm  =  ci 1 · · · ci α   λ 1 · · · λ m  = 
 .. 
. 
| | | | | | − rn −
| {z }| {z }
A0 Λ

9
The definition of matrix multiplication says that the rows r1 , . . . , rn of A are
a linear combination of the rows of Λ. That is r1 , . . . , rn ∈ span(λ1 , . . . , λα ),
where λi is the ith row of the matrix Λ. The Linear Algebra Bound
(Theorem 1 in Lecture 2) and (9) imply β ≤ α. That is,

rowrank(A) ≤ colrank(A)

for any matrix A. By applying this to the transpose AT we get the opposite
inequality.

Theorem 5. rank(A + B) ≤ rank(A) + rank(B)

Proof. We have our three matrices


     
| | | | | |
c1 · · · cm  = a1 · · · am  +  b 1 · · · bm 
| | | | | |

Take a basis for the columns of C, of A and of B

ĉ1 , . . . , ĉrc for rc = rank(C)


â1 , . . . , âra for ra = rank(A)
b̂1 , . . . , b̂ra for rb = rank(B)

Observe that

ĉ1 , . . . , ĉrc ∈ span(a1 , . . . , am , b1 , . . . , bm ) = (10)


| {z }
independent

span(â1 , . . . , âra , b̂1 , . . . , b̂rb ) (11)

Then Linear Algebra Bound (Theorem 1 in Lecture 2) implies rc ≤ ra +rb .

10
Exercises
(during next exercise class - 9.3.2017)
We shall discuss and solve together the following exercise:

Exercise 1 (Jigsaw puzzle with graphs – a wrong proof). The matrices


A1 , . . . , Am associated to our bipartite graphs are now obtained by orienting
the edges in a “smart” way:
1 4

2 3

that is always go from node i to node j > i. Then the sum of all these
matrices, S = A1 + · · · + Am , is like this
0
··
·
1
0 0

and it is immediate to see that rank(S) = n − 1. We conclude that

n − 1 ≤ rank(S) ≤ rank(A1 ) + · · · + rank(Am ) = m

Show that this proof is not correct (which of these steps are correct and which
are wrong?).

If time allows, we shall present the solution of Eventown in Section 3 and


discuss the related material (subspace, dimension, orthogonality).

You might also like