1 Introduction

A matrix \(A \in {\mathbb {R}}^{n \times n}\) is called totally nonnegative (totally positive) if all its minors are nonnegative (positive) and it is abbreviated as TN (TP). These classes of matrices have been studied by several authors [1, 8,9,10, 13] obtaining properties, the Jordan structure and characterizations by applying the Gaussian or Neville elimination with applications in algebra, geometry, differential equations, economics and other fields. We recall that \(A \in {\mathbb {R}}^{n \times n}\), \(n \ge 2\), is an irreducible matrix if there is not a permutation matrix P such that \( PAP^T=\left[ \begin{array}{rr} X &{} Y \\ O &{} Z \end{array} \right] \), where O is an \((n-q) \times q\) zero matrix (\(1 \le q \le n-1)\)). If \(n=1\), \(A=(a)\) is irreducible when \(a \ne 0\).

In [8,   p. 87] the authors denoted by ITN the irreducible TN matrices. The rank of A, denoted by \(\text{ rank }(A)\), is the size of the largest invertible square submatrix of A. The principal rank of A, denoted by \(p\text{-rank }(A)\), is the size of the largest invertible principal submatrix of A. If there exists an ITN matrix \(A \in {\mathbb R}^{n \times n}\) with \(\text{ rank }(A)=r\) and \(p\text{-rank }(A)=p\), then the triple (nrp) is called realizable [10,  p. 709], and A is considered as an ITN matrix associated with the triple (nrp). Since the nonzero eigenvalues of A are positive and distinct [10,  Theorem 3.3], the set of eigenvalues \(\{ \lambda _i \}_{i=1}^{n}\) of A satisfies that \(\lambda _1> \lambda _2> \cdots> \lambda _p > 0\), and \(\lambda _{p+1}= \lambda _{p+2}= \cdots = \lambda _n = 0\), that is, if A is an associated matrix with a realizable triple (nrp) then p is the number of nonzero eigenvalues of A and \(n-p\) is the algebraic multiplicity of its zero eigenvalue. The matrix A has \(n-r\) zero Jordan blocks whose sizes are given by the Segre characteristic of A corresponding to its zero eigenvalue [14]. Moreover, since \(\text{ rank }(A^p)=p\) the size of its zero Jordan blocks is at most p. Now, we consider the next definition.

Definition 1

A Jordan structure corresponding to the zero eigenvalue (zero-Jordan structure) is called admissible for a realizable triple (nrp) if there exists an ITN matrix \(A \in {\mathbb R}^{n \times n}\) with \(\text{ rank }(A)=r\), \(p\text{-rank }(A)=p\), and A has the given Jordan structure.

From this definition, if \(A \in {\mathbb {R}}^{n \times n}\) is an ITN matrix associated with the realizable triple (nrp) and \(S= (s_1,s_2, \ldots ,s_{n-r})\) is the Segre characteristic corresponding to its zero eigenvalue, then this Segre characteristic is a zero-Jordan structure admissible for (nrp). That is, the zero-Jordan structure admissible for the realizable triple (nrp) is the same concept as the Segre characteristic corresponding to the zero eigenvalue of an ITN matrix associated with the realizable triple (nrp). We will talk about zero-Jordan blocks if we do not need to specify the size of the Jordan blocks, and about the Segre characteristic in the opposite case.

Now, our question is how to be sure if a decreasing sequence of positive integers gives a zero-Jordan structure admissible for a realizable triple. The answer is that the sequence denoted by \(S= (s_1,s_2,\ldots ,s_{q})\) is a zero-Jordan structure admissible for a realizable triple (nrp) if \(s_i\) represents the size of each zero Jordan block, \(i= 1, 2, \ldots , q\) and the following inequalities hold:

