Submitted:
01 July 2026
Posted:
02 July 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Algorithmic Modeling of Multiplicative Hyperrings
2.1. The Education Module: Concretizing the Abstract
- Generates a Cayley Table: The developed backend engine calculates the hyper-operation result for each pair of elements in the set and sends this data to the frontend. The frontend receives this data and presents an interactive operation table to the user (see Figure 1).
- Verifies Axioms: The AxiomVerifier engine in the backend tests axioms such as associativity and generation on this finite set using a “brute-force” method.
- AI-Assisted Feedback: If the structure does not satisfy an axiom, our system uses the Google Gemini AI model to provide the user with a constructive suggestion on “how they might change their rule”.
2.2. Computational Analysis Engine: AxiomVerifier
- public class AxiomVerifier<T extends Number> {
- // ... class members ...
- .
- public VerificationResult verifyAll() {
- VerificationResult result = new VerificationResult();
- .
- // Axiom 2: (R,*) is a semihypergroup (Associativity)
- boolean isAssociative = isAssociative();
- result.setSemihypergroup(isAssociative);
- .
- // Axiom 3: Distributivity
- boolean isDistributive = checkDistributivity();
- result.setDistributive(isDistributive);
- .
- // Axiom 4: Negative Property
- boolean hasNegativeProperty = checkNegativeProperty();
- result.setHasNegativeProperty(hasNegativeProperty);
- .
- // Final Decision: Is it a Multiplicative Hyperring?
- // (Assuming Axiom 1: (R,+) is an abelian group)
- boolean isMultiplicativeHyperring = isAssociative && isDistributive && hasNegativeProperty;
- .
- if (isMultiplicativeHyperring) {
- result.setHighestStructure(“Multiplicative Hyperring”);
- // ...
- } else {
- // ... Error reporting logic ...
- }
- return result;
- }
- // ... other methods ...
- }
- public boolean isAssociative() {
- for (T a : baseSet) {
- for (T b : baseSet) {
- for (T c : baseSet) {
- // // Left Side Calculation: (a ο b) ο c
- Set<T> leftSideResult = new HashSet<>();
- // 1. The (a ο b) operation returns an intermediate result set.
- Set<T> firstOpResult = hyperOperation.apply(a, b);
- // 2. Each element in this intermediate result set is then operated with ‘c’.
- for (T intermediateResult : firstOpResult) {
- leftSideResult.addAll(hyperOperation.apply(intermediateResult, c));
- }
- .
- // Right Side Calculation:a ο (b ο c)
- Set<T> rightSideResult = new HashSet<>();
- Set<T> secondOpResult = hyperOperation.apply(b, c);
- for (T intermediateResult : secondOpResult) {
- rightSideResult.addAll(hyperOperation.apply(a, intermediateResult));
- }
- // 3. The equality of the two final result sets is checked.
- if (!leftSideResult.equals(rightSideResult)) {
- return false; // If not equal, the axiom is not satisfied.
- }
- }
- }
- }
- return true; // Equality holds for all triplets.
- }
- public boolean checkDistributivity() {
- for (T a : baseSet) {
- for (T b : baseSet) {
- for (T c : baseSet) {
- // Calculate Left-Hand Side: a * (b + c)
- T b_plus_c = standardAddition.apply(b, c);
- Set<T> leftSideResult = hyperMultiplication.apply(a, b_plus_c);
- .
- // Calculate Right-Hand Side: a*b + a*c
- Set<T> a_mult_b = hyperMultiplication.apply(a, b);
- Set<T> a_mult_c = hyperMultiplication.apply(a, c);
- .
- Set<T> rightSideResult = new HashSet<>();
- // Take the Cartesian sum of the two result sets
- for (T x : a_mult_b) {
- for (T y : a_mult_c) {
- rightSideResult.add(standardAddition.apply(x, y));
- }
- }
- .
- // Check for inclusion: Is the set a*(b+c) a subset of (a*b + a*c)?
- if (!rightSideResult.containsAll(leftSideResult)) {
- return false; // Axiom is violated if not a subset.
- }
- }
- }
- }
- return true;
- }
- public boolean checkNegativeProperty() {
- for (T a : baseSet) {
- for (T b : baseSet) {
- T negB = standardNegation.apply(b);
- T negA = standardNegation.apply(a);
- .
- // Calculate the three distinct sets
- Set<T> res1 = hyperMultiplication.apply(a, negB); // a.(-b)
- Set<T> res2 = hyperMultiplication.apply(negA, b); // (-a).b
- .
- Set<T> a_mult_b = hyperMultiplication.apply(a, b); // a.b
- Set<T> res3 = new HashSet<>(); // -(a.b)
- for (T x : a_mult_b) {
- res3.add(standardNegation.apply(x));
- }
- .
- // Check if the three sets are equivalent
- if (!res1.equals(res2) || !res1.equals(res3)) {
- return false;
- }
- }
- }
- return true;
- }

