in reply to Re: Merging Two Strings
in thread Merging Two Strings

Dear GrandFather,
Do you mean that you wish to concatenate two strings, but to minimise the length of the final string by maximising the overlap between the end of the first string and the start of the second string?
Yes GrandFather, that's very precise.
In practise how long might the strings be and big may the overlap be?
They are very short. Not longer than 20 alphabets.
Is efficiency in terms of execution time a factor?
No.

Regards,
Edward

Replies are listed 'Best First'.
Re^3: Merging Two Strings
by GrandFather (Saint) on Oct 27, 2005 at 07:45 UTC

    However that doesn't quite work with your third example. Lets try again:

    You wish to concatenate two strings by overlaping the end of the first string and the start of the second string by the minimum distance that they match?

    Perl is Huffman encoded by design.
      You wish to concatenate two strings by overlaping the end of the first string and the start of the second string by the minimum distance that they match?

      Hmmm... Too me it looks like: Match as much as possible but if there are more matches, take the 2nd best match.

      OTOH: This contradics Example 2.


      s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
      +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
Re^3: Merging Two Strings
by graff (Chancellor) on Oct 27, 2005 at 07:55 UTC
    Face it, monkfan: one way or another, your examples as originally posted do not lead to a consistent description of the task -- they are not compatible with one another.

    Please look them over carefully, figure out which example needs to be fixed, and update your post to clearly mark (not delete) the original example that was wrong; also provide a corrected version of that example, and mark it clearly as an update.

    Otherwise, some of us will be inclined to downvote you.