Algorithm design and experimental solution