MasterTheoremDAA
Transcript of MasterTheoremDAA
![Page 1: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/1.jpg)
DAA
Fasilkom
Design and Analysis of AlgorithmsMaster Theorem
Fasilkom UIAcknowledgement:
L. Yohannes Stefanus and R. Yugo K. Isal
Faculty of Computer Science - University of Indonesia
2010
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 1 / 20
![Page 2: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/2.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Outline
1 Master TheoremPengantarObjectiveTopic Mind MapBentuk UmumTeoremaPenjelasanContoh PenerapanLatihan
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 2 / 20
![Page 3: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/3.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Pengantar (1/2)
Ada kalanya kita menjumpai algoritma rekursif, misal mergesort atau quick sort. Untuk menentukan kompleksitasasimptotik dari algoritma-algoritma seperti itu, maka kitamenyatakan algoritma itu dalam bentuk persamaanrekurensi, lalu mencari solusi dari persamaan itu.Sayangnya, belum ada metode umum untuk menyelesaianberbagai jenis persaman rekurensi. Dengan demikian,mencari solusi dari suatu persamaan rekurensi adalah senitersendiri.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 3 / 20
![Page 4: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/4.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Pengantar (2/2)
Namun,untuk beberapa bentuk persamaan rekurensi sudahada bentuk solusinya. Salah satunya dibahas disini. Untukpersamaan model ini, terdapat cara cepat untuk mencarisolusinya, yaitu master theorem. Untuk menggunakanmenggunakan metode ini, kita cukup mengingat 3 buahkasus, dan selanjutnya kita dapat menentukan kompleksitasasimptotik dari banyak persamaan rekurensi secara cepat.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 4 / 20
![Page 5: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/5.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Objective
Memahami pola master theoremMemahami syarat-syarat menerapkan master theoremDapat menerapkan master theoremDapat mengenal persamaan rekurensi yang tidak bisadiselesaikan menggunakan master theorem
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 5 / 20
![Page 6: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/6.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Topic Mind Map
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 6 / 20
![Page 7: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/7.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Bentuk Umum (1/2)
Pada master theorem, bentuk relasi rekurensi yangdigunakan adalah
T (n) = aT (nb
) + f (n) (1)
dengan konstanta-konstanta positif a ≥ 1 dan b > 1, sertafungsi f (n) yang secara asimptotik positif.Persamaan diatas menggambarkan running time suatualgoritma yang membagi suatu problem berukuran nmenjadi a buah subproblem berukuran n
b . Setiapsubproblem diselesaikan secara rekursif dalam waktu T ( n
b ).Lalu cost untuk divide and conquer adalah f (n).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 7 / 20
![Page 8: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/8.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Bentuk Umum (2/2)
Ternyata, bentuk T (n) = aT ( nb ) + f (n) bisa terdefinisikan
secara ”tidak jelas”, karena nb tidak selalu bilangan bulat.
Dan menggantikan T ( nb ) dengan T (bn
bc) atau T (dnbe) tidak
mengubah kompleksitas asimptotik persamaan rekurensi.Penghilangan tanda bc dan de adalah untuk mempermudahpenulisan semata.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 8 / 20
![Page 9: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/9.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Teorema
Diketahui konstanta-konstanta a ≥ 1 dan b > 1, fungsi f (n)dan T (n) didefinisikan oleh bilangan non-negatif sebagai
T (n) = aT (nb
) + f (n) (2)
dengan nb sebagai bn
bc atau dnbe. Maka, 3 kemungkinan T (n)
secara asimptotik adalah :1 Jika f (n) = O(nlogba−ε) untuk suatu konstanta ε > 0,
maka T (n) = Θ(nlogba).2 Jika f (n) = Θ(nlogba), maka T (n) = Θ(nlogbalgn).3 Jika f (n) = Ω(nlogba+ε) untuk suatu konstanta ε > 0, dan
jika af ( nb ) ≤ cf (n) untuk suatu konstanta ε < 1 dan n
cukup besar, maka T (n) = Θ(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 9 / 20
![Page 10: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/10.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Teorema
Diketahui konstanta-konstanta a ≥ 1 dan b > 1, fungsi f (n)dan T (n) didefinisikan oleh bilangan non-negatif sebagai
T (n) = aT (nb
) + f (n) (2)
dengan nb sebagai bn
bc atau dnbe. Maka, 3 kemungkinan T (n)
secara asimptotik adalah :1 Jika f (n) = O(nlogba−ε) untuk suatu konstanta ε > 0,
maka T (n) = Θ(nlogba).2 Jika f (n) = Θ(nlogba), maka T (n) = Θ(nlogbalgn).3 Jika f (n) = Ω(nlogba+ε) untuk suatu konstanta ε > 0, dan
jika af ( nb ) ≤ cf (n) untuk suatu konstanta ε < 1 dan n
cukup besar, maka T (n) = Θ(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 9 / 20
![Page 11: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/11.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Teorema
Diketahui konstanta-konstanta a ≥ 1 dan b > 1, fungsi f (n)dan T (n) didefinisikan oleh bilangan non-negatif sebagai
T (n) = aT (nb
) + f (n) (2)
dengan nb sebagai bn
bc atau dnbe. Maka, 3 kemungkinan T (n)
secara asimptotik adalah :1 Jika f (n) = O(nlogba−ε) untuk suatu konstanta ε > 0,
maka T (n) = Θ(nlogba).2 Jika f (n) = Θ(nlogba), maka T (n) = Θ(nlogbalgn).3 Jika f (n) = Ω(nlogba+ε) untuk suatu konstanta ε > 0, dan
jika af ( nb ) ≤ cf (n) untuk suatu konstanta ε < 1 dan n
cukup besar, maka T (n) = Θ(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 9 / 20
![Page 12: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/12.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Teorema
Diketahui konstanta-konstanta a ≥ 1 dan b > 1, fungsi f (n)dan T (n) didefinisikan oleh bilangan non-negatif sebagai
T (n) = aT (nb
) + f (n) (2)
dengan nb sebagai bn
bc atau dnbe. Maka, 3 kemungkinan T (n)
secara asimptotik adalah :1 Jika f (n) = O(nlogba−ε) untuk suatu konstanta ε > 0,
maka T (n) = Θ(nlogba).2 Jika f (n) = Θ(nlogba), maka T (n) = Θ(nlogbalgn).3 Jika f (n) = Ω(nlogba+ε) untuk suatu konstanta ε > 0, dan
jika af ( nb ) ≤ cf (n) untuk suatu konstanta ε < 1 dan n
cukup besar, maka T (n) = Θ(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 9 / 20
![Page 13: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/13.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (1/2)
Apa maksud ke-3 kasus tersebut ?Pada ke-3 kasus yang telah disebutkan sebelumnya,kita membandingkan f (n) dengan nlogba. Secara intuitif,solusi persamaan rekurensi adalah adalah fungsiterbesar.Jika pada kasus ke-1 fungsi nlogba memiliki nilaiterbesar, maka solusinya adalah T (n) = Θ(nlogba).Jika pada kasus ke-2 fungsi f (n) lebih besar, makasolusinya adalah T (n) = Ω(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 10 / 20
![Page 14: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/14.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (1/2)
Apa maksud ke-3 kasus tersebut ?Pada ke-3 kasus yang telah disebutkan sebelumnya,kita membandingkan f (n) dengan nlogba. Secara intuitif,solusi persamaan rekurensi adalah adalah fungsiterbesar.Jika pada kasus ke-1 fungsi nlogba memiliki nilaiterbesar, maka solusinya adalah T (n) = Θ(nlogba).Jika pada kasus ke-2 fungsi f (n) lebih besar, makasolusinya adalah T (n) = Ω(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 10 / 20
![Page 15: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/15.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (1/2)
Apa maksud ke-3 kasus tersebut ?Pada ke-3 kasus yang telah disebutkan sebelumnya,kita membandingkan f (n) dengan nlogba. Secara intuitif,solusi persamaan rekurensi adalah adalah fungsiterbesar.Jika pada kasus ke-1 fungsi nlogba memiliki nilaiterbesar, maka solusinya adalah T (n) = Θ(nlogba).Jika pada kasus ke-2 fungsi f (n) lebih besar, makasolusinya adalah T (n) = Ω(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 10 / 20
![Page 16: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/16.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (1/2)
Apa maksud ke-3 kasus tersebut ?Pada ke-3 kasus yang telah disebutkan sebelumnya,kita membandingkan f (n) dengan nlogba. Secara intuitif,solusi persamaan rekurensi adalah adalah fungsiterbesar.Jika pada kasus ke-1 fungsi nlogba memiliki nilaiterbesar, maka solusinya adalah T (n) = Θ(nlogba).Jika pada kasus ke-2 fungsi f (n) lebih besar, makasolusinya adalah T (n) = Ω(f (n)).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 10 / 20
![Page 17: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/17.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (2/2)
Disamping itu, ada hal-hal lain yang perlu dimengerti.Pada kasus ke-1, f (n) tidak hanya harus lebih kecildaripada nlogba, tetapi juga lebih kecil secarapolinomial, yaitu f (n) secara asimptotik lebih kecil darinlogba sebesar nε untuk ε > 0.Pada kasus ke-3, f (n) tidak hanya harus lebih besardaripada nlogba, tetapi juga lebih besar secarapolinomial dan memenuhi af ( n
b ) ≤ cf (n).Peringatan : master theorem tidak mencakup semuabentuk f (n) !
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 11 / 20
![Page 18: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/18.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (2/2)
Disamping itu, ada hal-hal lain yang perlu dimengerti.Pada kasus ke-1, f (n) tidak hanya harus lebih kecildaripada nlogba, tetapi juga lebih kecil secarapolinomial, yaitu f (n) secara asimptotik lebih kecil darinlogba sebesar nε untuk ε > 0.Pada kasus ke-3, f (n) tidak hanya harus lebih besardaripada nlogba, tetapi juga lebih besar secarapolinomial dan memenuhi af ( n
b ) ≤ cf (n).Peringatan : master theorem tidak mencakup semuabentuk f (n) !
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 11 / 20
![Page 19: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/19.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (2/2)
Disamping itu, ada hal-hal lain yang perlu dimengerti.Pada kasus ke-1, f (n) tidak hanya harus lebih kecildaripada nlogba, tetapi juga lebih kecil secarapolinomial, yaitu f (n) secara asimptotik lebih kecil darinlogba sebesar nε untuk ε > 0.Pada kasus ke-3, f (n) tidak hanya harus lebih besardaripada nlogba, tetapi juga lebih besar secarapolinomial dan memenuhi af ( n
b ) ≤ cf (n).Peringatan : master theorem tidak mencakup semuabentuk f (n) !
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 11 / 20
![Page 20: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/20.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Penjelasan (2/2)
Disamping itu, ada hal-hal lain yang perlu dimengerti.Pada kasus ke-1, f (n) tidak hanya harus lebih kecildaripada nlogba, tetapi juga lebih kecil secarapolinomial, yaitu f (n) secara asimptotik lebih kecil darinlogba sebesar nε untuk ε > 0.Pada kasus ke-3, f (n) tidak hanya harus lebih besardaripada nlogba, tetapi juga lebih besar secarapolinomial dan memenuhi af ( n
b ) ≤ cf (n).Peringatan : master theorem tidak mencakup semuabentuk f (n) !
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 11 / 20
![Page 21: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/21.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (1/4)
Diketahui : T (n) = 9T (n3 ) + n
a = 9,b = 3, dan f (n) = nnlogba = nlog39 = n2
f (n) = n = O(nlog39−ε) untuk ε = 1Kasus 1 terpenuhi !Solusinya : T (n) = Θ(n2)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 12 / 20
![Page 22: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/22.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (1/4)
Diketahui : T (n) = 9T (n3 ) + n
a = 9,b = 3, dan f (n) = nnlogba = nlog39 = n2
f (n) = n = O(nlog39−ε) untuk ε = 1Kasus 1 terpenuhi !Solusinya : T (n) = Θ(n2)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 12 / 20
![Page 23: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/23.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (1/4)
Diketahui : T (n) = 9T (n3 ) + n
a = 9,b = 3, dan f (n) = nnlogba = nlog39 = n2
f (n) = n = O(nlog39−ε) untuk ε = 1Kasus 1 terpenuhi !Solusinya : T (n) = Θ(n2)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 12 / 20
![Page 24: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/24.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (1/4)
Diketahui : T (n) = 9T (n3 ) + n
a = 9,b = 3, dan f (n) = nnlogba = nlog39 = n2
f (n) = n = O(nlog39−ε) untuk ε = 1Kasus 1 terpenuhi !Solusinya : T (n) = Θ(n2)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 12 / 20
![Page 25: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/25.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (1/4)
Diketahui : T (n) = 9T (n3 ) + n
a = 9,b = 3, dan f (n) = nnlogba = nlog39 = n2
f (n) = n = O(nlog39−ε) untuk ε = 1Kasus 1 terpenuhi !Solusinya : T (n) = Θ(n2)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 12 / 20
![Page 26: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/26.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (1/4)
Diketahui : T (n) = 9T (n3 ) + n
a = 9,b = 3, dan f (n) = nnlogba = nlog39 = n2
f (n) = n = O(nlog39−ε) untuk ε = 1Kasus 1 terpenuhi !Solusinya : T (n) = Θ(n2)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 12 / 20
![Page 27: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/27.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (2/4)
Diketahui : T (n) = T (2n3 ) + 1
a = 1, b = 32 , f (n) = 1.
nlogba = nlog 3
21
= n0 = 1.f (n) = Θ(nlogba) = Θ(1)
Kasus 2 terpenuhi !Solusinya : T (n) = Θ(lgn).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 13 / 20
![Page 28: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/28.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (2/4)
Diketahui : T (n) = T (2n3 ) + 1
a = 1, b = 32 , f (n) = 1.
nlogba = nlog 3
21
= n0 = 1.f (n) = Θ(nlogba) = Θ(1)
Kasus 2 terpenuhi !Solusinya : T (n) = Θ(lgn).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 13 / 20
![Page 29: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/29.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (2/4)
Diketahui : T (n) = T (2n3 ) + 1
a = 1, b = 32 , f (n) = 1.
nlogba = nlog 3
21
= n0 = 1.f (n) = Θ(nlogba) = Θ(1)
Kasus 2 terpenuhi !Solusinya : T (n) = Θ(lgn).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 13 / 20
![Page 30: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/30.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (2/4)
Diketahui : T (n) = T (2n3 ) + 1
a = 1, b = 32 , f (n) = 1.
nlogba = nlog 3
21
= n0 = 1.f (n) = Θ(nlogba) = Θ(1)
Kasus 2 terpenuhi !Solusinya : T (n) = Θ(lgn).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 13 / 20
![Page 31: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/31.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (2/4)
Diketahui : T (n) = T (2n3 ) + 1
a = 1, b = 32 , f (n) = 1.
nlogba = nlog 3
21
= n0 = 1.f (n) = Θ(nlogba) = Θ(1)
Kasus 2 terpenuhi !Solusinya : T (n) = Θ(lgn).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 13 / 20
![Page 32: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/32.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (2/4)
Diketahui : T (n) = T (2n3 ) + 1
a = 1, b = 32 , f (n) = 1.
nlogba = nlog 3
21
= n0 = 1.f (n) = Θ(nlogba) = Θ(1)
Kasus 2 terpenuhi !Solusinya : T (n) = Θ(lgn).
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 13 / 20
![Page 33: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/33.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (3/4)
Diketahui : T (n) = 3T (n4 ) + n lg n
a = 3, b = 4, f (n) = n lg nnlogba = nlog43 = n0.793
f (n) = Ω(nlog43+ε) untuk ε ≈ 0.2Untuk n cukup besar,af ( n
b ) = 3(n4 )lg(n
4 ) ≤ 34nlgn = cf (n)
Kasus 3 terpenuhi !Solusinya : T (n) = Θ(nlgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 14 / 20
![Page 34: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/34.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (3/4)
Diketahui : T (n) = 3T (n4 ) + n lg n
a = 3, b = 4, f (n) = n lg nnlogba = nlog43 = n0.793
f (n) = Ω(nlog43+ε) untuk ε ≈ 0.2Untuk n cukup besar,af ( n
b ) = 3(n4 )lg(n
4 ) ≤ 34nlgn = cf (n)
Kasus 3 terpenuhi !Solusinya : T (n) = Θ(nlgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 14 / 20
![Page 35: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/35.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (3/4)
Diketahui : T (n) = 3T (n4 ) + n lg n
a = 3, b = 4, f (n) = n lg nnlogba = nlog43 = n0.793
f (n) = Ω(nlog43+ε) untuk ε ≈ 0.2Untuk n cukup besar,af ( n
b ) = 3(n4 )lg(n
4 ) ≤ 34nlgn = cf (n)
Kasus 3 terpenuhi !Solusinya : T (n) = Θ(nlgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 14 / 20
![Page 36: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/36.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (3/4)
Diketahui : T (n) = 3T (n4 ) + n lg n
a = 3, b = 4, f (n) = n lg nnlogba = nlog43 = n0.793
f (n) = Ω(nlog43+ε) untuk ε ≈ 0.2Untuk n cukup besar,af ( n
b ) = 3(n4 )lg(n
4 ) ≤ 34nlgn = cf (n)
Kasus 3 terpenuhi !Solusinya : T (n) = Θ(nlgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 14 / 20
![Page 37: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/37.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (3/4)
Diketahui : T (n) = 3T (n4 ) + n lg n
a = 3, b = 4, f (n) = n lg nnlogba = nlog43 = n0.793
f (n) = Ω(nlog43+ε) untuk ε ≈ 0.2Untuk n cukup besar,af ( n
b ) = 3(n4 )lg(n
4 ) ≤ 34nlgn = cf (n)
Kasus 3 terpenuhi !Solusinya : T (n) = Θ(nlgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 14 / 20
![Page 38: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/38.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (3/4)
Diketahui : T (n) = 3T (n4 ) + n lg n
a = 3, b = 4, f (n) = n lg nnlogba = nlog43 = n0.793
f (n) = Ω(nlog43+ε) untuk ε ≈ 0.2Untuk n cukup besar,af ( n
b ) = 3(n4 )lg(n
4 ) ≤ 34nlgn = cf (n)
Kasus 3 terpenuhi !Solusinya : T (n) = Θ(nlgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 14 / 20
![Page 39: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/39.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (3/4)
Diketahui : T (n) = 3T (n4 ) + n lg n
a = 3, b = 4, f (n) = n lg nnlogba = nlog43 = n0.793
f (n) = Ω(nlog43+ε) untuk ε ≈ 0.2Untuk n cukup besar,af ( n
b ) = 3(n4 )lg(n
4 ) ≤ 34nlgn = cf (n)
Kasus 3 terpenuhi !Solusinya : T (n) = Θ(nlgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 14 / 20
![Page 40: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/40.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (4/4)
Diketahui : T (n) = 2T (n2 ) + n lg n
a = 2, b = 2, f (n) = n lg nnlogba = n1 = nf (n)
nlogba = nlgnn = lg n secara asimptotis lebih kecil
daripada nε untuk sembarang ε positif.Karena itu, n lg n tidak lebih besar secara polinomialdari n.limn→∞
lgnnε = 0
Kasus 3 tidak berlaku !Master theorem tidak berlaku pada kasus ini.Gunakan cara lain.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 15 / 20
![Page 41: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/41.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (4/4)
Diketahui : T (n) = 2T (n2 ) + n lg n
a = 2, b = 2, f (n) = n lg nnlogba = n1 = nf (n)
nlogba = nlgnn = lg n secara asimptotis lebih kecil
daripada nε untuk sembarang ε positif.Karena itu, n lg n tidak lebih besar secara polinomialdari n.limn→∞
lgnnε = 0
Kasus 3 tidak berlaku !Master theorem tidak berlaku pada kasus ini.Gunakan cara lain.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 15 / 20
![Page 42: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/42.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (4/4)
Diketahui : T (n) = 2T (n2 ) + n lg n
a = 2, b = 2, f (n) = n lg nnlogba = n1 = nf (n)
nlogba = nlgnn = lg n secara asimptotis lebih kecil
daripada nε untuk sembarang ε positif.Karena itu, n lg n tidak lebih besar secara polinomialdari n.limn→∞
lgnnε = 0
Kasus 3 tidak berlaku !Master theorem tidak berlaku pada kasus ini.Gunakan cara lain.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 15 / 20
![Page 43: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/43.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (4/4)
Diketahui : T (n) = 2T (n2 ) + n lg n
a = 2, b = 2, f (n) = n lg nnlogba = n1 = nf (n)
nlogba = nlgnn = lg n secara asimptotis lebih kecil
daripada nε untuk sembarang ε positif.Karena itu, n lg n tidak lebih besar secara polinomialdari n.limn→∞
lgnnε = 0
Kasus 3 tidak berlaku !Master theorem tidak berlaku pada kasus ini.Gunakan cara lain.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 15 / 20
![Page 44: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/44.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (4/4)
Diketahui : T (n) = 2T (n2 ) + n lg n
a = 2, b = 2, f (n) = n lg nnlogba = n1 = nf (n)
nlogba = nlgnn = lg n secara asimptotis lebih kecil
daripada nε untuk sembarang ε positif.Karena itu, n lg n tidak lebih besar secara polinomialdari n.limn→∞
lgnnε = 0
Kasus 3 tidak berlaku !Master theorem tidak berlaku pada kasus ini.Gunakan cara lain.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 15 / 20
![Page 45: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/45.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (4/4)
Diketahui : T (n) = 2T (n2 ) + n lg n
a = 2, b = 2, f (n) = n lg nnlogba = n1 = nf (n)
nlogba = nlgnn = lg n secara asimptotis lebih kecil
daripada nε untuk sembarang ε positif.Karena itu, n lg n tidak lebih besar secara polinomialdari n.limn→∞
lgnnε = 0
Kasus 3 tidak berlaku !Master theorem tidak berlaku pada kasus ini.Gunakan cara lain.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 15 / 20
![Page 46: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/46.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 4T (n2 ) + n2
a = 4, b = 2, f (n) = n2
nlogba = nlog24 = n2
f (n) = Θ(nlogba) = Θ(n2)
Kasus 2 terpenuhi !Solusinya : f (n) = Θ(n2lgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 16 / 20
![Page 47: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/47.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 4T (n2 ) + n2
a = 4, b = 2, f (n) = n2
nlogba = nlog24 = n2
f (n) = Θ(nlogba) = Θ(n2)
Kasus 2 terpenuhi !Solusinya : f (n) = Θ(n2lgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 16 / 20
![Page 48: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/48.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 4T (n2 ) + n2
a = 4, b = 2, f (n) = n2
nlogba = nlog24 = n2
f (n) = Θ(nlogba) = Θ(n2)
Kasus 2 terpenuhi !Solusinya : f (n) = Θ(n2lgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 16 / 20
![Page 49: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/49.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 4T (n2 ) + n2
a = 4, b = 2, f (n) = n2
nlogba = nlog24 = n2
f (n) = Θ(nlogba) = Θ(n2)
Kasus 2 terpenuhi !Solusinya : f (n) = Θ(n2lgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 16 / 20
![Page 50: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/50.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 4T (n2 ) + n2
a = 4, b = 2, f (n) = n2
nlogba = nlog24 = n2
f (n) = Θ(nlogba) = Θ(n2)
Kasus 2 terpenuhi !Solusinya : f (n) = Θ(n2lgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 16 / 20
![Page 51: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/51.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 4T (n2 ) + n2
a = 4, b = 2, f (n) = n2
nlogba = nlog24 = n2
f (n) = Θ(nlogba) = Θ(n2)
Kasus 2 terpenuhi !Solusinya : f (n) = Θ(n2lgn)
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 16 / 20
![Page 52: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/52.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 2nT (n2 ) + nn
Master theorem tidak berlaku, karena a tidak konstan.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 17 / 20
![Page 53: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/53.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = 2nT (n2 ) + nn
Master theorem tidak berlaku, karena a tidak konstan.
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 17 / 20
![Page 54: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/54.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = T (n2 ) + n(2− cos(n))
Master theorem tidak berlaku. Ini tergolong kasus 3,tetapi kondisi reguler tidak terpenuhi, Misal untuk n =2πk , dengan k adalah ganjil dan sangat besar. Untuksembarang n, maka berlaku c ≥ 3
2 .
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 18 / 20
![Page 55: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/55.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Contoh (Lagi)
Diketahui : T (n) = T (n2 ) + n(2− cos(n))
Master theorem tidak berlaku. Ini tergolong kasus 3,tetapi kondisi reguler tidak terpenuhi, Misal untuk n =2πk , dengan k adalah ganjil dan sangat besar. Untuksembarang n, maka berlaku c ≥ 3
2 .
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 18 / 20
![Page 56: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/56.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Latihan 1
Lengkapi (. . . ) pada pernyataan berikut, upayakan hal inidapat anda lakukan luar kepala!Master Theorem: Diketahui a ≥ 1 dan b ≥ 1, jika f (n)sebuah fungsi bilangan non-negatif, dan jika T (n)didefinisikan sebagai persamaan rekurensi: T (n) = . . .Maka kemungkinan T (n) secara asimptotik adalah :
1 Jika f (n) = O(nlogba−ε) untuk suatu konstanta ε > 0,maka T (n) = . . . .
2 Jika f (n) = . . . , maka T (n) = Θ(nlogbalgn).3 Jika f (n) = Ω(nlogba+ε) untuk suatu konstanta ε > 0, dan
jika af ( nb ) ≤ cf (n) untuk suatu konstanta ε < 1 dan n
cukup besar, maka T (n) = . . . .
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 19 / 20
![Page 57: MasterTheoremDAA](https://reader038.fdocuments.in/reader038/viewer/2022103115/5571f8a649795991698dd55a/html5/thumbnails/57.jpg)
DAA
Fasilkom
MasterTheoremPengantar
Objective
Topic Mind Map
Bentuk Umum
Teorema
Penjelasan
Contoh Penerapan
Latihan
Latihan 2
Coba terapkan Master Theorem pada persamaan berikut:1 T (n) = 8 T (n/2) + Θ(n2)
2 T (n) = 4 T (n/2) + Θ(n3)
3 T (n) = 8 T (n/2) + Θ(n3 lg n)
4 T (n) = 5 T (n/2) + Θ(n2)
5 T (n) = 27 T (n/3) + Θ(n3 lg n)
6 T (n) = 5 T (n/2) + Θ(n3)
7 T (n) = 27 T (n/3) + Θ( n3
lg n )
c©Fasilkom (UI) 2010 Design and Analysis of Algorithms MasterTheoremDAA.tex 20 / 20