HCR's Rank formula 2 (to calculate rank of any linear permutation when the repetition of articles is allowed)