Next Article in Journal
The Effect of Network Delay and Contagion on Mobile Banking Users: A Dynamical Analysis
Next Article in Special Issue
Preface to the Special Issue “Algebraic Structures and Graph Theory, 2nd Edition”
Previous Article in Journal
The High Relative Accuracy of Computations with Laplacian Matrices
Previous Article in Special Issue
On Non-Commutative Multi-Rings with Involution
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimizing HX-Group Compositions Using C++: A Computational Approach to Dihedral Group Hyperstructures

by
Andromeda Pătraşcu Sonea
and
Ciprian Chiruţă
*,†
“Ion Ionescu de la Brad” Iasi University of Life Sciences, 700490 Iași, Romania
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2024, 12(22), 3492; https://doi.org/10.3390/math12223492
Submission received: 30 September 2024 / Revised: 1 November 2024 / Accepted: 2 November 2024 / Published: 8 November 2024
(This article belongs to the Special Issue Algebraic Structures and Graph Theory, 2nd Edition)

Abstract

:
The HX-groups represent a generalization of the group notion. The Chinese mathematicians Mi Honghai and Li Honxing analyzed this theory. Starting with a group ( G , · ) , they constructed another group ( G , ) P ( G ) , where P ( G ) is the set of non-empty subsets of G. The hypercomposition “ ” is thus defined for any A, B from G, A B = { a · b | a A , b B } . In this article, we consider a particular group, G, to be the dihedral group D n , n is a natural number, greater than 3, and we analyze the HX-groups with the dihedral group D n as a support. The HX-groups were studied algebraically, but the novelty of this article is that it is a computer analysis of the HX-groups by creating a program in C + + . This code aims to improve the calculation time regarding the composition of the HX-groups. In the first part of the paper, we present some results from the hypergroup theory and HX-groups. We create another hyperstructure formed by reuniting all the HX-groups associated with a dihedral group D n as a support for a natural fixed number n. In the second part, we present the C + + code created in the Microsoft Visual Studio program, and we provide concrete examples of the program’s application. We created this program because the code aims to improve the calculation time regarding the composition of HX-groups.
MSC:
20N20

1. Introduction

Hypergroup theory represents a generalization of classical algebraic structures. F. Marty noticed that the quotient group’s elements are sets, and he introduced the concept of a hypergroup in 1934 [1]. Over time, the theory of hypergroups has developed greatly from a theoretical point of view. It has applications in numerous fields, such as geometry, topology, cryptography, code theory, graphs, hypergraphs, automata theory, fuzzy degree, probability, etc. [2,3,4,5,6,7,8]. Starting with a non-empty set H and the hyperoperation : H × H P H , where P H represents the collection of all non-empty subsets of H, we obtained a semihypergroup if and only if the hyperoperation satisfies the associativity relation, i.e., ( a b ) c = a b c , for any a, b, c H 3 . Also, H , is a quasihypergroup if and only if the hyperoperation satisfies the reproducibility relation, i.e., H a = a H = H , for any a H . We say that H , is a hypergroup if and only if “ ” satisfies the associativity and reproducibility relation. In hypergroup theory, we can compute two sets in the following way: for any A, B sets from H, A B = A B = { a b / a A , b B } . In 1985, three Chinese mathematicians, HongXing Li, QinZhi Duan, and PeizHuang, used the term “hypergroup” [9]. Later, Li renamed the concept with the term HX-groups [10]. Zhenliang studied the properties of HX-groups [11], and, recently, the interest in this concept has increased. Corsini studied the hypergroups associated with Z / n Z , the Chinese hypergroupoid of an HX-group, and found conditions such that the Chinese hypergroupoid becomes a hypergroup; see [12,13,14]. Cristea established a link between HX-groups and hypergroups [15]. Sonea determined the HX-groups with dihedral group D n as a support [16], created a new commutative hyperstructure that considered the union of all the HX-groups [17], and studied the NeutroHX-groups [18]. Also, Mousavi, Jafarpour, and Cristea studied the HX-Polygroups [19]. This article is divided into three sections. The first section refers to the introductory notions from the theory of HX-groups and the theory of hypergroups. Also, a new hyperstructure G n formed by the union of all the HX-groups associated with the dihedral group D n for a fixed natural number n is presented [17]. Until now, HX-groups have been analyzed only from an algebraic point of view. In the second part of the article, a computational approach to HX-groups is presented using code in the C + + programming language. This code facilitates the calculation time regarding the composition of HX-groups, and the third section refers to the connection between HX-groups and graph theory.

2. The Construction of the Hyperstructure G n

