Let $G = (V, E)$ be a simple connected undirected graph with $z \in V$. How can I prove the following claim.
The vertex $z$ is an articulation point in $G$ if and only if there exists to distinct vertices $x, y \in V$ such that $x\neq z$, $y\neq z$, and every path in $G$ connecting $x$ and $y$ contains $z$.
How can I prove this claim?
An articulation point in $G$ is a vertex $v \in V$, when removed the graph $G$ becomes disconnected.
Now Assuming $v$ is an articulation point. Let $C_1$ and $C_2$ be two different connected components in the graph resulting from $G$ when we remove $v$. Let $v_1 \in C_1$ and $v_2 \in C_2$. Any path from $v_1$ to $v_2$ must go through $v$, because else, there would be a path from $v_1$ to $v_2$ after removing $v$ and hence $C_1$ and $C_2$ will be the same connected component which is a contradiction.
Now assume there are two vertices $v_1, v_2 \in V$ different from $v$, such that all paths from $v_1$ to $v_2$ pass through $v$. Let $G'$ be the graph resulting from $G$ when removing $v$. In $G'$ there is no path from $v_1$ to $v_2$ because such a path would be a path in $G$ that does not go through $v$. Hence, $v_1$ and $v_2$ belong to two different connected components in $G'$ and $v$ is an articulation point.