JavaScript is disabled for your browser. Some features of this site may not work without it.

## Permutations and the APL Grade Down Function

#####
**Author**

Cammack, L.; Schrag, G.

#####
**Abstract**

The APL gradeup (gradedown) function (denoted by $\uparrow \{respectively \downarrow \}$) aapplied to a vector $v \in R^{n}$ `grades' the elements of $v$ in ascending (descending) order. (Among equal elements of $v$ the ranking is determined by their position). For example, if $v=(2.3,4.7,6.8,0.6,3.7,4.7)$ then $\uparrow v$ is (4,1,5,2,6,3) and $\downarrow v$ is (3,2,6,5,1,4). An immediate consequence of the versatility of this functional form is that the expression $v[\uparrow v] (v[\downarrow v])$ `sorts' the elements of $v$ in ascending (descending) order. The question of characterizing all vectors $v \in R^{n}$ such that $\uparrow v=v$ was answered in a paper by Cooper, Best and Kennedy [see Cooper, et al.(1)]. The results there are essentially determined by scrutinizing the selection property of $\uparrow v$; that is, if $v=(x_{1}, x_{2},\ldots, x_{n})$ then $\uparrow v$ can be visualized as the unique permutation $P \in S_{n}$ such that $x_{P(1)},x_{P(2),\ldots,x_{P(n)$ is a list of the elements f $v$ in ascending order. Two straightforward consequences of this interpretation are: 1) if $P \in S_{n}$, then $\uparrow P$ is the inverse of $P$ and 2) the `fixed' points of the mapping $\uparrow$ are precisely the involutions of $S_{n}$. IN this note we continue this investigation for the gradedown function and also resolve the open questions posed in that paper.

#####
**Date Issued**

1980-06#####
**Publisher**

Cornell University

#####
**Subject**

computer science; technical report

#####
**Previously Published As**

http://techreports.library.cornell.edu:8081/Dienst/UI/1.0/Display/cul.cs/TR80-428

#####
**Type**

technical report