- public VerificationResult verifySymbolically(String rule, String domain) {
- // 1. Check the rule’s format and whether it contains multiplication.
- if (!isValidPolynomialRule(rule) || !rule.contains(“*”)) {
- // ... Return error ...
- return result;
- }
- try {
- // 2. Test the associative axiom symbolically.
- this.<RingElem>verifyAssociativity(rule, domain, result);
- // 3. Test the reproduction axiom symbolically.
- this.<RingElem>verifyReproduction(rule, domain, result);
- // 4. Determine the final result.
- boolean isHypergroup = result.isSemihypergroup() && result.isQuasihypergroup();
- result.setHypergroup(isHypergroup);
- // ...
- } catch (Exception e) { /* ... Error handling ... */ }
- return result;
- }
- // ...
- // We convert the rule into a symbolic polynomial with temporary variables (x,y).
- GenPolynomial<C> rulePoly = ruleRing.parse(rule.replace(“a”, “x”).replace(“b”, “y”));
- .
- // We also define the letters a, b, c as symbolic polynomials.
- GenPolynomial<C> polyA = mainRing.univariate(0);
- GenPolynomial<C> polyB = mainRing.univariate(1);
- GenPolynomial<C> polyC = mainRing.univariate(2);
- .
- // Left Hand Side (LHS) is being calculated: (a ο b) ο c
- // 1. Calculate a ο b (substitute x with a, y with b).
- GenPolynomial<C> a_op_b = compose(rulePoly, mainRing, polyA, polyB);
- // 2. Calculate (a ο b) ο c (substitute x with a_op_b, y with c).
- GenPolynomial<C> lhs = compose(rulePoly, mainRing, a_op_b, polyC);
- .
- // Right Hand Side (RHS) is being calculated: a ο (b ο c)
- // ... similarly...
- GenPolynomial<C> rhs = compose(rulePoly, mainRing, polyA, b_op_c);
- .
- // Compare the two symbolic polynomials.
- If (lhs.equals(rhs)) {
- // Axiom is satisfied...
- }
- private <C extends RingElem<C>> void verifyReproduction(String rule, String domain, VerificationResult result) {
- // Objective: Does the equation ‘a ο x = y’ have a solution ‘x’ for every ‘y’ ?
- .
- boolean isSolvable = false;
- String trimmedRule = rule.trim();
- .
- // Simple Case 1: If the rule is ‘a+b’ -> a + x = y => x = y - a.
- // A solution always exists for Integers and Rationals.
- if (trimmedRule.equals(“a+b”)) {
- isSolvable = true;
- }
- // Simple Case 2: If the rule is ‘a*b’ -> a * x = y => x = y / a.
- else if (trimmedRule.equals(“a*b”)) {
- // Not always solvable in Integers, but solvable in Rationals.
- if (“RATIONALS”.equalsIgnoreCase(domain)) {
- isSolvable = true;
- } else { isSolvable = false; }
- }
- .
- result.setQuasihypergroup(isSolvable);
- // ...
- }
3. Cryptographic Applications of Multiplicative Hyperrings
3.1. Hyper Encryption Module: Custom Map Mode and Binary Mode
- Map Creation: An initial map is set (e.g., A=17, B=86, ...).
- Rule Application: The user-entered rule, such as a ο b = {x*2-5}, is applied to the numerical value of each letter to create a new encryption map.
- Encryption: The message entered by the user is encrypted according to this new map. The message “merhaba” is converted into a number sequence such as 1993 5 7 47 ... using the rule, a ο b = {x*2-5}. This makes it difficult to crack the cipher without knowing the rule.

3.1.1. Encryption Process:
-
Converting Text to Binary: A text entered by the user, such as “merhaba”, is converted character by character into its ASCII binary equivalents.
- o
- m -> 01101101
- o
- e -> 01100101
- o
- ...
-
Applying the Rule: The user enters a rule to be applied to each bit. For example, the XOR 1 rule means that each bit is subjected to an XOR (exclusive or) operation with 1. This operation flips 0s to 1s and 1s to 0s.
- o
- Original m (01101101) -> Rule-Applied m (10010010)
- Encrypted Message: After this rule is applied to the bits of the entire text, the resulting new binary sequence becomes the “encrypted message”.
3.1.2. Security Principle
3.2. Hyper-Diffie-Hellman Module


