• Title/Summary/Keyword: Balanced Binary Search

Search Result 13, Processing Time 0.029 seconds

Balanced Binary Search Using Prefix Vector for IP Address Lookup (프리픽스 벡터를 사용한 균형 이진 IP 주소 검색 구조)

  • Kim, Hyeong-Gee;Lim, Hye-Sook
    • The Journal of Korean Institute of Communications and Information Sciences
    • /
    • v.33 no.5B
    • /
    • pp.285-295
    • /
    • 2008
  • Internet routers perform packet forwarding which determines a next hop for each incoming packet using the packet's destination IP address. IP address lookup becomes one of the major challenges because it should be performed in wire-speed for every incoming packet under the circumstance of the advancement in link technologies and the growth of the number of the Internet users. Many binary search algorithms have been proposed for fast IP address lookup. However, tree-based binary search algorithms are usually unbalanced, and they do not provide very good search performance. Even for binary search algorithms providing balanced search, they have drawbacks requiring prefix duplication. In this paper, a new binary search algorithm which provides the balanced binary search and the number of its entries is much less than the number of original prefixes. This is possible because of composing the binary search tree only with disjoint prefixes of the prefix set. Each node has a prefix vector that has the prefix nesting information. The number of memory accesses of the proposed algorithm becomes much less than that of prior binary search algorithms, and hence its performance for IP address lookup is considerably improved.

A Study on Efficient Decoding of Huffman Codes (허프만 코드의 효율적인 복호화에 관한 연구)

  • Park, Sangho
    • Journal of IKEEE
    • /
    • v.22 no.3
    • /
    • pp.850-853
    • /
    • 2018
  • In this paper, we propose a decoding method using a balanced binary tree and a canonical Huffman tree for efficient decoding of Huffman codes. The balanced binary tree scheme reduces the number of searches by lowering the height of the tree and binary search. However, constructing a tree based on the value of the code instead of frequency of symbol is a drawback of the balanced binary tree. In order to overcome these drawbacks, a balanced binary tree is reconstructed according to the occurrence probability of symbols at each level of the tree and binary search is performed for each level. We minimize the number of searches using a canonical Huffman tree to find level of code to avoid searching sequentially from the top level to bottom level.

Binary Search Tree with Switch Pointers for IP Address Lookup (스위치 포인터를 이용한 균형 이진 IP 주소 검색 구조)

  • Kim, Hyeong-Gee;Lim, Hye-Sook
    • Journal of KIISE:Information Networking
    • /
    • v.36 no.1
    • /
    • pp.57-67
    • /
    • 2009
  • Packet forwarding in the Internet routers is to find out the longest prefix that matches the destination address of an input packet and to forward the input packet to the output port designated by the longest matched prefix. The IP address lookup is the key of the packet forwarding, and it is required to have efficient data structures and search algorithms to provide the high-speed lookup performance. In this paper, an efficient IP address lookup algorithm using binary search is investigated. Most of the existing binary search algorithms are not efficient in search performance since they do not provide a balanced search. The proposed binary search algorithm performs perfectly balanced binary search using switch pointers. The performance of the proposed algorithm is evaluated using actual backbone routing data and it is shown that the proposed algorithm provides very good search performance without increasing the memory amount storing the forwarding table. The proposed algorithm also provides very good scalability since it can be easily extended for multi-way search and for large forwarding tables

A Balanced Binary Search Tree for Huffman Decoding (허프만 복호화를 위한 균형이진 검색 트리)

  • Kim Hyeran;Jung Yeojin;Yim Changhun;Lim Hyesook
    • The Journal of Korean Institute of Communications and Information Sciences
    • /
    • v.30 no.5C
    • /
    • pp.382-390
    • /
    • 2005
  • Huffman codes are widely used for image and video data transmission. As the increase of real-time data, a lot of studies on effective decoding algorithms and architectures have been done. In this paper, we proposed a balanced binary search tree for Huffman decoding and compared the performance of the proposed architecture with that of previous works. Based on definitions of the comparison of codewords with different lengths, the proposed architecture constructs a balanced binary tree which does not include empty internal nodes, and hence it is very efficient in the memory requirement. Performance evaluation results using actual image data show that the proposed architecture requires small number of table entries, and the decoding time is 1, 5, and 2.41 memory accesses in minimum, maximum, and average, respectively.

Optimized Binary-Search-on- Range Architecture for IP Address Lookup (IP 주소 검색을 위한 최적화된 영역분할 이진검색 구조)

  • Park, Kyong-Hye;Lim, Hye-Sook
    • The Journal of Korean Institute of Communications and Information Sciences
    • /
    • v.33 no.12B
    • /
    • pp.1103-1111
    • /
    • 2008
  • Internet routers forward an incoming packet to an output port toward its final destination through IP address lookup. Since each incoming packet should be forwarded in wire-speed, it is essential to provide the high-speed search performance. In this paper, IP address lookup algorithms using binary search are studied. Most of the binary search algorithms do not provide a balanced search, and hence the required number of memory access is excessive so that the search performance is poor. On the other hand, binary-search-on-range algorithm provides high-speed search performance, but it requires a large amount of memory. This paper shows an optimized binary-search-on-range structure which reduces the memory requirement by deleting unnecessary entries and an entry field. By this optimization, it is shown that the binary-search-on-range can be performed in a routing table with a similar or lesser number of entries than the number of prefixes. Using real backbone routing data, the optimized structure is compared with the original binary-search-on-range algorithm in terms of search performance. The performance comparison with various binary search algorithms is also provided.

