2011-11-14

Spectra alignment




After k times shift, the algorithm to find common elements between two sets.


D(k) is the maximum common elements between two sets after k times shift.


[Example]

We assume that one shift is that each element, from 6th element to nth element, will subtract 5.

Set A = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}
Set B = {10, 30, 30, 40, 50, 55, 65, 75, 85, 95}
Set C = {10, 15, 30, 35, 50, 55, 70, 75, 90, 95}

1. D(1) between Set A and Set B is 10.

{10, 20, 30, 40, 50} is common in Set B and a subset {60, 70, 80, 90, 100} of Set A is in common with Set B because of one shift, -5(6-n)

2. D(1) between Set A and Set C is 6.

{10, 30, 50} is common in Set C and after one shift, {55, 75, 95} will be also in common in Set C.


No comments:

Post a Comment