AVL Trees / Slide 1 Silme * Anahtar hedefi silmek için, x yaprağında buluruz ve sonra sileriz. * Dikkat edilmesi gereken iki durum vardır. (1) Hedef bazi.

Slides:



Advertisements
Benzer bir sunumlar
A Deep Approach to Turkish Teaching and Learning
Advertisements

Listeler.
Gerekli olduğunda insanlara ulaşın Yer Uzantıları Reach prospective customers at important moment with location extensions. Location Extentions.
Alakalı müşterileri hedefleyin. Google ile Yeniden Pazarlama Remarketing with Google. Target customers who are already showing interest in your business.
AVL-Ağaçları (Trees).
B+-Ağaçları.
Silme Anahtar hedefi silmek için, x yaprağında buluruz ve sonra sileriz. Dikkat edilmesi gereken iki durum vardır. (1) Hedef bazı iç düğümlerde bir anahtar.
Silme Sil 12 Tek dönüş.
Hashing Çırpı, kırpma, özetleme, adresleme
İkili Ağaçlar İkili Arama Ağaçları
Diziler PHP.
Algoritmalar DERS 7 Dengeli Arama Ağaçları Kırmızı-siyah ağaçlar
Tam İkili Ağaçlar 9. Ünite ağaçlardan bahseder.
Özyineli Sıralama Algoritmaları
Üniversitemiz Öğrenci Bilgi Sistemine Kullanıcı Adı (Öğrenci Numarası ) ve tarafınızdan belirlenen Şifre ile giriş yapılır; You can have access to Student.
Atama ve eşleme (eşleştirme) problemleri (Matching and Assignment problems)
If you delete this after reading... you'll spend a year of ill luck! But... if you send it to (at least) 2 friends... you'll have 3 years of good luck!!!
İŞ SIRALAMA VE ÇİZELGELEME DERS 5
S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Chapter 6 Overview Number Systems and Radix Conversion Fixed point.
INQUIRY FROM A B2B SITE Dear Sir/Madam We are writing to enquire about your sunflower oil. Please send us your product specification and price. Best Regards.
NOUN CLAUSES (İSİM CÜMLECİKLERİ).
DEVRE TEOREMLERİ.
Kampanyanızı optimize edin. Görüntülü Reklam Kampanyası Optimize Edici'yi Kullanma Display Ads Campaign Optimizer. Let Google technology manage your diplay.
EXPRESSING AGREEMENT AND DISAGREEMENT
Birthday party. birthday party new year's party new year's party New Year's Party.
COSTUMES KILIKLAR (KOSTÜMLER)
Veri Yapıları ve Algoritmalar
BM-305 Mikrodenetleyiciler Güz 2015 (6. Sunu) (Yrd. Doç. Dr. Deniz Dal)
Bölüm 6 Momentum, İtme ve Çarpışma
Yığıt Soyut Veri Tipi (Stack ADT) Yığıt Veri Yapısı
LITERARY TRANSLATION 2 Week 5. In-class translation workshop.
GREETING MANNERS AND POLITE WORDS EMLAK KREDİ BANKASI İLKÖĞRETİM OKULU İstanbul(Bakırköy) SELAMLAMA VE KİBAR SÖZLER.
VO: Tüm bakışlar üzerimdeyken, saçlarımın kusursuz olmasını isterim. EBT: When all eyes are over me, I want my hair to be perfect. VO: Kepeksiz ve güzel.
Grade 8 Unit 7 Bilginbakterim.com.
ADA BİYOCOĞRAFYASI.
İSTATİSTİK II Hipotez Testleri 1.
Superstitions Grade 7 Unit Bilginbakterim.com
YDI101 YABANCI DIL 1 HAFTA 1. We use subject pronouns when the pronoun is the subject of the sentence. When the subject appears the second time, we don’t.
(1) ayakkabılarını giysene (2) hadi, giy ayakkabılarını!
BİLİMSEL ÇALIŞMA BASAMAKLARI SCIENTIFIC WORKING STEPS MHD BASHAR ALREFAEI Y
Ac POWER ANALYSIS Part III..
TURKISH 1 (UHF1271) EYLEMLER&ŞİMDİKİ ZAMAN PRESENT CONTINUOUS TENSE
MY HOME Hello guys now tell you the house I'm living in.
FINLAND EDUCATION SYSTEM I am talking about the Finnish education system today.
tomorrow soon next week / year in five minutes/ in two hours later today I'll go to the market tomorrow. Don’t worry. He will be here soon. There.
taşınabilir Akilli Tahta Kullanım kılavuzu
Hüsamettin Ataman – Mimar - Denizli
FALL IS IN THE AIR
Döngüler ve Shift Register
NİŞANTAŞI ÜNİVERSİTESİ
İSTATİSTİK II Hipotez Testleri 1.
Recursion (Özyineleme)
NİŞANTAŞI ÜNİVERSİTESİ
Relations between angles and sides.. Examples and meaning Larger angles longer side If two angles in a tringle have unequal measures then the sides opposite.
NİŞANTAŞI ÜNİVERSİTESİ
Algoritmalar II Ders 16 Prim algoritması.
DREAMHOUSE TY TLG DREAM HOUSE TY TLG DREAM……… YOU CAN TOUCH, IF YOU DREAM………
Before the Battle of Çanakkale. Why a Front in Çanakkale was Opened? In the summer of 1914, the war continued in Europe with all its intensity, and by.
NİŞANTAŞI ÜNİVERSİTESİ
Imagine that you are a teacher and you are taking your 20 students to England for the summer school.
ELİF SU KÜÇÜKKAVRUK. plants When you touch this plant, it can be like the photograph. When you let go, it becomes normal.
Algoritmalar II Ders 16 Prim algoritması.
Ders 9: İkili arama ağaçları
Kırmızı Siyah Ağaçlar.
People with an entrepreneurial mindset are always brave.
Çizge Algoritmalari 10. Ders.
Araştırma Deneyimini Geliştirme: ProQuest Ara Yuz Geliştirmeleri
Kelime (Text) İşleme Algoritmaları
Where’s the post office? 1. Where is the post office? Where is the post office? It’s next to the bank. It’s next to the bank. Is there a bank next to.
Sunum transkripti:

