Some time ago on the blog we had a series on the halachos of yichud that are oh-so critical in our crazy generation.
There is a halacha that if a wife's husband is in town then she is allowed to seclude herself with a man, known as בעלה בעיר [see the end of maseches kiddushin]. What does it mean in the same town? Let us say that the wife is in one city and the husband is NEXT DOOR but officially in a different town, is that considered בעלה בעיר because they are so close and that is enough to prevent anything inappropriate or no, since they are officially in different cities, seclusion is forbidden.
The Chazon Ish paskened that yichud is forbidden in such an instance. Hence, if one is in Bnei Brak and his wife is next door in Ramat Gan - yichud is forbidden. If one is on Woodmere and his wife is next door in what is officially considered Cederhurst, yichud is forbidden.
Paradoxically, if one is at one end of the city and his wife at the other end then yichud would be permitted.
[Maaseh Ish 5 page 113]
I must note that this heter of בעלה בעיר is subject to debate whether it is a heter lichatchila or merely bi-dieved but should be avoided.