$$\begin{aligned} \left\{ \begin{array}{l} q= n-r \\[5pt] s_1 \le \text{ min }\{r-p+1 ,p\} \\[5pt] s_i \le s_{i-1}, \quad i=2,\ldots , n-r \\[7pt] \sum _{i=1}^{n-r} s_i=n-p. \end{array} \right. \end{aligned}$$

The problem to characterize completely all possible Jordan structures admissible for a realizable triple has been studied by several authors (see for instance [5, 8, 10]) extending the classical result of [11] who introduced the total positivity and studied the eigenvalues of the oscillatory matrices. These results are related to the relationship between the Jordan structure of two matrices sufficiently close, deflation problems, the pole assignment problem and the stability in control systems (see [2] and references therein).

In [5] the authors have obtained the number of zero-Jordan structures admissible for a realizable triple (nrp), the Segre characteristics corresponding to these zero-Jordan structures and an algorithm to compute them. Since the zero-Jordan structures admissible for a realizable triple (nrp) can be interpreted as the number of partitions of \(n-p\) into exactly \(n-r\) parts with the largest part at most p, then the following properties hold:

  1. 1.

    If (nrp) is a realizable triple and \(S=(s_1,s_2,\ldots ,s_{n-r-1},s_{n-r})\) is a zero-Jordan structure admissible for this triple, then \(S'=(s_1,s_2,\ldots ,s_{n-r-1}\), \(s_{n-r},1)\) is a zero-Jordan structure admissible for the realizable triple \((n+1,r,p)\).

  2. 2.

    If (nrp) is a realizable triple and \(S=(s_1,s_2,\ldots ,s_{n-r-1},s_{n-r})\) is a zero-Jordan structure admissible for this triple, we have the following options:

    1. (a)

      If \(s_{n-r}=1,\) then \(S'=(s_1,s_2,\ldots ,s_{n-r-1})\) is a zero-Jordan structure admissible for the realizable triple \((n-1,r,p)\).

    2. (b)

      If \(s_{n-r}>1\) and

      1. (i)

        \(\sum _{i=1}^{n-r-1}s_i+s_{n-r}-1\le (n-r-1)p\), then \(s_i\), \(i=1,2,\ldots ,n-r\) can be redistributed in \(S'=(s'_1,s'_2,\ldots ,s'_{n-r-1},1)\) such that \(\sum _{i=1}^{n-r}s_i = 1+ \sum _{j=1}^{n-r-1} s'_j\), being \(S'\) another zero-Jordan structure admissible for the triple (nrp). So, by Property 2.(a), \(S''=(s'_1,s'_2,\ldots ,s'_{n-r-1})\) is a zero-Jordan structure admissible for the realizable triple \((n-1,r,p)\).

      2. (ii)

        \(\sum _{i=1}^{n-r-1}s_i+s_{n-r}-1 > (n-r-1)p\), then the triple \((n-1,r,p)\) is not realizable.

We follow the notation of [1], that is, for \(k,n \in {\mathbb {N}}\), \(1\le k \le n\), \({\mathcal {Q}}_{k,n}\) denotes the set of all increasing sequences of k natural numbers less than or equal to n. If \(A \in {\mathbb {R}}^{n \times n}\), \(\alpha = (\alpha _1, \alpha _2, \ldots , \alpha _k) \in {\mathcal {Q}}_{k,n}\) and \(\beta = (\beta _1, \beta _2, \ldots , \beta _k) \in {\mathcal {Q}}_{k,n}\), then \(A[\alpha |\beta ]\) denotes the \(k \times k\) submatrix of A lying in rows \(\alpha _i\) and columns \(\beta _i\), \(i=1, 2, \ldots , k\) and the principal submatrix \(A[\alpha |\alpha ]\) is abbreviated as \(A[\alpha ]\) and we give the following definition

Definition 2

[4,  Definition 1] Let \(A \in {\mathbb {R}}^{n \times n}\) be a matrix with \(p\text{-rank }(A)=p\). We say that the sequence of integers \(\alpha = \{i_1, i_2, \ldots , i_p\} \in {\mathcal {Q}}_{p,n}\) is the sequence of the first p-indices of A if for \(j= 2,\ldots , p\) we have

$$\begin{aligned} \begin{array}{l} \det (A[i_1,i_2,\ldots ,i_{j-1},i_j]) \ne 0, \\[5pt] \det (A[i_1,i_2,\ldots ,i_{j-1},t]) = 0, \ \ i_{j-1}<t <i_{j}. \end{array} \end{aligned}$$

Note that if A is TN without null rows or columns, then \(i_1 = 1\). In [4, Section 2] the authors use this sequence to study the linear dependence relations between rows or columns of TN matrices.

Definition 3

[4,  Definition 2] A triple (nrp) is called \((1,i_2,\ldots ,i_p)\)-realizable if there exists an ITN matrix \(A \in {\mathbb {R}}^{n \times n}\) with \(\text{ rank }(A)=r\), \(p\text{-rank }(A)=p\), and \(\{1,i_2,\, i_3,\, \ldots , \,i_p\}\) as the sequence of its first p-indices.

If a matrix A satisfies the conditions of Definition 3 we say that A is a matrix associated with the triple (nrp) \((1,i_2,\ldots ,i_p)\)-realizable.

We recall that a matrix is an upper block echelon matrix if the first nonzero entry in each row (leading entry) is to the right of the leading entry in the row above it and all zero rows are at the bottom. A matrix is upper block echelon if each nonzero block, starting from the left, is to the right of the nonzero blocks below and the zero blocks are at the bottom. A matrix is a lower (block) echelon matrix if its transpose is an upper (block) echelon matrix.

In [6] is presented an algorithm to obtain an upper block echelon TN matrix U of size \(n \times n\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) and one of the zero-Jordan structure admissible for the triple (nrp). This algorithm also computes the sequence of the first p-indices of U. With the obtained matrix U the authors construct an ITN matrix A associated with the realizable triple (nrp) and with the same zero-Jordan structure and sequence of the first p-indices as matrix U.

On the other hand, if we add the sequence of the first p-indices \(H=\{1,i_2,i_3,\ldots ,i_p\}\) to the triple (nrp) in [7] is given an algorithm to obtain an upper block echelon TN matrix U of size \(n \times n\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) and with H as its sequence of the first p-indices. From this matrix U the authors construct an ITN matrix A associated with the triple \((n,r,p) (1,i_2,\ldots ,i_p)\)-realizable.

The difference between prescribing or not the sequence of the first p-indices is that some properties that the ITN matrices satisfy without prescribed p-indices, are not satisfied when they are prescribed. For instance:

  1. 1.

    By [9], the upper bound for the maximum rank of an ITN matrix A associated with a realizable triple (nrp) is \(n-\left\lceil \dfrac{n-p}{p} \right\rceil \), but this bound can be lower when the sequence of the first p-indices is prescribed (see [4]). For example, if we consider the realizable triple (15, r, 3), then by [9] we have that \(r \le 11\). If we prescribed \(\{1,2,7\}\) as the sequence of its first 3-indices, then \(r \le 7\). As a conclusion, the triple (15, r, 3) is realizable for \(r= 3, 4, \ldots , 11\), but it is not (15, r, 3) (1, 2, 7)-realizable for \(r= 8, 9, 10, 11\).

  2. 2.

    If the sequence of the first p-indices is prescribed, then the number of the zero-Jordan structures admissible for a realizable triple (nrp) is less than or equal to this number when the sequence is not prescribed. For example, applying [5,  Algorithm 3] to the realizable triple (15, 7, 3), the zero-Jordan structures admissible for this triple are:

    $$\begin{aligned} S_1=(3, 3, 1, 1, 1, 1, 1, 1), \ S_2=(3, 2, 2, 1, 1, 1, 1, 1), \ S_3=(2, 2, 2, 2, 1, 1, 1, 1), \end{aligned}$$

    if we prescribe the sequence of the first 3-indices as \(\{1,2,7\}\), then the unique zero-Jordan structure admissible is \(S_3\).

In this work we obtain the zero-Jordan structures admissible for a realizable triple (nrp) with a sequence of the first p-indices \(\{1,i_2,\ldots ,i_p\}\) and we give a method to construct an ITN matrix associated with this triple \((n,r,p) \ (1,i_2,\ldots ,i_p)\)-realizable and with one of the zero-Jordan structure admissible. For that, in Sect. 2 we study some properties of the zero-Jordan structures for an upper block echelon TN matrix \(U\in {\mathbb {R}}^{n \times n}\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) in function of its sequence of the first p-indices. In Sect. 3 we construct Algorithm 4 to obtain how many and what are explicitly the zero-Jordan structures admissible for a triple \((n,r,p) (1,i_2,\ldots , i_p)\)-realizable. In Sect. 4 we present a procedure to obtain paths of pairs associated with the zero-Jordan structure obtained in Sect. 3 and, using these paths we present an algorithm to obtain an upper block echelon TN matrix \(U\in {\mathbb {R}}^{n \times n}\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\), a prescribed sequence of its first p-indices and with one of the zero-Jordan structures. Finally, we obtain some matrices associated with a triple (nrp) \((1,i_2,\ldots ,i_p)\)-realizable and with one of the zero-Jordan structures obtained in Sect. 3.

From now on and for simplicity, we use the following MatLab notation: A(i,  : ) denotes the ith row of A and A( : , j) denotes its jth column; \(\mathrm {ones}(n,m)\) denotes the \(n \times m\) matrix of ones; \(\mathrm {triu}(\mathrm {ones}(n,m))\) denotes the upper triangular part of \(\mathrm {ones}(n,m)\); \(\mathrm {zeros}(n,m)\) denotes the \(n \times m\) zero matrix; \(\mathrm {diag}(v)\) denotes a square matrix of order n, with the elements of v on the main diagonal, where v is a vector of n components; \(\mathrm {tril(ones)}(n, n)\) denotes the lower triangular part of \(\mathrm {ones}(n,n)\).

2 Properties on the zero-Jordan structure of the upper block echelon TN matrices

In this section we study some properties of the zero-Jordan structures for an upper block echelon TN matrix in function of the sequence of its first p-indices. Concretely, we consider the following upper block echelon TN matrix \(U\in {\mathbb {R}}^{n \times n}\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) and \(H=\{1,2,\ldots ,j+1,i_{j+2},\ldots ,i_p\}\), \(i_{j+2} > j+2\), as the sequence of its first p-indices

$$\begin{aligned} U=\left[ \begin{array}{cccccccc} U_{11} &{} U_{12} &{} U_{13} &{} U_{14} &{} \ldots &{} U_{1,p-j} &{} U_{1,p+1-j} \\ O &{} O &{} U_{23} &{} U_{24} &{} \ldots &{} U_{2,p-j} &{} U_{2,p+1-j} \\ O &{} O &{} O &{} U_{34} &{} \ldots &{} U_{3,p-j} &{} U_{3,p+1-j} \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{}\vdots &{} \vdots \\ O &{} O &{} O &{} O &{} \ldots &{} U_{p-1-j,p-j} &{} U_{p-1-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} U_{p-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O \end{array} \right] \end{aligned}$$
(1)

whose partition in blocks by rows and columns is, respectively

$$\begin{aligned} \begin{array}{llllll} j+1, &{} i_{j+2}-(j+1), &{} i_{j+3}-i_{j+2}, &{} \ldots , &{} i_p-i_{p-1}, &{} n-i_p \\ j+1, &{} i_{j+2}-(j+1)-1,&{} i_{j+3}-i_{j+2}, &{} \ldots , &{} i_p-i_{p-1}, &{} n+1-i_p \end{array} \end{aligned}$$

and where

$$\begin{aligned} \begin{array}{l} \left[ \begin{array}{ccccccc} U_{11} &{} U_{12} &{} U_{13} &{} \ldots &{} U_{1,p-j} &{} U_{1,p+1-j} \end{array} \right] \\[7pt] \quad =\left[ \begin{array}{cccccccc} 1 &{} 1 &{} \cdots &{} 1 &{} 1 &{} \cdots &{} 1 &{} 1 \\ 0 &{} 1 &{} \cdots &{} 1 &{} 1 &{} \cdots &{} 1 &{} 1 \\ \vdots &{} \vdots &{} &{} \vdots &{} \vdots &{} &{} \vdots &{} \vdots \\ 0 &{} 0 &{} \cdots &{} 1 &{} 1 &{} \cdots &{} 1 &{} 1 \end{array} \right] =\text{ triu(ones }(j+1,n)). \end{array} \end{aligned}$$

Following the steps (a), (b) and (c) of the process described in [6,  Theorem 1], we transform the matrix U, by similarity and permutation similarity, into the matrix \(T=XUX^{-1}\)

$$\begin{aligned} T=\left[ \begin{array}{c|ccccccc} T_{11} &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \\ \hline O &{} O &{} T_{23} &{} T_{24} &{} \ldots &{} T_{2,p-1-j} &{} T_{2,p-j} &{} T_{2,p+1-j} \\ O &{} O &{} O &{} T_{34} &{} \ldots &{} T_{3,p-1-j} &{} T_{3,p-j} &{} T_{3,p+1-j} \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} T_{p-1-j,p-j} &{} T_{p-1-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} T_{p-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \end{array} \right] =\left[ \begin{array}{cc} T_{11} &{} O \\ O &{} T_{2} \end{array} \right] \end{aligned}$$
(2)

where the block partition by rows and columns is

$$\begin{aligned} p, \, i_{j+2}-(j+1)-1, \, i_{j+3}-i_{j+2}-1, \, \ldots , \, i_p-i_{p-1}-1, \, n-i_p \end{aligned}$$

and the similarity matrix X

$$\begin{aligned} X=\left[ \begin{array}{cc} I_{j+1} &{} X_{12} \\ O &{} X_{22} \end{array} \right] \end{aligned}$$
(3)

is obtained as a product of matrices, being one of them the permutation matrix

$$\begin{aligned} P=\left[ e_1,e_2,\ldots ,e_{j+1},e_{i_{j+2}},\ldots ,e_{i_p}, e_{j+2},\ldots ,e_{i_{j+2}-1},e_{i_{j+2}+1}, \ldots , e_n\right] \end{aligned}$$

where \(e_i\) is the ith vector of the canonical basis of \({\mathbb {R}}^n\).

Remark 1

Consider the matrix T given in (2),

  1. 1.

    \(T_{11}\in {\mathbb {R}}^{p \times p}\) is a non-derogatory nonsingular matrix, with one Jordan block of size p corresponding to its unique eigenvalue \(\lambda =1\).

  2. 2.

    \(T_{2}\) is a nilpotent matrix. The number of blocks \(T_{s,s+1}\) of the superdiagonal of \(T_2\) depends on the number and the distribution of the p-indices that U has after the j first consecutive indices.

    1. (a)

      If there are nonconsecutive indices in \(\{i_{j+2},i_{j+3}, \ldots ,i_p\}\), then \(T_2\) has \(p-(j+1)\) blocks in the superdiagonal, being \((i_{j+s}-i_{j+s-1}-1)\times (i_{j+s+1}-i_{j+s}-1)\) the size of the block \(T_{s,s+1}\), for \(s=2,3,\ldots ,p-j\), with \(i_{p+1}=n\). As a result, the maximum size of the zero Jordan blocks of \(T_{2}\), and therefore of U, is \(p-j\).

    2. (b)

      If there are r blocks with consecutive indices in \(\{i_{j+2},i_{j+3}, \ldots ,i_p\}\), then \(T_2\) has \(r+w\) blocks in the superdiagonal, being w the number of nonconsecutive indices. In this case, the maximum size of the zero Jordan blocks of U is \(r+w+1\).

  3. 3.

    Since U and T are similar we have that the zero-Jordan structure of U and \(T_2\) is the same. Therefore, for simplicity, we use \(T_2\) to study the zero-Jordan structure of U.

Example 1

Consider the upper block echelon TN matrix \(U\in {\mathbb {R}}^{11 \times 11}\) with \(\text{ rank }(U)=8\), \(p\text{-rank }(U)=5\) and whose sequence of its first 5-indices is \(H=\{1, 2, 3, 7, 9\}\),

$$\begin{aligned} U=\left[ \begin{array}{ccc|ccc|cc|ccc} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ 0 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ 0 &{} 0 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ \hline 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 2 &{} 2 &{} 2 &{} 2 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 2 &{} 3 &{} 3 &{} 3 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 2 &{} 4 &{} 5 &{} 5 \\ \hline 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 2 &{} 3 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 2 &{} 3 \\ \hline 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \end{array} \right] = \left[ \begin{array}{cccc} U_{11} &{} U_{12} &{} U_{13} &{} U_{14} \\ O &{} O &{} U_{23} &{} U_{24} \\ O &{} O &{} O &{} U_{34} \\ O &{} O &{} O &{} O \end{array} \right] . \end{aligned}$$

By similarity we obtain the matrix \(T=XUX^{-1}\)

$$\begin{aligned} T=\left[ \begin{array}{ccccc|ccc|r|cc} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 1 &{} 1 &{} 1 &{} 2 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 1 &{} 4 &{} 5 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 1 &{} 6 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ \hline 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} -1 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 3\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1\\ \hline 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ \hline 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \end{array} \right] = \left[ \begin{array}{c|ccc} T_{11} &{} O &{} O &{} O \\ \hline O &{} O &{} T_{23 } &{} T_{24} \\ O &{} O &{} O &{} T_{34} \\ O &{} O &{} O &{} O \end{array} \right] . \end{aligned}$$

From Remark 1, \(T_{11} \in {\mathbb {R}}^{5 \times 5}\) is nonsingular and has a Jordan block of size \(p=5\) corresponding to its unique eigenvalue \(\lambda =1\). Moreover, since there are nonconsecutive indices in \(\{ 7, 9 \}\), \(T_2\) has \(p-(j+1)=5-(2+1)=2\) blocks in the superdiagonal, and the sizes of \(T_{23}\) and \(T_{34}\) are \((i_{4}-i_{3}-1) \times (i_{5}-i_{4}-1)=3 \times 1\) and \((i_{5}-i_{4}-1) \times (i_{6}-i_{5}-1)=1 \times 2\), respectively. So, the maximum size of the zero Jordan blocks of U is \(p-j=5-2=3\). In this case, from \(T_2\) we conclude that the Segre characteristic of U corresponding to its zero eigenvalue is \(S=(2,2,2)\).

Note that, if we apply [5,  Algorithm 3] to the realizable triple (11, 8, 5) we have that the zero-Jordan structures admissible are \(S_1=(4,1,1)\), \(S_2=(3,2,1)\) and \(S_3=(2,2,2)\). Next, we use [6,  Algorithm 3] for each zero-Jordan structure admissible and we construct an upper block echelon TN matrix U, of size \(11 \times 11\), \(\text{ rank }(U)=8\), \(p\text{-rank }(U)=5\) and with one of these 3 zero-Jordan structures. Now, if we add \(H= \{1,2,3,7,9\}\) as the sequence of the first 5-indices, we have shown that the maximum size of the zero Jordan blocks of U is 3. Then, we can conclude that does not exist an upper block echelon TN matrix U of size \(11 \times 11\), \(\text{ rank }(U)=8\), \(p\text{-rank }(U)=5\), \(H=\{1,2,3,7,9\}\) as the sequence of its first 5-indices and with the Segre characteristic corresponding to its zero eigenvalue given by \(S_1\).

Theorem 1

Let \(U\in {\mathbb {R}}^{n \times n}\) be an upper block echelon TN matrix with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\), \(H=\{1,2,\ldots ,j+1,i_{j+2},\ldots ,i_p\}\) as the sequence of its first p-indices, with \(i_{j+2}>j+2\), and \(S=(s_1,s_2,\ldots ,s_{n-r})\) as the Segre characteristic corresponding to its zero eigenvalue. Then, there exists an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n-j) \times (n-j)}\) with \(\text{ rank }({\tilde{U}})=r-j\), \(p\text{-rank }({\tilde{U}})=p-j\) and \(H=\{1,i_{j+2}-j,i_{j+3}-j, \ldots ,i_p-j\}\) as the sequence of the first \((p-j)\)-indices, whose Segre characteristic corresponding to the zero eigenvalue is S.