Quantitative approach to analyze searching efficiencies varying degrees of imbalance in a binary search tree (수량적 접근 방법에 의한 이진 검색 트리 불균형도에 따른 검색 성능 비교 분석)

  • 김숙영
    • Journal of the Korea Computer Industry Society
    • /
    • v.3 no.2
    • /
    • pp.235-242
    • /
    • 2002
  • To minimize restructuring cost of a tree, experiments were conducted to collect quantitative information of searching efficiencies varying degrees of imbalance in a binary search tree. Degrees of tree imbalance were measured by a balance factor, an absolute value of height difference of left subtree and right subtree in a binary search tree. The average number of comparisons increased (p<0.01), and searching efficiency of O(n) was more appropriate rather than O(logn), as degrees of imbalance in a binary search tree deteriorated. However, there were no significant differences of searching efficiencies in height balanced trees and trees with subtrees to have height 3 less than the other (p>0.05). Therefore, the findings would be applicable to maintain searching efficiency of a software with a binary search tree.

  • PDF

A Hierarchical Binary-search Tree for the High-Capacity and Asymmetric Performance of NVM (비대칭적 성능의 고용량 비휘발성 메모리를 위한 계층적 구조의 이진 탐색 트리)

  • Jeong, Minseong;Lee, Mijeong;Lee, Eunji
    • IEMEK Journal of Embedded Systems and Applications
    • /
    • v.14 no.2
    • /
    • pp.79-86
    • /
    • 2019
  • For decades, in-memory data structures have been designed for DRAM-based main memory that provides symmetric read/write performances and has no limited write endurance. However, such data structures provide sub-optimal performance for NVM as it has different characteristics to DRAM. With this motivation, we rethink a conventional red-black tree in terms of its efficacy under NVM settings. The original red-black tree constantly rebalances sub-trees so as to export fast access time over dataset, but it inevitably increases the write traffic, adversely affecting the performance for NVM with a long write latency and limited endurance. To resolve this problem, we present a variant of the red-black tree called a hierarchical balanced binary search tree. The proposed structure maintains multiple keys in a single node so as to amortize the rebalancing cost. The performance study reveals that the proposed hierarchical binary search tree effectively reduces the write traffic by effectively reaping the high capacity of NVM.

Binary Search on Multiple Small Trees for IP Address Lookup (복수의 작은 트리에 대한 바이너리 검색을 이용한 IP 주소 검색 구조)

  • Lee Bo mi;Lim Hye sook;Kim Won jung
    • The Journal of Korean Institute of Communications and Information Sciences
    • /
    • v.29 no.12C
    • /
    • pp.1642-1651
    • /
    • 2004
  • Advance of internet access technology requires more internet bandwidth and high-speed packet processing. IP address lookups in routers are essential elements which should be performed in real time for packets arriving tens-of-million packets per second. In this paper, we proposed a new architecture for efficient IP address lookup. The proposed scheme produces multiple balanced trees stored into a single SRAM. The proposed scheme performs sequential binary searches on multiple trees. Performance evaluation results show that p개posed architecture requires 301.7KByte SRAM to store about 40,000 prefix samples, and an address lookup is achieved by 11.3 memory accesses in average.

A New Pipelined Binary Search Architecture for IP Address Lookup (IP 어드레스 검색을 위한 새로운 pipelined binary 검색 구조)

  • Lim Hye-Sook;Lee Bo-Mi;Jung Yeo-Jin
    • The Journal of Korean Institute of Communications and Information Sciences
    • /
    • v.29 no.1B
    • /
    • pp.18-28
    • /
    • 2004
  • Efficient hardware implementation of address lookup is one of the most important design issues of internet routers. Address lookup significantly impacts router performance since routers need to process tens-to-hundred millions of packets per second in real time. In this paper, we propose a practical IP address lookup structure based on the binary tree of prefixes of different lengths. The proposed structure produces multiple balanced trees, and hence it solve the issues due to the unbalanced binary prefix tree of the existing scheme. The proposed structure is implemented using pipelined binary search combined with a small size TCAM. Performance evaluation results show that the proposed architecture requires a 2000-entry TCAM and total 245 kbyte SRAMs to store about 30,000 prefix samples from MAE-WEST router, and an address lookup is achieved by a single memory access. The proposed scheme scales very well with both of large databases and longer addresses as in IPv6.

New Binary Sequences of Period Pm-1 with Optimal Autocorrelation (최적의 자기상관 특성을 갖는 주기 \ulcorner-1인 이진시퀀스의 생성)

  • 노종선;정하봉;송홍엽;양경철;이정도
    • The Journal of Korean Institute of Communications and Information Sciences
    • /
    • v.25 no.6B
    • /
    • pp.1136-1142
    • /
    • 2000
  • In this paper, we present a construction for binary sequences {s(t)} of period N= \ulcorner-1 for an odd prime \ulcornerbased on the polynomial (z+1)d+az d +b, and discuss them in some cases of parameters p, m, d, a and b. We show that new sequences from our construction are balanced or almost balanced, and have optimal three-level autocorrelation. We also derive the distribution of autocorrelation values they take on. The sequences satisfy constant-on-the-coset property, and we will show that there are more than one characteristic phases with constant-on-the-coset property. Some other interesting properties of these sequences will be presented. Results of an extensive computer search are summarized.

  • PDF