The Combinatorial Expressions and Probability of Random Generation of Binary Palindromic Digit Combinations

The aim of this paper is to obtain three types of expressions for calculating the probability of implementing palindromic digit combinations on a finite equally possible combination of zeros and ones. When calculating the probability of implementation of palindromic digit combinations, the classical definition of probability is applied. The main results of the paper are formulated in the form of three theorems. Moreover, the consequences of these theorems and typical examples of calculating the probability of implementing palindromic digit combinations in a data string of binary code are considered. All formulated theorems and their consequences are accompanied by proofs. The obtained numerical results of the paper can be used in the analysis of numerical computer data written as a binary code string in BIN format files. It should also be noted that the combinatorial expressions described in the article for calculating the number of palindromic combinations of digits in the binary number system can be used in number theory and in various branches of computer science. The development of these results from the point of view of obtaining an expression for calculating the number of palindromic combinations of digits in the binary number system contained in two-dimensional data arrays is also of immediate theoretical and practical interest. However, these results are not presented in this work, but they can be considered in subsequent publications.


Introduction
The number theory most often presents a palindrome as a symmetric natural number. It is known that the term "palindrome" was introduced in the 17th century (from ancient Greek. πάλιν -"back, again" and ancient Greek. δρóμος -"running, movement") [1]. At the same time, numbers that do not change when they are read from left to right and from right to left are called palindromic numbers or palindromes [2]. Particularly, palindromes are integers such as 10101; 23132; 5643465, etc. It is known the "Online Encyclopedia of Integer Sequences" in particular contains a sequence of palindromes of the binary number system [3]. The number of digits in a numeric palindrome can be either even or odd. However, when writing to the computer's memory, the order of the digits in the palindrome differs in a symmetrical arrangement. In the set of natural palindromes, a subset of prime palindromes can be distinguished. A prime palindrome is a prime natural number such that the number obtained from it when reading from right to left is also a prime palindrome. It is known [4] that there are only 781 prime palindromes among the first hundred million natural numbers. From prime palindromes, it is possible to distinguish numbers made up only of ones,