Proof

Let \(U\in {\mathbb {R}}^{n \times n}\) be an upper block echelon TN matrix given in (1) with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) and \(H=\{1,2,\ldots ,j+1,i_{j+2},\ldots ,i_p\}\) as the sequence of its first p-indices, \(i_{j+2}>j+2\).

From the matrix U, we consider the TN matrix \({\tilde{U}} \in {\mathbb {R}}^{(n-j) \times (n-j)}\), such that, \(\text{ rank }({\tilde{U}})=r-j\), \(p\text{-rank }({\tilde{U}})=p-j\) and \(\{1,i_{j+2}-j,i_{j+3}-j, \ldots ,i_p-j\}\) as the sequence of the first \((p-j)\)-indices

$$\begin{aligned} {\tilde{U}}=U(j+1:n,j+1:n)=\left[ \begin{array}{ccccccc} 1 &{} {\tilde{U}}_{12} &{} {\tilde{U}}_{13} &{} \ldots &{} {\tilde{U}}_{1,p-j} &{} {\tilde{U}}_{1,p+1-j} \\ O &{} O &{} U_{23} &{} \ldots &{} U_{2,p-j} &{} U_{2,p+1-j} \\ O &{} O &{} O &{} \ldots &{} U_{3,p-j} &{} U_{3,p+1-j} \\ \vdots &{} \vdots &{} \vdots &{} &{}\vdots &{} \vdots \\ O &{} O &{} O &{} \ldots &{} U_{p-1-j,p-j} &{} U_{p-1-j,p+1-j} \\ O &{} O &{} O &{} \ldots &{} O &{} U_{p-j,p+1-j} \\ O &{} O &{} O &{} \ldots &{} O &{} O \end{array} \right] \end{aligned}$$

where

$$\begin{aligned} \left[ \begin{array}{cccccccc} 1&{\tilde{U}}_{12}&{\tilde{U}}_{13}&{\tilde{U}}_{14}&\ldots&{\tilde{U}}_{1,p-j}&{\tilde{U}}_{1,p+1-j} \end{array} \right] =\text{ ones }(1,n-j) \end{aligned}$$

and whose partition by blocks in rows and columns is, respectively

$$\begin{aligned} \begin{array}{llllll} 1, &{} i_{j+2}-j-1, &{} i_{j+3}-i_{j+2}, &{} \ldots , &{} i_p-i_{p-1}, &{} n-i_p \\ 1, &{} i_{j+2}-(j+1)-1,&{} i_{j+3}-i_{j+2}, &{} \cdots , &{} i_p-i_{p-1}, &{} n+1-i_p. \end{array} \end{aligned}$$

Now, we consider the similarity matrix

$$\begin{aligned} {\tilde{X}}=X(j+1:n,j+1:n)=\left[ \begin{array}{cc} 1 &{} {\tilde{X}}_{12} \\ O &{} X_{22} \end{array} \right] \end{aligned}$$

where X is the matrix given in (3) and \({\tilde{X}}_{12}=X_{12}(j+1,:)\). Taking into account the structure of the matrices X and \({\tilde{X}}\), we obtain

$$\begin{aligned} \begin{array}{l} {\tilde{T}} = {\tilde{X}}{\tilde{U}}{\tilde{X}}^{-1} \\[9pt] \quad =\left[ \begin{array}{c|ccccccc} {\tilde{T}}_{11} &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \\ \hline O &{} O &{} T_{23} &{} T_{24} &{} \ldots &{} T_{2,p-1-j} &{} T_{2,p-j} &{} T_{2,p+1-j} \\ O &{} O &{} O &{} T_{34} &{} \ldots &{} T_{3,p-1-j} &{} T_{3,p-j} &{} T_{3,p+1-j} \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} T_{p-1-j,p-j} &{} T_{p-1-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} T_{p-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \end{array} \right] =\left[ \begin{array}{cc} {\tilde{T}}_{11} &{} O \\ O &{} T_{2} \end{array} \right] , \end{array} \end{aligned}$$

being the partition by blocks in rows and columns

$$\begin{aligned} p-j, \, i_{j+2}-(j+1)-1, \, i_{j+3}-i_{j+2}-1, \, \ldots , \, i_p-i_{p-1}-1, \, n-i_p. \end{aligned}$$

From similarity, the zero-Jordan structure of \({\tilde{U}}\) is equal to the zero-Jordan structure of the nilpotent matrix \(T_2\), which is equal to the zero-Jordan structure of the matrix U. Thus, the Segre characteristic of \({\tilde{U}}\in {\mathbb {R}}^{(n-j) \times (n-j)}\) corresponding to its zero eigenvalue is equal to \(S=(s_1,s_2,\ldots ,s_{n-r})\)\(\square \)

Theorem 2

Let \(U\in {\mathbb {R}}^{n \times n}\) be an upper block echelon TN matrix with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\), \(H=\{1,i_2,i_2+1,i_2+2,\ldots ,i_2+j,i_{j+3},i_{j+4},\ldots ,i_{p}\}\) as the sequence of its first p-indices and \(S=(s_1,s_2,\ldots ,s_{n-r})\) as the Segre characteristic corresponding to its zero eigenvalue. Then, there exists an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n-j) \times (n-j)}\) with \(\text{ rank }({\tilde{U}})=r-j\), \(p\text{-rank }({\tilde{U}})=p-j\) and \(H=\{1,i_2,i_{j+3}-j,i_{j+4}-j,\ldots ,i_{p}-j\}\) as the sequence of the first \((p-j)\)-indices, whose Segre characteristic corresponding to the zero eigenvalue is S.

Proof

From the matrix U and applying similarity we obtain the matrix T

