In combinatorial mathematics, the Lobb number Lm, n counts the number of ways that n + m open parentheses can be arranged to form the start of a valid sequence of balanced parentheses.
The Lobb number are parameterized by two non-negative integers m and n with n >= m >= 0. It can be obtained by:
Lobb Number is also used to count the number of ways in which n + m copies of the value +1 and n – m copies of the value -1 may be arranged into a sequence such that all of the partial sums of the sequence are non- negative.
Input : n = 3, m = 2 Output : 5 Input : n =5, m =3 Output :35
The idea is simple, we use a function that computes binomial coefficients for given values. Using this function and above formula, we can compute Lobb numbers.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Finding number of digits in n'th Fibonacci number
- Super Ugly Number (Number whose prime factors are in given set)
- Get the kth smallest number using the digits of the given number
- Number of compositions of a natural number
- Number of digits in the nth number made of given four digits
- Count number of triplets with product equal to given number with duplicates allowed | Set-2
- Number of ways to represent a number as sum of k fibonacci numbers
- Count number of triplets with product equal to given number with duplicates allowed
- Check if the given number is Ore number or not
- Check if a number is an Achilles number or not
- Given number of matches played, find number of teams in tournament
- Find the maximum number of composite summands of a number
- Minimum number of cubes whose sum equals to given number N
- Number of ways to get a given sum with n number of m-faced dices
- Check if a number is Flavius Number
- Calculate the number of set bits for every number from 0 to N
- Minimum number of squares whose sum equals to given number N | set 2
- Number of substrings with length divisible by the number of 1's in it
- Maximum number of prime factors a number can have with exactly x factors
- Number of distinct ways to represent a number as sum of K unique primes
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.