The rank function of a positroid and non-crossing partitions

A positroid is a special case of a realizable matroid, that arose from the study of totally nonnegative part of the Grassmannian by Postnikov. Postnikov demonstrated that positroids are in bijection with certain interesting classes of combinatorial objects, such as Grassmann necklaces and decorated permutations. The bases of a positroid can be described directly in terms of the Grassmann necklace and decorated permutation. In this paper, we show that the rank of an arbitrary set in a positroid can be computed directly from the associated decorated permutation using non-crossing partitions.

The structure of the paper is as follows. In section 2, we go over the background materials needed for this paper, including the basics of matroids, positroids, Grassmann necklaces and decorated permutations. In section 3 we show a basis exchange like property for cyclic intervals that works for positroids. In section 4, we show our main result: that the rank of an arbitrary set in a positroid can be obtained directly from the decorated permutation by using non-crossing partitions. In section 5, we provide an example of how to use our main result to compute the rank of a set.

Acknowledgement
The authors would also like to thank Lillian Bu, Wini Taylor-Williams and David Xiang for useful discussions.
2 Background materials

Matroids
In this section we review the basics of matroids that we will need. We refer the reader to [12] for a more in-depth introduction to matroid theory. Remark 1. In this paper, we will always use [n] := {1, . . . , n} as our ground set, reserving the usage of E for subsets of the ground set we analyze. A matroid of rank d will have bases in the set [n] d which stands for all cardinality d-subsets of [n]. Let E be an arbitrary subset of the ground set [n]. For a basis J, if |J ∩ E| is maximal among |B ∩ E| for all bases B of the matroid M, we say that J maximizes E, or J is maximal in E. Similarly, if |J ∩ E| is minimal among |B ∩ E| for all bases B of M, we say that J minimizes E, or J is minimal in E.
The following property of the rank function will be crucial: The rank function is semimodular, meaning that rk(A ∪ B)+rk(A ∩ B) ≤ rk(A)+ rk(B) for any subset A and B of the ground set.
Consider a matrix with entries in R that has n columns and r rows, with r ≤ n. Column sets that forms a r-by-r submatrix with nonzero determinant forms (the set of bases of) a matroid. Such matroids are called realizable matroids. For example, consider the following matrix: Proof. From the condition |J| = rk(J) = rk(E), the span of the vectors indexed by the set J is exactly same as the span of the vectors indexed by the set E. Since B maximizes E, the span of the vectors indexed by the set B ∩ E is the same vector space. Hence starting from a set of basis vectors indexed by the set B, if we replace the set of vectors indexed by B ∩ E with the set of vectors indexed by J, we still get a set of basis vectors.

Positroids
In this section we go over the basics of positroids. Positroids were originally defined in [13] as the column sets coming from nonzero maximal minors in a matrix such that all maximal minors are nonnegative. For example, the matrix we saw in the previous section has nonnegative maximal minors: The nonzero maximal minors come from column sets . This collection forms a positroid. However in this paper, we will use an equivalent definition using Grassmann necklace and Gale orderings.
The cyclically shifted order < i on the set [n] is the total order For any rank d matroid M with ground set [n], let I k be the lexicographically minimal basis of M with respect to < k , and denote I(M) := (I 1 , . . . , I n ), which forms a Grassmann necklace [13].
The Gale order on [n] d (with respect to < i ) is the partial order < i defined as follows: for any two d-subsets S = {s 1 < i · · · < i s d } and T = {t 1 < i · · · < i t d } of [n], we have S ≤ i T if and only if s j ≤ i t j for all j ∈ [d] [5].   Proof. For arbitrary q ∈ [n], denote the elements of B as Definition 3. A decorated permutation of the set [n] is a bijection π of [n] whose fixed points are colored either white or black. A weak i-exceedance of a decorated permutation π is an element j ∈ [n] such that either j < i π −1 (j) or j is a fixed point colored black.
Given a decorated permutation π of [n] we can construct a Grassmann necklace I = (I 1 , . . . , I n ) by letting I k be the set of weak k-exceedances of π. A graphical way to see this is to cut the circle off between k − 1 and k to get a horizontal straight line with leftmost endpoint being k and rightmost endpoint being k − 1. Redraw the arrows of the permutation accordingly so that it stays within the line. Endpoints of the leftward arrows are exactly the weak k-exceedances of π, hence the elements of I k . There is a bijection between Grassmann necklaces and decorated permutations [13].
Remark 2. When we are dealing with positroids, we will always envision the ground set [n] to be drawn on a circle. We will say that a 1 , . . . , a t ∈ [n] are cyclically ordered if there exists some i ∈ [n] such that a 1 < i · · · < i a t .
Given a, b ∈ [n], we define the cyclic interval [a, b] to be the set {x|x ≤ a b}. These cyclic intervals play an important role in the structure of a positroid [6], [9], [1]. All intervals mentioned in this paper will actually be referring to cyclic intervals.
Remark 3. If a positroid M has loops or coloops, it is enough to study the positroid M obtained by deleting the loops and the coloops to study the structural properties of M. So throughout this paper, we will assume that our positroid has neither loops nor coloops. This means that the associated decorated permutation has no fixed points.

