Introduction to Algorithms and Programming I
Total Page:16
File Type:pdf, Size:1020Kb
U N I V E R S I T Y O F W I N D S O R SCHOOL OF COMPUTER SCIENCE 03-60-140-01 Winter 2009 Introduction to Algorithms and Programming I Course Outline
INSTRUCTOR: Dr. Robert D. Kent Email: [email protected] (Preferred mode of communication) Office: 5100 Lambton Tower Phone: 519-253-3000 ext. 2993 (Email preferred) Office Hours: Tuesday & Thursday 11:00am – 2:00pm (subject to cancellation without notice)
Note: Only email originating from a valid University of Windsor student account will be accepted from students wishing to contact the instructor. Please include your full name and student ID in your correspondence.
LABORATORY Ritu Chaturvedi [email protected] INSTRUCTOR
GRADUATE TEACHING Luo, Fangyun [email protected] ASSISTANTS: Wang, Zhuo [email protected] Soleimani, Ahmad [email protected] Mabroukeh, Nizar [email protected]
PRE-REQUISITES: This is an introductory level course with no pre-requisites and is required for all programs leading to a degree in Computer Science (including combined degrees). This course may be required by certain other programs. Students who have taken courses in Computer Science in secondary school, college or university may find some material to be review; however, students are strongly advised that the required depth and breadth of coverage of topics in this course, as well as the expectations of required performance in labs, assignments and examinations may be very challenging in comparison with other courses.
LECTURES: Monday and Wednesday, 11:30am – 12:50pm – ER 3123
LABS: You must register in the following sections – do not attend lab section 55 as it operates on a completely different schedule.
Section 51 – Monday 1:00pm – 2:20pm West Library 305 Section 52 – Wednesday 1:00pm – 2:20pm West Library 305 Section 53 – Monday 2:30pm – 3:50pm West Library 305
NOTE: Laboratory attendance is mandatory. Labs start on Monday, January 12, 2009. You must have a working student computer account in order to access laboratory computers. You can obtain a UWINID account from the Computer Centre or call ITS ext. 4440. Any questions relating to laboratory should be addressed directly with Dr. Kent or your lab instructor.
COURSE DESCRIPTION: This course is the first of a two-course sequence designed to introduce students to algorithm design and programming in a high-level language such as C. The main objectives of the course are to develop the ability to identify, understand and design solutions to a wide variety of problems. Topics include: computer system overview, hardware and software, problem solving steps, concepts of variables, constants, data types, algorithmic structure, sequential logic, decisions, loops, modular programming, one-dimensional arrays, text files. If possible, problems like searching/sorting will be addressed. (from UofWindsor Calendar)
th REQUIRED TEXTBOOK: Deitel, H.M. and Deitel P.J. C How To Program, 5 Edition. Prentice-Hall: New Jersey.
The textbook selected may be used in other courses (eg. 60-141), but this is not guaranteed. The material to be covered will consist primarily of Chapters 1-6. Additional selected topics may focus on specific subsections of Chapters 7-9, 11, 13-14 and 16. Compulsory reading assignments will be emphasized throughout the course and students are expected to commit to self-directed learning using the textbook and online documentation.
Earlier editions of the above text may be used for reference and study purposes, but all lecture references to material in the text will be made using the edition above.
Other reading text for additional reference: (Not Required) Hanly, Jeri R. and Elliot B. Koffman, Problem Solving and Program Design in C, Addison Wesley Longman.
Students may choose to acquire another textbook that covers C programming and algorithms in a thorough manner. However, all reading assignments will be from the stated required textbook. Other textbooks will not be supported or referenced by the instructor.
SUPPLEMENTS: A Course website has been established at the URL: http://cs.uwindsor.ca/60-140/. Check it frequently for announcements and other useful info. The course website is used to provide access to assignments, laboratory exercises, solutions and student grades. The website materials are not intended to replace the lectures. Students must attend lectures regularly to maximize opportunities for learning and academic success.
GRADING SCHEME: A+ ≥ 93 ; A ≥ 86 ; A- ≥ 80 ; B+ ≥ 77 ; B ≥ 73 ; B- ≥ 70 ; C+ ≥ 67 ; C ≥ 63 ; C- ≥ 60 D+ ≥ 57 ; D ≥ 53 ; D- ≥ 50 ; F ≥ 35 ; F- < 35
NOTE: Students earn marks based on performance of stipulated evaluation components listed below. Testing involves both objective and subjective assessment and the entire process of marking is overseen by the course Instructor. Adjustments to marks may be done for the entire class only, based on the discretion of the instructor, the School of Computer Science and the Dean of Science, and only by a constant additive correction to all class marks. Arbitrary adjustments of individual student marks are prohibited under University Bylaws. Thus, marks which are marginally below a grade level boundary may not be arbitrarily adjusted to a higher grade (eg. a mark of 79.9 is a B+ and NOT an A-). All students should understand clearly that university education is a training ground for future professionals and that certain absolute standards of performance are demanded for success – grades are not subject to negotiation, nor are they necessarily based on relative standing within the class; hence, it is possible that the student with the highest mark may not attain a grade of A+ (or even lower grades).
COURSE EVALUATION: 17% Midterm #1 (Wed., February 25, 2009 – in class – 75 minutes) 17% Midterm #2 (Monday, March 16, 2009 – in class – 75 minutes) 45% Final Exam (Friday, Apr 17, 2009 12:00pm – 3:00pm. Location TBA by Instructor) 10% Laboratory (Mandatory Attendance, to include: Lab Exercises, Quizzes and Lab Exams), all labs are equally weighted. 10% Assignments, weights equally distributed. 1% Lecture attendance and participation (in class, up to 3 randomly selected classes by the instructor without prior notice, and/or up to 3 unannounced Quizzes)
NOTE: Consistent with University Senate Bylaws, no required (ie. marked) work will be assigned to students during the last 1 week of semester lectures, nor will any assigned work come due for submission during this same period. Regular lectures will continue during this last week.
Course Schedule: Week Topic* Assigned Reading (*The instructor reserves the right to change the outline to accommodate student pace and understanding of the subject matter) 1 - 2 Computer system overview: hardware and software, operating Chapters 1, 2, 3.1-3.4 systems, editors and compilers, programs, programming (plus 13.2-13.2, 14.1- paradigms and languages, the Internet and World Wide Web. 14.2) Problem Solving basics: Introduction to the C language, basic program examples from coding with an editor to compilation and execution, debugging techniques. Logic and Algorithms in problem solving. Memory and CPU concepts. Syntax, grammar and punctuation.
Structured Problem Solving: Pseudo-code, Flowcharts, Modularization, Top-Down versus Bottom-Up design principles, concepts of function, control structures and computability. Labs Begin – Monday, January 12, 2009.
3 - 4 Programming in the C language. Concepts and concrete Chapters 3-4 examples of variables, constants, data types, expressions and (plus 7.1-7.4) statements. Algorithmic structure. Arithmetic and Logic operations. Sequential Logic. Decision (selection) control structures (if). Non-sequential Logic. Repetition control structures (loops). Simple, standard input and output. Concept of address pointer.
5 - 6 More advanced coverage of: Arithmetic and Logic operations. Chapters 3-4 Decision (selection) control structures (switch). Repetition (plus 8.1, 8.5, 9.1- control structures (for). Non-sequential break and continue. 9.6) Nested structures. Formatted standard input and output. Concept of string.
STUDY/READING WEEK - February 16-20, 2009
7 - 8 Functions in C. Library functions. User-defined functions: Chapter 5 prototypes, definitions, referencing and invocation, concept of stacks, scope and storage classes.
MIDTERM 1: Wednesday, February 25 In lecture.
9 - 10 Functions and Recursion. Passing data between calling and Chapters 5-6 called functions. Introduction to one-dimensional arrays in C. Related arrays. Sequential searching.
MIDTERM 2: Monday, March 16. In lecture.
March 13 - Last day to voluntarily withdraw from Winter term courses.
11 - 12 Fundamental algorithms: Searching and sorting. Concept of Chapter 6 algorithmic complexity. (plus 16.1-16.2) Review.
Friday, FINAL EXAMINATION Apr 17 12:00pm – Location TBA by Registrar 3:00pm
Self-Directed Study: Some material may be assigned for self-directed study and must be read and studied by the student. This material will not be formally discussed in the lectures, except as required.
The Student Evaluation of Teaching (SET) will be conducted during the last week of class.
Students are advised that the topics described above are tentative and that the material and/or depth and order of presentation are subject to change at the discretion of the instructor and student pace.
IMPORTANT NOTE: Students are advised that courses may be taken only twice to obtain credit. If a passing grade is not obtained upon the second attempt in any required course, students will normally be required to withdraw from the program of study. Approval to take a course more than twice may be granted only by the Dean of Science.
Notes to Students:
. This is a challenging course! Although the material presented is introductory, the pace of learning and workload required is highly compressed within a 6 week course offering. Students must not underestimate the time and effort required. Students who fall behind in the course are generally advised to drop the course voluntarily, rather than suffer a poor or failing grade. NOTE: The last date to drop this course voluntarily is Friday, March 13, 2009.
. Attendance and student participation are essential to succeed in this course. You are encouraged to ask questions. This course assumes the student will allocate a significant amount of independent study and time spent on coding programs in C. You are strongly encouraged to ensure that sufficient time for independent study is allocated in order to succeed in this course. . Students must learn to work independently. Although working in groups will likely enhance learning opportunities for all students, it is vital to appreciate and understand that each student must be individually responsible for accepting and responding to the challenges of each course. This course has both theoretical and practical (applied) concepts and techniques. Logic is a fundamental mathematical formalism that finds a vital place in programming and algorithm design and an important part of learning to program (ie. apply logic) is to simply program – a lot, and for a lot of problems. Study programs supplied in the textbook (and other online resources) as examples of good programming practices. . A website is setup for the course. This should be regarded as a complementary source of information and not as a primary reference. It is the responsibility of the student to attend classes and keep up with the latest course contents and announcements. Note that the website is not guaranteed to be up- to-date or accurate. Any student who relies solely on the website information, contrary to this warning notification, may place him/herself in academic jeopardy. URL: http://cs.uwindsor.ca/60-140/ . Students are encouraged to keep class notes in good order, repeat the examples demonstrated in class, and ask questions. Solving exercises on your own and participating in class are very important to succeed. Students must learn to be methodical, self-critical, highly disciplined, patient, innovative and scientific – not in any particular order, but eventually possess all of these qualities in their work. . Assignments and projects are expected to be completed on the assigned due date and time. LATE ASSIGNMENTS ARE NOT ACCEPTED. You must allocate enough time to complete the assignments; start early and report difficulties to the instructor. UNDOCUMENTED (or insufficiently documented) CODE WILL NOT BE GRADED and will receive a mark of zero. Failure to submit the work in the correct format will be penalized. (i.e. incorrect email subject or unreadable/missing file attachments as instructed, etc…). . Fully test all programs before submitting them for formal evaluation. Testing must be performed on the campus computers to ensure required compatibility with submission requirements. Programs that fail to satisfy all stated requirements may be heavily penalized. Students who are unable to work independently to complete programming assignments and/or laboratory requirements are strongly advised to drop the course voluntarily as there is a very strong relationship between assignments and laboratory work and examination performance. . THERE IS NO MAKE-UP EXAM FOR MIDTERMS. Missing an exam will greatly affect your grade since exams carry a lot of weight. In the case of illness or serious and unavoidable reason (as per the Senate Bylaws), please consult with the instructor in advance, if possible, to make alternate arrangements. You must formally inform the instructor in writing and present proper supporting documents (stating that the student was unable to attend the exam at the specified time and date) within a week from the midterm or earlier to be verified. If the reason is deemed valid, the weight of the midterm will be added to the weight of the final exam. (i.e. the final exam’s weight will increase to include the missed midterm weight). All students are required to write and PASS the final exam in order to pass the course. . NO MAKE-UP FINAL EXAMINATION. Students who miss the Final Examination due to valid reasons will normally be required to write the Final Examination in the next semester the course is offered (eg. Summer, or Fall 2009). Keep in mind that non-completion of a pre-requisite course will prevent students from progressing in their program of study. . You will need access to a C compiler and a university email account. You need a UNIX (UWinID) student account (from ITS x4440 or [email protected] for support). Programs may be developed and tested using the Computer Science server machines and all programs submitted for marking MUST run on these Computer Science machines. Do not use proprietary MS Windows compatible C compilers and editors as they do not generate ANSI compatible source files, in general. Linux based machine configurations should be able to use standard GNU compilers and editors. Note that adequate computing resources are provided for all students – students are not required, nor are they expected, to own their own computers or to have remote access to campus computing resources; however, the vast majority of students who do own computers and have remote access may benefit from working at home. . PLAGIARISM: Should the instructor or grader find a reason for suspicion – or just cause – in plagiarized student work (assignment, lab or test), the work in question will not be graded and the student(s) may have to answer to the department’s Director and the Dean of Science. Refer to the University’s policy on Plagiarism in the Senate Bylaws. This issue is taken extremely seriously and students who are found guilty of plagiarism may suffer considerable short and long term negative effects. . Students who submit semantically equivalent assignments [or labs] (in other words, the same thing to within trivial modifications) will receive a grade of zero on ALL such assignments [or labs]. . All students should keep the instructor informed about their difficulties with the course. To the extent possible, students should contact the instructor outlining their problems with the course. Most consultations will be by e-mail or in person. Special tutoring may be provided for students, outside the consulting resources provided specifically for this course. . What you learn today, you must practice at for tomorrow! This course is a vital pre-requisite for other courses – some in the next semester (eg. 60-141) and others in Years 2, 3 or 4. Pre-requisite does not just refer to Calendar course regulations; it really means retaining a core basis of understanding and competency over time (ie. don`t forget what you`ve learned, just because you haven`t had a course recently).
On Accepting Responsibility Students must adapt to the severe change in responsibility that occurs in the University setting versus the High School setting. Each student is responsible for ensuring that a good study schedule is developed and adhered to, that all assignment deadlines are met, that all course requirements are fulfilled and that excuses are not accepted (except for medical or some few personal reasons, such as death in the family). Lectures are a necessary part of the learning process, but they are not the whole story – each student must accept responsibility for extensive reading and study beyond the lecture material. One of the most important lessons to be learned from a successful program of study at University is the ability to self- direct learning. At some point your formal education will be completed and then your informal and continuing education proceeds throughout the rest of your career (and life). Learn how to use Library facilities in addition to exploring the Web. Be forewarned that websites cannot be guaranteed to contain factual and accurate information. Be advised that unless you are able to tackle and solve a problem completely by yourself, you do not understand what you must to be called a professional, or expert. In order to learn how to solve problems you must actually solve problems. For simple example problems it may be possible to find working solutions in books and on the Internet, but these are few in number and often contain errors or are incomplete. The student who spends time looking for the solution in order to copy it is not only guilty of plagiarism, but is also more profoundly guilty of avoiding the directly responsibility to themselves of establishing their professional expertise that will lead to excellent and long-term career prospects.
TIP: To succeed in this course you need to PRACTICE! Allocate a minimum of 6 to 10 hours a week on reading and code development!
Characteristics of a University of Windsor Graduate A University of Windsor graduate will have the ability to demonstrate:
A. the acquisition, application and integration of knowledge B. research skills, including the ability to define problems and access, retrieve and evaluate information (information literacy) C. critical thinking and problem-solving skills D. literacy and numeracy skills E. responsible behaviour to self, others and society F. interpersonal and communications skills G. teamwork, and personal and group leadership skills H. creativity and aesthetic appreciation I. the ability and desire for continuous learning
The list above has been established by the University of Windsor as general characteristics. Students should understand that education and personal development result from the mutual investment of time and effort spent by both student and the instructional team. Without the full participation of all partners learning is less effective, so motivate yourself to do your best at all times.
Late Assignment Penalty Waiver/Bonus Coupon Usage: This coupon is primarily intended to provide the student extra time to complete an assignment properly if the need arises for whatever reason. Use this coupon if you feel you are unable to submit the assignment on time. It grants you to extend the original deadline by 72 hours without being penalized for late submission. If you successfully complete ALL assignments on time, and do not use this coupon for the purpose of time extension, then you may submit this coupon in person to the instructor on or before the last official lecture and earn 1% toward your cumulative total of the course mark. For late waiver, the student must notify the instructor and submit the coupon in person within 24 hours from the original assignment due date. If you submit the coupon for late waiver and do not submit the assignment, or submit it after 72 hours from the original due date, then you will lose the coupon value and your assignment will not be graded. Rules: Limit one per student. Not valid with any other offer. Coupon expires at the end of your last regular lecture. Non-negotiable, not redeemable for marks other than that specified above, not transferable. No late coupon submission is accepted once the offer expires. The instructor reserves the right to refuse or cancel this coupon offer at any time without notification. You must present this original coupon in person and in class before the end of the last lecture to the instructor. Copies or digital reproductions are not accepted.
PLEASE COMPLETE ALL FIELDS LEGIBLY
PRINT NAME: ______LECTURE SECTION: __ 01 __ LAB SECTION: __ __ Last name, First name
STUDENT ID: ______DATE: ______
CHECK ONE: WAIVE LATE PENALTY FOR ASSIGNMENT NUMBER: ______DUE: ______(This grants the student up to 72 hours to submit the assignment from the original due date/time without penalty. Submitting the assignment after the 72 hours grace period is considered late and will be penalized accordingly; not submitting the assignment void the coupon and as a result the coupon can no longer be used for “bonus” and the assignment mark will be zero. This coupon does not apply for labs.) or: CLAIM 1 BONUS POINT (Valid only if ALL assignments were successfully submitted on time)