# Category Archives: Combinatorial

## Find sum of even index binomial coefficients

Given a positive integer n. The task is to find the sum of even indexed binomial coefficient. That is, nC0 + nC2 + nC4 +… Read More »

## Count of subsequences having maximum distinct elements

Given an arr of size n. The problem is to count all the subsequences having maximum number of distinct elements. Examples: Input : arr[] =… Read More »

## Trinomial Triangle

The trinomial triangle is a variation of Pascal’s triangle. The difference between the two is that an entry in the trinomial triangle is the sum… Read More »

## Leibniz harmonic triangle

The Leibniz harmonic triangle is a triangular arrangement of unit fractions in which the outermost diagonals consist of the reciprocals of the row numbers and… Read More »

## Number of ways to form a heap with n distinct integers

Given n, how many distinct Max Heap can be made from n distinct integers? Examples: Input : n = 3 Output : Assume the integers… Read More »

## Johnson and Trotter algorithm

We are given a sequence of numbers from 1 to n. Each permutation in the sequence that we need to generate should differ from the… Read More »

## Maximum binomial coefficient term value

Given a positive integer n. The task is to find the maximum coefficient term in all binomial coefficient. The binomial coefficient series is nC0, nC1,… Read More »

## Telephone Number

In mathematics, the telephone numbers involution numbers are a sequence of integers are a sequence of integers that count the number of connection patterns in… Read More »

## Program for Binomial Coefficients table

Given an integer max, print Binomial Coefficients table that prints all binomial coefficients B(m, x) where m and x vary from 0 to max Example… Read More »

## Different ways to sum n using numbers greater than or equal to m

Given two natural number n and m. The task is to find the number of ways in which the numbers that are greater than or… Read More »

## Entringer Number

The Entringer Number E(n, k) are the number of permutations of {1, 2, …, n + 1}, starting with k + 1, which, after initially… Read More »

## Sum of Binomial coefficients

Given a positive integer n, the task is to find the sum of binomial coefficient i.e nC0 + nC1 + nC2 + ……. + nCn-1… Read More »

## Eulerian Number

In combinatorics, the Eulerian Number A(n, m), is the number of permutations of the numbers 1 to n in which exactly m elements are greater… Read More »

## Lobb Number

In combinatorial mathematics, the Lobb number Lm, n counts the number of ways that n + m open parentheses can be arranged to form the… Read More »

## Count of arrays having consecutive element with different values

Given three positive integers n, k and x. The task is to count the number of different array that can be formed of size n… Read More »