For those students interested, I have posted the final exam marking scheme so that you can understand your grade.
You may pick up the graded Project 4 from the Computer Science Student Union.
All grades for the class are now posted. I have posted both the raw score and the adjusted score for each assignment. The adjusted scores will then be used to calculate your final grade based on the grading scheme presented at the beginning of class. All adjusted scores are unofficial.
A note on the adjustments. Homework 0 and Project 1 were heavily adjusted to account for the rather severe grading on those assignments, especially Project 1. Because a large number of students were heavily docked for indentation errors in Project 2 and Project 3 and rather than considering each student's assignment individually, I added 3 points to everyone's score for those assignments.
Some students may notice that their adjusted grade for Homework 0, and to a lesser extent for Project 1, is lower than their raw score. This is because I discovered, after I sent you your adjusted pre-drop day grade, that my adjustment scheme was not legal at the university. As a result, I had to change the adjustment, and I chose a new adjustment scheme which is fair to every student. Although your mark for one assignment may have decreased, if you compute your total adjusted grade for the midterm and first two assignments, your grade will be the same as or slightly higher than the grade I emailed you before the drop date. There are a few cases where the new adjusted grade is slightly lower, but in each of these cases the difference is too small to affect the final mark.
The extra credits are listed out of 1 point. Each extra credit counts 3% to your final mark.
All grades are posted for Homework 0 through Project 3 including all extra credit problems. These grades include any regrade requests which were submitted before the deadline. Please verify that your scores are correct. All unclaimed classwork and the regraded projects have been delivered to the Computer Science Student Union. You may retrieve them there. The extra credit scores are out of 10.
Your last chance to get your graded coursework from me is during the office hour on Tuesday, August 14. After that time, you may retrieve your graded coursework (including the final exam and project 4) from the Computer Science Student Union.
All regrade requests must be submitted by 5 p.m. on Thursday, August 16.
I will be holding two office hours before the final.
Remember to electronically submit your makefile as well as your source code. Without the makefile, the automatic scripts will be unable to compile your code.
A student informed me that the source probabilities for the larger map did not add up to 1. So, here is the same map with the source probabilities corrected. city map
Several students have run into the problem of compiling on the CDF Linux machines. This is because the object files I provided for you were compiled on Unix. Because a large number of you are working on Linux, I have created Linux object files on CDF in the directory ~hsc/classes/270/lib/Linux . I have also created a new makefile. ~/hsc/classes/270/makefiles/Makefile.linux This new makefile will work on both Unix and Linux machines, and you should use this makefile if your are going to be working on Linux. This makefile detects the system on which you are working and uses the proper object files. It is important that you use this makefile because all the testing of your submitted code will be on the Unix machine eddie.
Here is the larger map for your simulator. I also made a sketch of the map. With the new map, try running with 3000 cars. You should notice a lot of delays.
Here is an additional guide to to using makefiles for the last project. In addition, there is a link on the "Useful Links" page to GNUmake. This link provides much more information than you actually need to do the project.
Some students have had trouble using the makefile downloaded from the webpage. The problem is that some downloads may covert each tab in the makefile to 8 spaces, and the tab is required for the makefile to work. To fix this problem, I have placed copies of the makefiles on CDF in the directory ~hsc/classes/270/makefiles. The file Makefile is the makefile provided on the problem page, and the file Makefile.libs is the makefile for the case where you are using my object files. Note that you should change the name of this file to Makefile after copying it to your directory.
If you were unable to implement some of the modules for previous projects which are now needed in Project 4, the object files and include files implementing those modules are available. The files are on CDF in the directory: ~hsc/classes/270/lib. These objects are only implemented for CDF. I am sorry, but I cannot compile any code for your systems at home. Here is a makefile which will let you use the provided include files and objects without copying them to your directory. It may be useful to notice the differences between this makefile and the one provided with the project description.
Some students have noticed some typos in Project 4, and I have fixed most of these. Please download the code again to get a version with fewer errors. My thanks to the students who have discovered the errors.
I noticed a few errors in my lecture on probability distributions last week. I post a correction here.
Project 4 is available here. It is due at 6 p.m. on Thursday, August 9. Please note that unlike other projects, you do not have until the following Monday to submit the project. I will not accept anything submitted after 5 p.m. on Friday, August 10. The reason for the strict deadline is that your final is the following Tuesday. Because the project is only worth 10% but the final is worth 40%, I want you to have the weekend to prepare for this final and any other exams you may have.
The Faculty of Arts and Science has posted the time and location for our final exam. The exam will be Tuesday, August 14 from 7-10 pm in the Upper Small Gymnasium of the Benson Building, 320 Huron Street.
Several students asked if they could add additional files to project 3, problem 2. I have created another submission directory, A3-extra. If you have extra files for the project which must be compiled for problem 2 and the extra credit, submit the files to A3-extra. You must still submit the files requested to A3.
In project 3, I suggested that you could make your queue a little nicer by using a template so that the queue will work with any datatype, not just int.
Because templates are implemented in the compiler, the way you split a template across multiple files is to use the export modifier. However, I recently discovered that export is not implemented in g++. Therefore in order to use a template, you would have to place all the code in one file, or you must place all the class code inside the header file.
I do not want you to do either of these solutions. Placing your code in one file will cause us to lose all the benefits of abstracting the datatype. Also, if you include the class functions in your header file, you will not be able to use the queue.h header in multiple source files of your executable. If you do, you will be redefining the class functions - a compiler error.
So, do not use templates for project 3. You can still generalize the queue to work on more than int by having the queue hold void *. Now, for each item that you wish to place on the queue, you can allocate space for the item and call insert with the address to the allocated memory.
This is a reminder that the final day to drop the course is this Sunday. To help you decide whether to stay with the course, I have emailed, to your CDF account, your current adjusted class grade.
Project 3 is available here. It is due at 6 p.m. on Thursday, July 26.
For those who have been unable to solve problem 2, here is a hint.
Try playing the following game: 3 sticks and legal moves 1 and 2. Do you want to go first or second? Why?
Now, consider the following game: 5 sticks and legal moves 1 and 2. Do you want to go first or second? After a bit of thought you realize that you want to go first because once by taking 2 sticks we are left with 3, and you know the result for 3 because you previously figured it out. So, if we know the result for 3, we can store it and use it to figure out whether we will win or lose for numbers larger than 3.
Remember the essence of dynamic programming. We store values in a table and use those saved values to calculate the next value in the table.
This should give you enough to solve the problem. Remember that you will only lose 10% if you submit the solution by 5pm Friday, but it will be -25% if it takes you to Monday.
The midterm marks are now posted. I was unable to write comments on most of the midterms, so please refer to the marking scheme so that you can understand your grade.
Here is the new TA office hour schedule:
Project 2 is available here. It is due at 6 p.m. on Thursday, July 12.
The day section will have the midterm at 1 p.m. in SS1069. The evening section will have the midterm at 6 p.m. is SF1101.
Many students have asked me for sample midterms. I do not have any. If you find some old midterms, you are free to use them as a study aid, but be warned that I did not write them. Also, if you find a web site that has old midterms, please post the URL to the newsgroup so all the students may benefit.
You are responsible for all material that we have covered. This includes all lectures, readings, tutorials, examples and homeworks. The only exception is some of the examples in the assigned reading for floating point numbers. These examples used more advanced calculus than I will be testing you on.
As a study aid, I will give you this advice which is applicable to every class you will take. When reviewing the material, ask yourself these questions. What are the main topics we have covered? What are the most important points from each topic? What areas did I spend a lot of time on or emphasize in my lectures? If you were the instructor, what type of questions would you ask?
Finally, be certain to get plenty of sleep the night before the exam. I am very interested in how you can apply the material that you know, not in whether you can recite the lecture notes. You will think better if you are well rested.
Here is the solution for Homework 0.
There still seems to be a lot of confusion concerning problem 2 on Project 1. I want you to handle all possible cases for addition and subtraction. The point of the notation is that you don't have to write a separate routine for all 8 cases because you can think of subtraction as being addition in which the sign of the second number is flipped. Thus you are either adding two numbers of the same sign (an operation we call addition which you are to implement in floating_add) or you are adding two numbers of opposite sign (an operation we call subtraction which you are to implement in floating_sub). Once you have written the 2 routines, you can handle all addition and subtraction cases by looking at the operation and the signs of the operands, possibly modifying the numbers, and determining which routine to call. I apologize for any confusion my description may have caused.
There were 2 small typos in the description of Project 1. In the description of derivative_of_poly(), it should read, "P_prime[n-2] will hold the leading coefficient of the derivative." The original stated "Q[n-2]" instead of "P_prime[n-2]". The second typo is in the code for factorpoly.c. I replaced "abs" with "abs_value" to avoid a naming conflict with the C utility abs() in stdlib.h.
I wish to make a clarification on some points from the lecture this week. In attempting to simplify the material, I made a few incorrect generalizations. I post the clarification here.
Project 1 is available here. It is due at 6 p.m. on Thursday, June 21.
I have updated the rules for how to submit for our class. Please find the link on the assignments page.
I have placed a guide to debugging your code online. Please find the link on the assignments page.
I have placed the examples that we have used in class online. Please follow the links for "Lecture Outline and Examples". I will update this directory as frequently as I can, but you should still use the CDF directory for the latest examples.
There will be a second session of the CSSU UNIX seminar for evening students. The seminar will be held Wednesday May 30 at 5 p.m. in EA 201. If you are new to UNIX, please try to attend one of the seminars.
We will have a TA office hour every Wednesday from 7 - 9 p.m. in SF2303D. You should use the TA's primarily to assist you with coding in C or C++.
Student accounts of CDF have been created for those students who were late registrants. Please check here for your account.
Look here for your tutorial assignment. The first tutorial is Thursday, May 24.
Homework 0 is available here. It is due at 6 p.m. on Thursday, June 7.
The Computer Science Student Union is holding a UNIX seminar Tuesday May 29 at 3 p.m. in EA 201. This will be a good time to get to understand the UNIX environment. There will probably be another seminar in the evening for the night students.
According to the registrar's webpage, this Tuesday, May 22, is the last day in which you can register for a summer course. If you are not registered for 270 by this day you will not be allowed to take the course. Unfortunately, there are no exceptions.
Starting May 24, the evening session lecture will be from 6-8pm with the tutorials following at 8pm.
Important: The May 17th class will meet from 7-9pm as was originally scheduled. There is no tutorial May 17th.
Click here to go back to the menu, if your browser does not support frames.