ArticleslgStudy

computer science

Circuit (computer science)

Circuit (computer science) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Circuit (computer science) rather than just read about it. In short: In theoretical computer science, a circuit is a model 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 of Boolean circuits and a mathematical model for digital logic circuits.

Key takeaways

  • Circuit (computer science) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Circuit (computer science) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Circuit (computer science) from memory before moving on to harder problems.

Reference excerpt

In theoretical computer science, a circuit is a model 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 of Boolean circuits and a mathematical model for digital logic circuits. Circuits are defined by the gates they contain and the values the gates can produce. For example, the values in a Boolean circuit are Boolean 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 A circuit is a triplet (M,L,G), where

M is a set of values, L is a set of gate labels, each of which is a function from Mi to M for some non-negative integer i (where i represents the number of inputs to the gate), and G is a labelled directed acyclic graph with labels from L. The vertices of the graph are called gates. For each gate g of in-degree i, the gate g can be labeled by an element ℓ of L if and only if ℓ is defined on Mi.

Terminology The gates of in-degree 0 are called inputs or leaves. The gates of out-degree 0 are called outputs. If there is an edge from gate g to gate h in the graph G then h is called a child of g. We suppose there is an order on the vertices of the graph, so we can speak of the kth child of a gate when k is less than or equal to the out-degree of the gate. The size of a circuit is the number of nodes of a circuit. The depth of a gate g is the length of the longest path in G beginning at g up to an output gate. In particular, the gates of out-degree 0 are the only gates of depth 1. The depth of a circuit is the maximum depth of any gate. Level i is the set of all gates of depth i. A levelled circuit is a circuit in which the edges to gates of depth i comes only from gates of depth i+1 or from the inputs. In other words, edges only exist between adjacent levels of the circuit. The width of a levelled circuit is the maximum size of any level.

Evaluation The exact value V(g) of a gate g with in-degree i and label l is defined recursively for all gates g.

V(g)={lif g is an inputl(V(g1),…,V(gi))otherwise, where each gj is a parent of g. The value of the circuit is the value of each of the output gates.

Circuits as functions The labels of the leaves can also be variables which take values in M. If there are n leaves, then the circuit can be seen as a function from Mn to M. It is then usual to consider a family of circuits (Cn)n∈ℕ, a sequence of circuits indexed by the integers where the circuit Cn has n variables. Families of circuits can thus be seen as functions from M∗ to M. The notions of size, depth and width can be naturally extended to families of functions, becoming functions from ℕ to ℕ; for example, size(n) is the size of the nth circuit of the family.

Complexity and algorithmic problems Computing the output of a given Boolean circuit on a specific input is a P-complete problem. If the input is an integer circuit, however, it is unknown whether this problem is decidable. Circuit complexity attempts to classify Boolean functions with respect to the size or depth of circuits that can compute them.

See also Arithmetic circuit complexity Boolean circuit Circuit complexity Circuits over sets of natural numbers The complexity classes NC, AC and TC Quantum circuit and BQP

References Vollmer, Heribert (1999). Introduction to Circuit Complexity. Berlin: Springer. ISBN 978-3-540-64310-4. Yang, Ke (2001). "Integer Circuit Evaluation Is PSPACE-Complete". Journal of Computer and System Sciences. 63 (2, September 2001): 288–303. doi:10.1006/jcss.2001.1768. ISSN 0022-0000.

Worked examples

Example 1 — a first encounter with Circuit (computer science)

Start with the simplest possible case. Write down what Circuit (computer science) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Circuit (computer science) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Circuit (computer science) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Circuit (computer science)

In research
Circuit (computer science) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Circuit (computer science) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Circuit (computer science) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Circuit complexity, Theory of computation, so understanding it makes those chapters shorter.
In everyday life
Look for Circuit (computer science) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Circuit (computer science)” →

How to study Circuit (computer science) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Circuit (computer science) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Circuit (computer science) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Circuit (computer science) in simple terms?

In theoretical computer science, a circuit is a model 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 of Boolean circuits and a mathematical model for digital logic circuits.

Why does Circuit (computer science) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Circuit (computer science)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Circuit (computer science).

Tags

  • Circuit complexity
  • Theory of computation

Keep exploring