We know that group cohomology $H^2(G,U(1))$ consists of 2-cocycles $\beta(A,B)\in U(1)$ corresponding to elements in the group $H^2(G,U(1))$, where $A\in G,B \in G$. Note that $\beta(A,B)$ satisfies 2-cocycles conditions: $\frac{\beta(A,B)\beta(AB,C)}{\beta(A,BC)\beta(B,C)}=1$, with $A,B,C\in G$. 


For example,


(1)$H^2(Z\_2,U(1))=Z\_1$


(2)$H^2(Z\_2^2,U(1))=Z\_2$


(3)$H^2(Z\_2^3,U(1))=Z\_2^3$


(4)$H^2(Z\_n^k,U(1))=Z\_n^{k(k-1)/2}$


(5)$H^2(Z\_n \times Z\_m,U(1))=Z\_{gcd(n,m)}$.


We know (1)$H^2(Z\_2,U(1))$ has a 2-cocycle $\beta(A,B)=1$ (up to a 2-coboundary term), this corresponds to the unique element in $Z\_1$.


Questions: What are the explicit forms of 2-cocycles $\beta(A,B)$ for the cases of (2)$H^2(Z\_2^2,U(1))$,(3)$H^2(Z\_2^3,U(1))$? 


The answer should look like:
For (2), $\beta(A,B)=\beta\_1^{n\_1}$ with $n\_1\in \{ 0,1\}=Z\_2$, with $\beta\_1$ as a generator of 2-cocycles. 
For (3), $\beta(A,B)=\beta\_1^{n\_1}\beta\_2^{n\_2}\beta\_3^{n\_3}$ with $n\_1,n\_2,n\_3\in \{ 0,1\}=Z\_2$, with $\beta\_1,\beta\_2,\beta\_3$ as generators of 2-cocycles.


Similarly, any answer for explicit 2-cocycles for (4)$H^2(Z\_n^k,U(1))$ and (5)$H^2(Z\_n \times Z\_m,U(1))$? 


Any comments, concise/short reference or better understanding will be helpful. I am a physicist, on a modest level trying to absorb this <http://arxiv.org/abs/hep-th/0001158>. Thank you so much.



Explicit 2-Cocycles of G=Z2×Z2xZ2 over U(1)
It turns out that by playing around the $U(1)$ form of 2-cocylces, I manage to provide some answers to (2) and (3) and partially (4).


For (2)$H^2(Z\_2^2,U(1))=Z\_2$, 
the 2-cocycles are $\beta(b,c)=\beta\_1^{n\_1}=\exp({i\pi}n\_1(b\_1 c\_2))$, with $b=(b\_1,b\_2)\in Z\_2^2$, $c=(c\_1,c\_2)\in Z\_2^2$. Here $b\_1,b\_2,c\_1,c\_2,n\_1\in\{0,1\}=Z\_2$.


More generally, $H^2(Z\_n^2,U(1))=Z\_n$, 
the 2-cocycles are $\beta(b,c)=\beta\_1^{n\_1}=\exp({i2\pi}\frac{n\_1}{n}(b\_1 c\_2))$, with $b=(b\_1,b\_2)\in Z\_n^2$, $c=(c\_1,c\_2)\in Z\_n^2$. Here $b\_1,b\_2,c\_1,c\_2,n\_1\in\{0,1,\dots,n-1\}=Z\_{n}$.


For (3)$H^2(Z\_2^3,U(1))=Z\_2^3$, 
the 2-cocycles are $\beta(b,c)=\beta\_1^{n\_1}\beta\_2^{n\_2}\beta\_3^{n\_3}$. 
Explicitly,
$\beta\_1^{n\_1}=\exp({i\pi}n\_1(b\_2 c\_3))$,
$\beta\_2^{n\_2}=\exp({i\pi}n\_2(b\_1 c\_3))$,
$\beta\_3^{n\_3}=\exp({i\pi}n\_3(b\_1 c\_2))$,
 with $b=(b\_1,b\_2,b\_3)\in Z\_2^3$, $c=(c\_1,c\_2,c\_3)\in Z\_2^3$. Here $b\_1,b\_2,b\_3,c\_1,c\_2,c\_3,n\_1,n\_2,n\_3\in\{0,1\}=Z\_2$.


Thus, similarly, we can partially answer (4) for $H^2(Z\_n^3,U(1))=Z\_n^3$, 
the 2-cocycles are $\beta(b,c)=\beta\_1^{n\_1}\beta\_2^{n\_2}\beta\_3^{n\_3}$. 
Explicitly,
$\beta\_1^{n\_1}=\exp({i2\pi}\frac{n\_1}{n}(b\_2 c\_3))$,
$\beta\_2^{n\_2}=\exp({i2\pi}\frac{n\_2}{n}(b\_1 c\_3))$,
$\beta\_3^{n\_3}=\exp({i2\pi}\frac{n\_3}{n}(b\_1 c\_2))$,
 with $b=(b\_1,b\_2,b\_3)\in Z\_n^3$, $c=(c\_1,c\_2,c\_3)\in Z\_n^3$. Here $b\_1,b\_2,b\_3,c\_1,c\_2,c\_3,n\_1,n\_2,n\_3\in\{0,1,\dots,n-1\}=Z\_{n}$.


The 2-cocycles $\beta(b,c)$ above, have the satisfactory properties: 
(i) all satisfy 2-cocycles conditions $\frac{\beta(A,B)\beta(AB,C)}{\beta(A,BC)\beta(B,C)}=1$.
(2) A generator correspond to an element of $H^2(G,U(1))$ for the given $G$. 
(3) Any two generators $\beta\_i \neq \beta\_j$ are not different simply by a 2-coboundary. i.e. $\beta\_i \neq \beta\_j \frac{\gamma(b)\gamma(c)}{\gamma(bc)}$ for any 1-cochian $\gamma(g)\in U(1)$.


Maybe the above answer implies it will not be too difficult to fully answer (4) and (5).


