×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

List of Mathematical Algorithms

This is the ultimate list of Mathematical Algorithms. These are algorithms that utilize insightful mathematical ideas at its core.

Algorithms

Secant Method to find root of any function

Secant Method is a numerical method for solving an equation in one unknown. It avoids this issue of Newton’s method by using a finite difference to approximate the derivative.

Eklavya Chopra
Algorithms

Newton Raphson Method to find root of any function

Newton's Method, also known as Newton-Raphson method, named after Isaac Newton and Joseph Raphson, is a popular iterative method to find a good approximation for the root of a real-valued function f(x) = 0.

Eklavya Chopra
Algorithms

Regula Falsi Method for finding root of a polynomial

Regula Falsi method or the method of false position is a numerical method for solving an equation in one unknown. It is quite similar to bisection method algorithm and is one of the oldest approaches.

Eklavya Chopra
Algorithms

Bisection Method for finding the root of any polynomial

Bisection Method for root finding (also called the interval halving method, the binary search method, or the dichotomy method) is based on the Bolzano’s theorem for continuous functions

Eklavya Chopra
Algorithms

Find all primes with Sieve of Sundaram

Sieve of Sundaram is an efficient algorithm used to find all the prime numbers till a specific number say N.

Vartika Yadav
Algorithms

Finding the Lexicographical Next Permutation in O(N) time complexity

In Lexicographical Permutation Algorithm we will find the immediate next smallest Integer number or sequence permutation. Finding all permutations take O(N!) time complexity but we present an efficient algorithm which can solve this in O(N) time complexity

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
Algorithms

Heap’s algorithm for generating permutations

Heap's Algorithm is used to generate all the possible permutation of n-decimals of a number. It generates each permutation from the previous one by interchanging a single pair of elements; the other n−2 elements are not disturbed. For N numbers, it takes O(N!) time complexity

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
Algorithms

Number of unique partitions of an integer

Given a positive integer, the problem is to find all the Unique Partitions of the number. We can understand the above problem using some basic examples. Naive approach takes O((N^N)log N) time complexity while Dynamic programming takes O(2^N)

Sajal Tikariha
Algorithms

Distance between two points in 2D space

Distance between two points is calculated by creating a right-angled triangle using the two points.The line between the two points is the hypotenuse (the longest side, opposite to the 90° angle). We used the Distance formula derived from Pythagorean theorem with a time complexity of O((log N)^2)

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
Algorithms

Area of Polygon: Shoelace formula

Given coordinates of vertices of polygon, Area of Polygon is calculated using Shoelace formula described by Mathematician and Physicist Carl Friedrich Gauss where polygon vertices are described by their Cartesian coordinates in the Cartesian plane. The time complexity is O(N) with O(1) space

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
Algorithms

Extended Euclidean Algorithm

We will demonstrate Extended Euclidean Algorithm. We will see how you can calculate the greatest common divisor in a naive way which takes O(N) time complexity which we can improve to O(log N) time complexity using Euclid's algorithm. Extended Euclidean Algorithm takes O(log N) time complexity

Arunesh Sarker
Algorithms

Sieve of Atkin

Sieve of Atkin is an algorithm used to find all prime numbers upto a given number (say N) and does so in O(N) time complexity. With a modified version with enumerating lattice points variation, the time complexity goes to O(N / log log N). It is computationally efficient than Sieve of Eratosthenes

Drishti singh
Algorithms

Area of Triangle: Heron's formula

We take a look at Heron's formula which will enable us to calculate the area of any triangle given the length of the three sides of that triangle. The advantage is that the area is calculated using arithmetic operations and hence, the time taken can be assumed to be constant,

Piyush Rajendra Chaudhari Piyush Rajendra Chaudhari
Algorithms

Number of arithmetic progression subsequences in a given set of numbers

The problem is that given an array of n positive integers. The task is to count the number of Arithmetic Progression subsequence in the array. This can be solved using dynamic programming in linear time complexity.

Tanya Anand Tanya Anand
Algorithms

Find the Longest Arithmetic Progression using Dynamic Programming

The problem we will solve is that given a set of integers in sorted order, find length of longest arithmetic progression in that set. This can be solved by brute force in O(N^3) while a dynamic programming approach with take O(N^2) time complexity.

Tanya Anand Tanya Anand
game theory

Zobrist Hashing

Algorithm Complexity Implementations Applications Questions Reading time: 15 minutes | Coding time: 5 minutes Zobrist hashing (additionally alluded to as Zobrist keys or Zobrist marks ) is a hash function development utilized as a part

Uddeshya Singh Uddeshya Singh
game theory

Alpha Beta Pruning in Minimax Algorithm

Algorithm Complexity Implementations Applications Questions Reading time: minutes | Coding time: minutes Like we discussed in earlier article, a hard coded AI can be used to create an intelligent opponent which you can challenge

Uddeshya Singh Uddeshya Singh
game theory

Von Neumann's Minimax Theorem/ algorithm

Introduction Algorithm Complexity Implementations Applications Questions Reading time: 25 minutes | Coding time: 10 minutes Ever since the idea of artificial intelligence dawned upon the humanity, the basic concept of playing games against an

Uddeshya Singh Uddeshya Singh
bitwise operation

Detect if a number is power of 4 using bitwise operators

Reading time: 15 minutes | Coding time: 2 minutes Algorithm Implementation Complexity Questions Bitwise operators are one of the most under-rated operators in C/C++, despite being quite fast as most of the processors

Pratik Jain
bitwise operation

Check if Two Numbers are Equal using Bitwise Operators

Bitwise Operators Explanation Implementations Applications Reading time: 15 minutes | Coding time: 2 minutes In this article, we will explore the technique of checking whether two numbers are equal using bitwise operators. Bitwise operator

Ronit Ray Ronit Ray
bitwise operation

Detect if a number is power of 2 using bitwise operators

Reading time: 15 minutes | Coding time: 1 minutes Algorithm Implementation Complexity Questions Bitwise operators are one of the most under-rated operators in C/C++, despite being quite fast as most of the processors

OpenGenus Tech Review Team OpenGenus Tech Review Team
game theory

Sprague-Grundy Theorem and Game of Kayle

Sprague Grundy function returns smallest non negative integer which is not in the given set. Explore the application of Sprague Grundy Theorem using a famous game of Kayle. Find the complexity and implementation of Sprague Grundy theorem and game of kayle.

Uddeshya Singh Uddeshya Singh
game theory

Nimber Arithmetic : A deeper dive in Nim

Explore Nimber Arithmetic in Game theory and always win a game. Nimbers have two particular operations. nim-addition and nim-multiplication. the nimbers are know as Grundy Numbers. Explore applications in the Game of Nim and odd Knight of the round table problem.

Uddeshya Singh Uddeshya Singh
game theory

Exploring The Game of Nim

Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps. The key to the theory of the game is the binary digital sum of the heap sizes "exclusive or" (xor). It is called the nim-sum. Find implementations of winning strategy and applications

Uddeshya Singh Uddeshya Singh
Algorithms

Bell Numbers: Number of partitions of a set

Bell numbers are a sequence of numbers that describe the number of ways a set with N elements can be partitioned into disjoint, non-empty subsets. Dobinski's Formula Satifaction Sum of Sterling's number of second kind, The Peirce Triangle Method. First few Bell numbers are 1, 1, 2, 5, 15, 52, 203

Uddeshya Singh Uddeshya Singh
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship