Tag
Algorithms
- What Is the Time Complexity of a Modulo Operation?Modulo is usually constant time for fixed-width integers, but its cost grows with the bit lengths of arbitrary-precision operands.
- How to Fix “Undefined Control Sequence” in an IEEE Overleaf TemplateFix an undefined control sequence in an Overleaf IEEEtran project by locating the unknown command and checking its spelling, package, and syntax.
- How to Convert a Summation to a Closed FormLearn practical methods for rewriting finite sums as closed forms, with worked geometric and square-sum examples and checks for common errors.
- Show That the Sum of log(i) from 1 to n Is O(n log n)Since log i ≤ log n for all i from 1 to n, the sum is at most n log n; an integral lower bound also shows it is Ω(n log n).
- How Does Strassen’s Recursive Matrix Multiplication Work?Strassen’s algorithm multiplies matrices recursively using seven block products instead of eight, reducing the arithmetic complexity to about n^2.807.
- Fast 2D Line–Triangle Intersection TestTest whether an infinite 2D line intersects a triangle using three cross products, without calculating an intersection point or dividing.
- How Do You Compute Irrational Numbers?Irrational numbers are computed by algorithms that produce rational approximations to a chosen precision, often with an error bound.
- How to Apply Alpha-Max-Beta-Min to Three NumbersThe two-input alpha-max-beta-min formula does not directly extend to three values; sort their magnitudes and include the middle value.
- How to Convert a Number to BinaryUse repeated division by 2 for the integer part and repeated multiplication by 2 for the fraction, then normalize and round for IEEE 754.
- How to Create an Algorithm for Solving a Rubik’s CubeA Rubik’s Cube solver needs a cubie-state model, legal move tables, and a search strategy such as IDA* with pattern databases.
- Insertion Sort Average Case – Comparisons, Shifts and Θ(n²)Derivation of insertion sort's average case on a random permutation, about n²/4 comparisons and shifts, with the exact formula (n² + 3n)/4 − Hₙ.