Top "Combinatorics" questions

Deals with combinations of entities belonging to a finite set in accordance with certain constraints.

What is the Julia function to count combinations (n choose k)?

I'm looking for the (hopefully built-in) function in Julia that calculates the number of combinations I could obviously implement my …

julia combinatorics counting
How do you calculate the total number of all possible unique subsets from a set with repeats?

Given a set** S containing duplicate elements, how can one determine the total number all the possible subsets of S, …

language-agnostic math set combinatorics counting
Code-golf: generate pascal's triangle

Generate a list of lists (or print, I don't mind) a Pascal's Triangle of size N with the least lines …

algorithm code-golf combinatorics discrete-mathematics pascals-triangle
What is the maximum number of possible topological sorts of N-order Direct Acyclic Graph?

I need to find the maximum number of topological sorts on Direct Acyclic Graph of N-order. I've checked by running …

math graph-theory combinatorics directed-acyclic-graphs topological-sort
How do you find the optimal assignment of pupils in classes?

23 pupils from level A, 24 from level B and 30 from level C need to be assigned into three classes. The classes …

algorithm dynamic-programming combinatorics mathematical-optimization linear-programming
average case running time of linear search algorithm

I am trying to derive the average case running time for deterministic linear search algorithm. The algorithm searches an element …

algorithm performance search combinatorics linear-search