890
The Combinatorial Expressions and Probability of Random Generation of Binary Palindromic Digit Combinations which are called repunits. Whereupon, only five prime repunits are known, which consist of 2, 19, 23, 317, and 1,031 ones [4]. There are also known palindromic formulas, i.e. expressions consisting of the sum or difference of numbers, the result of which does not change as a result of reading the expression from right to left. For example, the equality 42 + 35 = 53 + 24 is true [5]. At the same time, there is an algorithm that supposedly allows obtaining a palindrome from any integer. For example, the paper [6] shows this algorithm of the "flip-and-add" form was used to calculate the number of steps for obtaining palindromes for numbers from 1 to 500. The number theory knows the hypothesis that this algorithm, if applied to an integer, allows obtaining a palindrome after a finite number of addition operations performed. However, Ch. Trigg refutes the validity of this hypothesis [7]. From integers under 10,000, Ch. Trigg found 251 numbers, which do not make a palindrome after the first hundred addition operations. The smallest of the marked numbers is 196. Moreover, D. Duncan showed that this algorithm does not always allow obtaining a palindrome for binary numbers [7]. Particularly, this algorithm will never give a palindrome from the binary number 10110. It should be noted that in addition to numerical palindromes, science and technology also know palindromic matrices, which are considered, for example, in the following publications [8][9][10]. In addition, numerical symmetric objects are known in mathematics, for example, Pascal's and Leibniz's triangles. It should be noted that Sivaraman R. obtained new interesting results characterizing the properties of the Leibniz triangle [11]. The paper [12] describes a well-known algorithm for searching for palindromes in a string. The paper [13] formulates a new algorithm for obtaining palindromes of the binary number system. At the same time, this paper provides examples of using this algorithm to obtain binary palindromes with different numbers of binary digits. Moreover, two new results in the field of determining the number of integer palindromes were described in the paper [14]. The first problem presents the regularities that determine the finding of the total number of locations of binary palindromes of various digits limited by a set finite digit. The second problem describes the regularities for determining the number of integer palindromes of an arbitrary number system with a single digit. Expressions for calculating the probability of implementation of palindromes of the binary number system within the framework of a finite equally probable combination of zeros and ones were first obtained in the paper [15]. The key results of this paper were presented in the form of two theorems. The first theorem is intended for calculating the probability of occurrence of n-digit palindromes in finite equally probable n-digit combinations of zeros and ones. The second theorem is a generalization of the first one. This theorem calculates the probability of occurrence of palindromes of less than n digits in finite equally probable n-digit combinations of zeros and ones. Let us note that the author does not know publications containing the results of calculating the probability of implementing palindromic combinations of digits of the binary number system on finite equally possible combinations of zeros and ones.
The aim of this paper is to obtain three types of expressions for calculating the probability of implementing palindromic combinations of the binary number system on finite equally possible combinations of zeros and ones. In the course of finding an expression to determine the probability of implementation of palindromes, it is assumed to use the classical definition of probability [16][17]. At the same time, the first part provides a theorem about the probability that a combination of given digits of digit n, which is taken randomly from a thoroughly mixed combination of ones and zeroes of discharge n, is palindromic. Next, the theorem on the probability that a combination of given digits of discharge less than n, which is taken randomly from a thoroughly mixed combination of ones and zeroes of discharge n, is palindromic is considered. The third part presents a theorem for calculating the probability that the combination of given digits that do not exceed discharge n and are not less than the second discharge, which is taken randomly from a thoroughly mixed combination of ones and zeroes of discharge n, is palindromic. It should be noted that the theoretical results of calculating the probability of binary palindromic combinations can be used in the analysis of computer data in the BIN format, represented as a binary code string. Separately, it is also important to note that the new combinatorial expressions described in the paper for calculating the number of palindromic combinations of digits in the binary number system can be used both in number theory and in various fields of computer science.
The development of the results from the point of view of obtaining an expression for calculating the number of palindromic combinations of digits in the binary number system contained in two-dimensional data arrays is also of immediate theoretical and practical interest. These results were not included in this work, but they can be described in subsequent papers.

The Probability of Random Generation of a Palindromic Combination of Digits of Discharge n on Equally Possible Inconsistent Combinations of Zeros and Ones of Discharge n
Before the formulation of the results for calculating the probability of random generation of palindromes of the binary number system on equally possible combinations of zeros and ones, let us consider the following lemma. Lemma 1. The number of all combinations of zeros and ones of discharge n is equal to n 2 .

Proof
When proving Lemma 1, let us consistently find the number of combinations of zeros and ones for discharges equal to 1,2,3,...,n, respectively. For a binary number of discharge 1, the number of combinations of zeros and ones is equal to 1 . For a combination of zeros and ones of discharge 2, the number of such combinations is equal to . For a combination of zeros and ones of discharge 3, the number of such combinations is equal to Continuing this sequence of reasoning, we obtain the number of combinations of zeros and ones of discharge n-1 is equal to Therefore, for a combination of zeros and ones of discharge n, the number of combinations of zeros and ones is equal to . Lemma 1 has been proven. Let us note that Lemma 1 allows finding the number of all equally possible inconsistent outcomes (implementation of combinations of zeros and ones) forming a complete group.
Here is an example of using Lemma 1. Example 1. Let us specify all possible combinations of zeroes and ones for discharge 2. Moreover, let us find possible palindromes of discharges 2 and 3. According to Lemma 1, the number of possible combinations for n=2 is equal to 4 2 2  . These combinations include: 00,01,10,11. Of the listed combinations, only the two-digit number 11 is a palindrome.
Let us introduce a few definitions. Definition 1. A palindromic combination of binary system digits is sequential writing of ones and zeroes located in a line from left to right, which is the same when reading them both from left to right and from right to left.
Examples of palindromic combinations of binary system digits are 1001, 0110, 101, and 010. In this case, the binary numbers 1001 and 101 are palindromes. Definition 2. A non-palindromic combination of binary system digits is sequential writing of ones and zeroes located in a line from left to right, which is the not same when reading them both from left to right and from right to left. Examples of non-palindromic combinations of binary system digits are 1011, 0100, 100, and 001. Definition 3. A combination of binary system digits is called sequential writing of the ones and zeroes in a string from left to right. Examples of binary system digit combinations are 1000, 0111, 100, and 010.
By analogy, according to Lemma 1, the number of all combinations of binary system digits for n=3 is equal to 3