AVL Trees / Slide 1 Silme * Anahtar hedefi silmek için, x yaprağında buluruz ve sonra sileriz. * Dikkat edilmesi gereken iki durum vardır. (1) Hedef bazi iç düğümlerde bir anahtar olabilir. (bahsedilen mantığa göre yeni elemanla yer değiştirmesi gerekir.) (2) x yaprağından hedefi sildikten sonra,  M/2  - 1 anahtardan daha az eleman içerirse (düğümleri birleştirmek gerekir. )

AVL Trees / Slide 2 Durum (1)  Verilen mantığa göre, hedef x in enfazla bir y atasında anahtar olarak görülebilir. Üstelik, düğüm y’yi ziyaret etmiş olmamız gerekir ve hedefi onun içerisınde görmüş olmamız gerekir. Bu yüzden x düğümünden sildikten sonra, y’ ye doğrudan erişebiliriz ve x’deki yeni en küçük elemanla yer değiştirebiliriz.

AVL Trees / Slide 3 Durum (2): Çok az anahtarı handling leaves with too few keys  Suppose we delete the record with key target from a leaf. * Let u be the leaf that has  M/2  - 2 keys (too few) * Let v be a sibling of u * Let k be the key in the parent of u and v that separates the pointers to u and v. * There are two cases

AVL Trees / Slide 4 handling leaves with too few keys * Case 1: v contains  M/2  keys or more and v is the right sibling of u n Move the leftmost record from v to u n Set the key in parent of u that separates u and v to be the new smallest key in v * Case 2: v contains  M/2  keys or more and v is the left sibling of u n Move the rightmost record from v to u n Set the key in parent of u that separates u and v to be the new smallest key in u

AVL Trees / Slide 5 Deletion example Want to delete 15

AVL Trees / Slide 6 Want to delete 9

AVL Trees / Slide 7 Want to delete 10

AVL Trees / Slide 8

AVL Trees / Slide 9

AVL Trees / Slide 10 Merging two leaves * If no sibling leaf with at least  M/2  keys exists, then merge two leaves. * Case (1): Suppose that the right sibling v of u contains exactly  M/2  -1 keys. Merge u and v n Move the keys in u to v n Remove the pointer to u at parent n Delete the separating key between u and v from the parent of u

AVL Trees / Slide 11 Merging two leaves * Case (2): Suppose that the left sibling v of u contains exactly  M/2  -1 keys. Merge u and v n Move the keys in u to v n Remove the pointer to u at parent n Delete the separating key between u and v from the parent of u

AVL Trees / Slide 12 Example Want to delete 12

AVL Trees / Slide 13 Cont’d u v

AVL Trees / Slide 14 Cont’d

AVL Trees / Slide 15 Cont’d too few keys! …

AVL Trees / Slide 16 Deleting a key in an internal node * Suppose we remove a key from an internal node u, and u has less than  M/2  -1 keys afterwards. * Case (1): u is a root n If u is empty, then remove u and make its child the new root

AVL Trees / Slide 17 Deleting a key in an internal node * Case (2): the right sibling v of u has  M/2  keys or more n Move the separating key between u and v in the parent of u and v down to u. n Make the leftmost child of v the rightmost child of u n Move the leftmost key in v to become the separating key between u and v in the parent of u and v. * Case (2): the left sibling v of u has  M/2  keys or more n Move the separating key between u and v in the parent of u and v down to u. n Make the rightmost child of v the leftmost child of u n Move the rightmost key in v to become the separating key between u and v in the parent of u and v.

AVL Trees / Slide 18 …continue from previous example u v case 2

AVL Trees / Slide 19 Cont’d

AVL Trees / Slide 20 * Case (3): all sibling v of u contains exactly  M/2  - 1 keys n Move the separating key between u and v in the parent of u and v down to u. n Move the keys and child pointers in u to v n Remove the pointer to u at parent.

AVL Trees / Slide 21 Example Want to delete 5

AVL Trees / Slide 22 Cont’d u v

AVL Trees / Slide 23 Cont’d

AVL Trees / Slide 24 Cont’d u v case 3

AVL Trees / Slide 25 Cont’d

AVL Trees / Slide 26 Cont’d