This data
t value 1 1 2 0 3 4 4 2 5 2 6 5 7 3 8 4 9 6 10 4 11 6 12 7 13 5 14 8 15 8 16 6 17 10 18 9 19 7 20 12
Represents actually 3 straight lines (1,2,3,....), (0,2,4,...), (4,5,6,...) each having a value every 3 ticks. What algorithm can take this data and find these lines? In other words, given a stream of values at various time stamps (maybe not uniformly spaced as in the example above), find the maximum number of non overlapping straight lines that approximately pass through the values.