- @Service
- public class CryptoService {
- private final RuleParserService ruleParserService;
- .
- @Autowired
- public CryptoService(RuleParserService ruleParserService) {
- this.ruleParserService = ruleParserService;
- }
- .
- public Integer calculate(String rule, int base, int exponent, int modulus) {
- // Define constants that can be used in the rule (n=modulus).
- Map<String, Object> constants = Map.of(“n”, modulus);
- .
- // Prepare the rule string, replacing ‘a’ with base and ‘b’ with exponent.
- String finalRule = rule.replace(“a”, String.valueOf(base))
- .replace(“b”, String.valueOf(exponent));
- .
- // Have the RuleParser calculate this final expression which contains no
- // variables.
- // apply(1,1) is only used to trigger the function; the values are not important.
- Set<Integer> resultSet = ruleParserService.parseRule(finalRule, constants).apply(1, 1);
- .
- if (resultSet.isEmpty()) {
- throw new IllegalStateException(“Cryptographic operation produced an empty
- result..”);
- }
- // Even if the hyper-operation result is a set, cryptographic protocols
- // usually expect a single result. In this prototype, we select the first element.
- return resultSet.iterator().next();
- }
- }
- // CryptoController.java
- .
- @RestController
- @RequestMapping(“/api/crypto”)
- public class CryptoController {
- private final CryptoService cryptoService;
- .
- // ... constructor ...
- .
- @PostMapping(“/calculate-key”)
- public KeyExchangeResult calculateKey(@RequestBody KeyExchangeRequest request) {
- try {
- // We determine which step of the protocol we are in.
- int base = request.generator;
- String explanation = “Genel anahtar hesaplandı.”;
- .
- // If the request includes the other party’s public key,
- // this is a “shared secret” calculation step.
- if (request.theirPublicKey != null) {
- base = request.theirPublicKey; // The base of the operation becomes the
- // key from the other party.
- explanation = “ Shared secret key calculated.”;
- }
- .
- // Call CryptoService with the correct parameters.
- Integer result = cryptoService.calculate(
- request.rule,
- base,
- request.privateKey,
- request.modulus
- );
- return new KeyExchangeResult(result, explanation);
- } catch (Exception e) {
- // ... error handling ...
- }
- }
- // ...
- }
4. Conclusion and Recommendations
Funding
Acknowledgments
Competing Interests
References
- Marty, F. Sur une generalization de la notion de groupe. in 8th congress Math. Scandinaves, 1934; 1934, pp. 45–49. [Google Scholar]
- Davvaz, B.; Leoreanu-Fotea, V. Hyperring Theory and Applications; International Academic Press, 2007. [Google Scholar]
- Corsini, P.; Leoreanu, V. Applications of Hyperstructure Theory; Kluwer Academic Publishers, 2003. [Google Scholar]
- Mordeson, J. N.; Bhutani, K. R.; Rosenfeld, A. Fuzzy Group Theory. In Studies in Fuzziness and Soft Computing; Springer-Verlag, 2005; vol. 182. [Google Scholar]
- Mordeson, J. N.; Malik, D. S. Fuzzy Commutative Algebra; World Scientific, 1998. [Google Scholar]
- Çallıalp, F.; Tekir, Ü. Değişmeli Halkalar ve Modüller; Birsen Yayınevi, 2009. [Google Scholar]
- Anderson, D. D.; Smith, E. Weakly Prime Ideals. Houst. J. Math. 2003, 29(4)(2003), 831–840. [Google Scholar]
- Ameri, R.; Norouzi, M. On Commutative Hyperrings. Int.Journal Algebr. Hyperstructures Its Appl. 2014, Vol. 1(No.1), 45–58. [Google Scholar]
- Dasgupta, U. Prime and Primary Hyperideals of a Multiplicative Hyperrings. Article in Analele Stiintifice ale Universitatii Al I Cuza din Iasi-Matematica 2012, f 1(1), 19–36. [Google Scholar] [CrossRef]
- The Sage Developers. SageMath, the Sage Mathematics Software System (Version 9.0). 2020. Available online: http://www.sagemath.org.
- Krum, H. J.; et al. Java Algebra System. 2018. Available online: https://github.com/krumheuer/jas.
- Davvaz, B. Hyperring theory and applications. Adv. Math. 2007, 13(3), 441–469. [Google Scholar]
- Stinson, D. R. Cryptography: Theory and Practice; CRC Press, 2005. [Google Scholar]
- Koblitz, N. A Course in Number Theory and Cryptography; Springer-Verlag, 1994. [Google Scholar]
- Dummit, D. S.; Foote, R. M. Abstract Algebra; Wiley, 2004. [Google Scholar]
- Shoup, V. A Computational Introduction to Number Theory and Algebra; Cambridge University Press, 2009. [Google Scholar]
- Menezes, A. J.; van Oorschot, P. C.; Vanstone, S. A. Handbook of Applied Cryptography; CRC Press, 1996. [Google Scholar]
- Fraleigh, J. B. A First Course in Abstract Algebra; Pearson Education, 2013. [Google Scholar]
- Davvaz, B.; Cristea, I. A course on hyperstructures for computer scientists and engineers. Cogent Eng. 2015, 2(1). [Google Scholar]
- Diffie, W.; Hellman, M. New directions in cryptography. IEEE Trans. Inf. Theory 1976, 22(6), 644–654. [Google Scholar] [CrossRef]
- Mozilla Foundation. Rhino: Scripting Java. Available online: https://github.com/mozilla/rhino.

| Z4 | Z4 | |||
| Z4 | Z4 |
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.