The Non-Deterministic Time Hierarchy Theorem asserts that there exist languages that are computable in non-deterministic polynomial time (NP) but not in non-deterministic time O(f(n)) for any function f(n) that is subquadratic in the input size n. Here, we will sketch a proof of the special case where we show that NTIME(n) does not equal NTIME(n^2) by constructing a language in NTIME(n^2) that is not in NTIME(n).
Let us consider the language L = {w : w is a palindrome of length 4m, where m is a non-negative integer}. In other words, L is the set of words of length 4m that read the same when read forward and backward.
We will design a non-deterministic algorithm for L that runs in O(n^2) time. The algorithm will use a two-dimensional array D[i][j] to store the substring of the input string from the i-th to the j-th position, for 1 <= i <= j <= 4m. The array D will be initialized with the actual substring of the input string.
The algorithm will then perform a nested loop to check whether the input string is a palindrome or not. In each iteration, the algorithm will guess the center point c of the palindrome (i.e., the middle point of the palindrome). The outer loop will iterate from 1 to 2m+1, i.e., from the left to the right end of the palindrome, while the inner loop will iterate from c to c on the opposite side. If the substrings of the input string from both sides of the center point match, the algorithm will accept the input.
The running time of this algorithm is O(n^2). The outer loop iterates 2m+1 times while the inner loop iterates at most 2m+1 times.
We will now prove that this algorithm is optimal, i.e., any non-deterministic algorithm for L that runs in O(n) time cannot exist. We will use a diagonalization argument to prove this.
Suppose, for a contradiction, that there is an algorithm A' that accepts L in O(n) time. By a diagonalization argument, we can construct an input string w of length 4m such that w is not accepted by A' in O(n) time, but it is accepted by our algorithm in O(n^2) time.
The construction of the input string w will be as follows. First, we will construct a string w(i) of length 4m for every integer i between 1 and m. Each string w(i) will be a palindrome of length 4m with the center point at position 2i. Next, we will concatenate these strings to form the input string w.
Now, we will show that our algorithm accepts w in O(n^2) time, while A' does not accept w in O(n) time. Our algorithm accepts w because it correctly guesses the center point for each string w(i) and accepts them all. On the other hand, A' might make a wrong guess for some w(i)'s and fail to accept w in O(n) time.
In summary, we have shown that there is a language L in NTIME(n^2) that is not in NTIME(n), thereby proving the Non-Deterministic Time Hierarchy Theorem for this special case.