math0702564/CRT.tex
1: \documentclass[11pt,epsf]{article}
2: \textheight 230mm
3: \textwidth 160mm
4: \oddsidemargin -4mm
5: \evensidemargin -4mm
6: \topmargin -15mm
7: %%%%%%%%%%%%%%%%%%%%%%%%%%
8: \usepackage{ifpdf}
9: \usepackage{amsthm}
10: \usepackage{amsmath}
11: \usepackage{amssymb}
12: \usepackage{graphicx}
13: \usepackage{psfrag}
14: \usepackage[all]{xypic}
15: \usepackage{url}
16: 
17: %for xypic pictures
18: \newcommand{\sinpioverthree}{0.866025404}
19: 
20: 
21: \newcommand{\functo}{\rightarrow}
22: \newcommand{\composition}{\circ}
23: \newcommand{\comp}{\composition}
24: \newcommand{\restrictedto}{\mid}
25: \newcommand{\join}{\vee}
26: \newcommand{\meet}{\wedge}
27: \newcommand{\frkF}{\mathfrak{F}}
28: \newcommand{\frkG}{\mathfrak{G}}
29: \newcommand{\tand}{{\tiny \text{AND} }}
30: \newcommand{\nbhd}{\operatorname{nbhd}}
31: \newcommand{\disjointunion}{\sqcup}
32: \newcommand{\isfaceof}{\prec}
33: 
34: \newcommand{\rank}{\operatorname{rank}}
35: \newcommand{\abs}[1]{\left\lvert{ #1 }\right\rvert}
36: 
37: %bbbold letters
38: \newcommand{\R}{\mathbb{R}}
39: \newcommand{\Q}{\mathbb{Q}}
40: \newcommand{\N}{\mathbb{N}}
41: \newcommand{\Z}{\mathbb{Z}}
42: \newcommand{\C}{\mathbb{C}}
43: 
44: %script letters: all capitals A-Z
45: \newcommand{\scrC}{{C}}
46: \newcommand{\scrM}{{M}}
47: \newcommand{\scrJ}{{J}}
48: \newcommand{\scriptS}{\mathcal{S}}
49: %\newcommand{\scrD}{\mathscr D}
50: 
51: %operations and relations
52: \newcommand{\union}{\cup}
53: \newcommand{\intersection}{\cap}
54: \newcommand{\intersect}{\intersection}
55: \newcommand{\cross}{\times}
56: \newcommand{\mutualcoarsening}{\vee}
57: 
58: %Graphical models macros
59: \newcommand{\indep}{\! \perp \!\!\! \perp \!}
60: 
61: %Special sets and identifiers
62: \newcommand{\Disc}{\mathcal{D}}
63: \newcommand{\cO}{\mathcal{O}}
64: \newcommand{\PO}{\mathcal{A}_P}
65: \newcommand{\SPO}{\cO_S}
66: \newcommand{\Part}{\mathcal{P}}\newcommand{\SUC}{\mathcal{C}}
67: 
68: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69: %Theorem environments
70: \newtheorem{theorem}{Theorem}
71: \newtheorem{lemma}[theorem]{Lemma}
72: \newtheorem{assertion}[theorem]{Assertion}
73: \newtheorem{conjecture}[theorem]{Conjecture}
74: \newtheorem{corollary}[theorem]{Corollary}
75: \newtheorem{proposition}[theorem]{Proposition}
76: \newtheorem{observation}[theorem]{Observation}
77: 
78: 
79: \theoremstyle{definition}
80: \newtheorem{definition}[theorem]{Definition}%[section]
81: \newtheorem{example}[theorem]{Example}%[section]
82: \newtheorem{remark}[theorem]{Remark}%[section]
83: \newtheorem{algorithm}[theorem]{Algorithm}
84: 
85: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86: 
87: 
88: \title{Convex Rank Tests and Semigraphoids}
89: %
90: \date{}
91: %
92: \author{Jason Morton, Lior Pachter, Anne Shiu, Bernd Sturmfels, and Oliver Wienand}
93: \begin{document}
94: 
95: \maketitle
96: 
97: \begin{abstract}
98: Convex rank tests are partitions of the symmetric group
99: which have desirable geometric properties.
100: The statistical tests defined by such partitions involve counting all
101: permutations in the equivalence classes.
102: Each class consists of the linear extensions of a partially
103: ordered set specified by data.
104: Our methods refine existing rank tests of non-parametric statistics, such as
105: the sign test and the runs test, and are useful
106: for exploratory analysis of ordinal data.
107: We establish a bijection between  convex rank tests and probabilistic
108: conditional independence structures known as semigraphoids. The subclass of
109: submodular rank tests is derived from faces of the cone
110: of submodular functions, or from Minkowski summands of the permutohedron.
111: We enumerate all small instances of such rank tests. Of particular interest 
112: are  graphical tests, which correspond to both graphical models and to graph 
113: associahedra.
114: \\[2ex]
115: {\bf Keywords:}~~ braid arrangement, graphical model, permutohedron, polyhedral fan, rank test, semigraphoid, submodular function, symmetric group.
116: \end{abstract}
117: 
118: 
119: \section{Introduction}
120: 
121: The non-parametric approach to statistics was introduced by
122: \cite{Pitman1937SignificanceI} 
123: via the method of permutation testing.
124: Subsequent development of these ideas revealed a close connection
125: between non-parametric tests and {\em rank tests}, which are
126: statistical tests suitable for ordinal data.
127: Beginning in the 1950s,  many rank tests were developed for specific
128: applications, such as the comparison of populations or testing hypotheses for determining
129: the location of a population. The geometry of these tests was explored in \cite{Cook}. More recently, the search for patterns
130: in large datasets has spurred the development and exploration of new
131: tests. For instance, the emergence of microarray data in
132: molecular biology has led to tests for identifying significant
133: patterns in gene expression time series; see e.g.~\cite{Willbrand2005}.
134: This application motivated us to
135: develop a mathematical theory of rank tests.
136: We propose
137: that a {\em rank test} is a partition of $S_n$ induced by a
138: map $\, \tau : S_n \rightarrow T\,$
139: from the symmetric group of all permutations of $[n]=\{1,\ldots,n\}$
140: onto a set $T$ of statistics.
141: The statistic $\tau(\pi)$ is the {\em signature} of the permutation $\pi \in S_n$.
142: Each rank test defines a partition of $S_n$ into
143: classes, where $\pi$ and $\pi'$ are in the same class if and only if
144: $\tau (\pi) = \tau(\pi')$. We identify $T = {\rm image}(\tau)$ with
145: the set of all classes in this partition of $S_n$.
146:  Assuming the uniform distribution on  $ S_n$, the probability
147: of seeing a particular signature $t \in T$ is
148: $\,1/n! \,$ times $| \tau^{-1}( t)|$.
149: The computation of a $p$-value for a given permutation $\pi \in S_n$
150: leads to the problem of summing
151: \begin{equation} \label{Pvalue}
152: {\rm Pr}(\pi') \quad = \quad
153:  \frac{1}{n !} \cdot |\, \tau^{-1} \bigl( \tau(\pi') \bigr)\, |
154:  \end{equation}
155: over permutations $\pi'$ with ${\rm Pr}(\pi') \leq {\rm Pr}(\pi)$,
156: a computational task to be addressed in Section~6.
157: 
158: 
159: This paper is an expanded version of our note ``Geometry of Rank Tests''
160: which was presented in September 2006 in Prague at the conference
161: {\em Probabilistic Graphical Models (PGM 3)}.
162: The emphasis of our discussion is on the mathematics underlying rank tests, and, in particular,
163: on the connection to statistical learning theory (semigraphoids).
164: We refer to \cite{cyclohedron} for  details on how to use our rank tests in practice, and how to
165: interpret the p-values derived from (\ref{Pvalue}).
166: 
167: The five subsequent sections are organized as follows.
168:  In Section 2 we explain how existing rank tests in
169:  non-parametric statistics  can be understood from our
170:  geometric  point of view, and how they are described
171:  in the language of algebraic combinatorics \cite{Stanley1997}.
172: In Section 3  we define the class of {\em  convex rank tests}.
173: These tests are most natural from both the statistical and
174: the combinatorial point of view.  Convex rank tests can
175: be defined as polyhedral fans that coarsen the 
176: hyperplane arrangement of $S_n$.
177: Our main result (Theorem \ref{fantheorem})
178: states that convex rank tests are in bijection with
179:  conditional independence structures known as
180: {\em semigraphoids} \cite{Dawid, Pearl, Studeny2005Probabilistic}.
181: 
182: Section 4 is devoted to convex rank tests that are
183: induced by submodular functions.
184: These {\em submodular rank tests} are in
185: bijection with Minkowski summands
186: of the $(n{-}1)$-dimensional permutohedron and with {\em structural
187: imset models}. These tests are
188: at a suitable level of generality for the biological applications
189: \cite{cyclohedron, Willbrand2005} that motivated us.
190: The connection between polytopes and independence models is
191: made concrete in the classification of small models in Remarks
192: \ref{rmk1}--\ref{rmk3}.
193: 
194: 
195: 
196: In Section 5 we study the subclass of {\em graphical tests}.
197: In combinatorics, these correspond to
198: graph associahedra, and in statistics
199: to graphical models.
200: The equivalence of these two structures is shown in
201: Theorem \ref{maingraphical}.
202: The implementation of convex rank tests requires the efficient enumeration of
203: linear extensions of partially ordered sets.  
204: Our algorithms and software are discussed in Section~6.
205: A key ingredient is the efficient computation of distributive lattices.
206: 
207: 
208: 
209: \section*{Acknowledgments}
210: Our research on rank tests originated in discussions with Olivier Pourqui\'{e} and Mary-Lee Dequ\'{e}ant as part of
211: the DARPA Program {\em Fundamental Laws of Biology}, that supported Jason Morton, Lior Pachter, and Bernd Sturmfels.  Anne Shiu was supported by a Lucent Technologies Bell Labs Graduate Research Fellowship, and Oliver Wienand by the Wipprecht foundation.  We thank Milan Studen\'{y} and Franti\v{s}ek Mat\'{u}\v{s} for helpful comments.
212: 
213: 
214: \bigskip
215: 
216: \section{Rank tests and posets}
217: 
218: A permutation $\pi$ in $S_n$ is a
219: total order on the set $[n] := \{1,\ldots,n\}$.
220: This means that $\pi$ is a set
221: of $\binom{n}{2}$ ordered pairs
222: of elements in $[n]$.  For example, $\pi = \{ (1,2), (2,3), (1,3) \}$ represents the total order $1>2>3$.
223: If $\pi$ and $\pi'$ are permutations then
224: $\,\pi \cap \pi'\,$ is a partial order.
225: 
226: In the applications we have in mind, the data
227: are vectors $u \in \R^n$ with distinct coordinates.
228: The permutation associated with $u$ is the
229: total order $\,\pi = \{ \,(i,j)\in [n] \times [n] \,: \, u_i < u_j\,\}$.
230: We shall employ two other ways of writing a permutation.
231: The first is the {\em rank vector} $\,\rho = (\rho_1,\ldots,\rho_n)$,
232: whose defining properties are
233: $\{\rho_1,\ldots,\rho_n\} = [n]$ and
234: $\rho_i < \rho_j$ if and only if $u_i < u_j$.  That is, the coordinate of the rank vector with value $i$ is at the same position as the $i$th smallest coordinate of $u$.  
235: The second is the {\em descent vector}
236: $\delta = (\delta_1 | \delta_2 | \ldots | \delta_n)$.
237: The descent vector is defined by $u_{\delta_i} > u_{\delta_{i+1}}$
238: for $i=1,2,\ldots, n {-} 1$.  Thus the $i$th coordinate of the descent vector is the position of the $i$th largest value of the data vector $u$.
239: For example, if $\,u = (11,7,13)\,$ then its permutation
240: is represented by
241: $\, \pi = \{ (2,1),(1,3),(2,3)\}$, by $\,\rho = (2,1,3)$, or by  $\,\delta = (3|1|2)$.
242: 
243: 
244: A permutation $\pi $ is a {\em linear extension} of a
245: partial order $P$ on $[n]$ if $P \subseteq \pi$, i.e. $\pi$ is a total order that refines the partial order $P$.
246:  We write $\mathcal{L}(P) \subseteq S_n$ for the set of
247: linear extensions of~$P$.
248: A partition $\tau$ of the symmetric group $S_n$ is
249: a {\em pre-convex rank test}
250: if the following axiom holds:
251: \[\begin{array}{ccc}
252: {\rm (PC)} && \begin{array}{c} \text{If }\tau(\pi) = \tau(\pi') \text{ and } \pi'' \in \mathcal{L} (\pi \cap \pi')  \text{ then } \tau(\pi) \! = \! \tau(\pi') \!= \!\tau(\pi''). \end{array}\end{array}
253: \]
254: Note that $\, \pi'' \in \mathcal{L} (\pi \cap \pi') \,\,$  means
255: $\pi \cap \pi' \subseteq \pi''$.
256: The number of all rank tests $\tau$ on $[n]$ is the {\em Bell number} $B_{n!}$, which is
257: the number of set partitions of a set of cardinality $n!$. 
258: 
259: \begin{example} \label{bell}
260: For $n=3$ there are $B_6 = 203$ rank tests, or
261: partitions of the symmetric group $S_3$, which consists
262: of six permutations.
263: Of these $203$ rank tests, only $40$ satisfy the
264: axiom (PC).
265: One example is the pre-convex rank test in
266: Figure 1. Here
267: the symmetric group $S_3$  is partitioned
268: into the four classes
269:  $\,\bigl\{  (1|2|3)\bigr\}$,  $\,\bigl\{(2|1|3)\bigr\}$,
270: $\,\bigl\{(2|3|1)\bigr\}$, and
271: $\,\bigl\{(1|3|2), (3|1|2), (3|2|1)\bigr\}$.  
272: \end{example}
273: 
274: Each class $C$ of a pre-convex rank test $\tau$ corresponds to
275: a poset $P$ on the ground set $[n]$; namely, the partial order $P$ is the
276: intersection of all total orders in that class: $P=\bigcap_{\pi \in C} \pi$. The axiom
277: (PC) ensures that $C$ coincides with
278: the set $\mathcal{L}(P)$ of all linear extensions of $P$.  The inclusion $C \subseteq \mathcal{L}(P)$ is clear.  The proof of the reverse inclusion $\mathcal{L}(P) \subseteq C$ is based on the fact that,
279: from any permutation $\pi$ in $ \mathcal{L}(P)$, we can obtain any other $\pi'$ in $ \mathcal{L}(P)$ by a sequence of reversals $(a,b) \mapsto (b,a)$,
280: where each intermediate $\hat{\pi}$ is also in $ \mathcal{L}(P)$. 
281: Consider any $\pi_0 \in \mathcal{L}(P)$ and 
282: suppose that $\pi_1 \in  C$ differs by only one reversal  $(a,b)\in \pi_0$, $(b,a) \in \pi_1$.  Then
283: $(b,a) \notin P$, so there is some $\pi_2 \in C$
284: such that $(a,b) \in \pi_2$; thus, $\pi_0\in  \mathcal{L} (\pi_1 \cap \pi_2)$ by (PC).
285: This shows $\pi_0 \in C$.
286: 
287: A pre-convex rank test therefore can be characterized by 
288: an unordered collection of posets $P_1,P_2,\ldots,P_k$ on $[n]$ that
289: satisfies the property that  the symmetric group $S_n$ is the disjoint union of the subsets
290: $\mathcal{L}(P_1),\mathcal{L}(P_2), \ldots, \mathcal{L}(P_k)$.
291: This structure was discovered independently and studied
292: by Postnikov, Reiner and Williams \cite[\S 3]{PRW}
293: who used the term {\em complete fan of posets} for
294: what we shall call a convex rank test in Section 3.
295: The posets $\,P_1, P_2, \ldots, P_k\,$ that represent the classes in
296: a pre-convex rank test capture the
297: shapes of data vectors.  In graphical rank tests (Section \ref{sec:graphical}), this shape can be interpreted as a smoothed topographic map of the data vector.
298: 
299: 
300: \begin{example}[The sign test for paired data] \label{sign_test}
301: The \emph{sign test} is performed on data that are paired as
302: two vectors $u=(u_1,u_2, \dots,u_m)$ and
303: $ v = ( v_1, v_2, \dots,  v_m)$.  The null hypothesis
304: is that the median of the differences $u_i - v_i$ is 0.
305: The test statistic is the number of differences
306: that are positive. This test is a rank test, because
307: $u$ and $v$ can be transformed into the
308: overall ranks of the $n=2m$ values, and the rank vector
309: entries can then be compared. This test coarsens the convex rank test which is
310: the MSS test of Section 4 with $\,\mathcal{K} \,= \,\{\{1,m+1\},\{2, m+2\}, \dots \}$.
311: \end{example}
312: 
313: \begin{example}[Runs tests]
314: A \emph{runs test} can be used when there is a natural ordering on the data
315: points, such as in a time series. The data are
316: transformed into a sequence of `pluses' and `minuses,' and
317: the null hypothesis is that the number
318: of observed runs is
319: no more than that expected by chance.  
320:  Common types of runs tests include the
321: sequential runs test (`plus' if consecutive data points increase, `minus'  if they
322: decrease), and the runs test to check randomness of residuals, i.e.
323: deviation from a curve fit to the data.
324: A runs test is a coarsening of a convex rank test,
325: known as {\em up-down analysis}
326: \cite[\S 6.1.1]{Willbrand2005}, which is described
327:  in Example \ref{ex.updwn} below.
328: \end{example}
329: 
330: \begin{figure}[htb] \label{fig:nonconvexpreconvex}
331: \[
332: \begin{xy}<15mm,0mm>:
333: (0,0)  ="origin" ;
334: (\sinpioverthree, 0.5)  ="uprt"  ;
335: (\sinpioverthree, -0.5)  ="dwnrt"  ;
336: (-\sinpioverthree, 0.5)  ="upl" ;
337: (-\sinpioverthree, -0.5)  ="dwnl"  ;
338: (0, 1)  ="up" ;
339: (0,-1)  ="dwn" ;
340:    "origin";"uprt" **@{--};
341:    "origin";"dwnrt" **@{--};
342:    "origin";"upl" **@{-};
343:    "origin";"dwnl" **@{-};
344:    "origin";"up" **@{-};
345:    "origin";"dwn" **@{-};
346: (-.5,\sinpioverthree)  ="123"  *+!DR{1|2|3} ;
347: (.5 ,\sinpioverthree)  ="132"  *+!DL{1|3|2} ;
348: (1,0)                  ="312"  *+!L{3|1|2}  ;
349: (.5,-\sinpioverthree)  ="321"  *+!UL{3|2|1} ;
350: (-.5,-\sinpioverthree) ="231"  *+!UR{2|3|1} ;
351: (-1,0)                 ="213"  *+!R{2|1|3}  ;
352:  \end{xy}\]
353: \caption{Illustration of a pre-convex rank test that is not convex.  Cones are labelled by descent vectors, so $1|2|3$ indicates the cone $u_1 > u_2 > u_3$.  This rank test is specified by the
354: four posets $\,P_1 = \{3 {<} 1,2 {<} 1, 3 {<} 2\}, \, P_2 = \{1 {<}2, 3 {<} 2, 3 {<} 1\}, \,
355:  P_3 = \{3 {<}2, 1{<}3, 1{<}2\} \,$ and $\, P_4 = \{2 {<} 3\} $.}
356: \end{figure}
357: 
358: 
359: These two examples suggest
360: that many rank tests from
361: classical  non-parametric statistics  have a natural refinement by a
362: pre-convex rank test.  
363: However, not all tests have this property. 
364: Because many classical rank tests apply to loosely grouped data 
365: (e.g. data which are divided into two samples),  the
366: axiom (PC) is not always satisfied.
367: In such cases, the pre-convex rank test is a first step, after which 
368: permutations are grouped together under additional symmetries, e.g.,
369: the permutations  $\,\delta=\, (1|2|3|4|5)\,$ and 
370:  $\,\delta'=\, (5|4|3|2|1)\,$ might be identified.
371: 
372: The adjective ``pre-convex'' refers to the following interpretation
373: of the axiom (PC). Consider any two data vectors $u$ and $u'$
374: in $\R^n$, and a convex combination $u'' = \lambda u +
375: (1-\lambda) u'$, with $0 < \lambda < 1$.
376: If  $\,\pi, \pi', \pi'' \,$ are the permutations of $\, u,u',u'' \,$
377: then $\, \pi'' \in \mathcal{L}(\pi \cap \pi')$.
378: Thus the equivalence classes in $\R^n$ specified by a
379:  pre-convex rank test are convex cones.
380:  In the next section,  we shall remove the prefix 
381:  from ``pre-convex'' if the faces of these cones 
382:  fit together well.
383: 
384: 
385: \section{Convex rank tests}
386: 
387: 
388: A {\em fan} in $\R^n$ is a finite collection $\mathcal{F}$ of
389: polyhedral cones \cite{Ziegler1995} which satisfies the following properties:
390: \begin{itemize}
391: \item[(i)] if $C \in \mathcal{F}$ and $C'$ is a face of $C$, then
392: $C' \in \mathcal{F}$,
393: \item[(ii)] if $C, C' \in \mathcal{F}$,
394: then $C \cap C'$ is a face of $C$.
395: \end{itemize}
396: Two vectors $u$ and $v $ in $\R^n$ are
397: {\em permutation equivalent} when $u_i < u_j$
398: if and only if $v_i < v_j$, and $u_i = u_j$
399: if and only if $v_i = v_j$  for all $i,j \in [n]$.  Note that for two data vectors, each with distinct coordinates, they are permutation equivalent if and only if they have the same rank vector.
400: The permutation equivalence classes (of which there are $13$ for $n=3$) induce
401: a fan called the {\em $S_n$-fan}.  The arrangement of hyperplanes $\{x_i =x_j \}$ that defines these classes is also known as the {\em braid arrangement}, and its regions as the {\em Weyl chambers} of 
402: the Lie algebra $\mathfrak{sl}(n)$.  
403: The maximal cones in the $S_n$-fan, which are the closures
404: of the permutation equivalence classes,
405: are indexed
406: by permutations $\delta$ in $ S_n$.
407: A {\em coarsening} of the $S_n$-fan is a fan $\mathcal{F}$ such that each
408: permutation equivalence class
409: of $\R^n$ is fully contained in a cone $C$ of $\mathcal{F}$. Such a fan
410: $\mathcal{F}$ defines a partition of $S_n$ because each maximal cone of the $S_n$-fan is contained in some cone $C \in \mathcal{F}$.
411: 
412: \begin{definition}
413: A {\em convex rank test} is a partition of the symmetric group
414:  $S_n$ which is induced by a coarsening of the $S_n$-fan.
415: We identify the fan with that rank test.
416: \end{definition}
417: 
418: We say that
419: two maximal cones, indexed by $\delta$ and $\delta'$, of the $S_n$-fan
420: {\em share a wall} if there exists an index $k$ such that
421: $\delta_k = \delta'_{k+1}$, $  \delta_{k+1} = \delta'_k$,
422: and $\delta_i = \delta'_i$ for $\,i \not\in \{k,k+1\}$. 
423: This condition means that
424:   the corresponding permutations $\delta$ and $\delta'$ differ
425: by an adjacent transposition.
426: To such an unordered pair $\{\delta,\delta'\}$,
427: we associate the following {\em (elementary) conditional independence (CI) statement}:
428: \begin{equation}
429: \label{CIStatement}
430:  \delta_k \perp \!\!\! \perp  \delta_{k+1} \,|\, \{\delta_1 , \ldots,  \delta_{k-1} \}.
431:  \end{equation}
432: The notation was coined by Dawid \cite{Dawid}, where it is used to formally describe conditional independence among sets of random variables; we will see the connection shortly.  
433: For $k=1$ we use the standard convention to abbreviate
434: $\, \delta_1 \perp \!\!\! \perp  \delta_{2} \,|\, \{\, \} \,$ by
435: $\, \delta_1 \perp \!\!\! \perp  \delta_{2}$.
436: 
437: \begin{example} \label{twenty-two}
438: For $n=3$ there are
439: $40$ pre-convex rank tests (Example \ref{bell}),
440: but only $22$ of them are convex rank tests.
441: The corresponding CI models are shown
442: in Figure 5.6 on page 108 in \cite{Studeny2005Probabilistic}.
443: \end{example}
444: 
445: 
446: The formula
447: (\ref{CIStatement})  defines a map from the set of walls of the $S_n$-fan
448:  onto the set 
449: $$
450: \mathcal{T}_n \,\, :=  \,\, \bigl\{
451: \, i \perp \!\!\! \perp j \,|\, K \,: \, K \subseteq [n] \backslash \{i,j\} \bigr\}. $$
452: of all elementary CI statements.
453: In this manner, each wall of the $S_n$-fan is labeled by a CI statement.
454: The map from walls to CI statements is not injective; 
455: there are $(n-k-1)!(k-1)!$ walls which are labeled by  \eqref{CIStatement}.  
456: 
457: The $S_n$-fan is the normal fan \cite{Ziegler1995}
458: of the {\em permutohedron} ${\bf P}_n$, which is the $(n-1)$-dimensional convex hull of
459: the vectors $(\rho_1,\ldots,\rho_n) \in \R^n$, where $\rho$ runs
460: over all rank vectors of permutations in $S_n$.
461: Each edge of ${\bf P}_n$ joins two permutations if they differ by an adjacent transposition.  In other words, each edge corresponds to a wall and is thus labeled by a CI statement.
462: A collection of parallel edges of ${\bf
463: P}_n$ that are perpendicular to a given hyperplane $\{x_i=x_j\}$ corresponds to the set of
464: CI statements $i \indep j |K$, where $K$ ranges over all subsets of
465: $[n] \backslash \{i,j\}$. 
466: 
467: The two-dimensional faces of ${\bf P}_n$
468: are squares and regular hexagons, and two edges of  ${\bf P}_n$ have
469: the same label in $\mathcal{T}_n$ if, but not only if, they are
470: opposite edges of a square.
471: Figure 2(c) depicts the subset of ${\bf P}_5$ in which the last two coordinates of $u \in \R^n$ are less than or equal to all other coordinates.  It consists of two copies of the hexagon in 2(a), with the final two entries
472:  of the descent vector either $4|5$ (in the top hexagon) or $5|4$ (in the bottom hexagon).
473: All vertical edges are labeled by the CI statement $4 \indep 5 | \{1,2,3\}$.
474: 
475: \begin{figure}[thb]\label{UpDown}
476: \[
477: \begin{array}{ccc}
478:  \begin{xy}<15mm,0cm>:
479: (-.9,1.3) *+!{++};
480: (-1.5,-.8) *+!{+-};
481: (1.5,.8) *+!{-+};
482: (.9,-1.4) *+!{--};
483: (-.5,\sinpioverthree)  ="123"  *+!DR{1|2|3} *{\bullet};
484: (.5 ,\sinpioverthree)  ="132"  *+!DL{1|3|2} *{\bullet};
485: (1,0)                  ="312"  *+!L{3|1|2}  *{\bullet};
486: (.5,-\sinpioverthree)  ="321"  *+!UL{3|2|1} *{\bullet};
487: (-.5,-\sinpioverthree) ="231"  *+!UR{2|3|1} *{\bullet};
488: (-1,0)                 ="213"  *+!R{2|1|3}  *{\bullet};
489:    "123";"132" **@{.};
490:    "132";"312" **@{-};
491:    "312";"321" **@{.};
492:    "321";"231" **@{.};
493:    "231";"213" **@{-};
494:    "213";"123" **@{.};
495: (\sinpioverthree, 0.4)  *+!{1 \indep 3 | \emptyset} ;
496: (-\sinpioverthree, -0.5) *+!{1 \indep 3 | \{ 2\} } ;
497:  \end{xy}
498: &
499: \begin{xy}
500:    <15mm,0mm>:
501: (0,0)  ="origin" ;
502: (\sinpioverthree, 0.5)  ="uprt"  *+!DL{1 \indep 3 | \emptyset} ;
503: (\sinpioverthree, -0.5)  ="dwnrt"  ;
504: (-\sinpioverthree, 0.5)  ="upl" ;
505: (-\sinpioverthree, -0.5)  ="dwnl" *+!UR{1 \indep 3 | \{ 2\} } ;
506: (0, 1)  ="up" ;
507: (0,-1)  ="dwn" ;
508:    "origin";"uprt" **@{--};
509:    "origin";"dwnrt" **@{-};
510:    "origin";"upl" **@{-};
511:    "origin";"dwnl" **@{--};
512:    "origin";"up" **@{-};
513:    "origin";"dwn" **@{-};
514:  \end{xy}
515: &
516: \begin{xy}<19mm,0cm>:
517: %bottom hexagon
518: (-.5,.43)  ="123B"   *{\bullet};
519: (.5 ,.43)  ="132B"   *{\bullet};
520: (1,0)      ="312B"   *{\bullet};
521: (.5,-.43)  ="321B"   *{\bullet};
522: (-.5,-.43) ="231B"   *{\bullet};
523: (-1,0)     ="213B"   *{\bullet};
524:    "123B";"132B" **@{.};
525:    "132B";"312B" **@{.};
526:    "312B";"321B" **@{-};
527:    "321B";"231B" **@{-};
528:    "231B";"213B" **@{-};
529:    "213B";"123B" **@{.};
530: %top hexagon
531: (-.5,.83)  ="123T"   *{\bullet};
532: (.5 ,.83)  ="132T"   *{\bullet};
533: (1,.4)    ="312T"    *{\bullet};
534: (.5,-.03)  ="321T"  *{\bullet};
535: (-.5,-.03) ="231T"  *{\bullet};
536: (-1,.4)     ="213T"  *{\bullet};
537:    "123T";"132T" **@{-};
538:    "132T";"312T" **@{-};
539:    "312T";"321T" **@{-};
540:    "321T";"231T" **@{-};
541:    "231T";"213T" **@{-};
542:    "213T";"123T" **@{-};
543: %connecting vertical lines
544:    "123T";"123B" **@{.};
545:    "132T";"132B" **@{.};
546:    "312T";"312B" **@{-};
547:    "321T";"321B" **@{-};
548:    "231T";"231B" **@{-};
549:    "213T";"213B" **@{-};
550: %labels
551: (-.075,0.58) *+!{4 \indep  5 |\{1,2,3\}};
552: %{\ar@{->}@/_{1pc}/ "hexindep"; (.49,-.2)}
553: (0,1) *+!{*|\!*\!|\!*\!|4|5};
554: (0,-.65) *+!{*|\!*\!|\!*\!|5|4};
555:  \end{xy}\\
556: \mbox{\bf (a)} & \mbox{\bf (b)}  & \mbox{\bf (c)}
557: \end{array}
558: \]
559: \caption{{\bf (a)} The permutohedron ${\bf P}_3$ and {\bf (b)} the $S_3$-fan projected to the plane.
560: The indicated rank test is up-down analysis. Each permutation is represented by
561: its descent vector $\delta = \delta_1 | \delta_2 | \delta_3$.  Missing walls of the $S_n$-fan, or solid edges of ${\bf P}_n$, are labelled by CI statements. 
562:  {\bf (c)} Edges of the permutohedron on opposite sides of a square (here, all vertical edges) are labelled by the same CI statement; hexagonal prisms such as the one pictured here appear in ${\bf P}_n$ for $n \geq 5$.}
563: \end{figure}
564: 
565: 
566: 
567:  Any convex rank test $\mathcal{F}$ is characterized
568: by the collection of walls $\{\delta,\delta'\}$ that are removed
569: when passing from the $S_n$-fan
570: to $\mathcal{F}$.
571:   So, from (\ref{CIStatement}), any convex rank test
572: $\mathcal{F}$ maps to a set  $\mathcal{M}_\mathcal{F}\,$
573: of CI statements corresponding to missing walls, or a set $\mathbf{M}_\mathcal{F}$ 
574: of edges of the permutohedron.
575: For example, if $\mathcal{F}$ is the fan obtained by removing the two dashed rays in 
576: Figure 2 (b) then the corresponding set
577: of CI statements is $\,\mathcal{M}_\mathcal{F} \,= \,
578: \bigl\{ 1 \indep 3 | \emptyset , \,1 \indep 3 | \{ 2\}  \bigr\}$.
579: 
580: Conditional independence statements \cite{Dawid} describe the dependence relationship among random variables.  
581: %Consistent collections of such statements are governed by the following
582: %axiom system which was introduced by
583: % \cite{Pearl}.
584:  A {\em semigraphoid}  is a set $\mathcal{M}$ of {\em general} conditional independence statements satisfying certain properties  \cite{Pearl}.
585:    These general conditional independence statements, in contrast to the elementary CI statements already introduced, can take subsets of $[n]$ in their first two arguments.  The conditions are, for $X,Y,Z$ pairwise disjoint subsets of $[n]$, 
586: \begin{eqnarray*}
587: {\rm (SG 1)} &  X \perp \!\!\! \perp Y \, |\, Z  \in \mathcal{M} \implies Y \perp \!\!\! \perp X \, |\, Z  \in \mathcal{M}\\
588: {\rm (SG 2)} &  X \perp \!\!\! \perp Y \, |\, Z  \in \mathcal{M} \mbox{ and } U \subset X \implies U \perp \!\!\! \perp Y \, |\, Z  \in \mathcal{M}\\
589: {\rm (SG 3)} &  X \perp \!\!\! \perp Y \, |\, Z  \in \mathcal{M} \mbox{ and } U \subset X \implies X \perp \!\!\! \perp Y \, |\, (U \cup Z)  \in \mathcal{M}\\
590: {\rm (SG 4)} &  X \perp \!\!\! \perp Y \, |\, Z  \in \mathcal{M} \mbox{ and } X \perp \!\!\! \perp W \,|\, (Y \cup Z) \implies X \perp \!\!\! \perp (W \cup Y) \, |\, Z  \in \mathcal{M}.
591: \end{eqnarray*}
592: It was shown by Studen\'{y} \cite{Studeny1990} that these are not a complete set of axioms for probabilistic conditional independence, although they are true of any probabilistic model.  A semigraphoid is determined by its {\em trace} among statements of the form $ i \perp \!\!\! \perp j \, |\, K $  where $i$ and $j$ are singletons.  Namely, $I \indep J | K$ holds if and only if $i \indep j |L$ for all $i \in I, j \in J$ and $L$ such that $K \subseteq L \subseteq (I \cup J \cup K) \setminus ij$; see \cite{Matus1992Equivalence}.
593: Casting the semigraphoid axiom in terms of the trace, we say that 
594: a subset $\mathcal{M} $ of $\mathcal{T}_n$ is a {\em semigraphoid} if 
595: $\, i \perp \!\!\! \perp j \, |\, K \in  \mathcal{M}\,$ implies
596: $\, j \perp \!\!\! \perp i \, |\, K \in  \mathcal{M}\,$ and
597: the following axiom holds:
598: \begin{eqnarray*}
599: {\rm (SG)} &&  \qquad \quad i \perp \!\!\! \perp j \, |\, K \cup {\ell}\, \in \mathcal{M}
600: \quad \, \mbox{and} \,\quad
601: i \perp \!\!\! \perp \ell \, |\, K\, \in \mathcal{M} \\
602: && \!\!\! \mbox{implies } \,\,\,\,\,
603: i \perp \!\!\! \perp j \,|\, K \in \mathcal{M}
604:  \qquad \mbox{and } \quad i \perp \!\!\! \perp \ell \,| \, K \!\cup\! j  \in \mathcal{M}.
605: \end{eqnarray*}
606: This axiom is stated in \cite{Matus2004, Studeny2005Probabilistic}.
607: Our first result is that semigraphoids and convex rank tests are the same combinatorial object:
608: 
609: \begin{theorem} \label{fantheorem}
610: The map $\mathcal{F} \mapsto \mathcal{M}_\mathcal{F}$ is
611: a bijection between convex rank tests and  semigraphoids.
612: \end{theorem}
613: 
614: Before presenting the proof of this theorem, we shall discuss an example. 
615: 
616: \begin{example}[Up-down analysis] \label{ex.updwn} 
617: Let $\mathcal{F}$ denote the convex rank test called
618:  up-down analysis \cite{Willbrand2005}. In this test, each permutation
619: $\pi \in S_n$ is mapped to the sign vector of its first differences,
620: or, equivalently, its descent set. Thus this test is the natural map
621: $\,\tau : S_n \rightarrow \{-,+\}^{n-1}$.
622: The corresponding semigraphoid $ \mathcal{M}_\mathcal{F}$
623: consists of all CI statements $\, i \perp \!\!\! \perp j  \,| \, K \,$
624: where $\, | i -j | \geq 2 $.
625: 
626: This convex rank test is visualized in Figure 2(a,b) for $n=3$.  Permutations are in the same class (have the same sign pattern) if they are connected by a solid edge; there are four classes.  In the $S_3$-fan, the two missing walls are labeled by conditional independence statements as defined in (\ref
627: {CIStatement}). For $n=4$ the up-down analysis test  $\mathcal{F}$ 
628: is depicted in Figure 3.
629: The double edges correspond to the twelve CI statements
630: in $\mathcal{M}_\mathcal{F}$. There are eight classes; e.g.,
631: the class $\{3|4|1|2,3|1|4|2,1|3|4|2,1|3|2|4,3|1|2|4\}$ consists
632: of the five permutations in $S_4$ which have the up-down pattern  $(-,+,-)$.
633: \end{example}
634: 
635: 
636: \begin{figure}[htb]\label{UpDown4}
637: \[
638:  \begin{xy}<25mm,0cm>:
639: %Permutohedron with n=4
640: %Points and labels
641: (1,0)  ="3214"  *+!U{3214} *{\bullet};
642: (1.8,0) ="2314"  *+!U{2314} *{\bullet};
643: (.7,.18)  ="3241"  *+!R{3241} *{\bullet};
644: (1.5,.18)  ="2341"  *+!L{2341} *{\circ}; %in back
645: (.86,.5)  ="3124"  *+!R{3124} *{\bullet};
646: (2.45,.5)  ="2134"  *+!DR{2134} *{\bullet};
647: (.2,.8)  ="3421"  *+!R{3421} *{\bullet};
648: (1.8 ,.8)  ="2431"  *+!U{2431} *{\circ}; %in back
649: (1.5,1)  ="1324"  *+!R{1324} *{\bullet};
650: (2.29,1)  ="1234"  *+!DR{1234} *{\bullet};
651: (.35,1.14)  ="3142"  *+!L{3142} *{\bullet};
652: (2.75,1.14)  ="2143"  *+!U{2143} *{\bullet};
653: (.02,1.29)  ="3412"  *+!DR{3412} *{\bullet};
654: (2.44,1.29)  ="2413"  *+!DR{2413} *{\circ}; %in back
655: (.5,1.45)  ="4321"  *+!DR{4321} *{\circ}; %in back
656: (1.34,1.45)  ="4231"  *+!L{4231} *{\circ}; %in back
657: (1,1.6)  ="1342"  *+!DR{1342} *{\bullet};
658: (2.6,1.6)  ="1243"  *+!L{1243} *{\bullet};
659: (.35,1.92)  ="4312"  *+!DR{4312} *{\bullet};
660: (1.97,1.92)  ="4213"  *+!DR{4213} *{\circ}; %in back
661: (1.3,2.26)  ="1432"  *+!UR{1432} *{\bullet};
662: (2.11,2.26)  ="1423"  *+!L{1423} *{\bullet};
663: (.99,2.41)  ="4132"  *+!DR{4132} *{\bullet};
664: (1.81,2.41)  ="4123"  *+!DL{4123} *{\bullet};
665: %EDGES %Squares
666: %Bottom square
667: "3214";"2314" **@{-}; % 2 indep 3
668: "3241";"2341" **@{.}; % 2 indep 3
669: "3241";"3214" **@{=}; % 1 indep 4 | 23
670: "2341";"2314" **@{:}; % 1 indep 4 | 23
671: %Right square
672: "2134";"1234" **@{-}; % 1 indep 2 |
673: "2143";"1243" **@{-}; % 1 indep 2 |
674: "1234";"1243" **@{-}; % 3 indep 4 | 12
675: "2134";"2143" **@{-}; % 3 indep 4 | 12
676: %Top square
677: "4132";"4123" **@{-}; % 2 indep 3 | 14
678: "1432";"1423" **@{-}; % 2 indep 3 | 14
679: "1432";"4132" **@{=}; % 1 indep 4 |
680: "4123";"1423" **@{=}; % 1 indep 4 |
681: %Left square
682: "4312";"3412" **@{-}; % 3 indep 4 |
683: "4321";"3421" **@{.}; % 3 indep 4 |
684: "4312";"4321" **@{.}; % 1 indep 2 | 34
685: "3412";"3421" **@{-}; % 1 indep 2 | 34
686: %Back square
687: "4213";"2413" **@{:}; % 2 indep 4 |
688: "4231";"2431" **@{:}; % 2 indep 4 |
689: "4213";"4231" **@{:}; % 1 indep 3 | 24
690: "2413";"2431" **@{:}; % 1 indep 3 | 24
691: %Front square
692: "1342";"1324" **@{=}; % 2 indep 4 | 13
693: "3142";"3124" **@{=}; % 2 indep 4 | 13
694: "1342";"3142" **@{=}; % 1 indep 3 |
695: "1324";"3124" **@{=}; % 1 indep 3 |
696: %Rest of edges
697: "2314";"2134" **@{=}; % 1 indep 3 | 2
698: "3124";"3214" **@{-}; % 1 indep 2 | 3
699: "3421";"3241" **@{=}; % 2 indep 4 | 3
700: "3412";"3142" **@{=}; % 1 indep 4 | 3
701: "1324";"1234" **@{-}; % 2 indep 3 | 1
702: "1432";"1342" **@{-}; % 3 indep 4 | 1
703: "4312";"4132" **@{=}; % 1 indep 3 | 4
704: "1423";"1243" **@{=}; % 2 indep 4 | 1
705: "2341";"2431" **@{.}; % 3 indep 4 | 2
706: "4321";"4231" **@{.}; % 2 indep 3 | 4
707: "2413";"2143" **@{:}; % 1 indep 4 | 2
708: "4123";"4213" **@{.}; % 1 indep 2 | 4
709: %"";"" **@{.}; %  indep  |
710: \end{xy}
711: \]
712: \caption{The permutohedron ${\bf P}_4$
713: with vertices marked by descent vectors $\delta$ (bars $|$ omitted).
714: The convex rank test indicated by the double edges is up-down analysis.}
715: \end{figure}
716: 
717: 
718: 
719: 
720: Our proof of Theorem \ref{fantheorem} rests on translating
721: the semigraphoid axiom (SG) into
722: geometric statements about edges of the
723: permutohedron.
724: Recall that a semigraphoid $\mathcal{M}$ can be identified with the set $\mathbf{M}$ of
725: edges of the permutohedron whose CI statement labels are those of $\mathcal{M}$.
726: 
727: \begin{observation} \label{obs:SqHexAxioms}
728: A set $\mathbf{M}$ of edges of the permutohedron ${\bf P}_n$ is a
729: semigraphoid if and only if the set $\mathbf{M}$ satisfies the following
730: two geometric axioms: \\
731: {\bf Square axiom:} Whenever an edge of a square is in
732: $\mathbf{M}$, then the opposite edge is also
733: in $\mathbf{M}$. \\ %\hfill \break \noindent
734: \[
735: \begin{xy}<5mm,0cm>:
736: (-.7,.7)  ="TL"   *{\bullet};
737: (.7,.7)  ="TR"   *{\bullet};
738: (-.7,-.7)  ="BL"   *{\bullet};
739: (.7,-.7)  ="BR"   *{\bullet};
740:    "TL";"BL" **@{-};
741:    "TR";"BR" **@{.};
742:    "BR";"BL" **@{.};
743:    "TL";"TR" **@{.};
744: \end{xy} \quad
745: \implies \quad
746: \begin{xy}<5mm,0cm>:
747: (-.7,.7)  ="TL"   *{\bullet};
748: (.7,.7)  ="TR"   *{\bullet};
749: (-.7,-.7)  ="BL"   *{\bullet};
750: (.7,-.7)  ="BR"   *{\bullet};
751:    "TL";"BL" **@{-};
752:    "TR";"BR" **@{-};
753:    "BR";"BL" **@{.};
754:    "TL";"TR" **@{.};
755: \end{xy}
756: \]
757: {\bf Hexagon axiom:} Whenever two ad\-ja\-cent edg\-es of a hexagon
758: are in $\mathbf{M}$, then the two opposite edges of that hexagon
759: are also in $\mathbf{M}$.
760: \[
761: \begin{xy}<5mm,0cm>:
762: (-.5,\sinpioverthree)  ="123"   *{\bullet};
763: (.5 ,\sinpioverthree)  ="132"   *{\bullet};
764: (1,0)                  ="312"   *{\bullet};
765: (.5,-\sinpioverthree)  ="321"   *{\bullet};
766: (-.5,-\sinpioverthree) ="231"   *{\bullet};
767: (-1,0)                 ="213"   *{\bullet};
768:    "123";"132" **@{-};
769:    "132";"312" **@{.};
770:    "312";"321" **@{.};
771:    "321";"231" **@{.};
772:    "231";"213" **@{.};
773:    "213";"123" **@{-};
774: \end{xy} \quad
775: \implies \quad
776: \begin{xy}<5mm,0cm>:
777: (-.5,\sinpioverthree)  ="123"   *{\bullet};
778: (.5 ,\sinpioverthree)  ="132"   *{\bullet};
779: (1,0)                  ="312"   *{\bullet};
780: (.5,-\sinpioverthree)  ="321"   *{\bullet};
781: (-.5,-\sinpioverthree) ="231"   *{\bullet};
782: (-1,0)                 ="213"   *{\bullet};
783:    "123";"132" **@{-};
784:    "132";"312" **@{.};
785:    "312";"321" **@{-};
786:    "321";"231" **@{-};
787:    "231";"213" **@{.};
788:    "213";"123" **@{-};
789: \end{xy}
790: \]
791: \end{observation}
792: 
793: 
794: Let $\mathbf{M}$ be the subgraph of the edge graph of ${\bf P}_n$
795: defined by the statements in $\mathcal{M}$; that is, $\mathbf{M}$ consists of edges whose
796: labels are in $\mathcal{M}$.  Each class of the rank test defined by
797: $\mathcal{M}$ consists of the permutations in some connected
798: component of $\mathbf{M}$. We regard a path from
799: $\delta$ to $\delta'$ on ${\bf P}_n$ as a word $\sigma^{(1)} \cdots
800: \sigma^{(l)}$ in the free associative algebra $\mathcal{A}$
801: generated by the adjacent transpositions of $[n]$.  For example, the
802: transposition $\sigma_{23} := (23)$ gives the path from $\delta$ to
803: $\delta'=\sigma_{23} \delta = \delta_1 | \delta_3 | \delta_2 | \delta_4
804: | \dots  | \delta_n$.  The following relations in $\mathcal{A}$
805: define a presentation of the group algebra of $S_n$ as a quotient of $\mathcal{A}$:
806: 
807: \[\begin{array}{ccc}
808: {\rm (BS)} & \; \sigma_{i, i+1}\cdot \sigma_{i+k+1, i+k+2}\, -\, \sigma_{i+k+1, i+k+2} \cdot \sigma_{i, i+1}, & \\
809: {\rm (BH)} & \; \sigma_{i, i+1} \cdot \sigma_{i+1, i+2} \cdot \sigma_{i, i+1} - \sigma_{i+1, i+2}\cdot
810:  \sigma_{i, i+1} \sigma_{i+1, i+2}, & \qquad \mbox{   and} 
811: \\
812: {\rm (BN)} & \;  \sigma_{i, i+1}^2 -1, &
813: \end{array}\]
814: %\end{align*}
815: where suitable $i$ and $k$ vary over $[n]$.  %where this makes sense.
816: The first two are the \emph{braid relations}, and the third
817: represents the idempotency of each transposition.
818: 
819: Now, we regard these relations as properties of a
820: set of edges of ${\bf P}_n$, by identifying a word and a
821: permutation $\delta$ with the set of edges that comprise the
822: corresponding path in ${\bf P}_n$.  For example, a set satisfying
823: (BS) is one such that, starting from any $\delta$, the edges of the
824: path $\sigma_{i, i+1} \sigma_{i+k+1, i+k+2}$ are in the set if and
825: only if the edges of the path $ \sigma_{i+k+1, i+k+2} \sigma_{i,
826: i+1}$ are in the set. Note then, that (BS) is the square axiom,
827: and (BH) is a weaker version of the hexagon axiom of semigraphoids.  That is, implications in
828: either direction hold in a semigraphoid.  However, (BN) holds only
829: directionally in a semigraphoid: if an edge lies
830: in the semigraphoid, then its two vertices are in the same class;
831: but the empty path at some vertex $\delta$ certainly does not imply
832: the presence of all incident edges in the semigraphoid.  Thus, for
833: a semigraphoid, (BS) and (BH) hold, but (BN) must be replaced with
834: the directional version
835: 
836: \vspace{3mm}
837: 
838: \qquad \qquad \qquad  ${\rm (BN')} \;\; \
839: \qquad \sigma_{i, i+1}^2 \rightarrow 1.$
840: \vspace{3mm}
841: 
842: \noindent
843: We now consider a path $p$ from $\delta$ to $\delta'$ in a semigraphoid. 
844: Here is a crucial lemma for our proof:
845: 
846: \begin{lemma} \label{lem.allshortestpaths}
847: Suppose that $\mathcal{M}$ is a semigraphoid.
848: If $\delta$ and $\delta'$ lie in the same class of $\mathcal{M}$, then so do all shortest paths on ${\bf P}_n$ between them.
849: \end{lemma}
850: 
851: The lemma in turn depends on the following version of a classical result due to
852: Jacques Tits. This result, which can be found in~\cite[p.~49-51]{Brown1989}),
853: essentially states that  the relations
854: (BS),(BH),(BN) form a Gr\"obner basis for the
855: two-sided ideals they generate in $\mathcal{A}$.
856: 
857: \begin{theorem}[Tits \cite{Tits1968Problem}]
858: \label{thm:Tits}
859: Let $p$ and $q$ be words representing paths on $\mathbf{P}_n$.
860: \begin{itemize}
861: \item[(1)] A word $p$ is (BS),(BH),(BN)-reduced if and only if it is (BS),(BH),(BN')-reduced.
862: \item[(2)] If $p$ and $q$ are reduced, then they represent the same element of 
863: the symmetric group $S_n$ if and only if $p$ can be transformed to $q$ by the the application of (BS) and (BH) only.
864: \end{itemize}
865: \end{theorem}
866: 
867: 
868: \begin{proof}[Proof of Lemma \ref{lem.allshortestpaths}]
869: Theorem \ref{thm:Tits} (1) says that if there is any path connecting $\delta$ and $\delta'$, then there is a shortest path connecting them.  Thus if $\delta$ and $\delta'$ lie in the same class of $\mathcal{M}$, some shortest path $\delta \rightarrow \delta'$ also lies in that class.  Now (2) says that if $p$ and $q$ are both shortest paths, then $q$ can be obtained from $p$ by application of only the square and hexagon axioms, (BS) and (BH).  Thus if any shortest path $\delta \rightarrow \delta'$ lies in the class of $\mathcal{M}$ containing them both, so do all other shortest paths connecting them.
870: \end{proof}
871: 
872: We need one lemma to deal with intersections of nonmaximal cones.
873: Denote by $\isfaceof$ the transitive relation ``is a face of''
874: and write $F_w(C)$ for the face of a cone $C$
875: at which $w$ is minimized.
876: 
877: \begin{lemma} \label{lem:reduction}
878: If the intersection of two cones $C_1$ and $C_2$ is a face of
879: both, then the intersection of any faces $D \isfaceof C_1$ and $E \isfaceof C_2$ is a face of both.
880: \end{lemma}
881: \begin{proof}
882: By transitivity of $\isfaceof$ and the hypothesis it suffices to show $D \cap E \isfaceof C_1 \cap C_2$.  Since $D \isfaceof C_1$, there exists a 
883: linear functional $w$ such that the face $F_w(C_1)$ equals $D$ and $C_1 \cap C_2 \subset C_1 \subset H_w^+$.
884: Then $F_w(C_1 \cap C_2)=D \cap C_2$  so $D \cap C_2 \isfaceof C_1 \cap C_2$.
885: Similarly, $E \cap C_1 \isfaceof C_1 \cap C_2$.
886: Then since the intersection of any two faces of $C_1 \cap C_2$ is also
887: a face, $D \cap E \isfaceof C_1 \cap C_2$ as desired.
888: \end{proof}
889: 
890: 
891: \begin{proof}[Proof of Theorem \ref{fantheorem}]
892: Both semigraphoids and convex rank tests can be regarded as sets of edges of ${\bf P}_n$.
893: %We will show that their axiom systems are equivalent. 
894:  We first
895: show that a semigraphoid satisfies (PC). Consider $\delta, \delta'$
896: in the same class $C$ of a semigraphoid, and let $\delta'' \in
897: \mathcal{L}(\delta \cap \delta')$.  Further, let $p$ be a shortest path from
898: $\delta$ to $\delta''$ (so, $p \delta = \delta''$), and let $q$ be a
899: shortest path from $\delta''$ to $\delta'$.  We claim that $qp$ is a
900: shortest path from $\delta$ to $\delta'$, and thus
901: $\delta'' \in C$ by Lemma
902: \ref{lem.allshortestpaths}.  Suppose $qp$ is not a
903: shortest path.  Then, we can obtain a shorter path in the
904: semigraphoid by some sequence of substitutions according to (BS),
905: (BH), and (BN').  Only (BN') decreases the length of a
906: path, so the sequence must involve (BN').  Therefore, there is some $i$, $j$ in $[n]$, such that their positions
907: relative to each other are reversed twice in $qp$. But $p$ and $q$
908: are shortest paths, hence  one reversal occurs in each of $p$ and
909: $q$. Then $\delta$ and $\delta'$ agree on whether $i>j$ or
910: $j>i$, but the reverse holds in $\delta''$, contradicting
911: $\delta'' \in \mathcal{L}(\delta \cap \delta')$.  Thus every
912: semigraphoid is a pre-convex rank test.
913: 
914: Now, we show that a semigraphoid corresponds to a fan.
915: We first argue that we may reduce to the case of two maximal cones, each coming from a class in the semigraphoid, whose intersection is codimension one in both.  By Lemma \ref{lem:reduction}, we can consider maximal cones only.  Suppose two maximal cones $C_1$, $C_k$ have intersection $C_1 \cap C_k$ which is not codimension one.  Then there exists a sequence of maximal cones $C_1, C_2, \dots, C_k$ such that $C_i \cap C_{i+1}$ is codimension one, $C_1 \cap C_k \subset C_i \cap C_{i+1}$ for all $i = 1, \dots k-1$, and in fact $C_1 \cap C_k = C_1 \cap C_2 \cap \cdots \cap C_k$.  We have that $(C_i \cap C_{i+1}) \cap (C_{i+1} \cap C_{i+2})$ is a face of $C_{i+1}$ and $C_{i+2}$ by Lemma \ref{lem:reduction}, and also is a face of $C_i$.  Thus $C_i \cap C_{i+1} \cap C_{i+2} \isfaceof C_i, C_{i+1}, C_{i+2}$; continuing in this manner, we eventually get that $C_1 \cap C_2 \cap \cdots \cap C_k \isfaceof C_1, C_k$ as required.
916: 
917: Consider the cone corresponding to a class $C$.  We need only
918: show that its codimension one intersection with another maximal cone is a shared face.
919: Since $C$ is a cone of a coarsening of the $S_n$-fan, each facet of $C$ lies in a hyperplane
920: $H =\{x_i=x_j\}$.
921:  Suppose a face of $C$ coincides with the hyperplane $H$
922:  and that $i>j$ in $C$.  A vertex $\delta$
923: borders $H$ if $i$ and $j$ are adjacent in $\delta$. We will
924: show that if $\delta,\delta' \in C$ border $H$, then their
925: reflections $\widehat{\delta} = \delta_1  | \dots |j|i| \dots
926: | \delta_n$ and $\widehat{\delta'}= \delta'_1 |  \dots |j|i| \dots |\delta'_n$
927: both lie in some class $C'$. Consider a `great circle' path between
928: $\delta$ and $\delta'$ which stays closest to $H$: all vertices
929: in the path have $i$ and $j$ separated by at most one position, and
930: no two consecutive vertices have $i$ and $j$ nonadjacent.  This is a
931: shortest path, so it lies in $C$, by Lemma
932: \ref{lem.allshortestpaths}. Using the
933: square and hexagon axioms (Observation \ref{obs:SqHexAxioms}), we
934: see that the reflection of the path across $H$ is a path
935: in the semigraphoid that connects $\widehat{\delta}$ to
936: $\widehat{\delta'}$ (Figure 3).  This shows that the intersection of $C$ and $C'$ is a face of both.  Thus a semigraphoid is a convex rank test.
937: 
938: Finally, if $\mathbf{M}$ is a set of edges of ${\bf P}_n$ representing
939: a convex rank test, then it is easy to show that $\mathbf{M}$
940: satisfies the square and hexagon axioms.
941:  \end{proof}
942:  
943: \begin{figure}[htb]\label{fig:reflection}
944: \[
945:  \begin{xy}<15mm,0cm>:
946: %left hexagon
947: (0,0); %center
948: p+ (\sinpioverthree, 0.5) *{\bullet}; %uprt
949: p + (0,-1) *{\bullet} **@{.}; %dwnrt
950: p + (-\sinpioverthree,-.5) *{\bullet} **@{-}; %upl
951: p + (-\sinpioverthree,+.5) *{\bullet} *+!UR{\widehat{\delta}} **@{-}; %dwnl
952: p + (0,1) *{\bullet} *+!DR{\delta} **@{.};
953: p+ (\sinpioverthree, 0.5) *{\bullet} **@{-};
954: p+ (\sinpioverthree, -0.5) *{\bullet} **@{-};
955: %connectors
956: (\sinpioverthree, 0.5);
957: p + (1,0) **@{-};
958: (\sinpioverthree, -0.5);
959: p + (1,0) **@{-};
960: %right hexagon
961: (2.73205081,0); %center
962: p+ (\sinpioverthree, 0.5) *+!DL{\delta'} *{\bullet}; %uprt
963: p + (0,-1) *{\bullet} *+!UL{\widehat{\delta'}} **@{.}; %dwnrt
964: p + (-\sinpioverthree,-.5) *{\bullet} **@{-}; %upl
965: p + (-\sinpioverthree,+.5) *{\bullet} **@{-}; %dwnl
966: p + (0,1) *{\bullet} **@{.};
967: p+ (\sinpioverthree, 0.5) *{\bullet} **@{-};
968: p+ (\sinpioverthree, -0.5) *{\bullet} **@{-};
969: % Hyperplane
970: (-1.5,0);
971: p+(5.8,0) *+!UL{x_i = x_j}**@{--};
972:  \end{xy}\]
973: \caption{Reflecting a path across a hyperplane.}
974: \end{figure}
975: 
976: 
977: 
978: \section{The submodular cone}
979: 
980: 
981: In this section we focus on a subclass of the convex rank tests.
982: Let $2^{[n]}$ denote the collection of all
983: subsets of $[n] = \{1,2,\ldots,n\}$. Any real-valued function $\, w : 2^{[n]} \rightarrow \R \, $
984: defines a convex polytope $Q_w$ of dimension $\leq n-1$
985: as follows:
986: \begin{eqnarray*}  Q_w \,\,\, :=  &
987: \bigl\{ \, x \in \R^n \,: \,
988: x_1 + x_2 + \cdots + x_n = w([n]) \\
989: & \text{\  \,and } \sum\nolimits_{i \in I} x_i \leq w(I)\,\,
990: \hbox{for all} \,\, \emptyset\neq I \subseteq [n]   \,\bigr\}.
991: \end{eqnarray*}
992: A function $\, w : 2^{[n]} \rightarrow \R \, $ is called
993:  {\em submodular} if
994: $\,w(I) + w(J)\, \geq\, w(I \cap J) +  w(I \cup J)\,$
995: for $I,J \subseteq [n]$.  The {\em submodular cone}
996: is the cone ${\bf C}_n$ of all submodular functions $w :
997: 2^{[n]} \rightarrow \R$.
998:   Working modulo its lineality space
999:    $\,{\bf C}_n \cap (-{\bf C}_n) $, we regard
1000:    ${\bf C}_n$ as a pointed cone of dimension $2^n-n-1$.
1001: 
1002: Studying functions $w$ means that in considering the normal fan of a polytope $Q_w$, we want to retain information about non-binding inequalities that are just barely so, i.e.\ that hold with equality.  For this reason we define the {\em vector (normal) fan} \cite{BGS}.  % While the normal fan is a complete simplicial fan in $\R^n$, the vector normal fan, which is a set of subsets of a distinguished group of vectors  is \emph{not} a simplicial complex.  In our case, this distinguished set of vectors will be the $1$-skeleton of the $S_n$-fan.  There is a non-injective mapping from combinatorial fans to geometric fans.  The combinatorial fan retains limit information, making the distinction analogous to that between a variety and a scheme.
1003: The indicator function of each $I \in 2^{[n]}$ defines a vector $e_I$ in the $1$-skeleton of the $S_n$-fan, understood modulo $e_{[n]}$; for example, these vectors for $n=3$ are $e_{001}, e_{010}, e_{100}, e_{011}, \dots, e_{111}$.  
1004: A {\em vector fan} $\frkF$ is a collection of subsets of  $\{e_I: I \in 2^{[n]}\}$ such that $U, V \in \frkF$ implies $U \cap V \in \frkF$.
1005: A vector fan defines a usual fan by taking the maximal cones of the fan to be the cones generated by the vector sets in the vector fan.  We say that a vector fan is \emph{complete} if its fan is.  A vector fan $\frkF$ \emph{coarsens} another vector fan $\frkG$ if for all $U \in \frkG$, there exists $V \in \frkF$ with $U \subset V$. 
1006: 
1007: Given a function $w:2^{[n]} \rightarrow \R$, each $I\in 2^{[n]}$ defines an inequality $\sum_{i \in I} x_i \leq w_I$ appearing in the definition of $Q_w$; the vector normal fan tells us which of these inequalities holds with equality on some face of $Q_w$.  We define the {\em vector normal fan} of a function $w:2^{[n]} \rightarrow \R$ as the set $\{ \{e_I: I \in 2^{[n]}, \sum_{i \in I}x_i =w_I$ for all $x \in F\}$ for each face $F \in Q_w \}$. The vector normal fan of $w$ defines a fan which is the normal fan of $Q_w$ and retains additional information.
1008: 
1009: \begin{proposition} \label{prop:submodularnormal} 
1010: A function $\,w: 2^{[n]} \rightarrow \R \, $
1011: is submodular if and only if
1012: the vector normal fan of $w$ is a coarsening of the vector $S_n$-fan.
1013: \end{proposition}
1014: 
1015: \begin{example}
1016: Let $w_1 = w_2 =w_3 =1, w_{12}=w_{13}=w_{23}=w_{123}=3$. 
1017: The polytope $Q_w$ is the point $(1,1,1)$ but the function $w$ is not submodular. The vector normal fan $\frkF$ of $w$ is $\{\{e_{001},e_{010},e_{100}\}\}$ and the normal fan is all of $\R^3 / (1,1,1)$.  $\frkF$ does not coarsen the $S_n$-fan since, for example, $e_{110}$ is not contained in any set in $\frkF$.
1018: 
1019: However, if we change $w$ slightly to define the same $Q_w$ but with the inequalities corresponding to $011,101$, and $110$ also holding with equality, e.g.
1020: $w_1 = w_2 =w_3 =1, w_{12}=w_{13}=w_{23}=2$, and $w_{123}=3$, the resulting vector normal fan of $w$ is a coarsening of the (vector) $S_n$-fan.
1021: \end{example}
1022: 
1023: \begin{proof}
1024: We show only the if direction
1025: of Proposition \ref{prop:submodularnormal}.
1026:   Suppose $w$ is not submodular.  Then there exist $I,J \subset 2^{[n]}$ such that\[
1027: w_I + w_J < w_{I \cap J} + w_{I \cup J}
1028: \] 
1029: We also have that
1030: \begin{eqnarray*}
1031: \sum_{i \in I \cup J} x_i + \sum_{i \in I \cap J} x_i & = & \sum_{i \in I} x_i + \sum_{i \in J} x_i\\
1032: &\leq & w_I + w_J < w_{I \cap J} + w_{I \cup J}
1033: \end{eqnarray*}
1034: So $\sum_{i \in I \cup J} x_i < w_{I \cup J} + (w_{I \cap J}- \sum_{i \in I \cap J} x_i)$ and similarly $\sum_{i \in I \cap J} x_i < w_{I \cap J} + (w_{I \cup J}- \sum_{i \in I \cup J} x_i)$, so that at most one of the inequalities corresponding to $I \cup J$ and $I \cap J$ can hold with equality at any point of $Q_w$.  Then any set in the vector normal fan of $w$ either fails to
1035: contain $e_{I \cap J}$ or fails to contain $e_{I \cup J}$.
1036: \end{proof}
1037: 
1038: %Check
1039: Proposition \ref{prop:submodularnormal} can be paraphrased as follows:
1040:  the function $w$ is submodular if and only if
1041: the optimal solution of
1042: $$
1043: \mbox{maximize $u \cdot x$ subject to $x \in Q_w$}
1044: $$
1045: depends only on the permutation equivalence class
1046: of $u$.
1047: Thus, solving this linear programming problem
1048: constitutes a convex rank test.  Any such test is called a
1049: {\em submodular rank test}.
1050: 
1051: A convex polytope is a {\em (Minkowski) summand}
1052: of another polytope if the normal fan of the latter
1053: refines the normal fan of the former. The
1054: polytope $Q_w$ that represents a submodular rank test
1055: is a  summand of the permutohedron
1056: ${\bf P}_n$.
1057: 
1058: \begin{theorem}
1059: The following combinatorial objects are equivalent for any positive integer~$n$: \\
1060: \noindent $1.$ submodular rank tests, \hfill \break
1061: \noindent $2.$ summands of the permutohedron $\mathbf{P}_n$, \hfil \break
1062: \noindent $3.$ structural conditional~independence~models \cite{Studeny2005Probabilistic}, \hfil \break
1063: \noindent $4.$ faces of the submodular cone ${\bf C}_n$ in $\R^{2^n}$. 
1064: \end{theorem}
1065: 
1066: \begin{proof}
1067: We have 1$\iff$2 from Proposition \ref{prop:submodularnormal}, and
1068: 1$\iff$3 follows from \cite{Studeny2005Probabilistic}. Further, 1$\iff$4 
1069: is a direct consequence of our definition of submodular rank tests.
1070: \end{proof}
1071: 
1072: \begin{remark}
1073: All $22$ convex rank tests for $n=3$ are submodular.
1074: The submodular cone ${\bf C}_3$ is a
1075: $4$-dimensional cone whose base is a
1076: bipyramid. Its f-vector is $(1,5,9,6,1)$. The polytopes $Q_w$, as
1077: $w$ ranges over representatives of the faces of ${\bf C}_3$,
1078: are all the Minkowski summands of~${\bf P}_3$.
1079: \end{remark}
1080: 
1081: \begin{proposition} \label{notsubmodular}
1082: For $n \geq 4$, there exist convex rank tests that are not submodular rank tests.
1083: Equivalently, there are fans that coarsen the $S_n$-fan
1084: but are not the normal fan of any polytope.
1085: \end{proposition}
1086: 
1087: \begin{proof}
1088: This result is well-known. It is stated in Section 2.2.4 of \cite{Studeny2005Probabilistic} in the following form:  ``There exist semigraphoids that are not structural.''
1089: \end{proof}
1090: 
1091: An interesting example which also proves Proposition \ref{notsubmodular}
1092: is the following semigraphoid:
1093: $$
1094: \mathcal{M} \quad = \quad
1095: \bigl\{
1096:  2 \perp \!\!\! \perp 3 | \{1,4\},\,
1097:  1 \perp \!\!\! \perp 4 |  \{2,3\}, \,  
1098:  1 \perp \!\!\! \perp 2 | \emptyset,\,
1099:  3 \perp \!\!\! \perp 4 |\emptyset \,\bigr\}.
1100:  $$
1101: The corresponding fan consists of unimodular cones, or, equivalently,
1102: the posets $P_i$ representing this non-submodular convex rank test are all trees.
1103: This example answers a question posed in the first version of \cite{PRW}.
1104: A systematic method for showing that a semigraphoid is not submodular can be
1105: found in \cite{counterexamples}. Results in that paper include
1106: an example of a coarsest semigraphoid which is not submodular and a proof that the semigraphoid semigroup is not normal.
1107: 
1108: \begin{remark} \label{rmk1}
1109: For $n=4$ there are $22108$ submodular rank tests, one for each face of the
1110: $11$-dimensional cone ${\bf C}_4$.
1111: The base of this submodular cone is a
1112: $10$-dimensional polytope with
1113: $f$-vector $
1114: (1,37, 356,  $ $ 1596, 3985, 5980, 5560, 3212, 1128, 228, 24,1)$.  The $37 $
1115: vertices of this polytope correspond to the maximal semigraphoids.
1116: These come in seven
1117: symmetry classes up to the $*$ involution (\ref{starinvolution}) and the $S_4$-action.
1118: The types of maximal semigraphoids
1119: for $n=4$ are displayed in the following table:
1120: 
1121: 
1122: \bigskip
1123: {\small
1124: \noindent \begin{tabular}{lcccc}
1125: Symmetry & \!\!\!\! No. \!\!\!\!\!\! & $i \indep j $  & $i \indep j | k$ & $i \indep j | \{k,l\}$ \\
1126: \hline
1127: $1 \times$ and $*$ & 2 & all & all & none \\
1128: $4 \times$ and $*$ & 8 & all & \!\! \! all but $2 \indep 3 | 1, 1 \indep 3 | 2, 1 \indep 2 |3$ & $3 \indep 4|12, 2 \indep 4 |13, 1 \indep 4|23$\\
1129: $6 \times$ incl. $*$ & 6 & all but $1\indep 2$& all but $1 \indep 2 | 3, 1 \indep 2 | 4$ & all but $1 \indep 2|34$\\
1130: $4 \times$ and $*$ & 8 & all & $2 \indep 3 | 4, 2 \indep 4 | 3, 3 \indep 4 |2$ & $3 \indep 4|12, 2 \indep 4 |13, 2 \indep 3|14$\\
1131: $1 \times$, self-$*$ & 1 & all & none & all \\
1132: $6 \times$ incl. $*$ & 6 & all but $1\indep 2$& $2 \indep 3|1, 2\indep 4|1, 1 \indep 3|2, 1 \indep 4|2$ & all but $3 \indep 4|12$\\
1133: $6 \times$ incl. $*$ & 6 & $3\indep 4$& all but $2 \indep 3 | 4, 2\indep 4 | 3, 1 \indep 4 | 3, 1 \indep 3|4$ & $1 \indep 2|34$\\
1134: \hline
1135: \end{tabular}
1136: }
1137: \end{remark}
1138: \medskip
1139: 
1140: 
1141: \begin{remark} \label{rmk2}
1142: For $n=5$ there are
1143: $117978$ coarsest submodular rank tests,
1144: in $1319$ $S_5$ symmetry classes.
1145: We confirmed this result of \cite{Studeny2000} with {\tt POLYMAKE} \cite{Gawrilow2000}.
1146: \end{remark}
1147: 
1148: \medskip
1149: 
1150: We now define a class of submodular rank tests,
1151: which we call {\em Minkowski sum of
1152: simplices (MSS) tests}. 
1153: Note that each subset $K$ of $[n]$
1154: defines a submodular function $w_K$
1155: by setting $w_K (I) = 1$ if $K \cap I $ is non-empty
1156: and  $w_K(I) = 0$ if $K \cap I $ is empty.
1157: The corresponding polytope
1158: $Q_{w_K}$ is the simplex
1159: $\Delta_K = {\rm conv} \{ e_k :  k \in K \}$.
1160: 
1161: 
1162: Now consider an arbitrary subset  $\,\mathcal{K} = \{K_1,K_2,\ldots,K_r \}\,$
1163: of $2^{[n]}$. It defines the submodular function
1164: $\,w_{\mathcal{K}} =  w_{K_1} + w_{K_2} + \cdots + w_{K_r}$.
1165:  The corresponding polytope is the Minkowski sum
1166: $$ \Delta_\mathcal{K} \quad = \quad \Delta_{K_1} + \Delta_{K_2} + \cdots + \Delta_{K_r}. $$
1167:  The associated MSS test $\tau_\mathcal{K}$ is defined as follows.
1168:  Given $\rho \in S_n$, we compute the number of indices
1169:  $j \in [r]$ such that $\,{\rm max}\{ \rho_k \,: \, k \in K_j \}\, = \,
1170: \rho_i $,
1171:  for each  $i \in [n]$.
1172:  The signature $\tau_\mathcal{K}(\rho)$ is
1173: the vector in $\N^n$ whose $i$th coordinate is that number. 
1174: Few submodular rank tests are MSS tests:
1175: 
1176: 
1177: \begin{remark} \label{rmk3}
1178: For $n = 3$, there are $22$ submodular rank tests,
1179: but only $15$ of them are MSS tests.
1180: For $n=4$, there are $22108$ submodular rank tests,
1181: but only  $1218$ of them are MSS tests.
1182: \end{remark}
1183: 
1184: In light of Theorem \ref{fantheorem}, it is natural to ask
1185: which semigraphoids correspond to an MSS test.
1186:  Geometrically, we wish to know which edges of
1187:  the permutohedron ${\bf P}_n$ are contracted
1188:  when passing to the  polytope $Q_{w_{\mathcal{K}}}$.
1189:  To be precise,  let  $\mathcal{M}_\mathcal{K}$ denote
1190:  the semigraphoid derived from $\mathcal{F}_{w_{\mathcal{K}}}$ using the bijection in
1191: Theorem \ref{fantheorem}. We then have the following result:
1192: 
1193: \begin{proposition} \label{CIsetfam}
1194: The semigraphoid $\mathcal{M}_\mathcal{K}$
1195: is the set of CI statements of the form
1196: $\, i \perp \!\!\! \perp j \, |\, K \,$ where all
1197: sets containing $\{i,j\}$
1198: and contained in $\{i,j\} \cup [n] \backslash K \,$
1199: are not in $\mathcal{K}$.
1200: \end{proposition}
1201: 
1202: \begin{proof}
1203: Consider two permutations  $\delta$ and $\delta'$
1204: which are adjacent on the permutohedron ${\bf P}_n$,
1205: and let $\,i \perp \!\!\! \perp j \, |\, K \,$ be the label of the edge
1206: that connects $\delta$ and $\delta'$.
1207: That CI statement is in $\mathcal{M}_\mathcal{K}$
1208: if and only if $\delta$ and $\delta'$ are mapped
1209: to the same vertex in $\Delta_{\mathcal{K}}$ if and only if
1210: $\delta$ and $\delta'$ are mapped
1211: to the same vertex in each simplex $\Delta_{K_l}$ 
1212: for $l=1,2,\ldots,r$. For each $l$, this means that
1213: the leftmost entry of the descent vector $\delta$ that lies in $K_l$
1214: agrees with the leftmost entry of the other descent vector $\delta'$ that lies in $K_l$.
1215: This condition is equivalent to 
1216: $$ K_l \,\, \cap \,\, (\,K \,\cup \,\{i,j\} \,) \quad \not= \quad \{i,j\} \qquad \qquad
1217: \hbox{for}\, \,\,\, l =1,2,\ldots,r .$$
1218: Thus  $\,i \perp \!\!\! \perp j \, |\, K \,$ is in the semigraphoid
1219: $\,\mathcal{M}_{\mathcal{K}}\,$ associated with the set family $\mathcal{K}$
1220:  if and only if $\mathcal{K}$
1221: contains no set whose intersection with
1222: $\,K\,\cup \,\{i,j\} \,$ equals $\,\{i,j\}$.
1223: This is precisely our claim.
1224: \end{proof}
1225: 
1226: There is a natural involution $*$ on the set of all CI statements
1227: which is defined as follows:
1228: \begin{equation} \label{starinvolution}
1229:  ( i \perp \!\!\! \perp j \,|\,  C)^* \quad := \quad
1230:  i \perp \!\!\! \perp j \,|\,  [n]\backslash (C \cup \{i,j\}) .
1231: \end{equation}
1232: If $\mathcal{M}$ is any semigraphoid,
1233: then the semigraphoid $\mathcal{M}^*$ is obtained by applying the involution $*$
1234: to all the CI statements in the model $\mathcal{M}$.  This involution is referred to as {\em duality}
1235:  in \cite{Matus1992Ascending}. In the {\em boolean lattice},
1236: whose elements are the subsets of $[n]$, the involution corresponds to
1237: switching the role of set intersection and set union.
1238: 
1239: The MSS test  $\tau_{\mathcal{K}}$ was defined above in terms of
1240:  weight functions $w$. What follows is a similar construction for the
1241:  duals of MSS tests.
1242: Let $z_{\mathcal{K}}(J)=1$ for $J \in
1243: \mathcal{K}$ and $z_{\mathcal{K}}(J) =0$ otherwise.  Then the function
1244: $\,w^*: 2^{[n]} \rightarrow \R \, $ defined by
1245:  $\,w_{\mathcal{K}}^* (I) := \sum_{J \subset I} z_{\mathcal{K}}(J)\,$ is supermodular. We set
1246: \begin{eqnarray*}  Q_w^* & :=  \,
1247: \bigl\{ \, x \in \R^n \,: \,
1248: x_1 + x_2 + \cdots + x_n = w([n]) \\
1249: & \text{\ \,and } \sum\nolimits_{i \in I} x_i \geq w(I)\,\,
1250: \hbox{for all} \,\, \emptyset\neq I \subseteq [n]   \,\bigr\}.
1251: \end{eqnarray*}
1252: Then the equality $\,Q_{w_{\mathcal{K}}}^* \,=\, \Delta_K\,$ holds
1253: for $\,\Delta_{\mathcal{K}} = \Delta_{\mathcal{K}_1} + \Delta_{K_2} + \cdots + \Delta_{K_r}$.
1254: This equality is precisely the statement in Proposition 6.3 of
1255: Postnikov's paper \cite{Postnikov2005}. %This polytope can be thought of as a different labelling of the same generalized permutohedron by CI statements.
1256: 
1257: \section{Graphical tests} \label{sec:graphical}
1258: 
1259: We have seen that semigraphoids are equivalent to convex rank tests.
1260: We now explore the connection to graphical models.
1261:  Let $G$ be a graph with vertex set $[n]$ and
1262: $\mathcal{K}(G)$ the collection of all subsets $K \subseteq
1263: [n]$ such that the induced subgraph of $G|_K$ is connected.
1264: The {\em undirected graphical model}
1265: (or {\em Markov random field}) derived from the graph $G$
1266: is the set $\mathcal{M}^G$  of CI statements:
1267: \begin{equation}
1268: \label{noPath}
1269:   \mathcal{M}^G \,\,\, = \,\,\,
1270: \bigl\{\, i \perp \!\!\! \perp j \,|\,  C \,\, :\,\,
1271: \mbox{the restriction of $\,G\,$ to}  \,\,\,  [n] \backslash C \,\,
1272: \mbox{ contains no path from $i$ to $j$} \bigr\}.
1273: \end{equation}
1274: 
1275: \begin{theorem} \label{Jasonslemma}
1276: The set $\mathcal{M}^G$  of CI statements in the graphical model $G$ is equal to the
1277: semigraphoid $\,\mathcal{M}_{\mathcal{K}(G)}\,$
1278: associated with the family $\mathcal{K}(G)$
1279: of connected induced subgraphs of $G$.
1280: \end{theorem}
1281: 
1282: \begin{proof}
1283:  The defining condition in (\ref{noPath}) is equivalent
1284:  to saying that the restriction of $G$ to any node
1285:  set containing $\{i,j\}$ and contained in $\,\{i,j\} \cup ([n] \backslash C)\,$
1286:  is disconnected. With this observation, Theorem 
1287:  \ref{Jasonslemma} follows directly from
1288:  Proposition~\ref{CIsetfam}.
1289: \end{proof}
1290: 
1291: The polytope $\Delta_G = \Delta_{\mathcal{K}(G)}$
1292: associated with the graph $G$ 
1293: is the {\em graph associahedron}. This is
1294: a well-studied object in combinatorics
1295: \cite{Postnikov2005,Carr2004}.
1296: Carr and Devadoss \cite{Carr2004} showed that
1297: $\Delta_G$ is a simple polytope whose
1298: faces are in bijection with the tubings
1299: of the graph $G$. Tubings are defined as follows.
1300: Two subsets $A,B$ $\subset [n]$ are
1301: \emph{compatible} for $G$
1302: if one of the following conditions holds: $A\subset B$, $B\subset A$, or $A\cap B = \emptyset$, and there is no edge between any node in
1303: $A$ and $B$. A {\em tubing} of the graph $G$
1304: is a subset ${\bf T}$ of $2^{[n]}$ such that
1305: any two elements of ${\bf T}$ are compatible.
1306: The set of all tubings on $G$ is a simplicial complex;
1307: it is dual to the face lattice of the simple polytope $\Delta_G$.
1308: 
1309: For any graph $G$ on $[n]$ we now have two convex rank tests.
1310: First, there is the {\em graphical model rank test} $\,\tau_{\mathcal{K}(G)}$, 
1311: which is the MSS test of the set family $\mathcal{K}(G)$. Second,
1312: we have the {\em graphical tubing rank test} $\,\tau^*_{\mathcal{K}(G)}$, which
1313: is the convex rank test associated with the semigraphoid $\,(\mathcal{M}^G)^*\,$
1314: dual to $\,\mathcal{M}^G$. Explicitly, that dual semigraphoid is given by
1315: \begin{equation}
1316: \label{noPath2}
1317: \!  (\mathcal{M}^G)^* \,\, = \,\,
1318: \bigl\{\, i \perp \!\!\! \perp j \,|\,  C \,\, :\,
1319: \mbox{the restriction of $\,G\,$ to}  \,\,\,   C  \cup \{i,j\} \,
1320: \mbox{ contains no path from $i$ to $j$} \bigr\}.
1321: \end{equation}
1322: 
1323: \begin{figure}[htb]\label{GM}
1324: \[
1325:  \begin{xy}<25mm,0cm>:
1326: %Permutohedron with n=4
1327: %Points and labels
1328: (1,0)  ="3214"  *+!U{3214} *{\bullet};
1329: (1.8,0) ="2314"  *+!U{2314} *{\bullet};
1330: (.7,.18)  ="3241"  *+!R{3241} *{\bullet};
1331: (1.5,.18)  ="2341"  *+!L{2341} *{\circ}; %in back
1332: (.86,.5)  ="3124"  *+!R{3124} *{\bullet};
1333: (2.45,.5)  ="2134"  *+!DR{2134} *{\bullet};
1334: (.2,.8)  ="3421"  *+!R{3421} *{\bullet};
1335: (1.8 ,.8)  ="2431"  *+!U{2431} *{\circ}; %in back
1336: (1.5,1)  ="1324"  *+!R{1324} *{\bullet};
1337: (2.29,1)  ="1234"  *+!DR{1234} *{\bullet};
1338: (.35,1.14)  ="3142"  *+!L{3142} *{\bullet};
1339: (2.75,1.14)  ="2143"  *+!U{2143} *{\bullet};
1340: (.02,1.29)  ="3412"  *+!DR{3412} *{\bullet};
1341: (2.44,1.29)  ="2413"  *+!DR{2413} *{\circ}; %in back
1342: (.5,1.45)  ="4321"  *+!DR{4321} *{\circ}; %in back
1343: (1.34,1.45)  ="4231"  *+!L{4231} *{\circ}; %in back
1344: (1,1.6)  ="1342"  *+!DR{1342} *{\bullet};
1345: (2.6,1.6)  ="1243"  *+!L{1243} *{\bullet};
1346: (.35,1.92)  ="4312"  *+!DR{4312} *{\bullet};
1347: (1.97,1.92)  ="4213"  *+!DR{4213} *{\circ}; %in back
1348: (1.3,2.26)  ="1432"  *+!UR{1432} *{\bullet};
1349: (2.11,2.26)  ="1423"  *+!L{1423} *{\bullet};
1350: (.99,2.41)  ="4132"  *+!DR{4132} *{\bullet};
1351: (1.81,2.41)  ="4123"  *+!DL{4123} *{\bullet};
1352: %EDGES %Squares
1353: %Bottom square
1354: "3214";"2314" **@{-}; % 2 indep 3
1355: "3241";"2341" **@{.}; % 2 indep 3
1356: "3241";"3214" **@{=}; % 1 indep 4 | 23
1357: "2341";"2314" **@{:}; % 1 indep 4 | 23
1358: %Right square
1359: "2134";"1234" **@{-}; % 1 indep 2 |
1360: "2143";"1243" **@{-}; % 1 indep 2 |
1361: "1234";"1243" **@{-}; % 3 indep 4 | 12
1362: "2134";"2143" **@{-}; % 3 indep 4 | 12
1363: %Top square
1364: "4132";"4123" **@{-}; % 2 indep 3 | 14
1365: "1432";"1423" **@{-}; % 2 indep 3 | 14
1366: "1432";"4132" **@{*}; % 1 indep 4 |
1367: "4123";"1423" **@{*}; % 1 indep 4 |
1368: %Left square
1369: "4312";"3412" **@{-}; % 3 indep 4 |
1370: "4321";"3421" **@{.}; % 3 indep 4 |
1371: "4312";"4321" **@{.}; % 1 indep 2 | 34
1372: "3412";"3421" **@{-}; % 1 indep 2 | 34
1373: %Back square
1374: "4213";"2413" **@{o}; % 2 indep 4 |
1375: "4231";"2431" **@{o}; % 2 indep 4 |
1376: "4213";"4231" **@{:}; % 1 indep 3 | 24
1377: "2413";"2431" **@{:}; % 1 indep 3 | 24
1378: %Front square
1379: "1342";"1324" **@{=}; % 2 indep 4 | 13
1380: "3142";"3124" **@{=}; % 2 indep 4 | 13
1381: "1342";"3142" **@{*}; % 1 indep 3 |
1382: "1324";"3124" **@{*}; % 1 indep 3 |
1383: %Rest of edges
1384: "2314";"2134" **@{=}; % 1 indep 3 | 2
1385: "3124";"3214" **@{-}; % 1 indep 2 | 3
1386: "3421";"3241" **@{=}; % 2 indep 4 | 3
1387: "3412";"3142" **@{=}; % 1 indep 4 | 3
1388: "3412";"3142" **@{*}; % 1 indep 4 | 3
1389: "1324";"1234" **@{-}; % 2 indep 3 | 1
1390: "1432";"1342" **@{-}; % 3 indep 4 | 1
1391: "4312";"4132" **@{*}; % 1 indep 3 | 4
1392: "1423";"1243" **@{*}; % 2 indep 4 | 1
1393: "2341";"2431" **@{.}; % 3 indep 4 | 2
1394: "4321";"4231" **@{.}; % 2 indep 3 | 4
1395: "2413";"2143" **@{:}; % 1 indep 4 | 2
1396: "2413";"2143" **@{o}; % 1 indep 4 | 2
1397: "4123";"4213" **@{.}; % 1 indep 2 | 4
1398: %"";"" **@{.}; %  indep  |
1399: \end{xy}
1400: \]
1401: \caption{The permutohedron ${\bf P}_4$. Double edges indicate the MSS test $\tau_{\mathcal{K}(G)}$ where
1402: $G$ is the $4$-chain. Edges with large dots
1403: indicate the dual tubing test $\,\tau^*_{\mathcal{K}(G)}$.}
1404: \end{figure}
1405: 
1406: 
1407: We summarize our discussion in the following theorem:
1408: 
1409: \begin{theorem} \label{maingraphical}
1410: The following four
1411: combinatorial objects are isomorphic for any graph $G$ on $[n]$: \hfill \break
1412: \noindent $\bullet$ the graphical model rank test $\tau_{\mathcal{K}(G)}$, \hfill \break
1413: \noindent $\bullet$ the graphical tubing rank test
1414: $\tau^*_{\mathcal{K}(G)}$, \hfill \break
1415: \noindent $\bullet$ the fan of the graph associahedron~$\Delta_G$, \hfill \break
1416: \noindent $\bullet$ the simplicial complex of all tubings on $G$.
1417: \end{theorem}
1418: 
1419: We note that when the graph $G$ is a path of length $n$, $\Delta_G$ is the
1420: {\em associahedron}, and
1421: when it is an $n$-cycle, $\Delta_G$ is the {\em cyclohedron}. The number of classes in 
1422: either the MSS test $\tau_{\mathcal{K}(G)}$ or the
1423: tubing test $\tau^*_{\mathcal{K}(G)}$ is the
1424: {\em $G$-Catalan number} of \cite{Postnikov2005}.  This number is
1425: the classical Catalan number
1426:  $\frac{1}{n+1} {2n \choose n}$ for the associahedron test.
1427: It equals ${2n-2 \choose n-1}$ for the cyclohedron test \cite{cyclohedron}.
1428: 
1429: 
1430: \begin{example}
1431: Let $n=4$ and let $G $ be
1432: the $4$-chain $\, 1$---$2$---$3$---$4$. Then
1433: $$
1434: \begin{matrix}
1435:   \mathcal{M}^G   \!\! & = & \bigl\{
1436:   1 \perp \!\!\! \perp 3 \,|\,  24, & 
1437:     1 \perp \!\!\! \perp 4 \,|\,  23, & 
1438:     2 \perp \!\!\! \perp 4 \,|\,  13, & 
1439:   1 \perp \!\!\! \perp 3 \,|\,  2, & 
1440: 1 \perp \!\!\! \perp 4 \,|\,  2, & 
1441: 1 \perp \!\!\! \perp 4\,|\,  3, & 
1442: 2 \perp \!\!\! \perp 4 \,|\,  3 \bigr\},\\ 
1443: (\mathcal{M}^G)^* \!\! &  = & \bigl\{
1444: 1 \perp \!\!\! \perp 3 \, ,& 
1445:     1 \perp \!\!\! \perp 4 \, , & 
1446:     2 \perp \!\!\! \perp 4 \,,  & 
1447:   1 \perp \!\!\! \perp 3 \,|\,  4, & 
1448: 1 \perp \!\!\! \perp 4 \,|\,  3, & 
1449: 1 \perp \!\!\! \perp 4\,|\,  2, & 
1450: 2 \perp \!\!\! \perp 4 \,|\,  1 \bigr\}.
1451: \end{matrix}
1452: $$
1453: The corresponding tests $\tau_{\mathcal{K}(G)}$ and
1454: $\tau_{\mathcal{K}(G)}^*$ are depicted in Figure \ref{GM}.
1455: Note that contracting either class of marked edges on the
1456: permutohedron in Figure \ref{GM} leads
1457: to the $3$-dimensional associahedron $\Delta_G$.
1458: The associahedron $\Delta_G$ is the Minkowski sum of 
1459: the simplices $\Delta_K$ where $K$ runs over 
1460: $$\mathcal{K}(G) \quad = \quad \bigl\{ \{1\}, 
1461: \{2\}, \{3\}, \{4\}, \{1,2\}, \{2,3\}, \{3,4\}, \{1,2,3\}, \{2,3,4\}, \{1,2,3,4\} \bigr\} . $$
1462: The $3$-dimensional simple polytope $\Delta_4$ has $14$ vertices,
1463: one for each of the $14$ tubings of $G$. \qed
1464: \end{example}
1465: 
1466: In our application of graphical rank tests,
1467: we found it more natural to work with the tubing test
1468: $\tau^*_{\mathcal{K}(G)} $ instead of the MSS test
1469: $\tau_{\mathcal{K}(G)}$. We refer to our
1470:  companion paper \cite{cyclohedron} which gives
1471: a detailed discussion of the cyclohedron test and
1472: its applications.
1473: By the cyclohedron test we mean the tubing test  $\,\tau^*_{\mathcal{K}(G)}\, $  where
1474: the graph $G$ is a cycle of length $n$.
1475: 
1476: 
1477: \begin{figure}[htb]
1478: \includegraphics[scale=0.5]{tubing}
1479: \caption{Tubing of the $6$-chain.  Encircled regions indicate the sets $U_j.$}
1480: \end{figure}
1481: 
1482: 
1483: Applying the tubing test to a data vector $u \in \R^n$
1484:  can be viewed as an iterative procedure for drawing a topographic map on the graph $G$.
1485: Namely, we encircle the vertices of $G$ by sets $U_1, \dots, U_n$  
1486: in the order $\delta_1, \delta_2, \dots, \delta_{n-1}$, with the following provision: if $\delta_i$ is next to be encircled and shares an edge with some vertex $j$ which has already been encircled by some $U_j$, then $U_i$ must also contain the circle $U_j$.
1487: The result is  a collection $U$ of $n-1$ encircled sets $U_1,U_2,\ldots,U_{n-1}$,
1488: and this unordered collection of sets 
1489: is the signature of $v$. The height $h_i$ of the $i$-th node in the
1490: topographic map for $v$ is the number of sets $U_j$ which contain $i$. 
1491: We can identify the signature $U$ with the
1492: {\em height vector} $h = (h_1,h_2,\ldots,h_n)$, since
1493: $U$ can be recovered uniquely from the vector $h$.
1494: The map $u \mapsto h(u)$ can be interpreted
1495: as a {\em smoothing of the data}.  Figure 6 displays the topographic map when the data vector is 
1496: $\,u=(2.1,0.3 ,1.8,,2.0,1.1,0.1)$.
1497: Here $G$ is the 
1498: $6$-chain $\, 1$---$2$---$3$---$4$---$5$---$6$.
1499: and the descent vector of $u$  equals $\delta=(1|5|3|2|4|6)$.
1500: 
1501: 
1502: 
1503: \section{On counting linear extensions}
1504: 
1505: In this paper, we have  introduced a hierarchy of rank tests, which range from
1506: pre-convex to graphical. Convex rank tests are applied to data
1507: vectors $u \in \R^n$, or permutations $\pi \in S_n$, and determine
1508: their cones in a fan $\mathcal{F}$ which coarsens the $S_n$-fan.
1509: The significance of a data vector in such a test is measured
1510: by a certain p-value, whose precise derivation is described in 
1511: \cite{cyclohedron}. Computation of that p-value
1512: rests on our ability to compute the quantity $\,|\, \tau^{-1} \bigl(
1513: \tau(\pi) \bigr)\,|$, which is the number of permutations in the maximal cone 
1514: of $\mathcal{F}$ corresponding to $\pi$. 
1515: Recall that the cones  of a
1516: convex rank test are indexed by posets $P_1,P_2,\ldots,
1517: P_k$ on $[n]$, and our computations amount to
1518: finding the cardinality of the set $\mathcal{L}(P_i)$
1519: of linear extensions of $P_i$.
1520: 
1521: The problem of computing linear extensions of general posets is
1522: \#P-complete \cite{Brightwell1991}, so our task is an
1523: intractable problem when $n$ grows large. However, 
1524: for special classes of posets, and for moderate values of $n$,
1525: the situation is not so bad. For example, in the  up-down 
1526: analysis of Willbrand {\it et al.} (see Example \ref{ex.updwn}),
1527: we need to count all permutations with a fixed descent set,
1528: a task for which an explicit determinantal formula appears in Stanley 
1529: \cite[page 69]{Stanley1997}. We refer to \cite{Brown2007}
1530: for a detailed study of the combinatorics of these {\em up-down numbers}.
1531: 
1532: Likewise, there is an efficient (and easy-to-implement) method for the
1533: computing quantities $\,|\, \tau^{-1} \bigl(\tau(\pi) \bigr)\,|\,$ for any graphical 
1534:  graphical tubing test $\,\tau^*_{\mathcal{K}(G)}$, as defined in Section 5.
1535:  Indeed, here the fan $\mathcal{F}$ is unimodular, and
1536:  hence the posets $P_i$ are all trees. The special trees
1537:  arising from a graph $G$ in this manner are known as {\em $G$-trees}
1538:  \cite{Postnikov2005,Carr2004}. The $G$-tree of a permutation $\pi$
1539:  is a representation of the poset $P_i$
1540:  as a tree $\,T \,=\,\tau^*_{\mathcal{K}(G)}(\pi)\,$
1541:  with the minimum value as the root and maximal values as the leaves. 
1542:  Suppose the root of the tree $T$ has $k$
1543: children, each of which is a root of a subtree $T^i$ for
1544: $i=1,\ldots,k$. Writing $|T^i |$ for the number of nodes in
1545: $T^i$, we have
1546: $$ |\, \tau^{-1}(T ) \, |
1547: \quad = \quad \binom{\sum_{i=1}^k |T^i |}{ |T^1|, \ldots, |
1548: T^k|} \left( \prod_{i=1}^k |\tau^{-1}( T^{i})| \right).$$
1549: This recursive formula translates into an efficient iterative
1550: algorithm. Our implementation of this algorithm,
1551: when $G$ is the $n$-cycle, is the workhorse
1552: behind our computations in  \cite{cyclohedron}.
1553: For a graph $G$, let $\nbhd(i)$ be the set of vertices $j$ such that there is an edge $(i,j)$ in $G$.
1554: 
1555: \begin{algorithm} \label{alg:TGMpermCount}(Permutation Counting)
1556: 
1557: \noindent {\em Input:} A data point $u$ as a descent permutation $\delta$ and a graph $G$.\\% as a $\nbhd$ function.\\
1558: \noindent {\em Output:} The number of permutations with the same signature as $\delta$, $|\, \tau^{-1}\tau(\pi(u)) \, |$.
1559: 
1560: \begin{verse}
1561: {\bf Initialize:} \\
1562: An indexed set of largest enclosing sets $LE_1=\dots=LE_n=\emptyset$, and counter $c=1$
1563: \\%~\\
1564: {\bf for} $\delta_i$ in $\delta$:\\
1565: \quad Initialize $\ell$ an empty list of enclosed tree lengths\\
1566: \quad $LE_{\delta_i}=\{\delta_i\}$\\
1567: \quad {\bf for}  $j$ in $\nbhd(\delta_i)$:\\
1568: \quad \quad {\bf if } $LE_j \neq \emptyset$ and $j \notin LE_{\delta_i}$:\\
1569: \quad \quad \quad $LE_{\delta_i} = LE_{\delta_i} \disjointunion LE_j$\\
1570: \quad \quad \quad append $|LE_j|$ to $\ell$\\
1571: \quad  $c = c \cdot {\sum_i(\ell_i) \choose \ell}$\\
1572: \quad {\bf for}  $j$ in $LE_{\delta_i}$:\\
1573: \quad \quad $LE_j = LE_{\delta_i}$\\
1574: 
1575: {\bf Return} the permutation count $c$
1576: \end{verse}
1577: \end{algorithm}
1578: %\smallskip
1579: 
1580: In the remainder of this section we discuss our method
1581: for performing these computations for an arbitrary convex rank test.
1582: The test is specified (implicitly or explicitly)
1583:  by a collection of posets  $P_1,\ldots,P_k$ on $[n]$.
1584: From the given permutation, we identify the unique poset $P_i$
1585: of which that permutation is a linear extension, and we construct
1586: the {\em distributive lattice} $L(P_i)$ whose elements are the order ideals of
1587: $P_i$. Recall that an {\em order ideal} of $P_i$ is  a subset $O$ of $[n]$
1588: such that if $l \in O$ and $(k,l) \in P_i$ then $k \in O$. The set
1589: of all order ideals is a distributive lattice with meet and join operations given
1590: by set intersection $O \cap O'$ and set union $O \cup O'$. 
1591: 
1592: The distributive lattice $L(P_i)$ is a sublattice of the Boolean lattice $\,2^{[n]}$,
1593: whose nodes are the $2^n$ subsets of $[n] = \{1,2,\ldots,n\}$,
1594: and we represent $L(P_i)$ by its nodes and edges (cover relations) in $\,2^{[n]}$.
1595: We write each edge in $2^{[n]}$ as a pair $(K,l)$
1596: where $K \subset [n]$ and $l \in [n] \backslash K$. The edge 
1597: in the Boolean lattice $2^{[n]}$ represented by the pair $(K,l)$
1598: is the cover relation $\,K\, \subset \, K \cup \{l\}$.
1599:  
1600: 
1601: Permutations in $S_n$ are in natural bijection with maximal chains
1602: in the Boolean lattice $2^{[n]}$.  For example, the descent permutation $\delta=(4|2|1|3)$ corresponds to the maximal chain $\,\bigl(\emptyset, \{4\}, \{2, 4\}, \{1,2,4\}, \{1,2,3,4\}\bigr)\,$ in the Boolean lattice $\,2^{[4]}$. If the poset $P_i$ is the linear order $\delta$ then $L(P_i)$ is the subgraph of $2^{[4]}$
1603: consisting of the five nodes in the chain and the four edges
1604: $\,(\emptyset,4) ,\,(\{4\}, 2),\, (\{2,4\},1)\,$ and $\, (\{1,2,4\},3)\,$
1605: which connect them. The maximal chains in $2^{[n]}$ that lie in the
1606: sublattice $L(P_i)$ are precisely the permutations that
1607: are linear extensions of $P_i$. Therefore our task
1608: is to construct $L(P_i)$ and then count its maximal chains.
1609: 
1610: \begin{remark} \label{remlinex}
1611: The linear extensions of the poset $P_i$ are in 
1612: bijection with the maximal chains in the distributive lattice $L(P_i)$.
1613: See \cite[Section 3.5]{Stanley1997} for further information on this bijection.
1614: \end{remark}
1615: 
1616: In general, $L(P_i)$  is the graph whose nodes are those subsets of $[n]$
1617: which are order ideals in $P_i$, and the edges
1618: are $(K,l)$ where both $K$ and $K \cup \{l\} $ are order ideals in $P_i$.
1619: Our strategy in computing the graph which represents $L(P_i)$
1620: is as follows. We start with a given permutation $\delta$ which
1621: lies in the class indexed by $P_i$. That permutation determines a 
1622: maximal chain in $2^{[n]}$ which must lie in $L(P_i)$.
1623: We then compute a certain closure of that subgraph in $2^{[n]}$
1624:  with respect to the semigraphoid $\mathcal{M}$ under consideration.
1625: This is precisely what is done in Algorithm 21 below.
1626: Knowledge of the distributive lattice $L(P_i)$ solves our problem
1627: since  the number of maximal chains of
1628: $L(P_i)$ can be read easily from the representation of $L(P_i)$ in terms of nodes and edges.
1629: 
1630: 
1631: 
1632: \begin{algorithm} \label{DistLattice}(Building the Distributive Lattice)
1633: 
1634: \noindent {\em Input:} A data point as a descent permutation $\delta$ and a semigraphoid $\mathcal{M}$.\\
1635: \noindent {\em Output:} A distributive lattice $L(P_i)$
1636:  representing the class of $\delta$ in the convex rank test $\mathcal{M}$.
1637: 
1638: \begin{verse}
1639: {\bf Initialize:} \\
1640: A set of confirmed lattice nodes, $\,\mathbb{H} = 
1641: \bigl\{ \emptyset, \{\delta_1\}, \{\delta_1, \delta_2\}, \dots, \{\delta_1, \dots, \delta_n\} \bigr\}$\\
1642: A set of checked lattice edges, 
1643: $\,E \,=\, \bigl\{ (\{\delta_1, \dots, \delta_{n-1}\}, \delta_n) \bigr\}$,\\
1644: \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
1645: where each pair has the form \ (history, next position). \\
1646: A stack of edges waiting to be checked: \\
1647:  $\,W \,= \,
1648:  \bigl[(\emptyset,\delta_1), (\{\delta_1\}, \delta_2), (\{\delta_1, \delta_2\},\delta_3), \dots,(\{\delta_1, \dots, \delta_{n-2}\}, \delta_{n-1}) \bigr]
1649: $\\~\\
1650: {\bf While} $W \neq \emptyset$:\\
1651: \quad Pop $(H,i)$ from the stack $W$\\
1652: \quad Add $(H,i)$ to $E$\\
1653: \quad {\bf for}  $j$ such that $(H \union \{i\}, j) \in E$:\\
1654: \quad \quad {\bf if} $i \indep j | H \in \mathcal{M}$:\\
1655: \quad \quad \quad Add $(H,j)$ to $E$\\
1656: \quad \quad \quad {\bf if} $H \union \{j\} \notin \mathbb{H}$:\\
1657: \quad \quad \quad \quad Add $H \union \{j\}$ to $\mathbb{H}$\\
1658: \quad \quad \quad \quad Push $(H \union \{j\}, i)$ onto $W$\\
1659: {\bf Return} the distributive lattice $\,L(P_i)\,= \, \bigl(\mathbb{H},E \bigr) $\\
1660: \end{verse}
1661: \end{algorithm}
1662: 
1663: 
1664: Our program for performing rank tests implements Algorithm \ref{DistLattice}.  It accepts a permutation $\delta$ and a rank test $\tau$, which may be specified either
1665: \begin{itemize}
1666:  \item by a list of posets $P_1,\ldots,P_k$ (pre-convex),
1667:  \item or by a semigraphoid $\mathcal{M}$ (convex rank test),
1668:  \item or by a submodular function $w : 2^{[n]} \rightarrow \R$,
1669:  \item or by a collection $\mathcal{K}$ of subsets of $[n]$ (MSS),
1670:  \item or by a graph $G$ on $[n]$ \  (graphical test).
1671: \end{itemize}
1672: The output of our program has two parts.
1673: First, it gives the number $|\mathcal{L}(P_i)|$ of linear extensions,
1674: where the poset $P_i$ represents the equivalence class of $S_n$ specified by the data $\pi$.
1675: It also gives a representation of the distributive lattice $L(P_i)$, in a format
1676: that can be read by the {\tt maple} package {\tt posets}  \cite{Stembridge2004}.
1677: Our software for Algorithms \ref{alg:TGMpermCount} and \ref{DistLattice}
1678: and, more generally, for
1679: applying convex rank tests $\tau $ to data vectors $u \in \R^n$ is available at
1680: $\, {\tt bio.math.berkeley.edu/ranktests/} $.
1681: 
1682: In closing let us give a concrete illustration of
1683: our current ability to count linear extensions.
1684: We computed the number of linear extensions 
1685: of the Boolean poset $\,P  = 2^{[5]}\,$ consisting 
1686: of all subsets of 
1687: $\{1,2,3,4,5\}$. Our program ran in less than one second
1688: on a laptop and found that 
1689: $$ |L(2^{[5]})| \quad = \quad
1690: 14,807,804,035,657,359,360.$$
1691: This computation was inspired by work 
1692: in population genetics by 
1693: Daniel Weinreich \cite{Weinreich2005} who reports the 
1694: analogous calculation
1695: for $P = 2^{[4]}$. 
1696: 
1697: \smallskip
1698: 
1699: 
1700: 
1701: \section*{Conclusions}
1702: 
1703: This work describes the connections among 
1704: algebraic combinatorics, non-parametric statistics
1705: and graphical models (statistical learning theory).
1706: Specifically, we have proved the equivalence between semigraphoids and convex rank tests.  This result provides the background for the counterexamples given in \cite{counterexamples} and the rank tests which were applied to biological data in \cite{cyclohedron}.
1707: 
1708: %\bigskip
1709: \smallskip
1710: 
1711: 
1712: %Bibliography is now in order of appearance as in IJAR guidelines
1713: \begin{thebibliography}{99}
1714: \bibitem{BGS}
1715: L.~Billera and I.~Gelfand and B.~Sturmfels,
1716: {\em Duality and minors of secondary polyhedra,}
1717: Journal of Combinatorial Theory Ser. B,  57 (1993) pp. 258-268.
1718: 
1719: \bibitem{Brightwell1991}
1720: G.~Brightwell and P.~Winkler,
1721: {\em Counting linear extensions,} 
1722: Order, 
1723: 8 (1991) pp. 225-242.
1724: 
1725: \bibitem{Brown2007}
1726: F.~Brown, T.~Fink and K.~Willbrand,
1727: {\em On arithmetic and asymptotic properties of up-down numbers,}
1728: Discrete Mathematics, 
1729: 307 (2007) pp. 1722-1736.
1730: 
1731: 
1732: \bibitem{Brown1989}
1733: K.~Brown,
1734: \newblock {\em Buildings}.
1735: \newblock Springer, New York, 1989.
1736: 
1737: \bibitem{Carr2004}
1738: M.~Carr and S.~Devadoss,
1739: {\em Coxeter complexes and graph associahedra,}
1740: Topology and its Applications, 
1741: 153 (2006), pp. 2155-2168.
1742: 
1743: 
1744: \bibitem{Cook}
1745: W.~Cook and L.~Seiford, 
1746: {\em The geometry of rank-order tests,}
1747: The American Statistician, 
1748: 37 (1983) pp. 307-311.
1749: 
1750: \bibitem{Dawid}
1751: A.~Dawid,
1752: {\em Conditional independence in statistical theory,}
1753: Journal of the Royal Statistical Society B, 
1754: 41 (1979) pp. 1-31.
1755: 
1756: \bibitem{Gawrilow2000}
1757: E.~Gawrilow and M.~Joswig,
1758: {\em Polymake: a framework for analyzing convex polytopes,} in
1759: Polytopes -- Combinatorics and Computation, eds. G.~Kalai and G.~M.~Ziegler, Birkh\"auser, 2000, pp. 43-74.
1760: 
1761: 
1762: \bibitem{counterexamples}
1763: R.~Hemmecke, J.~Morton, A.~Shiu, B.~Sturmfels and O.~Wienand,
1764: {\em Three counterexamples on semigraphoids},
1765: To appear in Combinatorics, Probability, and Computing (2008).  
1766: 
1767: \bibitem{Lovasz1983Submodular}
1768: L.~Lov\'asz,
1769: {\em Submodular functions and convexity,} in 
1770: Mathematical Programming: The State of the Art, eds. A.~Bachem, M.~Groetschel, and B.~Korte, Springer, 1983, pp. 235-257.
1771: 
1772: 
1773: \bibitem{Matus1992Ascending}
1774: F.~Mat\'{u}\v{s},
1775: {\em Ascending and descending conditional independence relations,}
1776:  in Proceedings of the Eleventh Prague Conference on Inform. Theory, Stat. Dec. Functions and Random Proc., Academia, B, 1992, pp. 189-200.
1777: 
1778: \bibitem{Matus1992Equivalence}
1779: F.~Mat\'{u}\v{s},
1780: {\em On equivalence of Markov properties over undirected graphs,}
1781: Journal of Applied Probability, 29 (1992) pp. 745-749.
1782: 
1783: \bibitem{Matus2004}
1784: F.~Mat\'{u}\v{s},
1785: {\em Towards classification of semigraphoids,} 
1786: Discrete Mathematics, 277 (2004), pp. 115-145.
1787: 
1788: \bibitem{cyclohedron}
1789: J.~Morton, A.~Shiu, L.~Pachter and B.~Sturmfels,
1790: {\em The cyclohedron test for finding periodic genes in time course expression studies,} 
1791: Statistical Applications in Genetics and Molecular Biology 6 (2007) pp. 1-21.
1792: 
1793: \bibitem{Pearl}
1794: J.~Pearl,
1795: {\em Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference,} Morgan Kaufman, San Mateo CA, 1988.
1796: 
1797: 
1798: \bibitem{Pitman1937SignificanceI}
1799: E.~J.~G.~Pitman,
1800: {\em Significance tests which may be applied to samples from any populations,}
1801: Supplement to the Journal of the Royal Statistical Society, 
1802: 4 (1937) pp. 119-130.
1803: 
1804: 
1805: \bibitem{Postnikov2005}
1806: A.~Postnikov,
1807: {\em Permutohedra, associahedra, and beyond,}
1808: Preprint (2005), available at {\tt http://arxiv.org/abs/math/0507163}.
1809: 
1810: \bibitem{PRW}
1811: A.~Postnikov, V.~Reiner, and L.~Williams,
1812: {\em  Faces of simple generalized permutohedra,}
1813: Preprint (2006),
1814: available at {\tt http://arxiv.org/abs/math.CO/0609184}.
1815: 
1816: \bibitem{Stanley1997}
1817: R.~P.~Stanley,
1818: {\em Enumerative Combinatorics}, Volume I.  Cambridge University, 1997.
1819: 
1820: \bibitem{Stembridge2004}
1821: J.~Stembridge,
1822: {\em Maple packages for symmetric functions, posets, root systems, and finite Coxeter groups.} 
1823: Available at {\tt www.math.lsa.umich.edu/$\sim$jrs/maple.html}.
1824: 
1825: 
1826: \bibitem{Studeny1990}
1827: M.~Studen\'{y},
1828: {\em Conditional independence relations have no finite completeness characterization,}
1829: Kybernetika, 25 (1990) pp. 72-79.
1830: 
1831: \bibitem{Studeny2000}
1832: M.~Studen\'{y}, RR.~Bouckaert, and T.~Kocka,
1833: {\em Extreme supermodular set functions over five variables},
1834: Institute of Information Theory and Automation, Research report n. 1977, Prague, 2000.
1835: 
1836: \bibitem{Studeny2005Probabilistic}
1837: M.~Studen\'{y},
1838: {\em Probabilistic Conditional Independence Structures}, 
1839: Springer Series in Information Science and Statistics, Springer-Verlag, London, 2005.
1840: 
1841: 
1842: \bibitem{Tits1968Problem}
1843: J.~Tits,
1844: {\em  Le probl\`eme des mots dans les groupes de Coxeter}, 
1845: Symposia Math., 1, (1968) pp. 175-185.
1846: 
1847: \bibitem{Weinreich2005}
1848: D.~Weinreich,
1849: {\em The rank ordering of genotypic fitness values predicts genetic constraint on natural selection on landscapes lacking sign epistasis,}
1850: Genetics 171 (2005) pp. 1397-1405.
1851: 
1852: \bibitem{Willbrand2005}
1853: K.~Willbrand, F.~Radvanyi, J.~P.~Nadal, J~ P.~Thiery, and T.~Fink,
1854: {\em  Identifying genes from up-down properties of microarray expression series,} 
1855: Bioinformatics, 21 (2005) pp. 3859-3864.
1856: 
1857: \bibitem{Ziegler1995}
1858: G.~Ziegler,
1859: {\em Lectures on Polytopes,} 
1860: Vol. 152 of Graduate Texts in Mathematics, 
1861: Springer-Verlag, New York, 1995.
1862: 
1863: 
1864: \end{thebibliography}
1865: \end{document}
1866: 
1867: 
1868: 
1869: \bibitem{Stanley2002}
1870: RP.~Stanley and J.~Pitman.
1871: \newblock A Polytope Related to Empirical Distributions, Plane Trees,
1872: Parking Functions, and the Associahedron. 
1873: \newblock {\em Discrete and Computational Geometry}, 27 (4) (2002) 603-602.
1874: 
1875: 
1876: 
1877: In this section we focus on a subclass of the convex rank tests.
1878: Let $2^{[n]}$ denote the collection of all
1879: subsets of $[n] = \{1,2,\ldots,n\}$. Any real-valued function $\, w : 2^{[n]} \rightarrow \R \, $
1880: defines a convex polytope $Q_w$ of dimension $\leq n-1$
1881: as follows:
1882: \begin{eqnarray*}  Q_w \,\,\, :=  &
1883: \bigl\{ \, x \in \R^n \,: \,
1884: x_1 + x_2 + \cdots + x_n = w([n]) \\
1885: & \text{\  \,and } \sum\nolimits_{i \in I} x_i \leq w(I)\,\,
1886: \hbox{for all} \,\, \emptyset\neq I \subseteq [n]   \,\bigr\}.
1887: \end{eqnarray*}
1888: A function $\, w : 2^{[n]} \rightarrow \R \, $ is called
1889:  {\em submodular} if
1890: $\,w(I) + w(J)\, \geq\, w(I \cap J) +  w(I \cup J)\,$
1891: for $I,J \subseteq [n]$.  The {\em submodular cone}
1892: is the cone ${\bf C}_n$ of all submodular functions $w :
1893: 2^{[n]} \rightarrow \R$.
1894:   Working modulo its lineality space
1895:    $\,{\bf C}_n \cap (-{\bf C}_n) $, we regard
1896:    ${\bf C}_n$ as a pointed cone of dimension $2^n-n-1$.
1897: 
1898: 
1899: 
1900: \begin{proposition} \label{prop:submodularnormal}
1901: A function $\,w: 2^{[n]} \rightarrow \R \, $
1902: is submodular if and only if
1903: the normal fan of the polyhedron $Q_w$
1904: is a coarsening of the $S_n$-fan.
1905: \end{proposition}
1906: 
1907: This  follows from
1908: greedy maximization as in \cite{Lovasz1983Submodular}.
1909: Indeed,  Proposition \ref{prop:submodularnormal} can be paraphrased as follows:
1910:  the function $w$ is submodular if and only if
1911: the optimal solution of
1912: $$
1913: \mbox{maximize $u \cdot x$ subject to $x \in Q_w$}
1914: $$
1915: depends only on the permutation equivalence class
1916: of $u$.
1917: Thus, solving this linear programming problem
1918: constitutes a convex rank test.  Any such test is called a
1919: {\em submodular rank test}.
1920: 
1921: 
1922: \bibitem{NikoNick2006}
1923:  N.~Beerenwinkel, N.~Eriksson and B.~Sturmfels.
1924:  \newblock Evolution on distributive lattices, 
1925:  \newblock {\em Journal of Theoretical Biology} (242) (2006) 409-420. 
1926: yy
1927: \bibitem{Ziegler1995}
1928: G.~Ziegler.
1929: \newblock {\em Lectures on Polytopes.}
1930: \newblock Vol. 152 of Graduate Texts in Mathematics.
1931: \newblock Springer-Verlag, New York, 1995.
1932: 
1933: 
1934: 
1935: \begin{lemma} \label{lem.dimensionreduction}
1936: Suppose $\mathcal{M}$ is a semigraphoid on $[n]$.  Then for any $i,j \in [n]$, the set of $CI$ statements obtained by identifying $i$ and $j$ is also a semigraphoid.
1937: \end{lemma}
1938: \begin{proof}
1939: We must show that the left hand side and right hand sides of $(SG)$,
1940: \begin{equation} \label{eq:SGagain}
1941: i \indep j | K \cup \ell \;\; \tand \;\; i \indep \ell | K \iff i \indep j | K \;\; \tand \;\; i \indep \ell | K \union j
1942: \end{equation} 
1943: are still equivalent after the identification.  Up to symmetry, there are four cases to be checked.  If $i=j$, $i \indep j |K \union \ell $ and  $i \indep j |K $ are both false.  If $j = \ell$, the two sides are the same.  If $i=k$ with $k \in K$, all four CI statements are necessarily true.  Finally, if $j=k$, $k \in K$, (\ref{eq:SGagain}) becomes
1944: \[
1945: i \indep k | K \cup \ell \;\; \tand \;\; i \indep \ell | K \iff i \indep k | K \; \tand \; i \indep \ell | K \union k
1946: \]
1947: where the first and third CI statements are always true and the second and fourth are equal.
1948: \end{proof}
1949: 
1950: 
1951: ..
1952: assume that given two cones, the codimension of their intersection is $1$ in both cones.  Otherwise, project by applying equalities $x_i=x_j$ satisfied in the intersection to both cones until this holds; by Lemma \ref{lem.dimensionreduction}, the result will still be a semigraphoid.