$$\begin{aligned} T=\left[ \begin{array}{c|ccccccc} T_{11} &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \\ \hline O &{} O &{} T_{23} &{} T_{24} &{} \ldots &{} T_{2,p-1-j} &{} T_{2,p-j} &{} T_{2,p+1-j} \\ O &{} O &{} O &{} T_{34} &{} \ldots &{} T_{3,p-1-j} &{} T_{3,p-j} &{} T_{3,p+1-j} \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} T_{p-1-j,p-j} &{} T_{p-1-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} T_{p-j,p+1-j} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \end{array} \right] =\left[ \begin{array}{cc} T_{11} &{} O \\ O &{} T_{2} \end{array} \right] \end{aligned}$$

with the partition by blocks of rows and columns

$$\begin{aligned} p, \, i_{2}-2, \, i_{j+3}-(i_2+j)-1, \, i_{j+4}-i_{j+3}-1, \, \ldots , \, i_p-i_{p-1}-1, \, n-i_p. \end{aligned}$$

Note that, the submatrix \(T_{2}\) can be obtained from an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n-j) \times (n-j)}\), with \(\text{ rank }({\tilde{U}})=r-j\), \(p\text{-rank }({\tilde{U}})=p-j\), \(H=\{1,i_2,i_{j+3}-j,i_{j+4}-j,\ldots ,i_{p}-j\}\) as the sequence of its first \((p-j)\)-indices. Then, the Segre characteristic corresponding to the zero eigenvalue of U and \({\tilde{U}}\) is the same. \(\square \)

Remark 2

  1. 1.

    Applying Theorem 1 we may assume, without loss of generality, that the first elements of the sequence of the first p-indices of the matrix U are nonconsecutive. That is, \(i_2>2\).

  2. 2.

    Applying Theorem 2 to each group of consecutive indices we can suppose, without loss of generality, that in the sequence of the first p-indices of the matrix U there are not groups of consecutive entries.

Example 2

Consider an upper block echelon TN matrix \(U\in {\mathbb {R}}^{25 \times 25}\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=12\) and \(H=\{1, 2, 3, 6, 7, 8, 10, 12, 13, 15, 16, 20\}\) as the sequence of its first 12-indices. By the previous Remark, we study the Segre characteristic of U corresponding to its zero eigenvalue, using a smaller size matrix \({\tilde{U}}\in {\mathbb {R}}^{(25-j) \times (25-j)}\) with \(\text{ rank }({\tilde{U}})=r-j\), \(p\text{-rank }(U)=12-j\) and \({\tilde{H}}=\{1, i_2,\ldots ,i_{12-j}\}\) as the sequence of its first \((12-j)\)-indices. To obtain j and the sequence \({\tilde{H}}\) we proceed as follows:

  1. 1.

    Since the 3 first indices of U are consecutive, then we only consider the first one and remove the indices 2 and 3. After this step, we subtract each remaining index larger than 3 by 2, that is

  2. 2.

    Mark the first group of consecutive indices, \(\{ 4, 5, 6 \}\). Again, we only consider the first one and remove the indices 5 and 6. After this step, we subtract each remaining index larger than 6 by 2, that is

  3. 3.

    Repeating the previous step with each group of consecutive indices, we finally get the sequence of indices:

    $$\begin{aligned} {\tilde{H}}=\{1, 4, 6, 8, 10,14\} \ \ \Longrightarrow \ \ j=6. \end{aligned}$$
  4. 4.

    Thus, we will consider an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{21 \times 21}\) with \(\text{ rank }({\tilde{U}})=r-6\), \(p\text{-rank }({\tilde{U}})=6\) and \({\tilde{H}}=\{1, 4,6,8,10,14\}\) as the sequence of its first 6-indices.

When we have an upper block echelon TN matrix U with the sequence of the first p-indices \(\{1,2,\ldots ,j+1,i_{j+2} \ldots ,i_p\}\), with \(i_{j+2} >j+2\), by Theorem 1 we can construct an upper block echelon TN matrix \({\tilde{U}}\) with the sequence of the first p-indices \(\{1, i_{j+2}-j, \ldots ,i_p-j\}\) and with the same Segre characteristic as U. The following result considers the reverse case, that is, from an upper block echelon TN matrix U with the sequence of the first p-indices \(\{1,i_2,\ldots , i_p\}\), with \(i_2>2\), we construct an upper block echelon TN matrix \({\tilde{U}}\) with the sequence of the first p-indices \(\{1,2,\ldots ,j, 1+j, i_{2}+j, \ldots ,i_p+j\}\) and with the same Segre characteristic.

Theorem 3

Let \(U\in {\mathbb {R}}^{n \times n}\) be an upper block echelon TN matrix with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\), \(H=\{1,i_2,\ldots ,i_{p-1},i_p\}\), with \(i_2>2\), as the sequence of its first p-indices and \(S=(s_1,s_2,\ldots ,s_{n-r})\) as the Segre characteristic corresponding to its zero eigenvalue. Then, there exists an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n+j) \times (n+j)}\) with \(\text{ rank }({\tilde{U}})=r+j\), \(p\text{-rank }({\tilde{U}})=p+j\) and \(H=\{1,2,\ldots ,j,1+j,i_{2}+j,i_{3}+j, \ldots ,i_p+j\}\) as the sequence of the first \((p-j)\)-indices, whose Segre characteristic corresponding to the zero eigenvalue is S.

Proof

Let \(U\in {\mathbb {R}}^{n \times n}\) be an upper block echelon TN matrix given in (1) with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) and \(H=\{1,i_2,\ldots ,i_p\}\), with \(i_2>2\), as the sequence of its first p-indices, \(i_{j+2}>j+2\).

From the matrix U, we consider the TN matrix \({\tilde{U}} \in {\mathbb {R}}^{(n+j) \times (n+j)}\), such that, \(\text{ rank }({\tilde{U}})=r+j\), \(p\text{-rank }({\tilde{U}})=p+j\) and \({\tilde{H}}=\{1,2,\ldots ,j,1+j,i_{2}+j,i_{3}+j, \ldots ,i_p+j\}\) as the sequence of the first \((p-j)\)-indices

$$\begin{aligned} {\tilde{U}}=\left[ \begin{array}{cc} {\tilde{U}}_{11} &{} {\tilde{U}}_{12} \\ O &{} U \end{array} \right] \end{aligned}$$

where

$$\begin{aligned}{}[ \ {\tilde{U}}_{11} \quad {\tilde{U}}_{12} \ ]=\text{ triu(ones }(j,n+j)). \end{aligned}$$

By construction it is satisfied that

$$\begin{aligned} \text{ rank }({\tilde{U}}^{t}) = j+\text{ rank }(U^{t}), \ \ t=1,2,3,\ldots ,p. \end{aligned}$$

Then, for \(t=1,2,3,\ldots ,p,\)

$$\begin{aligned} \begin{array}{rcl} n+j-\text{ rank }({\tilde{U}}^{t}) &{} = &{} n+j-(j+\text{ rank }(U^{t})) \\ &{} \Downarrow &{} \\ \text{ dim(Ker }({\tilde{U}}^{t})) &{} = &{} \text{ dim(Ker }(U^{t})). \end{array} \end{aligned}$$

So, the zero-Jordan structure of \({\tilde{U}}\) is equal to the zero-Jordan structure of U. Thus, the Segre characteristic of \({\tilde{U}}\) corresponding to its zero eigenvalue is equal to \(S=(s_1,s_2,\ldots ,s_{n-r})\). \(\square \)

The following two results show how the \(\text{ rank }\), the principal \(\text{ rank }\), the sequence of the first p-indices and the Segre characteristic of an upper block echelon TN matrix change when its size increases by one unit.

Theorem 4

Let \(U\in {\mathbb {R}}^{n \times n}\) be an upper block echelon TN matrix with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\), \(H=\{1,i_2,i_3,\ldots , i_p\}\) as the sequence of its first p-indices and \(S=(s_1,s_2,\ldots ,s_{n-r})\) as the Segre characteristic corresponding to its zero eigenvalue. Then, there exists an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n+1) \times (n+1)}\) with \(\text{ rank }({\tilde{U}})=r\), \(p\text{-rank }({\tilde{U}})=p\), \(H=\{1,i_2,i_3,\ldots , i_p\}\) as the sequence of its first p-indices and whose Segre characteristic corresponding to its zero eigenvalue is \(S'=(s_1,s_2,\ldots ,s_{n-r},1)\).

Proof

Consider the following upper block echelon TN matrix \(U\in {\mathbb {R}}^{n \times n}\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\), \(H=\{1,i_2,i_3,\ldots , i_p\}\) as the sequence of its first p-indices

$$\begin{aligned} U=\left[ \begin{array}{cccccccc} 1 &{} U_{12} &{} U_{13} &{} U_{14} &{} \ldots &{} U_{1,p-1} &{} U_{1,p} &{} U_{1p+1} \\ 0 &{} O &{} U_{23} &{} U_{24} &{} \ldots &{} U_{2,p-1} &{} U_{2,p} &{} U_{2p+1} \\ 0 &{} O &{} O &{} U_{34} &{} \ldots &{} U_{3,p-1} &{} U_{3,p} &{} U_{3p+1} \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots \\ 0 &{} O &{} O &{} O &{} \ldots &{} O &{} U_{p-1,p} &{} U_{p-1,p+1} \\ 0 &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} U_{p,p+1} \\ 0 &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \end{array} \right] \end{aligned}$$

where the block partition by rows and columns is, respectively

$$\begin{aligned} \begin{array}{llllll} 1, &{} i_2-1, &{} i_3-i_2, &{} \ldots , &{} i_p-i_{p-1}, &{} n-i_p \\ 1, &{} i_2-2,&{} i_3-i_2, &{} \ldots , &{} i_p-i_{p-1}, &{} n+1-i_p. \end{array} \end{aligned}$$

By similarity we obtain \(T=XUX^{-1}\)

