# Tag Archives: binomial coefficient

## Pascal Matrix

In mathematics, particularly in matrix theory and combinatorics, the Pascal Matrix is an infinite matrix containing the binomial coefficients as its elements. There are three… 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 »

## 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 »

## Narayana number

In combinatorics, the Narayana numbers N(n, k), n = 1, 2, 3 …, 1 <= k <= n, form a triangular array of natural numbers,… Read More »

## Mathematics | Generalized PnC Set 2

Prerequisite – Generalized PnC Set 1 Combinatorial problems can be rephrased in several different ways, the most common of which is in terms of distributing… Read More »

## Mathematics | Generalized PnC Set 1

Prerequisite – PnC and Binomial Coefficients So far every problem discussed in previous articles has had sets of distinct elements, but sometimes problems may involve… Read More »

## Mathematics | PnC and Binomial Coefficients

Prerequisite – Combinatorics Basics Several Counting problems require finding the number of ways to arrange a certain number of distinct elements, where the relative order… Read More »

## Number Theory (Interesting Facts and Algorithms)

Questions based on various concepts of number theory and different types of number are quite frequently asked in programming contests. In this article, we discuss… Read More »

## Compute nCr % p | Set 3 (Using Fermat Little Theorem)

Given three numbers n, r and p, compute value of nCr mod p. Here p is a prime number greater than n. Here nCr is… Read More »

## Sum of average of all subsets

Given an array arr of N integer elements, the task is to find sum of average of all subsets of this array. Example : Input… Read More »

## Compute nCr % p | Set 1 (Introduction and Dynamic Programming Solution)

Given three numbers n, r and p, compute value of nCr mod p. Example: Input: n = 10, r = 2, p = 13 Output:… Read More »

## Pascal’s Triangle

Pascal’s triangle is a triangular array of the binomial coefficients. Write a function that takes an integer value n as input and prints first n… Read More »

## Space and time efficient Binomial Coefficient

Write a function that takes two parameters n and k and returns the value of Binomial Coefficient C(n, k). For example, your function should return… Read More »

## Binomial Coefficient | DP-9

Following are common definition of Binomial Coefficients. A binomial coefficient C(n, k) can be defined as the coefficient of X^k in the expansion of (1… Read More »