On this page:
1 Big-O Practice
2 Brute-Force Attacking
3 NFA->DFA Running Time
4 E_  DFA Running Time
5 Kleene

Homework 8

Last updated: Wed, 10 Nov 2021 23:47:13 -0500

Out: Thu Nov 11, 00:00 EST Due: Wed Nov 17, 23:59 EST

This assignment begins to explore time complexity.

Homework Problems

  1. Big-O Practice (6 points)

  2. Brute-Force Attacking (2 + 2 = 4 points)

  3. NFA->DFA Running Time (10 points)

  4. E_DFA Running Time (8 points)

  5. Kleene (5 + 5 = 10 points)

  6. README (2 point)

Total: 40 points

Submitting

Submit your solution to this assignment in Gradescope hw8. Please assign each page to the correct problem.

A submission must include a README containing the required information, in addition to the solution to the problems.

1 Big-O Practice

Answer true or false for each statement below.

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

  1. 10n+1 = O(n)

  2. 10n+1 = O(n^3)

  3. 10n^4+n^3 = O(n^3)

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

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

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

2 Brute-Force Attacking

Assume a website requires users to create a password that is drawn from the following alphabet (inspired by the password requirements for UMass Boston):

  1. What is the smallest upper bound on the number of potential passwords an attacker would have to guess to crack someone’s password? Give the answer in terms of the number of characters in the password n.

  2. Give answer to the first part using big-O notation.

3 NFA->DFA Running Time

In class, we learned about an algorithm to convert an NFA N = (Q_N,\Sigma,\delta_N,q_N,F_N) to an equivalent DFA D = (Q_D,\Sigma,\delta_D,q_D,F_D) (the same procedure is described in Sipser Theorem 1.39), and we used this procedure to prove decidability of several languages.

Compute the running time of this NFA->DFA algorithm. (You may use the simpler version that assumes that N has no \varepsilon transitions.) Express your answer using big-O notation in terms a variable n = |Q_N| representing the number of states in the NFA.

Structure your solution according to the components of the NFA. In other words, your solution should say how many steps it takes to compute Q_D from Q_N, how many steps it takes to compute \delta_D from \delta_N, etc.

4 E_DFA Running Time

Show that E_\textsf{DFA}=\left\{\left\langle D\right\rangle\mid D\textrm{ is a }\textsf{DFA}\textrm{ where }L(D)=\emptyset\right\}\in\textbf{P}

5 Kleene

  1. Prove that decidable languages are closed under the Kleene star operation.

  2. Would the same proof as your above part 1 answer work to prove that \textbf{P} is closed under Kleene star? If not, adapt one of the poly time deciders presented in class to prove that \textbf{P} is closed under Kleene star.