$$\begin{aligned} T=\left[ \begin{array}{c|ccccccc} T_{11} &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \\ \hline O &{} O &{} T_{23} &{} T_{24} &{} \ldots &{} T_{2,p-1} &{} T_{2,p} &{} T_{2p+1} \\ O &{} O &{} O &{} T_{34} &{} \ldots &{} T_{3,p-1} &{} T_{3,p} &{} T_{3p+1} \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} T_{p-1,p} &{} T_{p-1,p+1} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} T_{p,p+1} \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \end{array} \right] =\left[ \begin{array}{cc} T_{11} &{} O \\ O &{} T_{2} \end{array} \right] \end{aligned}$$
(4)

whose block partition by rows and columns is

$$\begin{aligned} p, \, i_2-2, \, i_3-i_2-1, \, \ldots , \, i_p-i_{p-1}-1, \, n-i_p. \end{aligned}$$

As the Jordan structure of \(T_{2}\) is the same as the zero-Jordan structure of U, the Segre characteristic corresponding to its zero eigenvalue is \(S=(s_1,s_2,\ldots ,s_{n-r})\). Now, we consider the upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n+1) \times (n+1)}\), with \(\text{ rank }({\tilde{U}})=r\), \(p\text{-rank }({\tilde{U}})=p\), \(H=\{1,i_2,i_3,\ldots , i_p\}\) as the sequence of its first p-indices given by

$$\begin{aligned} {\tilde{U}}=\left[ \begin{array}{cc} U &{} U(:,n) \\ O &{} 0 \\ \end{array} \right] _{(n+1) \times (n+1)}. \end{aligned}$$

Applying the similarity \({\tilde{X}}{\tilde{U}}{\tilde{X}}^{-1}= {\tilde{T}}\), where

$$\begin{aligned} {\tilde{X}}=\left[ \begin{array}{cc} X &{} X(:,n) \\ O &{} 1 \end{array} \right] _{(n+1) \times (n+1)} \end{aligned}$$

we obtain the matrix

$$\begin{aligned} {\tilde{T}}=\left[ \begin{array}{c|ccccccc} T_{11} &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \\ \hline O &{} O &{} T_{23} &{} T_{24} &{} \ldots &{} T_{2,p-1} &{} T_{2,p} &{} T_{2,p+1} \ \ T_{2,p+1}(:,n-i_p) \\ O &{} O &{} O &{} T_{34} &{} \ldots &{} T_{3,p-1} &{} T_{3,p} &{} T_{3,p+1} \ \ T_{3,p+1}(:,n-i_p) \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} T_{p-1,p} &{} T_{p-1,p+1} \ \ T_{p-1,p+1}(:,n-i_p) \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} T_{p,p+1} \ \ T_{p,p+1}(:,n-i_p) \\ O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \end{array} \right] \end{aligned}$$

whose block partition by rows and columns is

$$\begin{aligned} p, \, i_2-i_1-1, \, i_3-i_2-1, \, \ldots , \, i_p-i_{p-1}-1, \, n-i_p. \end{aligned}$$

Applying the similarity

$$\begin{aligned} Y=\left[ \begin{array}{ccc|r} &{} &{} &{} 0 \\ &{} I_{n} &{} &{} \vdots \\ &{} &{} &{} 0 \\ &{} &{} &{} -1 \\ \hline &{} &{} &{} 1 \end{array} \right] , \end{aligned}$$

the matrix \({\tilde{T}}\) becomes

$$\begin{aligned} Y^{-1}{\tilde{T}}Y =\left[ \begin{array}{cc} T &{} O \\ O &{} O \end{array} \right] _{(n+1) \times (n+1)}. \end{aligned}$$

Thus, the Segre characteristic of \({\tilde{U}}\) corresponding to its zero eigenvalue is \(S'=(s_1,s_2,\ldots \), \(s_{n-r},1)\)\(\square \)

Remark 3

Applying Theorem 4 recursively, we can assure that for all \(j>1\) there exists an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n+j) \times (n+j)}\), with \(\text{ rank }({\tilde{U}})=r\), \(p\text{-rank }({\tilde{U}})=p\), \(H=\{1,i_2,\ldots ,i_p\}\) as the sequence of its first p-indices and whose Segre characteristic corresponding to its zero eigenvalue is \(S'=(s_1,s_2,\ldots ,s_{n-r},\underbrace{1,1,\ldots ,1}_{j})\).

Theorem 5

Let \(U\in {\mathbb {R}}^{n \times n}\) be an upper block echelon TN matrix with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\), \(H=\{1,i_2,i_3,\ldots , i_p\}\) as the sequence of its first p-indices and \(S=(s_1,s_2,\ldots ,s_{n-r})\) as the Segre characteristic corresponding to its zero eigenvalue. Then, there exists an upper block echelon TN matrix \({\tilde{U}}\in {\mathbb {R}}^{(n+1) \times (n+1)}\) with \(\text{ rank }({\tilde{U}})=r+1\), \(p\text{-rank }({\tilde{U}})=p+1\), \(H=\{1,i_2,i_3,\ldots , i_p, n+1\}\) as the sequence of its first \((p+1)\)-indices and whose Segre characteristic corresponding to its zero eigenvalue is S.

Proof

Consider the matrix U and construct the following upper block echelon TN matrix, \({\tilde{U}}\in {\mathbb {R}}^{(n+1) \times (n+1)}\) with \(\text{ rank }({\tilde{U}})=r+1\), \(p\text{-rank }({\tilde{U}})=p+1\), \(H=\{1,i_2,i_3,\ldots , i_p, n+1\}\) as the sequence of its first \((p+1)\)-indices,

$$\begin{aligned} \begin{array}{l} {\tilde{U}}= \left[ \begin{array}{c|c} U &{} \begin{array}{c} U(1:p,n) \\ \text{ ones }(n-p,1) \end{array} \\ \hline O &{} 1 \end{array} \right] \\[20pt] \quad =\left[ \begin{array}{cccccccc|c} 1 &{} U_{12} &{} U_{13} &{} U_{14} &{} \ldots &{} U_{1,p-1} &{} U_{1,p} &{} U_{1p+1} &{} U_{1p+1}(:,n+1-i_p) \\ 0 &{} O &{} U_{23} &{} U_{24} &{} \ldots &{} U_{2,p-1} &{} U_{2,p} &{} U_{2p+1} &{} U_{2p+1}(:,n+1-i_p)\\ 0 &{} O &{} O &{} U_{34} &{} \ldots &{} U_{3,p-1} &{} U_{3,p} &{} U_{3p+1} &{} U_{3p+1}(:,n+1-i_p) \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots &{} \vdots \\ 0 &{} O &{} O &{} O &{} \ldots &{} O &{} U_{p-1,p} &{} U_{p-1,p+1} &{} U_{p-1p+1}(:,n+1-i_p) \\ 0 &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} U_{p,p+1} &{} U_{pp+1}(:,n+1-i_p)\\ 0 &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O &{} \text{ ones }(n-p,1) \\ \hline 0 &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O &{} 1 \end{array} \right] . \end{array} \end{aligned}$$

Applying the similarity \(XUX^{-1}\) we obtain the matrix T given in (4), being the block partition by rows and columns

$$\begin{aligned} p, \, i_2-2, \, i_3-i_2-1, \, \ldots , \, i_p-i_{p-1}-1, \, n-i_p \end{aligned}$$

and the Segre characteristic corresponding to its zero eigenvalue equal to S.

Now, we consider the matrix

$$\begin{aligned} {\tilde{X}}=\left[ \begin{array}{c|c} X(1:p,:) &{} \text{ zeros }(p,1) \\ \hline \text{ zeros }(n,1) &{} 1 \\ X(p+1:n,:) &{} Z \end{array} \right] \end{aligned}$$

and by similarity we obtain

$$\begin{aligned} \begin{array}{l} {\tilde{T}} = {\tilde{X}}{\tilde{U}}{\tilde{X}}^{-1}\\[7pt] \quad =\left[ \begin{array}{cc|ccccccc} T_{11} &{} O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \\ O &{} 1 &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \\ \hline O &{} O &{} O &{} T_{23} &{} T_{24} &{} \ldots &{} T_{2,p-1} &{} T_{2,p} &{} T_{2p+1} \\ O &{} O &{} O &{} O &{} T_{34} &{} \ldots &{} T_{3,p-1} &{} T_{3,p} &{} T_{3p+1} \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{}\vdots &{} \vdots \\ O &{} O &{} O &{} O &{} O &{} \ldots &{} O &{} T_{p-1,p} &{} T_{p-1,p+1} \\ O &{} O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} T_{p,p+1} \\ O &{} O &{} O &{} O &{} O &{} \ldots &{} O &{} O &{} O \end{array} \right] =\left[ \begin{array}{cc} {\tilde{T}}_{11} &{} O \\ O &{} T_{2} \end{array} \right] \end{array} \end{aligned}$$

whose block partition by rows and columns is

$$\begin{aligned} p+1, \, i_2-2, \, i_3-i_2-1, \, \ldots , \, i_p-i_{p-1}-1, \, n+1-i_p. \end{aligned}$$

From similarity, the Jordan structure of \(T_{2}\) is the same as the zero-Jordan structure of \({\tilde{U}}\). Thus, the Segre characteristic corresponding to the zero eigenvalue of U and \({\tilde{U}}\) is the same. \(\square \)

3 Zero-Jordan structure admissible for a triple (nrp) \((1,i_2,\ldots , i_p)\)-realizable

In [5] given a realizable triple (nrp) the authors obtain the number of the zero-Jordan structures admissible for a realizable triple (nrp), these zero-Jordan structures and an algorithm to compute them.

Now, as noted in Sect. 1 a key objective is to obtain the zero-Jordan structures admissible for a triple (nrp) \((1,i_2,\ldots , i_p)\)-realizable. That is, we want to answer how many and what are the zero-Jordan structures admissible for a triple (nrp) \((1,i_2,\ldots , i_p)\)-realizable.

