TA: | Jade Cheng 成玉 (yucheng@hawaii.edu) | |
Instructor: | Nancy E. Reed, Ph.D. (nreed@hawaii.edu) | |
Course: | Algorithms, ICS 311 | |
TA Office: | POST Building Room 303-3 (cubicle 3) | |
TA Hours: | Tuesday | 10:45 am - 12:45 pm |
Thursday | 10:45 am - 12:45 pm | |
Or by appointment |
There are three components to your grade in this course — class participation, assignments, and exams. Participation is required (in class, office hours or via email), which includes discussions, questions and answers. There will be several written and programming assignments. An early submission bonus may be earned or late penalty assessed. The quizzes, midterm, and (cumulative) final examination cover the lectures, textbook, and assignments. Quizzes will be given on Wednesdays, without additional advance notice.
Class Participation — 10%
Written and Programming Assignments — 30%
Quizzes and Midterm — 10% and 20%
Final Exam — 30%
Please submit your homework assignments by 11:59 pm on the posted due date.
To facilitate the grading process, please try to follow the following guidelines when submitting assignments.
Assignments should be submitted via email using your UH UNIX email account. The TA will not accept any other form of submissions.
Assignments should be submitted to yucheng@hawaii.edu. Please do not send the assignments to the professor.
Please cc the email to youself. That way, if the TA doesn’t get your email for some reason, you have proof that it was sent.
Please use the following pattern for the subject of your email.
[311] homework number
For example: [311] homework 1
Please copy and paste the contents of the homework in the email body. That way, the TA will receive your work even if the attachment is rejected.
Plain text files are preferred. PDF, JPG, and PNG files are also accepted. Please do not send Microsoft Office documents.
Please use the following pattern for the name of your attachment.
FirstnameLastnmae#
For example for Assignment 1: ChengJade1
You may submit an assignment more than one time. Only the most recent assignment submitted will be evaluated.
Quizzes will be given on Wednesdays, without additional advance notice. The contents are previous covered course material. The quizzes take about 15 minutes.
The grades for homework assignments, programming projects, in-class quizzes, and the exams will be posted using the student codes provided by the TA. If you lose or forget your code, please contact the TA.
The solutions for in-class quizzes and examples implementations for programming projects will be posted in this section, along with the points discributions for each of them. Please refer to this site to correct your work. If you have further questions regarding the solutions or your scores, please don't hesitate to contact the TA.
In this section, I’ll list some of the more common questions and answers regarding the quizzes, assignments, and projects.
How important is commenting on the project?
We've all been asked to write code according to the ICS Java Coding Standard. I won't grade against it, but I will need to look into the code, and comments will help me, so I'd appreciate enough commenting to make the code understandable.
I tried to submit it through the unix submit program but I got an error message saying "not a regular file".
I got this message when I tried to submit a directory rather than a file, so try to submit individual files or a tarball.
Where can I download/install unix?
Every student has a unix account, so you don't need to download anything in order to use the script. Just log into uhunix.its.hawaii.edu using SSH on port 2222 and execute the script from there. If you're new to unix, you might want to check out the ITS documentation, especially the unix documents there: http://hawaii.edu/askus/639.
How should we put down the "Assignment number" in the submit script, since we have both assignments and programming projects
We will start the programming projects at 9 and count down. There will probably be just 2, so 9 and 8. Dr. Reed will put a note on the assignment messages pages.
I am trying to count the number of operations performed. Do we count every operation (i.e. conditional checks for if statements, variable assignments, etc.)?
In general, we count the inner most loop and the deepest method call. You don't need to count O(1) statements, but you do need to count the number of comparisons in a loop.
For example,
for (int i = 0; i < n; i++) { count++; // an O(1) statement count++; // an O(1) statement count++; // an O(1) statement }
Here, the count at the end of this loop is n * 3, which is O(n*3), which is 3 * O(n), which is O(n). So you can see, it doesn't make any difference to count O(1) statements like variable assignments. The example above could be written as the following, and it would make more sense:
for (int i = 0; i < n; i++) { count++; // an O(1) statement // an O(1) statement // an O(1) statement }
Is it okay if I change the iterations to bigger numbers and not linearly print them? For example I started running iterations every per 100 numbers.
You can for your testing, of course. But when you turn it in, please follow the assignment specifications. You should be able to see the curve even when you increase the problem size by one each iteration. You won't have to run many iterations in order to plot the curve.
Can you give me an example of what to count?
For example, the following code prints out the elements in "array" that are smaller than "value":
: int[] array = {1, 2, 3, 4, 5, 6, 7, 8, ..., n}; int value = 6; : for (int i = 0; i < n; i++) { if (array[i] < value) System.out.print(array[i]); } :
If we want to analyze the run-time of this piece of code, we can add a "count" to record the operations, which is linearly proportional to the number of comparisons:
: int[] array = {1, 2, 3, 4, 5, 6, 7, 8, ..., n}; int value = 6; int count = 0; : for (int i = 0; i < n; i++) { count++; if (array[i] < value) System.out.print(array[i]); } :
The run-time in this case is O(n), where n is the length of the array. For our sorting methods, we expect to obtain the time-complexities that were taught in class, O(n2) or O(n lg n).
About prgramming assingment. What should I put on the report? code and test of programming? Should I put on the graph, too?
The submission should include a Java console application (.java file) and a concise report (.pdf preferred). You don't have to turn in any testing code or file that you used.
I like to use JGrasp when programming with java, will it be any different from UH unix?
It's perfectly okay to work in any programming environment that you are comfortable with. I uploaded my code onto uh Unix to demonstrate the command line arguments and program output (standard output and text file output).