Suppose that *f* : *G* → *G* is a map with the property that *f* fixes exactly *r* vertices, i.e., there are exactly *r* vertices with the property that *f*(*V*) = *V*. This means that there are exactly *v* - *r* vertices that are *unfixed*. We will let *U*(*f*, *G*) denote the number of unfixed vertices of *G* under *f*. In this section we show that if *f* : *G* → *G* is homotopic to the identity then the trace of *M*(*L*_{
f
} ) equals *e* - *U*(*f*, *G*).

**Theorem (trace theorem)**. *Let f be a vertex map on G. Suppose that f is homotopic to the identity map on G. Then Trace*(*M*(*f*)) = *e* - *U*(*f*, *G*).

The proof is given below. The outline is to first prove it for trees, which is straightforward. Then we need to calculate the trace of *M*(*f*) for general graphs. This is done by introducing the chain group and seeing that the matrix induces a homomorphism. Then a new basis is chosen for the chain group. The induced map on chains gives a new matrix that is similar to *M*(*f*), but such that it is simple to calculate its trace.

### 7.1. Proof of the Trace theorem when *G* is a tree

First the case when *G* is a tree. (This is a slight generalization of a result in [2], where it was proved for the case when none of the vertices are fixed by *f*.)

*Proof*. For each unfixed vertex, *V*_{
i
} there is a fully contracted path from *V*_{
i
} to *f*(*V*_{
i
} ) that will be denoted *P*(*V*_{
i
} ). The initial vertex in this path is *V*_{
i
} . At *V*_{
i
} draw an arrow (direction arrow) pointing along the first edge of *P*(*V*_{
i
} ). We repeat this process for each of the unfixed vertices in *G*. If a vertex *V* is fixed then no direction arrows are drawn at *V*.

Observe that an edge *E*_{
i
} contains two direction arrows if and only if - *E*_{
i
} is in *L*_{
f
} (*E*_{
i
} ). Also observe that *E*_{
i
} contains no direction arrows if and only if *E*_{
i
} is in *L*_{
f
} (*E*_{
i
} ). Finally, an edge contains one direction arrow if and only if *L*_{
f
} (*E*_{
i
} ) does not contain either *E*_{
i
} or - *E*_{
i
} . Notice that the number of arrows on the edge *E*_{
i
} is exactly 1 - *M*(*f*)_{i,i}. So the total number of arrows is . However, there are exactly *U*(*f*, *G*) arrows in *G*, one for each unfixed vertex, so *U*(*f*, *G*) = *e* - *Trace*(*M*(*f*)).

### 7.2. Chain groups

An integral 1-chain is a formal sum , where *a*_{
i
} are integers. Addition of chains is defined by

Thus 1-chains form a free abelian group with *e* generators. The coordinate vector of a 1-chain relative to the ordered basis (*E*_{1}, *E*_{2}, ..., *E*_{
e
} ) is [*a*_{1}, *a*_{2}, ..., *a*_{
e
} ] ^{T} .

The Oriented Markov Matrix, *M*(*f*), defines a homomorphism from the chain group to itself by sending the 1-chain with coordinate vector **v** to *M*(*f*)**v**. Notice that this is entirely consistent with the previous interpretation of *M*(*f*), in that for any path *P* in *G* we can find the coordinate vector **v**; the coordinate vector of the image of *P* under *L*_{
f
}is *M*(*f*)**v**.

### 7.3. Spanning trees-change of basis

Let *T* denote a spanning tree for *G*. This contains *v* - 1 edges, we will denote them . There are then *e* + 1 - *v* edges in *G* that do not appear in *T*. For each edge, *E*, that is in *G*, but not *T* choose a circle in *G* that consists of *E* plus edges in *T*. In this way *e* + 1 - *v* circles are obtained, denoted *C*_{1}, ..., *C*_{e+1-v}.

Notice that if *E*_{
i
} is the edge in *C*_{
i
} that does not belong to *T*, then there exist paths *P*_{1} and *P*_{2} in *T* such that *E*_{
i
} = FC(*P*_{1}*C*_{
i
}*P*_{2}). This means that any fully contracted path in *G* can be expressed as the contraction of a path that is written only using .

We now consider the matrix, *N*, that represents the homomorphism on 1-chains with respect to the ordered basis

Since *f* is homotopic to the identity and *C*_{
i
} is a circle, we have *L*_{
f
} (*C*_{
i
}) = *C*_{
i
} . This means that

where *I* is the (*e* + 1 - *v*) × (*e* + 1 - *v*) identity matrix and 0 is the (*v* - 1) × (*e* + *v* - 1) zero matrix.

The matrices *M*(*f*) and *N* are similar, because they represent the same homomorphism with respect to different bases. This means

but

To complete the proof we must calculate *Trace*(*B*).

### 7.4. Completion of the proof

For each edge in *T* we know that can be written as a path using . Since circles both begin and end at the same vertex, notice that if we delete all the circles in this path we obtain a new path that lies entirely in *T* and has the same endpoints as *L*_{
f
} (*E*_{
i
} ). We define *f'* to be the map on *T* defined in this way. Note that *f'* is a vertex map on *T* with vertex permutation given by *θ*. Also note that *M* (*f'*) = *B*. Thus by the proof for trees we know that *Trace*(*B*) = *v -* 1 - *U* (*f*, *G*).

In the previous section it was shown that

So we obtain

which completes the proof.

### 7.5. Example 1 continued

In this subsection we illustrate the construction using Example 1.

We take as the spanning tree the tree formed by the edges *E*_{1}, *E*_{3}, *E*_{5} and *E*_{6}. Then there are two circles. We let *C*_{1} = *E*_{3}*E*_{4}*E*_{5}*E*_{6} and *C*_{2} = *E*_{1}*E*_{2}- *E*_{3}. The new ordered basis for the chain group is (*C*_{1}, *C*_{2}, *E*_{1}, *E*_{3}, *E*_{5}, *E*_{6}). Notice that *E*_{2} = - *E*_{1}*C*_{2}*E*_{3} and *E*_{4} = -*E*_{3}*C*_{1}*E*-_{6}-*E*_{5}. So *L*_{
f
} (*E*_{1}) = -*E*_{3}*E*_{1}*E*_{2}*E*_{4} = -*E*_{3}*E*_{1} - *E*_{1}*C*_{2}*E*_{3} - *E*_{3}*C*_{1} - *E*_{6}- *E*_{5} which can be contracted to -*E*_{3}*C*_{2}*C*_{1}- *E*_{6}- *E*_{5}. In this way we obtain

The map *f'* on the spanning tree permutes the vertices in exactly the same way as *f* but maps the edges in the following way: *f'*(*E*_{1}) = -*E*_{3} - *E*_{6} - *E*_{5}, *f'*(*E*_{3}) = -*E*_{3} - *E*_{6}, *f'*(*E*_{5}) = - *E*_{1} and *f'*(*E*_{6}) = *E*_{3}.