Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<Chapter><Heading> Finite metric spaces and their filtered complexes </Heading>12<Table Align="|l|" >34<Row>5<Item>6<Index> CayleyMetric</Index>7<C>CayleyMetric(g,h,N) </C>8<C>CayleyMetric(g,h) </C>9<P/>1011Inputs two permutations <M>g,h</M> and optionally the degree <M>N</M> of a symmetric group containing them. It returns the minimum number of transpositions needed to12express <M>g*h^-1</M> as a product of transpositions.1314</Item>15</Row>1617<Row>18<Item>19<Index> HammingMetric</Index>20<C>HammingMetric(g,h,N) </C>21<C>HammingMetric(g,h) </C>22<P/>2324Inputs two permutations <M>g,h</M> and optionally the degree <M>N</M> of a symmetric group containing them. It returns the number of integers moved by the permutation25<M>g*h^-1</M>.2627</Item>28</Row>293031<Row>32<Item>33<Index> KendallMetric</Index>34<C>KendallMetric(g,h,N) </C>35<C>KendallMetric(g,h) </C>36<P/>3738Inputs two permutations <M>g,h</M> and optionally the degree <M>N</M> of a symmetric group containing them. It returns the minimum number of adjacent transpositions needed to express <M>g*h^-1</M> as a product of adjacent transpositions. An adjacent transposition has the for <M>(i,i+1)</M>.3940</Item>41</Row>424344<Row>45<Item>46<Index> EuclideanSquaredMetric</Index>47<C>EuclideanSquaredMetric(v,w) </C>48<P/>4950Inputs two vectors <M>v,w</M> of equal length and returns51the sum of the squares of the components of <M>v-w</M>. In other words, it returns the square of the Euclidean distance between <M>v</M> and <M>w</M>.5253</Item>54</Row>5556<Row>57<Item>58<Index> EuclideanApproximatedMetric</Index>59<C>EuclideanApproximatedMetric(v,w) </C>60<P/>6162Inputs two vectors <M>v,w</M> of equal length and returns63a rational approximation to the square root of the sum of the squares of the components of <M>v-w</M>. In other words, it returns an approximation to the Euclidean distance between <M>v</M> and <M>w</M>.6465</Item>66</Row>676869<Row>70<Item>71<Index> ManhattanMetric</Index>72<C>ManhattanMetric(v,w) </C>73<P/>7475Inputs two vectors <M>v,w</M> of equal length and returns76the sum of the absolute values of the components of <M>v-w</M>.77This is often referred to as the taxi-cab distance between <M>v</M> and <M>w</M>.7879</Item>80</Row>818283<Row>84<Item>85<Index> VectorsToSymmetricMatrix</Index>86<C>VectorsToSymmetricMatrix(L) </C>87<C>VectorsToSymmetricMatrix(L,D) </C>88<P/>8990Inputs a list <M>L</M> of vectors and optionally a metric <M>D</M>. The default is <M>D=ManhattanMetric</M>. It returns the symmetric matrix whose i-j-entry is <M>S[i][j]=D(L[i],L[j])</M>.919293</Item>94</Row>9596<Row>97<Item>98<Index> SymmetricMatDisplay</Index>99<C>SymmetricMatDisplay(S) </C>100<C>SymmetricMatDisplay(L,V) </C>101<P/>102103Inputs an <M>n \times n</M>104symmetric matrix <M>S</M> of non-negative integers and an integer <M>t</M> in <M>[0 .. 100]</M>. Optionally it inputs a list <M>V=[V_1, ... , V_k]</M>105of disjoint subsets of <M>[1 .. n]</M>. It displays the graph with vertex set <M>[1 .. n]</M> and with an edge between <M>i</M> and <M>j</M> if <M>S[i][j] < t</M>. If the optional list <M>V</M> is input then the vertices in <M>V_i</M> will be given a common colour distinct from other vertices.106107108</Item>109</Row>110111<Row>112<Item>113<Index> SymmetricMatrixToFilteredGraph</Index>114<C>SymmetricMatrixToFilteredGraph(S,t,m) </C>115<P/>116117Inputs an integer symmetric matrix <M>S</M>, a positive118integer <M>t</M> and a positive integer <M>m</M>. The function returns a119filtered graph of filtration length <M>t</M>. The <M>k</M>-th term of the120filtration is a graph with one vertex for each row of <M>S</M>. There is an edge in this graph between the <M>i</M>-th and <M>j</M>-th vertices if the entry121<M>S[i][j]</M> is less than or equal to <M>k*m/t</M>.122123124</Item>125</Row>126127<Row>128<Item>129<Index> PermGroupToFilteredGraph</Index>130<C>PermGroupToFilteredGraph(S,D) </C>131<P/>132133Inputs a permutation group <M>G</M> and a metric <M>D</M> defined134on permutations.135The function returns a136filtered graph. The <M>k</M>-th term of the137filtration is a graph with one vertex for each element of the group138<M>G</M>. There is an edge in this graph between vertices139<M>g</M> and <M>h</M> if140<M>D(g,h)</M> is less than some integer threshold <M>t_k</M>. The thresholds141<M>t_1 < t_2 < ... < t_N</M> are chosen to form as long a sequence as possible subject to each term of the filtration being a distinct graph.142143144</Item>145</Row>146147148149150</Table>151</Chapter>152153154155156157