Detecting ends of residually finite groups in profinite completions
  Let $\C$ be a variety of finite groups. We use profinite Bass--Serre theory to show that if $u:H\hookrightarrow G$ is a map of finitely generated residually $\C$ groups such that the induced map $\hat{u}:\hat{H}\rightarrow\hat{G}$ is a surjection of the pro-$\C$ completions, and $G$ has more than one end, then $H$ has the same number of ends as $G$. However if $G$ has one end the number of ends of $H$ may be larger; we observe cases where this occurs for $\C$ the class of finite $p$-groups.   We produce a monomorphism of groups $u:H\hookrightarrow G$ such that: either $G$ is hyperbolic but not residually finite; or $\hat{u}:\hat{H}\rightarrow\hat{G}$ is an isomorphism of profinite completions but $H$ has property (T) (and hence (FA)), but $G$ has neither. Either possibility would give new examples of pathological finitely generated groups. 
Owen Cotton-Barratt
math.GR