String Item

From GM-RKB
(Redirected from String (computer science))
Jump to: navigation, search

A String Item is a tuple of items (string members) from a finite alphabet.



References

2011

  • (Wikipedia, 2011) ⇒ http://en.wikipedia.org/wiki/String_(computer_science)
    • In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet.

      In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and/or the length changed, or it may be fixed (after creation). A string is generally understood as a data type and is often implemented as a byte (or word) array that stores a sequence of elements, typically characters, using some character encoding. A string may also denote more general array data types and/or other sequential data types and structures; terms such as byte string, or more general, string of datatype, or datatype-string, are sometimes used to denote strings in which the stored data does not (necessarily) represent text.

      Depending on programming language and/or precise datatype used, a variable declared to be a string may either cause storage in memory to be statically allocated for a predetermined max length or employ dynamic allocation to allow it to hold chronologically variable number of elements.

      When a string appears literally in source code, it is known as a string literal and has a representation that denotes it as such.

      Let Σ be an alphabet, a non-empty finite set. Elements of Σ are called symbols or characters. A string (or word) over Σ is any finite sequence of characters from Σ. For example, if Σ = {0, 1}, then 0101 is a string over Σ.

      The length of a string is the number of characters in the string (the length of the sequence) and can be any non-negative integer. The empty string is the unique string over Σ of length 0, and is denoted ε or λ.

      The set of all strings over Σ of length n is denoted Σn. For example, if Σ = {0, 1}, then Σ2 = {00, 01, 10, 11}. Note that Σ0 = {ε} for any alphabet Σ.

2009

  • http://www.csee.umbc.edu/help/theory/lang_def.shtml
    • String also called a Word
      • A finite sequence of symbols from an alphabet.
      • 01110 and 111 are strings from the alphabet B above.
      • aaabccc and b are strings from the alphabet C above.
      • A null string is a string with no symbols, usually denoted by epsilon.
      • The null string has length zero.
      • The null string is usually denoted epsilon.
      • Vertical bars around a string indicate the length of a string expressed as a natural number. For example |00100| = 5, |aab| = 3, | epsilon | = 0

2007