ArticleslgStudy

computer science

Log-space reduction

Log-space reduction 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 Log-space reduction rather than just read about it. In short: In computational complexity theory, a log-space reduction is a reduction computable by a deterministic Turing machine using logarithmic space. Conceptually, this means the Turing machine can keep a constant number of pointers into the input, along with a logarithmic number of fixed-size integers.

Key takeaways

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

Reference excerpt

In computational complexity theory, a log-space reduction is a reduction computable by a deterministic Turing machine using logarithmic space. Conceptually, this means the Turing machine can keep a constant number of pointers into the input, along with a logarithmic number of fixed-size integers. It is possible that such a machine may not have space to write down its own output, so the only requirement is that any given bit of the output be computable in log-space. Formally, this reduction is executed via a log-space transducer. Such a machine has polynomially-many configurations, so log-space reductions are also polynomial-time reductions. However, log-space reductions are probably weaker than polynomial-time reductions; while any non-empty, non-full language in P is polynomial-time reducible to any other non-empty, non-full language in P, a log-space reduction from an NL-complete language to a language in L, both of which would be languages in P, would imply the unlikely L = NL. It is an open question if the NP-complete problems are different with respect to log-space and polynomial-time reductions. Log-space reductions are normally used on languages in P, in which case it usually does not matter whether many-one reductions or Turing reductions are used, since it has been verified that L, SL, NL, and P are all closed under log-space Turing reductions, meaning that Turing reductions can be used to show a problem is in any of these classes. However, other subclasses of P such as NC may not be closed under Turing reductions, and so many-one reductions must be used. Just as polynomial-time reductions are useless within P and its subclasses, log-space reductions are useless to distinguish problems in L and its subclasses; in particular, every non-empty, non-full problem in L is trivially L-complete under log-space reductions. While even weaker reductions exist, they are not often used in practice, because complexity classes smaller than L (that is, strictly contained or thought to be strictly contained in L) receive relatively little attention. The tools available to designers of log-space reductions have been greatly expanded by the result that L = SL; see SL for a list of some SL-complete problems that can now be used as subroutines in log-space reductions.

Logspace computable function

A function f : 2 ∗ → 2 ∗ {\displaystyle f:2^{*}\to 2^{*}} is (implicitly) logspace computable if:

Its output length is polynomially bounded: There exists some c > 0 {\displaystyle c>0} such that f ( x ) ≤ | x | c {\displaystyle f(x)\leq |x|^{c}} for all x ∈ 2 ∗ {\displaystyle x\in 2^{*}} .

L f = { ⟨ x , i ⟩ ∣ f ( x ) i = 1 } {\displaystyle L_{f}=\left\{\langle x,i\rangle \mid f(x)_{i}=1\right\}} is in complexity class L.

L f ′ = { ⟨ x , i ⟩ ∣ i ≤ | f ( x ) | } {\displaystyle L_{f}^{\prime }=\{\langle x,i\rangle \mid i\leq |f(x)|\}} is in complexity class L. Intuitively, the first condition states that the function creates outputs that are short enough, such that creating a single pointer on the output will take only logspace. That condition is necessary in order for pointers on the output to exist at all. The second condition states that any particular output location is computable in logspace. The third condition states that checking if a pointer is a valid pointer is decidable in logspace. Equivalently, a function f : 2 ∗ → 2 ∗ {\displaystyle f:2^{*}\to 2^{*}} is logspace computable if it is computed by a Turing machine with a log-length work tape, that halts on any input, and an output tape that is write-only and write-once, meaning that at each step, the machine may either write nothing, or write a bit and move the write-head forward by one. Such a machine is usually called a logspace transducer. Note that such a machine, if it halts, must halt in polynomial steps, since its work tape has log-length. Therefore its output length is polynomially bounded. One intuition is that such a function can be computed by a program that can only keep a constant number of pointers to the input, and a constant number of counters that can only contain integers of size p o l y ( n ) {\displaystyle {\mathsf {poly}}(n)} . This is because a counter machine with a constant number of counters that count up to f ( n ) {\displaystyle f(n)} is equivalent to a Turing machine with space complexity O ( log ⁡ f ( n ) ) {\displaystyle O(\log f(n))} .

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Log-space reduction

Start with the simplest possible case. Write down what Log-space reduction 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 Log-space reduction 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 Log-space reduction 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 Log-space reduction

In research
Log-space reduction 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 Log-space reduction 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
Log-space reduction is common in secondary-school and first-year university syllabi. It links to neighbouring topics Reduction (complexity), Theoretical computer science stubs, so understanding it makes those chapters shorter.
In everyday life
Look for Log-space reduction 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.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Log-space reduction in 20 minutes

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

Frequently asked questions

What is Log-space reduction in simple terms?

In computational complexity theory, a log-space reduction is a reduction computable by a deterministic Turing machine using logarithmic space. Conceptually, this means the Turing machine can keep a constant number of pointers into the input, along with a logarithmic number of fixed-size integers.

Why does Log-space reduction 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 Log-space reduction?

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 Log-space reduction.

Tags

  • Reduction (complexity)
  • Theoretical computer science stubs

Keep exploring