Similar Items: Modular Path Queries with Arithmetic