id
stringlengths
14
20
title
stringlengths
4
181
text
stringlengths
1
43k
source
stringclasses
1 value
wiki_25_chunk_31
Algebraic geometry
Nowadays, the projective space Pn of dimension n is usually defined as the set of the lines passing through a point, considered as the origin, in the affine space of dimension , or equivalently to the set of the vector lines in a vector space of dimension . When a coordinate system has been chosen in the space of dimension , all the points of a line have the same set of coordinates, up to the multiplication by an element of k. This defines the homogeneous coordinates of a point of Pn as a sequence of elements of the base field k, defined up to the multiplication by a nonzero element of k (the same for the whole sequence).
wikipedia
wiki_25_chunk_32
Algebraic geometry
A polynomial in variables vanishes at all points of a line passing through the origin if and only if it is homogeneous. In this case, one says that the polynomial vanishes at the corresponding point of Pn. This allows us to define a projective algebraic set in Pn as the set , where a finite set of homogeneous polynomials vanishes. Like for affine algebraic sets, there is a bijection between the projective algebraic sets and the reduced homogeneous ideals which define them. The projective varieties are the projective algebraic sets whose defining ideal is prime. In other words, a projective variety is a projective algebraic set, whose homogeneous coordinate ring is an integral domain, the projective coordinates ring being defined as the quotient of the graded ring or the polynomials in variables by the homogeneous (reduced) ideal defining the variety. Every projective algebraic set may be uniquely decomposed into a finite union of projective varieties.
wikipedia
wiki_25_chunk_33
Algebraic geometry
The only regular functions which may be defined properly on a projective variety are the constant functions. Thus this notion is not used in projective situations. On the other hand, the field of the rational functions or function field is a useful notion, which, similarly to the affine case, is defined as the set of the quotients of two homogeneous elements of the same degree in the homogeneous coordinate ring. Real algebraic geometry Real algebraic geometry is the study of the real points of algebraic varieties.
wikipedia
wiki_25_chunk_34
Algebraic geometry
The fact that the field of the real numbers is an ordered field cannot be ignored in such a study. For example, the curve of equation is a circle if , but does not have any real point if . It follows that real algebraic geometry is not only the study of the real algebraic varieties, but has been generalized to the study of the semi-algebraic sets, which are the solutions of systems of polynomial equations and polynomial inequalities. For example, a branch of the hyperbola of equation is not an algebraic variety, but is a semi-algebraic set defined by and or by and .
wikipedia
wiki_25_chunk_35
Algebraic geometry
One of the challenging problems of real algebraic geometry is the unsolved Hilbert's sixteenth problem: Decide which respective positions are possible for the ovals of a nonsingular plane curve of degree 8.
wikipedia
wiki_25_chunk_36
Algebraic geometry
Computational algebraic geometry One may date the origin of computational algebraic geometry to meeting EUROSAM'79 (International Symposium on Symbolic and Algebraic Manipulation) held at Marseille, France, in June 1979. At this meeting, Dennis S. Arnon showed that George E. Collins's Cylindrical algebraic decomposition (CAD) allows the computation of the topology of semi-algebraic sets, Bruno Buchberger presented the Gröbner bases and his algorithm to compute them, Daniel Lazard presented a new algorithm for solving systems of homogeneous polynomial equations with a computational complexity which is essentially polynomial in the expected number of solutions and thus simply exponential in the number of the unknowns. This algorithm is strongly related with Macaulay's multivariate resultant.
wikipedia
wiki_25_chunk_37
Algebraic geometry
Since then, most results in this area are related to one or several of these items either by using or improving one of these algorithms, or by finding algorithms whose complexity is simply exponential in the number of the variables. A body of mathematical theory complementary to symbolic methods called numerical algebraic geometry has been developed over the last several decades. The main computational method is homotopy continuation. This supports, for example, a model of floating point computation for solving problems of algebraic geometry. Gröbner basis
wikipedia
wiki_25_chunk_38
Algebraic geometry
A Gröbner basis is a system of generators of a polynomial ideal whose computation allows the deduction of many properties of the affine algebraic variety defined by the ideal.
wikipedia
wiki_25_chunk_39
Algebraic geometry
Given an ideal I defining an algebraic set V: V is empty (over an algebraically closed extension of the basis field), if and only if the Gröbner basis for any monomial ordering is reduced to {1}. By means of the Hilbert series one may compute the dimension and the degree of V from any Gröbner basis of I for a monomial ordering refining the total degree. If the dimension of V is 0, one may compute the points (finite in number) of V from any Gröbner basis of I (see Systems of polynomial equations). A Gröbner basis computation allows one to remove from V all irreducible components which are contained in a given hypersurface. A Gröbner basis computation allows one to compute the Zariski closure of the image of V by the projection on the k first coordinates, and the subset of the image where the projection is not proper. More generally Gröbner basis computations allow one to compute the Zariski closure of the image and the critical points of a rational function of V into another affine variety.
wikipedia
wiki_25_chunk_40
Algebraic geometry
Gröbner basis computations do not allow one to compute directly the primary decomposition of I nor the prime ideals defining the irreducible components of V, but most algorithms for this involve Gröbner basis computation. The algorithms which are not based on Gröbner bases use regular chains but may need Gröbner bases in some exceptional situations.
wikipedia
wiki_25_chunk_41
Algebraic geometry
Gröbner bases are deemed to be difficult to compute. In fact they may contain, in the worst case, polynomials whose degree is doubly exponential in the number of variables and a number of polynomials which is also doubly exponential. However, this is only a worst case complexity, and the complexity bound of Lazard's algorithm of 1979 may frequently apply. Faugère F5 algorithm realizes this complexity, as it may be viewed as an improvement of Lazard's 1979 algorithm. It follows that the best implementations allow one to compute almost routinely with algebraic sets of degree more than 100. This means that, presently, the difficulty of computing a Gröbner basis is strongly related to the intrinsic difficulty of the problem.
wikipedia
wiki_25_chunk_42
Algebraic geometry
Cylindrical algebraic decomposition (CAD) CAD is an algorithm which was introduced in 1973 by G. Collins to implement with an acceptable complexity the Tarski–Seidenberg theorem on quantifier elimination over the real numbers.
wikipedia
wiki_25_chunk_43
Algebraic geometry
This theorem concerns the formulas of the first-order logic whose atomic formulas are polynomial equalities or inequalities between polynomials with real coefficients. These formulas are thus the formulas which may be constructed from the atomic formulas by the logical operators and (∧), or (∨), not (¬), for all (∀) and exists (∃). Tarski's theorem asserts that, from such a formula, one may compute an equivalent formula without quantifier (∀, ∃).
wikipedia
wiki_25_chunk_44
Algebraic geometry
The complexity of CAD is doubly exponential in the number of variables. This means that CAD allows, in theory, to solve every problem of real algebraic geometry which may be expressed by such a formula, that is almost every problem concerning explicitly given varieties and semi-algebraic sets. While Gröbner basis computation has doubly exponential complexity only in rare cases, CAD has almost always this high complexity. This implies that, unless if most polynomials appearing in the input are linear, it may not solve problems with more than four variables.
wikipedia
wiki_25_chunk_45
Algebraic geometry
Since 1973, most of the research on this subject is devoted either to improving CAD or finding alternative algorithms in special cases of general interest. As an example of the state of art, there are efficient algorithms to find at least a point in every connected component of a semi-algebraic set, and thus to test if a semi-algebraic set is empty. On the other hand, CAD is yet, in practice, the best algorithm to count the number of connected components.
wikipedia
wiki_25_chunk_46
Algebraic geometry
Asymptotic complexity vs. practical efficiency The basic general algorithms of computational geometry have a double exponential worst case complexity. More precisely, if d is the maximal degree of the input polynomials and n the number of variables, their complexity is at most for some constant c, and, for some inputs, the complexity is at least for another constant c′. During the last 20 years of the 20th century, various algorithms have been introduced to solve specific subproblems with a better complexity. Most of these algorithms have a complexity .
wikipedia
wiki_25_chunk_47
Algebraic geometry
Among these algorithms which solve a sub problem of the problems solved by Gröbner bases, one may cite testing if an affine variety is empty and solving nonhomogeneous polynomial systems which have a finite number of solutions. Such algorithms are rarely implemented because, on most entries Faugère's F4 and F5 algorithms have a better practical efficiency and probably a similar or better complexity (probably because the evaluation of the complexity of Gröbner basis algorithms on a particular class of entries is a difficult task which has been done only in a few special cases).
wikipedia
wiki_25_chunk_48
Algebraic geometry
The main algorithms of real algebraic geometry which solve a problem solved by CAD are related to the topology of semi-algebraic sets. One may cite counting the number of connected components, testing if two points are in the same components or computing a Whitney stratification of a real algebraic set. They have a complexity of , but the constant involved by O notation is so high that using them to solve any nontrivial problem effectively solved by CAD, is impossible even if one could use all the existing computing power in the world. Therefore, these algorithms have never been implemented and this is an active research area to search for algorithms with have together a good asymptotic complexity and a good practical efficiency.
wikipedia
wiki_25_chunk_49
Algebraic geometry
Abstract modern viewpoint The modern approaches to algebraic geometry redefine and effectively extend the range of basic objects in various levels of generality to schemes, formal schemes, ind-schemes, algebraic spaces, algebraic stacks and so on. The need for this arises already from the useful ideas within theory of varieties, e.g. the formal functions of Zariski can be accommodated by introducing nilpotent elements in structure rings; considering spaces of loops and arcs, constructing quotients by group actions and developing formal grounds for natural intersection theory and deformation theory lead to some of the further extensions.
wikipedia
wiki_25_chunk_50
Algebraic geometry
Most remarkably, in the late 1950s, algebraic varieties were subsumed into Alexander Grothendieck's concept of a scheme. Their local objects are affine schemes or prime spectra which are locally ringed spaces which form a category which is antiequivalent to the category of commutative unital rings, extending the duality between the category of affine algebraic varieties over a field k, and the category of finitely generated reduced k-algebras. The gluing is along Zariski topology; one can glue within the category of locally ringed spaces, but also, using the Yoneda embedding, within the more abstract category of presheaves of sets over the category of affine schemes. The Zariski topology in the set theoretic sense is then replaced by a Grothendieck topology. Grothendieck introduced Grothendieck topologies having in mind more exotic but geometrically finer and more sensitive examples than the crude Zariski topology, namely the étale topology, and the two flat Grothendieck topologies: fppf and fpqc; nowadays some other examples became prominent including Nisnevich topology. Sheaves can be furthermore generalized to stacks in the sense of Grothendieck, usually with some additional representability conditions leading to Artin stacks and, even finer, Deligne–Mumford stacks, both often called algebraic stacks.
wikipedia
wiki_25_chunk_51
Algebraic geometry
Sometimes other algebraic sites replace the category of affine schemes. For example, Nikolai Durov has introduced commutative algebraic monads as a generalization of local objects in a generalized algebraic geometry. Versions of a tropical geometry, of an absolute geometry over a field of one element and an algebraic analogue of Arakelov's geometry were realized in this setup. Another formal generalization is possible to universal algebraic geometry in which every variety of algebras has its own algebraic geometry. The term variety of algebras should not be confused with algebraic variety.
wikipedia
wiki_25_chunk_52
Algebraic geometry
The language of schemes, stacks and generalizations has proved to be a valuable way of dealing with geometric concepts and became cornerstones of modern algebraic geometry.
wikipedia
wiki_25_chunk_53
Algebraic geometry
Algebraic stacks can be further generalized and for many practical questions like deformation theory and intersection theory, this is often the most natural approach. One can extend the Grothendieck site of affine schemes to a higher categorical site of derived affine schemes, by replacing the commutative rings with an infinity category of differential graded commutative algebras, or of simplicial commutative rings or a similar category with an appropriate variant of a Grothendieck topology. One can also replace presheaves of sets by presheaves of simplicial sets (or of infinity groupoids). Then, in presence of an appropriate homotopic machinery one can develop a notion of derived stack as such a presheaf on the infinity category of derived affine schemes, which is satisfying certain infinite categorical version of a sheaf axiom (and to be algebraic, inductively a sequence of representability conditions). Quillen model categories, Segal categories and quasicategories are some of the most often used tools to formalize this yielding the derived algebraic geometry, introduced by the school of Carlos Simpson, including Andre Hirschowitz, Bertrand Toën, Gabrielle Vezzosi, Michel Vaquié and others; and developed further by Jacob Lurie, Bertrand Toën, and Gabriele Vezzosi. Another (noncommutative) version of derived algebraic geometry, using A-infinity categories has been developed from the early 1990s by Maxim Kontsevich and followers.
wikipedia
wiki_25_chunk_54
Algebraic geometry
History
wikipedia
wiki_25_chunk_55
Algebraic geometry
Before the 16th century Some of the roots of algebraic geometry date back to the work of the Hellenistic Greeks from the 5th century BC. The Delian problem, for instance, was to construct a length x so that the cube of side x contained the same volume as the rectangular box a2b for given sides a and b. Menaechmus (circa 350 BC) considered the problem geometrically by intersecting the pair of plane conics ay = x2 and xy = ab. In the 3rd century BC, Archimedes and Apollonius systematically studied additional problems on conic sections using coordinates. Medieval Muslim mathematicians, including Ibn al-Haytham in the 10th century AD, solved certain cubic equations by purely algebraic means and then interpreted the results geometrically. The Persian mathematician Omar Khayyám (born 1048 AD) discovered a method for solving cubic equations by intersecting a parabola with a circle and seems to have been the first to conceive a general theory of cubic equations. A few years after Omar Khayyám, Sharaf al-Din al-Tusi's Treatise on equations has been described by Roshdi Rashed as "inaugurating the beginning of algebraic geometry". This was criticized by Jeffrey Oaks, who claims that the study of curves by means of equations originated with Descartes in the seventeenth century.
wikipedia
wiki_25_chunk_56
Algebraic geometry
Renaissance
wikipedia
wiki_25_chunk_57
Algebraic geometry
Such techniques of applying geometrical constructions to algebraic problems were also adopted by a number of Renaissance mathematicians such as Gerolamo Cardano and Niccolò Fontana "Tartaglia" on their studies of the cubic equation. The geometrical approach to construction problems, rather than the algebraic one, was favored by most 16th and 17th century mathematicians, notably Blaise Pascal who argued against the use of algebraic and analytical methods in geometry. The French mathematicians Franciscus Vieta and later René Descartes and Pierre de Fermat revolutionized the conventional way of thinking about construction problems through the introduction of coordinate geometry. They were interested primarily in the properties of algebraic curves, such as those defined by Diophantine equations (in the case of Fermat), and the algebraic reformulation of the classical Greek works on conics and cubics (in the case of Descartes).
wikipedia
wiki_25_chunk_58
Algebraic geometry
During the same period, Blaise Pascal and Gérard Desargues approached geometry from a different perspective, developing the synthetic notions of projective geometry. Pascal and Desargues also studied curves, but from the purely geometrical point of view: the analog of the Greek ruler and compass construction. Ultimately, the analytic geometry of Descartes and Fermat won out, for it supplied the 18th century mathematicians with concrete quantitative tools needed to study physical problems using the new calculus of Newton and Leibniz. However, by the end of the 18th century, most of the algebraic character of coordinate geometry was subsumed by the calculus of infinitesimals of Lagrange and Euler.
wikipedia
wiki_25_chunk_59
Algebraic geometry
19th and early 20th century It took the simultaneous 19th century developments of non-Euclidean geometry and Abelian integrals in order to bring the old algebraic ideas back into the geometrical fold. The first of these new developments was seized up by Edmond Laguerre and Arthur Cayley, who attempted to ascertain the generalized metric properties of projective space. Cayley introduced the idea of homogeneous polynomial forms, and more specifically quadratic forms, on projective space. Subsequently, Felix Klein studied projective geometry (along with other types of geometry) from the viewpoint that the geometry on a space is encoded in a certain class of transformations on the space. By the end of the 19th century, projective geometers were studying more general kinds of transformations on figures in projective space. Rather than the projective linear transformations which were normally regarded as giving the fundamental Kleinian geometry on projective space, they concerned themselves also with the higher degree birational transformations. This weaker notion of congruence would later lead members of the 20th century Italian school of algebraic geometry to classify algebraic surfaces up to birational isomorphism.
wikipedia
wiki_25_chunk_60
Algebraic geometry
The second early 19th century development, that of Abelian integrals, would lead Bernhard Riemann to the development of Riemann surfaces.
wikipedia
wiki_25_chunk_61
Algebraic geometry
In the same period began the algebraization of the algebraic geometry through commutative algebra. The prominent results in this direction are Hilbert's basis theorem and Hilbert's Nullstellensatz, which are the basis of the connexion between algebraic geometry and commutative algebra, and Macaulay's multivariate resultant, which is the basis of elimination theory. Probably because of the size of the computation which is implied by multivariate resultants, elimination theory was forgotten during the middle of the 20th century until it was renewed by singularity theory and computational algebraic geometry.
wikipedia
wiki_25_chunk_62
Algebraic geometry
20th century B. L. van der Waerden, Oscar Zariski and André Weil developed a foundation for algebraic geometry based on contemporary commutative algebra, including valuation theory and the theory of ideals. One of the goals was to give a rigorous framework for proving the results of Italian school of algebraic geometry. In particular, this school used systematically the notion of generic point without any precise definition, which was first given by these authors during the 1930s.
wikipedia
wiki_25_chunk_63
Algebraic geometry
In the 1950s and 1960s, Jean-Pierre Serre and Alexander Grothendieck recast the foundations making use of sheaf theory. Later, from about 1960, and largely led by Grothendieck, the idea of schemes was worked out, in conjunction with a very refined apparatus of homological techniques. After a decade of rapid development the field stabilized in the 1970s, and new applications were made, both to number theory and to more classical geometric questions on algebraic varieties, singularities, moduli, and formal moduli.
wikipedia
wiki_25_chunk_64
Algebraic geometry
An important class of varieties, not easily understood directly from their defining equations, are the abelian varieties, which are the projective varieties whose points form an abelian group. The prototypical examples are the elliptic curves, which have a rich theory. They were instrumental in the proof of Fermat's Last Theorem and are also used in elliptic-curve cryptography.
wikipedia
wiki_25_chunk_65
Algebraic geometry
In parallel with the abstract trend of the algebraic geometry, which is concerned with general statements about varieties, methods for effective computation with concretely-given varieties have also been developed, which lead to the new area of computational algebraic geometry. One of the founding methods of this area is the theory of Gröbner bases, introduced by Bruno Buchberger in 1965. Another founding method, more specially devoted to real algebraic geometry, is the cylindrical algebraic decomposition, introduced by George E. Collins in 1973. See also: derived algebraic geometry.
wikipedia
wiki_25_chunk_66
Algebraic geometry
Analytic geometry An analytic variety is defined locally as the set of common solutions of several equations involving analytic functions. It is analogous to the included concept of real or complex algebraic variety. Any complex manifold is an analytic variety. Since analytic varieties may have singular points, not all analytic varieties are manifolds. Modern analytic geometry is essentially equivalent to real and complex algebraic geometry, as has been shown by Jean-Pierre Serre in his paper GAGA, the name of which is French for Algebraic geometry and analytic geometry. Nevertheless, the two fields remain distinct, as the methods of proof are quite different and algebraic geometry includes also geometry in finite characteristic.
wikipedia
wiki_25_chunk_67
Algebraic geometry
Applications Algebraic geometry now finds applications in statistics, control theory, robotics, error-correcting codes, phylogenetics and geometric modelling. There are also connections to string theory, game theory, graph matchings, solitons and integer programming. See also Algebraic statistics Differential geometry Complex geometry Geometric algebra Glossary of classical algebraic geometry Intersection theory Important publications in algebraic geometry List of algebraic surfaces Noncommutative algebraic geometry Diffiety theory Differential algebraic geometry Real algebraic geometry Nonlinear algebra Geometrically (algebraic geometry) Notes References Sources Further reading Some classic textbooks that predate schemes Modern textbooks that do not use the language of schemes Textbooks in computational algebraic geometry
wikipedia
wiki_25_chunk_68
Algebraic geometry
Textbooks and references for schemes External links Foundations of Algebraic Geometry by Ravi Vakil, 808 pp. Algebraic geometry entry on PlanetMath English translation of the van der Waerden textbook The Stacks Project, an open source textbook and reference work on algebraic stacks and algebraic geometry Fields of mathematics
wikipedia
wiki_26_chunk_0
Array data structure
In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. An array is stored such that the position of each element can be computed from its index tuple by a mathematical formula. The simplest type of data structure is a linear array, also called one-dimensional array.
wikipedia
wiki_26_chunk_1
Array data structure
For example, an array of 10 32-bit (4-byte) integer variables, with indices 0 through 9, may be stored as 10 words at memory addresses 2000, 2004, 2008, ..., 2036, (in hexadecimal: 0x7D0, 0x7D4, 0x7D8, ..., 0x7F4) so that the element with index i has the address 2000 + (i × 4). The memory address of the first element of an array is called first address, foundation address, or base address.
wikipedia
wiki_26_chunk_2
Array data structure
Because the mathematical concept of a matrix can be represented as a two-dimensional grid, two-dimensional arrays are also sometimes called matrices. In some cases the term "vector" is used in computing to refer to an array, although tuples rather than vectors are the more mathematically correct equivalent. Tables are often implemented in the form of arrays, especially lookup tables; the word table is sometimes used as a synonym of array.
wikipedia
wiki_26_chunk_3
Array data structure
Arrays are among the oldest and most important data structures, and are used by almost every program. They are also used to implement many other data structures, such as lists and strings. They effectively exploit the addressing logic of computers. In most modern computers and many external storage devices, the memory is a one-dimensional array of words, whose indices are their addresses. Processors, especially vector processors, are often optimized for array operations.
wikipedia
wiki_26_chunk_4
Array data structure
Arrays are useful mostly because the element indices can be computed at run time. Among other things, this feature allows a single iterative statement to process arbitrarily many elements of an array. For that reason, the elements of an array data structure are required to have the same size and should use the same data representation. The set of valid index tuples and the addresses of the elements (and hence the element addressing formula) are usually, but not always, fixed while the array is in use.
wikipedia
wiki_26_chunk_5
Array data structure
The term array is often used to mean array data type, a kind of data type provided by most high-level programming languages that consists of a collection of values or variables that can be selected by one or more indices computed at run-time. Array types are often implemented by array structures; however, in some languages they may be implemented by hash tables, linked lists, search trees, or other data structures.
wikipedia
wiki_26_chunk_6
Array data structure
The term is also used, especially in the description of algorithms, to mean associative array or "abstract array", a theoretical computer science model (an abstract data type or ADT) intended to capture the essential properties of arrays.
wikipedia
wiki_26_chunk_7
Array data structure
History The first digital computers used machine-language programming to set up and access array structures for data tables, vector and matrix computations, and for many other purposes. John von Neumann wrote the first array-sorting program (merge sort) in 1945, during the building of the first stored-program computer.p. 159 Array indexing was originally done by self-modifying code, and later using index registers and indirect addressing. Some mainframes designed in the 1960s, such as the Burroughs B5000 and its successors, used memory segmentation to perform index-bounds checking in hardware.
wikipedia
wiki_26_chunk_8
Array data structure
Assembly languages generally have no special support for arrays, other than what the machine itself provides. The earliest high-level programming languages, including FORTRAN (1957), Lisp (1958), COBOL (1960), and ALGOL 60 (1960), had support for multi-dimensional arrays, and so has C (1972). In C++ (1983), class templates exist for multi-dimensional arrays whose dimension is fixed at runtime as well as for runtime-flexible arrays.
wikipedia
wiki_26_chunk_9
Array data structure
Applications Arrays are used to implement mathematical vectors and matrices, as well as other kinds of rectangular tables. Many databases, small and large, consist of (or include) one-dimensional arrays whose elements are records.
wikipedia
wiki_26_chunk_10
Array data structure
Arrays are used to implement other data structures, such as lists, heaps, hash tables, deques, queues, stacks, strings, and VLists. Array-based implementations of other data structures are frequently simple and space-efficient (implicit data structures), requiring little space overhead, but may have poor space complexity, particularly when modified, compared to tree-based data structures (compare a sorted array to a search tree).
wikipedia
wiki_26_chunk_11
Array data structure
One or more large arrays are sometimes used to emulate in-program dynamic memory allocation, particularly memory pool allocation. Historically, this has sometimes been the only way to allocate "dynamic memory" portably.
wikipedia
wiki_26_chunk_12
Array data structure
Arrays can be used to determine partial or complete control flow in programs, as a compact alternative to (otherwise repetitive) multiple IF statements. They are known in this context as control tables and are used in conjunction with a purpose built interpreter whose control flow is altered according to values contained in the array. The array may contain subroutine pointers (or relative subroutine numbers that can be acted upon by SWITCH statements) that direct the path of the execution.
wikipedia
wiki_26_chunk_13
Array data structure
Element identifier and addressing formulas When data objects are stored in an array, individual objects are selected by an index that is usually a non-negative scalar integer. Indexes are also called subscripts. An index maps the array value to a stored object. There are three ways in which the elements of an array can be indexed:
wikipedia
wiki_26_chunk_14
Array data structure
0 (zero-based indexing) The first element of the array is indexed by subscript of 0. 1 (one-based indexing) The first element of the array is indexed by subscript of 1. n (n-based indexing) The base index of an array can be freely chosen. Usually programming languages allowing n-based indexing also allow negative index values and other scalar data types like enumerations, or characters may be used as an array index.
wikipedia
wiki_26_chunk_15
Array data structure
Using zero based indexing is the design choice of many influential programming languages, including C, Java and Lisp. This leads to simpler implementation where the subscript refers to an offset from the starting position of an array, so the first element has an offset of zero.
wikipedia
wiki_26_chunk_16
Array data structure
Arrays can have multiple dimensions, thus it is not uncommon to access an array using multiple indices. For example, a two-dimensional array A with three rows and four columns might provide access to the element at the 2nd row and 4th column by the expression A[1][3] in the case of a zero-based indexing system. Thus two indices are used for a two-dimensional array, three for a three-dimensional array, and n for an n-dimensional array. The number of indices needed to specify an element is called the dimension, dimensionality, or rank of the array.
wikipedia
wiki_26_chunk_17
Array data structure
In standard arrays, each index is restricted to a certain range of consecutive integers (or consecutive values of some enumerated type), and the address of an element is computed by a "linear" formula on the indices. One-dimensional arrays A one-dimensional array (or single dimension array) is a type of linear array. Accessing its elements involves a single subscript which can either represent a row or column index.
wikipedia
wiki_26_chunk_18
Array data structure
As an example consider the C declaration int anArrayName[10]; which declares a one-dimensional array of ten integers. Here, the array can store ten elements of type int . This array has indices starting from zero through nine. For example, the expressions anArrayName[0] and anArrayName[9] are the first and last elements respectively. For a vector with linear addressing, the element with index i is located at the address , where B is a fixed base address and c a fixed constant, sometimes called the address increment or stride.
wikipedia
wiki_26_chunk_19
Array data structure
If the valid element indices begin at 0, the constant B is simply the address of the first element of the array. For this reason, the C programming language specifies that array indices always begin at 0; and many programmers will call that element "zeroth" rather than "first".
wikipedia
wiki_26_chunk_20
Array data structure
However, one can choose the index of the first element by an appropriate choice of the base address B. For example, if the array has five elements, indexed 1 through 5, and the base address B is replaced by , then the indices of those same elements will be 31 to 35. If the numbering does not start at 0, the constant B may not be the address of any element.
wikipedia
wiki_26_chunk_21
Array data structure
Multidimensional arrays For a multidimensional array, the element with indices i,j would have address B + c · i + d · j, where the coefficients c and d are the row and column address increments, respectively. More generally, in a k-dimensional array, the address of an element with indices i1, i2, ..., ik is B + c1 · i1 + c2 · i2 + … + ck · ik. For example: int a[2][3];
wikipedia
wiki_26_chunk_22
Array data structure
This means that array a has 2 rows and 3 columns, and the array is of integer type. Here we can store 6 elements they will be stored linearly but starting from first row linear then continuing with second row. The above array will be stored as a11, a12, a13, a21, a22, a23. This formula requires only k multiplications and k additions, for any array that can fit in memory. Moreover, if any coefficient is a fixed power of 2, the multiplication can be replaced by bit shifting.
wikipedia
wiki_26_chunk_23
Array data structure
The coefficients ck must be chosen so that every valid index tuple maps to the address of a distinct element.
wikipedia
wiki_26_chunk_24
Array data structure
If the minimum legal value for every index is 0, then B is the address of the element whose indices are all zero. As in the one-dimensional case, the element indices may be changed by changing the base address B. Thus, if a two-dimensional array has rows and columns indexed from 1 to 10 and 1 to 20, respectively, then replacing B by will cause them to be renumbered from 0 through 9 and 4 through 23, respectively. Taking advantage of this feature, some languages (like FORTRAN 77) specify that array indices begin at 1, as in mathematical tradition while other languages (like Fortran 90, Pascal and Algol) let the user choose the minimum value for each index.
wikipedia
wiki_26_chunk_25
Array data structure
Dope vectors The addressing formula is completely defined by the dimension d, the base address B, and the increments c1, c2, ..., ck. It is often useful to pack these parameters into a record called the array's descriptor or stride vector or dope vector. The size of each element, and the minimum and maximum values allowed for each index may also be included in the dope vector. The dope vector is a complete handle for the array, and is a convenient way to pass arrays as arguments to procedures. Many useful array slicing operations (such as selecting a sub-array, swapping indices, or reversing the direction of the indices) can be performed very efficiently by manipulating the dope vector.
wikipedia
wiki_26_chunk_26
Array data structure
Compact layouts Often the coefficients are chosen so that the elements occupy a contiguous area of memory. However, that is not necessary. Even if arrays are always created with contiguous elements, some array slicing operations may create non-contiguous sub-arrays from them. There are two systematic compact layouts for a two-dimensional array. For example, consider the matrix
wikipedia
wiki_26_chunk_27
Array data structure
In the row-major order layout (adopted by C for statically declared arrays), the elements in each row are stored in consecutive positions and all of the elements of a row have a lower address than any of the elements of a consecutive row: {| class="wikitable" |- | 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 |}
wikipedia
wiki_26_chunk_28
Array data structure
In column-major order (traditionally used by Fortran), the elements in each column are consecutive in memory and all of the elements of a column have a lower address than any of the elements of a consecutive column: {| class="wikitable" |- | 1 || 4 || 7 || 2 || 5 || 8 || 3 || 6 || 9 |}
wikipedia
wiki_26_chunk_29
Array data structure
For arrays with three or more indices, "row major order" puts in consecutive positions any two elements whose index tuples differ only by one in the last index. "Column major order" is analogous with respect to the first index.
wikipedia
wiki_26_chunk_30
Array data structure
In systems which use processor cache or virtual memory, scanning an array is much faster if successive elements are stored in consecutive positions in memory, rather than sparsely scattered. Many algorithms that use multidimensional arrays will scan them in a predictable order. A programmer (or a sophisticated compiler) may use this information to choose between row- or column-major layout for each array. For example, when computing the product A·B of two matrices, it would be best to have A stored in row-major order, and B in column-major order. Resizing
wikipedia
wiki_26_chunk_31
Array data structure
Static arrays have a size that is fixed when they are created and consequently do not allow elements to be inserted or removed. However, by allocating a new array and copying the contents of the old array to it, it is possible to effectively implement a dynamic version of an array; see dynamic array. If this operation is done infrequently, insertions at the end of the array require only amortized constant time.
wikipedia
wiki_26_chunk_32
Array data structure
Some array data structures do not reallocate storage, but do store a count of the number of elements of the array in use, called the count or size. This effectively makes the array a dynamic array with a fixed maximum size or capacity; Pascal strings are examples of this. Non-linear formulas More complicated (non-linear) formulas are occasionally used. For a compact two-dimensional triangular array, for instance, the addressing formula is a polynomial of degree 2.
wikipedia
wiki_26_chunk_33
Array data structure
Efficiency Both store and select take (deterministic worst case) constant time. Arrays take linear (O(n)) space in the number of elements n that they hold.
wikipedia
wiki_26_chunk_34
Array data structure
In an array with element size k and on a machine with a cache line size of B bytes, iterating through an array of n elements requires the minimum of ceiling(nk/B) cache misses, because its elements occupy contiguous memory locations. This is roughly a factor of B/k better than the number of cache misses needed to access n elements at random memory locations. As a consequence, sequential iteration over an array is noticeably faster in practice than iteration over many other data structures, a property called locality of reference (this does not mean however, that using a perfect hash or trivial hash within the same (local) array, will not be even faster - and achievable in constant time). Libraries provide low-level optimized facilities for copying ranges of memory (such as memcpy) which can be used to move contiguous blocks of array elements significantly faster than can be achieved through individual element access. The speedup of such optimized routines varies by array element size, architecture, and implementation.
wikipedia
wiki_26_chunk_35
Array data structure
Memory-wise, arrays are compact data structures with no per-element overhead. There may be a per-array overhead (e.g., to store index bounds) but this is language-dependent. It can also happen that elements stored in an array require less memory than the same elements stored in individual variables, because several array elements can be stored in a single word; such arrays are often called packed arrays. An extreme (but commonly used) case is the bit array, where every bit represents a single element. A single octet can thus hold up to 256 different combinations of up to 8 different conditions, in the most compact form.
wikipedia
wiki_26_chunk_36
Array data structure
Array accesses with statically predictable access patterns are a major source of data parallelism. Comparison with other data structures Dynamic arrays or growable arrays are similar to arrays but add the ability to insert and delete elements; adding and deleting at the end is particularly efficient. However, they reserve linear (Θ(n)) additional storage, whereas arrays do not reserve additional storage.
wikipedia
wiki_26_chunk_37
Array data structure
Associative arrays provide a mechanism for array-like functionality without huge storage overheads when the index values are sparse. For example, an array that contains values only at indexes 1 and 2 billion may benefit from using such a structure. Specialized associative arrays with integer keys include Patricia tries, Judy arrays, and van Emde Boas trees. Balanced trees require O(log n) time for indexed access, but also permit inserting or deleting elements in O(log n) time, whereas growable arrays require linear (Θ(n)) time to insert or delete elements at an arbitrary position.
wikipedia
wiki_26_chunk_38
Array data structure
Linked lists allow constant time removal and insertion in the middle but take linear time for indexed access. Their memory use is typically worse than arrays, but is still linear.
wikipedia
wiki_26_chunk_39
Array data structure
An Iliffe vector is an alternative to a multidimensional array structure. It uses a one-dimensional array of references to arrays of one dimension less. For two dimensions, in particular, this alternative structure would be a vector of pointers to vectors, one for each row(pointer on c or c++). Thus an element in row i and column j of an array A would be accessed by double indexing (A[i][j] in typical notation). This alternative structure allows jagged arrays, where each row may have a different size—or, in general, where the valid range of each index depends on the values of all preceding indices. It also saves one multiplication (by the column address increment) replacing it by a bit shift (to index the vector of row pointers) and one extra memory access (fetching the row address), which may be worthwhile in some architectures.
wikipedia
wiki_26_chunk_40
Array data structure
Dimension The dimension of an array is the number of indices needed to select an element. Thus, if the array is seen as a function on a set of possible index combinations, it is the dimension of the space of which its domain is a discrete subset. Thus a one-dimensional array is a list of data, a two-dimensional array is a rectangle of data, a three-dimensional array a block of data, etc.
wikipedia
wiki_26_chunk_41
Array data structure
This should not be confused with the dimension of the set of all matrices with a given domain, that is, the number of elements in the array. For example, an array with 5 rows and 4 columns is two-dimensional, but such matrices form a 20-dimensional space. Similarly, a three-dimensional vector can be represented by a one-dimensional array of size three. See also Dynamic array Parallel array Variable-length array Bit array Array slicing Offset (computer science) Row- and column-major order Stride of an array References External links
wikipedia
wiki_27_chunk_0
Automatic number announcement circuit
An automatic number announcement circuit (ANAC) is a component of a central office of a telephone company that provides a service to installation and service technicians to determine the telephone number of a line. The facility has a telephone number that may be called to listen to an automatic announcement that includes the caller's telephone number. The ANAC number is useful primarily during the installation of landline telephones to quickly identify one of multiple lines.
wikipedia
wiki_27_chunk_1
Automatic number announcement circuit
Operation A technician calls the local telephone number of the automatic number announcement service. This call is connected to equipment at a local central office that uses a voice synthesizer or digital samples to announce the telephone number of the line calling in. The main purpose of this system is to allow telephone company technicians to identify the telephone line they are connected to.
wikipedia
wiki_27_chunk_2
Automatic number announcement circuit
Automatic number announcement systems are based on automatic number identification, and meant for phone company technicians, the ANAC system works with unlisted numbers, numbers with caller ID blocking, and numbers with no outgoing calls allowed. Installers of multi-line business services where outgoing calls from all lines display the company's main number on call display can use ANAC to identify a specific line in the system, even if CID displays every line as "line one".
wikipedia
wiki_27_chunk_3
Automatic number announcement circuit
Some ANACs are very regional or local in scope, while others are state-/province- or area-code-wide: there appears to be no consistent national system for them. Most are provider-specific. Every telephone company, whether large or small, determines its own ANAC for each individual central office, which tends to perpetuate the current situation of a mess of overlapping and/or spotty areas of coverage. No official lists of ANAC numbers are published as telephone companies believe overuse of these numbers could make them more likely to be busy when needed by installers.
wikipedia
wiki_27_chunk_4
Automatic number announcement circuit
958 local test exchanges Under the North American Numbering Plan, almost all North American area codes reserve telephone numbers beginning with 958 and 959 for internal local and long-distance testing (respectively), sometimes called plant testing. (One exception is Winnipeg, which reserves 959 only.) Numbers within this block are used for various test utilities such as a ringback number (to test the ringer when installing telephone sets), milliwatt tone (a number simply answers with a continuous test tone) and a loop around (which connects a call to another inbound call to the same or another test number). ANAC numbers can also appear in the 958 range, but there is no requirement that they reside there.
wikipedia
wiki_27_chunk_5
Automatic number announcement circuit
In some area codes, multiple additional prefixes had been reserved for test purposes, in addition to the standard 958 and 959. Many area codes reserved 999; 320 was also formerly reserved in Bell Canada territory. As widespread inefficiencies in numbering (such as the assignment of entire blocks of 10000 numbers to every competing carrier in every small village to support local number portability schemes) have created shortages of available numbers, these prefixes are often "reclaimed" and issued as standard exchanges, moving the handful of numbers in them to one standard test exchange (usually 958).
wikipedia
wiki_27_chunk_6
Automatic number announcement circuit
Some carriers have been known to disable payphone calls to 958 or 959 test lines, such as Bell Canada's system-wide ANAC line at (area code) 958-2580. Conversely, a standard line on which voice service has been unsubscribed (such as an ADSL dry loop) may still accept calls to the 958 test exchange but not allow calls to standard numbers. This "soft disconnect" condition is intended to allow calls to 9-1-1 emergency services and to the telco business office to order telephone service, but to no other numbers.
wikipedia
wiki_27_chunk_7
Automatic number announcement circuit
Tollfree numbers Some large telephone companies have toll-free numbers set up. In most cases, these numbers remain undisclosed to prevent abuse, but MCI maintains this widely published, toll-free ANAC: 1-800-437-7950. This is distinct from technical support and other lines which use ANI so that a computer can automatically display the customer's account on a "screen pop" for the next available customer service representative: the MCI number is intended specifically for ANAC use.
wikipedia
wiki_27_chunk_8
Automatic number announcement circuit
Formerly, some companies changed their ANAC number every month for secrecy; this is still the case with a few numbers. In one example of this concern, most payphones in the United States are assigned a telephone number and can ring if the number is called. The phone can then be used to make and receive calls by anyone, making it a potential tool in anonymous criminal activity such as narcotics trafficking. Where a payphone does not have any number listed on the unit, the number can be discovered by calling an ANAC service.
wikipedia
wiki_27_chunk_9
Automatic number announcement circuit
Late in the 20th century, after caller ID and pre-paid cell phone service became commonplace and with these services being more easily exploited for criminal purposes, especially in the case of burner phones, this type of abuse of payphones faded from concern. In Canada, this behaviour has always been more difficult. As a matter of course, incoming calls to payphones are disabled; furthermore, the Bell ANAC number is also disabled (although the telephone number is marked on the payphone itself as it is needed to report a non-working coin phone to 6-1-1 repair service).
wikipedia
wiki_27_chunk_10
Automatic number announcement circuit
There are some private national toll-free numbers that use ANI and then have a computer read back the number that is calling, but these are not intended for use in identifying the customer's own phone number. They are used in order for the agent in the call center to confirm the phone the customer is calling from, so that a computer can automatically display the customer's account on a "screen pop" for the next available customer service representative; they are distinct from purpose-made toll-free ANAC numbers. Regardless, if one were to call one of these numbers, listen for the number confirmation and hang up, they would in effect be using this system as if it were an ANAC.
wikipedia
wiki_27_chunk_11
Automatic number announcement circuit
One such toll-free service is one owned by MCI - 1-800-444-4444. This number (US only) is easy to remember and, when called, will read back the number after a very short message. A suspended (out of service) line or an incoming only line would not be able to reach any toll-free numbers. ANAC numbers
wikipedia
wiki_27_chunk_12
Automatic number announcement circuit
These numbers appear on various lists circulated on-line, many from the 1980s and 1990s. Most were published years ago by Phrack, 2600 Magazine, the alt.2600 Usenet newsgroup (as part of the FAQ) or phone phreaks and are now hopelessly outdated. The information is not reliable, as numbers change often. Many of the listed numbers no longer work. The list is presented by area code, number and location. In some regions, there are several numbers, depending on the telephone company or the area code of the caller, as there can be several central offices serving some areas.
wikipedia
wiki_27_chunk_13
Automatic number announcement circuit
United States The North American Numbering Plan reserves 958-XXXX and 1-NPA-959-XXXX for local and long-distance test numbers in almost all USA and Canadian area codes.
wikipedia
wiki_27_chunk_14
Automatic number announcement circuit
Frequently, a prefix outside the 958 or 959 range (such as 200, 997, 998, 999) was also listed as a test exchange, only to be reclaimed and issued as a block of standard numbers at a later date. NANPA's utilised codes report will indicate 'UA' (unassignable) for valid test prefixes; if a formerly 'UA' code newly appears on the available list or becomes an active exchange, any former test numbers from its time as a reserved prefix are presumed invalid and deprecated. N11 prefixes such as 211, 311 and 511 are also disappearing as test numbers as these codes are reassigned to local services such as city, community or highway information.
wikipedia
wiki_27_chunk_15
Automatic number announcement circuit
958, 959 test prefixes The standard location for test numbers in most NANP area codes, although specific local numbers vary. 1-NPA-959 traditionally contained long-distance test numbers, but this convention is often ignored; AT&T's 959-1122 and GTE (Verizon)'s 959-1114 are local. Some area codes will flag additional codes as 'UA' or unassignable, in some cases reserving them for test numbers.
wikipedia
wiki_27_chunk_16
Automatic number announcement circuit
A few commonly-used 958 or 959 numbers for major incumbent landline carriers: 958, as a three-digit number in many former NYNEX/Bell Atlantic areas, now Verizon or FairPoint (207 Maine, 212 New York, 215 Pennsylvania, 315 New York, 413 Massachusetts, 508 Massachusetts, 516 New York, 603 New Hampshire, 609 New Jersey, 610 Pennsylvania, 617 Massachusetts, 718 New York, 732 New Jersey, 856 New Jersey, 958 New Jersey) 959-1114 Verizon, for all former GTE points in California (area codes 310, 714, 760, 805); also Southwestern Virginia (276), Farmersburg/North Terre Haute/South Terre Haute/Riley Indiana (812) and Durham, North Carolina (919) 959-1122 PacBell (AT&T), all points (California area codes 209, 213, 310, 408, 415, 510, 530, 619, 650, 714, 760, 805, 831, 909, 916 and 925) 959-1122 Southwestern Bell (AT&T), (417 Missouri, 620 Kansas, 816 Missouri, 913 Kansas, 817 Texas, 972 Texas and 682 Texas) 959-3111 CenturyLink All circuits
wikipedia
wiki_27_chunk_17
Automatic number announcement circuit
Numbers otherwise vary arbitrarily by locality: 216: 959-9892 Akron/Canton/Cleveland/Lorain/Youngstown, Ohio 301: 958-9968 Hagerstown/Rockville, Maryland 309: 959-1114 Central Illinois (Frontier, Ex-Verizon) 309: 959-9833 Quad City Illinois Area (AT&T) 412: 959-1114 Pittsburgh Pennsylvania (Verizon) 503: 958 Portland, Oregon (CLEC, MCIMetro ATS) 602/623/480: 958-7847 Phoenix Metro Area (Qwest) 610: 958-4100 Allentown/Reading, Pennsylvania 717: 958 Harrisburg/Scranton/Wilkes-Barre, Pennsylvania <CenturyLink: "Sorry but your call can not be completed"> 724: 959-1114 Pittsburgh Pennsylvania (Verizon) 787: 787-959-1240 Puerto Rico (PRTC) 787: 787-959-1250 Puerto Rico (PRTC) 805: 959-1123 Bakersfield/San Luis Obispo, California (?) (Returns DTMF Tones) 814: 958-2111 Cresson, Pennsylvania 850: 959-3111 Tallahassee, Florida 860: 959-9822 Connecticut 919: 959-1031 Raleigh/Cary/Apex, North Carolina area. (BellSouth/AT&T) Dial as 7-digits. 919: 959-1041 Raleigh/Cary/Apex, North Carolina area. (BellSouth/AT&T) Dial as 7-digits. 970: 958-(any 4 digits) Greeley, Colorado (Qwest) 973: 973-959-3111 Northern New Jersey (Centurylink)
wikipedia
wiki_27_chunk_18
Automatic number announcement circuit
Other regionally nonassignable (UA) test prefixes These are, over time, being phased out. As each reservation consumes a block of 10000 numbers, the prefixes are increasingly being recovered for use as regular exchange codes and the test numbers moved (usually) to 958-XXXX. If the number is active for test, the prefix listed (often 200, 990, 997, 998, 999) remains within a block currently marked by NANPA.com as unassignable in the one specified area code. These test numbers will be shut down before the 'UA' flag is removed, the prefix made available or reassigned as a standard exchange. 210: 830 Brownsville/Laredo/San Antonio, Texas 214: 970-222-2222 Dallas, Texas (Southwestern Bell) 214: 970-611-1111 Dallas, Texas (Southwestern Bell) 312: 200 Chicago, Illinois (Ameritech) 313: 200-200-2002 Ann Arbor/Dearborn/Detroit, Michigan 313: 200-222-2222 Ann Arbor/Dearborn/Detroit, Michigan 313: 200-200-200-200-200 Ann Arbor/Dearborn/Detroit, Michigan 315: 998 Syracuse/Utica, New York 412: 975 Pittsburgh, Pennsylvania (Verizon) 508: 200-222-1234 Fall River/New Bedford/Worcester, Massachusetts 508: 200-222-2222 Fall River/New Bedford/Worcester, Massachusetts 508: 260-11 Fall River/New Bedford/Worcester, Massachusetts (Verizon) 512: 830 Austin/Corpus Christi, Texas 513: 380-55555555 Cincinnati/Dayton, Ohio 518: 997 Albany/Schenectady/Troy, New York 518: 998 Albany/Schenectady/Troy, New York 607: 993 Binghamton/Elmira, New York 617: 200-222-1234 Boston, Massachusetts 617: 200-222-2222 Boston, Massachusetts 617: 200-444-4444 Boston, Massachusetts (Woburn, Massachusetts) 617: 220 Boston, Massachusetts (Verizon) 617: 220-2622 Boston, Massachusetts (Verizon) 618: 930 Alton/Cairo/Mt. Vernon, Illinois 724: 975 Pittsburgh, Pennsylvania (Verizon) 781: 200-222-2222 Boston, Massachusetts 810: 200-200-200-200-200 Flint/Pontiac/Southfield/Troy, Michigan 817: 970-611-1111 Ft. Worth/Waco, Texas (Southwestern Bell) 817: 970-1234 Ft. Worth, Texas (AT&T / SBC) 914: 990-1111 Peekskill/Poughkeepsie/White Plains/Yonkers, New York
wikipedia
wiki_27_chunk_19
Automatic number announcement circuit
Vertical service codes, carrier-specific Most vertical service codes are activated with #, * or a leading 11- and are internal to an individual landline or wireless carrier. This block mostly contains codes to activate or deactivate features such as call forwarding, but rarely a test number may appear in this set. 515: 552# Des Moines Metro Area (CLEC), Iowa 434: 118 Charlottesville, Virginia (Verified 2013) 732: *99 Central New Jersey (Optimum Phone Service) 802: 111-2222 Vermont 909: 111 Riverside/San Bernardino Counties, California (GTE) <This is the GT Ringback/Trust Territory of the Pacific Islands code, no Idaho here> 909: 114 and 959-1114 Ontario/Pomona/San Bernardino, California (Current for all GTE switches in California) 914: *99 Westchester County, New York (Cablevision/Optimum Voice)
wikipedia