How to prove that a string,
s is made up of
n > 1 subsequences occurring some arbitrary number of times using concatenation and stripping first and last character?
s = xyzxyz, subsequence is
xyz and it occurs 2 times. The solution is to concatenate the same string e.g.
xyzxyzxyzxyz and then strip the first and last character to get
yzxyzxyzxy, then you find
xyzxyz) inside that.
- The word
Tabledoes not have a subsequence so the above method will give:
ableTabl-> which does not contain Table so Table does not contain a subsequence
- The word
mmebmmebmmeb-> has to return true with the above method because it contains
mmebrepeated 3 times. So,
mmebmmebmmeb || mmebmmebmmeb->
mmebmmebmmebmmebmmebmmeb-> (strip first and last)
My thought was to assume that there is at least one character in
s that will invalidate the occurrence of a subsequence. E.g. instead of
xyz occurring three times) we have
a is the wrong char. Now we assume that in
yzxyzxyaxyzxyzxy (after concatenation and stripping first and last) that the string
s does exist which should be a contradiction - but I am stuck.
Could someone give me a formal mathematical proof?