Talk:Empty string
This is the talk page for discussing improvements to the Empty string article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article has not yet been rated on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
|
Untitled
This could benefit from attention by an expert in theoretical computer science. Since I'm not even close to that, I'll just make it a bit more readable. Charlie.liban (talk) 17:50, 12 February 2008 (UTC)
Added a bit explaining the difference between null and "", though I couldn't find a concise way of explaining the difference. Modifications welcome! And I'm supposed to be a computer scientist ... 199.43.13.100 (talk) 14:20, 3 July 2008 (UTC)
- Empty strings exist as an additive identity element, both in formal language theory (at least the theory that I took!) and in programming languages. They're just another string, but they happen to have interesting properties - much like 0 for algebra. I guess the confusion comes from the empty part: empty sets (which might be referred to as null sets) have zero elements; empty strings (confusingly called null strings) have zero symbols. On top of this, there are a whole slew of slightly different concepts related to null.
- charlie liban (talk) 20:05, 8 July 2008 (UTC)
Empty String v Language
Hi, at the moment the empty language page redirects to this empty string page. This page correctly notes that they should not be confused (!), if somebody with more wikipedia knowledge than me could create the page for 'Empty language' and create a stub for it, that would be great! — Preceding unsigned comment added by 118.93.63.129 (talk) 03:13, 7 April 2012 (UTC)
Fixed [1] [2]. Incnis Mrsi (talk) 08:48, 7 April 2012 (UTC)
Vacuous truth
Is it like the empty set, in that every statement about it is true (including the negation of every statement)? For example, is it alphanumeric, is it not, or is it both (or perhaps neither)? TheGoatOfSparta (talk) 14:52, 21 January 2024 (UTC)
- Yes, vacuous truth applies to the empty string (it applies to anything that contains nothing), but the description you gave is not exactly what vacuous truth means. That sounds more like the principle of explosion, which is that any statement can be considered true given false assumptions, or in other words, that anything can be proven based on a contradiction. There is nothing contradictory about an empty string,[a] so there are true statements and false statements about empty strings. An example of a statement that is obviously false, is that it contains 'x' – it doesn't contain anything by definition.
- Vacuous truth comes in when we're making a statement about all elements of the empty string. Because of De Morgan's laws, we know that such statements are exactly the same as saying there there does not exist a counterexample – and the empty string does not contain anything, so it's true. So, the statements "all characters are 'x'" and "all characters are not 'x'" are both true, because they're both "it does not contain something". The empty string is alphanumeric, because a string being alphanumeric is defined as all characters in the string being letters or numbers. However, it is false to say that it's not alphanumeric, because then we're no longer saying "all" so "there does not exist", we're saying "not all" so "does exist", which is always false for the empty string. I hope that is clear.
- I just added a mention of this in the 'Formal theory' section :) ―Jochem van Hees (talk) 15:38, 21 January 2024 (UTC)
- According to your logic, the statement "all characters of the empty string are not alphanumeric" is true, because there is no counterexample: the empty string does not contain an alphanumeric character. Therefore, the string is not alphanumeric and it is also alphanumeric. TheGoatOfSparta (talk) 19:21, 21 January 2024 (UTC)
Notes
- ^ Nothing contradictory that we know of, anyway. We can't be certain because of Gödel's second incompleteness theorem.
- All unassessed articles
- Start-Class Computing articles
- Low-importance Computing articles
- Start-Class software articles
- Low-importance software articles
- Start-Class software articles of Low-importance
- All Software articles
- Start-Class Computer science articles
- Mid-importance Computer science articles
- All Computing articles
- Start-Class Philosophy articles
- Low-importance Philosophy articles
- Start-Class logic articles
- Low-importance logic articles
- Logic task force articles
- WikiProject Computer science articles