-- Apr 12 In-Class Exercise
• DFA has K states where K is a constant: this requires a fixed amount of memory, which is in O(log(n))
• Parenthesis Language is in LOGSPACE, because all one needs to do is count parenthesis (adding or subtracting one at each symbol), and counting takes O(log(n))
• A stack is required to keep track of arbitrary symbols, and a stack can grow linearly, which is larger than LOGSPACE
• DFA has K states where K is a constant: this requires a fixed amount of memory, which is in O(log(n))
• Parenthesis Language is in LOGSPACE, because all one needs to do is count parenthesis (adding or subtracting one at each symbol), and counting takes O(log(n))
• A stack is required to keep track of arbitrary symbols, and a stack can grow linearly, which is larger than LOGSPACE