Recurrence Relation for the Towers of Hanoi - PowerPoint PPT Presentation

About This Presentation
Title:

Recurrence Relation for the Towers of Hanoi

Description:

Recurrence Relation for the Towers of Hanoi. Given: T(1) = 1. T ... T(n) = 2k T ( n-k ) 2k - 1. Since n is finite, k - n. Therefore, lim T(n) k - n = 2n - 1 ... – PowerPoint PPT presentation

Number of Views:254
Avg rating:3.0/5.0
Slides: 3
Provided by: tcnj
Category:

less

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