Talk:Formal language

message: In the "Words over an Alphabet" section, a "word" is defined to be a "finite sequence" or "string."  However, in other areas, it appears infinite sequences are permitted.  For example, the \Sigma* set of all words contains countably infinite strings.  As well, the section on constructions talks of infinitely long words.  Does the "Words over an Alphabet" section need to be changed? 199.46.196.230 (talk) 22:29, 2 November 2015 (UTC)
replies: text: This article consistently talks about finitely long words only, even in the Constructions section. However, there are usually infinitely many such words, so \Sigma^* is an infinite set of finite-length words. The article is correct in this respect. - Jochen Burghardt (talk) 07:05, 3 November 2015 (UTC)
thread_title:  Infinite words 

message: According to
http://en.wikipedia.org/wiki/Recursively_enumerable_language
and
http://en.wikipedia.org/wiki/Recursive_language
RE-languages are not closed under set difference, recursive ones are. In the charts its the other way round....  —Preceding unsigned comment added by 79.205.161.224 (talk) 17:11, 8 November 2009 (UTC)
replies: text: I want to fix this. Can you tell me where it is in the article? — Carl (CBM · talk) 14:17, 9 November 2009 (UTC)

text: I thought you were talking about set difference, which I don't see in the article. I have to think for a while about string substitution; I don't see why there is a problem with either recursive or r.e. languages there, but I might ahve misread the definition of substitution. Could you explain briefly or give some counterexample to help me understand? — Carl (CBM · talk) 20:10, 9 November 2009 (UTC)
thread_title:  Failure in "Operations on languages"-chart 

message: What are the differences between the formal languages and the natural languages? It cannot be grammar solely, as many natural languages such as English have their own defined grammar. --Abdull (talk) 15:17, 28 August 2010 (UTC)
replies: text: They are really totally different things, only vaguely similar. A formal language only consists of strings over a fixed alphabet, and the meaning (if one even exists) is not part of the formal language itself. A natural language is more than a collection of strings. It's even more than a structured collection of strings (written language) plus a structured collection of phoneme strings (spoken language), in many, many variants (dialects), with various correspondences between them. The meaning is also part of the language. And in some sense it's less than a formal language because for many strings it's not entirely clear whether they are grammatical or not. Some examples of borderline cases w.r.t. to the English language: "Let's write a poëm." "Have you been in 北京市 recently?" "Ceci n'est pas un double-entendre." "Ye five-and-twenty year-olde archaism." Or take any sentence that consists entirely of standard English words and follows the rules of English grammar precisely – but consists of more words than there are atoms in the universe. For a formal language, for each of these strings it would have to be decided once and for all whether they are part of the language or not. Hans Adler 15:35, 28 August 2010 (UTC)
replies: text: I'll probably keep repeating this until I'm blue in the face: I disagree with your formulation.  A formal language is a language with a formal (i.e. mathematical) definition; a language (formal language theory) is what this article and your reply here are devoted to, but such a thing is usually just called a language, not a formal language, and it is a related, but clearly different notion in any case.  The two notions should be clearly separated because most of the discussion on this page arises from confusing the two; as far as I'm concerned, they should have their own separate articles (full of cross-references). Rp (talk) 11:39, 30 August 2010 (UTC)
replies: text: I could make sense of your post by looking at your archived posts, but I am not sure your distinction is as important as you are making it. It happens all the time in mathematics that a certain type of structure is studied in a pure form, but also arises in applications, where it carries extra structure and extra meaning that is important for the application but not necessarily reflected by use of a different name. I can see some arguments for the POV that a language in the sense of formal language theory is the pure structure, while a formal language, as it arises in other contexts, is the applied thing which is typically a language in the former sense plus extra structure of one kind or another. Under this POV formal languages would not have a precise mathematical definition (unless it is something like "language plus arbitrary extra structure"). But I have never seen any source that discusses both languages and formal languages and distinguishes them. Therefore it seems more natural to me to assume that "language" is an abbreviation for "formal language" which is generally used in formal language theory, in the same way that in some contexts "group" is an abbreviation for "algebraic group" or "topological group". Hans Adler 12:09, 30 August 2010 (UTC)
replies: text: I agree, except that it's the other way round: formal language theory is devoted solely to studying the possible form of language and how to describe it, which explains its extremely narrow definition of language, excluding structure and excluding meaning, which are intrinsic properties of language in every other context of use of the term that I've ever seen.  If you haven't been subjected to formal language theory, this distinction is nearly impossible to grasp; if you have, it should be easier, except that computer scientists and mathematicians tend to confuse formal definitions of terms with everyday use of the same terms.  I believe this (lack of) distinction is what creates and recreates the confusing discussions on this talk page and the confounding of notions within the article itself. Rp (talk) 21:03, 30 August 2010 (UTC)
replies: text: I always thought a formal language was a set of strings over a finite alphabet, and of course there are 2^{\aleph_0} such sets, most of them undefinable in the sense of definable real number.  Natural language is completely different, and as a concept it's more from biology or psychology than mathematics.  There's no way to pin down exactly what English is, not because it's mathematically undefinable, but because we each have our own idiolect that is constantly changing. 67.119.3.248 (talk) 17:17, 1 September 2010 (UTC)

