Discussion:
Calculus in Computer Science
(too old to reply)
Skunk
2005-01-04 04:52:23 UTC
Permalink
I'm currently teaching 1st year calculus to computer science students.

Do any of you know any calculus applications that computer science students
might find interesting?

Have any computer scientists ever used their first year calculus techniques?

I can't think of any uses for a the continuous topic of Calculus in the
discrete world of computer.

Currently, we discuss Newton's method, Euler's Method, and other numerical
techniques but what I'm really looking for is calculus used in computer
graphics, gaming, AI, file compression or possible other areas.

Thanks
n***@comcast.net
2005-01-05 04:03:39 UTC
Permalink
Post by Skunk
I'm currently teaching 1st year calculus to computer science students.
Do any of you know any calculus applications that computer science students
might find interesting?
A couple of examples of analyzing sorting algorithms come to mind:

1) Consider making a hybrid sorting algorithm: using a divide
and conquer algorithm (like merge sort) down to a certain size,
and then switching over to selection sort (which is asymptotically
slower, but faster on small inputs). If you analyze this, you get
a running time in two variables: n (the size of the original
input) and k (the problem size at which to switch over). Then to
get the optimal switching point, it's a classic minimization
problem: take a derivative, set to zero, and solve.

2) The analysis of the average case complexity of quicksort has a
sum in it that can be easily handled by bounding the sum using an
integral.

I've also had situations where I've analyzed an algorithm, had to
prove a limit, and used the epsilon/delta definition from 1st year
calculus, although the situations there are a little more obscure....
--
That's News To Me!
***@comcast.net
Skunk
2005-01-05 04:27:31 UTC
Permalink
Wow! Thanks for the ideas. The students have an algorithms course so I'm
sure that they are already familiar with the sorts. I think that fact that
it is two variable is a bit advanced for first semester but I might use it
as a motivating example.
Post by n***@comcast.net
Post by Skunk
I'm currently teaching 1st year calculus to computer science students.
Do any of you know any calculus applications that computer science students
might find interesting?
1) Consider making a hybrid sorting algorithm: using a divide
and conquer algorithm (like merge sort) down to a certain size,
and then switching over to selection sort (which is asymptotically
slower, but faster on small inputs). If you analyze this, you get
a running time in two variables: n (the size of the original
input) and k (the problem size at which to switch over). Then to
get the optimal switching point, it's a classic minimization
problem: take a derivative, set to zero, and solve.
2) The analysis of the average case complexity of quicksort has a
sum in it that can be easily handled by bounding the sum using an
integral.
I've also had situations where I've analyzed an algorithm, had to
prove a limit, and used the epsilon/delta definition from 1st year
calculus, although the situations there are a little more obscure....
--
That's News To Me!
Continue reading on narkive:
Loading...