In this section, we will present the construction of the hyperstructure G n . We consider a new hyperstructure formed by the union of all HX-groups with the dihedral group D n as support for a fixed natural number n > 3  [17]. In what follows, we recall the basic notions of HX-groups.
Definition 1
([10]). Let ( G , · ) be a group and G P ( G ) , where P ( G ) is the set of non-empty subsets of G . An HX-group is a non-empty subset H of P ( G ) , which is a group with respect to the operation “*” defined by
A , B G , A B = { a · b | a A , b B } .
We say that G has group G as support.
The HX-groups with the dihedral group D n as support denoted by G p 1 q 1 are determined [16].
Theorem 1
([16]). For n = p 1 q 1 , p 1 , q 1 N , the ( G p 1 q 1 , ) is an HX-group associated with the dihedral group D n with elements
A i = { ρ i , ρ q 1 + i , ρ 2 q 1 + i , , ρ ( p 1 1 ) q 1 + i } ; A q 1 + i = { ρ i σ , ρ q 1 + i σ , ρ 2 q 1 + i σ , , ρ ( p 1 1 ) q 1 + i σ } ;
where i { 0 , 1 , , q 1 1 } .
Proposition 1.
The < ρ q > is a normal subgroup in D n , where n = p q , p, q are natural numbers.
Proof. 
In what follows, we will recall the definition of a normal subgroup, which we will apply [20] in the demonstration. Let G , · be a group and H a subgroup of G. For any x in G, H is a normal subgroup in G if and only if x H = H x . In this case,
H =   < ρ q >   = { e , ρ q , q 2 q , , q ( p 1 ) q } .
Therefore, the elements in H are of the form ρ k q , k { 0 , 1 , , p 1 } . We have to show that x ρ k q x 1 H for any x D n and k { 0 , 1 , , p 1 } . For x = ρ t , t { 0 , 1 , , n 1 } , we obtain
x h x 1 = ρ t ρ k q ρ t 1 = ρ t + k q + n t = ρ n + k q = ρ n ρ k q = e ρ k q = ρ k q H .
For x = ρ t σ ,
x h x 1 = ρ t σ ρ k q ρ t σ 1 = ρ t σ ρ k q ρ t σ = ρ t σ ρ k q + t σ = ρ t σ σ ρ n ( k q + t ) = ρ t e ρ n ( k q + t ) = ρ t + n ( k q + t ) = ρ n k q = ρ ( p k ) q H .
In conclusion, < ρ q > is a normal subgroup in the dihedral group D n .    □
Proposition 2.
The HX-group obtained previously represents the quotien group G p q = D n < ρ q > for n = p q .
Proof. 
We proved before that < ρ q > is a normal subgroup in D n , so
D n < ρ q > = { x < ρ q > / x D n } .
For x = ρ t , t { 0 , 1 , , n 1 } , we obtain
ρ t < ρ q >   = ρ t · { e , ρ q , q 2 q , , q ( p 1 ) q } = { ρ t , ρ t + q , , ρ t + p 1 q } = A t ,
where A t is defined by Theorem 1.
For x = ρ t σ , t { 0 , 1 , , n 1 } , we have
ρ t σ < ρ q >   = ρ t σ · { e , ρ q , q 2 q , , q ( p 1 ) q } = { ρ t σ , ρ t σ ρ q , ρ t σ q 2 q , , ρ t σ q ( p 1 ) q } = { ρ t σ , ρ t ρ n q σ , ρ t ρ n 2 q σ , , ρ t ρ n p 1 q σ } = { ρ t σ , ρ t + p 1 q σ , ρ t + p 2 q σ , , ρ t + q σ } = { ρ t σ , ρ t + q σ , , ρ t + p 2 q σ , ρ t + p 1 q σ } = A q + t ,
where A q + t , is defined by Theorem 1. Therefore, we can conclude that D n < ρ q > = G p q .    □
After that, we took into consideration the union of all HX-groups associated with a dihedral group D n as support, and we obtained a new hyperstructure defined in [17].
G n = G p 1 q 1 | H X groups for any p 1 , q 1 N such that n = p 1 q 1
is the set of all HX-groups. We define the hyperoperation : G n × G n P G n ; thus,
G p 1 q 1 G p 2 q 2 = 0 s 2 p 1 1 0 t 2 p 2 1 C s , t , C s , t = X s q 1 Y t q 2 ; X s q 1 G p 1 q 1 , Y t q 2 G p 2 q 2 n = p 1 q 1 = p 2 q 2 , p 1 , q 1 , p 2 , q 2 N .
We analyzed the hyperstructure G 4 , and obtained some results; see [17].
Proposition 3.
The hyperstructure G 4 , is a commutative structure where
G 4 = G p 1 q 1 | H X groups , for any p 1 , q 1 N such that 4 = p 1 q 1 .
Remark 1.
The elements of the hyperstructure G 4 , satisfy the following equality
G p 1 q 1 G p 2 q 2 = G p 2 q 2 G p 1 q 1 = G g c d { p 1 , p 2 } l c m { q 1 , q 2 } ,
for any p 1 , q 1 , q 2 , p 2 N such that 4 = p 1 q 1 = p 2 q 2 .
lcm { q 1 , q 2 } represents the least common multiple of numbers q 1 , q 2 , and gcd { p 1 , p 2 } represent the greatest common divisors of p 1 , p 2 .
Proposition 4.
The hyperstructure G 4 , is a semihypergroup, but not a quasihypergroup.
Now, we present the connection between the number of cyclic subgroups and the cardinality of G n .
Remark 2.
The cyclic subgroups of the dihedral group D n are < σ > , < ρ σ > , , < ρ n 1 σ > , and < ρ d > , where d is a divisor of n. So, the number of all cyclic subgroups is n + τ ( n ) , where τ ( n ) = α 1 + 1 α 2 + 1 α k + 1 , n = p 1 α 1 p 2 α 2 p k α k .
Proposition 5.
The cardinality of the hyperstructure G n is equal to the number of normal subgroups of a dihedral group D n
Proof. 
According to Proposition 1 and Remark 2, we can state that the normal subgroups of the dihedral group D n are < ρ d > , where d is a divisor of n. Also, the construction of the hyperstructure G n implies that the | G n | = τ ( n ) , where τ ( n ) = α 1 + 1 α 2 + 1 α k + 1 , n = p 1 α 1 p 2 α 2 p k α k . The conclusion is immediate.     □
Example 1.
We determine the composition between the HX-groups G 1 4 and G 2 2 , where
G 2 2 = { { e , ρ 2 } , { ρ , ρ 3 } , { σ , ρ 2 σ } , { ρ σ , ρ 3 σ } } ; G 1 4 = { { e , ρ , ρ 2 , ρ 3 } , { σ , ρ σ , ρ 2 σ , ρ 3 σ } } .
Therefore,
G 1 4 G 2 2 = { C 0 , 0 , C 0 , 1 , C 0 , 2 , C 0 , 3 , C 1 , 0 , C 1 , 1 , C 1 , 2 , C 1 , 3 } ,
and the sets X s q 1 , Y t q 2 , where s { 0 , 1 } , t { 0 , 1 , 2 , 3 } , q 1 = 4 , q 2 = 2 , are
X 0 4 = { e , ρ , ρ 2 , ρ 3 } , X 1 4 = { σ , ρ σ , ρ 2 σ , ρ 3 σ } , Y 0 2 = { e , ρ 2 } , Y 1 2 = { ρ , ρ 3 } , Y 2 2 = { σ , ρ 2 σ } , Y 3 2 = { ρ σ , ρ 3 σ } .
In the following, we calculate the elements C i , j , i { 0 , 1 } j { 0 , 1 , 2 , 3 } .
C 0 , 0 = X 0 4 Y 0 2 = { e , ρ , ρ 2 , ρ 3 } { e , ρ 2 } = e · e e · ρ 2 ρ · e ρ · ρ 2 ρ 2 · e ρ 2 · ρ 2 ρ 3 · e ρ 3 · ρ 3 = { e , ρ , ρ 2 , ρ 3 } = X 0 4 ; C 0 , 1 = X 0 4 Y 1 2 = { e , ρ , ρ 2 , ρ 3 } { ρ , ρ 3 } = = e · ρ e · ρ 3 ρ · ρ ρ · ρ 3 ρ 2 · ρ ρ 2 · ρ 3 ρ 3 · ρ ρ 3 · ρ 3 . = { e , ρ , ρ 2 , ρ 3 } = X 0 4 C 0 , 2 = X 0 4 Y 2 2 = { e , ρ , ρ 2 , ρ 3 } { σ , ρ 2 σ } = = { σ , ρ σ , ρ 2 σ , ρ 3 σ } = X 1 4 . C 0 , 3 = X 0 4 Y 3 2 = { e , ρ , ρ 2 , ρ 3 } { ρ σ , ρ 3 σ } = X 1 4 .
Similarly, we obtain
C 1 , 0 = X 1 4 Y 0 2 = X 1 4 , C 1 , 1 = X 1 4 Y 1 2 = X 1 4 , C 1 , 2 = X 1 4 Y 1 2 = X 0 4 , C 1 , 3 = X 1 4 Y 1 3 = X 0 4 .
So, we have
G 1 4 G 2 2 = G 1 4 .
Remark 3.
The calculation time for composing two HX-groups can be quite high. This represents the starting point of the idea of creating code in the C + + programming language because we can improve the calculation time and analyze higher-order HX-groups.

