Course Description
for Data Structures + Algorithms: CS 3100


For the past ten years the CSU system has suffered chronic under-funding. This year, because of the state economic crisis, the budget cuts are draconian - $584 million - the worst ever in decades. The CSU administration is attempting to manage these cuts by dramatically increasing student fees and by furloughing almost all university employees, including faculty, staff and administrators. A furlough means mandatory unpaid days off for employees. For faculty there were eight furlough days in the Fall 2009 Term and two in Winter 2010 Term. There will be eight more in the Spring 2010 Term

On staff and administration furlough days, many campus offices will be closed. On faculty furlough days, faculty will not be available to perform work, including teaching.

All campus staff and administrators will take their furloughs on the same days (shown here.) However each faculty member will choose his or her own furlough days. My eight furlough days for the Spring 2010 Term are shown at the bottom of this page. None of them is a class day.

If you want to do something about the drastic CSU budget situation, I strongly suggest that you write to your legislators and to the President and Provost of our university.

TERM: Spring 2010

20349 #CS 3100 001 Data Structures and Algorithms Lec 3.0 MWF 09:05-10:03 N-104
INSTRUCTOR: John Sarraille, Professor of Computer Science

OFFICE: P-286, Professional Schools Building (aka DBH), Cal State Stanislaus

OFFICE HOURS: (Regular office hours commence on Wednesday, Feb 17, 2010 and end on Monday May 24, 2010.
There will be no regular office hours on Tuesdays, Thursdays, holidays, or Spring Break.)

E-MAIL: john@ishi.csustan.edu

HOMEPAGE: http://www.cs.csustan.edu/~john/js.html


You have to be adequately prepared to take CS 3100. Check with me if you have not passed Computer Programming II (CS 2500), or the equivalent.


The highest aim of this course is for you to learn how to choose and design good abstract data structures and good algorithms for computer programs. To work toward that aim we will study the abstract data structures and algorithms that are widely-known to be "good" for common programming problems.

To understand what makes one data structure or algorithm good for performing a given task, and another not as good, it is necessary that we know how to analyze the potential efficiency of an algorithm. Therefore, analysis of algorithms is a course objective too.

It is also quite important that you take on and complete challenging programming assignments -- ones that require you to bring to bear considerable organizational and problem-solving skill. Among other things, this will demand that you be proficient using our Unix computers and campus network.

