{'fraction_non_alphanumeric': 0.022944550669216062, 'fraction_numerical': 0.0038240917782026767, 'mean_word_length': 4.038461538461538, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, '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}}
The Gale-Ryser theorem modulo k

The Gale-Ryser theorem determines when there exists a (0, 1)-matrix with prescribed row and column sum vectors R and S, respectively. We consider a mod k analogue of this theorem and give an algorithm for existence and construction of a matrix with prescribed R and S mod k. A necessary condition for existence is that the sum of the entries of R and the sum of the entries of S are congruent mod k. We show that if the size of the matrix is large enough, this condition is also sufficient.