Proof
Let the number of palindromes of discharge n (n N) be equal to Q (Q N). Let us perform a simple operation, i.e. replace ones with zeroes and zeroes with ones in the palindrome, respectively. As a result, we obtain palindromic combinations starting and ending with zeroes. Therefore, the total number of palindromic combinations of discharge n, taking into account the number of palindromes (which start and end with ones) and palindromic combinations (which start and end with zeroes) is equal to twice the number of palindromes of discharge n; i.e. the total number of palindromic combinations of discharge n is 2Q. Lemma 2 has been proven.
The first few palindromic combinations of the binary number system are contained in Table 1. Let us suppose that the zeroes and ones in the combinations of the binary number system with discharge n are thoroughly mixed. In this case, the set of all combinations of zeroes and ones of discharge n consists of two subsets, i.e. a subset of palindromic combinations of digits and a subset of non-palindromic combinations of digits.
The following task is set: find the probability that the combination of given digits of discharge n, which is taken randomly from a thoroughly mixed combination of ones and zeroes of discharge n, is palindromic. Let us consider the solution to this problem.
Let us introduce a random event A, which consists in the fact that a random combination of ones and zeroes of discharge n is a palindromic combination. In this case, this combination is selected from equally possible inconsistent combinations of zeros and ones of discharge n, which form a complete group.
Let us formulate the calculation of the probability of an 892 The Combinatorial Expressions and Probability of Random Generation of Binary Palindromic Digit Combinations event A consisting in the generation of a palindromic combination of discharge n within the binary segment of discharge n in the form of Theorem 1. Theorem 1. The probability of random generation of a palindromic combination of the binary system within the framework of equally possible inconsistent combinations of zeros and ones of discharge n, which form a complete group, is calculated as follows: 1. For an odd discharge n, the probability of event A is equal to the following: 2. For an even discharge n, the probability of an event A is equal to the following:

Proof
When finding the probability of event A, let us consider the case of odd and even digits of palindromes separately. First, let us consider the case of odd palindromic combinations. According to Lemma 1, the number of all equally possible combinations of zeros and ones of discharge n, as inconsistent outcomes, which form a complete group, is equal to 2 n . Moreover, the number of palindromic combinations of odd discharge n is equal to twice the number of combinations of palindromes of discharge n, therefore, it is equal to . By applying the expression for calculating the desired probability, the classical definition of probability, we find that the probability of implementing a palindromic combination of the binary system within the framework of an equally possible combination of zeros and ones of an odd discharge n is equal to P (A)=m/ 2 n , where at . In the final form, we obtain the following: Second, let us consider the case of even palindromes. According to Lemma 1, the number of all equally possible combinations of zeros and ones of discharge n is equal to 2 n . At the same time, we assume that all these combinations are also inconsistent and forming a complete group. Moreover, the number of palindromic combinations of even discharges n is equal to /2 2 n n Q  . As a result, by using the classical definition of probability, we find that the probability of implementing m of a palindromic combination of the binary system within the framework of an equally possible combination of zeros and ones of an even discharge n is equal to ( ) /
Let us consider the consequences of Theorem 1.
Consequence 1.1. The highest probability of random implementation of a palindromic combination of the binary system of discharge n is achieved for palindromes of discharges 2,3 and it is equal to 1/2.

Proof
By applying the probability formula (2) for n=2, we obtain the following: 2/ 2 ( ) 2 1/ 2. PA  By applying the probability formula (1) for n=3, we obtain the following: . Similarly, by applying formulas (1) and (2) for all digits greater than the third one, we obtain the under 1/2 probability of implementing a palindromic combination. Consequence 1.1. has been proven.
2. An increase in both odd and even discharges n leads to a decrease in the probability of random implementation of a palindromic combination of discharge n.

