Module tropical

Module tropical 

Source
Expand description

Tropical Algebra (Max-Plus Semiring)

Tropical algebra replaces (×, +) with (max, +) or (min, +). Applications:

  • Neural network analysis (piecewise linear functions)
  • Shortest path algorithms
  • Dynamic programming
  • Linear programming duality

§Mathematical Background

The tropical semiring (ℝ ∪ {-∞}, ⊕, ⊗) where:

  • a ⊕ b = max(a, b)
  • a ⊗ b = a + b
  • Zero element: -∞
  • Unit element: 0

§Key Results

  • Tropical polynomials are piecewise linear
  • Neural networks with ReLU = tropical rational functions
  • Tropical geometry provides bounds on linear regions

Structs§

LinearRegionCounter
Counter for linear regions of piecewise linear functions
MinPlusMatrix
Min-plus matrix for shortest paths
Tropical
Tropical number in the max-plus semiring
TropicalEigen
Tropical eigenvalue and eigenvector
TropicalMatrix
Tropical matrix (max-plus)
TropicalMonomial
A monomial in tropical arithmetic: a ⊗ x^k = a + k*x
TropicalNeuralAnalysis
Analyzes ReLU neural networks using tropical geometry
TropicalPolynomial
Tropical polynomial: max_i(a_i + i*x)

Traits§

TropicalSemiring
Trait for tropical semiring operations