For that, we consider an upper block echelon TN matrix \(U\in {\mathbb {R}}^{n \times n}\) with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) and \(H=\{1,i_2,i_3,\ldots , i_p\}\) as the sequence of its first p-indices. Recall that in Sect. 2 we transform by similarity the matrix U into the matrix T given in (2). This matrix T has a nilpotent upper block echelon matrix \(T_{2}\) of size \((n-p) \times (n-p)\) with rank \(r-p\), and whose block partition by rows and columns is \(\{i_2-2,i_3-i_2-1,\ldots ,i_p-i_{p-1}-1,n-i_p\}\) and whose zero-Jordan structure is the same as the zero-Jordan structure of U (see Remark 1).

Given that the zero-Jordan structures admissible for a triple (nrp) \((1,i_2\), \(i_3,\ldots , i_p)\)-realizable are the same as the zero-Jordan structures of an upper block echelon TN matrix U of size \(n \times n\), with \(\text{ rank }(U)=r\), \(p\text{-rank }(U)=p\) and \((1,i_2,\ldots , i_p)\) as the sequence of the first p-indices, we are going to study the different zero-Jordan structures that the matrix \(T_2\) admits. These structures are obtained by Algorithm 4. This algorithm needs to know all possible linearly independent combinations of \(r-p\) rows of \(T_{2}\) (note that the rows are between the first one and the row \(i_p-p\)). For each linearly independent combination of \(r-p\) rows we apply Algorithm 3, which computes the zero-Jordan structures taking into account all possible linearly independent combinations of \(r-p\) columns (note that the columns are between the column \(i_2-1\) and the last column). Algorithm 3 needs two auxiliary algorithms to run correctly. Thus, we present these two algorithms.

Algorithm 1 obtains the conjugated sequence of a given sequence of nonincreasing positive integers.

figure a

Algorithm 2 identifies equal rows in a matrix Q and removes them.

figure b
figure c
figure d

Example 3

Consider the triple (15, 12, 6). Applying [5,   Algorithm 1] we obtain 6 zero-Jordan structures admissible

$$\begin{aligned} S_1= & {} (6,2,1), \ S_2=(5,3,1), \ S_3=(5,2,2), \\ S_4= & {} (4,4,1), \ S_5=(4,3,2), \ S_6=(3,3,3). \end{aligned}$$

Now, we consider the triple (15, 12, 6) (1, 3, 6, 8, 10, 12)-realizable. Applying Algorithm 4 we obtain that the number of the zero-Jordan structures admissible for this triple is \(x=4\) and they are

$$\begin{aligned} J=\left[ \begin{array}{rrr} 5 &{} 3 &{} 1 \\ 4 &{} 4 &{} 1 \\ 4 &{} 3 &{} 2 \\ 3 &{} 3 &{} 3 \end{array} \right] . \end{aligned}$$

That is,

$$\begin{aligned} S_2=(5,3,1), \ \ S_4=(4,4,1), \ \ S_5=(4,3,2), \ \ S_6=(3,3,3). \end{aligned}$$

4 Obtaining upper block echelon TN matrices

In this section we present a method to construct an upper block echelon TN matrix \(U \in {\mathbb {R}}^{n \times n}\) with \(\text{ rank }(U) = r\), \(p\text{-rank }(U)=p\), \(H=\{1,i_2,\ldots ,i_p\}\) as the sequence of its first p-indices and \(S=(s_1,s_2,\ldots ,s_{n-r})\) as the Segre characteristic corresponding to its zero eigenvalue. With the following process we obtain paths of pairs, \(P_z=\{(i,j)\}, \ z=1,2,\ldots \), associated with the zero-Jordan structure obtained in Algorithm 4. These paths are used to construct the upper block echelon TN matrix U.

Procedure 1

Given the triple (nrp)-realizable, the sequence of the first p-indices \(H=\{1,i_2,\ldots ,i_p\}\), the number s of the consecutive first indices, and the number x of the zero-Jordan structures obtained in Algorithm 4, then the following steps obtain all paths of pairs, \(P_z=\{(i,j)\}, \ z=1,2,\ldots \) associated with these zero-Jordan structures.

  1. 1.

    For \(t=s,s+1,\ldots ,p-s\), obtain the subsets \(I_t\), \(J_t\), formed by the inputs i and j respectively, where \(i_t < i \le i_{t+1}\) and \(i_{t+1} \le j < i_{t+2}\), being \(i_1=s\) and \(i_{p+1}=n+1\).

  2. 2.

    Calculate \(b=r-s\), that is, the number of pairs of each path, \(P_z=\{(i,j)\}, \ z=1,2,\ldots \) and let \((i_k,j_k)\) be the last pair of \(P_z\).

  3. 3.

    Obtain the pairs (ij) matching the inputs of \(I_t\) with its corresponding \(J_t\), \(t=s,s+1,\ldots ,p-s\) in order of appearance. If the number of pairs obtained is greater than or equal to b then,

    1. 3.1.

      choose the pairs whose \(j \in H\);

    2. 3.2.

      choose the \(r-p\) pairs from the rest, in ascending order of i;

    3. 3.3.

      order the pairs (ij) in ascending order of i;

    4. 3.4.

      obtain \(P_1=\{(i,j)\}\) and go Step 10.

  4. 4.

    Obtain the pairs (ij) matching the inputs in order of appearance. In this case the inputs of \(I_t\) can match with its corresponding \(J_t\) or with \(J_{t+1}\), \(t=s,s+1,\ldots ,p-s\). If the number of pairs obtained is greater than or equal to b then construct the path \(P_2=\{(i,j)\}\) following Steps 3.1-3.3 and go Step 10.

  5. 5.

    \(z=2\). For \(f=s+2,\ldots ,p-s\),

    1. 5.1.

      \(P=P_z\);

    2. 5.2.

      set the pairs of P, (ij), with \(j= i_{s+1},\ldots i_f\);

    3. 5.3.

      obtain the rest of the pairs from \((i,i_f)\) replacing (ij) by \((i,j+1)\), taking into account that the pairs whose \(j \in H\) must be;

    4. 5.4.

      if \(j_k \le n\) then \(z=z+1\), obtain \(P_z=\{(i,j)\}\) and go Step 10;

    5. 5.5.

      if \(j_k > n\) then go Step 6;

  6. 6.

    For \(f=s+2,\ldots ,p-s\),

    1. 6.1.

      obtain the pairs \((i,j)=(s+1,i_{s+1}),(s+2,i_{s+2}),\ldots ,(f,i_f)\);

    2. 6.2.

      obtain the rest of the pairs from \((f,i_f)\) in ascending order of i and j, taking into account that the pairs whose \(j \in H\) must be;

    3. 6.3.

      if \(j_k \le n\) then obtain \(P_z=\{(i,j)\}, \ z=3,4,\ldots \) and go Step 10;

    4. 6.4.

      if \(j_k > n\) then go Step 7.

  7. 7.

    Draw a diagram from \(P_2\), similar to the Hasse diagram (see [12]), according to these rules:

    1. (a)

      two inputs i and j are joined by an edge if and only if there exists a path from i to j;

    2. (b)

      remove directions on edges assuming that they are oriented downwards. So, if \(i < j\), then the vertex i appears above the vertex j.

    If \(n-j_k \ge 0\), then for \(l=1,2, \ldots , n-j_k+1\),

    1. 7.1.

      set the first pair of \(P_2\), \((s+1,i_{s+1})\), and draw a new diagram with the rest of pairs of \(P_2\) replacing j by \(j+l\);

    2. 7.2.

      if the new edges cause that a vertex \(j \in H\) is not visited, then remove the new edge \((i,j+l)\) and recover the old edge (ij);

    3. 7.3.

      if \(i_k \le i_p\) and \(j_k \le n\) then obtain \(P_z=\{(i,j)\}, \ z=3,4,\ldots \) and go Step 10.

  8. 8.

    Select the first pair of subsets \(I_t, \ J_t, \ t=s,s+1,\ldots ,p-s\) where the number of inputs of \(I_t\) is less than the number of inputs of its corresponding \(J_t\) and

    1. 8.1.

      for all \(P_z\), \(z=1,2,\ldots \) obtained in previous Steps, match the inputs of \(I_t\) with other inputs of its corresponding \(J_t\), taking into account that the pairs whose \(j \in H\) cannot be modified and each j must be greater than its equivalent j in \(P_z\);

    2. 8.2.

      obtain \(P_z=\{(i,j)\}, \ z=3,4,\ldots \) and go Step 10.

  9. 9.

    Use the diagram for \(P_2\) obtained in Step 7,

    1. 9.1.

      denoted by \(a_m\), \(m=1,2,\ldots \) the vertices that are at the bottom of the diagram and choose \(a_m \le i_p\);

    2. 9.2.

      denoted by \(b_m\), \(m < b_m\), \(m=1,2,\ldots \), the vertices that do not appear in the diagram;

    3. 9.3.

      create the pairs \((a_m,b_m), \ a_m < b_m\) that preserve the ascending order of the path;

    4. 9.4.

      choose the pairs in the diagram such that \(j\notin H\) and replace each pair by \((a_m,b_m)\), \(m=1,2,\ldots \);

    5. 9.5.

      obtain \(P_z=\{(i,j)\}, \ z=3,4,\ldots \) and go Step 10.

  10. 10.

    Create the sets \(I_{P_z}\) and \(J_{P_z}\), for each path \(P_z =\{(i,j)\}, \ z=1,2,\dots \), such that \(I_{P_z}\) is made up of the inputs \(i \notin H\) and the input i replaced in Step 9.4, and \(J_{P_z}\) is made up of the inputs \(j \notin H\).

  11. 11.

    For the paths \(P_1=\{(i,j)\}\) obtained in Step 3 and its modified path obtained in Step 8, create a partition \(\textit{P}(I_{P_z}), \ \textit{P}(J_{P_z})\), (see [3]).

  12. 12.

    Match the inputs of \(I_{P_z}\) with \(J_{P_z}\), or \(\textit{P}(I_{P_z})\) with \(\textit{P}(J_{P_z})\), in order of appearance, taking into account that,

    1. (a)

      the pair \((i,j), \ i < j\), does not appear in its associated \(P_z\);

    2. (b)

      each j is greater than its equivalent j in \(P_z\);

    3. (c)

      if \(I_{P_z}\) has more inputs than \(J_{P_z}\) match the last inputs of \(I_{P_z}\) with the last input of \(J_{P_z}\) satisfying the above conditions;

    4. (d)

      if there is a replacement and the replaced entry \(i \in I_{P_z}\), then this input and the previous one match with the same j; in this case there are two paths, one with each pair;

    5. (e)

      if there is a replacement and the replaced entry \(i \notin I_{P_z}\), then the front and back inputs of replaced i match with the same j; in this case there are two paths, one with each pair.

  13. 13.

    Draw diagrams with the obtained pairs. The length of each branch in the diagram is the size of the zero Jordan blocks. Choose the diagram that makes the chain longer.

  14. 14.

    There are \(n-r\) zero Jordan blocks. Complete them with ones until reaching \(n-p\) and obtain the zero-Jordan structure \(S_c, \ c=1,2,\ldots \).

  15. 15.

    If the number of \(S_c\) is equal to x, then stop this Procedure. You can check that \(S_c\) are the same than zero-Jordan structure obtained in Algorithm 4.

  16. 16.

    If the number of \(S_c\) is not equal to x, then continue this Procedure. Go back at the Step where you left it.

