Tree Paging via Preorder Numbers and Subtree Sizes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Performing paging or scrolling operations on large trees requires significant memory and computational resources, leading to decreased system performance, as existing methods necessitate traversing the entire tree to determine which nodes to display, regardless of the tree's size.
Innovation Solution
Maintaining preorder numbers and subtree sizes for each node allows for efficient paging and scrolling operations by identifying the correct nodes to display without traversing the entire tree, optimizing memory usage and computational resources through batched edit operations and updating preorder numbers based on sequence analysis.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If tree traversal method is used to perform paging operation, then all nodes can be identified correctly, but memory consumption and computational resources increase significantly
Solution Approach 1:
The patent applies preliminary action by pre-computing and storing the preorder number and subtree size for each node during tree construction. These pre-calculated values are stored in a machine-readable medium and used during paging operations to quickly identify nodes without traversing the entire tree, thus reducing memory consumption while maintaining accurate node identification.
Solution Approach 2:
The patent introduces intermediary values (preorder number and subtree size) that mediate between the tree structure and the paging operation. Instead of directly traversing the tree, the system uses these intermediary values stored in a machine-readable medium to calculate which nodes should be displayed on a given page, significantly reducing the computational resources and memory required.
2Measurement precision
If tree traversal method is used to perform paging operation, then all nodes can be identified correctly, but computational resources and processing time increase
Solution Approach 1:
The patent applies preliminary action by pre-computing and storing the preorder number and subtree size for each node during tree construction. These pre-calculated values are stored in a machine-readable medium and used during paging operations to quickly identify nodes without traversing the entire tree, thus reducing memory consumption while maintaining accurate node identification.
Solution Approach 2:
The patent introduces intermediary values (preorder number and subtree size) that mediate between the tree structure and the paging operation. Instead of directly traversing the tree, the system uses these intermediary values stored in a machine-readable medium to calculate which nodes should be displayed on a given page, significantly reducing the computational resources and memory required.
3Productivity
If preorder numbers and subtree sizes are maintained for each node, then paging operations become efficient, but data structure complexity increases
Solution Approach 1:
The patent merges the preorder number and subtree size into a single machine-readable data structure that is maintained alongside the tree. This combined approach allows efficient paging operations while managing data structure complexity by organizing the additional information in a unified manner that leverages the existing tree structure.
Data Source
AI summary
A method and apparatus for performing a paging operation on a tree having a plurality of nodes is provided. A preorder number and a subtree size are maintained in a machine-readable medium for each of the plurality of nodes of the tree. The preorder number associated with a particular node of the tree identifies a position for the particular node in a depth-first search ordering of the plurality of nodes of the tree. The subtree size associated with a particular node of the tree identifies a count of all the nodes in a subtree rooted at the particular node. In response to receiving a request to perform a paging operation on the plurality of nodes of the tree, a set of nodes that satisfy the paging operation may be determined using the preorder number and the subtree size associated with each node of the tree.


