Is top simplicial cohomology generator just class of dual cochain to any simplex of maximal dimension? I have a 1-dimensional simplicial complex $K$. Specifically, it is boundary of a pentagon (let's label its vertices with $1,2,3,4,5$). I want to find generator of $H^1(K)$.
What I did: I just took generator in $H_1(K)$, that is, class of the chain $c=\{1,2\}+\{2,3\}+\{3,4\}+\{4,5\}+\{5,1\}$ and took the cochain that takes value $1$ on $c$ and value $0$ on any other chain. As I understand, it must be generator in $H^1(K)$.
However, in one book I saw that generator of $H^1(K)$ is just class of cochain that takes value $1$ on any 1-dimensional simplex $\sigma\in K$.
Is it true? If yes, what is wrong with my approach?
Thank you.
 A: Yes, the book is correct. Pick one $1$-simplex, say $c_1 = \{1,2\}$ in your example, and define a co-chain $c^1$ with $c^1(c_1) = 1$ and $0$ on the other $1$-simplexes. Then $[c^1]$ generates $H^1$. 
I'll mention that the language you used, "cochain that takes value 1 on any 1-dimensional simplex $\sigma \in K$", was a bit confusing, as it sounded like it would assign $1$ to any $1$-simplex, which is wrong. You have to choose one $1$-simplex and then do the construction above, where all the other $1$-simplexes are assigned $0$. What's interesting is that no matter which $1$-simplex you choose you generate the same class in $H^1$, i.e. the co-chains differ by a co-boundary (assuming $K$ is connected).
Your construction (assuming you formalized it a bit better) really does not describe the same thing. I guess you could define $c^1(\sigma_i) = 1/5$ for all five $1$-simplexes $\sigma_1, ... ,\sigma_5$, and that would evaluate to $1$ on your generator of $H_1$, but it's messy and sometimes your coefficient ring doesn't contain 1/5.
To get a bit hand-wavey I seems like you're trying to take the thinking of $H_1$ as made up of paths and drag that over to $H^1$. If I can offer an alternate image, I had a prof who said that if chains are made up of paths then co-chains are sets of gates that sit across the paths, and evaluating a co-chain on a chain corresponds to counting up how many times your chain went through each gate and adding up the tolls. With this view we can see that to "do" $H^1$ all we have to do is put 1 gate across any of the $1$-simplexes in our complex, and we will be able to catch any generator of $H_1$ -- a path in $H_1$ will have to go through our gate because it is a "closed loop". We can also see that it doesn't matter where we put our gate -- a "closed loop" will still have to go through it.
If you want to get some experience with this thinking here's a suggested exercise: Let $a^1$ be the co-chain defined like the very beginning of this answer, i.e. dual to $\{1,2\}$ in your notation, and let $b^1$ be a similar co-chain, but dual to $\{2,3\}$. We know that $[a^1] = [b^1]$, so  $a^1$ and $b^1$ differ by a co-boundary. Find the $0$-cochain $c^0$ such that $b^1 = a^1 + dc^0$. (Recall that a $0$-cochain is basically just an assignment of a number to each vertex.) Try to see how adding the co-boundary corresponds to "shifting the gate from being across $\{1,2\}$ to being across $\{2,3\}$".
