0

Are there any known algorithms or solutions to compare graphs (functions)? Let say we have two graphs they have some same areas but could have some mismatches in points number or points values. For ex, on the picture we see almost identical graphs with some difference in marked area and offset in values which could also differ.

The task is to make unambiguous links between dots of two graphs. Give me please some ideas or keywords to search or think. Thanks.enter image description here

artberry
  • 791
  • 2
  • 7
  • 18

1 Answers1

1

Think up some penalty function you can use to score links between dots and then find an algorithm to optimize that. For instance, you could simply map each dot on one graph to the nearest dot of the other type, which is 2 dimensional nearest neighbors/k-nn. You could assign each dot on one graph its own dot from the other graph to minimize the sum of distances, which is the assignment problem. You could consider each set of dots in increasing order of x, and delete or insert points as required to line them up neatly so that the differences between corresponding points in the y directions were small. This is a version of the edit distance problem, but using real numbers (y positions) instead of characters.

mcdowella
  • 19,301
  • 2
  • 19
  • 25