I find that what many people think of when they think of "math" is really just calculating (solve for this variable, optimize this curve, etc.)---what I like to call end-user math or craft-math. It's more akin to cooking or repairing an engine than it is to writing software. The other kind of math, the real kind, if you will, is proof writing. It's a creative process, both goal-oriented and expository, and subject to principles of elegance and efficiency. All of these features it has in common with software development.
This is a misrepresentation of the problem. Clearly, observed behavior is the result of a particular combination of input and program. The question isn't whether it's one or the other, but rather, given the knowledge of only one or the other, how much of the observed behavior can you explain? And, moreover, to what extent does the input change the program?