Alberuni (973-1048 CE) accompanied Mahmud of Ghazni during his invasions of India (1000-1027 CE). He spent years in India studying Sanskrit, astronomy, and Indian culture, producing his famous work 'Tarikh al-Hind'. The other rulers lived in different centuries.