tailieunhanh - Thuật toán Algorithms (Phần 24)

Tham khảo tài liệu 'thuật toán algorithms (phần 24)', khoa học tự nhiên, toán học phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | RADIX SEARCHING 223 same technique as used in Patricia can be used in binary radix trie searching to eliminate one-way branching but this only exacerbates the multiple node type problem. Unlike standard binary tree search the radix methods are insensitive to the order in which keys are inserted they depend only upon the structure of the keys themselves. For Patricia the placement of the upwards links depend on the order of insertion but the tree structure depends only on the bits in the keys as for the other methods. even Patricia would have trouble with a set of keys like 001 0001 00001 300001 etc. but for normal key sets the tree should be relatively well-balanced so the number of bit inspections even for very long keys will be roughly proportional to when there are N nodes in the tree. The most useful feature of radix trie searching is that it can be done efficiently with keys of varying length. In all of the other searching methods we have seen the length of the key is built into the searching procedure in some way so that the running time is on the length of the keys as well as the number of keys. The savings available depends on the method of bit access used. For example suppose we have a computer which can efficiently access bytes of tlata and we have to search among hundreds of keys. Then Patricia would require access of only about 9 or 10 bytes of the search key for the search plus one 125-byte equality comparison while hashing requires access of all 125-bytes of the search key for computing the hash function plus a few comparisons and based methods require several long comparisons. This effect makes Patricia or radix trie searching with one-way branching removed the search method of choice when very long keys are involved. 224 Exercises 1. Draw the digital search tree that results when the keys E A S Y Q U E S T I ON are inserted into an initially empty tree in that order . 2. Generate a 1000 node digital search tree and compare its height and the number

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.