3. Materials and Methods

Implementing C + + Code into Microsoft Visual Studio 2022

This section will present the code in the C + + programming language, created in Microsoft Visual Studio 2022. The code describes the HX-groups associated with the dihedral group D n and their composition. Creating such a program was needed to improve the calculation time for composing the HX-groups. The composition problem can become quite complex, as observed in the works [17,18]. The input data will be n (the order of the dihedral group D n ), and the divisors p 1 , q 1 , p 2 , q 2 so that n = p 1 q 1 = p 2 q 2 . In the program, we identify the HX-group G p 1 q 1 with G ( p 1 , q 1 ) ; the elements of G p 1 q 1 formed a matrix and are noted with a [ i ] [ j ] , and similarly the elements of G p 2 q 2 are noted through b [ i ] [ j ] . We identify the elements of the dihedral group with natural numbers. So, we consider the function f : ( D n , · ) ( N , + ) as follows:
f ρ k = k , f ( ρ k σ ) = n + k ,
where k { 0 , 1 , , n 1 } . For a fixed natural number n, we consider the restriction of function f ,  so f : ( D n , · ) ( { 0 , 1 , , 2 n 1 } , + ) . In these conditions, we can state the following:
Proposition 6.
For a fixed natural number n, the function f : ( D n , · ) ( { 0 , 1 , , 2 n 1 } , + )
f ρ k = k , f ( ρ k σ ) = n + k ,
is a bijective function.
Proof. 
The injectivity results immediately because, for any x, y D n such that f ( x ) = f ( y ) , it implies x = y . The elements from D n have the form ρ k or ρ k σ . As we can see, f ( ρ k ) f ( ρ k σ ) for any k { 0 , 1 , , n 1 } . So, to have the equality f ( x ) = f ( y ) means that x = ρ k , y = ρ p , k, p { 0 , 1 , , n 1 } , or x = ρ k σ , y = ρ p σ . In both cases, it results that p = k ; this means that x = y . To study the surjectivity, we have to prove that, for any element k from { 0 , 1 , , 2 n 1 } , there is x D n such that f ( x ) = k . For k { 0 , 1 , , n 1 } , we consider x = ρ k , and, for k n , we consider x = ρ k n σ . In conclusion, f is a bijective function.    □
To determine the composition of groups G p 1 q 1 G p 2 q 2 , where n = p 1 q 1 = p 2 q 2 , we have four cases. We denote by ⊕ the composition law created in the program mentioned above, and we provide the composition rules in each case.
Case 1. We compute the elements that have the form ρ k with ρ p , for any k, p { 0 , 1 , , n 1 } in the following way
k p = f ( ρ k ) f ( ρ p ) = k + p ( m o d n )
Case 2. We compute the elements that have the form ρ k with ρ p σ
k ( n + p ) = f ( ρ k ) f ( ρ p σ ) = n + k + p , k + p < n k + p , k + p n
Case 3. The composition of the elements that has the form ρ p σ with ρ k is
( n + p ) k = f ( ρ p σ ) f ( ρ k ) = 2 n + p k , p < k n + p k , p k
Case 4. The composition of the elements that has the form ρ p σ with ρ k σ is
( n + p ) ( n + k ) = f ( ρ p σ ) f ( ρ k σ ) = p k , p k p + n k , p < k .
In the following, we present the code in the C + + programming language.
#include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int n, i, j, p1, q1, p2, q2, k, l, s, t, a[100][100],
b[100][100],c[200],p,d,e,aux,v[200][200],x, m;
cout << "n=";
cin >> n; cout << "p1=";
cin >> p1;cout << "q1=";
cin >> q1;
if (n == p1 * q1)
{
cout << "The HX Group G(" << p1 << ", " << q1 << ")" << endl;
for (i = 0; i < 2 * p1; i++)
{
for (j = 0; j < q1; j++)
{
if (i < p1)
   a[i][j] = i + j * p1;
   else
   a[i][j] = i + n - p1 + j * p1;
   cout << a[i][j] << " ";
}
cout << endl;
}
}
cout << endl;
 
