Can anyone helps me with my problem. the problem is:
Assumption 1: we have undefined number of sub strings(s1,s2,s3,…) that each of this sub strings are a sequence of 100 numbers (Integer number between 20000000 and 80000000) that they have been chosen randomly. We don’t have any knowledge about the numbers that make this sub strings and the number of sub strings. the important thing here is the order of numbers in sub string not the relation between them.`
Assumption 2: we have a big and long string include millions of numbers, this long string is made of repetition of sub string that mentioned in assumption 1. The name of this string is “S”.
We simplify the example like below: Each sub string contain five number instead of 100 number and each number is between 20 and 80 instead of 20000000 and 80000000: We have the “S” string, our algorithm must find sub string s1 and s2 and s3 from string “S”.
S= 59,22,51,25,53,66,26,28,59,51,22,53,25,66,71,26,32,28,45,59,91,51,71,53,66,32,45,91,22,25,26,59,51,28,71,53,32,66,45,91 , … .
The output of this algorithm is like below:
S1= 59,51,53,66
S2= 22,25,26,28
S3=71,32,45,91
I want the algorithm that find the number of sub string(s1,s2,s3s, …) And also find the sub string(s1,s2,s3, …) that make the string “S”.
Can anyone help me to solve this problem? Thanks a lot.
Aucun commentaire:
Enregistrer un commentaire