Giter Club home page Giter Club logo

combinatorics.jl's Introduction

Combinatorics

Combinatorics Combinatorics Build Status Coverage Status Codecov

A combinatorics library for Julia, focusing mostly (as of now) on enumerative combinatorics and permutations. As overflows are expected even for low values, most of the functions always return BigInt, and are marked as such below.

This library provides the following functions:

  • bellnum(n): returns the n-th Bell number; always returns a BigInt;
  • catalannum(n): returns the n-th Catalan number; always returns a BigInt;
  • combinations(a): returns combinations of all order by chaining calls to Base.combinations(a,n);
  • derangement(n)/subfactorial(n): returns the number of permutations of n with no fixed points; always returns a BigInt;
  • doublefactorial(n): returns the double factorial n!!; always returns a BigInt;
  • fibonaccinum(n): the n-th Fibonacci number; always returns a BigInt;
  • hyperfactorial(n): the n-th hyperfactorial, i.e. prod([i^i for i = 2:n]; always returns a BigInt;
  • integer_partitions(n): returns a Vector{Int} consisting of the partitions of the number n.
  • jacobisymbol(a,b): returns the Jacobi symbol (a/b);
  • lassallenum(n): returns the nth Lassalle number An defined in arXiv:1009.4225 (OEIS A180874); always returns a BigInt;
  • legendresymbol(a,p): returns the Legendre symbol (a/p);
  • lucasnum(n): the n-th Lucas number; always returns a BigInt;
  • multifactorial(n): returns the m-multifactorial n(!^m); always returns a BigInt;
  • multinomial(k...): receives a tuple of k_1, ..., k_n and calculates the multinomial coefficient (n k), where n = sum(k); returns a BigInt only if given a BigInt;
  • primorial(n): returns the product of all positive prime numbers <= n; always returns a BigInt;
  • stirlings1(n, k, signed=false): returns the (n,k)-th Stirling number of the first kind; the number is signed if signed is true; returns a BigInt only if given a BigInt.
  • stirlings2(n, k): returns the (n,k)-th Stirling number of the second kind; returns a BigInt only if given a BigInt.
  • nthperm(a, k): Compute the kth lexicographic permutation of the vector a.

Young diagrams

Limited support for working with Young diagrams is provided.

  • partitionsequence(a): computes partition sequence for an integer partition a
  • x = a \ b creates the skew diagram for partitions (tuples) a, b
  • isrimhook(x): checks if skew diagram x is a rim hook
  • leglength(x): computes leg length of rim hook x
  • character(a, b): computes character the partition b in the ath irrep of Sn

combinatorics.jl's People

Contributors

andreasnoack avatar andrioni avatar ararslan avatar bicycle1885 avatar daviddelaat avatar dlfivefifty avatar dpsanders avatar gajomi avatar iamed2 avatar jiahao avatar juliohm avatar kristofferc avatar randy3k avatar ti-s avatar tlnagy avatar ymer avatar yuyichao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.