<<

Computational Complexity Reductions using Clifford Algebras

Ren´eSchott,∗ G. Stacey Staples†

1 Introduction

This paper is an extension of earlier work (cf. [18]), in which the current au- thors investigated complexity reductions for a number of combinatorial and graph-theoretic problems. The graph-theoretic results of that paper were based primarily on nilpotent adjacency methods developed in a number of earlier publications: [16], [17], [19], [20], [21]. The previous graph results are recalled in summary in Section 3, where ad- ditional examples are computed using Mathematica. In Section 4, new results are obtained and some previous results are improved by eliminating adjacency matrices, thereby removing the consideration of matrix multiplication in deter- mining computational complexity. Moreover, results on graph and vertex coverings by disjoint “proper” cycles are obtained by introducing the “three-nil algebra” constructed within a Clif- ford algebra of appropriate signature. The generators {ξj}1≤i≤n of this algebra 3 satisfy ξi ξj = ξj ξi and ξj = 0 for 1 ≤ i, j ≤ n. Given a computing architecture based on Clifford algebras, the natural con- text for determining an ’s is in terms of the number of geometric (Clifford) operations required. This paper assumes the existence of such a processor and examines a number of combinatorial problems known to be of NP time complexity. While Clifford algebra computations can be performed on general purpose processors through the use of software libraries like CLU [13], GluCat [10], GAIGEN [6], and the Maple package CLIFFORD [1], direct hardware implemen- tations of data types and operators is the best way to exploit the computational power of Clifford algebras. To this end, a number of hardware implementations have been developed. To our knowledge, the first such hardware implementation was a Clifford co-processor design developed by Perwass, Gebken, and Sommer [14]. Another

∗IECN and LORIA Universit´eHenri Poincar´e-NancyI, BP 239, 54506 Vandoeuvre-l`es- Nancy, France, email: [email protected] †Department of and , Southern Illinois University Edwardsville, Edwardsville, IL 62026-1653, email: [email protected]

1 was the color edge detection hardware developed by Mishra and Wilson [11], [12], whose work focused on the introduction of a hardware architecture for applications involving processing. More recently, Gentile, Segreto, Sorbello, Vassallo, Vitabile, and Vullo have developed a parallel embedded co-processing core that directly supports Clifford algebra operators (cf. [7], [8], [9]). The prototype was implemented on a Programmable Gate Array, and initial tests showed a 4× speedup for Clifford products over the analogous operations in GAIGEN. Also of interest is the work of Aerts and Czachor [2], who have shown that quantum-like computations can be performed within Clifford algebras without the associated problem of noise and need for error-correction.

2 Preliminaries

Definition 2.1 (Clifford algebra of signature (p, q)). For fixed n ≥ 1, the n 2 -dimensional algebra C`p,q (p + q = n) is defined as the generated by the collection {ei} (1 ≤ i ≤ n) along with the scalar e0 = e∅ = 1 ∈ R, subject to the following multiplication rules:

