### 33 Finite metric spaces and their filtered complexes

#### 33.1

##### 33.1-1 CayleyMetric
 ‣ CayleyMetric( g, h, N ) ( function )
 ‣ CayleyMetric( g, h ) ( function )

Inputs two permutations g,h and optionally the degree N of a symmetric group containing them. It returns the minimum number of transpositions needed to express g*h^-1 as a product of transpositions.

1

##### 33.1-2 HammingMetric
 ‣ HammingMetric( g, h, N ) ( function )
 ‣ HammingMetric( g, h ) ( function )

Inputs two permutations g,h and optionally the degree N of a symmetric group containing them. It returns the number of integers moved by the permutation g*h^-1.

##### 33.1-3 KendallMetric
 ‣ KendallMetric( g, h, N ) ( function )
 ‣ KendallMetric( g, h ) ( function )

Inputs two permutations g,h and optionally the degree N of a symmetric group containing them. It returns the minimum number of adjacent transpositions needed to express g*h^-1 as a product of adjacent transpositions. An adjacent transposition has the for (i,i+1).

##### 33.1-4 EuclideanSquaredMetric
 ‣ EuclideanSquaredMetric( v, w ) ( function )

Inputs two vectors v,w of equal length and returns the sum of the squares of the components of v-w. In other words, it returns the square of the Euclidean distance between v and w.

##### 33.1-5 EuclideanApproximatedMetric
 ‣ EuclideanApproximatedMetric( v, w ) ( function )

Inputs two vectors v,w of equal length and returns a rational approximation to the square root of the sum of the squares of the components of v-w. In other words, it returns an approximation to the Euclidean distance between v and w.

1

##### 33.1-6 ManhattanMetric
 ‣ ManhattanMetric( v, w ) ( function )

Inputs two vectors v,w of equal length and returns the sum of the absolute values of the components of v-w. This is often referred to as the taxi-cab distance between v and w.

1

##### 33.1-7 VectorsToSymmetricMatrix
 ‣ VectorsToSymmetricMatrix( L ) ( function )
 ‣ VectorsToSymmetricMatrix( L, D ) ( function )

Inputs a list L of vectors and optionally a metric D. The default is D=ManhattanMetric. It returns the symmetric matrix whose i-j-entry is S[i][j]=D(L[i],L[j]).

1

##### 33.1-8 SymmetricMatDisplay
 ‣ SymmetricMatDisplay( S ) ( function )
 ‣ SymmetricMatDisplay( L, V ) ( function )

Inputs an n × n symmetric matrix S of non-negative integers and an integer t in [0 .. 100]. Optionally it inputs a list V=[V_1, ... , V_k] of disjoint subsets of [1 .. n]. It displays the graph with vertex set [1 .. n] and with an edge between i and j if S[i][j] < t. If the optional list V is input then the vertices in V_i will be given a common colour distinct from other vertices.

1

##### 33.1-9 SymmetricMatrixToFilteredGraph
 ‣ SymmetricMatrixToFilteredGraph( S, t, m ) ( function )

Inputs an integer symmetric matrix S, a positive integer t and a positive integer m. The function returns a filtered graph of filtration length t. The k-th term of the filtration is a graph with one vertex for each row of S. There is an edge in this graph between the i-th and j-th vertices if the entry S[i][j] is less than or equal to k*m/t.

1 , 2

##### 33.1-10 PermGroupToFilteredGraph
 ‣ PermGroupToFilteredGraph( S, D ) ( function )

Inputs a permutation group G and a metric D defined on permutations. The function returns a filtered graph. The k-th term of the filtration is a graph with one vertex for each element of the group G. There is an edge in this graph between vertices g and h if D(g,h) is less than some integer threshold t_k. The thresholds t_1 < t_2 < ... < t_N are chosen to form as long a sequence as possible subject to each term of the filtration being a distinct graph.

generated by GAPDoc2HTML