On this page:
1 Big-O Exercises
2 Regular Languages are in P
3 More Closure Operations for Decidable Languages
4 Closure Operations for Poly Time Languages

Homework 10

Last updated: Tue, 26 Apr 2022 17:08:35 -0400

Out: Wed April 20, 00:00 EST Due: Tue April 26, 23:59 EST

This assignment begins to explore time complexity.

Homework Problems

  1. Big-O Exercises (6 points)

  2. Regular Languages are in P (8 points)

  3. More Closure Operations for Decidable Languages (3 + 3 + 3 = 9 points)

  4. Closure Operations for Poly Time Languages (6 + 6 + 6 = 18 points)

  5. README (1 point)

Total: 42 points

Submitting

Submit your solution to this assignment in Gradescope hw10. Please assign each page to the correct problem and make sure your solutions are legible.

A submission must also include a README containing the required information.

1 Big-O Exercises

Answer true or false for each statement below.

You may give an extra explanation if you think it would help clarify your answer.

  1. 1 = O(n)

  2. n = O(n)

  3. n^3 = O(n)

  4. 10^n = 2^{O(n)}

  5. n\log^2n = O(n^2)

  6. n\log^2n = 2^{O(n)}

2 Regular Languages are in P

Show that every regular language is in P.

3 More Closure Operations for Decidable Languages

Prove that each of the following operations are closed for decidable languages:

  1. \textrm{EITHER}(A,B) = \left\{w\mid w\in A\textrm{ or }w\in B\right\}

  2. \textrm{COMBINE}(A,B) = \left\{w\mid w = ab \textrm{ where } a\in A \textrm{ and } b\in B\right\}

  3. \textrm{REPEAT}(A) = \left\{w\mid w=x_1\ldots x_n, n\geq0\textrm{ and each }x_i\in A\right\}

4 Closure Operations for Poly Time Languages

For each of the solutions you came up with for the More Closure Operations for Decidable Languages problem above
  1. compute its run time, assuming that the initial languages are in \textbf{P},

  2. then explain whether that solution would also prove that the corresponding operation is closed for languages in \textbf{P},

  3. then for each operation, if the same solution cannot be re-used, come up with a new proof that the operation is closed for languages in \textbf{P}