The application is designed to provide certain functionality related to the branch of mathematics separated as Discrete Mathematics. The application includes some algorithms, parts of number theory and encryption, induction and recursion, implementation of selected advanced calculation methods. The topics of Discrete Mathematics and Its Applications (McGraw-Hill Education - Kenneth H. Rosen) are impossible to cover in one application, and this application does not set itself such a task.
The algorithms in the application include( Algorithms Activity): algorithm for linear and binary search, sorting by the bubble method and by the inverting method, determining connected pairs and non-overlapping pairs (for example, events with a beginning and an end like lectures).
The bubble sort is one of the simplest sorting algorithms, but not one of the most efficient. It puts a list into increasing order by successively comparing adjacent elements, interchanging them if they are in the wrong order. To carry out the bubble sort, performs the basic operation, that is, interchanging a larger element with a smaller one following it, starting at the beginning of the list, for a full pass. Iterates this procedure until the sort is complete.
The insertion sort compares the second element with the first element and inserts it before the first element if it does not exceed the first element and after the first element if it exceeds the first element. At this point, the first two elements are in the correct order. The third element is then compared with the first element, and if it is larger than the first element, it is compared with the second element; it is inserted into the correct position among the first three elements. The procedure continues in the same way with the following elements to the end of the list.
Algorithms that make what seems to be the “best” choice at each step are called greedy algorithms – these are the two algorithms for connected pairs and non-overlapping pairs.
Suppose we have a group of proposed lectures with preset start and end times. Devise a greedy algorithm to schedule as many of these talks as possible in a lecture hall, under the assumptions that once a lecture starts, it continues until it ends, no two lectures can proceed at the same time, and a lecture can begin at the same time another one ends.
Non-overlapping pairs can be used finding a route between two sites.
The Number Conversion and Cryptography Activity includes: - converting numbers from one number system to another; - Factorization of numbers and calculation of the greatest common divisor; -generation of pseudo random numbers; - encryption of texts; and fast exponentiation and modulo reduction.
The application can be used in practice when converting numbers from one number system to another( Number Conversion Activity), in arithmetic operations( Arithmetic operations) with integers in different number systems (they are included in base 2,3,4,5,6,7,8,9,16). Arithmetic operations and conversion to different number systems are performed over integers without a limit by the length of the operands, the so-called BigInteger. The arithmetic operations implemented are: addition, subtraction, multiplication, division and exponentiation.
Factorization(Factorization Activity) involves determining the prime factors of a number, determining the greatest common divisor of two numbers, and the inverse of a given number modulo. And with these functions, you work with BigInteger numbers.
Generation of pseudo random numbers of type BigInteger( Pseudo Random Numbers), determined by the length in bits.
Encryption of text(Cryptography Activity) from Latin alphabet(26), encryption of texts with Cyrillic alphabet (30 letters) and encryption using the RSA method and AES method. With all encryption methods, it is possible to store the encrypted files in the Download directory of the device, in the names of which there is text AppDiscret. The encryption text can be entered or copied and pasted.
In cryptography it is important to be able to find remainder of b in power n divided by m efficiently without using an excessive amount of memory. The app also has a function for fast modular exponentiation( Fast Modular Exponentiation Activity) .
Mathematical induction in application includes(Mathematical Induction Activity): summation of the first N integers, summation of the first N odd integers, summation of the first N integers raised to the power of 2, three referential calculations. And with these functions, you work with BigInteger numbers.
The app include: - function for determining a perfect cube( Counting Activity) - algorithm that determines if a given list of positive integers contains at least two numbers whose product is a perfect cube; - and whether a function from a finite set of integers to another finite set of integers is one-to-one . A function is one-to-one if no two elements in the domain are mapped to the same element in the codomain.
Advanced calculation functions( Counting Activity) include: - calculating the number of bacteria multiplied after a certain time; - Fibonacci numbers; - The number of disc moves in the game Towers of Hanoi; - The number of bit strings of length N that do not have 2 consecutive 0s; - The number of valid numbers that contain reading counts 0; - The number of so-called Catalan numbers.
In almost all activities, there is help that reveals the calculated characteristics.
You repeatedly reject the application with motives, descriptions and screenshots. In words, the algorithms can be represented in this way, there are auxiliary images when actively working with the application and they show what is calculated, but they cannot be included in the description. With a limit of 8 screenshots, we have included theses that show the main functionality of the application. We kindly ask you to specify what specifically changes should be made in order for them to be adopted and the application not to be rejected.