Next Article in Journal
A New Instance Segmentation Model for High-Resolution Remote Sensing Images Based on Edge Processing
Previous Article in Journal
Modified Cox Models: A Simulation Study on Different Survival Distributions, Censoring Rates, and Sample Sizes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Solutions of Linear Systems over Additively Idempotent Semirings

by
Álvaro Otero Sánchez
,
Daniel Camazón Portela
and
Juan Antonio López-Ramos
*,†
Department of Mathematics, University of Almería, 04120 Almería, Spain
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2024, 12(18), 2904; https://doi.org/10.3390/math12182904
Submission received: 31 August 2024 / Revised: 14 September 2024 / Accepted: 17 September 2024 / Published: 18 September 2024
(This article belongs to the Section Computational and Applied Mathematics)

Abstract

:
The aim of this article is to solve the system X A = Y , where A = ( a i , j ) M n × m ( S ) , Y S m and X is an unknown vector of a size n, with S being an additively idempotent semiring. If the system has solutions, then we completely characterize its maximal one, and in the particular case where S is a generalized tropical semiring, a complete characterization of its solutions is provided as well as an explicit bound of the computational cost associated with its computation. Finally, we show how to apply this method to cryptanalyze two different key exchange protocols defined for a finite case and the tropical semiring, respectively.

1. Introduction

A semiring ( S , + , · , 0 , 1 ) is an algebraic structure in which ( S , + ) is a commutative monoid with an identity element 0 and ( S , · ) is a monoid with an identity element 1, with both being internal operations connected by ring-like distributivity. The additive identity 0 is multiplicatively absorbing, and 0 1 (see, for example, the monograph [1] for an intensive treatment of this algebraic structure). Moreover, a semiring ( S , + , · , 0 , 1 ) is said to be additively idempotent if x + x = x for all x S . Historically, the first notion of a semiring was from Vandiver [2] in 1934, and interest in additively idempotent semirings arose in the 1950 s through the observation that some problems in discrete optimization could be linearized over such structures (see, for example, [3]). The first work to make use of an algebra over an idempotent ring (apart from Boolean fields) was that of Kleene [4], where nerve nets were studied in the context of finite state machines. Since then, the study of additively idempotent semirings has led to multiple connections with such diverse fields as graph theory (path algebra), Hamilton–Jacobi theory, automata and language theory, discrete event system theory (where linear systems over additively idempotent semirings modelize discrete event systems of practical interest), and fuzzy logic. As some examples of connections with the latter, each fuzzy triangular norm (t-norm; see, for example, [5]) conducts an additively idempotent semiring, which is called a max-t semiring in the literature, and in [6,7,8], Nola et al. studied certain objects of algebra over semirings arising from fuzzy logic, such as MV-algebras or the Lukasiewicz transform. Moreover, there is currently vast research on matrices with idempotent coefficients and their applications (e.g., [3,9,10]).
As an example of an additively idempotent semiring, we will study the tropical semiring. Tropical algebra was the first section of tropical mathematics to appear, and although a systematic study of the tropical semiring began only after the works of Simon (see [11]), we should note that the ( R , m i n , + ) semiring had appeared before in optimization problems (see, for example, Floyd’s algorithm for finding the shortest paths in a graph [12]).
Although the problem of solving linear systems was formulated right after the definition of a root for a tropical polynomial and was given by Viro [13], the first paper [14] actually devoted to tropical linear algebra appeared only as late as 2005. Moreover, this problem has already proved to be quite interesting from the algorithmic point of view as it is known to be in N P c o N P . Some examples of algorithms proposed for solving tropical linear systems can be found in [15,16,17]. At present, there are numerous applications of linear systems over tropical semirings in various areas of mathematics, engineering, and computer science. For instance, Noel, Grigoriev, Vakulenko, and Radulescu recently proposed a way to use algorithms for solving tropical linear systems to study stable states of reaction networks in biology [18,19]. As an application in fuzzy set theory, Gavalec, Němcová et al. recently proposed a way to convert the problems of max-Lukasiewicz linear algebra (i.e., linear algebra over a max-Lukasiewicz semiring), to the problems of tropical (max-plus) linear algebra [20] and take advantage of the well-developed theory and algorithms of the latter in order to develop a theory of the matrix powers and the eigenproblem over a max-Lukasiewicz semiring. Thus, problems of tropical linear algebra and tropical linear systems in particular are important in terms of both theoretical and practical implications.
When letting ( S , + , · ) be an additively idempotent semiring, we want to solve the system X A = Y , where A = ( a i , j ) M n × m ( S ) , Y S m and X is an unknown vector of a size n. We have to clarify that our notion of a solution differs from that of Viro in the sense that the maximum is achieved only once. If the system X A = Y has solutions, then we can completely characterize its maximal one. Moreover, in the particular case where S is a generalized tropical semiring (see Definition 1.1.1), we are able to characterize completely its solutions and give an explicit bound of the computational cost associated with its computation. Finally, we give a cryptographic application by using our previous results in the case of S being finite and propose an attack to the key exchange protocol presented in [21] and, in the tropical semiring case, to cryptanalyze a quite recent protocol to key exchange in [22] as well.

2. Materials and Methods

