Hello Mohammed; The pheromones of ants are complex. Each colony has a distinct "colony odor". The members of one colony recognize each other and treat ants from other colonies differently. Usually they attack members of other colonies. Another set of pheromones in many species are used to mark the foraging trails. These molecules are laid down by workers coming and going from particular food sources and the other members of the colony can find the food source by following the trail. There are many more stories about these chemicals.
Here is a paper about that subject. I found it on Google Scholar and you can download a PDF.
ANIMAL BEHAVIOUR, 2003, 66, 273–280 doi:10.1006/anbe.2003.2224 From nonlinearity to optimality: pheromone trail foraging by ants DAVID J. T. SUMPTER* & MADELEINE BEEKMAN