- #1
onako
- 86
- 0
Hi all,
I'm faced with the following problem (it involves two equally large number sequences, or vectors; therefore, it might be considered as a problem of number theory, I guess; please move it to appropriate place if you think differently):
Given two sequences, for example:
A=[1, 2, 4, 6, 7, 2, 1];
B=[1, 2, 4, 7, 8, 2, 1];
Give an algorithm that should express the entrywise similarity/closeness of the sequences by a certain number. For the above sequeces, A and B are similar(differ in two entries); the sequence C might have all 5's and is still more similar to A than sequence D with all 100's...
I thought of the following:
[tex]
\sum |a_i-b_i|
[/tex]
Other proposals are very welcome. Many thanks
I'm faced with the following problem (it involves two equally large number sequences, or vectors; therefore, it might be considered as a problem of number theory, I guess; please move it to appropriate place if you think differently):
Given two sequences, for example:
A=[1, 2, 4, 6, 7, 2, 1];
B=[1, 2, 4, 7, 8, 2, 1];
Give an algorithm that should express the entrywise similarity/closeness of the sequences by a certain number. For the above sequeces, A and B are similar(differ in two entries); the sequence C might have all 5's and is still more similar to A than sequence D with all 100's...
I thought of the following:
[tex]
\sum |a_i-b_i|
[/tex]
Other proposals are very welcome. Many thanks