4. The machine-implemented method of claim 1 , wherein the partitioning of the plurality of strokes in the region using a finite set of rules based, at least in part, on expected positioning of symbols and expected types of strokes, further comprises: determining a smallest axis-aligned rectangle including a subset of the plurality of strokes, determining whether the subset of the plurality of strokes satisfies one of the finite set of rules, and retaining region information with respect to the subset of the plurality of strokes when the subset of the plurality of strokes is determined to satisfy the one of the finite set rules.
1. A machine-implemented method for parsing a mathematical expression comprising a plurality of strokes, the machine-implemented method comprising: partitioning a plurality of strokes, included in a region, using a finite set of rules based, at least in part, on expected positioning of symbols and expected types of strokes, the partitioning a plurality of strokes further comprising: determining an ordering of the plurality of strokes, within the region, according to an ordering relation, the ordering relation including at least one of a left-right ordering relation or a top-down ordering relation, the determining an ordering of the plurality of strokes further comprising: defining a first array of strokes {a 1 , a 2 , . . . , a n } such that a i is less than or equal to a i+1 if and only if a leftmost coordinate of the stroke a i , within a smallest axis aligned rectangle including the stroke a i , is less than or equal to a leftmost coordinate of the stroke a i+1 , within a smallest axis aligned rectangle including the stroke a i+1 , when the ordering relation includes the left-right ordering relation, where a set S of n strokes is equal to (s 1 , s 2 , . . . , s n }, {a 1 , a 2 , . . . , a n } is a first sorted permutation of the set S, and i is a value from 1 to (n−1), and defining a second array of strokes {b 1 , b 2 , . . . , b n } such that b i is less than or equal to b i+1 if and only if a topmost coordinate of the stroke b i , within a smallest axis aligned rectangle including the stroke b i , is less than or equal to a topmost coordinate of the stroke b i+1 , within a smallest axis aligned rectangle including the stroke b i+1 , when the ordering relation includes the top-down ordering relation, where {b 1 , b 2 , . . . , b n } is a second sorted permutation of the set S; and determining whether a rule of the finite set of rules is satisfied based, at least partly, on the first array of strokes or the second array of strokes, and partitioning the region into a plurality of regions, each of the plurality of regions including at least one respective stroke of the plurality of strokes, when the rule of the finite set of rules is determined to be satisfied; repeating the partitioning, using the finite set of rules, until no additional regions can be created according to the finite set of rules; and recognizing at least one symbol of the mathematical expression included in at least one region created by the partitioning, wherein the machine-implemented method is performed by a processing device.