In this section, we will introduce some basic background on semigroups and introduce some basic results which we will use throughout this paper.
Definition 1.
A semiring R is a non-empty set with two operations + and · such that  ( S , + )  is a commutative monoid,  ( S , · )  is a monoid, and the following distributive laws hold:
a ( b + c ) = a b + a c , ( a + b ) c = a c + b c ,
where the symbol of the operation · is omitted.
We say that a semiring  ( R , + , · )  is additively idempotent if  a + a = a  for all  a R .
Definition 2.
Let R be a semiring and  ( M , + )  be a commutative semigroup with the identity  0 M . M is a right semimodule over R if there is an external operation  · : M × R M  such that
( m · a ) · b = m · ( a · b ) , m · ( a + b ) = m · a + m · b , ( m + n ) · a = m · a + n · a , 0 M · a = 0 M ,
for all  a , b R  and  m , n M . We will denote  m · a  as the simple concatenation  m a .
Let ( R , + , · ) be an additively idempotent semiring. Every such semiring is endowed with an order given by the first operation, which is defined as
a b   if   and   only   if   a + b = b .
This order respects the operation in R and enables defining a partial order in R n for every positive integer n:
X = ( x 1 , x n ) Y = ( y 1 , , y n )   if   and   only   if   x i y i i = 1 , , n .
If R is a semiring, then we will denote with M a t n ( R ) the semiring of square matrices of the order n for some positive integer n and whose entries are in R.
Lemma 1.
The previous order is compatible with the operations in  R n  as a right  M a t n ( R )  semimodule.
Proof. 
On one hand, if X = ( x 1 , , x n ) , Y = ( y 1 , , y n ) R n are such that X Y and C = ( c 1 , c n ) R n , then we have X Y implying that x i y i i { 1 , , n } and therefore x i + c i y i + c i i { 1 , , n } . Thus, X + C Y + C .
On the other hand, if A = ( a i , j ) M a t n ( R ) , and X Y (i.e., x i y i i = 1 , , n ), then x i a i , j y i a i , j i , j { 1 , , n } and thus i x i a i , j i y i a i , j i , j { 1 , , n } . Therefore, X A Y A . □
Let X A = Y be the system of linear equations in R with indeterminates x 1 , , x n :
x 1 a 1 , 1 a 1 , 2 a 1 , m 1 a 1 , m + x 2 a 2 , 1 a 2 , 2 a 2 , m 1 a 2 , m + + x n a n , 1 a n , 2 a n , m 1 a n , m = y 1 y 2 y m 1 y m ,
with a i , j , y j R for all i = 1 , , n j = 1 , , m . If we denote A i as the ith row of A, where A i = ( a i , 1 , a i , 2 , , a i , m ) , then the system can be written as
x 1 A 1 + x 2 A 2 + + x n A n = Y .
Definition 3.
Let R be an additively idempotent semiring, and let  X A = Y  be a linear system of equations. We say that  X ^  is the maximal solution of the system if the two following conditions are satisfied:
1. 
X ^ R n  is a solution of the system (i.e.,  X ^ A = Y );
2. 
If  Z R n  is any other solution of the system, then  Z + X ^ = X ^ .
Note that the last condition is equivalent to Z X ^ .

3. Results

3.1. The Maximal Solution of a Linear System

Our aim in this section is to provide a characterization of the maximal solution of a linear system on certain additively idempotent semirings which will allow us to characterize every solution of these types or systems, and then we will be able to derive an algorithm to compute them.
Theorem 1.
Given an additively idempotent semiring  ( R , + , · ) , let  W i = { x R : x A i + Y = Y } i = 1 , , n . Suppose that these subsets have a maximum with respect to the order induced in R:
C i = max W i .
If  X A = Y  has a solution, then  Z = ( C 1 , C n )  is the maximal solution of the system.
Proof. 
If there is a solution X ^ = ( x ^ 1 , , x ^ n ) , then for all k = 1 , , n we have that
X ^ A = Y x ^ 1 A 1 + x ^ 2 A 2 + x k ^ A k + + x ^ n A n = Y x ^ k A k + Y = Y x ^ k W k ,
where we used the following relation:
Y = Y + Y , = x ^ 1 · A 1 + x ^ 2 · A 2 + + x ^ k · A k + + x ^ n · A n + Y , = x ^ 1 · A 1 + x ^ 2 · A 2 + + x ^ k · A k + x ^ k · A k + + x ^ n · A n + Y , = x ^ k · A k + x ^ 1 · A 1 + x ^ 2 · A 2 + + x ^ n · A n + Y , = x ^ k · A k + Y .
Since x ^ k W k in Equation (1), we have C k x ^ k k = 1 , , n . Hence, under the proof of Lemma 1, we have
Z X ^ Z A X ^ A = Y .
In addition, as m a x W i W i , by the definition of W i , we find that
C i W i Z A Y ,
and thus, Z A = Y (i.e., Z is a solution). Furthermore, under the definition of the order in R n , we find that this solution is maximal. □
In the finite case, where both the existence of a solution for the linear system and the computation of the maximal solution are guaranteed precisely by the finiteness condition, we have the following result.
Theorem 2.
Let R be an additively idempotent finite semiring, and let  X A = Y  be a system of equations with  Y R m  and  A = ( a i , j ) M a t n × m ( R ) . If the system has a solution, then  W i = { x R : x · A i + Y = Y }  is finite and
X = ( x 1 , , x n ) such that x i = x W i x
is the maximal solution of the system.
Proof. 
To show this, it is enough to prove that the set W i = { x R : x A i + Y = Y } has a maximum, which is
x i = max x W i x = x W i x
and then apply Theorem 1.
Given that W i is finite for every i = 1 , , n , we can assert that x i = x W i x for every i = 1 , , n is well defined.
Now, if h W i , then h x i for every i = 1 , , n , given that
x i + h = x W i x + h = x W i , x h x + h + h = x W i , x h x + h = x W i x = x i
Finally, if a + y = b + y = y , then ( a + b ) + y = y , which shows that W i is additively closed, and hence x i = x W i W i . □

