T
test
Hello all,
Which is the fastest way to compare the strings below,
the following way:
Each of MyStrings shall be compared for the quantity of N 1's vs all of
the Main strings on the same position!
1) All strings are of equal size and have equal number of 1's (but in
different positions.
2) N represents the minimum quantity of matches between MyStrings vs
Main strings.
3) In this example N=2
MyStrings: = 4
1000110
0010110
0011010
1100010
Main strings: = 35
1110000
1101000
1100100
1100010
1100001
1011000
1010100
1010010
1010001
1001100
1001010
1001001
1000110
1000101
1000011
0111000
0110100
0110010
0110001
0101100
0101010
0101001
0100110
0100101
0100011
0011100
0011010
0011001
0010110
0010101
0010011
0001110
0001101
0001011
0000111
The answer I'm looking for is example is 28.
That is, 28 strings (main strings) do have
minimum N 1's (2 in this case) on the same position as MyStrings.
TIA
Which is the fastest way to compare the strings below,
the following way:
Each of MyStrings shall be compared for the quantity of N 1's vs all of
the Main strings on the same position!
1) All strings are of equal size and have equal number of 1's (but in
different positions.
2) N represents the minimum quantity of matches between MyStrings vs
Main strings.
3) In this example N=2
MyStrings: = 4
1000110
0010110
0011010
1100010
Main strings: = 35
1110000
1101000
1100100
1100010
1100001
1011000
1010100
1010010
1010001
1001100
1001010
1001001
1000110
1000101
1000011
0111000
0110100
0110010
0110001
0101100
0101010
0101001
0100110
0100101
0100011
0011100
0011010
0011001
0010110
0010101
0010011
0001110
0001101
0001011
0000111
The answer I'm looking for is example is 28.
That is, 28 strings (main strings) do have
minimum N 1's (2 in this case) on the same position as MyStrings.
TIA