TITLE: Explicit 2-Cocycles of G=Z2×Z2xZ2 over U(1)
QUESTION [7 upvotes]: 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.

REPLY [7 votes]: 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).