(n + 1)!
(n - 1)!
= n² tn.
3. Prove that
Answers
Answered by
11
Answer:
This time complexity comes from NN-queen problem. There are many threads talking about the time complexity to be O(n!)O(n!) but I cannot figure out how we get it. Here is the progress I have so far:
T(n)=nT(n−1)+n2=n(n−1)T(n−2)+n(n−1)2+n2⋮=n!+n!+n(n−1)…22+n(n−1)…4∗32+⋯+n(n−1)2+n2T(n)=nT(n−1)+n2=n(n−1)T(n−2)+n(n−1)2+n2⋮=n!+n!+n(n−1)…22+n(n−1)…4∗32+⋯+n(n−1)2+n2
RHS and LHS divided by n!n!
T(n)n!=2+21!+32!+⋯+n−2(n−3)!
Answered by
1
Step-by-step explanation:
ques. (n+1)(n-1)=n²tn
=(n) ²-(1)²=n²tn
=n²-1=n²tn
=n²-1/n²=tn
Similar questions