-- Apr 17 In-Class Exercise
If a language L belongs to NP then there exists a two-input p-time algorithm A and constant c such that L={x∈{0,1}*:∃y,|y|=O(|x|^c) and A(x,y)=1}. For an input of length n, it takes O(2^n) time to get all the guesses for polynomial verification algorithm. For all k many inputs, it takes O((2^n)^k) = O(2^(nk)), since nk <= n^k, therefore 2^(nk) <= 2^(n^k) or NP⊆EXP.
L={⟨e,x,1^t⟩∣t<2^n^logn and e is the code of java program such that on input x, e runs for less than t steps} . This is not in EXP but runs in O(2^2^n) time.
(
Edited: 2019-05-14)
If a language L belongs to NP then there exists a two-input p-time algorithm A and constant c such that L={x∈{0,1}*:∃y,|y|=O(|x|^c) and A(x,y)=1}. For an input of length n, it takes O(2^n) time to get all the guesses for polynomial verification algorithm. For all k many inputs, it takes O((2^n)^k) = O(2^(nk)), since nk <= n^k, therefore 2^(nk) <= 2^(n^k) or NP⊆EXP.
L={⟨e,x,1^t⟩∣t<2^n^logn and e is the code of java program such that on input x, e runs for less than t steps} . This is not in EXP but runs in O(2^2^n) time.