Circular reference
Encyclopedia
A circular reference is a series of reference
Reference
Reference is derived from Middle English referren, from Middle French rèférer, from Latin referre, "to carry back", formed from the prefix re- and ferre, "to bear"...

s where the last object references the first, resulting in a closed loop.

In language

A circular reference is not to be confused with the logical fallacy of a circular argument. Although a circular reference will often be unhelpful and reveal no information, such as two entries in a book index referring to each other, it is not necessarily so that a circular reference is of no use. Dictionaries, for instance, must always ultimately be a circular reference since all words in a dictionary are defined in terms of other words, but a dictionary nevertheless remains a useful reference. Sentences containing circular referents can still be meaningful;
Her brother gave her a kitten; his sister thanked him for it.


is circular but not without meaning. Indeed, it can be argued that self-reference is a necessary consequence of Aristotle's Law of non-contradiction, a fundamental philosophical axiom
Axiom
In traditional logic, an axiom or postulate is a proposition that is not proven or demonstrated but considered either to be self-evident or to define and delimit the realm of analysis. In other words, an axiom is a logical statement that is assumed to be true...

. In this view, without self-reference, logic
Logic
In philosophy, Logic is the formal systematic study of the principles of valid inference and correct reasoning. Logic is used in most intellectual activities, but is studied primarily in the disciplines of philosophy, mathematics, semantics, and computer science...

 and mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

 become impossible, or at least, lack usefulness.

In business

Sometimes, improperly planned business support will result in a circular reference.

For example:
Alice needs to return her washing machine – it's defective and she needs it working. She is instructed by Bob of customer service
Customer service
Customer service is the provision of service to customers before, during and after a purchase.According to Turban et al. , “Customer service is a series of activities designed to enhance the level of customer satisfaction – that is, the feeling that a product or service has met the customer...

 to report to Carol of
Returns and Exchanges for the requested service. Carol, however, tells Alice to report to David. David tells Alice to talk to Bob.


The entire set of references is now worthless because none of them can satisfy Alice's request; Alice has been given the run-around, every referral leads to Alice being told to refer to someone else.

In computer programming

Circular references can appear in computer programming
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...

 when one piece of code requires the result from another, but that code needs the result from the first.

For example:
Function A will show the time the sun last set based on the current date. Function B will calculate the date based on the number of times the moon has orbited the earth since the last time Function B was called. So, Function B asks Function C just how many times that is. Function C doesn't know, but can figure it out by calling Function A to get the time the sun last set.


The entire set of functions is now worthless because none of them can return any useful information whatsoever. This leads to what is technically known as a livelock. It also appears in spreadsheet
Spreadsheet
A spreadsheet is a computer application that simulates a paper accounting worksheet. It displays multiple cells usually in a two-dimensional matrix or grid consisting of rows and columns. Each cell contains alphanumeric text, numeric values or formulas...

s when two cells require each others' result. For example, if the value in Cell A1 is to be obtained by adding 5 to the value in Cell B1, and the value in Cell B1 is to be obtained by adding 3 to the value in Cell A1, no values can be computed. (Even if the specifications are A1:=B1+5 and B1:=A1-5, there is still a circular reference. It doesn't help that, for instance, A1=3 and B1=-2 would satisfy both formulas, as there are infinitely many other possible values of A1 and B1 that can satisfy both instances.)

A circular reference represents a big problem in computing. A deadlock
Deadlock
A deadlock is a situation where in two or more competing actions are each waiting for the other to finish, and thus neither ever does. It is often seen in a paradox like the "chicken or the egg"...

 occurs when two or more processes are each waiting for another to release a resource. Most relational databases such as Oracle and SQL Server do not allow circular referencing because there is always a problem when deleting a row from a table having dependencies to another row from another table (foreign key) which refers to the row being deleted. From the technical documentation at Microsoft: The FOREIGN KEY constraints cannot be used to create a self-referencing or circular FOREIGN KEY constraint. Only inner joins are supported and are specified by a comparison of columns from different tables. Circular joins are not supported. A circular join is a SQL query that links three or more tables together into a circuit. Oracle uses the term Cyclic to designate a circular reference.

A distinction should be made with processes containing a circular reference between those that are incomputable and those that are an iterative calculation with a final output. The latter may fail in spreadsheets not equipped to handle them but are nevertheless still logically valid.

Circular references in spreadsheets

Circular reference in worksheets can be a very useful technique for solving implicit equations such as the Colebrook equation and many others, which might otherwise require tedious Newton-Raphson algorithms in VBA or use of macros.

See also

  • Ms Fnd in a Lbry
    Ms Fnd in a Lbry
    "MS Fnd in a Lbry" is a satirical science fiction short story about the exponential growth of information, written by Hal Draper in 1961...

  • Nested function
    Nested function
    In computer programming, a nested function is a function which is lexically encapsulated within another function. It can only be called by the enclosing function or by functions directly or indirectly nested within the same enclosing function. In other words, the scope of the nested function is...

  • Halting problem
    Halting problem
    In computability theory, the halting problem can be stated as follows: Given a description of a computer program, decide whether the program finishes running or continues to run forever...

  • Catch-22 (logic)
    Catch-22 (logic)
    A Catch-22, coined by Joseph Heller in his novel Catch-22, is a logical paradox arising from a situation in which an individual needs something that can only be acquired with an action that will lead him to that very situation he is already in; therefore, the acquisition of this thing becomes...

  • There's a hole in the bucket
  • Regress argument
  • Pseudohistory
    Pseudohistory
    Pseudohistory is a pejorative term applied to a type of historical revisionism, often involving sensational claims whose acceptance would require rewriting a significant amount of commonly accepted history, and based on methods that depart from standard historiographical conventions.Cryptohistory...

  • Chicken or the egg
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK