Deep learning is actually pretty useful (relative to other techniques) precisely when there is no simple mapping between input and output, and features from the raw input need to be aggregated and combined in complex ways by successive layers to form the output.
As I pointed out in my answer to the AI SE decompilation question, there is recent DL research which takes a natural language description as input and generates program text as output. Despite working in this general research area, I was personally surprised by this - the problem is significantly harder than the 'AI math' link you provide above.