2. (10 pts) Let L = {w € {a,b}\whas the same number of a's and b's). Consider the fol- lowing algorithm that decides L.
Posted: Sat May 14, 2022 7:38 pm
2. (10 pts) Let L = {w € {a,b}\whas the same number of a's and b's). Consider the fol- lowing algorithm that decides L. 1/ = "In input w: 1. Scan across the tape until a a or b is found. 2. If none is found, accept. 3. If one is found, continue scanning until a matching b or a is found. b 4. If none is found, reject. 5. Otherwise, cross off that symbol and repeat." Using the Big-O notation, state the time complexity of each step of M, and the overall tir complexity of M.