Proof
By applying the probability formula (1) for an arbitrary odd discharge n and for the next odd digit n+2, we obtain the fulfillment of the following condition: Consequently, as the odd digit increases, the probability decreases. By analogy, for an even discharge n and for the next even digit n+2, we obtain the fulfillment of the condition from formula (2): Consequently, as the even digit increases, the probability decreases. Consequence 1.2 has been proven. Consequence 1.3. With an infinite increase in both odd and even discharges n, the probability of random implementation of a palindromic combination of discharge n tends to zero.

Proof
Let us calculate the limit of sequence with a common term written in the right part of the formula (1) for an odd discharge n tending to infinity.
As a result, we obtain the following: Next, let us calculate the limit of sequence with a common term written in the right part of the formula (2) with an even discharge n tending to infinity. We obtain the following: Therefore, with an infinite increase in both odd and even discharges n, the probability of implementing a palindromic combination tends to zero. Consequence 1.3 has been proven. Let us consider the following example.
Example 2. By using formulas (1) and (2), let us calculate the probability of random implementation of a palindromic combination of discharge n of the binary system within an equally possible combination of zeros and ones of discharge n. Let the digits of the palindromes take the following values of n=2, 3,4,5,6,7,8,9, 100,101,1000,1001. Table 2 contains the results of calculating the desired probability obtained for the palindromic combination of discharge n.

The Probability of Random Generation of a Palindromic Combination of Digits of a Discharge Less Than n on Equally Possible Inconsistent Combinations of Zeros and Ones of Discharge n
The probability of random generation of a palindromic combination of digits of a discharge less than n on equally possible inconsistent combinations of zeros and ones of discharge n.
By analogy, let us consider the problem of a random generation of a palindromic combination of two digits of a discharge less than n within the framework of equally possible inconsistent combinations of zeros and ones of discharge n.
Let us introduce a random event B, which consists in the fact that a random combination of ones and zeroes of a discharge less than n is a palindromic combination. In this case, this combination is selected from equally possible inconsistent combinations of zeros and ones of discharge n, which form a complete group.
Let us have m palindromic combinations of a discharge less than n within the framework of equally possible inconsistent combinations of zeros and ones of discharge n. Let us formulate the calculation of the probability of an event B consisting in the generation of a palindromic combination of two digits of a discharge less than n within the framework of equally possible inconsistent combinations of zeros and ones of discharge n in the form of Theorem 2.
Theorem 2. The probability of random generation of a palindromic combination of binary system digits of discharge n-i (i=1, 3,5...,m) within the equally possible combination of zeros and units of discharge n (n>i) forming a complete group is calculated as follows: 1. For an odd discharge of palindromic combinations equal to n-i, the probability of event B is equal to the following: 2. For an even discharge of palindromic combinations equal to n-i, the probability of event B is equal to the following:

Proof
When finding the probability of event B, let us consider the case of odd and even discharges of palindromic combinations separately.
First, let us consider the case of odd palindromic combinations. According to Lemma 1, the number of all combinations of zeros and ones of discharge n is equal to 2 n . We will consider all these combinations equally possible, inconsistent, and forming a complete group. Moreover, it is known that the number of odd palindromes of discharge n-i is equal to . According to Lemma 2, the number of palindromic combinations for discharge n-i is twice the number of palindromes i n Q  . Therefore, the number of palindromic combinations for discharge n-i is equal to the following: . By applying the expression to calculate the probability P(B) =k/ 2 n , we obtain that the probability of random generation of a palindromic combination and the discharge n-i of the binary system within the framework of an equally possible combination of zeros and ones of an odd discharge n is equal to Second, let us consider the case of even palindromic combinations. According to Lemma 1, the number of all combinations of zeros and ones of discharge n is also equal to 2 n . Similarly, we will consider all these combinations equally possible, inconsistent, and forming a complete group. Moreover, it is known that the number of even palindromes of discharge n-i is equal to ( 2)/2 2    ni ni Q . Similarly, according to Lemma 2, the number of palindromic combinations for discharge n-i is twice the number of palindromes i n Q  . Therefore, the number of palindromic combinations for discharge n-i is equal to the following: The Combinatorial Expressions and Probability of Random Generation of Binary Palindromic Digit Combinations the expression to calculate the probability ( ) / 2 n P B k  , we find that the probability of random generation of a palindromic combination and the discharge n-i of the binary system within the framework of an equally possible combination of zeros and ones of an even discharge n is equal to

