1. A computer-readable storage medium tangibly embodying executable instructions for: receiving as input a temporal data series comprising events with start times and end times, a set of allowed dwelling times, a threshold frequency of occurrence, and an expiry time, wherein the expiry time provides a criterion for occurrence of an episode; finding all frequent principal episodes of a particular length in the temporal data series having dwelling times, as determined by the start and end times, within the allowed dwelling times; in successive passes through the temporal data series: incrementing the particular length to generate an increased length; combining frequent principal episodes to create combined episodes of the increased length; creating a set of candidate episodes from the combined episodes by removing combined episodes which have non-frequent sub-episodes; identifying one or more occurrences of a candidate episode in the temporal data series, wherein the identifying comprises tracking, with a plurality of automata, whether an occurrence of a candidate episode occurs in the temporal data series; generating the plurality of automata configured to track whether an occurrence of a candidate episode occurs in the temporal data series, wherein the plurality of automata are configured to track a non-overlapping occurrence of a candidate episode; incrementing a count for each identified occurrence; determining frequent principal episodes of the increased length; setting the particular length to the increased length; and producing an output for frequent principal episodes, wherein a frequent principal episode is a principal episode whose count of occurrences results in a frequency meeting or exceeding the threshold frequency of occurrence.