Recurrence Relation for the Towers of Hanoi PowerPoint PPT Presentation

presentation player overlay
About This Presentation
Transcript and Presenter's Notes

Title: Recurrence Relation for the Towers of Hanoi


1
Recurrence Relation for the Towers of Hanoi
N No.Moves 1 1 2 3 3
7 4 15 5 31
Given T(1) 1 T(n) 2 T( n-1 ) 1
2
T(n) 2 T( n-1 ) 1
T(n) 2 1
T(n) 2 2 T(n-2) 1 1
T(n) 2 2 1 1
T(n) 2 2 2 T(n-3) 1 1 1
T(n) 2 2 2 2 T( n-4 ) 1 1 1 1
T(n) 24 T ( n-4 ) 15
. . .
T(n) 2k T ( n-k ) 2k - 1
Since n is finite, k -gt n. Therefore, lim T(n)
k -gt n 2n - 1
Write a Comment
User Comments (0)
About PowerShow.com