Interval exchange and Morphing
In this section we develop a stronger basis exchange technique for positroids. Throughout the paper, unless otherwise stated, we will always be working with a positroid M on a ground set [n], with rank d, having Grassmann necklace I = (I 1 , . . . , I n ), and an associated decorated permutation π that does not have any fixed points (see Remark 3). The example positroid that we will be using, again unless otherwise stated, will be the positroid associated to the decorated permutation of Figure 1.
The following property follows from the definition of Grassmann necklaces and the proof will be omitted.

Lemma 1 (Sharing property). Let a and b be arbitrary elements of [n]. Then we have
To illustrate using our running example, notice that since I 3 = {3, 4, 5, 8, 10, 11, 12}, the set We begin our analysis of the cyclic intervals of a positroid. The following lemma follows directly from Theorem 2. plays a crucial role in studying that interval. The following claim follows directly from Proposition 1 and Lemma 2.
Here is an example of how the interval exchange property works. In the positroid coming from Our goal of the paper is to express the rank of an arbitrary set E ⊆ [n] using non-crossing partitions. To do so, we need to construct the bases that maximize E and analyze them.

Remark 4.
When E is a subset of the ground set [n] and we are trying to write E as a disjoint union of cyclic intervals so that E = [a 1 , b 1 ] ∪ · · · ∪ [a s , b s ], we will arrange the a i 's such that a 1 < a 2 < · · · < a s unless otherwise stated. The symbol s will always be reserved for the number of disjoint intervals that E has. Here the indices of [s] are considered cyclically, so a s+1 = a 1 .
Our goal is to show that it is possible to find a basis that maximizes E starting from some Grassmann necklace element and then applying a series of transformations to it.
Proof. Let B be a basis which maximizes E. Pick any e ∈ B ∩ (b i−1 , a i ) \ I a i . By the basis exchange axiom, there is an e ∈ I a i \ B such that (B \ {e}) ∪ {e } is a basis; furthermore, this maximizes E. Set this as new B, and repeat the process until we run of elements in By the dual basis exchange axiom, there is an e ∈ B \ I a i such that (B \ {e}) ∪ {e } is a basis; furthermore, this maximizes E. Set this as new B, and repeat the process until we run of elements in In particular, B as above will minimize (b i−1 , a i ) and maximize [a i , b i ]. To illustrate the above lemma with our running example, let E = [1, 4] ∪ [6,7]. The set B 0 = {1, 3, 6, 7, 10, 11, 14} happens to be a basis which maximizes E. Recall that I 1 = {1, 3, 4, 5, 10, 11, 12}. By exchanging to get Define J to be the set obtained from J by replacing biggest (with respect to < b ) α elements of (J \ I c ) ∩ (b, c) with the smallest (again with respect to < b ) α elements of (I c \ J) ∩ [c, d]. We will say that J is obtained from J by mimicking I c in (b, d]. We will describe the process as excessive elements of (J \ I c ) ∩ (b, c) being moved to fill the gaps of (I c \ J) ∩ [c, d]. The newly created J mimics J. We say that this mimicking process has gaps or is gap-free depending on whether J has gaps or is gap-free (with respect to I c in (b, d]). Now we will use the above process multiple times starting from a Grassmann necklace element and produce multiple sets, that will potentially be a basis that maximizes E (again using Remark 4). We dedicate J 0 to stand for I a 1 . Recursively, J t is going to be obtained from J t−1 by mimicking I a t+1 in (b t , b s ] for t ∈ {1, . . . , s − 1} (this is possible since J t−1 is compatible with I a t+1 in (b t , b s ]). We call this process the t-th morph of J 0 = I a 1 . So we will say that the set J t is obtained from J 0 by morphing t times. Similarly, we will use J t i to denote the set obtained from I a i by imposing a 1 < i · · · < i a s when labeling the starting points of the intervals of E, then morphing t times.