ei ej = −ej ei for i 6= j, (2.1) ( 2 1 1 ≤ i ≤ p, and ei = (2.2) −1 p + 1 ≤ i ≤ n.

Products are multi-indexed by subsets of [n] = {1, . . . , n} (in canonical or- der) according to Y ei = eι, (2.3) ι∈i where i is an element of the power set 2[n]. Define fi = (ei + e2n+i) ∈ C`2n,2n for each 1 ≤ i ≤ 2n. Then by defining ζi = f2i−1 f2i for each 1 ≤ i ≤ n, the following useful algebra is obtained. nil Definition 2.2. Let C`n denote the real abelian algebra generated by the collection {ζi} (1 ≤ i ≤ n) along with the scalar 1 = ζ0 subject to the following multiplication rules:

ζi ζj = ζj ζi for i 6= j, and (2.4) 2 ζi = 0 for 1 ≤ i ≤ n. (2.5)

nil It is evident that a general element u ∈ C`n can be expanded as X u = ui ζi , (2.6) i∈2[n]

[n] where i ∈ 2 is a subset of [n] = {1, 2, . . . , n} used as a multi-index, ui ∈ R, Y and ζi = ζι. ι∈i

2 nil Given u ∈ C`n , define the grade-k part of u by X huik = ui ζi, (2.7) |i|=k where |i| denotes the cardinality of the multi-index i. 2 Recalling the Clifford algebra C`p,q,r defined by Porteous[15], in which ei = 0 for p+q+1 ≤ i ≤ p+q+r, one could simply define ζi = e2i−1 e2i for 1 ≤ i ≤ n in the Clifford algebra C`0,0,2n. Equivalently, one could use disjoint of the Grassmann algebra. nil 3 Note that defining ξi = ζ2i−1 + ζ2i ∈ C`2n for 1 ≤ i ≤ n gives ξi = 0 and ξiξj = ξjξi. This construction leads to another useful .

Definition 2.3. Let n > 0 be an , and let the collection {ξ1, . . . , ξn} k satisfy the following: ξi = 0 if and only if k ≥ 3 for each 1 ≤ i ≤ n and n ξiξj = ξjξi for 1 ≤ i, j ≤ n. The three-nil algebra is the 3 -dimensional algebra generated by the collection {ξi} along with the unit scalar and is denoted by 3nil C`n . Note that elements of the three-nil algebra have canonical expansion of the following form: X v1 vn u = α~v ξ1 ··· ξn . (2.8) n ~v∈Z3 n Given vector ~v ∈ Z3 , let diag(~v) denote the n × n diagonal matrix whose 3nil main diagonal is ~v. Given u ∈ C`n , define the grade-k part of u by

X v1 vn huik = α~v ξ1 ··· ξn . (2.9) n ~v∈Z3 rank(diag(~v))=k

In other words, the grade-k part of u is the expansion over terms with k dis- tinct generators. This definition extends naturally to the grade-(j, k) part of an 3nil nil element in C`n ⊗ C`n . 1 Remark 2.4. Letting ε = (1 + e e ) ∈ C` for each 1 ≤ i ≤ n gives i 2 i n+i n,n another useful commutative algebra whose generators are idempotent; i.e., ele- ments of {εi}1≤i≤n satisfy the following multiplication rules:

εi εj = εj εi for i 6= j, and (2.10) 2 εi = εi for 1 ≤ i ≤ n. (2.11)

Combinatorial properties of this algebra make it applicable to as well [16], [18]. nil Letting u denote an arbitrary element of C`n , the scalar sum of coefficients will be denoted by X X hhuii = u, ζi = ui. (2.12) i∈2[n] i∈2[n]

3 3nil The definitions of scalar sum and grade-k part extend naturally to C`n . nil A number of norms can be defined on C`n . One that will be used later is the infinity norm, defined by

X ui ζi = max ui . (2.13) i∈2[n] [n] i∈2 ∞ An algorithm’s time complexity is typically determined by counting the num- ber of operations required to process a data set of size n in worst-, average-, and best-case scenarios. The operation of multiplying two is typical. Multiplying a pair of integers in classical computing is assumed to require a constant interval of time, independent of the integers. The architecture of a classical computer makes this assumption natural. The existence of a processor whose registers accommodate storage and ma- ♦ nipulation of elements of C`n is assumed through the remainder of this paper. The C` complexity of an algorithm will be determined by the required num- ♦ ber of C`n operations, or C`ops required by the algorithm. In other words, ♦ multiplying (or adding) a pair of elements u, v ∈ C`n will require one C`op in ♦ C`n , where ♦ can be replaced by either “nil” or “3nil”. Evaluation of the infinity norm is another matter. In one possible model of ♦ such an evaluation, the scalar coefficients in the expansion of u ∈ C`n are first paired off and all pairs are then compared in parallel. In this way, evaluation of the infinity norm has complexity O(log 2n) = O(n) (cf. [18]).

2.1 Graph Preliminaries The reader is referred to [23] for graph theory beyond the essential notation and terminology found here. A graph G = (V,E) is a collection of vertices V and a set E of unordered pairs of vertices called edges. Two vertices vi, vj ∈ V are adjacent if there exists an edge eij = {vi, vj} ∈ E. In this case, the vertices vi and vj are said to be incident with eij. The number of edges incident with a vertex is referred to as the degree of the vertex. A graph is said to be regular if all its vertices are of equal degree. A graph is finite if V and E are finite sets, that is, if |V | and |E| are finite numbers. A k-walk {v0, . . . , vk} in a graph G is a sequence of vertices in G with initial vertex v0 and terminal vertex vk such that there exists an edge (vj, vj+1) ∈ E for each 0 ≤ j ≤ k −1. A k-walk contains k edges. A k-path is a k-walk in which no vertex appears more than once. A closed k-walk is a k-walk whose initial vertex is also its terminal vertex. A k-cycle is a closed k-path with v0 = vk. For convenience, two-cycles (which have a repeated edge) will be allowed in the current work. The term proper cycle will refer to any cycle of length three or greater. A Hamiltonian cycle is an n-cycle in a graph on n vertices; i.e., it contains V. Given a graph G, the circumference and girth of G are defined as the lengths of the longest and shortest cycles in G, respectively.

4 Given a graph G = (V,E) on n vertices, a cycle cover of G is a collection of cycles {C1,...,Ck} contained as subgraphs of G such that each vertex of G is contained in exactly one of the cycles. A graph G is said to be connected if for every pair of vertices vi, vj in G, there exists a k-walk on G with initial vertex vi and terminal vertex vj for some positive integer k. A connected component of a graph G is a connected subgraph G0 of maximal size. In other words, V (G0) ⊆ V (G), E(G0) ⊆ E(G), and there is no connected subgraph G00 with the property V (G0) ( V (G00). Given a graph G = (V,E), a matching of G is a subset E1 ⊂ E of the edges of G having the property that no pair of edges in E1 shares a common vertex. The largest possible matching on a graph with n vertices consists of n/2 edges, and such a matching is called a . The following graph-theoretic results will be useful in later sections. Lemma 2.5. Let G be a connected graph on n ≥ 2 vertices. Then G is a tree if and only if G contains n − 1 edges.

Proof. Proof is by induction on the number of vertices n. When n = 2, the graph G contains one edge and is a tree by definition. Assuming the lemma is true for some positive integer n ≥ 2, let G be a connected graph on n vertices, and let the graph H be constructed by appending one vertex v to G. In other words, V (H) = V (G) ∪ {v}. In order to make H connected, one edge must be appended, joining v to some existing vertex u of G. Now H is a connected graph on n + 1 vertices and is a tree, since v is incident with only one edge. It remains to be seen that appending two edges incident with v prevents H from being a tree. Suppose a second edge incident with v is appended to H. This edge is incident with some vertex w 6= u of G. Since G is connected, there exists a walk in G having initial vertex u and terminal vertex w. Appending vertex v and its two incident edges to G yields a cycle in H. Thus, H cannot be a tree. Hence, at most one edge can be appended to G in constructing H. The (n + 1)-vertex connected graph H consists of n edges and the proof is complete. Lemma 2.6. Let G be a connected graph on n ≥ 3 vertices. Then G is a cycle if and only if G is regular of degree 2.

Proof. Proof is by induction on the number of vertices n. Note that when n = 3, the only connected graph on three vertices of degree 2 is the 3-cycle. Assume the lemma is true for some n ≥ 3 and let G be a connected graph on n vertices containing n edges. Let H be a connected graph constructed from G by appending one vertex v and an edge incident with v. The edge incident with v must also be incident with a vertex u of G, which is now of degree 3. To correct this, one edge incident with u and another vertex w must be removed, lowering the degree of w to 1. In order to make H regular of degree 2, a new edge incident with v and w is appended. This makes H a cycle on n + 1 vertices.

5 Lemma 2.7 (Handshaking Lemma). If G is any graph of e edges, then X deg(v) = 2e. (2.14)

v∈VG Proof. Since each edge is incident with exactly two vertices, summing degrees over all vertices counts each edge exactly twice.

3 Complexity Reduction for Graph Problems: Nilpotent Approach

In this section, methods and results of the initial work [18] are recalled and a number of Mathematica examples are presented. In the subsequent section, new methods are developed, some results are improved, and some new results are obtained.

Definition 3.1. Let G be a graph on n vertices and let {ζi}, 1 ≤ i ≤ n de- nil note the null-square generators of C`n . Define the nilpotent adjacency matrix associated with G by ( ζj, if (vi, vj) ∈ E(G) Λij = (3.1) 0, otherwise.

nil k Thus, Λ defined over C`n implies Λ is the n × n zero matrix for all k > n. Theorem 3.2. Let Λ be the nilpotent adjacency matrix of an n-vertex graph m G. For any m > 1 and 1 ≤ i ≤ n, summing the coefficients of (Λ )ii yields the number of m-cycles based at vi occurring in G.

m Proof. Proof is by induction on m. Entries of (Λ )ii are sums of products of ζjs, with each product representing the vertices contained in a closed walk of th 2 length m based at the i vertex. Because ζj = 0 for each j, terms involving revisited vertices reduce to zero. Example 3.3. To count the 7-cycles in the 16-vertex graph of Figure 1, the nil nilpotent adjacency matrix is constructed over C`16 . Computations are per- formed with Mathematica procedures available online at http://www.siue.edu/~sstaple.

6 Figure 1: Randomly-generated graph on 16 vertices.

0 0 0 0 e 5 0 0 0 e 9 0 0 0 0 0 e 15 0

0 0 0 0 0 0 0 e 8 0 e 10 0 0 0 0 e 15 0 8 < 8 < 8 < 0 0 0 0 0 0 0 e 8 0 0 0 0 0 0 0 0 8 < 8 < 8 < 0 0 0 0 0 0 0 0 e 9 e 10 0 0 0 0 e 15 0 8 < e 1 0 0 0 0 0 0 0 0 0 0 0 0 0 e 15 0 8 < 8 < 8 < 0 0 0 0 0 0 0 0 0 0 0 e 12 0 0 0 0 8 < 8 < 0 0 0 0 0 0 0 0 e 9 0 e 11 0 0 0 e 15 0 8 < 0 e 2 e 3 0 0 0 0 0 0 e 10 0 e 12 0 0 0 0 8 < 8 < 8 < e 1 0 0 e 4 0 0 e 7 0 0 0 e 11 0 e 13 0 0 0 8 < 8 < 8 < 8 < 0 e 2 0 e 4 0 0 0 e 8 0 0 0 0 e 13 e 14 e 15 0 8 < 8 < 8 < 8 < 8 < 0 0 0 0 0 0 e 7 0 e 9 0 0 e 12 0 0 0 0 8 < 8 < 8 < 8 < 8 < 8 < 0 0 0 0 0 e 6 0 e 8 0 0 e 11 0 e 13 0 0 0 8 < 8 < 8 < 0 0 0 0 0 0 0 0 e 9 e 10 0 e 12 0 0 0 e 16 8 < 8 < 8 < 8 < 0 0 0 0 0 0 0 0 0 e 10 0 0 0 0 0 0 8 < 8 < 8 < 8 < e 1 e 2 0 e 4 e 5 0 e 7 0 0 e 10 0 0 0 0 0 0 8 < 0 0 0 0 0 0 0 0 0 0 0 0 e 13 0 0 0 8 < 8 < 8 < 8 < 8 < 8 <

8 <

In[78]:= * Count 7 cycles* ScalarSum Tr ClNilMatrixPower B, 7 14

Out[78]= H40 L @ @ @ DDD 

m Notation. To simplify notation, tr (Λ ) is replaced by τm in the remainder of the paper. Using the Coppersmith-Winograd algorithm, multiplying two n×n matrices can be done in O(n2.376) time [5]. It is not clear that the same asymptotic speedup can be accomplished for the C` case. However, in the remainder of the paper, β will represent the exponent associated with matrix multiplication.

7 nil In the worst case, multiplication of two n × n matrices with entries in C`n requires n3 C`ops, so β ≤ 3. Corollary 3.4. Enumerating the k-cycles in a finite graph on n vertices requires β nil O(n log k) C`ops in C`n . Corollary 3.5. Enumerating the Hamiltonian cycles in a finite graph on n β nil vertices requires O(n log n) C`ops in C`n . Corollary 3.6. Let Λ be the nilpotent adjacency matrix of an n-vertex graph G. Let Xm,` denote the number of `-tuples of pairwise disjoint m-cycles appearing in the graph G, where m ≥ 3 and 1 ≤ ` ≤ bn/mc. Then

DD `EE ` (τm) = (2m) `!Xm,`. (3.2)

The following proposition is an immediate corollary of Theorem 3.2. Proposition 3.7 (Graph circumference). Let G be a graph on n vertices with nilpotent adjacency matrix Λ. The length of the longest cycle in G is the largest integer k such that τk 6= 0. (3.3) Corollary 3.8. Computing the circumference of a graph on n vertices requires β+1 nil O(n log n) C`ops in C`n . Example 3.9. The circumference and girth of the graph in Figure 2 are com- puted using Mathematica.

In[55]:= Girth = 0; Circumference = 0; Mx = ClNilMatrixPower B, 2 ClNilExpand; For k = 3, k £ 16, k++, Mx ClNilMatrixProduct Mx, B ClNilExpand; = @ D  If ScalarSum Tr Mx 0 Girth 0, Girth k ; @ ¹ Š = Circumference If ScalarSum Tr Mx 0, k, Circumference ; = @ D  ¹ Print "Girth : ", Girth @ @ @ DD ì D Print "Circumference : ", Circumference @ @ @ DD D D @ D Girth : 3 @ D

Circumference : 13

Corollary 3.10 (Graph girth). Let G be a graph on n vertices with nilpotent adjacency matrix Λ. The length of the shortest cycle in G is the smallest integer k such that τk 6= 0. (3.4) Corollary 3.11. Computing the girth of a graph on n vertices requires β+1 nil O(n log n) C`ops in C`n .

8 Figure 2: A randomly generated graph on 16 vertices.

In the next proposition, C denotes the diagonal matrix Diag(ζ1, . . . , ζn). It is used to account for the initial vertices of paths in G. Proposition 3.12 (Longest path). Let G be a graph on n vertices with nilpotent adjacency matrix Λ. The length of the longest path in G is the largest integer k such that CΛk 6= 0. (3.5) Here, 0 denotes the n × n zero matrix. Corollary 3.13. Computing the length of the longest path in a graph on n β nil vertices requires O(n log n log n) C`ops in C`n .

4 Matrix-free approach to representing graphs

Some of the complexity results recalled in the previous section can be improved by eliminating the nilpotent adjacency matrix. Moreover, the matrix-free ap- proach facilitates additional results such as the enumeration of matchings. Let G = (V,E) be a graph on n vertices. The adjacency structure of G is nil represented uniquely within C`n by X Γ = ζ{vi,vj }. (4.1)

{vi,vj }∈E(G)

nil nil Denote by C`n ⊗ R[t] the of polynomials in the unknown t with C`n coefficients.

9 nil Proposition 4.1. Let G be a graph on n vertices with Γ ∈ C`n as defined in (4.1). Let M denote the number of edges in a maximal matching of G. Then, tΓ nil e is a polynomial in C`n ⊗ R[t], and

tΓ M = degt e . (4.2)

Proof. Note that each edge of G is uniquely identified by the pair of vertices n with which it is adjacent. Let k be a nonnegative integer such that k ≤ 2 . From construction of Γ, it follows that Γk is a sum of blades representing k-subsets of edges of G. Moreover, by the null-square property of the vertex labels ζk, such k-subsets of edges must represent k-matchings of G, since two edges incident with a common vertex would result in a with a squared generator. Let Vk denote the collection of subsets of V representing the vertices incident with edges in a k-matching of G, and note that |Vk| = 2k. Observe also that ` n k X Γ = 0 for all ` > 2 , and that Γ = k! ζi. Hence, i∈Vk

∞ n/2 n/2 X (tΓ)k X (tΓ)k X X etΓ = = = tk ζ . (4.3) k! k! i k=0 k=0 k=0 i∈Vk

tΓ It follows immediately that degt e = k if and only if k is the greatest integer for which a k-matching of G exists.

Example 4.2. Figure 3 shows Mathematica code used to generate the random on 14 vertices pictured below and compute the size of a maximal matching. The Mathematica package Combinatorica is used to corroborate the result of Proposition 4.1.

Out[77]=

Size of Maximal Matching: 7

Degree of ãtΨ: 7

Corollary 4.3. The problem of computing the size of a maximal matching in nil a graph on n vertices is of complexity O(n log n) in C`n .

10 n = 14;

Z = DiagonalMatrix Table Ζ i , i, 1, n ; SeedRandom; A = GenRandGraph nA; A 9 = 8

Ψ = Sum Ζ j@ BD j k , j, 1, n , k, 1, j ; exptΨ = Sum Expand tk Ψk k! , k, 0, Floor n 2 ; 9 = Print "ASize @of@ DMaximalD@@ DD Matching8 <: "8,

nil tΓ Proof. The number of C`ops required in C`n to evaluate e is given by

n/2 X n log k = log ((n/2)!) ≤ log((n/2)(n/2)) = log(n/2) = O(n log n). (4.4) 2 k=0

Recalling that a perfect matching of a graph on an even number n of vertices is a matching containing n/2 vertices, the following result is immediate. Corollary 4.4. Counting the perfect matchings of a bipartite graph on n vertices nil is of complexity O(log n) in C`n . In light of this result, an improvement on the matrix is expected. It is known that counting the perfect matchings of a bipartite graph is of the same complexity as computing the permanent of its adjacency matrix. The problem of computing the permanent of a matrix is known to be ]P- complete [3], [22]. Methods of approximating the permanent using Clifford algebras have also been discussed [4].

Proposition 4.5. Let M = (mij)n×n denote an arbitrary n × n matrix. Let nil {ζi}1≤i≤n denote commutative null-square generators of C`n , and define n X ai = mij ζj for each i = 1, 2, . . . , n. Then, j=1

n Y ai = per(M)ζ[n]. (4.5) i=1

11 Proof. Recall the definition of the matrix permanent:

n X Y per(M) := miσ(i). (4.6)

σ∈Sn i=1 Note that i 6= j ⇒ σ(i) 6= σ(j). Now consider the product

n n Y Y ai = (mi 1ζ1 + ··· + mi nζn) i=1 i=1 X = m1 k1 m2 k2 ··· mn kn ζk1 ζk2 ··· ζkn . (4.7) n (k1,...,kn)∈[n]

The null-square property of the collection {ζi} implies that the sum is over n-tuples of distinct integers:

X m1 k1 m2 k2 ··· mn kn ζk1 ζk2 ··· ζkn n (k1,...,kn)∈[n] X = m1 k1 m2 k2 ··· mn kn ζk1 ζk2 ··· ζkn n (k1,...,kn)∈[n] i6=j⇒ki6=kj X = m1σ(1)m2σ(2) ··· mnσ(n) ζ[n] = per(M)ζ[n]. (4.8)

σ∈Sn

An immediate corollary gives the complexity of computing the permanent of an n × n matrix. Corollary 4.6. Computing the permanent of an arbitrary n×n matrix requires nil O(n) C`ops in C`n . Example 4.7. A randomly generated binary matrix is generated and its per- manent is computed in Figure 4. nil The corresponding elements of C`16 appear in Figure 5. 16 Y The product bi is computed in Figure 6. Note that the loop performs i=1 nil 15 = n − 1 multiplications in C`16 . Allowing cycles of length two, the permanent of a graph’s adjacency matrix counts the number of cycle covers of the graph. This is clear from the definition of permanent (4.6) when one recalls that every σ ∈ Sn can be written as a product of disjoint cycles. Corollary 4.8 (Complexity of cycle covers). Counting the cycle covers of a nil finite graph on n vertices requires O(n) C`ops in C`n .

12 In[38]:= Permanent m_List := With v = Array x, Length m , Coefficient Times žž m.v , Times žž v @ D @8 @ @ DD< In[242]:= n = 16; @ H L DD SetSignature n, 0 SeedRandom; A GenRandGraph n ; = @ D Print "A = ", A MatrixForm Print "Permanent A ", Permanent A @ D = @  D 0 0 1 @0 0 1 0 0 0H 0L 0 0 1 0 0 1 @ DD 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 A = 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0

Permanent A = 9

H L Figure 4: Random matrix and its permanent.

b_1 = e 3 + e 6 + e 13 + e 16 b_2 = e 9

8 < 8 < 8 < 8 < 8 <

b_3 = e 1 + e 5 + e 6 + e 9 + e 14 + e 15 + e 16 b_4 = e 5 + e 7 + e 10

8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 <

b_5 = e 3 + e 4 b_6 = e 1 + e 3 + e 7 + e 10 + e 15

8 < 8 < 8 < 8 < 8 < 8 < 8 <

b_7 = e 4 + e 6 + e 11 + e 15 b_8 = e 15

8 < 8 < 8 < 8 < 8 <

b_9 = e 2 + e 3 + e 13 b_10 = e 4 + e 6 + e 13 + e 14

8 < 8 < 8 < 8 < 8 < 8 < 8 <

b_11 = e 7 b_12 = e 13

8 < 8 <

b_13 = e 1 + e 9 + e 10 + e 12 + e 15 b_14 = e 3 + e 10

8 < 8 < 8 < 8 < 8 < 8 < 8 <

b_15 = e 3 + e 6 + e 7 + e 8 + e 13 b_16 = e 1 + e 3

8 < 8 < 8 < 8 < 8 < 8 < 8 < nil Figure 5: Elements of C`16 associated with random binary matrix of Figure 4.

13 In[252]:= p = b1; For k = 2, k £ n, k++, p = p ž bk ClNilExpand Print "Product of b ell ", p @ _ =  D Product of b_ell = 9 e @ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15D,16

8 <

1 Y Figure 6: Product 6bi = per(A)ζ[16]. i=1

Figure 7: Graph associated with matrix A of Example 4.7.

Example 4.9. The graph associated with the matrix appearing in Example 4.7 is shown in Figure 7. The number of cycle covers of this graph is 9. We now introduce a method for computing the girth and counting the proper cycle covers of a graph. The adjacency structure of a graph G on n vertices is 3nil nil represented within C`n ⊗ C`|E| by X Ξ = ξ{vi,vj }ζvivj . (4.9)

{vi,vj }∈E(G)

nil Here, each edge {vi, vj} of G is associated with a single generator ζvivj of C`|E| , 3nil while each vertex is associated with a generator of C`n . Observe that a path of length m in a connected graph consists of m edges and m + 1 vertices. Hence, any path is also a tree. However, in order for a tree to be a path, each vertex must be incident with no more than two vertices. 3 Labeling vertices with elements ξi satisfying ξi = 0 allows us to “sieve out” paths. Recall that the term proper cycle refers to any cycle of length greater than two. It is now possible to obtain an upper bound on the number of Hamilto- nian paths in a graph by considering the of the smallest subspace n containing hΞ i(2(n−1),n). For convenience, the following notation is defined.

14 Definition 4.10. Let A be an algebra, and let u ∈ A. Then the dimension of u is defined as the dimension of the smallest S of A such that u ∈ S. In other words,

dim(u) = min dim(S). (4.10) {S:A⊇S3u}

3nil nil Proposition 4.11. Let G be a graph on n vertices with Ξ ∈ C`n ⊗ C`|E| as defined in (4.9). Let X denote the number of coverings of vertices of G by a Hamiltonian path or exactly one path and one or more disjoint proper cycles. Then,

 n  dim hΞ i(n,n−1) = X. (4.11)

n Proof. Each nonzero coefficient of the expansion of hΞ i(n,n−1) corresponds to a unique subgraph G0 of G having n vertices and n − 1 edges. Moreover, each vertex has maximum degree two. In light of Lemmas 2.5 and 2.6, it follows that either G0 is a Hamiltonian path or G0 consists of exactly one path and one or more disjoint proper cycles as connected components. An immediate consequence of Proposition 4.11 is the following result con- cerning Hamiltonian paths.

3nil nil Corollary 4.12. Let G be a graph on n vertices with Ξ ∈ C`n ⊗ C`|E| as defined in (4.9). Let H denote the number of Hamiltonian paths in G . Then,

 n  dim hΞ i(n,n−1) = 0 ⇒ H = 0, (4.12) and  n  H ≤ dim hΞ i(n,n−1) . (4.13)

3nil nil Proposition 4.13. Let G be a graph on n vertices with Ξ ∈ C`n ⊗ C`|E| as defined in (4.9). Let k be a positive integer. Then each term in the expan- k sion of Ξ (k,k) represents a covering of G with proper cycles; that is, each term represents a subgraph G0 whose connected components are disjoint cycles of minimum length 3.

3nil nil k Proof. By properties of Ξ ∈ C`n ⊗ C`|E| , each term of Ξ corresponds to a subgraph G0 of G having k vertices and k edges. Moreover, the degree of each vertex is less than or equal to two. By Lemma 2.6, the connected components 0 nil of G are cycles. Since edges are labeled with null-square generators of C`|E| , these cycles contain no repeated edges and are therefore proper. An immediate consequence of Proposition 4.13 is the following result con- cerning Hamiltonian cycles.

15 3nil nil Corollary 4.14. Let G be a graph on n vertices with Ξ ∈ C`n ⊗ C`|E| as defined in (4.9). Let ZH denote the number of Hamiltonian cycles in G . Then,

 n  dim hΞ i(n,n) = 0 ⇒ ZH = 0, (4.14) and  n  ZH ≤ dim hΞ i(n,n) . (4.15)

Example 4.15. For each k = 3, 4,..., 8, the grade (k, k) part of Ξk is computed using Mathematica for a randomly generated graph on eight vertices. Each k nonzero term of Ξ (k,k) corresponds to a covering of a k-vertex subgraph 8 using disjoint cycles of length j ≤ k. The fact that Ξ (8,8) = 0 implies that the graph contains no Hamiltonian cycles. In the Mathematica implementation of products of null-cubes, the multi- 8 index is defined by a vector in Z3 according to

8 Y vj ξ~v = ξj . (4.16) j=1

* Overload Times operator to handle null-squares Ζ j and null-cubes Ξ j * Unprotect Times ; HΖ = Symbol "Ζ" ; 9 = 9 = L Ζa_ Ζb_ := If@ LengthD a b > 0, 0, Ζa b ; Ξ = Symbol@"Ξ"D Ü Ξv_ Ξw_ := If@Max v +@w Ý< 3D, Ξv+w, 0 ; D Protect Times@ D; Unprotect Power@ @ ; D D n_Integer x_ ; !@FreeQ Dx, Ζa_ := y, f , y = Expand x ; Switch EvenQ n , @ D True, If n Š 0, Return 1 , Composition Expand Distribute f y, y . f ® Times n 2 ,

I  A EL B8 < @ D B @ D n-1  False, If n Š 1, Return x , Composition Expand Distribute f y, y . f ® Times 2 x ; A @ D @ D@ @ @ DD  D E x_ ; ! FreeQ x, Ξ n_Integer := Module y, f , y = Expand x ; Switch EvenQ n , B a_ @ D @ D@ @ @ DD  D FFF True, If n Š 0, Return 1 , Composition Expand Distribute f y, y . f ® Times n 2 ,

I  A EL B8 < @ D B @ D n-1  False, If n Š 1, Return x , Composition Expand Distribute f y, y . f ® Times 2 x ; A @ D @ D@ @ @ DD  D E Protect Power ; Unprotect Expand ;

Expand x_ ;B! FreeQ x, Ζ_ @ :D= DeleteCases @DistributeD@ x, Plus,@Times@ D,D0.` Ζ_ ; D FFF

Expand x@_ ; !DFreeQ x, Ξ_ @ := DeleteCasesD Distribute x, Plus, Times , 0.` Ξ_ ; Protect Expand ; A  A EE A @ D E n = 8; A  A EE A @ D E @ D

Z = DiagonalMatrix Table Ξei , i, 1, n ; SeedRandom; A = GenRandGraph n@; @ 8

GraphPlot A @ D B = A.Z; Sum B j k , j, 1, n , k, 1, j ; Ψ = Ξej@ D

A @@ DD@@ DD 8 < 8

16 Grade b_ Ξa_ := MatrixRank DiagonalMatrix a ;

Grade Ξa_ := MatrixRank DiagonalMatrix a ; A E @ @ DD Grade Ζa_ := Length a ; A E @ @ DD Grade b_ Ζa_ := Length a ; A E @ D GradeJKA u_ E:= Grade @u D. Ζ_ ® 1 , Grade u . Ξ_ ® 1 GradeJKPart u_, j_, k_ := In[208]:= @ D 9 A  9 =E A  9 =E= Sum If GradeJK u ell == j, k , u ell , 0 , ell, 1, Length u @ 8

8 < Out[326]= Ζ 1 Ξ 0@,0,0,0,0@,@0,1D,D1 +8Ζ 2 Ξ 0,0,0,0,1@,0,D0<,1D + Ζ 3 Ξ 0,0,0,0,1,0,1,0 + Ζ 4 Ξ 0,0,0,0,1,1,0,0 + Ζ 5 Ξ 0,0,0,1,0,0,1,0 + Ζ 6 Ξ 0,0,0,1,0,1,0,0 + Ζ 7 Ξ 0,0,0,1,1,0,0,0 + Ζ 8 Ξ 0,0,1,0,0,0,0,1 + Ζ 9 Ξ 0,0,1,0,0,1,0,0 + Ζ8 <10 8Ξ 1,0,0,0,0,0,0<,1 +8Ζ< 118 Ξ 1,0,0,0,1,0,<0,0 8+ Ζ< 128 Ξ 1,0,0,1,0,0<,0,0 8+<Ζ 813 Ξ 1,0,1,0,0,<0,0,08 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 < 8 <

In[335]:= For k = 3, k £ n, k++, Print "k = ", k, ". Grade k,k part of Xk : ", GradeJKPart Expand Xk , k, k A

A k H L A A E 8

17 k = 6. Grade k,k part of Xk : 720 Ζ 1,3,6,7,8,9 Ξ 0,0,2,2,2,2,2,2 + 720 Ζ 1,4,5,7,8,9 Ξ 0,0,2,2,2,2,2,2 + 720 Ζ 2,3,5,6,8,9 Ξ 0,0,2,2,2,2,2,2 + 720 720 720 Ζ 1,3,4,6,10H,12 ΞL 2,0,0,2,2,2,2,2 + Ζ 1,4,5,6,10,11 Ξ 2,0,0,2,2,2,2,2 + Ζ 1,3,4,9,10,13 Ξ 2,0,2,0,2,2,2,2 + 8 < 8 < 8 < 8 < 8 < 8 < 720 Ζ 1,5,6,9,10,13 Ξ 2,0,2,2,0,2,2,2 + 720 Ζ 1,3,7,8,12,13 Ξ 2,0,2,2,2,0,2,2 + 720 Ζ 1,5,7,8,11,13 Ξ 2,0,2,2,2,0,2,2 + 8 < 8 < 8 < 8 < 8 < 8 < 720 Ζ 2,3,5,8,12,13 Ξ 2,0,2,2,2,0,2,2 + 720 Ζ 3,5,7,8,10,13 Ξ 2,0,2,2,2,0,2,2 + 8 < 8 < 8 < 8 < 8 < 8 < 720 Ζ 2,4,6,8,12,13 Ξ 2,0,2,2,2,2,0,2 + 720 Ζ 2,6,7,9,10,13 Ξ 2,0,2,2,2,2,0,2 + 8 < 8 < 8 < 8 < 720 Ζ 2,6,8,9,11,12 Ξ 2,0,2,2,2,2,0,2 + 720 Ζ 4,6,7,8,10,13 Ξ 2,0,2,2,2,2,0,2 + 720 Ζ 4,7,8,9,10,12 Ξ 2,0,2,2,2,2,0,2 + 8 < 8 < 8 < 8 < 720 Ζ 6,7,8,9,10,11 Ξ 2,0,2,2,2,2,0,2 + 720 Ζ 3,4,5,9,12,13 Ξ 2,0,2,2,2,2,2,0 + 720 Ζ 3,5,6,9,11,13 Ξ 2,0,2,2,2,2,2,0 8 < 8 < 8 < 8 < 8 < 8 < k k = 7. 8 Grade k,

H L 3nil nil Definition 4.16. Given ψ ∈ C`n ⊗ C`|E| , the grade-balanced exponential of ψ is defined by ∞ X ψk  exp (u) = . (4.17) gb k! k=0 (k,k)

3nil nil Proposition 4.17. Let G be a graph on n vertices with Ξ ∈ C`n ⊗ C`|E| as defined in (4.9). Let Girth(G) denote the length of the smallest nontrivial 3nil nil cycle in G. Then, as a polynomial in C`n ⊗ C`|E| ⊗ R[t],   Ξ  deg tn exp − 1 = n − Girth(G). (4.18) t gb t

n Ξ  Proof. Note first that t expgb t is a polynomial in t of degree at most n. The degree of the polynomial is equal to the smallest exponent k appearing among nonzero terms in the expansion

n Ξ X  Ξk  exp − 1 = . (4.19) gb t k!tk k=1 (k,k)

k By Proposition 4.13, nonzero terms in the expansion of Ξ (k,k) represent dis- joint cycle covers of k-vertex subgraphs in G. The smallest positive integer k0 for which such a cover exists must correspond to k0-cycles in G; i.e., k0 = Girth(G). tn Then = tn−Girth(G), from which the result is obtained. tk0 Corollary 4.18. Computing the girth of a graph with n vertices and |E| edges 3nil nil requires O(n log n) C`ops in C`n ⊗ C`|E| .

Ξ  D Ξk E Proof. Computing expgb t requires computing k for 0 ≤ k ≤ n. k!t (k,k)

3nil nil Proposition 4.19. Let G be a graph on n vertices with Ξ ∈ C`n ⊗ C`|E| as defined in (4.9). Let Z denote the number of proper cycle covers of G. Then,

 n  dim hΞ i(n,n) = Z. (4.20)

18 Proof. Note that Ξn represents n-edge subsets taken from the graph G. Re- calling that any collection of n edges incident with n vertices in a connected graph is a cycle if and only of every vertex has degree 2. By construction of the three-nil algebra, the terms of Ξn represent subgraphs in which the maximum vertex degree is two and the minimum vertex degree is one. All that remains is to show no vertex of this subgraph can have degree one. By the Handshaking Lemma (Lemma 2.7), since the subgraph G0 contains n vertices and n edges, X deg(v) = 2n. (4.21)

v∈VG0 Since the maximum vertex degree is two, this sum can be written in the form

X X X deg(v) = deg(v) + deg(v) v∈V v∈V v∈VG0 G0 G0 deg(v)=1 deg(v)=2

= |{v ∈ VG0 : deg(v) = 1}| + 2 |{v ∈ VG0 : deg(v) = 2}|

= (n − |{v ∈ VG0 : deg(v) = 2}|) + 2 |{v ∈ VG0 : deg(v) = 2}|

= n + |{v ∈ VG0 : deg(v) = 2}| = 2n. (4.22)

0 Hence, |{v ∈ VG0 : deg(v) = 2}| = n. It follows that G is a graph whose connected components are nontrivial cycles. Corollary 4.20. Computing the number of proper cycle covers of a graph on n 3nil nil vertices and |E| edges requires O(log n) C`ops in C`n ⊗ C`|E| .

5 Conclusion

The advantages of a computer architecture capable of dealing naturally with geometric objects are numerous. If one assumes the existence of such a machine, a natural measure of algorithmic complexity is the number of Clifford operations (C`ops) required by the algorithm. In terms of numbers of C`ops required, a number of problems of complexity class NP are of polynomial complexity. We assert that a Clifford computer would have natural advantages for solving an assortment of combinatorial and graph-theoretic problems. In addition, as Aerts and Czachor have shown [2], a Clifford computer would be able to implement quantum computing while avoiding the noise and error-correcting concerns associated with quantum systems. Using currently available technology, the computations performed are not truly geometric operations. Multiplying two still requires keeping track of nonzero coefficients of blades of all degrees. The true power of a ge- ometric computing architecture is yet to be realized. In an architecture,

19 multiplying two multivectors would require one operation and an appropriate measurement (projection) to recover the relevant information. However, an ar- chitecture in which the product is of polynomial complexity would be sufficient for dramatic reductions in complexity.

References

[1] R. Ab lamowicz, B. Fauser, CLIFFORD - A Maple Package for Clifford Algebra Computations. http://math.tntech.edu/rafal/ [2] D. Aerts, M. Czachor, Cartoon computation: quantum-like computing without quantum mechanics, J. Phys. A: Math. Theor., 40 F259-F263, (2007). [3] A. Ben-Dor, S. Halevi, Zero-one permanent is ]P-complete, a simpler proof, Pro- ceedings of the 2nd Israel Symposium on the Theory and Computing Systems, (1993), 108-117. [4] S. Chien, L. Rasmussen, A. Sinclair, Clifford algebras and approximating the permanent, Journal of Computer and System Sciences, 67 (2003), 263-290. [5] D. Coppersmith, S. Winograd, Matrix multiplication via arithmetic progressions, Journal of Symbolic Computation, 9 (1990), 251280. [6] D. Fontijne, T. Bouma, L. Dorst, GAIGEN: a implementation generator, Univeristy of Amsterdam, NL, July 2002. http://www.science.uva. nl/ga/gaigen [7] S. Franchini, A. Gentile, M. Grimaudo, C.A. Hung, S. Impastato, F. Sorbello, G.Vassallo, S. Vitabile, A sliced coprocessor for native Clifford algebra opera- tions, Proceedings of the 10th Euromicro Conference on Digital System Design Architectures, Methods and Tools (DSD 2007), 436-439, (2007). [8] A. Gentile, S. Segreto, F. Sorbello, G. Vassallo, S. Vitabile, V. Vuollo, Clif- foSor, an innovative FPGA-based architecture for geometric algebra, Proceedings of the International Conference on Engineering of Reconfigurable Systems and Algorithms (ERSA 2005), 211-217. [9] A. Gentile, S. Segreto, F. Sorbello, G. Vassallo, S. Vitabile, V. Vuollo, CliffoSor: a parallel embedded architecture for geometric algebra and computer graphics, Proceedings of the IEEE International Workshop on Computer Architecture for Machine Perception (CAMP 2005), 90-95, IEEE Computer Society Press. [10] P. Leopardi, The GluCat Home Page, http://glucat.sourceforge.net/ [11] B. Mishra, P. Wilson, Color edge detection hardware based on geometric algebra, http://eprints.ecs.soton.ac.uk/13188/ [12] B. Mishra, P. Wilson, Hardware implementation of a geometric algebra processor core, Proceedings of ACA 2005, IMACS, Int. Conf. on Advancement of , Nara, Japan, 2005. http://eprints.ecs.soton.ac.uk/10957/ [13] C. Perwass, The CLU Project web page, http://www.perwass.de/cbup/clu. html [14] C. Perwass, C. Gebken, G. Sommer, Implementation of a Clifford algebra co- processor design on a field programmable gate array, Clifford Algebras Appli- cations to Mathematics, Physics, and Engineering, Progress in 34, Birkh¨auser,Boston, 2004.

20 [15] I. Porteous, Lecture 2: Mathematical structure of Clifford algebras, Lectures on Clifford (Geometric) Algebras and Applications, R. Ablamowicz, G. Sobczyk, Eds., Birkh¨auser,Boston, 2003. [16] R. Schott, G.S. Staples, Nilpotent adjacency matrices and random graphs, Ars Combinatoria, To appear. [17] R. Schott, G.S. Staples, Nilpotent adjacency matrices, random graphs, and quan- tum random variables, J. Phys. A: Math. Theor., 41 155205, (2008). [18] R. Schott, G.S. Staples, Reductions in computational complexity using Clifford algebras, Advances in Applied Clifford Algebras, To appear. [19] G.S. Staples, Clifford-algebraic random walks on the hypercube, Advances in Applied Clifford Algebras, 15 213-232, (2005). [20] G.S. Staples, Graph-theoretic approach to stochastic integrals with Clifford alge- bras, J. Theor. Prob., 20 257-274, (2007). [21] G.S. Staples, Norms and generating functions in Clifford algebras, Advances in Applied Clifford Algebras, 18 75-92, (2008). [22] L. Valiant, The complexity of computing the permanent, Theoretical Computer Science, 8 (1979), 189-201. [23] D. West, Introduction to Graph Theory, Second Ed., Prentice Hall, Upper Saddle River, 2001.

21