Let $\mathbb{G}$ be a cyclic group of prime order q and generated by g. Let $D$ be the uniform distribution over $\mathbb{G}^3$. Let $D_{dh}$ be the uniform distribution over the set of all DH-triples $(g^{\alpha}, g^{\beta}, g^{\alpha\beta})$. Let $D_{ndh}$ be the uniform distribution over the set of all non-DH-triples $(g^{\alpha}, g^{\beta}, g^{\gamma})$ with $\gamma\neq\alpha\beta$.
Answer the following questions:
(a) Show that the statistical distance between $D$ and $D_{ndh}$ is $1/q$
(b) Show that, under DDH assumption, the distributions $D_{dh}$ and $D_{ndh}$ are computationally indistinguishable.
What I did till now is trying to show (a)
$SD(D,D_{ndh})=\frac{1}{2}\sum_{a,b,c}|(Pr[D=(a,b,c)]-Pr[D_{ndh}=(a,b,c)]|=\frac{1}{2}q^3|\frac{1}{q^3}-\frac{1}{q^2}\frac{1}{q-1}|=\frac{1}{q-1}$
I got to this point thinking that every truple is equally possible over $\mathbb{G^3}$ and that g is a generator so there must exist a truple $(x,y,z)$ such that $(g^x,g^y,g^z)=(a,b,c)$ just considering that $z$ must be different from $xy$.
For point (b) I actually don't know how to procede, I know I should show that no PPT adversary could distinguish between the two, and it is trivially DDH and so I don't what I should prove, maybe doing a reduction to DDH?