Talk:String operations
![]() | Computer science Start‑class Mid‑importance | ||||||||||||||||
|
Substitution: maps to languages or to strings or either?
Naive question: In "String substitution" we read that the a substitution "... is a mapping f that maps letters ... to languages"; but in "String homomorphism" we read that a homomorphism "... is a string substitution such that each letter is replaced by a single string". Now strings are categorically distinct from languages (aren't they?), so surely a substitution can't be defined both as something that maps letters to languages and also as something that maps letters to strings. It seems confusing at best. --Bmcm (talk) 12:22, 19 February 2014 (UTC)
- I agree. Hopcroft and Ullman, after having defined substitutions and strings (on p.60) in the same way as in the article, add the following remark: "We generally take h(a) [for a homomorphism h] to be the string itself, rather than the set containing that string." A similar remark should be added in the article. - Jochen Burghardt (talk) 17:59, 19 February 2014 (UTC)
String substitution
What does this mean? An example of string substitution occurs in regular languages, which are closed under string substitution. That is, if the letters of a regular language are substituted by other regular languages, the result is still a regular language. What is the reference? Deltahedron (talk) 21:05, 22 March 2013 (UTC)
- I'll think about an example for that. Meanwhile, I hope that the examples I added are helpful and not too trivial.
- Another question: aren't regular (string) languages also closed w.r.t. inverse string homomorphisms? The TATA-Book (reference see Regular_tree_grammar#External_links) says, even regular tree languages are. However, I didn't check whether its notion of inverse homomorphism its similar to the one here. Jochen Burghardt (talk) 15:52, 25 May 2013 (UTC)
Prefix example question
(I came here to get an idea what 'prefix-closed assertion' could mean) The example says
what I don't know: does that mean 'abc' is the only word, so I might shorten the word but not mix it/ make it longer? thanks