Algorithm coding Vectors