id
stringlengths
14
20
title
stringlengths
4
181
text
stringlengths
1
43k
source
stringclasses
1 value
wiki_18_chunk_22
APL (programming language)
As other vendors were busy developing APL interpreters for new hardware, notably Unix-based microcomputers, APL2 was almost always the standard chosen for new APL interpreter developments. Even today, most APL vendors or their users cite APL2 compatibility, as a selling point for those products. IBM cites its use for p...
wikipedia
wiki_18_chunk_23
APL (programming language)
Modern implementations Various implementations of APL by APLX, Dyalog, et al., include extensions for object-oriented programming, support for .NET Framework, XML-array conversion primitives, graphing, operating system interfaces, and lambda calculus expressions.
wikipedia
wiki_18_chunk_24
APL (programming language)
Derivative languages APL has formed the basis of, or influenced, the following languages: A and A+, an alternative APL, the latter with graphical extensions. FP, a functional programming language. Ivy, an interpreter for an APL-like language developed by Rob Pike, and which uses ASCII as input. J, which was also de...
wikipedia
wiki_18_chunk_25
APL (programming language)
Language characteristics Character set
wikipedia
wiki_18_chunk_26
APL (programming language)
APL has been criticized and praised for its choice of a unique, non-standard character set. Some who learn it become ardent adherents. In the 1960s and 1970s, few terminal devices or even displays could reproduce the APL character set. The most popular ones employed the IBM Selectric print mechanism used with a special...
wikipedia
wiki_18_chunk_27
APL (programming language)
Over time, with the universal use of high-quality graphic displays, printing devices and Unicode support, the APL character font problem has largely been eliminated. However, entering APL characters requires the use of input method editors, keyboard mappings, virtual/on-screen APL symbol sets, or easy-reference printed...
wikipedia
wiki_18_chunk_28
APL (programming language)
In defense of APL, it requires fewer characters to type, and keyboard mappings become memorized over time. Special APL keyboards are also made and in use today, as are freely downloadable fonts for operating systems such as Microsoft Windows. The reported productivity gains assume that one spends enough time working in...
wikipedia
wiki_18_chunk_29
APL (programming language)
Design Unlike traditionally structured programming languages, APL code is typically structured as chains of monadic or dyadic functions, and operators acting on arrays. APL has many nonstandard primitives (functions and operators) that are indicated by a single symbol or a combination of a few symbols. All primitives ...
wikipedia
wiki_18_chunk_30
APL (programming language)
Early APL implementations (circa 1970 or so) had no programming loop-flow control structures, such as do or while loops, and if-then-else constructs. Instead, they used array operations, and use of structured programming constructs was often not necessary, since an operation could be performed on a full array in one st...
wikipedia
wiki_18_chunk_31
APL (programming language)
The APL environment is called a workspace. In a workspace the user can define programs and data, i.e., the data values exist also outside the programs, and the user can also manipulate the data without having to define a program. In the examples below, the APL interpreter first types six spaces before awaiting the user...
wikipedia
wiki_18_chunk_32
APL (programming language)
APL uses a set of non-ASCII symbols, which are an extension of traditional arithmetic and algebraic notation. Having single character names for single instruction, multiple data (SIMD) vector functions is one way that APL enables compact formulation of algorithms for data transformation such as computing Conway's Game ...
wikipedia
wiki_18_chunk_33
APL (programming language)
Because of the unusual character set, many programmers use special keyboards with APL keytops to write APL code. Although there are various ways to write APL code using only ASCII characters, in practice it is almost never done. (This may be thought to support Iverson's thesis about notation as a tool of thought.) Most...
wikipedia
wiki_18_chunk_34
APL (programming language)
Advocates of APL claim that the examples of so-called write-only code (badly written and almost incomprehensible code) are almost invariably examples of poor programming practice or novice mistakes, which can occur in any language. Advocates also claim that they are far more productive with APL than with more conventio...
wikipedia
wiki_18_chunk_35
APL (programming language)
They also may claim that because it is compact and terse, APL lends itself well to larger-scale software development and complexity, because the number of lines of code can be reduced greatly. Many APL advocates and practitioners also view standard programming languages such as COBOL and Java as being comparatively ted...
wikipedia
wiki_18_chunk_36
APL (programming language)
Terminology APL makes a clear distinction between functions and operators. Functions take arrays (variables or constants or expressions) as arguments, and return arrays as results. Operators (similar to higher-order functions) take functions or arrays as arguments, and derive related functions. For example, the sum fu...
wikipedia
wiki_18_chunk_37
APL (programming language)
APL also identifies those features built into the language, and represented by a symbol, or a fixed combination of symbols, as primitives. Most primitives are either functions or operators. Coding APL is largely a process of writing non-primitive functions and (in some versions of APL) operators. However a few primitiv...
wikipedia
wiki_18_chunk_38
APL (programming language)
APL has explicit representations of functions, operators, and syntax, thus providing a basis for the clear and explicit statement of extended facilities in the language, and tools to experiment on them. Examples Hello, world This displays "Hello, world": 'Hello, world'A design theme in APL is to define default actions...
wikipedia
wiki_18_chunk_39
APL (programming language)
Exponentiation Another example of this theme is that exponentiation in APL is written as , which indicates raising 2 to the power 3 (this would be written as in some other languages and in FORTRAN and Python). Many languages use to signify multiplication, as in , but APL chooses to use . However, if no base is spec...
wikipedia
wiki_18_chunk_40
APL (programming language)
Simple statistics Suppose that is an array of numbers. Then gives its average. Reading right-to-left, gives the number of elements in X, and since is a dyadic operator, the term to its left is required as well. It is surrounded by parentheses since otherwise X would be taken (so that the summation would be of — ea...
wikipedia
wiki_18_chunk_41
APL (programming language)
Naturally, one would define this expression as a function for repeated use rather than rewriting it each time. Further, since assignment is an operator, it can appear within an expression, so the following would place suitable values into T, AV and SD: Pick 6 lottery numbers This following immediate-mode expression ge...
wikipedia
wiki_18_chunk_42
APL (programming language)
The above does a lot, concisely, although it may seem complex to a new APLer. It combines the following APL functions (also called primitives and glyphs): The first to be executed (APL executes from rightmost to leftmost) is dyadic function ? (named deal when dyadic) that returns a vector consisting of a select number...
wikipedia
wiki_18_chunk_43
APL (programming language)
Since there is no function to the left of the left-most x to tell APL what to do with the result, it simply outputs it to the display (on a single line, separated by spaces) without needing any explicit instruction to do that. ? also has a monadic equivalent called roll, which simply returns one random integer between ...
wikipedia
wiki_18_chunk_44
APL (programming language)
Prime numbers The following expression finds all prime numbers from 1 to R. In both time and space, the calculation complexity is (in Big O notation). (~R∊R∘.×R)/R←1↓⍳R
wikipedia
wiki_18_chunk_45
APL (programming language)
Executed from right to left, this means: Iota ⍳ creates a vector containing integers from 1 to R (if R= 6 at the start of the program, ⍳R is 1 2 3 4 5 6) Drop first element of this vector (↓ function), i.e., 1. So 1↓⍳R is 2 3 4 5 6 Set R to the new vector (←, assignment primitive), i.e., 2 3 4 5 6 The / replicate o...
wikipedia
wiki_18_chunk_46
APL (programming language)
Build a vector the same length as R with 1 in each place where the corresponding number in R is in the outer product matrix (∈, set inclusion or element of or Epsilon operator), i.e., 0 0 1 0 1 Logically negate (not) values in the vector (change zeros to ones and ones to zeros) (∼, logical not or Tilde operator), i.e....
wikipedia
wiki_18_chunk_47
APL (programming language)
Sorting The following expression sorts a word list stored in matrix X according to word length: X[⍋X+.≠' ';] Game of Life The following function "life", written in Dyalog APL, takes a boolean matrix and calculates the new generation according to Conway's Game of Life. It demonstrates the power of APL to implement a c...
wikipedia
wiki_18_chunk_48
APL (programming language)
HTML tags removal In the following example, also Dyalog, the first line assigns some HTML code to a variable txt and then uses an APL expression to remove all the HTML tags (explanation): txt←'<html><body><p>This is <em>emphasized</em> text.</p></body></html>' {⍵ /⍨ ~{⍵∨≠\⍵}⍵∊'<>'} txt This is emphasized text.
wikipedia
wiki_18_chunk_49
APL (programming language)
Naming APL derives its name from the initials of Iverson's book A Programming Language, even though the book describes Iverson's mathematical notation, rather than the implemented programming language described in this article. The name is used only for actual implementations, starting with APL\360. Adin Falkoff coine...
wikipedia
wiki_18_chunk_50
APL (programming language)
Logo There has always been cooperation between APL vendors, and joint conferences were held on a regular basis from 1969 until 2010. At such conferences, APL merchandise was often handed out, featuring APL motifs or collection of vendor logos. Common were apples (as a pun on the similarity in pronunciation of apple an...
wikipedia
wiki_18_chunk_51
APL (programming language)
Despite all these community efforts, no universal vendor-agnostic logo for the programming language emerged. As popular programming languages increasingly have established recognisable logos, Fortran getting one in 2020, British APL Association launched a campaign in the second half of 2021, to establish such a logo fo...
wikipedia
wiki_18_chunk_52
APL (programming language)
Use APL is used for many purposes including financial and insurance applications, artificial intelligence, neural networks and robotics. It has been argued that APL is a calculation tool and not a programming language; its symbolic nature and array capabilities have made it popular with domain experts and data scienti...
wikipedia
wiki_18_chunk_53
APL (programming language)
APL is well suited to image manipulation and computer animation, where graphic transformations can be encoded as matrix multiplications. One of the first commercial computer graphics houses, Digital Effects, produced an APL graphics product named Visions, which was used to create television commercials and animation fo...
wikipedia
wiki_18_chunk_54
APL (programming language)
Today, APL remains in use in a wide range of commercial and scientific applications, for example investment management, asset management, health care, and DNA profiling, and by hobbyists. Notable implementations
wikipedia
wiki_18_chunk_55
APL (programming language)
APL\360 The first implementation of APL using recognizable APL symbols was APL\360 which ran on the IBM System/360, and was completed in November 1966 though at that time remained in use only within IBM. In 1973 its implementors, Larry Breed, Dick Lathwell and Roger Moore, were awarded the Grace Murray Hopper Award fro...
wikipedia
wiki_18_chunk_56
APL (programming language)
In 1975, the IBM 5100 microcomputer offered APL\360 as one of two built-in ROM-based interpreted languages for the computer, complete with a keyboard and display that supported all the special symbols used in the language. Significant developments to APL\360 included CMS/APL, which made use of the virtual storage capab...
wikipedia
wiki_18_chunk_57
APL (programming language)
APL\1130 In 1968, APL\1130 became the first publicly available APL system, created by IBM for the IBM 1130. It became the most popular IBM Type-III Library software that IBM released. APL*Plus and Sharp APL
wikipedia
wiki_18_chunk_58
APL (programming language)
APL*Plus and Sharp APL are versions of APL\360 with added business-oriented extensions such as data formatting and facilities to store APL arrays in external files. They were jointly developed by two companies, employing various members of the original IBM APL\360 development team. The two companies were I. P. Sharp ...
wikipedia
wiki_18_chunk_59
APL (programming language)
In 1985, Ian Sharp, and Dan Dyer of STSC, jointly received the Kenneth E. Iverson Award for Outstanding Contribution to APL. APL2 APL2 was a significant re-implementation of APL by IBM which was developed from 1971 and first released in 1984. It provides many additions to the language, of which the most notable is nest...
wikipedia
wiki_18_chunk_60
APL (programming language)
APLGOL In 1972, APLGOL was released as an experimental version of APL that added structured programming language constructs to the language framework. New statements were added for interstatement control, conditional statement execution, and statement structuring, as well as statements to clarify the intent of the algo...
wikipedia
wiki_18_chunk_61
APL (programming language)
Dyalog APL Dyalog APL was first released by British company Dyalog Ltd. in 1983 and, , is available for AIX, Linux (including on the Raspberry Pi), macOS and Microsoft Windows platforms. It is based on APL2, with extensions to support object-oriented programming and functional programming. Licences are free for persona...
wikipedia
wiki_18_chunk_62
APL (programming language)
In 1995, two of the development team - John Scholes and Peter Donnelly - were awarded the Iverson Award for their work on the interpreter. Gitte Christensen and Morten Kromberg were joint recipients of the Iverson Award in 2016.
wikipedia
wiki_18_chunk_63
APL (programming language)
NARS2000 NARS2000 is an open-source APL interpreter written by Bob Smith, a prominent APL developer and implementor from STSC in the 1970s and 1980s. NARS2000 contains advanced features and new datatypes and runs natively on Microsoft Windows, and other platforms under Wine. It is named after a development tool from th...
wikipedia
wiki_18_chunk_64
APL (programming language)
APLX is a cross-platform dialect of APL, based on APL2 and with several extensions, which was first released by British company MicroAPL in 2002. Although no longer in development or on commercial sale it is now available free of charge from Dyalog.
wikipedia
wiki_18_chunk_65
APL (programming language)
GNU APL GNU APL is a free implementation of Extended APL as specified in ISO/IEC 13751:2001 and is thus an implementation of APL2. It runs on Linux (including on the Raspberry Pi), macOS, several BSD dialects, and on Windows (either using Cygwin for full support of all its system functions or as a native 64-bit Windows...
wikipedia
wiki_18_chunk_66
APL (programming language)
Richard Stallman, founder of the GNU Project, was an early adopter of APL, using it to write a text editor as a high school student in the summer of 1969.
wikipedia
wiki_18_chunk_67
APL (programming language)
Interpretation and compilation of APL APL is traditionally an interpreted language, having language characteristics such as weak variable typing not well suited to compilation. However, with arrays as its core data structure it provides opportunities for performance gains through parallelism, parallel computing, massi...
wikipedia
wiki_18_chunk_68
APL (programming language)
Nevertheless, APL is rarely purely interpreted and compilation or partial compilation techniques that are, or have been, used include the following: Idiom recognition Most APL interpreters support idiom recognition and evaluate common idioms as single operations. For example, by evaluating the idiom BV/⍳⍴A as a single...
wikipedia
wiki_18_chunk_69
APL (programming language)
Optimised bytecode Weak typing in APL means that a name may reference an array (of any datatype), a function or an operator. In general, the interpreter cannot know in advance which form it will be and must therefore perform analysis, syntax checking etc. at run-time. However, in certain circumstances, it is possible ...
wikipedia
wiki_18_chunk_70
APL (programming language)
Compilation Compilation of APL has been the subject of research and experiment since the language first became available; the first compiler is considered to be the Burroughs APL-700 which was released around 1971. In order to be able to compile APL, language limitations have to be imposed. APEX is a research APL comp...
wikipedia
wiki_18_chunk_71
APL (programming language)
The STSC APL Compiler is a hybrid of a bytecode optimiser and a compiler - it enables compilation of functions to machine code provided that its sub-functions and globals are declared, but the interpreter is still used as a runtime library and to execute functions which do not meet the compilation requirements.
wikipedia
wiki_18_chunk_72
APL (programming language)
Standards APL has been standardized by the American National Standards Institute (ANSI) working group X3J10 and International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC), ISO/IEC Joint Technical Committee 1 Subcommittee 22 Working Group 3. The Core APL language is specifi...
wikipedia
wiki_18_chunk_73
APL (programming language)
Further reading An APL Machine (1970 Stanford doctoral dissertation by Philip Abrams) A Personal History Of APL (1982 article by Michael S. Montalbano) A Programming Language by Kenneth E. Iverson APL in Exposition by Kenneth E. Iverson Brooks, Frederick P.; Kenneth Iverson (1965). Automatic Data Processing, ...
wikipedia
wiki_18_chunk_74
APL (programming language)
Video The Origins of APL - a 1974 talk show style interview with the original developers of APL. APL demonstration - a 1975 live demonstration of APL by Professor Bob Spence, Imperial College London. Conway's Game Of Life in APL - a 2009 tutorial by John Scholes of Dyalog Ltd. which implements Conway's Game of Life...
wikipedia
wiki_18_chunk_75
APL (programming language)
Online resources TryAPL.org, an online APL primer APL Wiki APL2C, a source of links to APL compilers Providers Log-On APL2 Dyalog APL APLX APL2000 NARS2000 GNU APL OpenAPL
wikipedia
wiki_18_chunk_76
APL (programming language)
User groups and societies Finland: Finnish APL Association (FinnAPL) France: APL et J Germany: APL-Germany e.V. Japan: Japan APL Association (JAPLA) Sweden: Swedish APL User Group (SwedAPL) Switzerland: Swiss APL User Group (SAUG) United Kingdom: The British APL Association United States: ACM SIGPLAN chapter ...
wikipedia
wiki_18_chunk_77
APL (programming language)
.NET programming languages APL programming language family Array programming languages Command shells Dynamic programming languages Dynamically typed programming languages Functional languages IBM software Programming languages created in 1964 Programming languages with an ISO standard Programming languages
wikipedia
wiki_19_chunk_0
Kolmogorov complexity
In algorithmic information theory (a subfield of computer science and mathematics), the Kolmogorov complexity of an object, such as a piece of text, is the length of a shortest computer program (in a predetermined programming language) that produces the object as output. It is a measure of the computational resources n...
wikipedia
wiki_19_chunk_1
Kolmogorov complexity
The notion of Kolmogorov complexity can be used to state and prove impossibility results akin to Cantor's diagonal argument, Gödel's incompleteness theorem, and Turing's halting problem. In particular, no program P computing a lower bound for each text's Kolmogorov complexity can return a value essentially larger than ...
wikipedia
wiki_19_chunk_2
Kolmogorov complexity
abababababababababababababababab , and 4c1j5b2p0cv4w1x8rx2y39umgw5q85s7
wikipedia
wiki_19_chunk_3
Kolmogorov complexity
The first string has a short English-language description, namely "write ab 16 times", which consists of 17 characters. The second one has no obvious simple description (using the same character set) other than writing down the string itself, i.e., "write 4c1j5b2p0cv4w1x8rx2y39umgw5q85s7" which has 38 characters. Hence...
wikipedia
wiki_19_chunk_4
Kolmogorov complexity
More formally, the complexity of a string is the length of the shortest possible description of the string in some fixed universal description language (the sensitivity of complexity relative to the choice of description language is discussed below). It can be shown that the Kolmogorov complexity of any string cannot b...
wikipedia
wiki_19_chunk_5
Kolmogorov complexity
The Kolmogorov complexity can be defined for any mathematical object, but for simplicity the scope of this article is restricted to strings. We must first specify a description language for strings. Such a description language can be based on any computer programming language, such as Lisp, Pascal, or Java. If P is a...
wikipedia
wiki_19_chunk_6
Kolmogorov complexity
We could, alternatively, choose an encoding for Turing machines, where an encoding is a function which associates to each Turing Machine M a bitstring <M>. If M is a Turing Machine which, on input w, outputs string x, then the concatenated string <M> w is a description of x. For theoretical analysis, this approach is m...
wikipedia
wiki_19_chunk_7
Kolmogorov complexity
function GenerateString2() return "4c1j5b2p0cv4w1x8rx2y39umgw5q85s7" whereas the first string is output by the (much shorter) pseudo-code: function GenerateString1() return "ab" × 16
wikipedia
wiki_19_chunk_8
Kolmogorov complexity
If a description d(s) of a string s is of minimal length (i.e., using the fewest bits), it is called a minimal description of s, and the length of d(s) (i.e. the number of bits in the minimal description) is the Kolmogorov complexity of s, written K(s). Symbolically, K(s) = |d(s)|. The length of the shortest descriptio...
wikipedia
wiki_19_chunk_9
Kolmogorov complexity
Informal treatment There are some description languages which are optimal, in the following sense: given any description of an object in a description language, said description may be used in the optimal description language with a constant overhead. The constant depends only on the languages involved, not on the desc...
wikipedia
wiki_19_chunk_10
Kolmogorov complexity
In more technical terms, the first part of a description is a computer program (specifically: a compiler for the object's language, written in the description language), with the second part being the input to that computer program which produces the object as output. The invariance theorem follows: Given any descripti...
wikipedia
wiki_19_chunk_11
Kolmogorov complexity
Proof: Any description D in L can be converted into a description in the optimal language by first describing L as a computer program P (part 1), and then using the original description D as input to that program (part 2). The total length of this new description D′ is (approximately): |D′ | = |P| + |D| The length of P...
wikipedia
wiki_19_chunk_12
Kolmogorov complexity
A more formal treatment Theorem: If K1 and K2 are the complexity functions relative to Turing complete description languages L1 and L2, then there is a constant c – which depends only on the languages L1 and L2 chosen – such that ∀s. −c ≤ K1(s) − K2(s) ≤ c. Proof: By symmetry, it suffices to prove that there is some c...
wikipedia
wiki_19_chunk_13
Kolmogorov complexity
function InterpretLanguage(string p) where p is a program in L2. The interpreter is characterized by the following property: Running InterpretLanguage on input p returns the result of running p. Thus, if P is a program in L2 which is a minimal description of s, then InterpretLanguage(P) returns the string s. The length...
wikipedia
wiki_19_chunk_14
Kolmogorov complexity
History and context Algorithmic information theory is the area of computer science that studies Kolmogorov complexity and other complexity measures on strings (or other data structures). The concept and theory of Kolmogorov Complexity is based on a crucial theorem first discovered by Ray Solomonoff, who published it in...
wikipedia
wiki_19_chunk_15
Kolmogorov complexity
Andrey Kolmogorov later independently published this theorem in Problems Inform. Transmission in 1965. Gregory Chaitin also presents this theorem in J. ACM – Chaitin's paper was submitted October 1966 and revised in December 1968, and cites both Solomonoff's and Kolmogorov's papers.
wikipedia
wiki_19_chunk_16
Kolmogorov complexity
The theorem says that, among algorithms that decode strings from their descriptions (codes), there exists an optimal one. This algorithm, for all strings, allows codes as short as allowed by any other algorithm up to an additive constant that depends on the algorithms, but not on the strings themselves. Solomonoff used...
wikipedia
wiki_19_chunk_17
Kolmogorov complexity
When Kolmogorov became aware of Solomonoff's work, he acknowledged Solomonoff's priority. For several years, Solomonoff's work was better known in the Soviet Union than in the Western World. The general consensus in the scientific community, however, was to associate this type of complexity with Kolmogorov, who was con...
wikipedia
wiki_19_chunk_18
Kolmogorov complexity
There are several other variants of Kolmogorov complexity or algorithmic information. The most widely used one is based on self-delimiting programs, and is mainly due to Leonid Levin (1974). An axiomatic approach to Kolmogorov complexity based on Blum axioms (Blum 1967) was introduced by Mark Burgin in the paper presen...
wikipedia
wiki_19_chunk_19
Kolmogorov complexity
It is not hard to see that the minimal description of a string cannot be too much larger than the string itself — the program GenerateString2 above that outputs s is a fixed amount larger than s. Theorem: There is a constant c such that ∀s. K(s) ≤ |s| + c. Uncomputability of Kolmogorov complexity A naive attempt at a p...
wikipedia
wiki_19_chunk_20
Kolmogorov complexity
function KolmogorovComplexity(string s) for i = 1 to infinity: for each string p of length exactly i if isValidProgram(p) and evaluate(p) == s return i This program iterates through all possible programs (by iterating through all possible strings and only considering those wh...
wikipedia
wiki_19_chunk_21
Kolmogorov complexity
However this will not work because some of the programs p tested will not terminate, e.g. if they contain infinite loops. There is no way to avoid all of these programs by testing them in some way before executing them due to the non-computability of the halting problem. What is more, no program at all can compute the ...
wikipedia
wiki_19_chunk_22
Kolmogorov complexity
Theorem: There exist strings of arbitrarily large Kolmogorov complexity. Formally: for each natural number n, there is a string s with K(s) ≥ n. Proof: Otherwise all of the infinitely many possible finite strings could be generated by the finitely many programs with a complexity below n bits. Theorem: K is not a compu...
wikipedia
wiki_19_chunk_23
Kolmogorov complexity
The following indirect proof uses a simple Pascal-like language to denote programs; for sake of proof simplicity assume its description (i.e. an interpreter) to have a length of bits. Assume for contradiction there is a program function KolmogorovComplexity(string s) which takes as input a string s and returns K(s). A...
wikipedia
wiki_19_chunk_24
Kolmogorov complexity
function GenerateComplexString() for i = 1 to infinity: for each string s of length exactly i if KolmogorovComplexity(s) ≥ 8000000000 return s
wikipedia
wiki_19_chunk_25
Kolmogorov complexity
Using KolmogorovComplexity as a subroutine, the program tries every string, starting with the shortest, until it returns a string with Kolmogorov complexity at least bits, i.e. a string that cannot be produced by any program shorter than bits. However, the overall length of the above program that produced s is only ...
wikipedia
wiki_19_chunk_26
Kolmogorov complexity
The above proof uses a contradiction similar to that of the Berry paradox: "The smallest positive integer that cannot be defined in fewer than twenty English words". It is also possible to show the non-computability of K by reduction from the non-computability of the halting problem H, since K and H are Turing-equivale...
wikipedia
wiki_19_chunk_27
Kolmogorov complexity
K(X,Y) ≤ K(X) + K(Y|X) + O(log(K(X,Y))). It states that the shortest program that reproduces X and Y is no more than a logarithmic term larger than a program to reproduce X and a program to reproduce Y given X. Using this statement, one can define an analogue of mutual information for Kolmogorov complexity.
wikipedia
wiki_19_chunk_28
Kolmogorov complexity
Compression It is straightforward to compute upper bounds for K(s) – simply compress the string s with some method, implement the corresponding decompressor in the chosen language, concatenate the decompressor to the compressed string, and measure the length of the resulting string – concretely, the size of a self-extr...
wikipedia
wiki_19_chunk_29
Kolmogorov complexity
A string s is compressible by a number c if it has a description whose length does not exceed |s| − c bits. This is equivalent to saying that K(s) ≤ |s| − c. Otherwise, s is incompressible by c. A string incompressible by 1 is said to be simply incompressible – by the pigeonhole principle, which applies because every ...
wikipedia
wiki_19_chunk_30
Kolmogorov complexity
For the same reason, most strings are complex in the sense that they cannot be significantly compressed – their K(s) is not much smaller than |s|, the length of s in bits. To make this precise, fix a value of n. There are 2n bitstrings of length n. The uniform probability distribution on the space of these bitstrings a...
wikipedia
wiki_19_chunk_31
Kolmogorov complexity
Theorem: With the uniform probability distribution on the space of bitstrings of length n, the probability that a string is incompressible by c is at least 1 − 2−c+1 + 2−n. To prove the theorem, note that the number of descriptions of length not exceeding n − c is given by the geometric series: 1 + 2 + 22 + ... + 2n − ...
wikipedia
wiki_19_chunk_32
Kolmogorov complexity
bitstrings of length n that are incompressible by c. To determine the probability, divide by 2n. Chaitin's incompleteness theorem
wikipedia
wiki_19_chunk_33
Kolmogorov complexity
By the above theorem (), most strings are complex in the sense that they cannot be described in any significantly "compressed" way. However, it turns out that the fact that a specific string is complex cannot be formally proven, if the complexity of the string is above a certain threshold. The precise formalization is ...
wikipedia
wiki_19_chunk_34
Kolmogorov complexity
If FA is provable from the axioms of S, then the corresponding assertion A must be true. This "formalization" can be achieved based on a Gödel numbering. Theorem: There exists a constant L (which only depends on S and on the choice of description language) such that there does not exist a string s for which the stateme...
wikipedia
wiki_19_chunk_35
Kolmogorov complexity
Proof Idea: The proof of this result is modeled on a self-referential construction used in Berry's paradox. We firstly obtain an program which enumerates the proofs within S and we specify a procedure P which takes as an input an integer L and prints the strings x which are within proofs within S of the statement K(x) ...
wikipedia
wiki_19_chunk_36
Kolmogorov complexity
Proof: We can find an effective enumeration of all the formal proofs in S by some procedure function NthProof(int n) which takes as input n and outputs some proof. This function enumerates all proofs. Some of these are proofs for formulas we do not care about here, since every possible proof in the language of S is pro...
wikipedia
wiki_19_chunk_37
Kolmogorov complexity
which determines whether the nth proof actually proves a complexity formula K(s) ≥ L. The strings s, and the integer L in turn, are computable by procedure: function StringNthProof(int n) function ComplexityLowerBoundNthProof(int n) Consider the following procedure: function GenerateProvablyComplexString(int n) fo...
wikipedia
wiki_19_chunk_38
Kolmogorov complexity
Given an n, this procedure tries every proof until it finds a string and a proof in the formal system S of the formula K(s) ≥ L for some L ≥ n; if no such proof exists, it loops forever. Finally, consider the program consisting of all these procedure definitions, and a main call: GenerateProvablyComplexString(n0)
wikipedia
wiki_19_chunk_39
Kolmogorov complexity
where the constant n0 will be determined later on. The overall program length can be expressed as U+log2(n0), where U is some constant and log2(n0) represents the length of the integer value n0, under the reasonable assumption that it is encoded in binary digits. We will choose n0 to be greater than the program length,...
wikipedia
wiki_19_chunk_40
Kolmogorov complexity
Then no proof of the form "K(s)≥L" with L≥n0 can be obtained in S, as can be seen by an indirect argument: If ComplexityLowerBoundNthProof(i) could return a value ≥n0, then the loop inside GenerateProvablyComplexString would eventually terminate, and that procedure would return a string s such that This is a contradict...
wikipedia
wiki_19_chunk_41
Kolmogorov complexity
Minimum message length
wikipedia
wiki_19_chunk_42
Kolmogorov complexity
The minimum message length principle of statistical and inductive inference and machine learning was developed by C.S. Wallace and D.M. Boulton in 1968. MML is Bayesian (i.e. it incorporates prior beliefs) and information-theoretic. It has the desirable properties of statistical invariance (i.e. the inference transform...
wikipedia
wiki_19_chunk_43
Kolmogorov complexity
Kolmogorov randomnessKolmogorov randomness defines a string (usually of bits) as being random if and only if every computer program that can produce that string is at least as long as the string itself. To make this precise, a universal computer (or universal Turing machine) must be specified, so that "program" means ...
wikipedia