text: I really think it depends on the context in which you encounter the term. Rp (talk) 23:46, 26 December 2010 (UTC)
thread_title:  Formal language vs. natural language 

message: The table of operations on languages is helpful but limited to "classical" formal languages (REG, DCFL, CFL, CSL, R, RE). It would be nice to include other classes of languages as well:
* Linear languages (LIN) which are between REG and CFL. There is also DLIN between REG and DCFL.  — Preceding unsigned comment added by JakobVoss (talk • contribs) 13:21, 19 April 2011 (UTC)
thread_title:  Operations on other languages 

message: I know I'm flogging an archived horse, but the present text is still assuming logic as the context in places.
In particular, I don't think the term 'formal system' is widely used outside that context and the term "well-formed formula" is specific to logic (although the concept applies elsewhere). Rp (talk) 13:45, 19 December 2011 (UTC)
thread_title:  The term 'formal system' should do 

message: Following a recent discussion, Object theory was blanked and turned into a disambiguation page. 
Of all pages I could think of, it seems to me that its previous content was most relevant to this page, so editors may want to consult the page history for anything salvageable. Felix QW (talk) 11:37, 4 July 2022 (UTC)
replies: text: This is a rather baffling page indeed. Direct link for the curious. I don't think formal languages is really the right target, but I don't much of the content is salvageable anyway. It's all using obscure terminology (probably from Kleene's book) and the few references are either generic or obscure. Better to have articles describing these concepts in the proper modern terminology. Caleb Stanford (talk) 14:42, 4 July 2022 (UTC)
replies: text: The content seems appropriate for a page on formal systems, not formal language theory. Rp (talk) 20:59, 11 July 2022 (UTC)
replies: text: To me it looks closer to Structure (mathematical logic). —David Eppstein (talk) 22:16, 11 July 2022 (UTC)
thread_title:  Content at [[Object theory]] 

message: The first bulletpoint in the section Examples contains does not contain -or "=". This should probably be does not contain "+" or "=", but I'll leave that to someone with more knowledge on the subject to correct. 159.100.126.214 (talk) 13:09, 9 September 2022 (UTC)
replies: text: Thank you! Corrected. Felix QW (talk) 14:29, 9 September 2022 (UTC)
thread_title:  Error in examples 

message: There's the concept of equivalence of two grammars, and the respective article (Equivalence (formal languages)) really should be linked somewhere in here. Shuween (talk) 17:16, 7 March 2023 (UTC)
replies: text: The article you linked has issues in the lead that are unresolved for 9 years; so I consider it essentially unmaintained and hardly helpful. In the general article about formal languages (defined by what ever formalism, not necessarily a grammar, let alone a context-free one), not much can be said about equivalence. In context-free grammar the remark you suggest is already present; in regular grammar, I just added it, inspired by your above post. - Jochen Burghardt (talk) 18:01, 7 March 2023 (UTC)
thread_title:  Mention the topic of equivalence of two grammars 

message: This seems to me to contradict itself by requiring that character encoding sets by finite while alphabets may be infinite. I would prefer other editors more familiar with the topic make any necessary changes; I'm not sufficiently familiar with this topic to write with precision on it. Daask (talk) 15:56, 5 October 2023 (UTC)
replies: text: Character encoding sets such as ASCII or Unicode are finite; that is not a requirement, just an observation. They are examples of things that one could use as an alphabet, but not the only examples. The infinite alphabet described in the footnote is another example. —David Eppstein (talk) 16:04, 5 October 2023 (UTC)
thread_title:  Finite or infinite alphabet 

message: The tree in the example ("Colorless green ideas sleep furiously") is not particularly theoretically up-to-date (most modern syntax does not use S, and would prefer DP, vP shells and so on). I know that this page is about formal languages more generally, but the caption "Structure of the syntactically well-formed, although nonsensical, English sentence" refers to the structure of the English sentence. This gives the impression that the structure of English sentences (as opposed to, e.g. toy languages modeled on English as used in NLP textbooks) is like this, which is inaccurate for most modern linguists.  
On the other hand, if the purpose is just to show a tree of any formal language, why include the empty X' levels (e.g. N'-N'-N) at all? To someone coming from a non-linguistic background, these could also be confusing, particularly as this tree has so many of them. The saved vertical space could also be used to incorporate the rewrite rules in Chomsky Normal Form used to generate the tree (which would be much simpler if the bar-levels were removed). BobEret (he/him) (talk) 18:29, 9 January 2024 (UTC)
replies: text: You have a good point. I think the right answer is the Wikipedia answer: source the material. Use a tree from a published article, refer to it, and explain the context. Rp (talk) 13:14, 13 January 2024 (UTC)

text: ... and [in this case] additionally: provide an image that shows your new tree. - Jochen Burghardt (talk) 19:01, 14 January 2024 (UTC)
thread_title:  Update the tree?