next | previous | forward | backward | up | index | toc

# isPartialASM -- whether a matrix is a partial alternating sign matrix

## Synopsis

• Usage:
isPartialASM M
• Inputs:
• M, ,
• Outputs:

## Description

Given an integer matrix, checks that the matrix is a partial alternating sign matrix. A partial alternating sign matrix is a matrix with entries in $\{-1,0,1\}$ such that:

- The nonzero entries in each row and column alternate in sign,

- The first nonzero entry of any row or column (if there is one) is $1$.

 i1 : M = matrix{{0,0,1,0,0,0,0,0},{1,0,1,0,1,0,0,0},{0,0,0,1,-1,0,0,1},{0,0,1,-1,1,0,0,0},{0,0,0,0,0,0,1,0},{0,0,0,0,0,1,0,0},{0,1,-1,1,0,0,0,0},{0,0,1,0,0,0,0,0}} o1 = | 0 0 1 0 0 0 0 0 | | 1 0 1 0 1 0 0 0 | | 0 0 0 1 -1 0 0 1 | | 0 0 1 -1 1 0 0 0 | | 0 0 0 0 0 0 1 0 | | 0 0 0 0 0 1 0 0 | | 0 1 -1 1 0 0 0 0 | | 0 0 1 0 0 0 0 0 | 8 8 o1 : Matrix ZZ <-- ZZ i2 : isPartialASM M o2 = false i3 : N = matrix{{0,-1,0,1,1},{1,-1,1,-1,1},{0,1,1,0,-1},{1,1,-1,1,-1},{-1,1,0,0,1}} o3 = | 0 -1 0 1 1 | | 1 -1 1 -1 1 | | 0 1 1 0 -1 | | 1 1 -1 1 -1 | | -1 1 0 0 1 | 5 5 o3 : Matrix ZZ <-- ZZ i4 : isPartialASM N o4 = false

## Ways to use isPartialASM :

• isPartialASM(Matrix)

## For the programmer

The object isPartialASM is .