3.2. Linear Systems on Tropical Semirings

As we showed in Theorem 1, we can characterize the maximal solution of a linear system over an additively idempotent semiring under some circumstances. Our aim in this section is to study the existence of solutions in the particular case of tropical semirings.
Definition 4.
Let  ( R , + , · )  be a semiring. We say that R is a generalized tropical semiring if 
a + b = a   o r   a + b = b   o f   a l l   a , b R .
The following lemma is immediate from the preceding definition.
Lemma 2.
Every generalized tropical semiring is totally ordered with respect to the order induced by the addition.
Example 1.
( N , max , · )  is a semiring where  a + b = max { a , b } = a o r b , and thus it is a generalized tropical semiring. Analogously,  ( R , max , + ) ,  ( Z , max , + )  and  ( Q , max , + )  are also generalized tropical semirings, and they verify being a group with respect to the second operation.
The semiring  ( N , + , · ) , where + and · denote the usual addition and product of natural numbers, respectively, is an example of a semiring which is not a generalized tropical semiring.
The previous example induces the following definition.
Definition 5.
Let  ( S , + )  be a semigroup with a total order which is compatible with the operation +. We define the tropicalized semiring of S as the semiring  T r o p ( S ) = S { } , with the inner addition defined by max, given by the order in S, and the inner product defined by +, the inner operation of S, and extend these to ∞ in the following way:
1. 
a + ( ) = + a = a T r o p ( S ) .
2. 
max { a , } = max { , a } = a a T r o p ( S ) .
Example 2.
Let us consider the semiring with two elements  T = { 0 , 1 }  whose addition is given by  0 + 0 = 1 + 0 = 0 + 1 = 0  and  1 + 1 = 1  and the product defined by  a · b = 0  for  a , b T . Then,  ( T , + , · )  is a generalized tropical semiring, but it is not a tropical semiring nor the tropicalized semiring of an ordered semigroup.
The following result is straightforward.
Lemma 3.
Let  ( S , + )  be a totally ordered semigroup, and let  ( T r o p ( S ) , max , + )  be its tropicalized semiring. Then,  ( T r o p ( S ) , max , + )  is a generalized tropical semiring.
Let us recall from [17] that the tropical semiring is given by the semiring ( R { } , max , + ) . It can immediately be found that the tropical semiring is the tropicalized version of R with the usual operations.
Theorem 3.
Let  ( R , + , · )  be a generalized tropical semiring where  ( R , · )  is a group. If the linear system  X · A = Y  has a solution  X = ( x 1 , , x n ) , then it is of the form  x i = m a x W i .
Proof. 
Firstly, we will prove that the sets W i = { x R : x · A i + Y = Y } with A i = ( a i , j ) j = 1 , m , i = 1 , , n have a maximum, and thus we can use Theorem 1.
If x W i , then we have that x · A i + Y = Y , where if we see the jth row, then we can obtain x · a i , j + y j = y j . Therefore, we have
max { x · a i , j , y j } = y j x · a i , j y j x y j · a i , j 1 ,
and thus x W i if and only if x y j · a i , j 1 for all j { 1 , , m } . This condition is verified if x min j { y j · a i , j 1 } .
Now, if we denote C i = min j { y j · a i , j 1 } , then we find that C i is an upper bound of W i because x W i x C i . In addition, it belongs to the set W i due to the following identity:
C i a i , j = min j { y j · a i , j 1 } a i , j y j a i , j 1 a i , j = y j ,
which holds for all j { 1 , , m } , where C i a i , j + y j = y j . We can conclude that max W i = C i . □
Moreover, as a consequence of the previous result, we obtain the following corollary.
Corollary 1.
Let  ( R , + , · )  be a generalized tropical semiring where  ( R , · )  is a group,  A = ( a i , j ) M a t n × m ( R ) , and the column vector  Y = ( y 1 , , y m ) R m . If the linear system  X A = Y  has at least one solution, then its maximal solution is of the form  ( M 1 , , M n ) , where  M i = min j { y j a i , j 1 } = max W i  for  i = 1 , , n .
We can also point out that in case the semiring ( R , + , · ) is such that ( R , · ) is not a group, we can use the following theorem from [23].
Theorem 4.
A commutative semigroup can be embedded in a group if and only if it is cancellative.
Theorem 5.
Every generalized tropical semiring  ( R , + , · )  such that  ( R , · )  is cancellative can be embedded into a generalized tropical semiring having inverses with respect to ·.
Proof. 
Let ( R , + , · ) be a generalized tropical semiring such that ( R , · ) is cancellative. Then, under the preceding, it can be embedded into a group, which we will denote as Q ( R ) . Note that the elements of Q ( R ) are of the form a / b : = a b 1 with a , b R . Now, given that R is totally ordered, we can endow Q ( R ) with a total order as follows:
a b c d a d b d a , b , c , d R .
Now, we can define the addition in Q ( R ) as
a b + Q c d = max { a b , c d } .
Then, the properties which the operation max satisfy give us that ( Q ( R ) , + Q , · ) is a generalized tropical semiring. Inverses exist with respect to the second operation, and the embedding R Q ( R ) is a semiring homomorphism. □
Example 3.
We have that  ( N { } , max , · )  is a generalized tropical semiring. Furthermore,  ( N , · )  is cancellative. With the previous result, we can embed  ( N { } , max , · )  into a generalized tropical semiring with inverses which, under the preceding construction, can be  ( Q > 0 { } , max , · ) .
Now, we will show how to find every solution of the previous system.
Lemma 4.
Let R be a generalized tropical semiring, where  ( R , · )  is cancellative and  X A = Y  is a linear system of equations which has a solution, for which  A = ( a i , j ) M a t n × m ( R )  and  Y = ( y 1 , , y m ) R m . Let  C i = max W i . Then,  x W i  if and only if  x C i .
Proof. 
Let x C i , and let A i be the ith row of A for i = 1 , , n . Then, x A i C i A i , and thus x A i + Y C i A i + Y = Y Moreover, Y x A i + Y , since
Y + ( x A i + Y ) = ( x A i + Y ) + Y = x A i + ( Y + Y ) = x A i + Y
and hence x A i + Y = Y and x W i . □
Let R be a generalized tropical semiring, and let X A = Y be a linear system of equations with Y = ( y i ) R m and A = ( a i , j ) M a t n × m ( R ) . Let W i = { x R : x · A i + Y = Y } . Then, under the proof of Theorem 3, W i has a maximum which will be denoted by C i for all i = 1 , , n .
Theorem 6.
Let R be a generalized tropical semiring, and let  X A = Y  be a system of equations with  Y = ( y i ) R m  and  A = ( a i , j ) M a t n × m ( R ) . X = ( x 1 , x 2 , , x n )  is a solution of the system if and only if
1. 
x i · a i , j + y j = y j , j = 1 , , m ,
2. 
j = 1 , , m h { 1 , , n }  such that  x h · a h , j = y j .
Proof. 
Let us assume first that X = ( x 1 , x 2 , , x n ) is a solution of the system. Then, the first condition was already proven in Equation (1). Let us now show the second condition. We have that
x 1 · A 1 + x 2 · A 2 + + x n · A n = Y .
For a fixed value j, we find that
x 1 · a 1 , j + x 2 · a 2 , j + + x n · a n , j = y j .
Using the definition of generalized tropical semiring, we have that there exists h { 1 , , n } such that x h a h , j = y j .
Conversely, let us suppose now that X verifies both conditions. Then, we have
i x i · a i , j = x 1 · a 1 , j + + x h 1 · a h 1 , j + x h · a h , j + x h + 1 · a h + 1 , j + + x n · a n , j
Now, under condition 2, there exists h { 1 , , n } such that x h a h , j = y j , and thus we can rewrite the equation as
i x i · a i , j = i h x i · a i , j + y j
As x i a i , j + y j = y j for all j, and as the semiring is additively idempotent, we finally obtain
i x i · a i , j = y j
for all j { 1 , , m } . Thus, X is a solution of the system. □
Corollary 2.
Let  ( R , + , · )  be a generalized tropical semiring such that  ( R , · )  is a group. If the system  X A = Y  has a solution, then  X = ( x 1 , x 2 , , x n )  is a solution if and only if
1. 
x i W i i = 1 , , n .
2. 
j = 1 , , m h { 1 , , n }  such that  x h = C h = y j a h , j 1
where  a h , j 1  is the inverse of  a h , j  in a generalized tropical semiring having inverses with respect to · and which contains R.
Proof. 
It is enough to show that the conditions are equivalent to those of Theorem 6.
Firstly, note that the first condition and condition 1 of Theorem 6 are equivalent.
We will show now that if condition 1 is true, then condition 2 is equivalent to condition 2 of Theorem 6.
If 1 is satisfied, then x i C i = m a x W i . In addition, if condition 2 of Theorem 6 is verified, then
x h = y j a h , j 1 min p { y p a h , p 1 } = C h x h .
using Corollary 1, and thus x h = C h . The converse is trivial. □
Remark 1.
Let R be a generalized tropical semiring as illustrated above, and let us consider the system  A X = Y X = ( x 1 , x 2 , , x n )  to be a solution of the system if and only if, for every equation,  j { 1 , , m }  in the system: 
1. 
a i , j · x i + y j = y j ;
2. 
h { 1 , , n }  such that  a h , j · x h = y j .
Then, under the previous corollary, for every j = 1 , , m , there exists h { 1 , , n } such that C h = y j a h , j 1 , and in addition, x h = C h . As a result, there exits a non-empty set I n d e x ( j ) = { i { 1 , , n } : C i = y i a i , j 1 } . This induces the following result, which provides an algorithm to solve linear equations systems.
Theorem 7.
Let  ( R , + , · )  be a generalized tropical semiring such that  ( R , · )  is a group, and let  X A = Y  be a system of equations with  Y R m  and  A = ( a i , j ) M a t n × m ( R ) . Determining all of the solutions of the system has a computational cost of  o ( n m ) .
Proof. 
We observe that the solution of the system is given by the vectors X = ( x 1 , x 2 , , x n ) with the following designations.
For every j, we can choose h I n d e x ( j ) such that x h = C h . The rest of the conditions ( x p p = 1 , , n , p h ) verify that x p C p .
To prove this, note that every X = ( x 1 , , x n ) with this designation verifies that x i C i , and from Lemma 4, we have x i W i . Moreover, we observe that for every j, we have some h I n d e x ( j ) with x h = C h = y j a h , j 1 . Thus, under the preceding corollary, it is a solution.
On the other hand, if X = ( x 1 , , x n ) is a solution, then it satisfies the conditions of the preceding corollary. Then, x i W i , and thus x i C i = max W h . Moreover, for every j = 1 , , m , there exists h such that x h = C h . But then x h = y h a h , j 1 , and hence h I n d e x ( j ) .
As a result, to determine all of the solutions of the system, it is enough to compute C i = max W i for every i = 1 , , n and I n d e x ( j ) = { i { 1 , , n } : C i = y i a i , j 1 } for every j = 1 , , m .
To calculate these, we can use the following algorithm.
We first compute the matrix M M a t ( R ) n × m , whose ith column M i is of the form
M i = ( y j a i , j 1 ) j = 1 , , m = y 1 a i , 1 1 y 2 a i , 2 1 y m a i , m 1
for every i = 1 , , n
This results in the computation of n m being inverse and n m operations in the set R.
Then, we calculate C i = min M i = min j = 1 , , m y j a i , j 1 for every i = 1 , , n , and simultaneously, we compute the set R o w ( i ) = { j { 1 , , m } ; C i = y j a i , j 1 } , which gives m comparisons for each column and thus n m operations.
Next, we build I n d e x ( j ) = { i { 1 , , n } : C i = y i a i , j 1 } using R o w ( i ) with the following process:
1. 
Take I n d e x ( j ) to be empty for every j = 1 , , m .
2. 
Examine R o w ( i ) for i = 1 , , n , and if j R o w ( i ) , then add i to I n d e x ( j ) .
This process requires examining R o w ( i ) , and since R o w ( i ) { 1 , , m } , this procedure requires o ( m ) comparisons for every i = 1 , , n . Hence, the cost is o ( n m ) .
Taking into account that the comparison of two elements is made through the addition of both elements in R, the total cost is o ( n m ) basic operations in the ring ( R , + , · ) . □
Remark 2.
We recall that when the generalized tropical semiring R is such that  ( R , · )  is cancellative, which is less restrictive than being a group. Using Theorem 5, we can embed this semiring into a generalized tropical semiring S in the conditions of Corollary 2, and then we can solve any linear system as previously shown, obtaining each solution in S and then checking if any of them are in fact contained in R.