Finally, it must be said that "surviving" this course is an important objective for computer science majors! Passing CS 3100 is a big milestone on the road to acquiring a CS degree. What you learn here will be applied in many other CS courses.


  • Carrano: Data Abstraction and Problem Solving with C++: walls and mirrors (5th edition); writen by Frank M. Carrano; published by Pearson/Addison Wesley/Prentice-Hall; ISBN-10: 0321433327, ISBN-13: 9780321433329. (The 4th edition would be OK too.)


    Peek, Todino, & Strang: Learning the Unix Operating System, Fifth Edition; written by Jerry Peek, Grace Todino, and John Strang; published by O'Reilly Media; ISBN 10: 0-596-00261-0, ISBN-13: 978-0-596-00261-9.


    You should also consider getting a more comprehensive Unix book. Here are a few possibilities: COURSE COVERAGE:

    We will carefully work through most of chapters 5, and 8-13: recursion, advanced C++ topics, algorithm efficiency and sorting, trees, tables and priority queues, advanced implementation of tables, and graphs.

    See the schedule for weekly reading assignments.


    Each class session will be some mixture of laboratory and lecture activities. Mainly the purpose of class sessions is twofold: to help students absorb the readings and related material, and to help them complete the programming assignments.

    Students are responsible for working on programming assignments outside of class time. Doing the assignments can fill up a lot of hours. To keep the pace, you will need to "work smart." In any case, expect to spend up to ten hours per week on this class, in addition to class time.

    My expectation is that everyone will attend all the class sessions and keep current with everything that is happening in class. I will keep track of attendance.


    Your course grade will be based on two components: There will be three quizzes, five programming assignments, and a comprehensive final examination.

    To pass the course you must: If you meet the requirements above, I will compute your Course Grade by giving a weight of 60% to your Test Component Score, and a weight of 40% to your Average Program Score. In other words:

    Course Grade = (0.60)(Test Component Score) + (0.40)(Average Program Score)

    To compute your Test Component Score, I will first compute your Quiz Average and your Final Exam Score. I will then compute the MAXIMUM and MINIMUM of your Quiz Average and Final Exam Score. Your Test Component Score will be:

    Test Component Score = (0.70)(MAXIMUM) + (0.30)(MINIMUM)

    This way, if your performance on the quizzes and final exam differ, I will give much more weight to what you did better.


    There will be no make-up, early or late quizzes.

    Get started early on assignments. That way, if you run into difficulty, you can seek help in class and/or office hours in a timely fashion.

    I will assess a late penalty of 10% credit per calendar day (including holidays and weekends) on programming assignments turned in between one and five days late. I will not accept programming assignments late more than 5 days.

    We can have class discussions about test dates and program due dates. I may be willing to change some of these dates. If you want a change in the schedule, please bring this up (in class, preferably) as soon as possible, and not at the last minute. (It's usually a good idea for class members to try to work out some consensus before bringing the subject up with me.)

    If you cannot finish a programming assignment on time, please turn in whatever you have done. It may be possible to get up to about half credit on an unfinished program, depending on the quality of the work and the circumstances.

    To "survive" in a class like this, you may need to put aside "foolish pride," stubbornness, and/or shyness. If you find yourself unable to make progress on some aspect of an assignment, seek help from me promptly. You may speak to me after class or during my office hours. You may send me a message by e-mail. You are entitled to get help this way. Please don't subvert your chances of success by continuing to "spin your wheels".

    Please understand that if you fail to turn in any one of the assigned programs by the fifth day after the due date, you fail CS 3100. I will not make exceptions to this rule.


    I will require you to design each program using a top-down design methodology, modular data structures, and information hiding. You will use the top-down method to design the instructions of your program, the data structures, the documentation, and the test data. A programmer using the top-down method develops the program level-by-level. The programmer starts with a very simple first-level program design, and works down, step-by-step, to more detailed levels.

    I will sometimes require you to turn in two or three levels of your programming assignments so that I can check your progress in creating your top-down design. If so I will assign some fraction of the total credit for the program to each level. For example there might be a scheme like this:
     01%     level two program
     01%     level three program
     06%     final version of program
     08%     total credit for the program

    Our text is C++ oriented, and I will present most code samples in C++. If you want to do a programming assignment in a different computer language, basically I am willing to accept that, but you must speak with me in advance and reach an agreement on some ground rules.


    College is not for everybody. College demands that the student learn actively and independently.

    Naturally college makes demands of the instructor too. I want you to get as much as possible out of this course. I hope to be accessible and helpful to you.

    I expect all class members to participate in the class and to be well-informed about what is going on in class. I will keep track of attendance.

    Read and study everything I assign as soon as possible. Read difficult material more than once! Attend all classes. Pay close attention. Take notes to help you think about things and remember things. Review your notes before each class. Get started on programming assignments early. Do a little of the work each day so that you remain familiar with the project and the work never piles up. Bring your questions and problems concerning assignments to class each day.

    Finish assignments and reading on time. Do what you can to keep class discussion lively and to the point. Reply to questions. Ask questions and make remarks if you feel you have something to add or if you want me to explain something better.

    RESPONSIBILITY FOR YOUR OWN WORK - what is and is not cheating:

    Sometimes it can be difficult for the student to figure out the difference between 'cheating' and 'working smart.' Here is some guidance:

    Programming Assignments: When your purpose is to clarify the meaning of program specifications, you may discuss programming assignments with other people, including your classmates, as much as you like. You may also freely discuss the relative merits of various general approaches to designing and engineering solutions to a programming assignment.

    You are permitted to use algorithms or segments of code from
    1. any printed material available for student check-out in our library,
    2. our course text, or
    3. any programming textbooks to which you have access.
    You are permitted to share such material, as described in 1-3 above, with other members of this class.

    You may ask me for help and hints on assignments. I prefer that you ask questions in class, so that everyone has a chance to benefit from the discussion.

    On the other hand,
    • You must not give or accept any other kind of help.

    • You may not allow any part of a solution you compose (make up) for an assignment to be communicated to another member of the class or allow such material to be communicated to you.

    • A corollary to the point above is that one member of the class may not look at the program code of another member of the class, whether on paper or on a computer screen.
    Tests: You must write your tests with no discussion or help from anyone. The one exception is that you are allowed to come forward and ask me to clarify the meaning of a test question, if you wish. It will be up to me to decide how to answer, or whether to answer at all. I will tell the class any new information that arises from such an exchange.

    Penalties: If there is compelling evidence that an assignment or test was not done according to the above criteria, I will withhold credit.


    I will make course documents, assignments, supplements, and so on available on the world wide web. To access the on-line CS 3100 materials, you can open the URL:


    There is also a miscellaneous collection of information that you may want to use from time to time. It is located here:



    Each of you is supposed to have an account that gives you access to all the Computer Science Department Lab computers. Many or most of the computers have one network file system, so you get the same home directory, regardless of which one you log on to.

    If you don't seem to have access to these machines, then let me know right away, preferably by filling out and submitting this form.

    Otherwise send me an e-mail or give me a piece of paper containing the answers to the questions on the form.

    We'll have a special lab session to teach you what you need to know in order to use the lab computers for class assignments.

    The Computer Science Lab: P-288. P-288 is in the Professional Schools Building (aka Demergasso-Bava Hall), in the extreme northwest corner of the north wing.

    I will test the programs that you write for this course by compiling and executing them on a Sun Ultra. Therefore you must write programs that will compile and run without errors on these machines. If you are accustomed to a different computing environment, you will have to be careful about this.

    Generally, CS Department workstations are available for access and use on a 24-hour basis. However campus computer labs do not remain open at all hours. Therefore sometimes network and modem connections are the only means available for connecting to a workstation. For more information about network and modem connections, see the sections below entitled "MODEM CONNECTIONS" and "INTERNET CONNECTIONS". Also see the course document entitled loginDirections.

    P-288 will be open basically mid-morning until about 5:00 p.m.. During these times, you can be physically present in the CS Department Lab while using a department computer. This can be very beneficial because you then have the opportunity to work and communicate with fellow students and members of the staff and faculty.

    Due to budgetary constraints beyond our control, the hours during which P-288 is open are subject to change on short notice. Please check the postings of the lab hours at the entrance to the lab, in the "message of the day" that is printed on your screen when you log on to your Sun Ultra account, or check on the web.

    Incidentally, the CS Department often seeks volunteers and work-study students to help keep the lab open longer hours. For further information, ask our system administrator, Julie Gorman: P-288C, (209) 667-3273, julie@cs.csustan.edu .

    While you are in the CS Lab, you will be able to access Sun Ultra workstations by logging in directly at the console, or by using ssh or telnet from some other kind of computer in the lab, such as an iMac or a "Wintel".

    Ssh and telnet make it possible for many people to use a given workstation simultaneously. If somebody asks I can do a demonstration of how to get an ssh connection. (You can probably get help just by asking someone in the lab.) You can also access the Sun Ultra's via an ssh connection from most any computer on the campus local network, such as those in P-106, P-120, L-125, and L-145. Generally those labs are open during the same hours that the campus library is open. Please check postings at the labs or ask lab personnel in order to get further information about lab hours. Lab assistants (wearing red vests) should be able to show you how to ssh to a CS Department workstation.


    You may want to purchase Internet connectivity. This is not a requirement and not necessary for success, but it can be a great time-saver and a convenience once you have gotten past the hurdle of setting everything up.

    There are several Internet service providers (ISP's) that serve this area. Chances are that members of the class can make good recommendations. We can devote some time to this topic in class.

    One can find many ISP's by using the site: http://thelist.internet.com. ISP's also advertise in the yellow pages and in newspapers.

    If you get an Internet connection, make sure you get remote login and file transfer software. This will allow you to log in from home to your computer account at the college and also transfer files back and forth. For more information about this, read the remote login and file transfer help sheet. For additional information, ask me or the CS Lab Administrator, Julie Gorman.