When each family eats alone, sharing a common supply of food, they are not considered one collective group. Nevertheless, the food supply takes the place of an eruv to unite them and permit them to carry into the courtyard (Eruvin 71a). In this case, there is need for an eruv, but the common food supply serves that function. This is often the case in hospitals, where patients eat alone in their rooms from food prepared in a common kitchen. Since an eruv is necessary, however, if a gentile or Jewish apostate is staying in the hospital, it is forbidden to carry from private rooms into the public corridors, since they render the eruv invalid (Nesivos Shabbos by Rabbi Blau 31:15).