Binary Tree Pattern Search via Unit Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for searching binary tree patterns in large binary tree data are inefficient due to the need to compare all nodes of the pattern with all nodes of the data, leading to increased processing time as the size of the data grows.
Innovation Solution
The approach involves decomposing a binary tree pattern into combinations of binary tree units and using a binary tree generation algorithm to expand these units, focusing on the positions of right and left children of prioritized stumps to narrow down the search data, thereby reducing the number of associations and label comparisons required.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If all nodes of the binary tree pattern are compared with all nodes of the binary tree data, then the search is thorough and accurate, but the processing time increases significantly as the data size grows
Solution Approach 1:
The binary tree pattern is decomposed into multiple binary tree units through a decomposition procedure. Each unit represents a subset of nodes that can be processed independently. This segmentation allows the search algorithm to focus on specific units rather than comparing all pattern nodes with all data nodes, thereby reducing processing time while maintaining search accuracy through systematic exploration of each unit.
Solution Approach 2:
The invention performs preliminary decomposition of the binary tree pattern into units before the actual search process. Additionally, a generation procedure pre-processes the binary tree data to identify and organize potential match positions. These preliminary actions reduce the search space for the main comparison process, eliminating unnecessary comparisons and reducing processing time while preserving accurate pattern matching.
2Reliability
If a comprehensive comparison of all nodes is performed, then no pattern matches are missed, but the number of associations and label comparisons required increases
Solution Approach 1:
By dividing the pattern into multiple binary tree units, the invention enables targeted comparison operations. Each unit can be matched against corresponding portions of the binary tree data independently. This segmentation maintains pattern matching completeness by ensuring all units are systematically explored, while improving productivity by avoiding redundant comparisons across the entire data structure.
Solution Approach 2:
The invention performs partial comparisons by focusing only on relevant binary tree units and their corresponding data portions rather than exhaustive node-by-node comparison. The decomposition procedure identifies which units need to be compared, allowing the algorithm to perform sufficient (but not excessive) comparisons to ensure all pattern matches are found, thereby improving search efficiency without sacrificing reliability.
Data Source
AI summary
An apparatus decomposes a first binary tree pattern into combinations of multiple binary tree units in accordance with a predetermined procedure. When a second binary tree pattern configured as a combination of binary tree units that are among the multiple binary tree units and include a top binary tree unit of the multiple binary units is associated with a subset of a target binary tree data, the apparatus searches the target binary tree data for the first binary tree pattern by using positions of the subset within the target binary tree data.


