All assignments should be scanned in as PDF files and emailed to me at the email address above. Use the message subject "CS 624 Assignment XXX", where XXX is of course the number of the assignment.
The email must reach me by 5 PM on the day it is due. Late work will not be accepted.
The class notes, of course and also the handout "Stirling's Formula", which is available in the usual place.
Please read the Stirling's Formula notes before the class on Monday. If you have questions, send me email.
Wednesday: First mid-term exam. It's "closed-book". No books, no papers, no notes, no cell phones, ... . I will send out the exam by email 10 minutes before the normal class time. After the exam (i.e., when the class would normally end) you will have 15 minutes to scan in your papers to a PDF file which you should then email to me right away.
I will be available during the exam for any questions you may have. And remember: you can't possibly do even most of the problems. There are just too many. I'm doing that as a favor to you. So pick the ones you can do easily and do them first. Then see what else you can do.
And I'm looking for clear writing. That's important. Be nice to the reader, who in this case is me!
Wednesday: We start depth-first search. This corresponds to Sections 22.3 through 22.5 in the text. However, the main source we will be using is the first chapter of my expository article "Notes on Graph Algorithms Used in Optimizing Compilers", which you can find on my web site.
This covers the same material as the text, so you can just skim the text if you want.
Monday: We finish the lectures on depth-first search. That includes all the rest of Chapter 1 of the paper "Notes on Graph Algorithms Used in Optimizing Compilers" except for Section 1.6. Don't bother reading that last section.
In addition to that reading, there are two additional things you should look at:
I am going to cover the now-standard algorithm for finding strongly-connected regions in directed graphs. The algorithm is extremely elegant, and the proof is somewhat sophisticated. There are actually several proofs. There are a couple of YouTube lectures from Stanford on this that cover this material and that I suggest you look at. They treat the proof much as our book does, and the first lecture in particular does a good job giving an example and working it out. Here are the web sites:
The proof in the notes that I have written up may seem a bit less well motivated, but it does have the advantage that it is actually much quicker. I think they are both worth studying.
Wednesday: We start talking about flows in networks, the max-flow min-cut theorem and some applications. This is all covered in the Lecture 14 handout.
Note: this handout covers pretty much what is in Chapter 26 of our text. However, I strongly recommend that you do not read Chapter 26. The reason is that I am using a different convention for representing such networks than the book does, and if you try to read both the book and my notes, you will really get confused.
Wednesday: Review for the final exam. There is far too much in this course to go over each topic, so I am depending on you to ask specific questions So please come in with them!
The final will cover the entire course. As usual, it will be a closed-book exam—no books, no notes, no cell phones or electronic anything. And also as usual, there will be many more questions than you can possibly do. So you don't have to worry if there are some you get stuck on. Just do other ones. Study hard; and I hope you will enjoy it!
And remember that the final exam will be next Tuesday, not Monday.
This prerequisite is important. You really need to have taken this course, and done well in it, or can convince me you really do know this material, to get the benefit of CS 624.
Further, while this is the official prerequisite, there is some other material that you really need to know in order to understand what we are doing in this course. I do know that you have studied this before, but I just want to make it explicit here. I will not review this material in class—you are responsible for understanding it. The homework and also the exams will include problems using this material:
Some serious single-variable calculus: derivatives, the chain
rule, integrals, the "Fundamental Theorem of the Calculus", maxima and
minima, increasing and decreasing functions. You should be able to take the
derivative of expressions like this one:
(5x2 - 2x + 4)88
And of course you should never get confused between the two functions
f(x) = xa
(for instance, f(x) =
x3
) andg(x) = ax
(for instance, g(x) =
3x
)Which one grows faster? And is the difference in growth significant?
(x + 1)/(x - 3) + (x - 4)/(x2 + 11)
I don't mean this to be intimidating. Many people get very frightened by even elementary mathematics. There is no need to be frightened. And I'll always be available to help you out.
Class meetings: M/W 5:30-6:45 PM Office hours: Before class: M/W 4:30-5:15 PMIntroduction to Algorithms, Third Edition
by Cormen, Leiserson, Rivest, and Stein
MIT Press, 2009
This is the most widely used text (by far) in this kind of course, all over this country, and maybe all over the world. It's a great book; it's very well written; it covers a vast number of important topics; and you can keep it and refer to it throughout your career.
I'm sure everyone in this class has taken one or more courses in which you have learned some of the really great algorithms.
This is not one of those courses. This is not a course in "really great algorithms", or in writing programs, or even in writing pseudo-code.This is for all practical purposes a mathematics course. It is a course on the analysis of algorithms. We are going to prove theorems in this course. In fact, that's just about all we are going to do. And when I say we, I really mean you. The homework will consist of theorems that you will have to prove. The exams will consist of theorems that you will will have to prove. That's what we're going to do.
At a minimum, I plan to cover the following material this term:
There will be one homework assignment each week. I will not accept assignments handed in late.
There will be two in-class "mid-term" exams, and one final exam.
All the exams will be "closed-book" exams. No books, no notes, no smartphones or other electronic equipment, and so on. Just bring something to write with.
I will weight the work in the course roughly as follows when making up final grades:
I will not give out "review sheets" for the exams. It should go without saying, however, that the very best way to prepare for the exams is to
This course does not involve any programming per se, although without a doubt your experiences in building serious programs will help you understand many of the issues we deal with.
In fact, as I already stated above, the course could well be regarded as a mathematics course. I will be proving things in class, and you will be expected to write formal proofs in your assignments and on exams. If this is something you are not ready to come to grips with, you should wait until you are ready to take this class. That doesn't mean, though, that I expect you to be experts in proving things. Constructing proofs is a very sophisticated skill that we will work on all term. You will gradually get better at it. And I'll be very willing to help you every way I can.
There is a style to writing proofs. In fact, there are several styles. But the main thing to keep in mind when writing a proof is this: Your goal should be to write a proof that is easy to read and that illuminates the reason why something is true. That's really what a proof is. And this is not easy to do. Good writing of any kind is difficult, and we will work hard at it all term.
Probably the single most important proof technique in this area is mathematical induction. I will assume that you have had some experience with this technique, and I'll give you some pointers, since we will be using it a lot.
I also expect you to be familiar with standard mathematical notations such as summations (and of course, integrals). Some of this is reviewed in the appendices of the text. I will not review this in class. I expect you to know it, and we will be using it a lot.
One thing is very important to bear in mind: Like any other kind of writing, a proof must be understandable. If I can't understand what you are writing, then it can't be correct. And I'm not going to try to guess what you had in mind.
(One thing I have noticed is that some students seem to believe there is only one way to do something, and only one way to explain it, and so of course I must understand what they mean. But that's not true. There are almost always many ways to do things, and many ways to explain them. If I write on your paper "I don't understand this", I'm not being irritable—I really don't understand it.
If you are uncertain how to express something, please just talk to me or send me email, and I'll try hard to help you. But don't even bother writing something that can't be understood.
Think of this like you would when writing a computer program. If the compiler or interpreter can't understand it, it's wrong. And you have to be really careful with your use of language and terms. For instance, one thing beginning programmers often get mixed up about is the correct use of "or" and "and". The meaning in computer languages is not the same as in English (or any other natural language, so far as I know). The same is true in proofs. We use language in very precise and fixed ways in proofs, and we do this so that what we write can be understood in its exact meaning by anyone at any time, anywhere in the world.
Just for a simple example: the sentence "All horses are not white." does not mean the same as "Not all horses are white." At least, not when writing proofs. In ordinary English, these two sentences are generally regarded as equivalent. But for our purposes they are not. You have to be careful about this.
Here's another example: The symbol "==>" means "implies". It does not mean "then". So you can write
if x = 3 then x + 5 = 8or you can write
x = 3 ==> x + 5 = 8But you cannot write
if x = 3 ==> x + 5 = 8 !!! WRONG !!!Here's another thing to watch out for: the symbol "=" means "equals". It doesn't mean anything else. (Well, there is one small exception, involving "big-O" notation, which we will cover in the second class.) So you could write something like this:
2x - 1 = 5 so x = 3But you cannot write
2x - 1 = 5 = x = 3 !!! WRONG !!!Please try to be careful about things like this. And please don't be offended if I correct mistakes like this in what you write.
I encourage you to talk with other students—in fact, with anyone—about the topics we are covering. And I also encourage you to send me email with questions; I'll be happy to get back to you as quickly as I can. Asking me questions, and sending me email does not lower your grade. And it does not make me think badly of you. In fact, it shows me that your are taking this material seriously. This material we will be studying is very sophisticated. Of course you will have questions. That's good.
However, the writeups you hand in must be entirely your own. You may not copy proofs, or algorithms, or parts of proofs or algorithms, or anything else, from anyone else's paper, or from the web, or from books, or from anywhere else, even if you give credit to that person or source. And you must be able to explain to me what you have written.
I also expect you to read the file ~offner/cs624/honesty.pdf. This file spells out in more detail exactly how we should look at our work in this course.
Please do take this seriously. I'm very happy to try to help you out in person or by email. I really do want every one of you to succeed, and I'll try hard to make that happen. But I have no tolerance at all for plagiarism. If I find evidence of it, you will receive an F for the course. And I don't give "second chances".
Students are required to adhere to the polices expressed at the University web site Academic Policies and Rights.