Proof
By applying the probability formula (4) for n=3, i=1, we obtain the following: Similarly, by applying the probability formula (3) for n=4, i=1, we obtain the following: . By applying formulas (3) and (4) for all n>4, i  1, we obtain the under-1/4 probability of random generation of a palindromic combination of binary system digits of discharge n-i within the equally possible inconsistent combinations of zeros and ones of discharge n. Consequence 2.1 has been proven.

Proof
By applying the probability formula (3) for an odd discharge n-i and for the next smaller odd discharge n-i-2, we obtain the fulfillment of the following condition: Similarly, it is shown that the subsequent decrease in the discharge of palindromic combinations (for n-i-4, etc.) leads to a further decrease in the probability of random generation of a palindromic combination. By analogy, for an even discharge n-i and for the next even discharge n-i-2, we obtain the fulfillment of the condition from formula (4): Similarly, it is shown that the subsequent decrease in the discharge of palindromic combinations (for n-i-4, etc.) leads to a further decrease in the probability of random generation of palindromic combinations. Consequence 2.2 has been proven.
Consequence 2.3. With an infinite increase in the discharges of both odd and even combinations of zeros and ones equal to discharge n and an invariable finite discharge of palindromic combinations of binary system digits of discharge n-i, the probability of implementing this palindromic combination of binary system digits tends to zero. Proof: Let us calculate the limit of sequence with a common term written in the right part of the formula (3). For an odd discharge n of a combination of zeros and ones tending to positive infinity, we obtain that i also tends to positive infinity. As a result, we obtain the following: Next, let us calculate the limit of sequence with a common term written in the right part of the formula (4). For an odd discharge n of a combination of zeros and ones tending to positive infinity, we obtain that i also tends to positive infinity. As a result, we obtain the following: Therefore, with an infinite increase in both odd and even discharges n of combinations of zeros and ones, the probability of random generation of palindromic combinations of binary system discharges tends to zero. Consequence 2.3 has been proven.
Here is an example of the application of Theorems 1-2. Example 3. By using the formulas (1)-(4), let us calculate the probability of random generation of a palindromic combination of binary system digits of discharge n-i within the framework of equally possible inconsistent combinations of zeros and ones of discharge n.
Solution: Let the discharges of palindromic combinations of digits take the following values n-i=2, 3,4,5,6,7,8,9 when the discharges of the combinations of zeros and ones are also equal to n=2, 3,4,5,6,7,8,9. Table 3 contains the results of calculating the desired probability. The upper part of Table 3 shows the dotted lines indicating the cells corresponding to the values of the discharges of combinations of zeros and ones and digits of palindromic combinations of numbers, for which the desired probability does not exist. Indeed, in these cases, discharges of palindromic combinations are larger than those of combinations of zeros and ones, within which the palindromic combinations are placed. Moreover, Table 3 shows the desired probability reaching the highest values when the number of discharges of combinations of zeros and ones and the number of discharges of palindromic combinations is equal. These values of the probability of generation of palindromic combinations of digits are diagonal and marked in bold in Table 3. They are calculated by using the expressions (1)-(2). All probability values that are in Table 3 below the diagonal ones are calculated by using the expressions (3)-(4). It should be noted that the values of the desired probability for any odd and nearest-right even discharges of palindromic combinations of digits, starting with a certain value of the discharge of the combination of zeros and ones, coincide in magnitude. At the same time, the larger the discharge of the combination of zeros and ones, the more matching pairs of probability values.