4. Discussion

Within the references, in [17], a method for solving a system of equations through normalization is presented. In [24], the structure of the solution of a system of equations over a tropical semiring was studied by using the rank over rows and columns, and subsequently, a generalized Cramer method was used to find the maximal solution over a tropical semiring.
Examples of systems of equations appear in both papers. In [17], a solution (though not necessarily maximal) was computed, and in [24], the authors provided the range of freedom of the solution. Now, using the preceding, we can show the complete set of solutions of those systems of equations.
To avoid misreading the operation over R as a usual ring and rather as a tropical semiring, the operation ( R , max , + ) will be denoted as ( R , + T , · T ) .
Example 4.
In [24], the authors computed a solution of the system 
4 7 12 3 0 3 2 8 3 1 9 1 6 0 2 2 8 5 1 3 x 1 x 2 x 3 x 4 x 5 = 14 10 8 11 .
Let us determine the complete set of solutions of the system as well as the maximal solution.
Firstly, we calculate  y j · T a i , j 1 = y j a i , j , obtaining the matrix
( y j a i , j ) i , j = 18 7 2 17 14 7 8 2 7 11 17 7 2 8 6 8 3 16 12 14 .
Then, we have  C i = min j { y j a i , j }  and the rows where these minima are reached.
max W i ValueRow
C 1 7 { 2 }
C 2 3 { 4 }
C 3 2 { 1 , 2 , 3 }
C 4 7 { 2 }
C 5 6 { 3 }
Now, let us compute  I n d e x ( j ) .
Columns
I n d e x ( 1 ) { 3 }
I n d e x ( 2 ) { 1 , 3 , 4 }
I n d e x ( 3 ) { 3 , 5 }
I n d e x ( 4 ) { 2 }
Thus, the solutions are
v 1 = ( 7 , 3 , 2 , 7 , h 5 ) v 1 = ( 7 , 3 , 2 , h 4 , 6 ) v 1 = ( h 1 , 3 , 2 , 7 , h 5 ) v 1 = ( h 1 , 3 , 2 , h 4 , 6 ) v 1 = ( h 1 , 3 , 2 , 7 , h 5 ) v 1 = ( h 1 , 3 , 2 , 7 , 6 )
with  h i C i .
Moreover, we can observe that the maximal solution was  ( 7 , 3 , 2 , 7 , 6 ) .
Example 5.
In [17], the authors computed the maximal solution of
165 57 72 7 0 141 64 48 3 1 137 101 46 0 2 243 98 206 156 5 x 1 x 2 x 3 x 4 x 5 = 102 78 76 160
Using our proposed method, we will compute all of the solutions, including the maximal one:
( y j a i , j ) i , j = 63 45 30 109 102 63 14 30 75 79 61 25 30 76 74 403 62 366 4 165
Then, we have  C i = min j { y j a i , j }  and the rows where those minima were reached.
max W i ValueRow
C 1 63 { 3 }
C 2 25 { 3 }
C 3 30 { 1 , 2 , 3 }
C 4 4 { 4 }
C 5 74 { 3 }
Now, we compute  I n d e x ( j ) .
Index ( j ) Columns
I n d e x ( 1 ) { 3 }
I n d e x ( 2 ) { 3 }
I n d e x ( 3 ) { 1 , 2 , 3 , 5 }
I n d e x ( 4 ) { 4 }
Thus the solutions are
v 1 = ( 63 , h 2 , 30 , 4 , h 5 ) v 1 = ( h 1 , 25 , 30 , 4 , h 5 ) v 1 = ( h 1 , h 2 , 30 , 4 , h 5 ) v 1 = ( h 1 , h 2 , 30 , 4 , 74 )
where  h i C i .
In addition, the maximal solution was  ( 63 , 25 , 30 , 4 , 74 ) , which matched the one obtained in the original paper.

