All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
According to the general rule, one dead person should be buried in a grave unless there is a necessity to bury more, even if the dead are men and women. However, a man and a woman should separated by a sand barrier. Al-Shirbini (May Allah have mercy on him) said: "In the first place, it isn`t allowed to bury two dead persons in one grave. Rather, in normal situation, each should be buried in a separate grave…….unless there is a necessity such that there was a large number of dead people and it was difficult to bury each in a separate grave. In this case, it is allowed to bury two, three and more in one grave, according to necessity. By analogy, it is allowed to shroud them in one cloth, as did the Prophet (PBUH) with the martyrs of the Battle of Uhud. …..In addition, it isn`t allowed to bury a man and a woman in one grave save for a necessity. In other words, the same rulings that apply to them while alive apply while dead. Ibn Al-Salah said: This is in case they don`t have Mahram (Such as father and daughter..) or marital relationship, but if they have such relationship then burying them in the same grave is permissible……." {Moghni Al-Mohtaj, Vol.2:P.40}.
As regards burying Muslims and non-Muslims in the same grave or in the graveyard of non-Muslims, the general rule is that it isn`t allowed to bury the non-Muslim in the graveyard of Muslims nor a Muslim in the graveyard of non-Muslims save for a necessity. However, if the dead, Muslim or other, were mixed then they should be buried between the graveyard of Muslims and others. If this wasn`t possible, then they are to be buried in Muslim graveyard. An-Nawawi {May Allah have mercy on him) said: "Our fellow scholars (May Allah have mercy on them) agreed that it isn`t allowed to bury a Muslim in the graveyard of non-Muslims and vice versa. Even when a pregnant Dhimmi woman (non-Muslim living in an Islamic state with legal protection) carrying the child of a Muslim dies, there are two opinions: The correct one is that she is to be buried between Muslim and non-Muslim graveyards……..The same ruling applies when the dead Muslims are mixed with the dead disbelievers. He said that it was reported from Omar Bin Al-Khattab (May Allah be pleased with him) that he ordered burying a dead Christian woman bearing a Muslim child in the graveyards of Muslims." {Al-Majmou` Shareh Al-Mohazab, Vol.5:p.285}.
According to Islamic Law, burying the dead is one of the collective obligations so it is achieved by at least pouring water all over the dead body once and intention isn`t a condition for the validity of the Ghusl (washing) of the dead person. Therefore, if it was difficult to wash the dead because there is no water in such exceptional circumstances (Earthquake) or the washing would cause the dead body to dissolve or break into pieces as the case with the body of the person who died due to fire, then it is allowed to make Tayamum instead of Ghusl. An-Nawawi (May Allah have mercy on him) said: "If it was difficult to wash the dead because there is no water or the body had burnt and it would dissolve due to water, then Tayamum (The Islamic act of dry ritual purification using purified sand or stone or mud) is made instead of Ghusl. This Taymum is an obligation because it isn`t meant to remove an impurity, so it is to be applied when there is no water, as in the case of the person in the state of Janabah (A state of major ritual impurity caused by any contact with semen)." {Al-Majmou` Shareh Al-Mohazab}.
In conclusion, if there are many dead people because of natural disasters, such as earthquakes, floods and the like, then it is allowed to bury more than one person in the same grave if it is difficult to dedicate a grave for each and the body should be washed with water if it doesn`t dissolve because of that. Moreover, there is no sin in burying a Muslim person with a non-Muslim in the same grave in case it was difficult to differentiate the faith of each. And Allah The Almighty Knows Best.