The Probability of the Random Generation of all Palindromic Combinations of Various Discharges, Limited by the Framework of a Given Finite Discharge n on Equally Inconsistent Combinations of Zeros and Ones that do not Exceed Discharge n and are not Less Than the Second Discharge
Further, let us consider the problem of random generation of palindromic combinations of various discharges that do not exceed discharge n and are not less than the second discharge, within the framework of equally possible inconsistent combinations of zeros and ones that do not exceed discharge n but are not less than the second discharge.
Let us have r palindromic combinations that do not exceed discharge n within the framework of equally possible inconsistent combinations of zeros and ones of discharge n but are not less than the second discharge.
Let us introduce a random event C consisting in the fact that r combinations taken randomly, which do not exceed discharge n within the framework of equally possible inconsistent combinations of zeros and ones of the discharge n but are not less than the second discharge, are palindromic. In this case, these combinations are selected from equally possible inconsistent combinations of zeros and units of discharge n but not less than the second discharge, which form a complete group.
Let us formulate the calculation of the probability of an event C consisting in the random generation, r, of palindromic combinations of various discharges not exceeding discharge n and not less than the second discharge within the framework of all combinations of zeros and ones not exceeding discharge n and not less than the second digit in the form of Theorem 3. Before the formulation of Theorem 3, let us prove the following lemma.

Proof
It is known from Lemma 1 that the number of all combinations of zeros and ones of discharge n is equal to n 2 . Therefore, the number of all combinations of zeros and ones of discharge n-1 digit is equal to Continuing to lower the discharge of the combination by one, we will obtain that all combinations of zeros and ones of digit 2 are equal to 2 2 . Therefore, the total 896 The Combinatorial Expressions and Probability of Random Generation of Binary Palindromic Digit Combinations number of all combinations of zeros and ones of discharges that do not exceed n but are not less than the second digit is equal to . Lemma 3 has been proven. Theorem 3. The probability of implementation of all palindromic combinations of various discharges that do not exceed discharge n and are not less than the second discharge, within the framework of equally possible inconsistent combinations of zeros and ones that do not exceed discharge n but are not less than the second discharge is calculated as follows: Let n be odd. In this case, the total desired probability is equal to the following: Let n be even. In this case, the total desired probability is equal to the following: Here j=2,4,6,..., (n-2); k=3,5,7,...(n-1).