Remark 4

We can use Procedure 1 when the first indices of H are consecutive. If we apply Theorem 1 then we use Procedure 1 with \(s=1\).

Next, we give an example to clarify Procedure 1.

Fig. 1
figure 1

Diagram from \(P_2\)

Fig. 2
figure 2

Diagram when \(l=1\).    Diagram when \(l=2\)

Example 4

Given the triple (17, 13, 7)-realizable, the sequence of the first p-indices, \(H=\{1, 3, 6, 8, 10, 12, 15\}\) and the number \(x=9\) of the zero-Jordan structures applying Algorithm 4, then we obtain all paths of pairs, \(P_z=\{(i,j)\}\), \(z=1,2,\ldots \) associated with these zero-Jordan structures.

  1. 1.

    For \(t=1,2,3,4,5,6\), we have

  2. 2.

    \(b=r-s=12\) and \((i_k,j_k)\) is the last pair of \(P_z\).

  3. 3.

    Obtain (2, 3), (3, 4), (4, 6), (5, 7), (7, 8), (8, 9), (9, 10), (10, 11), (11, 12), (12, 13), (13, 15), (14, 16), (15, 17).

    Number of pairs \(13>b=12\), choose 7 pairs such that \(j \in H\) and \(r-p=13-7=6\) pairs from the rest.

    $$\begin{aligned} \begin{array}{l} P_1=\{(2,3),(3,4),(4,6),(5,7),(7,8),(8,9),(9,10), (10,11),(11,12),\\ (12,13),(13,15),(14,16)\}. \end{array} \end{aligned}$$
  4. 4.

    Obtain (2, 3), (3, 4), (4, 6), (5, 7), (6, 8), (7, 9), (8, 10), (9, 11), (10, 12), (11, 13), (12, 14), (13, 15). Number of pairs \(12=b\).

    $$\begin{aligned} \begin{array}{l} P_2=\{(2,3),(3,4),(4,6),(5,7),(6,8),(7,9),(8,10),(9,11),(10,12),\\ (11,13),(12,14),(13,15)\}. \end{array} \end{aligned}$$
  5. 5.

    \(z=2\). For \(f=3,4,5,6\),

    \(P=P_2\)

    $$\begin{aligned} f=3 \rightarrow \left\{ \begin{array}{cl} 5.1 &{} (2,\,3),\,(3,\,4),\,(4,\,6) \\ 5.2. &{} (5,\,8),\,(6,\,9),\,(7,\,10),\,(8,\,11),\,(9,\,12),\,(10,\,13),\,(11,\,14),\,(12,\,15),\,(13,\,16) \\ &{} j_k=16<n=17. \end{array} \right. \end{aligned}$$
    $$\begin{aligned} \begin{array}{l} P_3=\{(2,3),(3,4),(4,6),(5,8),(6,9),(7,10),(8,11),(9,12),(10,13),\\ (11,14),(12,15),(13,16)\}. \end{array} \end{aligned}$$

    \(P=P_3\),

    $$\begin{aligned} f=4 \rightarrow \left\{ \begin{array}{cl} 5.1 &{} (2,\,3),\,(3,\,4),\,(4,\,6),\,(5,\,8) \\ 5.2. &{} (6,\,10),\,(7,\,11),\,(8,\,12),\,(9,\,13),\,(10,\,14),\,(11,\,15),\,(12,\,16),\,(13,\,17) \\ &{} j_k=16<n=17. \end{array} \right. \end{aligned}$$
    $$\begin{aligned} \begin{array}{l} P_4=\{(2,3),(3,4),(4,6),(5,8),(6,10),(7,11),(8,12),(9,13),(10,14),\\ (11,15),(12,16),(13,17)\}. \end{array} \end{aligned}$$

    \(P=P_4\),

    $$\begin{aligned} f=5 \rightarrow \left\{ \begin{array}{cl} 5.1 &{} (2,\,3),\,(3,\,4),\,(4,\,6),\,(5,\,8),\,(6,\,10) \\ 5.2. &{} (7,\,12),\,(8,\,13),\,(9,\,14),\,(10,\,15),\,(11,\,16),\,(12,\,17),\,(13,\,18) \\ &{} j_k=18>n=17 \rightarrow \ \mathrm {Stop} \ \mathrm {item} \ 5. \end{array} \right. \end{aligned}$$
  6. 6.

    For \(f=3,4,5,6\),

    $$\begin{aligned} f=3 \rightarrow \left\{ \begin{array}{cl} 6.1 &{} (2,\,3),\,(3,\,6) \\ 6.2. &{} (4,\,7),\,(5,\,8),\,(6,\,9),\,(7,\,10),\,(8,\,11),\,(9,\,12),\,(10,\,13),\,(11,\,14),\,(12,\,15),\,(13,\,16) \\ &{} j_k=16<n=17. \end{array} \right. \end{aligned}$$
    $$\begin{aligned} \begin{array}{l} P_5=\{(2,3),(3,6),(4,7),(5,8),(6,9),(7,10),(8,11),(9,12),(10,13),\\ (11,14),(12,15),(13,16)\}. \end{array} \end{aligned}$$
    $$\begin{aligned} f=4 \rightarrow \left\{ \begin{array}{cl} 6.1 &{} (2,\,3),\,(3,\,6),\,(4,\,8) \\ 6.2. &{} (5,\,9),\,(6,\,10),\,(7,\,11),\,(8,\,12),\,(9,\,13),\,(10,\,14),\,(11,\,15),\,(12,\,16),\,(13,\,17) \\ &{} j_k=17=n. \end{array} \right. \end{aligned}$$
    $$\begin{aligned} \begin{array}{l} P_6=\{(2,3),(3,6),(4,8),(5,9),(6,10),(7,11),(8,12),(9,13),(10,14),\\ (11,15),(12,16),(13,17)\}. \end{array} \end{aligned}$$
    $$\begin{aligned} f=5 \rightarrow \left\{ \begin{array}{cl} 6.1 &{} (2,\,3),\,(3,\,6),\,(4,\,8),\,(5,\,10) \\ 6.2. &{} (6,\,11),\,(7,\,12),\,(8,\,13),\,(9,\,14),\,(10,\,15),\,(11,\,16),\,(12,\,17),\,(13,\,18) \\ &{} j_k=18>n=17 \rightarrow \ \mathrm {Stop} \ \mathrm {item} \ 6. \end{array} \right. \end{aligned}$$
  7. 7.

    Draw a diagram from \(P_2\) given in Fig. 1. \(j_k=15\), \(n=17-j_k=17-15=2\). For \(l=1,2,3\),

    1. l =1

      We obtain Fig. 2a. The vertex (4, 7) causes that \(j=6 \in H\) is not visited, then remove (4, 7) and recover (4, 6). As \(i_k=12<i_p=15\) and \(j_k=16<n=17\) then

      $$\begin{aligned} \begin{array}{l} P_7=\{(2,3),(3,5),(4,6),(5,8),(6,9),(7,10),(8,11),(9,12),(10,13),\\ (11,14),(12,15),(13,16)\}. \end{array} \end{aligned}$$
    2. l =2

      We obtain Fig. 2b. As \(i_k=13<i_p=15\) and \(j_k=17=n\) then

      $$\begin{aligned} \begin{array}{l} P_8=\{(2,3),(3,6),(4,8),(5,9),(6,10),(7,11),(8,12),(9,13),(10,14),\\ (11,15),(12,16),(13,17)\}. \end{array} \end{aligned}$$
    3. l =3

      Last pair is (13, 18). Then \(j_k=18>n=17\) and \(P_z\) does not exist.

  8. 8.

    Select \(I_1=\{2,3\}\) and \(J_1=\{3,4,5\}\). To reduce the example, we only obtain the paths \(P_z\) whose zero-Jordan structure are different from the obtained previously. In this case, \(P_9\) and \(P_{10}\) are obtained from \(P_1\) and \(P_2\), respectively.

    $$\begin{aligned} \begin{array}{l} P_9=\{(2,3),(3,5),(4,6),(5,7),(7,8),(8,9),(9,10), (10,11),(11,12),\\ (12,13),(13,15),(14,16)\}.\\ P_{10}=\{(2,3),(3,5),(4,6),(5,7),(6,8),(7,9),(8,10), (9,11),(10,12),\\ (11,13),(12,14),(13,15)\}. \end{array} \end{aligned}$$
  9. 9.

    \(a_1=14<i_p=15\); \(a_2=15=i_p\); \(b_1=16\), \(b_2=17\); new pairs: (14, 16), (14, 17), (15, 16), (15, 17); old pairs: (3, 4), (5, 7), (7, 9), (9, 11), (11, 13), (12, 14). To reduce the example, we only write \(P_{16}\) which zero-Jordan structure is different from the obtained previously.

    $$\begin{aligned} \begin{array}{l} P_{16}=\{(2,3),(3,4),(4,6),(5,7),(6,8),(7,9),(8,10), (10,12),(11,13),\\ (12,14),(13,15),(14,16)\}. \end{array} \end{aligned}$$

We only calculate S from the paths \(P_z\) obtained previously.

  1. 10-16.

    \(n-p= 10\), \(n-r = 4\).

In each case, the diagram is given in Figs. 3, 4 and 5.

Number of \(S_c=1 \ne 9=x\).

Number of \(S_c=2 \ne 9=x\).

Number of \(S_c=3 \ne 9=.x\)

Number of \(S_c=4 \ne 9=x\).

Number of \(S_c=5 \ne 9=x\).

Number of \(S_c=6 \ne 9=x\).

Number of \(S_c=7 \ne 9=x\).

Number of \(S_c=8 \ne 9=x\).

Number of \(S_c=9 = x\). Stop Procedure.

Fig. 3
figure 3

Diagram for \(P_1\). Diagram for \(P_2\).    Diagram for \(P_3\)

Fig. 4
figure 4

Diagram for \(P_4\).    Diagram for \(P_5\). Diagram for \(P_8\)

Fig. 5
figure 5

Diagram for \(P_9\). Diagram for \(P_{10}\).    Diagram for \(P_{16}\)

We use the paths \(P_z=\{(i,j)\}, \ z=1,2,\ldots \) obtained in Procedure 1 to construct an upper block echelon TN matrix \(U \in {\mathbb {R}}^{n \times n}\) with \(\text{ rank }(U) = r\), \(p\text{-rank }(U)=p\), \(H=\{1,i_2,\ldots ,i_p\}\) as the sequence of its first p-indices and \(S=(s_1,s_2,\ldots ,s_{n-r})\) as the Segre characteristic corresponding to its zero eigenvalue. We calculate U using Algorithm 5 (which is a generalization of [7,  Algorithm 2] where the Segre characteristic is not prescribed).

The inputs of Algorithm 5 are the triple (nrp), the sequence of the first p-indices \(H=\{1,i_2,\ldots ,i_p\}\) and a two column matrix Pz given by the inputs i and j of each path \(P_z\).

figure e

Example 5

Consider the triple (9, 7, 5) (1, 2, 3, 5, 7)-realizable. We can use two methods to obtain an upper block echelon TN matrix \(U \in {\mathbb {R}}^{9 \times 9}\) with \(\text{ rank }(U) = 7\), \(p\text{-rank }(U)=5\), \(H=\{1, 2, 3, 5, 7\}\) as the sequence of its first 5-indices and \(S=(3,1)\) as the Segre characteristic corresponding to its zero eigenvalue.

First, by Procedure 1 we obtain \(Pz=P_{1}=\{(4,5), (5,6), (6,7), (7,8) \}\) and \(S=(3,1)\). Applying Algorithm 5 we obtain

$$\begin{aligned} U=\left[ \begin{array}{ccccccccc} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ 0 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ 0 &{} 0 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 2 &{} 2 &{} 2 &{} 2 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 1 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 2 &{} 2 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \end{array} \right] . \end{aligned}$$
(5)

Note that if we use Theorem 1, we reduce the problem to the triple (7, 5, 3) (1, 3, 5)-realizable and applying Theorem 3 we obtain the same result.

Remark 5

By using the matrix U calculated in this section, we obtain some matrices associated with this triple and with one of the zero-Jordan structure obtained in Sect. 3. For that, we consider the ITN matrices presented in Sect. 1 and the totally nonpositive matrices, denoted as t.n.p., given in [7].

Recall that a matrix \(A \in {\mathbb {R}}^{n \times n}\) is called type-I t.n.p. matrix if all its minors are nonpositive and \(-a_{11} <0\) and it is called type-II t.n.p. matrix if all its minors are nonpositive, \(a_{11} =0\), \(-a_{12} <0\) and \(-a_{21} <0\).

In the same way as in ITN matrices, a triple (nrp) is called \((1,i_2,\ldots ,i_p)\)-negatively realizable of the type-I (type-II) if there exists a type-I (type-II) t.n.p. matrix \(A=(-a_{ij}) \in {\mathbb {R}}^{n \times n}\) with \(\text{ rank }(A)=r\), \(p\text{-rank }(A)=p\), and \(\{1, i_2, \ldots , i_p\}\) (\(i_2=2\)) as the sequence of its first p-indices.

We present Algorithm 5 to construct some matrices associated with the realizable triple (nrp). Concretely, we calculate an ITN matrix \(A_1\), a type-I t.n.p. matrix \(A_2\) and a type-II t.n.p. matrix \(A_3\) using the same matrix U obtained in Algorithm 5. All these matrices have the same sequence of its first p-indices and the same zero-Jordan structure (see [6, 7]).

figure f

Note that in Algorithm 5 we give a value to t, but in [7,  Proposition 8] we can see that t is a number such that satisfies \(t\ge \sum _{j=2}^{i_p} u_{jn}\).

Example 6

Consider the realizable triple (9, 7, 5) and \(H=\{1, 2,3, 5,7\}\) as the sequence of the first 5-indices. From the matrix U constructed in Example 5 and by Algorithm 5 we have the following matrices:

$$\begin{aligned} \begin{array}{ll} A_1=\left[ \begin{array}{ccccccccc} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1 &{} 1\\ 1 &{} 2 &{} 2 &{} 2 &{} 2 &{} 2 &{} 2 &{} 2 &{} 2\\ 1 &{} 2 &{} 3 &{} 3 &{} 3 &{} 3 &{} 3 &{} 3 &{} 3\\ 1 &{} 2 &{} 3 &{} 3 &{} 4 &{} 4 &{} 4 &{} 4 &{} 4\\ 1 &{} 2 &{} 3 &{} 3 &{} 5 &{} 6 &{} 6 &{} 6 &{} 6\\ 1 &{} 1 &{} 3 &{} 3 &{} 5 &{} 6 &{} 7 &{} 7 &{} 7\\ 1 &{} 1 &{} 3 &{} 3 &{} 5 &{} 6 &{} 8 &{} 9 &{} 9 \\ 1 &{} 1 &{} 3 &{} 3 &{} 5 &{} 6 &{} 8 &{} 9 &{} 9 \\ 1 &{} 1 &{} 3 &{} 3 &{} 5 &{} 6 &{} 8 &{} 9 &{} 9 \end{array} \right] , &{} A_2=\left[ \begin{array}{rrrrrrrrr} -17 &{} -17 &{} -17 &{} -17 &{} -17 &{} -17 &{} -17 &{} -17 &{} -17\\ -17 &{} -16 &{} -16 &{} -16 &{} -16 &{} -16 &{} -16 &{} -16 &{} -16\\ -17 &{} -16 &{} -15 &{} -15 &{} -15 &{} -15 &{} -15 &{} -15 &{} -15\\ -17 &{} -16 &{} -15 &{} -15 &{} -14 &{} -14 &{} -14 &{} -14 &{} -14\\ -17 &{} -16 &{} -15 &{} -15 &{} -13 &{} -12 &{} -12 &{} -12 &{} -12\\ -17 &{} -16 &{} -15 &{} -15 &{} -13 &{} -12 &{} -11 &{} -11 &{} -11\\ -17 &{} -16 &{} -15 &{} -15 &{} -13 &{} -12 &{} -10 &{} -9 &{} -9\\ -17 &{} -16 &{} -15 &{} -15 &{} -13 &{} -12 &{} -10 &{} -9 &{} -9\\ -17 &{} -16 &{} -15 &{} -15 &{} -13 &{} -12 &{} -10 &{} -9 &{} -9 \end{array} \right] , \\ \\ A_3=\left[ \begin{array}{rrrrrrrrr} 0 &{} -1 &{} -1 &{} -1 &{} -1 &{} -1 &{} -1 &{} -1 &{} -1\\ -8 &{} -8 &{} -8 &{} -8 &{} -8 &{} -8 &{} -8 &{} -8 &{} -8\\ -8 &{} -7 &{} -6 &{} -6 &{} -6 &{} -6 &{} -6 &{} -6 &{} -6\\ -8 &{} -7 &{} -6 &{} -6 &{} -5 &{} -5 &{} -5 &{} -5 &{} -5\\ -8 &{} -7 &{} -6 &{} -6 &{} -4 &{} -3 &{} -3 &{} -3 &{} -3\\ -8 &{} -7 &{} -6 &{} -6 &{} -4 &{} -3 &{} -2 &{} -2 &{} -2\\ -8 &{} -7 &{} -6 &{} -6 &{} -4 &{} -3 &{} -1 &{} 0 &{} 0 \\ -8 &{} -7 &{} -6 &{} -6 &{} -4 &{} -3 &{} -1 &{} 0 &{} 0 \\ -8 &{} -7 &{} -6 &{} -6 &{} -4 &{} -3 &{} -1 &{} 0 &{} 0 \end{array} \right] .&\end{array} \end{aligned}$$
  • \(A_1\) is an ITN matrix associated with the triple (9, 7, 5) (1, 2, 3, 5, 7)-realizable with the Segre characteristic \(S=(3,1)\).

  • \(A_2\) is a t.n.p. matrix associated with the triple (9, 7, 5) (1, 2, 3, 5, 7)-negatively realizable of the type-I with the Segre characteristic \(S=(3,1)\).

  • \(A_3\) is a t.n.p. matrix associated with the triple (9, 7, 5) (1, 2, 3, 5, 7)-negatively realizable of the type-II with the Segre characteristic \(S=(3,1)\).