Two strings u1 u2 ... uk and v1 v2 ... vl are isomorphic if and only if k = l and there exists a injection g such that ui = g for all i ∈ {1, 2, ..., k}. Note that a function f is injection if and only if f ≠ f for all x ≠ y. Bobo would like to choose some strings from all n/2 substrings of the given string s1 s2 ... sn. Find out the maximum number of strings he may choose so that no two chosen strings are isomorphic.
Two strings u1 u2 ... uk and v1 v2 ... vl are isomorphic if and only if k = l and there exists a injection g such that ui = g(vi) for all i ∈ {1, 2, ..., k}. Note that a function f is injection if and only if f(x) ≠ f(y) for all x ≠ y. Bobo would like to choose some strings from all n(n +1)/2 substrings of the given string s1 s2 ... sn. Find out the maximum number of strings he may choose so that no two chosen strings are isomorphic.
(图片来源网络,侵删)
文章来源:
arkfactor
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。