Proof
When finding the probability of event C, let us consider the case of odd and even discharges n separately.
First, let us consider the case of odd n. According to Lemma 3, the number of all combinations of zeros and ones of discharges that do not exceed n and are not less than the second discharge is equal to We will consider all these combinations equally possible, inconsistent, and forming a complete group. Moreover, the number of odd palindromic combinations of discharges that do not exceed n but are not less than the second discharge is equal to , where j=2,4,6,...,(n-1); k=3,5,7,...(n-2) and Q is the number of all palindromes that do not exceed the set discharge of the largest palindrome, which is equal to n but not less than the second discharge. By applying the expression to calculate the probability P(C)=r/w, we obtain that the probability of implementing all palindromic combinations of various discharges that do not exceed discharge n and are not less than the second discharge, within the framework of equally possible inconsistent combinations of zeros and ones that do not exceed the odd discharge n and are not less than the second discharge is equal to the following . We will consider all these combinations equally possible, inconsistent, and forming a complete group. Moreover, the number of even palindromic combinations of discharges that do not exceed n is equal to the following where j=2,4,6,..., (n-2); k=3,5,7,...(n-1), and Q is the number of all palindromes that do not exceed the set discharge of the largest palindrome, which is equal n and not less than the second discharge. By applying the expression to calculate the probability P(C)=r/w, we obtain that the probability of implementing palindromic combinations of various discharges that do not exceed discharge n and are not less than the second discharge, within the framework of equally possible inconsistent combinations of zeros and ones that do not exceed the even discharge n and are not less than the second discharge is equal to the following 21 ( ) 0.  Theorem 3 has been proven. Let us consider the following example. Example 4. It is required to find the probability of implementation of all palindromic combinations of various discharges that do not exceed digit 3 and are not less than the second discharge, within the framework of equally possible inconsistent combinations of zeros and ones that do not exceed discharge 3 and are not less than the second discharge.
Solution: Since the discharge of the number, within which the palindromes are recalculated, is odd, we use the formula (5) to find the desired probability of palindrome locations. As a result, we obtain the following: Comment: Since this example shows the upper limit of the second sum in the formula (1) equal to 3-2=1 and the lower limit in this sum equal to k=3, we obtain that 1 is less than 3. Therefore, when calculating the number of palindromic combinations, r, the formula (5) does not take into account the third term, which corresponds to the second sum.
Check. Let us specify all the palindromic combinations, the number of which is eight, in this example. It is obvious that these are the following four palindromic combinations of the third digit: 111, 101, 010, and 000, as well as four palindromic combinations of the second discharge, located in the combinations of zeroes and ones of the third discharge: 11 (repeated twice), 00 (repeated twice). Finally, we obtain eight palindromic combinations that do not exceed the third discharge but are not less than the second discharge. By applying Lemma 3, we obtain the number of all combinations of zeros and ones, which have discharges not exceeding n=3 and are not less than the second discharge, equal to . As a result, the desired probability is equal to P(C) =r/w=8/12. The check confirmed the correctness of the result obtained by the formula (5).
Example 5. It is required to find the probability of implementation of all palindromic combinations of various digits that do not exceed discharge 4 and are not less than the second discharge, within the framework of equally possible inconsistent combinations of zeros and ones that do not exceed discharge 4 and are not less than the second discharge.
Solution: Since the discharge of the number, within which the palindromes are recalculated, is even, we use the formula (6) to find the desired probability of palindrome locations. As a result, we obtain the following:


Check. Let us specify all palindromic combinations of zeroes and ones, which have at least the second discharge, the number of which is 18, in this example. It is obvious that these are the following four palindromic combinations of the fourth discharge: 1111, 1001, 0110, 0000, as well as eight palindromic combinations of the third discharge: 111, 000, 101 (101 is repeated 3 times), 010 (010 is repeated 3 times), and six palindromic combinations of the second discharge: 11 (11 is repeated 3 times), 00 (00 is repeated 3 times). Finally, we obtain 18 palindromic combinations that do not exceed the third discharge but are not less than the second discharge. By applying Lemma 3, we obtain the number of all combinations of zeros and ones, which have discharges not exceeding n=4 and are not less than the second digit, equal to 28 2 2 2 . As a result, the desired probability is equal to P(C) =r/w=18/28. The check confirmed the correctness of the result obtained by the formula (6).

Conclusions
This paper considers obtaining three types of expressions for calculating the probability of generating palindromic combinations of the binary system digits within the framework of finite equally possible combinations of zeros and ones. The main results of the paper are formulated in the form of three theorems. The first theorem contains expressions for calculating the probability of implementing palindromic combinations of binary system digits of discharge n on finite equally possible combinations of zeros and ones of discharge n. The second theorem describes an expression for calculating the probability of generating palindromic combinations of binary system digits of the discharge less than n on finite equally possible combinations of zeros and ones of discharge n. The third theorem presents an expression for calculating the probability of generating all palindromic combinations of various discharges, limited by the framework of a given finite discharge n on a combination of zeros and ones that do not exceed discharge n and are smaller than the second discharge. The second theorem can be considered as a generalization of the first one, just as the third theorem also represents a generalization of the second one. The theorems have several consequences. Both theorems and their consequences are accompanied by proofs. The paper includes several examples demonstrating the application of the theoretical results obtained for calculating the probabilities of implementing palindromic combinations of binary system digits of various discharges within the framework of finite equally possible combinations of zeros and ones. The expressions for calculating the probability of binary palindromic combinations of digits, which have been obtained in the paper, are supposed to be used in the analysis of computer data written in the form of binary code strings in the BIN format.