B tech. Discrete mathematics (I. T & Comp. Science Engg.) Syllabus


Before we proceed with discussing various methods of solving recurrence relation, we shall formulate some recurrence relation. The first example of formulation that we discuss is the problem of Tower



Download 472,94 Kb.
bet30/50
Sana11.01.2022
Hajmi472,94 Kb.
#343705
1   ...   26   27   28   29   30   31   32   33   ...   50
Bog'liq
Independent.deskret

FORMULATION OF RECURRENCE RELATION:

Before we proceed with discussing various methods of solving recurrence relation, we shall formulate some recurrence relation. The first example of formulation that we discuss is the problem of Tower of Hanoi as above.


Example: With reference to above Example, let Hn denote the number of moves required to solve the puzzle with n discs. Let us define Hn recursively.

Solution: Clearly, H1 = 1.

Consider top (n–1) discs. We can move these discs to the middle peg using



Hn–1 moves. The nth disc on the first peg can then moved to the third peg. Finally, (n–1) discs from the middle peg can be moved to the third peg with first peg as auxiliary in Hn–1 moves. Thus, total number of moves needed to move n discs are: Hn = 2Hn–1 + 1. Hence the recurrence relation for the Tower of Hanoi is:

Hn = 1 if n = 1.

Hn = 2Hn–1 + 1 otherwise.

Download 472,94 Kb.

Do'stlaringiz bilan baham:
1   ...   26   27   28   29   30   31   32   33   ...   50




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish