Factorials & Subfactorials

Definition

In Mathematics, factorial is an important function, which is used to find how many ways things can be arranged or the ordered set of numbers. The well known interpolating function of the factorial function was discovered by Daniel Bernoulli. The factorial concept is used in many mathematical concepts such as probability, permutations and combinations, sequences and series, etc. In short, a factorial is a function that multiplies a number by every number below it till 1. For example, the factorial of 3 represents the multiplication of numbers 3, 2, 1, i.e. 3! = 3 × 2 × 1 and is equal to 6. In this article, you will learn the mathematical definition of the factorial, its notation, formula, examples and so on in detail. [1]

Factorial

The factorial of a whole number is the function that multiplies the number by every natural number below it. Symbolically, a factorial can be represented by using the symbol “!”. This symbol lies on the same key above “1” on a computer keyboard. “n factorial” is the product of the first n natural numbers and is represented as n! [2]

n! or “n factorial” means: n! = 1 · 2 · 3 · … · n,
where n = Product of the first n positive integers = n(n-1)(n-2)…………………….(3)(2)(1)

Subfactorial

The subfactorial is useful in calculating the number of derangements, i.e., the number of permutations of n objects in which none of them remain in their original position. For instance, one derangement of ABCDEF is BADCFE. (The permutation BADECF is not a derangement of ABCDEF because F remains in the last position.) [4]


The subfactorial (!n) calculates the total number of cases n for objects that have each object’s entry not appear in its original location. The lack of original placement for a set of n objects represents a derangement — a permutation of set elements, where no element appears in its original position. At first glance, the written notation for a subfactorial looks to be an incorrectly written factorial. However, the reversal placement of number and exclamation point serves the purpose of solving for specific statistical scenarios. [3]

Given an integer n, the task is to find the subfactorial of the number represented as !n. The subfactorial of a number is defined using the following formula.

\begin{array}{l}!n = n!\sum_{k=0}^{n}\frac{(-1)^{k}}{k!}\end{array}

For n = 3, the derangements of {1, 2, 3} needs to be found.

The possible arrangements of the set {1, 2, 3} are: {123} {1, 3, 2} {2, 1, 3} {231} {312} {3, 2, 1}

Where the numbers in red represent the fixed entries that assist in the process of excluding the fixed sets from the deranged sets. The two sets, {2, 3, 1} and {3, 1, 2}, lack the fixed-point property and thus total the subfactorial of 3 to equal 2.

Using the formula above, we get the following.

!3 =\,\,\left( 3 \right) \left( 2 \right) \left( 1 \right) \,\,\cdot \,\,\left( \frac{\left( -1 \right) ^0}{0!}\,\,+\,\,\frac{\left( -1 \right) ^1}{1!}\,\,+\,\,\frac{\left( -1 \right) ^2}{2!}\,\,+\,\,\frac{\left( -1 \right) ^3}{3!} \right)

!3 =\,\,6 \cdot \,\,\left( 1 -\,\,1 +\,\,\frac{1}{2}\,\,-\,\,\frac{1}{6} \right) \,\,=\,\,2\,\,

The sequence of subfactorials begins:

Who

The following occupations use subfactorials.

What

Subfactorials, also known as derangements, have a few main applications:

  1. Probability and combinatorics:
    • Subfactorials are used to calculate the probability of a “derangement” – a permutation of a set where no element is in its original position.
    • They are useful in problems involving random arrangements, such as the “hat check problem” where n hats are returned to n people in a random order.
  2. Computer science and algorithms:
    • Subfactorials are used in the analysis of certain algorithms, such as hash table implementations and the analysis of sorting algorithms.
    • They arise in problems involving permutations where the order of elements matters but the actual values don’t.
  3. Mathematics and number theory:
    • Subfactorials have connections to other mathematical sequences and concepts, such as the Bernoulli numbers and Stirling numbers.
    • They are studied as an interesting class of integer sequences with their own properties and patterns.

Subfactorials have applications in probability, combinatorics, computer science, and mathematics, wherever problems involve reasoning about the number of possible permutations with certain constraints. They provide a way to quantify and analyze these types of situations. [5]

Why

See Theoretical Knowledge Vs Practical Application.

How

Many of the References and Additional Reading websites and Videos will assist you with understating and applying factorials and subfactorials.

As some professors say: “It is intuitively obvious to even the most casual observer.

References

[1] “Factorial: What Is Factorial? – Factorial Function in Maths.” 2021. BYJUS. BYJU’S. October 6. https://byjus.com/maths/factorial/.

[2] “Factorial – Meaning, Formula: Factorial of Hundred & 0.” 2024. CUEMATH. Accessed June 28. https://www.cuemath.com/numbers/factorial/.

[3] “Subfactorial.” 2023. Statistics How To. November 29. https://www.statisticshowto.com/subfactorial/.

[4] David G. Stork. “Using subfactorial in algebra”. Mathematics Stack Exchange. September 6, 2018. https://math.stackexchange.com/q/2907261.

[5] “Fast, Helpful AI Chat.” 2024. Poe. Assistant. Accessed June 15. https://poe.com/.

Additional Reading

Factorials

“What Is a Factorial in Maths: Notation, Formulas & Applications.” 2024. GeeksforGeeks. June 14. https://www.geeksforgeeks.org/factorial/.

Subfactorials

“Find Subfactorial of a Number.” 2021. GeeksforGeeks. GeeksforGeeks. October 8. https://www.geeksforgeeks.org/find-subfactorial-of-a-number/.

Medium Member Only Herman, Jaken. 2019. “Subfactorials - Another Twist on Factorials.” Medium. Medium. February 9. https://medium.com/@JakenH/subfactorials-another-twist-on-factorials-23eb81d200fb.

“Subfactorial !n Calculator – Online Derangement Finder”. 2024. dCode. Accessed June 28. https://www.dcode.fr/subfactorial.

Videos

Factorials Vs. Subfactorials

 

Learn How to Solve Subfactorials (Left Factorials) | Quick & Simple Explanation

 

Subfactorial | How to evaluate? | Can you solve it?

⭐ I suggest that you read the entire reference. Other references can be read in their entirety but I leave that up to you.


Medium Member Only Medium Member Only


The featured image on this page is from the TBD on the TBD website.

Website Powered by WordPress.com.

Up ↑