Algorithm Simple Linear Graph