Cocycles and the first cohomology I took algebraic number theory this semester and our professor started to teach cohomology of groups.
Let $G$ be a group so that $G$ acts on an abelian group $A$. he defined $H^1(G,A)$ as the following  quotient group:
$$\frac{C=\{\phi\colon G\to A\mid \phi(g_1g_2)=g_1\phi(g_2)+\phi(g_1)) \}}{D=\{\phi\colon G\to A\mid \phi(g)=ga-a \}}$$
furthermore he said we call every element of $C$, cocycle and every element of $D$ coboundary.
on the other hand, in graphs, we call every cut cocycle. Now my question is 
Is there any connection between these cocyles?  
 A: This nomenclature comes, most probably, from algebraic topology. Here's a brief explanations:
Let $X$ be a simplicial complex, that is a topological space obtained by gluing together simplices (i.e. "$n$-dimensional triangles") in a nice way (basically gluing faces in a non-degenerate way). An example of this are graphs: vertices are $0$-simplices and edges $1$-simplices. Let $S_n(X)$ be the $\mathbb{Z}$-module spanned by the set of $n$-simplices composing $X$. We have a sequence of maps
$$0\stackrel{\partial_0}{\longleftarrow}S_0(X)\stackrel{\partial_1}{\longleftarrow}S_1(X)\stackrel{\partial_2}{\longleftarrow}S_2(X)\ldots$$
given by taking the "boundary" of an element of an element. This can be defined in a nice way, so that $\partial_n\partial_{n+1} = 0$. We define the homology of $X$ by
$$H_n(X;\mathbb{Z}) = \frac{\ker(\partial_n)}{\text{im}(\partial_{n+1})}.$$
These groups are actually topological invariants with a lot of nice properties. For obvious reasons, the elements of $\text{im}(\partial_{n+1})$ are called "boundaries". Similarly, the elements of $\ker(\partial_n)$ are called "cycles", as they are linear sums of $n$-simplices that have no boundary.
Now there is a dual notion of cohomology coming from linearly dualizing the long sequence described above and doing basically the same thing. As always, when dualizing stuff we add a "co-" to the names, whence the names "coboundaries" and "cocycles".

For a fast answer to your question: the relation between the two concepts comes from the general framework of homology/cohomology. The structure of what you are doing is always more or less the same: if you can build a (co)chain complex (i.e. a long sequence like the one I described above), then you can take it (co)homology. Elements in the image of the boundary/differential map are called (co)boundaries and elements of the kernel are (co)cycles.
