{'fraction_non_alphanumeric': 0.029005524861878452, 'fraction_numerical': 0.0013812154696132596, 'mean_word_length': 4.451127819548872, '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}}
A Gray Code for the Ideals of a Forest Poset

Abstract We present two algorithms for listing all the ideals of a forest poset. These algorithms generate ideals in a gray code manner; that is, consecutive ideals differ by exactly one element. Both algorithms use storage O(n), where n is the number of elements in the poset. On each iteration, the first algorithm does a partial traversal of the current ideal being listed and runs in time O(nN), where N is the number of ideals of the poset. The second algorithm mimics the first, but it eliminates the traversal and runs in time O(N). This algorithm has the property that the amount of computation between successive ideals is O(1); such algorithms are said to be loopless.