On the Difficulty of Evolving Permutation Codes

Luca Mariot, Stjepan Picek, Domagoj Jakobovic, Marko Djurasevic, Alberto Leporati

Abstract

Constructing optimal permutation codes is a significant challenge in combinatorial optimization with direct applications in error correction and cryptography. This paper investigates the efficacy of Evolutionary Algorithms (EA) in generating these codes through an incremental construction approach. By comparing various fitness functions and update policies against a random search baseline, the study reveals that while specialized pruning strategies like "Random Reset" improve results, the problem remains exceptionally difficult to scale. The findings suggest a "simplicity paradox," where straightforward fitness functions outperform complex ones, and highlight the limitations of heuristic searches in navigating the factorial growth of permutation search spaces.

Introduction

A permutation code, denoted as $PA(n, d)$, is a set of permutations of length $n$ where any two distinct sequences maintain a minimum Hamming distance $d$. These codes are essential for reliable data transmission in noisy environments, such as powerline communications, and are increasingly used in flash memory rank-modulation and the design of diffusion layers for block ciphers.

The primary objective in this field is to determine $M(n, d)$, the maximum possible size of such a code for given parameters. This task is known to be NP-complete, as it can be mapped to the "Maximum Clique" problem in graph theory. Given that the search space for permutations grows factorially—for instance, $n=10$ yields over 3.6 million possibilities—traditional exhaustive search methods become computationally infeasible very quickly.

Methodology

To address the complexity of the search space, this study employs an incremental construction strategy. Rather than attempting to evolve an entire code simultaneously, the algorithm begins with a single random permutation and iteratively searches for additional permutations that satisfy the distance constraint $d$ relative to the existing set.

Search Algorithms and Fitness Functions

The researchers compared a steady-state Genetic Algorithm (GA) using tournament selection against a Random Search (RS) baseline. To guide the GA, four distinct fitness functions were evaluated:

  1. $fit_1$: A summation of distances for valid pairs.
  2. $fit_2$: An exponential reward system for invalid pairs that are close to the distance threshold.
  3. $fit_3$: A measurement of the minimum distance to the existing set.
  4. $fit_4$: A minimization of the total count of pairs violating the distance constraint.

Update Policies

Two update policies were tested to manage the growth of the code:

  • Plain Policy: New permutations are simply added to the set if they meet the criteria.
  • Random Reset Policy: To prevent the algorithm from becoming trapped in local optima (stagnation), this policy randomly prunes existing permutations from the set, allowing the search to explore new branches of the combinatorial space.

Experimental Setup

The algorithms were tested on 15 problem instances where $n$ ranged from 6 to 10 and $d$ was set to $n-2, n-1,$ or $n$. Results were benchmarked against the best-known lower and upper bounds in the literature, specifically those maintained by Smith and Montemanni.

Key Insights and Results

The Simplicity Paradox

One of the most striking findings was that the simplest fitness function, $fit_3$ (minimum distance), consistently yielded the best results. The authors suggest that more complex functions ($fit_1, fit_2$) may provide excessive or "noisy" information, causing the EA to over-optimize local details rather than finding valid new codewords.

Policy vs. Algorithm

The study found that the Random Reset policy was the most critical factor for success. The ability to backtrack and prune the code was significantly more influential than the choice between a Genetic Algorithm and Random Search. In smaller instances, RS performed comparably to the EA, suggesting that finding a single valid permutation is a relatively simple "local" task. However, the "global" task—selecting a sequence of permutations that allows for maximum code growth—remains the primary bottleneck.

Scaling and Performance

While the methods consistently found optimal solutions for $n=6$, performance dropped significantly for $n \ge 7$, falling short of established lower bounds. Interestingly, at $n=10$, the EA began to show a slight performance advantage over Random Search, indicating that evolutionary mechanisms may become more beneficial as the search space expands into higher dimensions. Notably, all heuristic methods tested outperformed the classic Gilbert-Varshamov theoretical lower bound.

Conclusion and Future Work

The incremental, greedy nature of the current approach often leads to early choices that preclude reaching the theoretical maximum code size. Future research will focus on integrating local search techniques that account for the topology of the permutation graph and exploring "equidistant" codes, where the distance between all pairs must be exactly $d$. Additionally, testing smaller, more agile populations may provide better navigation through the dense search spaces of high-order permutation codes.

Summary updated

Abstract

Combinatorial designs provide an interesting source of optimization problems. Among them, permutation codes are particularly interesting given their applications in powerline communications, flash memories, and block ciphers. This paper addresses the design of permutation codes by evolutionary algorithms (EA) by developing an iterative approach. Starting from a single random permutation, new permutations satisfying the minimum distance constraint are incrementally added to the code by using a permutation-based EA. We investigate our approach against four different fitness functions targeting the minimum distance requirement at different levels of detail and with two different policies concerning code expansion and pruning. We compare the results achieved by our EA approach to those of a simple random search, remarking that neither method scales well with the problem size.
BibTeX
@inproceedings{mariot2022difficulty,
  author = {Luca Mariot and Stjepan Picek and Domagoj Jakobovic and Marko Djurasevic and Alberto Leporati},
  title = {{On the Difficulty of Evolving Permutation Codes}},
  booktitle = {EvoApplications},
  year = {2022},
  doi = {10.1007/978-3-031-02462-7\_10},
}

Loading related content...

Figure