Talk:String (computer science): Difference between revisions

Content deleted Content added
Ruud Koot (talk | contribs)
Reverse string: second try
Line 100:
 
: Reverse would be the correct terminology, but as currently formulated your statement would either not be general enough (only working for two character strings) or, worse, likely be misinterpreted as stating that WORLDHELLO and LOWORLDHEL would be reverses of HELLOWORLD (instead of DLROWOLLEH.) —''[[User:Ruud Koot|Ruud]]'' 23:09, 9 November 2012 (UTC)
 
::How about this:
::: A string ''s'' = abc, composed of zero or more characters of the alphabet (here, 'a', 'b', and 'c'), is said to be the [[reverse]] of string ''t'' if ''t'' = cba. For example, if Σ = {0,1} the string 0011001 is the reverse of 1001100. A string that is the reverse of itself is also called a [[palindrome]]. The empty string and all strings of length 1 are reverses of themselves.
::I don't see the confusion; it states that we're talking about a string of ''zero or more characters of the alphabet'', and the example of 0011001 should make it additionally clear that we're talking about the ordering of the ''characters'' of the string, not ''substrings'' of the string. If you think this is still confusing, we could instead use HELLOWORLD and DLROWOLLEH, but this requires a larger symbol alphabet ({D,E,H,L,O,R,W}), which complicates the description somewhat. — [[User:Loadmaster|Loadmaster]] ([[User talk:Loadmaster|talk]]) 18:02, 13 November 2012 (UTC)