Professional Documents
Culture Documents
ICS 251
Foundation of Computer Science
Projects
Instructor: Sabiha begum
Factorial
Number System
Section - 201
Submitted By:
Renad Mohammed Alrshidi : 201905569
Abstract:
This project explains the Factorial Number System. First, we illustrate the process of
conversion from FNS to the Decimal Number System (DNS) and back. Secondly, we
provide theorems on the divisibility rules for several numbers in FNS. The main aim of
this project is to provide the clear understanding of Factorial Number System. Our
choice of FNS is motivated by several arguments. First of all, it is a rich field wherein
many mathematical investigations can be held. Secondly, the topic bridges school
and academic mathematical education, since it evokes reflection on DNS, a system
with which the students are familiar, a general notion of a number.
Introduction:
Our traditional radix number systems might be called "geometric" because the
denominations of successive "places" (columns) form a geometric series, e.g., 1, 10,
100,... Another interesting type of number system is the "factorial system
It tells that you can present any number in a factorial system and if you have a
number in factorial number system, you can transform it to decimal as ∑n0(ai∙i!).
The factorial number system is a mixed radix numeral system(in which the numerical
base varies from position to position): the i-th digit from the right has base i, which
means that the digit must be strictly less than i, and that (taking into account the
bases of the less significant digits) its value to be multiplied by (i − 1)! (its place
value).
A factorial number representation will be flagged by a subscript "!",so for instance
341010!
stands for 354413021100, whose value is
=3×5!+4×4!+1×3!+0×2!+1×1!+0×0!
=46310
Background:
Different representations of numbers, non-standard mixed base positional number
system, discovering mathematical theorems.
Let a be a natural number such that when written in FNS it takes the form of an n
digit number:
(a)! = (anan−1...a1)! (1)
The right side of this equation is an abbreviation of the following combination of
factorials and natural coefficients:
(a)! = (anan−1 . . . a1)! = an · n! + an−1 · (n − 1)! + . . . + a1 · 1! (2)
For each multiplier i!, i ∈ {1, 2, ..., n} the coefficient ai ∈ N satisfies the inequality:
0 ≤ (ai)10 ≤ i
import java.util.Scanner;
class FNS {
static String getFactoradic(int n) {
String fact = "";
int i = 1;
while (n != 0) {
fact += n % i;
n = n / i;
i++;
}
return fact;
}
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
System.out.print("Enter a number: ");
int num = in.nextInt();
StringBuffer fns = new StringBuffer(getFactoradic(num));
System.out.println("Number " + num + " in FNS: " + fns.reverse());
in.close();
}
}
Conclusion:
The project’s starting point is the definition of FNS, a mixed base, positional number
system, which rather does not appear in the traditional curriculum neither at high
school, nor at the academic level. The first activity the student teachers take is the
conversion of numbers written in FNS into the DNS notation and back. This initial
activity is necessary for students to learn “how the system works” and it reveals the
basic properties of the system.
Bibliography:
1. https://www.mathpages.com/home/kmath165.htm
2. https://en.wikipedia.org/wiki/Factorial_number_system
3. https://www.techtud.com/short-notes/factorial-number-system
4. https://blogs.scientificamerican.com/roots-of-unity/its-factoradical/