@ Arif Ali Saiyed
No.    s1 = abbbbbaba
         s2 =  aaaaabba
in s1 , the longest palidrome is abbbbba , and the total number of substring
which is palindromes is 3
     in s2 ,  the  longest palidrome is aaaaa, but if we use the longest
palidrome as the substring palidrome , the number will be 3,
     but if who use aaaa, abba ,  then the number would be 2 .

    So , this question has some difference with the question which ask for
the longest palindrome
2010/11/17 Arif Ali Saiyed <[email protected]>

> Hi Can you explain following with an example
> "esign an
> e cient al-gorithm to determine the minimum number of palindromes in
> adecomposition for a given string, "
> are you asking to find the longest palindrome ?
> -Arif
>
>
> On Nov 16, 11:51 pm, lichenga2404 <[email protected]> wrote:
> > A palindrome is a string which is identical to itself in reverse
> > order. For example
> > \ABAAABA" is a palindrome. Given a string, we'd like to break it up
> > into the small-
> > est possible number of palindromes. Of course, any one-character
> > string is a palindrome
> > so we can always break a length n string into n palindromes. Design an
> > e cient al-
> > gorithm to determine the minimum number of palindromes in a
> > decomposition for a
> > given string, and analyze the running time. You may assume you are
> > given a proce-
> > dure Palindrome(S) which runs in time O(jSj) and returns true if and
> > only if S is a
> > palindrome.
> >
> >   How to solve this problem with the dynamic programming method?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
licheng

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to