NFA State Segmentation for String Search Bottlenecks
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for string searching using nondeterministic finite automata (NFAs) face challenges in maintaining search speed and memory efficiency, as the number of active states increases, leading to declining performance, especially when dealing with complex regular expressions and multiple patterns.
Innovation Solution
A method is introduced that selectively eliminates nondeterministic elements of NFAs by determining the highest probability state and common transitions, creating new states to reduce the number of active states and optimize memory usage, while ensuring the NFA operates within limited memory resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conventional NFA methods are used for string searching, then the ability to handle complex regular expressions is maintained, but the number of active states increases causing decline in search speed
Solution Approach 1:
The patent segments the NFA states into active states and inactive states, and further divides active states into multiple groups. This segmentation allows the system to focus computational resources only on relevant state groups during string matching, reducing the effective number of states that need to be processed while maintaining the ability to handle complex regular expressions.
Solution Approach 2:
The patent dynamically adjusts which state groups are active during the string matching process. By selectively activating only the necessary state groups based on the current matching context, the system maintains adaptability for complex patterns while improving search speed through reduced computational overhead.
2Adaptability or versatility
If conventional NFA methods are used for string searching, then pattern matching capability is preserved, but memory usage increases
Solution Approach 1:
The patent segments the NFA states into active states and inactive states, and further divides active states into multiple groups. This segmentation allows the system to load only necessary state groups into memory during operation, reducing overall memory usage while preserving pattern matching capability through selective activation of relevant states.
Solution Approach 2:
The patent loads and processes only a partial subset of states (specifically, divided groups of active states) rather than the complete NFA state set. This partial action approach reduces memory requirements while maintaining sufficient pattern matching capability for the given input string.
3Productivity
If the number of active states is reduced, then search speed improves, but the ability to match complex patterns may be compromised
Solution Approach 1:
The patent segments active states into multiple groups and processes them selectively. This segmentation enables the system to reduce the number of simultaneously processed states (improving search speed) while preserving the ability to match complex patterns by ensuring that all necessary state groups are eventually processed in the correct sequence.
Solution Approach 2:
The patent performs preliminary analysis to determine which state groups need to be activated for a given input string before actual matching begins. This preliminary action allows the system to optimize the number of active states for each specific case, improving search speed without compromising the ability to match complex patterns when needed.
Data Source
AI summary
A method for selectively eliminating nondeterministic elements of NFA is disclosed. The method includes steps of: (a) determining a specific state calculated to have a highest arrival probability through a transition from a current state among all states in the NFA as a current highest probability state; (b) determining whether there exists at least one common transition between a first set of transitions including at least one transition moving the current highest probability state to a state i and a second set of transitions including at least one transition moving the current highest probability state to a state j in the NFA; and (c) excluding the at least one common transition between the first and the second sets of transitions and creating a state k which is arrived as a result of moving from the current highest probability state through the at least one common transition.


