The second approach is of the representation-change variety: allow mor translation - The second approach is of the representation-change variety: allow mor Indonesian how to say

The second approach is of the repre

The second approach is of the representation-change variety: allow more than
one element in a node of a search tree. Specific cases of such trees are2-3
trees,2-3-4 trees, and more general and importantB-trees. They differ in the
number of elements admissible in a single node of a search tree, but all are
perfectly balanced. We discuss the simplest case of such trees, the 2-3 tree, in
this section, leaving the discussion ofB-trees for Chapter 7.


DEFINITION AnAVL treeis a binary search tree in which thebalance factorof
every node, which is defined as the difference between the heights of the node’s
left and right subtrees, is either 0 or +1 or −1. (The height of the empty tree is
defined as−1. Of course, the balance factor can also be computed as the difference
between the numbers of levels rather than the height difference of the node’s left
and right subtrees.)
For example, the binary search tree in Figure 6.2a is an AVL tree but the one
in Figure 6.2b is not.
If an insertion of a new node makes an AVL tree unbalanced, we transform
the tree by a rotation. Arotationin an AVL tree is a local transformation of its
subtree rooted at a node whose balance has become either+2or−2. If there are
several such nodes, we rotate the tree rooted at the unbalanced node that is the
closest to the newly inserted leaf. There are only four types of rotations; in fact,
two of them are mirror images of the other two. In their simplest form, the four
rotations are shown in Figure 6.3.
The first rotation type is called thesingle right rotation,orR-rotation. (Imagine rotating the edge connecting the root and its left child in the binary tree in
Figure 6.3a to the right.) Figure 6.4 presents the singleR-rotation in its most general form. Note that this rotation is performed after a new key is inserted into the
left subtree of the left child of a tree whose root had the balance of +1 before the
insertion.
The symmetricsingle left rotation,orL-rotation, is the mirror image of the
singleR-rotation. It is performed after a new key is inserted into the right subtree
of the right child of a tree whose root had the balance of−1 before the insertion.
(You are asked to draw a diagram of the general case of the singleL-rotation in
the exercises.)


The second rotation type is called thedouble left-right rotation(LRrotation). It is, in fact, a combination of two rotations: we perform theL-rotation
of the left subtree of rootrfollowed by theR-rotation of the new tree rooted at
r(Figure 6.5). It is performed after a new key is inserted into the right subtree of
the left child of a tree whose root had the balance of +1 before the insertion