Cryptographic Applications

In [21], the authors introduced a key exchange protocol over semirings and proposed the use of a finite additively idempotent semiring. Quite recently, and using a similar construction to find the shared key, in [22], the authors proposed the tropical semiring to obtain another group key exchange. We now show a general strategy which reduces the cryptanalysis to solve a linear system of equations, and in the case of additively idempotent semirings, the method which we introduced in this paper can then be used to find the keys used by both proposals rather easily from just the information which the parties make public.
In both cases, they used an additively idempotent semiring R and M , T , N M a t n ( R ) . Each party had a pair of polynomials over the center of R, ( p a , q a ) , ( p b . q b ) . In the case of the protocol introduced in [21], the parties agreed on a finite additively idempotent semiring. Then, they had p a ( M ) T q a ( N ) and p b ( M ) T q b ( N ) , and the common shared key was p a ( M ) p b ( M ) T q b ( N ) q a ( N ) . In the case of [22], the parties agreed on the tropical semiring, and they used two private numbers h a , h b N and had T a = n = 0 h a 1 p a ( M ) h a 1 n T q a ( N ) n and T b = n = 0 h b 1 p b ( M ) h b 1 n T q b ( N ) n , respectively. In this case, the shared key was n = 0 h b 1 m = 0 h a 1 p b ( M ) b 1 n p a ( M ) a 1 m T q a ( N ) m p b ( N ) n .
Notice that the protocol appearing in [22] is an extension of that given in [21], if we consider that h a = h b = 1 . Therefore, it is enough to simply study the second case.
Let us fix h to an upper bound for the degrees of p a , q a , and let u be a bound for the integer h a , h b . This is chosen by the attacker at the moment of starting the activity and depends on the computational capabilities. Then, we can rewrite T a as
T a = n = 0 h a 1 p a ( M ) h a 1 n T q a ( N ) n = n = 0 h a 1 ( i = 0 h p i M i ) h a 1 n T ( j = 0 h q i N j ) n = i , j = 0 ( h a 1 ) · h c i j M i T N j
for certain values of c i j , where p i , q j are elements of the center of R. Note that these coefficients constitute a particular solution of the system
T a = i , j = 0 ( h a 1 ) · h d i j M i T N j
Using the algorithm previously described, we can find a particular solution of the system d i , j Z [ R ] . Then, we can build the function F [ X , Y , Z ] = i , j = 0 ( u 1 ) h d i , j X i Y Z j , which verifies that
F [ M , T , N ] = i , j = 0 ( u 1 ) h d i , j M i T N j = A .
Then, we have
F [ M , T b , N ] = i , j = 0 ( u 1 ) h d i , j M i T b N j = i , j = 0 ( u 1 ) h d i , j M i n = 0 ( u 1 ) h C u 1 n T D n N j = i , j = 0 ( u 1 ) h n = 0 ( u 1 ) h d i , j M i C u 1 n T D n N j = i , j = 0 ( u 1 ) h n = 0 ( u 1 ) h C u 1 n d i , j M i T N j D n = n = 0 ( u 1 ) h i , j = 0 ( u 1 ) h C u 1 n d i , j M i T N j D n = n = 0 ( u 1 ) h C u 1 n i , j = 0 ( u 1 ) h d i , j M i T N j D n = n = 0 ( u 1 ) h C u 1 n T a D n = K
which is the shared key after the parties run the protocol.
Now, let us check how this reasoning applies to the example proposed in [22], revealing the common key agreed upon by the parties. In this case, we make use of the following matrices:
M = 1012 1011 2 × 1011 3 × 1012
N = 4 × 1012 3 × 1011 8 × 1011 1012
T = 0 5 × 1011 0
and one of the values that is made public by one of the parties is
T a = 4 × 10 12 3.6 × 10 12 3.2 × 10 12 6 × 10 12
Using the previous algorithm, we can find the polynomial:
F [ X , Y , Z ] = 3.1 × 10 12 X 0 Y Z 0 2.1 × 10 12 X 0 Y Z 1 0 X 0 Y Z 2 3 × 10 12 X 0 Y Z 3 6 × 10 12 X 0 Y Z 4 9 × 10 12 X 0 Y Z 5 1.2 × 10 13 X 0 Y Z 6 1.5 × 10 13 X 0 Y Z 7 1.8 × 10 13 X 0 Y Z 8 0 X 1 Y Z 0 1 × 10 12 X 1 Y Z 1 4 × 10 12 X 1 Y Z 2 7 × 10 12 X 1 Y Z 3 1 × 10 13 X 1 Y Z 4 1.3 × 10 13 X 1 Y Z 5 1.6 × 10 13 X 1 Y Z 6 1.9 × 10 13 X 1 Y Z 7 2.2 × 10 13 X 1 Y Z 8 4 × 10 12 X 2 Y Z 0 5 × 10 12 X 2 Y Z 1 8 × 10 12 X 2 Y Z 2 1.1 × 10 13 X 2 Y Z 3 1.4 × 10 13 X 2 Y Z 4 1.7 × 10 13 X 2 Y Z 5 2 × 10 13 X 2 Y Z 6 2.3 × 10 13 X 2 Y Z 7 2.6 × 10 13 X 2 Y Z 8 8 × 10 12 X 3 Y Z 0 9 × 10 12 X 3 Y Z 1 1.2 × 10 13 X 3 Y Z 2 1.5 × 10 13 X 3 Y Z 3 1.8 × 10 13 X 3 Y Z 4 2.1 × 10 13 X 3 Y Z 5 2.4 × 10 13 X 3 Y Z 6 2.7 × 10 13 X 3 Y Z 7 3 × 10 13 X 3 Y Z 8 1.2 × 10 13 X 4 Y Z 0 1.3 × 10 13 X 4 Y Z 1 1.6 × 10 13 X 4 Y Z 2 1.9 × 10 13 X 4 Y Z 3 2.2 × 10 13 X 4 Y Z 4 2.5 × 10 13 X 4 Y Z 5 2.8 × 10 13 X 4 Y Z 6 3.1 × 10 13 X 4 Y Z 7 3.4 × 10 13 X 4 Y Z 8 1.6 × 10 13 X 5 Y Z 0 1.7 × 10 13 X 5 Y Z 1 2 × 10 13 X 5 Y Z 2 2.3 × 10 13 X 5 Y Z 3 2.6 × 10 13 X 5 Y Z 4 2.9 × 10 13 X 5 Y Z 5 3.2 × 10 13 X 5 Y Z 6 3.5 × 10 13 X 5 Y Z 7 3.8 × 10 13 X 5 Y Z 8 2 × 10 13 X 6 Y Z 0 2.1 × 10 13 X 6 Y Z 1 2.4 × 10 13 X 6 Y Z 2 2.7 × 10 13 X 6 Y Z 3 3 × 10 13 X 6 Y Z 4 3.3 × 10 13 X 6 Y Z 5 3.6 × 10 13 X 6 Y Z 6 3.9 × 10 13 X 6 Y Z 7 4.2 × 10 13 X 6 Y Z 8 2.4 × 10 13 X 7 Y Z 0 2.5 × 10 13 X 7 Y Z 1 2.8 × 10 13 X 7 Y Z 2 3.1 × 10 13 X 7 Y Z 3 3.4 × 10 13 X 7 Y Z 4 3.7 × 10 13 X 7 Y Z 5 4 × 10 13 X 7 Y Z 6 4.3 × 10 13 X 7 Y Z 7 4.6 × 10 13 X 7 Y Z 8 2.8 × 10 13 X 8 Y Z 0 2.9 × 10 13 X 8 Y Z 1 3.2 × 10 13 X 8 Y Z 2 3.5 × 10 13 X 8 Y Z 3 3.8 × 10 13 X 8 Y Z 4 4.1 × 10 13 X 8 Y Z 5 4.4 × 10 13 X 8 Y Z 6 4.7 × 10 13 X 8 Y Z 7 5 × 10 13 X 8 Y Z 8
which satisfies F [ M , T , N ] = T a , and F [ M , T b , N ] = K with K as the shared key.
In the use case proposed in [21], using a particular method, the authors of [25] were able to obtain a polynomial as demonstrated above, whose evaluation in the appropriate values provided the common key. Now, by using the above reasoning and the general algorithm to solve linear equation systems, for the finite case proposed in [21], we were able to obtain precisely the same polynomial provided in [25], which shows the cryptanalysis of this case.
We determined that finding an appropriate setting to give a key exchange protocol for the post-quantum era is currently an open problem. In 2017, NIST called for a contest to select new cryptographic primitives which allowed obtaining secure algorithms against the attack of a quantum computer. In 2023, four algorithms were selected: one for key encapsulation and three others for digital signatures. Extremely recently, two digital signatures and a key encapsulation method were officially standardized, but the problem of exchanging a secret collaboratively among two communicating parties through an insecure channel remains open. Thus, the alternatives presented in the two previously discussed cases are not appropriate.

