1. A method for partitioning a deterministic finite automaton (DFA) into a plurality of groups, the DFA comprising a plurality of states associated with one or more transition rules and each of the plurality of groups comprising a plurality of rule lines, the method comprises: selecting, with a processing device, a subset of the plurality of states; mapping each state of the subset onto a group of the plurality of groups by assigning one or more transition rules associated with each state to a rule line of the group, wherein each rule line is assigned at most two transition rules and an extended address associated with one of the at most two transition rules; and iteratively processing each state of the subset mapped onto the group by removing the extended address from each rule line in the group with transition rules referring to a current state if the transition rules in the rule line branch within the group.