When do two overlapping sets in $\mathbb{R}^n$ have a common boundary point? When compact and connected? Convex?

120 Views Asked by At

When making video games you often want to calculate whether two shapes have a common point. The shapes are usually fairly simple—circles and convex polygons (especially triangles) are very common. There's a general theme I've observed across a few particular examples, which is that if two shapes overlap then either one of them contains the other or they have a point lying on the boundary of both $A$ and $B$.

What is the smallest (or a small) set of assumptions for which this holds?

For practical purposes I care about $A$ and $B$ that are subsets of $\mathbb{R}^n$ for $n \in \{2, 3\}$, but out of intellectual curiosity I'm interested in a more general answer too. The usual suspects are also closed, bounded and convex.

I note that "closed and bounded" is insufficient: Let $A$ be the square with corners at $(\pm 1, \pm 1)$ and let $B$ be the union of four skinny rectangles covering the four edges of $A$. The boundary of $A$, its four edges, is contained within the interior of $B$ (and thus disjoint from the boundary of $B$), yet $(0, 0) \in A \setminus B$ and $(1 + \varepsilon, 1 + \varepsilon) \in B \setminus A$ for $\varepsilon > 0$, so my conjecture doesn't hold.

If I assume $A$ and $B$ to be path-connected, and I'm given $p \in A \cap B$ and $q$ in $A \setminus B$, I can connect those two points with a continuous function from $[0, 1]$ to (e.g.) $\mathbb{R}^2$, which must go through the boundary of $B$ (I think, I should check this). Thus, if neither $A$ contains $B$ nor the reverse, I can find a point in $bd(A) \cap bd(A \cap B)$ and one in $bd(B) \cap bd(A \cap B)$, where $bd$ denotes the boundary.

I don't quite know what to do with this, though. I note that $bd(A \cap B) \subseteq bd(A) \cup bd(B)$, and that $bd(A) \cap bd(A \cap B)$ and $bd(B) \cap bd(A \cap B)$ are both closed.

If I squint really hard, maybe the complements of $bd(A)$ and $bd(B)$ relative to $bd(A \cap B)$ are open in the topology of $bd(A \cap B)$, thus if $bd(A \cap B)$ is disjoint from $bd(A) \cap bd(B)$ then $bd(A \cap B)$ is disconnected, and maybe that contradicts something, but I feel out of my depths here. Maybe I even said some nonsense.

Can I get there from here?

1

There are 1 best solutions below

0
On

Following result holds:

If $A,B$ are two compact convex subsets of $\mathbb R^n$ such that $A \cap B \neq \emptyset$, $A \not\subset B$ and $B \not\subset A$ then $\partial A \cap \partial B \neq \emptyset$.

Hint for the proof

$A \cap B$, which is the non empty intersection of two compact convex subsets is a non empty compact convex subset too.

Remember that for a compact subset $K \subseteq \mathbb R^n$, with a non empty interior, you can define for a point $k \in \mathring K$ a continuous map $\varphi_K$ from the sphere $S^{n-1}$ to $\partial K$. Intuitively, the map associate to each half line ending on $k$ the intersection with $\partial K$. $K$ being compact convex, this intersection is unique.

Suppose that $\mathring{ A \cap B} \neq \emptyset$ and take $c \in \mathring{ A \cap B}$. Then for any half line $l$ ending on $c$, define $\Phi(l)$ as the closest point from $c$ between $\varphi_A(l)$ and $\varphi_B(l)$. $\Phi(S^{n-1})$ contains a point belonging to $\partial A \cap \partial B$. If not, you either have $A \subseteq B$ or $B \subseteq A$.

Remains to deal with the case $\mathring{ A \cap B} = \emptyset$. For that look at the affine dimension of the compact convex $A \cap B$ in order to return to previous case.