0/5000
From: -
To: -
Results (Indonesian) 1: [Copy]
Copied!
The second approach is of the representation-change variety: allow more thanone element in a node of a search tree. Specific cases of such trees are2-3trees,2-3-4 trees, and more general and importantB-trees. They differ in thenumber of elements admissible in a single node of a search tree, but all areperfectly balanced. We discuss the simplest case of such trees, the 2-3 tree, inthis section, leaving the discussion ofB-trees for Chapter 7.DEFINITION AnAVL treeis a binary search tree in which thebalance factorofevery node, which is defined as the difference between the heights of the node’sleft and right subtrees, is either 0 or +1 or −1. (The height of the empty tree isdefined as−1. Of course, the balance factor can also be computed as the differencebetween the numbers of levels rather than the height difference of the node’s leftand right subtrees.)For example, the binary search tree in Figure 6.2a is an AVL tree but the onein Figure 6.2b is not.If an insertion of a new node makes an AVL tree unbalanced, we transformthe tree by a rotation. Arotationin an AVL tree is a local transformation of itssubtree rooted at a node whose balance has become either+2or−2. If there areseveral such nodes, we rotate the tree rooted at the unbalanced node that is theclosest to the newly inserted leaf. There are only four types of rotations; in fact,two of them are mirror images of the other two. In their simplest form, the fourrotations are shown in Figure 6.3.The first rotation type is called thesingle right rotation,orR-rotation. (Imagine rotating the edge connecting the root and its left child in the binary tree inFigure 6.3a to the right.) Figure 6.4 presents the singleR-rotation in its most general form. Note that this rotation is performed after a new key is inserted into theleft subtree of the left child of a tree whose root had the balance of +1 before theinsertion.The symmetricsingle left rotation,orL-rotation, is the mirror image of thesingleR-rotation. It is performed after a new key is inserted into the right subtreeof the right child of a tree whose root had the balance of−1 before the insertion.(You are asked to draw a diagram of the general case of the singleL-rotation inthe exercises.)The second rotation type is called thedouble left-right rotation(LRrotation). It is, in fact, a combination of two rotations: we perform theL-rotationof the left subtree of rootrfollowed by theR-rotation of the new tree rooted atr(Figure 6.5). It is performed after a new key is inserted into the right subtree ofthe left child of a tree whose root had the balance of +1 before the insertion
Being translated, please wait..
Results (Indonesian) 2:[Copy]
Copied!
Pendekatan kedua adalah berbagai representasi-perubahan: memungkinkan lebih dari
satu unsur dalam sebuah simpul dari pohon pencarian. Kasus-kasus tertentu dari pohon seperti are2-3
pohon, 2-3-4 pohon, dan lebih umum dan importantB-pohon. Mereka berbeda dalam
jumlah elemen diterima di node tunggal dari pohon pencarian, tetapi semua
sangat seimbang. Kami membahas kasus yang paling sederhana dari pohon tersebut, 2-3 pohon, di
bagian ini, meninggalkan diskusi OFB-pohon untuk Bab 7. DEFINISI AnAVL treeis pohon pencarian biner yang thebalance factorof setiap node, yang didefinisikan sebagai perbedaan antara ketinggian node kiri dan kanan sub pohon, adalah 0 atau 1 atau -1. (Ketinggian pohon kosong didefinisikan sebagai-1. Tentu saja, faktor keseimbangan dapat juga dihitung sebagai perbedaan antara jumlah tingkat daripada perbedaan ketinggian kiri node dan kanan subpohon.) Sebagai contoh, biner pohon pencarian pada Gambar 6.2a adalah pohon AVL tapi satu pada Gambar 6.2b tidak. Jika penyisipan node baru membuat pohon AVL tidak seimbang, kita mengubah pohon dengan rotasi. Arotationin pohon AVL adalah transformasi lokal yang subtree berakar pada node yang saldonya telah menjadi baik + 2or-2. Jika ada beberapa node tersebut, kami memutar pohon berakar pada node yang tidak seimbang itu adalah yang paling dekat dengan daun yang baru dimasukkan. Hanya ada empat jenis rotasi; pada kenyataannya, dua dari mereka adalah bayangan cermin dari dua lainnya. Dalam bentuk yang paling sederhana, empat rotasi ditunjukkan pada Gambar 6.3. Jenis rotasi pertama disebut thesingle rotasi kanan, Orr-rotasi. (Bayangkan berputar tepi menghubungkan akar dan anak kiri dalam pohon biner dalam Gambar 6.3a ke kanan.) Gambar 6.4 menyajikan singleR-rotasi dalam bentuk yang paling umum. Perhatikan bahwa rotasi ini dilakukan setelah kunci baru dimasukkan ke dalam subtree kiri dari anak kiri dari pohon yang akar memiliki keseimbangan 1 sebelum penyisipan. Rotasi kiri symmetricsingle, ORL-rotasi, adalah bayangan cermin dari singleR-rotasi. Hal ini dilakukan setelah kunci baru dimasukkan ke dalam subtree kanan dari anak kanan dari pohon yang akar memiliki keseimbangan-1 sebelum penyisipan. (Anda akan diminta untuk menggambar diagram dari kasus umum dari singleL-rotasi di latihan.) Tipe rotasi kedua disebut rotasi kiri-kanan thedouble (LRrotation). Hal ini, pada kenyataannya, kombinasi dari dua rotasi: kita melakukan Thel-rotasi dari subtree kiri rootrfollowed oleh ther-rotasi pohon baru berakar pada r (Gambar 6.5). Hal ini dilakukan setelah kunci baru dimasukkan ke dalam subtree kanan anak kiri dari pohon yang akar memiliki keseimbangan 1 sebelum penyisipan


































Being translated, please wait..
 
Other languages
The translation tool support: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese, Chinese Traditional, Corsican, Croatian, Czech, Danish, Detect language, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Odia (Oriya), Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Tatar, Telugu, Thai, Turkish, Turkmen, Ukrainian, Urdu, Uyghur, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu, Language translation.

Copyright ©2025 I Love Translation. All reserved.

E-mail: