TAILIEUCHUNG - data structures and algorithms in C PHẦN 5

Đây là Visual () cuốn sách để cung cấp một cuộc thảo luận toàn diện về cấu trúc dữ liệu lớn và các thuật toán. Ở đây, thay vì phải dịch tài liệu về C + + hoặc Java, lập trình chuyên nghiệp hoặc học sinh sẽ tìm thấy một hướng dẫn về cách sử dụng cấu trúc dữ liệu và các thuật toán | 252 E Chapter 6 Binary Trees 0 m lg3 n for n nodes and when symmetric deletions are used the expected IPL becomes 0 M 1g n . Theoretical results obtained by J. Culberson confirm these conclusions. According to Culberson insertions and asymmetric deletions give n n for the expected IPL and 0 v for the average search time average path length whereas symmetric deletions lead to 0 lg n for the average search time and as before 0 n 1g n for the average I PL. These results may be of moderate importance for practical applications. Experiments show that for a 2048-node binary tree only after million insertions and asymmetric deletions does the IPL become worse than in a randomly generated tree. Theoretical results are only fragmentary because of the extraordinary complexity of the problem. Arne Jonassen and Donald Knuth analyzed the problem of random insertions and deletions for a tree of only three nodes which required using Bessel functions and bivariate integral equations and the analysis turned out to rank among the more difficult of all exact analyses of algorithms that have been carried out to date. Therefore the reliance on experimental results is not surprising. E Balancing a Tree At the beginning of this chapter two arguments were presented in favor of trees They are well suited to represent the hierarchical structure of a certain domain and the search process is much faster using trees instead of linked lists. The second argument however does not always hold. It all depends on what the tree looks like. Figure shows three binary search trees. All of them store the same data but obviously the tree in Figure is the best and Figure is the worst. In the worst case three tests are needed in the former and six tests are needed in the latter to locate an object. The problem with the trees in Figures and is that they are somewhat un-symmetrical or lopsided that is objects in the tree are not distributed evenly to the extent that the .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.