Originally Posted By: ngswamy
Prove that n^2 is a proper complexity function:
We need to satisfy two property:
* f is nondecreasing
* there is a deterministic TM M that when started with x on the input tape, runs for t=O(|x|+f(|x|)) steps, uses at most O(f(|x|)) space, and outputs to an output tape the string I^f(|x|)
We know that n^2 is a non-decreasing function
For the second property, create a machine M, which takes input n and outputs n^2 using n^2 space on the tape and takes O(|n| + f(|n|)) steps:The machine works as follows:
1.Replace the first two inputs of n with A (if the input length n is 1, then 1 will be replaced with A, and when it tries to replace the next A it will reach a space in which it will move on to replace the A back with 1 and then accepts).
2. Then read each input from the original input moving right from A on the tape. If you read an A or a 1 on the original input, move to the left of the first A and when you read an empty spot, mark down a one. (As you read each symbol from the original input you should replace it with A or 1, depending on whether it is an A or a 1 so that you know where you left off.)
3. After that, move to the right most A and if you read a 1, replace it with an A and repeat the second step. Keep doing this until you reach a empty space on the right side of the tape.
4. Once you reach the empty space on the right side of the tape, go back and replace any A with a 1. Then move to the right until you read an empty space, and then accept.
State the deterministic time hierarchy theorem as presented in class:
If f(n)>=n is a proper complexity function, then the class TIME(f(n)) is strictly contained in TIME(f(2n+1)^3).
Richelle Limun
James Yu
Cameron Taslim
Nanda Guruswamy
'''Originally Posted By: ngswamy'''
Prove that n^2 is a proper complexity function: <br><br>We need to satisfy two property:<br>* f is nondecreasing<br>* there is a deterministic TM M that when started with x on the input tape, runs for t=O(|x|+f(|x|)) steps, uses at most O(f(|x|)) space, and outputs to an output tape the string I^f(|x|)<br><br>We know that n^2 is a non-decreasing function<br><br>For the second property, create a machine M, which takes input n and outputs n^2 using n^2 space on the tape and takes O(|n| + f(|n|)) steps:The machine works as follows:<br><br>1.Replace the first two inputs of n with A (if the input length n is 1, then 1 will be replaced with A, and when it tries to replace the next A it will reach a space in which it will move on to replace the A back with 1 and then accepts). <br>2. Then read each input from the original input moving right from A on the tape. If you read an A or a 1 on the original input, move to the left of the first A and when you read an empty spot, mark down a one. (As you read each symbol from the original input you should replace it with A or 1, depending on whether it is an A or a 1 so that you know where you left off.)<br>3. After that, move to the right most A and if you read a 1, replace it with an A and repeat the second step. Keep doing this until you reach a empty space on the right side of the tape.<br>4. Once you reach the empty space on the right side of the tape, go back and replace any A with a 1. Then move to the right until you read an empty space, and then accept. <br><br>State the deterministic time hierarchy theorem as presented in class:<br>If f(n)>=n is a proper complexity function, then the class TIME(f(n)) is strictly contained in TIME(f(2n+1)^3). <br><br>Richelle Limun<br>James Yu<br>Cameron Taslim<br>Nanda Guruswamy