String operations: Difference between revisions

Content deleted Content added
Reverted good faith edits by Dominus (talk): Not clearly improving
 
(6 intermediate revisions by 6 users not shown)
Line 78:
 
==String homomorphism==
A '''string homomorphism''' (often referred to simply as a [[Homomorphism#Homomorphisms and e-free homomorphisms in formalFormal language theory|homomorphism]] in [[formal language theory]]) is a string substitution such that each character is replaced by a single string. That is, <math>f(a)=s</math>, where <math>s</math> is a string, for each character <math>a</math>.<ref group="note" name="singleton sets">Strictly formally, a homomorphism yields a language consisting of just one string, i.e. <math>f(a) = \{s\}</math>.</ref><ref>Hopcroft, Ullman (1979), Sect.3.2, p.60-61</ref>
 
String homomorphisms are [[monoid morphism]]s on the [[free monoid]], preserving the empty string and the [[binary operation]] of [[string concatenation]]. Given a language <math>L</math>, the set <math>f(L)</math> is called the '''homomorphic image''' of <math>L</math>. The '''inverse homomorphic image''' of a string <math>s</math> is defined as
 
<math>f^{-1}(s) = \{ w |\mid f(w) = s \}</math>
 
while the inverse homomorphic image of a language <math>L</math> is defined as
 
<math>f^{-1}(L) = \{ s |\mid f(s) \in L \}</math>
 
In general, <math>f(f^{-1}(L)) \neq L</math>, while one does have
Line 149:
This is not a generalization of the above definition, since, for a string ''s'' and distinct characters ''a'', ''b'', Hopcroft's and Ullman's definition implies {{nowrap||{{mset|''sa''}} / {{mset|''b''}}}} yielding {{mset|}}, rather than {{mset| ε }}.
 
The left quotient (when defined similar to Hopcroft and Ullman 1979) of a singleton language ''L''<sub>1</sub> and an arbitrary language ''L''<sub>2</sub> is known as [[Brzozowski derivative]]; if ''L''<sub>2</sub> is represented by a [[regular expression]], so can be the left quotient.<ref>{{cite journal| author=Janusz A. Brzozowski| authorlink=Janusz Brzozowski (computer scientist)|title=Derivatives of Regular Expressions| journal=J ACM| year=1964| volume=11| issue=4| pages=481–494| doi=10.1145/321239.321249| s2cid=14126942| doi-access=free}}</ref>
 
==Syntactic relation==
Line 160:
:<math>\{S/m\ \vert\ m\in M\}</math>
 
is finite. In the case that ''M'' is the monoid of words over some alphabet, ''S'' is then a [[regular language]], that is, a language that can be recognized by a [[finite -state automaton]]. This is discussed in greater detail in the article on [[syntactic monoid]]s.{{citation needed|date=August 2017}}
 
==Right cancellation==
Line 212:
* {{cite book | first1=John E. | last1=Hopcroft | first2=Jeffrey D. | last2=Ullman | title=Introduction to Automata Theory, Languages and Computation | publisher=Addison-Wesley Publishing | ___location=Reading, Massachusetts | year=1979 | isbn=978-0-201-02988-8 | zbl=0426.68001 | url-access=registration | url=https://archive.org/details/introductiontoau00hopc }} ''(See chapter 3.)''
{{reflist}}
{{Strings}}
 
[[Category:Formal languages]]