Lemma 4 (Sharing property for the morphs). We have
Our ultimate goal is to show that one of the J t i 's will maximize E.
Lemma 5. Fix a subset E of the ground set as in Remark 4. Fix some 1 ≤ t ≤ s − 1, then consider the set J t . For each 1 ≤ p ≤ s, there exists some nonnegative number q and a sequence Proof. Recall that the t-th morph removes the excessive elements in (b t , a t+1 ) and fills the gaps of . Such number is guaranteed to exist, since J 0 = I a 1 . Now J t maximizes [a γ(x)+1 , b x ] in M, since the morphs after the γ(x)-th morph does not change the number of elements in that interval. Starting from p, take γ(p), γ(γ(p)), . . . until you get 0. Delete 0 from this collection, and relabel them as i 1 < i 2 < · · · to get the desired result.
From the above lemma, we are guaranteed that each J t maximizes some set in [a 1 , b t ] (setting p as t) which is obtained from E ∩ [a 1 , b t ] by merging some nearby intervals and replacing them with a bigger interval (for example merging [1,3] ∪ [6,9] to get [1,9]). Now if J t was gap free (that is the morph to get J t from J t−1 is gap-free) then [a t+1 , b s ] is also maximized. In other words, J t that is gap free will maximize some set that is obtained from E by merging some nearby intervals.
The remainder of this section will be dedicated to showing that there is some i and t such that J t i is gap free and is a basis of the positroid. The next section will use that result to obtain our main result. Using the above lemma, we will finish off the section with the following result.
From lemma 5, there exists a sequence i 1 < · · · < i q < i We now have all the ingredients to show that ∈ M and having gaps, Lemma 6 tells us that the same inequality replacing from the sharing property.
The above proposition will be used as a key idea during the proof of the main result in the next section. Definition 4. Let Π be a partition T 1 · · · T p of [s] into pairwise disjoint non-empty subsets. We say that Π is a non-crossing partition if there are no cyclically ordered a, b, c, d such that a, c ∈ T i and b, d ∈ T j for some i = j. We will call the T i 's as the blocks of the partition.