5. Conclusions

In this paper, we characterized the maximal solution of a linear equation system defined over an additively idempotent semiring. This characterization gave us the possibility of obtaining general algorithms which could be run in polynomial time to obtain the complete set of solutions of such systems (in case there is at least one) in both the finite case and the tropical semiring case. In the latter case, we extending the existing results to find not only the maximal solution of a linear system but also every solution of the system. Moreover, we have shown how to apply these algorithms to cryptography and show how possible alternatives for a group key exchange protocol for the post-quantum era are vulnerable.

Author Contributions

All authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Junta de Andalucía FQM 0211; Ministerio de Ciencia, Innovación y Universidades, Agencia Estatal de Investigación, Grant number MICIU/AEI/10.13039/501100011033; and European Regional Development Fund, European Union, Grant number ERDF/EU PID2022-138906NB-C21.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Golan, J.S. Semirings and Their Applications; Kluwer Academic Publishers: Dordrecht, Netherlands, 1999. [Google Scholar]
  2. Vandiver, H.S. Note on a simple type of algebra in which the cancellation law of addition does not hold. Bull. Am. Math. Soc. 1934, 40, 914–920. [Google Scholar] [CrossRef]
  3. Cuninghame-Green, R. Minimax Algebra. In Lecture Notes in Economics and Mathematical Systems; Springer: Berlin, Germany; New York, NY, USA, 1979; Volume 166, p. 258. [Google Scholar]
  4. Kleene, S.C. Representation of events in nerve nets and finite automata. In Automata Studies; Annals of Mathematics Studies; Princeton University Press: Princeton, NJ, USA, 1956; Volume 34, pp. 3–41. [Google Scholar]
  5. Klement, E.P.; Mesiar, R.; Pap, E. Triangular Norms; Springer: Dordrecht, The Netherlands, 2013; Volume 8. [Google Scholar]
  6. Di Nola, A.; Gerla, B. Algebras of Lukasiewicz’s logic and their semiring reducts. In Idempotent Mathematics and Mathematical Physics; Contemporary Mathematics; The American Mathematical Society: Providence, RI, USA, 2005; Volume 377, pp. 131–144. [Google Scholar]
  7. Di Nola, A.; Lettieri, A.; Perfilieva, I.; Novák, V. Algebraic analysis of fuzzy systems. Fuzzy Sets Syst. 2007, 158, 1–22. [Google Scholar] [CrossRef]
  8. Di Nola, A.; Russo, C. Semiring and semimodule issues in MV-algebras. Commun. Algebra 2013, 41, 1017–1048. [Google Scholar] [CrossRef]
  9. Krivulin, N. Idempotent Algebra Methods for Problems in Modeling and Analysis of Complex Systems; St. Petersburg University: St. Petersburg, Russia, 2009. [Google Scholar]
  10. Litvinov, G.L.; Maslov, V.P.; Rodionov, A.Y.; Sobolevski, A.N. Universal algorithms, mathematics of semirings and parallel computations. In Coping with Complexity: Model Reduction and Data Analysis; Lecture Notes in Engineering and Computer Science; Springer: Berlin, Germany, 2011; Volume 75, pp. 63–89. [Google Scholar]
  11. Simon, I. Limited subsets of a free monoid. In Proceedings of the 19th Annual Symposium on Foundations of Computer Science, Ann Arbor, MI, USA, 16–18 October 1978; IEEE: Long Beach, CA, USA, 1978; pp. 143–150. [Google Scholar]
  12. Floyd, R.W. Algorithm 97: Shortest path. Commun. ACM 1962, 5, 345. [Google Scholar] [CrossRef]
  13. Viro, O. Dequantization of real algebraic geometry on logarithmic paper. In European Congress of Mathematics; Casacuberta, C., Miró-Roig, R.M., Verdera, J., Xambó-Descamps, S., Eds.; Birkhauser Basel: Basel, Switzerland, 2001; pp. 135–146. [Google Scholar]
  14. Develin, M.; Santos, F.; Sturmfels, B. On the rank of a tropical matrix. In Combinatorial and Computational Geometry; Publications of the Math Sciences Research Institute; Cambridge Univercity Press: Cambridge, UK, 2005; Volume 52, pp. 213–242. [Google Scholar]
  15. Grigoriev, D. Complexity of solving tropical linear systems. Comput. Complex. 2013, 22, 71–88. [Google Scholar] [CrossRef]
  16. Davydow, A. New algorithms for solving tropical linear systems. Algebra i Anal. 2016, 28, 1–19. [Google Scholar] [CrossRef]
  17. Olia, F.; Ghalandarzadeh, S.; Amiraslani, A.; Jamshidvand, S. Solving linear systems over tropical semirings through normalization method and its applications. J. Algebra Appl. 2021, 20, 2150159. [Google Scholar] [CrossRef]
  18. Noel, V.; Grigoriev, D.; Vakulenko, S.; Radulescu, O. Tropical geometries and dynamics of biochemical networks application to hybrid cell cycle models. In Electronic Notes in Theoretical Computer Science, Proceedings of the 2nd International Workshop on Static Analysis and Systems Biology (SASB 2011), Venice, Italy, 13 September 2011; Elsevier Science B.V.: Amsterdam, The Netherlands, 2012; Volume 284, pp. 75–91. [Google Scholar]
  19. Noel, V.; Grigoriev, D.; Vakulenko, S.; Radulescu, O. Hybrid Models of the Cell Cycle Molecular Machinery. In International Workshop on Hybrid Systems Biology Newcastle. 2012. Available online: https://api.semanticscholar.org/CorpusID:12521148 (accessed on 9 August 2024).
  20. Gavalec, M.; Nĕmcová, Z.; Storage, S. Tropical linear algebra with the Lukasiewicz T-norm. Fuzzy Sets Syst. 2015, 276, 131–148. [Google Scholar] [CrossRef]
  21. Maze, G.; Monico, C.; Rosenthal, J. Public key cryptography based on semi- group actions. Adv. Math. Commun. 2007, 1, 489–507. [Google Scholar] [CrossRef]
  22. Durcheva, M.; Danilchenko, K. Secure Key Exchange in Tropical Cryptography: Leveraging Efficiency with Advanced Block Matrix Protocols. Mathematics 2024, 12, 1429. [Google Scholar] [CrossRef]
  23. Clifford, A.H.; Preston, G.B. The Algebraic Theory of Semigroups; American Mathematical Society: Providence, RI, USA, 1961; p. 34. [Google Scholar]
  24. Jamshidvand, S.; Ghalandarzadeh, S.; Amiraslani, A.; Olia, F. On the maximal solution of a linear system over tropical semirings. Math. Sci. 2020, 14, 147–157. [Google Scholar] [CrossRef]
  25. Otero Sánchez, A.; López Ramos, J.A. Cryptanalysis of a key exchange protocol based on a congruence-simple semiring action. J. Algebra Appl. 2024, 2024, 2550229. [Google Scholar] [CrossRef]
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

Otero Sánchez, Á.; Camazón Portela, D.; López-Ramos, J.A. On the Solutions of Linear Systems over Additively Idempotent Semirings. Mathematics 2024, 12, 2904. https://doi.org/10.3390/math12182904

AMA Style

Otero Sánchez Á, Camazón Portela D, López-Ramos JA. On the Solutions of Linear Systems over Additively Idempotent Semirings. Mathematics. 2024; 12(18):2904. https://doi.org/10.3390/math12182904

Chicago/Turabian Style

Otero Sánchez, Álvaro, Daniel Camazón Portela, and Juan Antonio López-Ramos. 2024. "On the Solutions of Linear Systems over Additively Idempotent Semirings" Mathematics 12, no. 18: 2904. https://doi.org/10.3390/math12182904

APA Style

Otero Sánchez, Á., Camazón Portela, D., & López-Ramos, J. A. (2024). On the Solutions of Linear Systems over Additively Idempotent Semirings. Mathematics, 12(18), 2904. https://doi.org/10.3390/math12182904

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