Abstract

Graphs are a typical and basic data structure for computer algorithms. Two-dimensional arrays and lists are well-known graph representations. These data representations have contrasting features for retrieval time and space efficiency. Aho et al. [3] proposed a method for combining the compactness of the list with the fast retrieval of the array. Applications of Aho's scheme were, however, limited to static data structures because the updating algorithm was not given. By introducing three one-dimensional arrays based on Aho's data structure, called a triple-array structure, this paper proposes a method for updating arcs stored in the triple array without degrading the worst-case retrieval time complexity O(1). The triple array maps arcs into two one-dimensional arrays CHECK and NEXT according to another one-dimensional arrayBASE. The updating algorithm presented here moves the initial positions of the arcs into other possible positions in the triple array by a first-fit strategy which searches the array CHECK starting from the head. For large graphs, the updating algorithm is improved by introducing the criterion of searching the array CHECK locally. Theoretical and experimental observations show that the updating time of the triple array becomes practical while keeping a worst-case retrieval time complexity of 0(1).

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.