ArticleslgStudy

computer science

Alpha max plus beta min algorithm

Alpha max plus beta min algorithm 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 Alpha max plus beta min algorithm rather than just read about it. In short: The alpha max plus beta min algorithm is a high-speed approximation of the square root of the sum of two squares. The square root of the sum of two squares, also known as Pythagorean addition, is a useful function, because it finds the hypotenuse of a right triangle given the two side lengths, the norm of a 2-D vector, or the magnitude |z|=a2+b2 of a complex number z = a + bi given the real and imaginary parts.

Alpha max plus beta min algorithm — main illustration
Alpha max plus beta min algorithm — illustration

Key takeaways

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

Reference excerpt

The alpha max plus beta min algorithm is a high-speed approximation of the square root of the sum of two squares. The square root of the sum of two squares, also known as Pythagorean addition, is a useful function, because it finds the hypotenuse of a right triangle given the two side lengths, the norm of a 2-D vector, or the magnitude |z|=a2+b2 of a complex number z = a + bi given the real and imaginary parts. The algorithm avoids performing the square and square-root operations, instead using simple operations such as comparison, multiplication, and addition. Some choices of the α and β parameters of the algorithm allow the multiplication operation to be reduced to a simple shift of binary digits that is particularly well suited to implementation in high-speed digital circuitry.

Formulation The approximation is expressed as |z|=α𝐌𝐚𝐱+β𝐌𝐢𝐧, where 𝐌𝐚𝐱 is the maximum absolute value of a and b, and 𝐌𝐢𝐧 is the minimum absolute value of a and b. For the closest approximation, the optimum values for α and β are

α0=2cos⁡π81+cos⁡π8=1−tan2π16=0.960433870103... and β0=2sin⁡π81+cos⁡π8=2tan⁡π16=0.397824734759..., giving a maximum error of 3.96%.

Improvements When α<1, |z| becomes smaller than 𝐌𝐚𝐱 (which is geometrically impossible) near the axes where 𝐌𝐢𝐧 is near 0. This can be remedied by replacing the result with 𝐌𝐚𝐱 whenever that is greater, essentially splitting the line into two different segments.

|z|=max⁡(𝐌𝐚𝐱,α𝐌𝐚𝐱+β𝐌𝐢𝐧). Depending on the hardware, this improvement can be almost free. Using this improvement changes which parameter values are optimal, because they no longer need a close match for the entire interval. A lower α and higher β can therefore increase precision further. This can be improved even further by, instead of using |z0|=1⋅𝐌𝐚𝐱+0⋅𝐌𝐢𝐧 as the second estimate, use a second pair of parameters α0 and β0, with α1 and β1 adjusted accordingly.

|z|=max⁡(|z0|,|z1|), |z0|=α0𝐌𝐚𝐱+β0𝐌𝐢𝐧, |z1|=α1𝐌𝐚𝐱+β1𝐌𝐢𝐧.

Of course, a non-zero β0 requires at least one extra addition and some bit-shifts (or a multiplication), nearly doubling the cost and, depending on the hardware, possibly defeating the purpose of using an approximation in the first place.

See also Hypot, a precise function or algorithm that is also safe against overflow and underflow.

References

Lyons, Richard G. Understanding Digital Signal Processing, section 13.2. Prentice Hall, 2004 ISBN 0-13-108989-7. Griffin, Grant. DSP Trick: Magnitude Estimator.

External links "Extension to three dimensions". Stack Exchange. May 14, 2015.

Illustrations

Alpha max plus beta min algorithm: The locus of points that give the same value in the algorithm, for different values of alpha and beta
The locus of points that give the same value in the algorithm, for different values of alpha and beta
Alpha max plus beta min algorithm illustration

Worked examples

Example 1 — a first encounter with Alpha max plus beta min algorithm

Start with the simplest possible case. Write down what Alpha max plus beta min algorithm 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 Alpha max plus beta min algorithm 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 Alpha max plus beta min algorithm 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 Alpha max plus beta min algorithm

In research
Alpha max plus beta min algorithm 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 Alpha max plus beta min algorithm 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
Alpha max plus beta min algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Approximation algorithms, Pythagorean theorem, Root-finding algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Alpha max plus beta min algorithm 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 “Alpha max plus beta min algorithm” →

How to study Alpha max plus beta min algorithm in 20 minutes

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

Frequently asked questions

What is Alpha max plus beta min algorithm in simple terms?

The alpha max plus beta min algorithm is a high-speed approximation of the square root of the sum of two squares. The square root of the sum of two squares, also known as Pythagorean addition, is a useful function, because it finds the hypotenuse of a right triangle given the two side lengths, the…

Why does Alpha max plus beta min algorithm 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 Alpha max plus beta min algorithm?

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 Alpha max plus beta min algorithm.

Tags

  • Approximation algorithms
  • Pythagorean theorem
  • Root-finding algorithms

Keep exploring