Given the following contrived problem:
#!/usr/bin/perl -w use strict; my $n = 100; my $sum = 0; $sum += $_ for 1 .. $n; print "$sum\n";
Give the same problem to a mathematician, and might be seen as:
Sum(1..n) = n(n+1)/2
The programmer will implement the algorithm provided in the most efficient way possible, hopefully, whereas the mathematician is the one who should provide the most efficient algorithm.
If these two work together, we might get a program like this:
#!/usr/bin/perl -w use strict; my $n = 100; my $sum = $n * ( $n + 1 ) / 2; print "$sum\n";
Many times I've seen people say, "Let the programmer solve it all...he'll make it go fast!" But what about the other disciplines? By involving the mathematician, her algorithms are implemented by the programmer to produce even faster code.
How many of your projects incorporate the disciplines necessary for the realization of the most efficient solution possible?Pondering,
<code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>