1)
T(n) = T(n-1) + 2 = T(n-2) + 2*2 = ..... = T(n-n) + n*2 = T(0) + 2n = 2n + 2
2)
T(n) = T(n-1) + 4n-3 = T(n-2) + 4[n + (n-1)] - 3*2 = ..... = T(n-n) + 4[n + (n-1) + ...... + 1] - 3*n
=T(0) + 4 * n*(n+1)/2 - 3n
= 2 + 2n(n+1) - 3n
= 2 + 2n^2 + 2n - 3n
= 2n2 - n + 2
NOTE: As per HOMEWORKLIB POLICY I am allowed to answer specific number of questions (including sub-parts) on a single post. Kindly post the remaining questions separately and I will try to answer them. Sorry for the inconvenience caused.
Find the closed form for each T(n given as a recurrence: 4 | T(m - 1)...
1. (25 points) Given the recurrence relations. Find T(1024). 2 T(n) = 2T(n/4) + 2n + 2 for n> 1 T(1) = 2
FOR ALGORITHM A WORST CASE TIME COMPLEXITY IS DESCRIBED BY RECURRENCE FORMULA T(n)= n/ T (n )thi T (c)=1 if c < 100 FOR ALGORITHM B WORST TIME COMPLEXITY IS DESCRIBED BY RECURRENCE FORMULA T(n) = 2T (2/2) + n/logn ; (c) = 1 fc 2100 WHICH ALGORITHM IS ASYMPTOTICALLY FASTER? WHY?
Use mathematical induction to show that when n is an exact power of 2, the solution of the recurrence: { if n 2 2 T(n) for k> 1 if n 2 T(n) 2T(n/2) is T(n) n log
3. Let T = {< M > | m accepts w" when it accepts w. }. Show T is undecidable.
##Solve for D only 19. Solve the following recurrence equations using the characteristic equation. (a) T(n) = 2T(5/+10g3 n T (1) =0 for n > 1, n a power of 3 (b) T(n) = 10T()+12 T (1) =0 for n > 1, n a power of 5 or nI, na power of 5 (c) nT (n) (n 1)T(n-1)+3 for n> 1 T(1) = 1 (d) nT(n) = 3 (n-1)T(n-1) _ 2 (n-2) T (n-2) +4" T (0) 0 T (1)...
12. Prove that if n >m then the number of m-cycles in Sis given by nn-1)(n-2)... (n-m+1)
Let α σ(t) with σ(t) = VG + and σο > 0. (i) Determine α such that for all t > 0 it follows Jooo dr |ψ(t,x)12-1. Remark: dyeV
2.5. Solve the following recurrence relations and give a Θ bound for each of them. (e) T(n) 8T(n/2) n (f) T(n) = 49T(n/25) + n3/2 log n (g) T(n) = T(n-1) + 2 (h) T(n) T(n 1)ne, where c 21 is a constant (i) T(n) = T(n-1) + c", where c > 1 is some constant (j) T(n) = 2T(n-1) + 1 (k) T(n) T(vn) +1
Recurrence equations using the Master Theorem: Characterize each of the following recurrence equations using the master method (assuming that T(n) = c for n < d, for constants c > 0 and d > = 1). T(n) = c for n < d, for constants c > 0 and d greaterthanorequalto 1). a. T(n) = 2T(n/2) + log n b. T(n) = 8T(n/2) + n^2 c. T(n)=16T(n/2) + (n log n)^4 d. T(n) = 7T(n/3) + n
Prove this using the definition R7: log(n*) is O(log n) for any fixed x > 0