Help for this page

Select Code to Download


  1. or download this
    sub rank {
        my @comb = sort { $a <=> $b } @_;
        sum map { binomial( $comb[$_]-1, $_+1 ) } 0 .. $#comb;
    }
    
  2. or download this
      binomial(X,2)+binomial(Y,1) = X(X-1)/2 + Y