The outside sources may have become scarce, but you can always try and work it out, yourself.
The language is not the problem, but the logic you will need, to do this -- that's what you need.
Do you know how to transform this data from one type to the other, yourself - without a computer?
If so, start writing down the steps you would take, as specifically as possible.
With that, and a few examples of typical input and output, you can come up with the skeleton of the program.
Now you've reduced the problem from a "holy shit" to a manageable C problem, and we will then be able to help with what has you stumped.
Get that first part, done up. If you are able to google up some code for idea's, OK. If not, you'll still have a way to finish the assignment or project. And you'll have learned a lot in the process.
So will I. ;)
Wiki has some info on this:
http://en.wikipedia.org/wiki/Deterministic_finite-state_machine