{'fraction_non_alphanumeric': 0.017223910840932118, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 4.744186046511628, '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}}
Eliminating Switching Components in Binary Matrices by 0-1 Flips and Column Permutations

Analysis of patterns in binary matrices plays a vital role in numerous applications of computer science. One of the most essential patterns of such matrices are the so called switching components, where the number and location of the components gives valuable information about the binary matrix. One way to measure the effect of switching components in a binary matrix is counting the number of 0-s which have to be replaced with 1-s in order to eliminate the switching components. However, finding the minimal number of 0-1 flips is generally an NP-complete problem. We present two novel-type heuristics for the above problem and show via experiments that they outperform the formerly proposed ones, both in optimality and in running time. We also show how to use those heuristics for determining the so-called nestedness level of a matrix, and how to use the flips for binary image compression.