---
name: "Data::Password::zxcvbn::Combinatorics"
section: "3pm"
platform: "linux"
package: "libdata-password-zxcvbn-perl"
version: "1.1.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Data::Password::zxcvbn::Combinatorics"
---

# Data::Password::zxcvbn::Combinatorics(3pm)

some combinatorial functions

## NAME

Data::Password::zxcvbn::Combinatorics - some combinatorial functions

## VERSION

version 1.1.2

## DESCRIPTION

This module provides a few combinatorial functions that are used throughout the library.

## FUNCTIONS

### "nCk"

```
  my $combinations = nCk($available,$taken);
```

Returns the binomial coefficient:

```
 / $available \
 |            |
 \   $taken   /
```

### "enumerate\_substitution\_maps"

```
 my $enumeration = enumerate_substitution_maps(\%substitutions);
```

Given a hashref of arrayrefs, interprets it as a map of substitutions. Returns an arrayref of hashrefs, containing all reverse-substitutions.

For example, given:

```
 {'a' => ['@', '4']}
```

("'a' can be replaced with either '@' or '4'")

it returns:

```
  [{'@' => 'a'}, {'4' => 'a'}] ],
```

("in one case, '@' could have been substituted for 'a'; in the other, '4' could have been substituted for 'a'")

### "factorial"

```
  my $fact = factorial($number);
```

Returns the factorial of the given number.

## AUTHOR

Gianni Ceccarelli \<gianni.ceccarelli@broadbean.com\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by BroadBean UK, a CareerBuilder Company.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
