Looking at the geometric relationship between strokes can yield some useful information. If two or more strokes overlap, it can almost be said with certainty that they belong to the same symbol. The doubt is only caused by the fact that a sloppy writer may accidentally overlap adjacent symbols. From my experience, most people writing with a pen and tablet are not inclined to overlap symbols, so this is not a problem.
We can make the assumption that any strokes that touch other strokes all belong to the same symbol. Typically, if a person is writing with reasonable care then this is not a problem.
Mathematical expressions typically consist of symbols taken from the set of Arabic numerals, Roman and Greek alphabets, along with other miscellaneous symbols and notations. Nearly all of these are drawn with overlapping strokes apart from a small minority, for example: i, j, %, !, =, and . In these cases, the overlapping strokes approach is going to fail.