Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:最长公共子串的简单证明

Posted by test722_ at 2009-10-07 20:02:34 on Problem 1159
In Reply To:最长公共子串的简单证明 Posted by:alpc29 at 2009-09-26 16:39:48
> S和S’(s的逆)的最长公共子串一定是回文。
> S中去掉在最长公共子串中的字符,剩下的字符组成的字符串K。可以证明K中的所有子串都不是回文,否则,最长公共子串会增加。因为添加最少的字符使原字符串为回文,则最长公共子串因为是回文不用添加了。如果,添加的字符使K成为回文,则达到了目的,而且是最小的。K=a1a2a3-->a1a2a3a3a2a1。
是子序列吧,怎么都搞成子串!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator