I am in the process of writing a fairly long monograph on a computer science topic. However, I usually find myself in a position of having to write some computer science concept in mathematical terms, and it is difficult to me. For instance, say I want to write a for-loop or a void function. I do most of the time go to my Knuth or Cormen or Sedgewick, but they are not enough now. Is there a “manual” or some text I can take as example to translate computer science into mathematics?
Edit
Let me be more specific (thanks, Uri). What I mean is: For example, I have a function that is void, and it returns a random string of length n. This caused my curiosity, I don’t even know how to represent void function in in math… but again, this is just an example.
Summation or product notation can probably replace some for-loops. Others can probably be expressed as logical quantifiers (“There exists i such that a[i] has some property”
or “a[i] has some property for all i”). (Sorry I don’t know how to render these
in Markdown…hope you get the idea.)
“Void functions”…hmmm, maybe some convenient logical notation to state preconditions
and postconditions, since such functions are only useful for their side effects?
But I think most mathematicians will be familiar enough with descriptions of algorithms to understand any halfway reasonable pseudocode convention. Just try to stay away from
anything that requires a “language-lawyer” skill level in some particular programming
language.