Probabilistic greedy algorithm solver using magnetic tunneling junctions for traveling salesman problem

R Ran Zhang X Xiaohan Li C Caihua Wan R Raik Hoffmann M Meike Hindenberg Y Yingqian Xu S Shiqiang Liu (Beijing National Laboratory for Molecular Sciences, CAS Laboratory of Colloid and Interface and Thermodynamics, CAS Research/Education Centre for Excellence in Molecular Sciences, Centre for Carbon Neutral Chemistry) D Dehao Kong S Shilong Xiong S Shikun He A Alptekin Vardar Q Qiang Dai (Department of Chemistry and the Hong Kong Branch of Chinese National Engineering Research Centre for Tissue Restoration & Reconstruction, The Hong Kong University of Science and Technology, Clear Water Bay, Kowloon 999077, Hong Kong SAR, China) J Junlu Gong Y Yihui Sun (Weill Institute for Neurosciences, Department of Neurology, University of California San Francisco) Z Zejie Zheng T Thomas Kämpfe G Guoqiang Yu X Xiufeng Han

Abstract

Abstract Combinatorial optimization underpins applications in artificial intelligence, logistics, and network design, yet classical techniques such as greedy search and dynamic programming struggle to balance efficiency and solution quality at scale. We present a probabilistic framework that embeds true random number generators based on spin-transfer-torque magnetic tunnel junctions into a greedy solver. Intrinsic stochastic switching enables configurable random number distributions, which we use to inject controlled randomness via a temperature parameter that interpolates between deterministic and stochastic choices, balancing exploration and exploitation. Applied to the traveling salesman problem, the framework yields high-quality tours and outperforms simulated annealing and genetic algorithms in solution quality and convergence speed. In larger instances with up to 70 cities, it maintains its advantage, reaching near-optimal solutions with fewer iterations and reduced computational cost. These results show that hardware true randomness with tunable statistics can improve heuristic search and motivate integrated, energy-efficient probabilistic hardware for scalable optimization.

Article Details

Volume / Issue Vol. 17, Issue 1
Published December 04, 2025
ISSN 2041-1723
Publisher Nature Portfolio

Journal Info

Nature Communications

Nature Portfolio

ISSN: 2041-1723 Open Access Life Sciences

Authors (18)

R

Ran Zhang

X

Xiaohan Li

C

Caihua Wan

R

Raik Hoffmann

M

Meike Hindenberg

Y

Yingqian Xu

S

Shiqiang Liu

Beijing National Laboratory for Molecular Sciences, CAS Laboratory of Colloid and Interface and Thermodynamics, CAS Research/Education Centre for Excellence in Molecular Sciences, Centre for Carbon Neutral Chemistry

D

Dehao Kong

S

Shilong Xiong

S

Shikun He

A

Alptekin Vardar

Q

Qiang Dai

Department of Chemistry and the Hong Kong Branch of Chinese National Engineering Research Centre for Tissue Restoration & Reconstruction, The Hong Kong University of Science and Technology, Clear Water Bay, Kowloon 999077, Hong Kong SAR, China

J

Junlu Gong

Y

Yihui Sun

Weill Institute for Neurosciences, Department of Neurology, University of California San Francisco

Z

Zejie Zheng

T

Thomas Kämpfe

G

Guoqiang Yu

X

Xiufeng Han