Table of Contents
Fetching ...

PALMA: A Lightweight Tropical Algebra Library for ARM-Based Embedded Systems

Gnankan Landry Regis N'guessan

TL;DR

Palma addresses the need for practical tropical algebra on resource-constrained embedded hardware. By implementing five tropical semirings with dense and CSR representations and leveraging ARM NEON for acceleration, Palma unifies shortest-path, scheduling, reachability, and throughput analyses under a single, predictable integer framework. The library delivers up to 2,274 MOPS peak performance and up to 11.9× speedups over classical Bellman-Ford in real-world embedded workloads, while maintaining small code size and zero external dependencies. Real-time case studies in drone control, IoT routing, and manufacturing demonstrate on-device optimization with deterministic execution. The work fills a critical gap at the intersection of tropical mathematics and embedded systems, and the MIT-licensed library provides a portable foundation for future heterogeneous platforms and domain-specific integrations.

Abstract

Tropical algebra, including max-plus, min-plus, and related idempotent semirings, provides a unifying framework in which many optimization problems that are nonlinear in classical algebra become linear. This property makes tropical methods particularly well suited for shortest paths, scheduling, throughput analysis, and discrete event systems. Despite their theoretical maturity and practical relevance, existing tropical algebra implementations primarily target desktop or server environments and remain largely inaccessible on resource-constrained embedded platforms, where such optimization problems are most acute. We present PALMA (Parallel Algebra Library for Max-plus Applications), a lightweight, dependency-free C library that brings tropical linear algebra to ARM-based embedded systems. PALMA implements a generic semiring abstraction with SIMD-accelerated kernels, enabling a single computational framework to support shortest paths, bottleneck paths, reachability, scheduling, and throughput analysis. The library supports five tropical semirings, dense and sparse (CSR) representations, tropical closure, and spectral analysis via maximum cycle mean computation. We evaluate PALMA on a Raspberry Pi 4 and demonstrate peak performance of 2,274 MOPS, speedups of up to 11.9 times over classical Bellman-Ford for single-source shortest paths, and sub-10 microsecond scheduling solves for real-time control workloads. Case studies in UAV control, IoT routing, and manufacturing systems show that tropical algebra enables efficient, predictable, and unified optimization directly on embedded hardware. PALMA is released as open-source software under the MIT license.

PALMA: A Lightweight Tropical Algebra Library for ARM-Based Embedded Systems

TL;DR

Palma addresses the need for practical tropical algebra on resource-constrained embedded hardware. By implementing five tropical semirings with dense and CSR representations and leveraging ARM NEON for acceleration, Palma unifies shortest-path, scheduling, reachability, and throughput analyses under a single, predictable integer framework. The library delivers up to 2,274 MOPS peak performance and up to 11.9× speedups over classical Bellman-Ford in real-world embedded workloads, while maintaining small code size and zero external dependencies. Real-time case studies in drone control, IoT routing, and manufacturing demonstrate on-device optimization with deterministic execution. The work fills a critical gap at the intersection of tropical mathematics and embedded systems, and the MIT-licensed library provides a portable foundation for future heterogeneous platforms and domain-specific integrations.

Abstract

Tropical algebra, including max-plus, min-plus, and related idempotent semirings, provides a unifying framework in which many optimization problems that are nonlinear in classical algebra become linear. This property makes tropical methods particularly well suited for shortest paths, scheduling, throughput analysis, and discrete event systems. Despite their theoretical maturity and practical relevance, existing tropical algebra implementations primarily target desktop or server environments and remain largely inaccessible on resource-constrained embedded platforms, where such optimization problems are most acute. We present PALMA (Parallel Algebra Library for Max-plus Applications), a lightweight, dependency-free C library that brings tropical linear algebra to ARM-based embedded systems. PALMA implements a generic semiring abstraction with SIMD-accelerated kernels, enabling a single computational framework to support shortest paths, bottleneck paths, reachability, scheduling, and throughput analysis. The library supports five tropical semirings, dense and sparse (CSR) representations, tropical closure, and spectral analysis via maximum cycle mean computation. We evaluate PALMA on a Raspberry Pi 4 and demonstrate peak performance of 2,274 MOPS, speedups of up to 11.9 times over classical Bellman-Ford for single-source shortest paths, and sub-10 microsecond scheduling solves for real-time control workloads. Case studies in UAV control, IoT routing, and manufacturing systems show that tropical algebra enables efficient, predictable, and unified optimization directly on embedded hardware. PALMA is released as open-source software under the MIT license.
Paper Structure (98 sections, 16 theorems, 25 equations, 15 figures, 14 tables, 5 algorithms)

This paper contains 98 sections, 16 theorems, 25 equations, 15 figures, 14 tables, 5 algorithms.

Key Result

Proposition 2.3

In an idempotent semiring, the relation $a \leq b \iff a \oplus b = b$ defines a partial order on $S$.

Figures (15)

  • Figure 1: Classical algebra vs. tropical (max-plus) algebra. The redefinition of addition as $\max$ and multiplication as $+$ transforms optimization problems into linear algebraic operations.
  • Figure 2: Tropical matrix multiplication illustrated. To compute $C_{ij}$, we take the tropical sum ($\max$ or $\min$) over all paths from row $i$ of $\mathbf{A}$ to column $j$ of $\mathbf{B}$, where each path contributes the tropical product ($+$) of its elements.
  • Figure 3: Matrix powers correspond to paths of specific lengths. In the min-plus semiring, $(\mathbf{A}^k)_{ij}$ gives the weight of the shortest path from $i$ to $j$ using exactly $k$ edges. Here, $(\mathbf{A}^2)_{14} = 5$ corresponds to the path $1 \to 2 \to 4$ with total weight $3+2=5$.
  • Figure 4: The Kleene star $\mathbf{A}^* = \bigoplus_{k=0}^{\infty} \mathbf{A}^k$ converges in $n-1$ iterations. Each power $\mathbf{A}^k$ captures $k$-edge paths; the tropical sum ($\min$) selects the shortest. Entry $(\mathbf{A}^*)_{ij}$ gives the all-pairs shortest path from $i$ to $j$.
  • Figure 5: The tropical eigenvalue equals the maximum cycle mean. Each cycle $\sigma$ has mean $\mu(\sigma) = \text{weight}/\text{length}$. The eigenvalue $\lambda = \max_\sigma \mu(\sigma)$ determines the system's asymptotic behavior, such as the minimum cycle time in manufacturing or the throughput limit in scheduling.
  • ...and 10 more figures

Theorems & Definitions (44)

  • Definition 2.1: Semiring
  • Definition 2.2: Idempotent Semiring
  • Proposition 2.3: Natural Order
  • proof
  • Definition 2.4: Max-Plus Semiring $\mathbb{R}_{\max}$
  • Definition 2.5: Min-Plus Semiring $\mathbb{R}_{\min}$
  • Definition 2.6: Max-Min Semiring
  • Definition 2.7: Min-Max Semiring
  • Definition 2.8: Boolean Semiring
  • Theorem 2.9: Tropical Semiring Properties
  • ...and 34 more