Rank of arbitrary sets
To illustrate with a simple example, {1, 3} {2} {4} is a non-crossing partition of [4], but {1, 3} {2, 4} is not. This can be easily verified by drawing the points 1 to 4 on a circle and trying to cut the circle into distinct regions corresponding to the partitions; this can only be done in the case of non-crossing partitions.
Let Π be an arbitrary non-crossing partition of [s] with T 1 , . . . , T p as its parts. We define E| T i as the subset of E obtained by taking only the intervals indexed by elements of T i . For example, E| {1,3} would stand for E 1 ∪E 3 . By submodularity of the rank function, we get another upper bound on the rank of E : rk(E) ≤ rk(E| T 1 ) + · · · + rk E| Tp ≤ nbd(E, Π) := nbd(E| T 1 ) + · · · + nbd E| Tp . So for each non-crossing partition of [s], we get an upper bound on the rank of E. We show that one of those bounds has to be tight in the theorem below. Proof. We use induction on s, the number of disjoint cyclic intervals of E. In case s = 1, we have rk(E) = rk(M) − minelts(E c ) = nbd(E) = nbd(E, {{1}}). Assume for the sake of induction that the claim is true for 1, . . . , s − 1 intervals. We define J t i recursively as in the previous section. From Proposition 2, we either have some J t i ∈ M that is gap-free or we have J s−1 ∈ M that isn't gap-free. In the latter case, since J s−1 minimizes every interval of form (b i , a i+1 ), we have |J s−1 ∩ E| = nbd(E) = nbd(E, {{1, . . . , s}}).
Therefore we only have to take care of the case when we have some J t i ∈ M that is gapfree. Without loss of generality, we will assume i = 1. From Lemma 5, we have some sequence i 1 < · · · < i q < i q+1 = t such that J t i maximizes [a 1 , b i 1 ], . . . , [a iq+1 , b t ], [a t+1 , b s ] (the last interval is maximized due to J t i being gap-free). We will use F 1 , . . . , F q+2 to denote these intervals. For each 1 ≤ j ≤ q + 2, let K j be a basis that maximizes F j ∩ E. Modify K j using Lemma 3 so that it minimizes the complement of F j in [n]. Since |K j ∩ F j | = |J t ∩ F j |, using Proposition 1 we can replace J t ∩ F j with K j ∩ F j in J t for each j to obtain a new basis B. By induction hypothesis, for each j, we have |B ∩ F j ∩ E| = rk(F j ∩ E) = nbd(F j ∩ E, Π j ) for some non-crossing partition Π j . Letting Π be a non-crossing partition obtained by collecting all blocks of Π j 's, we get |B ∩ E| = rk(E) = nbd(E, Π).
For example, take a look at Figure 2

Application
Let M be a positroid and let E be an arbitrary subset of the ground set [n]. In this section, we will show how to use Theorem 3 to obtain the rank of E. We will call an interval of form [x, π(x)] a CW-arrow , and an interval of form [x, π −1 (x)] a CCW-arrow (each standing for clockwise and counterclockwise). Given a cyclic interval T , we use cw(T ) to denote the number of CW-arrows contained in T . Similarly, we will use ccw(T ) for the number of CCW-arrows contained in T . These numbers can easily be read from the associated decorated permutation of M.
Recall that nbd([a 1 , b 1 ] ∪ · · · ∪ [a s , b s ]) = rk(M) − i (minelts(b i , a i+1 )). And minelts(b i , a i+1 ) stands for the minimal possible number of elements a basis can have in the interval (b i , a i+1 ), which equals the number |I a+1 ∩ (b i , a i+1 )|. Hence minelts(b i , a i+1 ) = ccw((b i , a i+1 )). This gives us another way to interpret nbd(E) : it is rk(M) minus the total number of CCW-arrows contained in the complement of E. In the special case when E is a cyclic interval, nbd(E) is given by |E| minus the number of CW-arrows contained in E.
Therefore for any E, we can obtain nbd(E, Π) by counting CW-arrows and CCW-arrows. If E is the disjoint union of s cyclic intervals, we first write all possible non-crossing partitions of [s]. Each one of them gives a sum of nbd(E )'s where E obtained from E by taking some of the s cyclic intervals of E, and we compute them by counting the CCW-arrows (or CW-arrows for intervals) of the decorated permutation.
Consider the positroid associated with Figure 1. Let us try to compute the rank for E = [1, 2] ∪ [7, 10] ∪ [13,13]. We have 3 disjoint intervals, so the upper bounds of rk(E) will be coming from the non-crossing partitions of {1, 2, 3}. The following are the upper bounds for rk(E) we get: • nbd(E, {{1, 2, 3}}) = nbd(E) = rk(M) − ccw((2, 7)) − ccw((10, 13)) − ccw((13, 13)) = 7 − 1 − 1 − 0 = 5. Theorem 3 tells us that rk(E) = 5. Using Theorem 3, in [11] it is shown that the facets of the matroid polytope are given by cyclic intervals whose complement is covered by CCW-arrows. It is also shown that the facets of the independendent set polytope of a positroid are given by sets whose complement is again covered by CCW-arrows. In [3], the condition for an arbitrary subset of the ground set being a flat of the positroid will be given in terms of the decorated permutation, again using Theorem 3.