Esempio n. 1
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings such that every prefix $x$ satisfies $|\#_0(x) - \#_1(x)| \le 2$."

    server_base.generate(data)
Esempio n. 2
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings containing 010 where the total number of 0s is divisible by 3."
    
    server_base.generate(data)
Esempio n. 3
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings containing 010 or containing at least three 1s."

    server_base.generate(data)
Esempio n. 4
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings not containing the substring 000."

    server_base.generate(data)
Esempio n. 5
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings in which the number of 0s is 2 mod 3."

    server_base.generate(data)
Esempio n. 6
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings in which every run of 0s has length at least 3."
    
    server_base.generate(data)
Esempio n. 7
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings in which 1 does not appear after a substring 000."
    
    server_base.generate(data)
Esempio n. 8
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "All binary strings containing at least two 0s and at least one 1."
    
    server_base.generate(data)
Esempio n. 9
0
def generate(data):
    data["params"]["hints"] = []

    data["params"]["language_description"] = \
        "The binary representations of all nonnegative integers divisible by 17. " \
        "(Leading 0s are allowed, and an empty string should be interpreted as 0.)"

    server_base.generate(data)
Esempio n. 10
0
def generate(data):
    data["params"]["hints"] = [
        "Create a DFA that accepts strings containing 010. "
        "Then, take the complement of that DFA."
    ]

    data["params"]["language_description"] = \
        "All binary strings not containing the substring 010."

    server_base.generate(data)
Esempio n. 11
0
def generate(data):
    data["params"]["hints"] = [
        "For what values of $n$ does the substring $000$ appear in $0^n$ an odd number of times?",
        "Consider the maximal blocks of 0s that appear in a string. For example, in $10001101110000100000$, "
        "the maximal blocks of 0s are $$1(000)11(0)111(0000)1(00000).$$"
        "Then, consider the number of occurrences of $000$ contributed by each block.",
        "Some of these blocks contribute an odd number of occurrences of $000$. We want those "
        "types of blocks to appear an even number of times."
    ]

    data["params"]["language_description"] = \
        "All binary strings in which the substring $000$ appears an even number of times."

    server_base.generate(data)