cout << "p2="; cin >> p2;
cout << "q2="; cin >> q2;
if (n == p2 * q2)
{
cout << "The HX Group G (" << p2 << ", " << q2 << ")" << endl;
d = 2 * p2;
for (i = 0; i < 2 * p2; i++)
{
for (j = 0; j < q2; j++)
{
if (i < p2)
   b[i][j] = i + j * p2;
   else
   b[i][j] = i + n - p2 + j * p2;
cout << b[i][j] << " ";
}
cout << endl;
}
cout << endl;
}
 
if ((n == p1 * q1)&&(n == p2 * q2))
   {
cout << "Composition between the HX group G(" << p1<<
", " << q1 << ") and HX group G(" << p2 << ", " << q2 <<
") is " << endl;
 
m = p1 * p2;
 
for (p = 0; p < p1 * p2; p++)
{
for (j = 0; j < q1; j++)
{
for (t = 0; t < q2; t++)
{
c[p] = (a[p / p2][j] + b[p % p2][t]) % n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
cout << endl;
 
for (p = p1 * p2; p < 2 * p1 * p2; p++)
{
for (j = 0; j < q1; j++)
{
for (t = 0; t < q2; t++)
{
c[p] = (a[p / p2][j] + b[p % p2][t]) % n + n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
 
for (p = 2 * p1 * p2; p < 3 * p1 * p2; p++)
{
for (j = 0; j < q1; j++)
{
for (t = 0; t < q2; t++)
{
c[p] = ((a[p1 + p % p1][j] - b[p % p2][t]) % n) + n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
 
for (p = 3 * p1 * p2; p < 4 * p1 * p2; p++)
{
for (j = 0; j < q1; j++)
{
for (t = 0; t < q2; t++)
{
c[p] = ((a[p1 + p % p1][j] - b[p2 + p % p2][t]) + n) % n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
cout << " Composition between the HX group G(" <<
p2 << ", " << q2 <<") and HX group G(" << p1 << ", "
<< q1 << ") is " << endl;
 
e = 2 * p1;
 
for (p = 0; p < p1 * p2; p++)
{
for (j = 0; j < q2; j++)
{
for (t = 0; t < q1; t++)
{
c[p] = (b[p / p1][j] + a[p % p1][t]) % n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
 
for (p = p1 * p2; p < 2 * p1 * p2; p++)
{
for (j = 0; j < q2; j++)
{
for (t = 0; t < q1; t++)
{
c[p] = (b[p / p1][j] + a[p % p1][t]) % n + n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
 
for (p = 2 * p1 * p2; p < 3 * p1 * p2; p++)
{
for (j = 0; j < q2; j++)
{
for (t = 0; t < q1; t++)
{
c[p] = (b[p / e][j] - a[p % p1][t]) % n + n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
 
for (p = 3 * p1 * p2; p < 4 * p1 * p2; p++)
{
for (j = 0; j < q2; j++)
{
for (t = 0; t < q1; t++)
{
c[p] = ((b[p2 + p % p2][j] - a[p1 + p % p1][t]) + n) % n;
cout << c[p] << " ";
}
}
cout << endl;
}
cout << endl;
}
}

4. Results

4.1. The Results Are Provided by the C + + Code Implemented for N = 4

The following will present the results obtained using the C + + code realized in Microsoft Visual Studio 2022. To better understand the above program, we will explain how it works. For n = 4 , we have the hyperstructure
G 4 = G 2 2 , G 1 4 , G 4 1
Moreover, we apply the program presented in the previous section in each situation.
First situation: We consider p 1 = 2 , q 1 = 2 , p 2 = 1 , q 2 = 4 , respectively. In [16], we presented the composition of HX-groups G 2 2 and G 1 4 . In the presented cod, these HX-groups are equivalent to the following HX-groups
G 2 2 = { { 0 , 2 } , { 1 , 3 } , { 4 , 6 } , { 5 , 7 } } , where { 0 , 2 } = f ( ρ 0 ) , f ( ρ 2 ) , { 1 , 3 } = f ( ρ 1 ) , f ( ρ 3 ) , { 4 , 6 } = f ( σ ) , f ρ 2 σ , { 5 , 7 } = f ρ σ , f ρ 3 σ ; G 1 4 = { { 0 , 1 , 2 , 3 } , { 4 , 5 , 6 , 7 } } , where { 0 , 1 , 2 , 3 } = f ( ρ 0 ) , f ( ρ 1 ) , f ( ρ 2 ) , f ( ρ 3 ) , { 4 , 5 , 6 , 7 } = f σ , f ρ σ , f ρ 2 σ , f ρ 3 σ .
( 1 ) We compute the elements from case 1, where
k p = f ( ρ k ) · f ( ρ p ) = ( k + p ) ( m o d n )
{ 0 , 2 } { 0 , 1 , 2 , 3 } = k { 0 , 2 } f ( ρ k ) 3 p = 0 f ( ρ p ) = = 0 0 0 1 0 2 0 3 2 0 2 1 2 2 2 3 = { 0 , 1 , 2 , 3 , 2 , 3 , 0 , 1 } = { 0 , 1 , 2 , 3 } , { 1 , 3 } { 0 , 1 , 2 , 3 } = k { 1 , 3 } f ( ρ k ) 3 p = 0 f ( ρ p ) = = 1 0 1 1 1 2 1 3 3 0 3 1 3 2 3 3 = { 1 , 2 , 3 , 0 , 3 , 0 , 1 , 2 } = { 0 , 1 , 2 , 3 } .
( 2 ) We applied the formulas from case ( 2 ) , where
k ( n + p ) = f ( ρ k ) f ( ρ p σ ) = n + k + p , k + p < n k + p , k + p n .
{ 0 , 2 } { 4 , 5 , 6 , 7 } = k { 0 , 2 } f ( ρ k ) 3 p = 0 f ( ρ p σ ) = = 0 4 0 5 0 6 0 7 2 4 2 5 2 6 2 7 = { 4 , 5 , 6 , 7 , 6 , 6 , 4 , 5 } = { 4 , 5 , 6 , 7 } .
We explain the second rule in this situation:
0 4 = 4 + 0 + 0 = 4 : ( k = 0 , p = 0 , k + p < 4 ) , 0 5 = 4 + 0 + 1 = 5 : ( k = 0 , p = 1 , k + p < 4 ) , 0 6 = 4 + 0 + 2 = 6 : k = 0 , p = 2 , k + p < 4 , 0 7 = 4 + 0 + 3 = 7 : k = 0 , p = 3 , k + p < 4 , 2 4 = 4 + 2 + 0 = 6 : k = 2 , p = 0 , k + p < 4 , 2 5 = 4 + 2 + 1 = 6 : k = 2 , p = 1 , k + p < 4 , 2 6 = 2 + 2 = 4 : k = 2 , p = 2 , k + p 4 , 2 7 = 2 + 3 = 5 : k = 2 , p = 3 , k + p 4 .
Similarly, we calculate
{ 1 , 3 } { 4 , 5 , 6 , 7 } = k { 1 , 3 } f ( ρ k ) 3 p = 0 f ( ρ p σ ) = = 1 4 1 5 1 6 1 7 3 4 3 5 3 6 3 7 = { 5 , 6 , 7 , 4 , 7 , 4 , 5 , 6 } = { 4 , 5 , 6 , 7 } .
( 3 ) We applied the formulas from case ( 3 ) , where
( n + p ) k = f ( ρ p σ ) f ( ρ k ) = 2 n + p k , p < k n + p k , p k .
{ 4 , 6 } { 0 , 1 , 2 , 3 } = p { 0 , 2 } f ( ρ p σ ) 3 k = 0 f ( ρ k ) = = 4 0 4 1 4 2 4 3 6 0 6 1 6 2 6 3 = { 4 , 7 , 6 , 5 , 6 , 5 , 4 , 3 } = { 4 , 5 , 6 , 7 } ,
where
4 0 = 4 + 0 0 = 4 : p = 0 , k = 0 , p k , 4 1 = 2 4 + 0 1 = 7 : p = 0 , k = 1 , p < k , 4 2 = 2 4 + 0 2 = 6 : p = 0 , k = 2 , p < k , 4 3 = 2 4 + 0 3 = 5 : p = 0 , k = 3 , p < k , 6 0 = 4 + 2 0 = 6 : p = 2 , k = 0 , p k , 6 1 = 4 + 2 1 = 5 : p = 2 , k = 1 , p k , 6 2 = 4 + 2 2 = 4 : p = 2 , k = 2 , p k , 6 3 = 2 4 + 2 3 = 7 : p = 2 , k = 3 , p < k .
Analogously, we have
{ 5 , 7 } { 0 , 1 , 2 , 3 } = p { 1 , 3 } f ( ρ p σ ) 3 k = 0 f ( ρ k ) = = 5 0 5 1 5 2 5 3 7 0 7 1 7 2 7 3 = { 5 , 4 , 7 , 6 , 7 , 6 , 5 , 4 } = { 4 , 5 , 6 , 7 } .
( 4 ) The fourth case refers to computing the elements that are greater than n. We have the relation
( n + p ) ( n + k ) = f ( ρ p σ ) f ( ρ k σ ) = p k , p k p + n k , p < k .
{ 4 , 6 } { 4 , 5 , 6 , 7 } = p { 0 , 2 } f ( ρ p σ ) 3 k = 0 f ( ρ k σ ) = = 4 4 4 5 4 6 4 7 6 4 6 5 6 6 6 7 = { 0 , 3 , 2 , 1 , 2 , 1 , 0 , 3 } = { 0 , 1 , 2 , 3 }
because
4 4 = 0 0 = 0 : p = 0 , k = 0 , p k ; 4 5 = 0 + 4 1 = 3 : p = 0 , k = 1 , p < k ; 4 6 = 0 + 4 2 = 2 : p = 0 , k = 2 , p < k ; 4 7 = 0 + 4 3 = 1 : p = 0 , k = 3 , p < k ; 6 4 = 2 0 = 2 : p = 2 , k = 0 , p k ; 6 5 = 2 1 = 1 : p = 2 , k = 1 , p k ; 6 6 = 2 2 = 0 : p = 2 , k = 2 , p k ; 6 7 = 2 + 4 3 = 3 : p = 2 , k = 3 , p < k .
Therefore, G 2 2 G 1 4 = { 0 , 1 , 2 , 3 } , { 4 , 5 , 6 , 7 } = G 1 4 .
The composition G 1 4 G 2 2 is analyzed analogously and will be described in Table 1:
We have G 1 4 G 2 2 = { 0 , 1 , 2 , 3 } , { 4 , 5 , 6 , 7 } = G 1 4 . In conclusion,
G 2 2 G 1 4 = G 1 4 G 2 2 = G 1 4 .
Second situation: We consider p 1 = 2 , q 1 = 2 , and p 2 = 4 , q 2 = 1 so that the composition G 2 2 G 4 1 is illustrated in the following table according to the rules presented above for each case.
We can state that G 2 2 G 4 1 = { { 0 , 2 } , { 1 , 3 } , { 4 , 6 } , { 5 , 7 } } = G 2 2 , and, proceeding similarly, we obtain G 4 1 G 2 2 = { { 0 , 2 } , { 1 , 3 } , { 4 , 6 } , { 5 , 7 } } = G 2 2 .
Third situation: We have to compute G 4 1 G 1 4 and G 1 4 G 4 1 , where
G 4 1 = { 0 } , { 1 } , { 2 } , { 3 } , { 4 } , { 5 } , { 6 } , { 7 } .

4.2. A Graph Representation of the HX-Groups with Dihedral Group D n as Support

Graph theory is applied in many fields, such as computer science, physics, biology [4,21,22], and social and information systems. A graph represents connected points along with their connections. Lines or curves can represent these connections. The points are called nodes or vertices; the lines between points are edges. The sets of nodes are denoted by V, and the sets of edges are denoted by E; therefore, a graph is represented by G = ( V , E ) . In this section, we construct the graph associated with the hyperstructures G 4 , and G 6 , . The vertices represent the elements of the set G n , and we say that x , y formed an edge if and only if
[ x , y ] = x y { x , y } .
So, let G 4 = ( V 4 , E 4 ) be the graph associated with the hyperstructures G 4 , , where V 4 = { G 1 4 , G 2 2 , G 4 1 } . In relation (2), we established the connection between the composition of two HX-groups. So, according to them, we can draw the following graphs G 4 , and, similarly, we obtained the graph G 6 . For graph G 4 , the node i is represented by the HX-group G i 4 i , where i is a divisior of 4, and, for the graph G 6 , the node j is represented by the HX-group G j 6 j , where j is a divisior of 6. In graph theory, it is important to determine the degree of a vertex. The degree of a vertex v is denoted by d e g ( v ) and represents the number of edges that are incident to the vertex. In our situation, we can say that deg ( 1 ) = deg ( 2 ) = deg ( 4 ) = 2 for G 4 , and deg ( 1 ) = 3 , deg ( 2 ) = 2 , deg ( 3 ) = 2 , and deg ( 6 ) = 3 for G 6 .

5. Discussion

The main objective of the study was to analyze the HX-groups associated with the dihedral group D n through the IT theory. A code in the C + + programming language, created in the Microsoft Visual Studio 2022 program, was presented in detail. This code represents a novelty in the field of HX-groups. In the first part of the paper, we discussed the HX-groups associated with the dihedral group from an algebraic point of view. In the second part of the work, the innovative part of the article was revealed. In Proposition 6, we established a connection between the elements of the dihedral group and natural numbers to implement the HX-groups in the C + + code programming language. The compositions between G 4 1 and G 2 2 and G 2 2 and G 4 1 , respectively, are described in Table 1 and Table 2. This code is necessary to improve the calculation time for the composition of two HX-groups. In Figure 1 and Figure 2, we can notice how the program works for n = 4 . Finally, a connection between the HX-groups G 4 , G 6 and graph theory was presented in Figure 3.

Author Contributions

Conceptualization, A.P.S. and C.C.; Methodology, A.P.S. and C.C.; Code created in Microsoft Visual Studio 2022 program, A.P.S. and C.C.; Writing—original draft, A.P.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in the study are included in the article; further inquiries can be directed to the corresponding author.

Acknowledgments

The authors would like to thank the referees for the advice provided as they significantly contributed to the improvement of the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Marty, F. Sur une generalization de la notion de group. In Proceedings of the Congress of Scandinavian Mathematicians, Stockholm, Sweden, 14–18 August 1934; pp. 45–49. [Google Scholar]
  2. Corsini, P.; Leoreanu, V. Applications of Hyperstructures Theory; Kluwer Academic Publishers: Boston, MA, USA; Dordrecht, The Netherlands; London, UK, 2003. [Google Scholar]
  3. Davvaz, B.; Cristea, I. Fuzzy Algebraic Hyperstructures—An Introduction; Studies in Fuzziness and Soft Computing; Springer: Cham, Switzerland, 2015; Volume 321. [Google Scholar]
  4. Kalampakas, A.; Spartalis, S.; Tsigkas, A. The Path Hyperoperation. An. Şt. Univ. Ovidius Constanţa 2014, 22, 141–153. [Google Scholar] [CrossRef]
  5. Linzi, A.; Cristea, I. Dependence Relations and Grade Fuzzy Set. Symmetry 2023, 15, 311. [Google Scholar] [CrossRef]
  6. Massourous, C.; Mittas, J. Languages-automata and hypercompositional structure. In Algebraic Hyperstructures and Applications, Proceeding of the 4th International Congress, Xanthi, Greece, 27–30 June 1990; World Scientific: Singapore, 1991; pp. 137–147. [Google Scholar]
  7. Vougiouklis, T. On some representations of hypergroups. Ann. Sci. L’Univ. Clermont Mathématiques 1990, 95, 21–29. [Google Scholar]
  8. Tofan, I.; Volf, A.C. On some conections between; hyperstructures and fuzzy sets. Ital. J. Pure Appl. Math. 2000, 7, 63–68. [Google Scholar]
  9. Li, H.X.; Duan, Q.Z.; Wang, P.Z.; Wang, P.Z. Hypergroup(I). BUSEFAL 1985, 23, 22–29. [Google Scholar]
  10. Li, H.X. HX-groups. BUSEFAL 1987, 33, 31–37. [Google Scholar]
  11. Zhenliang, Z. The properties of HX-groups. Italian J. Pure Appl. Math. 1997, 2, 97–106. [Google Scholar]
  12. Corsini, P. HX-groups and Hypergroups. An. Şt. Univ. Ovidius Constanţa 2016, 24, 101–121. [Google Scholar] [CrossRef]
  13. Corsini, P. HX-Hypergroups associated with the direct product of some Z/nZ. J. Algebr. Struct. Their Appl. 2016, 3, 1–15. [Google Scholar]
  14. Corsini, P. Hypergroups associated with HX-groups. An. Şt. Univ. Ovidius Constanţa 2017, 25, 49–64. [Google Scholar] [CrossRef]
  15. Cristea, I.; Novák, M.; Onasanya, B.O. Links Between HX-Groups and Hypergroups. Algebra Coll. 2021, 28, 441–452. [Google Scholar] [CrossRef]
  16. Sonea, A. HX-groups associated to the dihedral group Dn. J. Mult. Valued Log. Soft Comput. 2019, 33, 11–26. [Google Scholar]
  17. Sonea, A. A Way to Construct Commutative Hyperstructures. Comput. Sci. Math. Forum. 2023, 7, 22. [Google Scholar] [CrossRef]
  18. Sonea, A.; Al-Kaseasbeh, S. An introduction to NeutroHX-Groups. In Theory and Applications of NeutroAlgebras as Generalizations of Classical Algebras; IGI Global Publishing Tomorrow’s Research Today: Hershey, PA, USA, 2022. [Google Scholar] [CrossRef]
  19. Mousavi, S.S.; Jafarpour, M.; Cristea, I. From HX-Groups to HX-Polygroups. Axioms 2024, 13, 7. [Google Scholar] [CrossRef]
  20. Rotman, J.J. An Introduction to the Theory of Groups; Springer: New York, NY, USA, 1995. [Google Scholar]
  21. Cristea, I.; Kocijan, J.; Novák, M. Introduction to Dependence Relations and Their Links to Algebraic Hyperstructures. Mathematics 2019, 7, 885. [Google Scholar] [CrossRef]
  22. Kalampakas, A.; Spartalis, S. Hyperoperations on directed graphs. J. Discret. Math. Sci. Cryptogr. 2023, 27, 1011–1025. [Google Scholar] [CrossRef]
Figure 1. The groups G 4 1 , G 1 4 , and G 1 4 G 4 1 .
Figure 1. The groups G 4 1 , G 1 4 , and G 1 4 G 4 1 .
Mathematics 12 03492 g001
Figure 2. The composition G 4 1 G 1 4 .
Figure 2. The composition G 4 1 G 1 4 .
Mathematics 12 03492 g002
Figure 3. Graph G 4 and graph G 6 .
Figure 3. Graph G 4 and graph G 6 .
Mathematics 12 03492 g003
Table 1. The composition between H X -groups G 1 4 and G 2 2 .
Table 1. The composition between H X -groups G 1 4 and G 2 2 .
G 1 4 G 2 2 { 0 , 2 } { 1 , 3 } { 4 , 6 } { 5 , 7 }
{ 0 , 1 , 2 , 3 } { 0 , 1 , 2 , 3 } { 0 , 1 , 2 , 3 } { 4 , 5 , 6 , 7 } { 4 , 5 , 6 , 7 }
{ 4 , 5 , 6 , 7 } { 4 , 5 , 6 , 7 } { 4 , 5 , 6 , 7 } { 0 , 1 , 2 , 3 } { 0 , 1 , 2 , 3 }
Table 2. Composition of HX-groups G 2 2 and G 4 1 .
Table 2. Composition of HX-groups G 2 2 and G 4 1 .
G 2 2 G 4 1 { 0 } { 1 } { 2 } { 3 } { 4 } { 5 } { 6 } { 7 }
{ 0 , 2 } { 0 , 2 } { 1 , 3 } { 0 , 2 } { 1 , 3 } { 4 , 6 } { 5 , 7 } { 4 , 6 } { 5 , 7 }
{ 1 , 3 } { 1 , 3 } { 0 , 2 } { 1 , 3 } { 0 , 2 } { 5 , 7 } { 4 , 6 } { 5 , 7 } { 4 , 6 }
{ 4 , 6 } { 4 , 6 } { 5 , 7 } { 4 , 6 } { 5 , 7 } { 0 , 2 } { 1 , 3 } { 0 , 2 } { 1 , 3 }
{ 5 , 7 } { 5 , 7 } { 4 , 6 } { 5 , 7 } { 4 , 6 } { 1 , 3 } { 0 , 2 } { 5 , 7 } { 0 , 2 }
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Sonea, A.P.; Chiruţă, C. Optimizing HX-Group Compositions Using C++: A Computational Approach to Dihedral Group Hyperstructures. Mathematics 2024, 12, 3492. https://doi.org/10.3390/math12223492

AMA Style

Sonea AP, Chiruţă C. Optimizing HX-Group Compositions Using C++: A Computational Approach to Dihedral Group Hyperstructures. Mathematics. 2024; 12(22):3492. https://doi.org/10.3390/math12223492

Chicago/Turabian Style

Sonea, Andromeda Pătraşcu, and Ciprian Chiruţă. 2024. "Optimizing HX-Group Compositions Using C++: A Computational Approach to Dihedral Group Hyperstructures" Mathematics 12, no. 22: 3492. https://doi.org/10.3390/math12223492

APA Style

Sonea, A. P., & Chiruţă, C. (2024). Optimizing HX-Group Compositions Using C++: A Computational Approach to Dihedral Group Hyperstructures. Mathematics, 12(22), 3492. https://doi.org/10.3390/math12223492

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop