Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Circuit (computer science)

From Wikipedia, the free encyclopedia
Model of computation
"Digital circuit" redirects here. For the use in networking, seeTelecommunication circuit.

Intheoretical computer science, acircuit is amodel of computation in which input values proceed through a sequence of gates, each of which computes a function. Circuits of this kind provide a generalization ofBoolean circuits and a mathematical model for digitallogic circuits. Circuits are defined by the gates they contain and the values the gates can produce. For example, the values in a Boolean circuit areBoolean values, and the circuit includes conjunction, disjunction, and negation gates. The values in an integer circuit are sets of integers and the gates compute set union, set intersection, and set complement, as well as the arithmetic operations addition and multiplication.

Formal definition

[edit]

A circuit is a triplet(M,L,G){\displaystyle (M,L,G)}, where

The vertices of the graph are calledgates. For each gateg{\displaystyle g} ofin-degreei{\displaystyle i}, the gateg{\displaystyle g} can be labeled by an element{\displaystyle \ell } ofL{\displaystyle L} if and only if{\displaystyle \ell } is defined onMi.{\displaystyle M^{i}.}

Terminology

[edit]

The gates of in-degree 0 are calledinputs orleaves. The gates of out-degree 0 are calledoutputs. If there is an edge from gateg{\displaystyle g} to gateh{\displaystyle h} in the graphG{\displaystyle G} thenh{\displaystyle h} is called achild ofg{\displaystyle g}. We suppose there is an order on the vertices of the graph, so we can speak of thek{\displaystyle k}th child of a gate whenk{\displaystyle k} is less than or equal to the out-degree of the gate.

Thesize of a circuit is the number of nodes of a circuit. Thedepth of a gateg{\displaystyle g} is the length of thelongest path inG{\displaystyle G} beginning atg{\displaystyle g} up to an output gate. In particular, the gates of out-degree 0 are the only gates of depth 1. Thedepth of a circuit is the maximum depth of any gate.

Leveli{\displaystyle i} is the set of all gates of depthi{\displaystyle i}. Alevelled circuit is a circuit in which the edges to gates of depthi{\displaystyle i} comes only from gates of depthi+1{\displaystyle i+1} or from the inputs. In other words, edges only exist between adjacent levels of the circuit. Thewidth of a levelled circuit is the maximum size of any level.

Evaluation

[edit]

The exact valueV(g){\displaystyle V(g)} of a gateg{\displaystyle g} with in-degreei{\displaystyle i} and labell{\displaystyle l} is defined recursively for all gatesg{\displaystyle g}.

V(g)={lif g is an inputl(V(g1),,V(gi))otherwise,{\displaystyle V(g)={\begin{cases}l&{\text{if }}g{\text{ is an input}}\\l(V(g_{1}),\dotsc ,V(g_{i}))&{\text{otherwise,}}\end{cases}}}

where eachgj{\displaystyle g_{j}} is a parent ofg{\displaystyle g}.

The value of the circuit is the value of each of the output gates.

Circuits as functions

[edit]

The labels of the leaves can also be variables which take values inM{\displaystyle M}. If there aren{\displaystyle n} leaves, then the circuit can be seen as a function fromMn{\displaystyle M^{n}} toM{\displaystyle M}. It is then usual to consider a family of circuits(Cn)nN{\displaystyle (C_{n})_{n\in \mathbb {N} }}, a sequence of circuits indexed by the integers where the circuitCn{\displaystyle C_{n}} hasn{\displaystyle n} variables. Families of circuits can thus be seen as functions fromM{\displaystyle M^{*}} toM{\displaystyle M}.

The notions of size, depth and width can be naturally extended to families of functions, becoming functions fromN{\displaystyle \mathbb {N} } toN{\displaystyle \mathbb {N} }; for example,size(n){\displaystyle size(n)} is the size of then{\displaystyle n}th circuit of the family.

Complexity and algorithmic problems

[edit]

Computing the output of a givenBoolean circuit on a specific input is aP-complete problem. If the input is aninteger circuit, however, it is unknown whether this problem isdecidable.

Circuit complexity attempts to classifyBoolean functions with respect to the size or depth of circuits that can compute them.

See also

[edit]

References

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Circuit_(computer_science)&oldid=1285770537"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp