Empty string: Difference between revisions

Content deleted Content added
m tags fixed
Citation bot (talk | contribs)
Add: s2cid. | Use this bot. Report bugs. | Suggested by Abductive | Category:Formal languages | #UCB_Category 51/202
Line 7:
Formally, a string is a finite, ordered sequence of [[character (symbol)|characters]] such as letters, digits or spaces. The empty string is the special case where the sequence has length zero, so there are no symbols in the string.
There is only one empty string, because two strings are only different if they have different lengths or a different sequence of symbols.
In formal treatments,<ref>{{cite journal |first1=John |last1=Corcoran |first2=William |last2=Frank |first3=Michael |last3=Maloney |title=String theory |journal=Journal of Symbolic Logic |volume=39 |issue=4 |year=1974 |pages=625–637 |doi=10.2307/2272846 |jstor=2272846|s2cid=2168826 }}</ref> the empty string is denoted with '''[[ε]]''' or sometimes '''[[Λ]]''' or '''[[λ]]'''.
 
The empty string should not be confused with the empty language [[∅]], which is a [[formal language]] (i.e. a set of strings) that contains no strings, not even the empty string.