ArticleslgStudy

computer science

Advice (complexity)

Advice (complexity) 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 Advice (complexity) rather than just read about it. In short: In computational complexity theory, an advice string is an extra input to a Turing machine that is allowed to depend on the length n of the input, but not on the input itself. A decision problem is in the complexity class P/f(n) if there is a polynomial time Turing machine M with the following property: for any n, there is an advice string A of length f(n) such that, for any input x of length n, the machine M correc…

Key takeaways

  • Advice (complexity) 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 Advice (complexity) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Advice (complexity) from memory before moving on to harder problems.

Reference excerpt

In computational complexity theory, an advice string is an extra input to a Turing machine that is allowed to depend on the length n of the input, but not on the input itself. A decision problem is in the complexity class P/f(n) if there is a polynomial time Turing machine M with the following property: for any n, there is an advice string A of length f(n) such that, for any input x of length n, the machine M correctly decides the problem on the input x, given x and A. The most common complexity class involving advice is P/poly where advice length f(n) can be any polynomial in n. P/poly is equal to the class of decision problems such that, for every n, there exists a polynomial size Boolean circuit correctly deciding the problem on all inputs of length n. One direction of the equivalence is easy to see. If, for every n, there is a polynomial size Boolean circuit A(n) deciding the problem, we can use a Turing machine that interprets the advice string as a description of the circuit. Then, given the description of A(n) as the advice, the machine will correctly decide the problem on all inputs of length n. The other direction uses a simulation of a polynomial-time Turing machine by a polynomial-size circuit as in one proof of Cook's theorem. Simulating a Turing machine with advice is no more complicated than simulating an ordinary machine, since the advice string can be incorporated into the circuit. Because of this equivalence, P/poly is sometimes defined as the class of decision problems solvable by polynomial size Boolean circuits, or by polynomial-size non-uniform Boolean circuits. P/poly contains both P and BPP (Adleman's theorem). It also contains some undecidable problems, such as the unary version of every undecidable problem, including the halting problem. Because of that, it is not contained in DTIME (f(n)) or NTIME (f(n)) for any f. Advice classes can be defined for other resource bounds instead of P. For example, taking a non-deterministic polynomial time Turing machine with an advice of length f(n) gives the complexity class NP/f(n). If we are allowed an advice of length 2n, we can use it to encode whether each input of length n is contained in the language. Therefore, any boolean function is computable with an advice of length 2n and advice of more than exponential length is not meaningful. Similarly, the class L/poly can be defined as deterministic logspace with a polynomial amount of advice. Known results include:

The classes NL/poly and UL/poly are the same, i.e. nondeterministic logarithmic space computation with advice can be made unambiguous. This may be proved using an isolation lemma. It is known that coNEXP is contained in NEXP/poly. If NP is contained in P/poly, then the polynomial time hierarchy collapses (Karp-Lipton theorem).

References

Worked examples

Example 1 — a first encounter with Advice (complexity)

Start with the simplest possible case. Write down what Advice (complexity) 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 Advice (complexity) 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 Advice (complexity) 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 Advice (complexity)

In research
Advice (complexity) 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 Advice (complexity) 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
Advice (complexity) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational complexity theory, so understanding it makes those chapters shorter.
In everyday life
Look for Advice (complexity) 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 “Advice (complexity)” →

How to study Advice (complexity) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Advice (complexity) 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 Advice (complexity) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Advice (complexity) in simple terms?

In computational complexity theory, an advice string is an extra input to a Turing machine that is allowed to depend on the length n of the input, but not on the input itself. A decision problem is in the complexity class P/f(n) if there is a polynomial time Turing machine M with the following prop…

Why does Advice (complexity) 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 Advice (complexity)?

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 Advice (complexity).

Tags

  • Computational complexity theory

Keep exploring