CS 435 : Handouts

Copyright by A. Gerbessiotis (2006-2013). All rights reserved.


B1. Programming Assignments and Exams


Problem sets with solutions are periodically posted in the protected area. You don't get credit for doing these problem sets!


Before you do anyone of the programming assignments, read Handout 2 below (Section B2b), and consider downloading the code of Section B4 if you plan to implement sorting algorithms in C++ or C. All programming assignments will be made available at the beginning of the semester. For due dates, please check the syllabus. C vs C++ prototyping. For the sorting functions the second and third argument of a sorting function being int might cause problems. You can also use size_t i.e. unsigned int instead to iron out compiler errors/complaints.

  1. Programming Assignment 1 in Adobe Acrobat PDF. (**** Jan 22, 2013 ****).
  2. Programming Assignment 2 in Adobe Acrobat PDF. (**** Jan 22, 2013 ****).
  3. Programming Assignment 3 in Adobe Acrobat PDF. (**** Jan 22, 2013 ****).

B2. Handouts

B2a. Syllabus and Course FAQ

  1. Handout 1 (Syllabus Information) Adobe Acrobat PDF. (**** Jan 4, 2013 ****)
  2. B2b. Other Course Handouts

  3. Handout 2 (Programming Guidelines) in Adobe Acrobat PDF. (**** Jan 4, 2013 ****)
  4. Handout 3 (Brief discrete math review) in Adobe Acrobat PDF. (amended) (**** Jan 4, 2013 ****)
  5. Handout 4 (Brief notes on asymptotic notation and recurrences) in Adobe Acrobat PDF. (**** Jan 4, 2013 ****)
  6. Handout 5 (Red-black tree operations) in Adobe Acrobat PDF. (**** Jan 4, 2013 ****)
  7. Handout 6 (Examples of Red-black tree operations) in Adobe Acrobat PDF. (**** Jan 4, 2013 ****)
  8. Formulae Collection in Adobe Acrobat PDF. (**** Jan 4, 2013 ****)

B3. Other Reference Material

You may find the following material useful, as far as the coverage of asymptotic growth of functions and recurrences are concerned.
  1. PDF version of Mathematics for Computer Science by A. R. Meyer. Mathematics for Computer Science
  2. Data Structures and Algorithms in Java by M. T. Goodrich and R. Tamassia, Wiley.
  3. Computer Algorithms: Introduction to Design and Analysis by Sara Baase and Allen Van Gelder, Addison Wesley.
  4. Data Structures and Algorithms with Object-Oriented Design Patterns in Java by B. Press, Wiley.

B4. Source code (original)

Source code cited in the programming exercises. The C++ version first:
  1. misc/Source/C++/testing.tar or misc/Source/C++/sortgC++.tar are one of the same and contain three individual files. On a UNIX system (eg. AFS or Linux) you untar say the testing.tar file by typing tar xvf testing.tar . On a PC one could use a file extraction/compression program such as WinZip to extract its contents. The tar file contains the following three files that can be retrieved independently as well. ATTENTION VISUAL C++ USERS In sortg.cc, you might have to replace INT_MAX by RAND_MAX and the function call to random() by a function call to rand() to make things work right. Note that AFS-based C++ compilers understand C++ files that have .cc suffixes. If you use Visual C++ you may have to use .cpp suffixes in filenames for things to work properly..
  2. misc/Source/C++/Makefile.
  3. misc/Source/C++/bubble.cc.
  4. misc/Source/C++/sortg.cc.
The C version is similar in structure.
  1. misc/Source/C/testing.tar or misc/Source/C/sortgC.tar are one of the same and contain three individual files. On a UNIX system (eg. AFS or Linux) you untar say the testing.tar file by typing tar xvf testing.tar . On a PC one could use a file extraction/compression program such as WinZip to extract its contents. The tar file contains the following three files that can be retrieved independently as well.
  2. misc/Source/C/Makefile.
  3. misc/Source/C/bubble.c.
  4. misc/Source/C/sortg.c.

B4 new. Source code (experimental, Feb 2, 2012)

This is an updated set of files that can be used for some of the programming assignments (usually option 1). But you must understand the code. It fixes some minor problems with the previous set (the standard B4) such as proper use of unsigned int over int in two of the parameters of bubble.c or bubble.cc. The C++ version first
  1. misc/Source/nC++/newsortgC++.tar contains three individual files. On a UNIX system (eg. AFS or Linux) you untar newsortgC++.tar by typing tar xvf newsortgC++.tar . On a PC one could use a file extraction/compression program such as WinZip to extract its contents. The tar file contains the following three files that can be retrieved independently as well. ATTENTION VISUAL C++ USERS In sortg.cc, you might have to replace INT_MAX by RAND_MAX and the function call to random() by a function call to rand() to make things work right. Note that AFS-based C++ compilers understand C++ files that have .cc suffixes. If you use Visual C++ you may have to use .cpp suffixes in filenames for things to work properly..
  2. misc/Source/nC++/Makefile.
  3. misc/Source/nC++/bubble.cc.
  4. misc/Source/nC++/sortg.cc.
The C version is similar in structure.
  1. misc/Source/nC/newsortgC.tar are one of the same and contain three individual files. On a UNIX system (eg. AFS or Linux) you untar say the newsortgC.tar file by typing tar xvf newsortgC.tar . On a PC one could use a file extraction/compression program such as WinZip to extract its contents. The tar file contains the following three files that can be retrieved independently as well.
  2. misc/Source/nC/Makefile.
  3. misc/Source/nC/bubble.c.
  4. misc/Source/nC/sortg.c.
For sortg.c or sortg.cc note the following changes. The command-line invocation requires now two arguments. The former is as before the problem size (number of input keys). The next argument is the input type: 1 is random integral velues in the range 0 to n or so, 2 is all keys are equal to 10, 3 an increasing sequence, 4 a decreasing sequence and 5 arbitrary random integral values. One can cause limit changes to the default data type by modifying the typedef line. The compare function needs to be modified then accordingly.

B5. Postscript and PDF viewers

You can download viewers for Postscript and PDF files through this link.

Last modified Tue Jan 22, 2013, 09:14