{'fraction_non_alphanumeric': 0.02392947103274559, 'fraction_numerical': 0.005037783375314861, 'mean_word_length': 4.162337662337662, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Inversions in compositions of integers

A composition of the positive integer n is a representation of n as an ordered sum of positive integers n = a1 + a2 + … + am. It is well known that there are 2 n −1 compositions of n. An inversion in a composition is a pair of summands {ai,aj } for which i < j and a i > aj . The number of inversions of a composition is an indication of how far the composition is from a partition of n, which by convention uses a sequence of nondecreasing summands and has no inversions. We consider counting techniques for determining both the number of inversions in the set of compositions of n and the number of compositions of n with a given number of inversions. We provide explicit bijections to resolve several conjectures, and also consider asymptotic results.