DATA STRUCTURES AND ALGORITHMS 

  CS 2C03  (Fall 2024)



* * * This outline is constantly updated. Students should consult this page regularly for all information relevant to this course * * *

Instructors

Dr. Jelle Hellings  (C01)
ITB/124, Mac address: jhellings
Office hours: Wed.
1:00 - 3:30 pm

Dr. George Karakostas  (C02)
ITB/218, ext 26132, Mac address: karakos
Office hours: Wed 4:00-6:00 pm


Course Assistance C01
Celine Sana (sanay@mac), Office hours: TBD

Mingzhe Wang (wangm235@mac), Office hours: TBD

Course Assistance C02
Nancy Kansal (kansan1@mac), Office hours: We 12:00-1:00 pm

Shivam Gupta (gupts44@mac), Office hours: Thu 12:00-1:00 pm at ABB-C526

John Popovici (popovj3@mac), Office hours: Thu 12:30-1:30 pm
Sky Deng (dengs32@mac),
Office hours: Mo 11:30-12:20 pm

Scheduling for section C01:
Lectures:
    TuWeFr 9:30-10:20 am (ITB 137)
Tutorials:
    T01: Fr 10:30-11:20 am (ITB 139)
    T02: Wed 12:30-1:20 pm (ETB 126)

Scheduling for section C02:
Lectures:
    MoWe 2:30-3:20 pm (MDCL 1105)
    Fr 4:30-5:20 pm  (MDCL 1105)
Tutorials:
    T05: Mo 12:30-1:20 pm (ETB 124) - Sky
    T06: Mo 12:30-1:20 pm (T13 105) - Nancy
    T07: Mo 10:30-11:20 pm (T13 106) - Nancy
    T08: Fr 3:30-4:20 pm (T13 106) - Nancy


Scheduling notes


Prerequisites


One of the following:
• COMPSCI 1DM3 or 2DM3; COMPSCI 1XC3 or 1XD3 or 1MD3 or MATH 1MP3, and registration in an Honours Computer Science program or in one of Mathematics and Computer Science, Economics and Computer Science, Arts & Sciences and Computer Science
• COMPSCI 1DM3 with a result of at least B, and one of COMPSCI 1XC3 or 1XD3 or 1MD3 or MATH 1MP3 with a result of at least B
Antirequisite(s): SFWRENG 2C03, COMPENG 3SM4


Course Objectives
 

In this course, we will study the concepts behind the technology of algorithms and data structures. The algorithmic solution of problems arises in any Computer Science or Software Engineering (indeed, any engineering or science) issue. Our goal will be: (i) To appreciate that algorithms and data structures are a technology (just as, say, electrical circuit design, or large software system design); this will be done by introducing performance measurement in order to measure algorithmic efficiency (in this course we will limit ourselves to efficient usage of time, and, sometimes, space). (ii) To recognize the details and nuances of modelling basic problems such as sorting, searching, graph exploration, etc. that will always show up in a Computer Scientist's or Software Engineer's career, and take advantage of these details in order to design better algorithmic solutions; not all algorithms that solve a problem are good, and no algorithm is good for all problems. (iii) To practice the art of reducing a given problem or application to other problems for which we already have good algorithms. 


More specifically, students should know and understand:


Students should be able to


Learning objectives, indicators, and rubrics  


Outline of Topics (roughly per week) 

  1. Introduction (1.3)
  2. Analysis of algorithms - Union-Find  (1.4, 1.5)
  3. Elementary sorts - Mergesort - Quicksort (2.1, 2.2, 2.3)
  4. Priority queues - Sorting applications (2.4, 2.5)
  5. Symbol tables - Binary search trees (3.1, 3.2)
  6. Balanced search trees - Hash tables - searching applications (3.3, 3.4, 3.5)
  7. Graph representation - BFS/DFS - Connected components - Topological sort (4.1, 4.2) 
  8. Minimum Spanning Trees - Shortest paths (4.3, 4.4)
  9. String sorts - Tries (5.1, 5.2)
  10. Substring search - FSA's and regular expressions (if time permits) (5.3 except KMP, 5.4)

  

Student Assessment (Grading) 


Policy on collaboration for homework assignments: Collaboration on the homework assignments is highly encouraged, within reasonable limits. Students are expected to discuss assignment problems with each other, and to cooperate on solutions in groups of no more than 5 people. However, the final write-up should be done by individual students (i.e. individual students should be able to explain their solutions by themselves, if such an explanation is asked for by the instructor) and the names of the collaborators should appear on the paper. Cooperation and teamwork are necessary for the success of any complex task (the design of algorithms being one such task), and it is the instructor's hope that students will come to appreciate them in a constructive way. Please see the instructor if you need someone to collaborate with. Use of generative AI is strictly prohibited (please see formal policy below).

Policy on delayed assignments: Assignments submitted within 24 hours of the submission deadline 50% of total credit. After that time, no credit is given.

Policy on collaboration during exams: ABSOLUTELY NO COLLABORATION DURING EXAMS!!!
  


Resources
 

Required textbook: "Algorithms", 4th ed., by R. Sedgewick and K. Wayne.
Recommended textbook: "Introduction to Algorithms", 3rd ed., by T.H. Cormen, C.E. Leiserson, R.L. Rivest, and C. Stein.
Recommended textbook: "Data Structures and Algorithms in Python'', by R. Tamassia, M. Goldwasser, and M. Goodrich.

Algorithms visualization tools: There are many of those. One that can be particularly useful is the tool developed by David Galles and you can find here.


Assignments

All assignments are posted on Avenue, and they are submitted electronically (also on Avenue)

Assignment 1 (Due Wed. Sept. 25, 11:59pm):  The questions are here. The solutions are here.  
Assignment 2 (Due Mon. Oct. 11, 11:59pm):  The questions are here.
The solutions are here.
Assignment 3 (
Due Mon. Nov. 4, 11:59pm):  The questions are here.
The solutions are here.
Assignment 4 (Due Thu. Nov. 21, 11:59pm
):  The questions are here.
The solutions are here.
Assignment 5 (Due
Wed. Dec. 4, 11:59pm):  The questions are here. The solutions are here.


To read the assignment files, you'll need the Adobe Reader, which is here. 


Slides

The lecture slides are a collection of textbook figures and other material. You can find them at the textbook site here.   


Generative AI: Use Prohibited

Students are not permitted to use generative AI in this course. In alignment with McMaster academic integrity policy, it “shall be an offense knowingly to … submit academic work for assessment that was purchased or acquired from another source”. This includes work created by generative AI tools. Also state in the policy is the following, “Contract Cheating is the act of “outsourcing of student work to third parties” (Lancaster & Clarke, 2016, p. 639) with or without payment.” Using Generative AI tools is a form of contract cheating. Charges of academic dishonesty will be brought forward to the Office of Academic Integrity.


McMaster Course Policies

The instructor and university reserve the right to modify elements of the course during the term. The university may change the dates and deadlines for any or all courses in extreme circumstances. If either type of modification becomes necessary, reasonable notice and communication with the students will be given with explanation and the opportunity to comment on changes. It is the responsibility of the student to check their McMaster email and course websites weekly during the term and to note any changes.

ACADEMIC INTEGRITY

You are expected to exhibit honesty and use ethical behaviour in all aspects of the learning process. Academic credentials you earn are rooted in principles of honesty and academic integrity. It is your responsibility to understand what constitutes academic dishonesty.

Academic dishonesty is to knowingly act or fail to act in a way that results or could result in unearned academic credit or advantage. This behaviour can result in serious consequences, e.g. the grade of zero on an assignment, loss of credit with a notation on the transcript (notation reads: “Grade of F assigned for academic dishonesty”), and/or suspension or expulsion from the university. For information on the various types of academic dishonesty please refer to the Academic Integrity Policy, located at https://secretariat.mcmaster.ca/university-policies-procedures- guidelines/

The following illustrates only three forms of academic dishonesty:
plagiarism, e.g. the submission of work that is not one’s own or for which other credit has been obtained. improper collaboration in group work.
copying or using unauthorized aids in tests and examinations.

AUTHENTICITY / PLAGIARISM DETECTION

Some courses may use a web-based service (Turnitin.com) to reveal authenticity and ownership of student submitted work. For courses using such software, students will be expected to submit their work electronically either directly to Turnitin.com or via an online learning platform (e.g. A2L, etc.) using plagiarism detection (a service supported by Turnitin.com) so it can be checked for academic dishonesty.

Students who do not wish their work to be submitted through the plagiarism detection software must inform the Instructor before the assignment is due. No penalty will be assigned to a student who does not submit work to the plagiarism detection software. All submitted work is subject to normal verification that standards of academic integrity have been upheld (e.g., on-line search, other software, etc.). For more details about McMaster’s use of Turnitin.com please go to www.mcmaster.ca/academicintegrity.

COURSES WITH AN ON-LINE ELEMENT

Some courses may use on-line elements (e.g. e-mail, Avenue to Learn (A2L), LearnLink, web pages, capa, Moodle, ThinkingCap, etc.). Students should be aware that, when they access the electronic components of a course using these elements, private information such as first and last names, user names for the McMaster e-mail accounts, and program affiliation may become apparent to all other students in the same course. The available information is dependent on the technology used. Continuation in a course that uses on-line elements will be deemed consent to this disclosure. If you have any questions or concerns about such disclosure please discuss this with the course instructor.

ONLINE PROCTORING

Some courses may use online proctoring software for tests and exams. This software may require students to turn on their video camera, present identification, monitor and record their computer activities, and/or lock/restrict their browser or other applications/software during tests or exams. This software may be required to be installed before the test/exam begins.

CONDUCT EXPECTATIONS

As a McMaster student, you have the right to experience, and the responsibility to demonstrate, respectful and dignified interactions within all of our living, learning and working communities. These expectations are described in the Code of Student Rights & Responsibilities (the “Code”). All students share the responsibility of maintaining a positive environment for the academic and personal growth of all McMaster community members, whether in person or online.

It is essential that students be mindful of their interactions online, as the Code remains in effect in virtual learning environments. The Code applies to any interactions that adversely affect, disrupt, or interfere with reasonable participation in University activities. Student disruptions or behaviours that interfere with university functions on online platforms (e.g. use of Avenue 2 Learn, WebEx or Zoom for delivery), will be taken very seriously and will be investigated. Outcomes may include restriction or removal of the involved students’ access to these platforms.

ACADEMIC ACCOMMODATION OF STUDENTS WITH DISABILITIES

Students with disabilities who require academic accommodation must contact Student Accessibility Services (SAS) at 905-525-9140 ext. 28652 or sas@mcmaster.ca to make arrangements with a Program Coordinator. For further information, consult McMaster University’s Academic Accommodation of Students with Disabilities policy.

REQUESTS FOR RELIEF FOR MISSED ACADEMIC TERM WORK

McMaster Student Absence Form (MSAF): In the event of an absence for medical or other reasons, students should review and follow the Academic Regulation in the Undergraduate Calendar “Requests for Relief for Missed Academic Term Work”.

ACADEMIC ACCOMMODATION FOR RELIGIOUS, INDIGENOUS OR SPIRITUAL OBSERVANCES (RISO)

Students requiring academic accommodation based on religious, indigenous or spiritual observances should follow the procedures set out in the RISO policy. Students should submit their request to their Faculty Office normally within 10 working days of the beginning of term in which they anticipate a need for accommodation or to the Registrar's Office prior to their examinations. Students should also contact their instructors as soon as possible to make alternative arrangements for classes, assignments, and tests.

COPYRIGHT AND RECORDING

Students are advised that lectures, demonstrations, performances, and any other course material provided by an instructor include copyright protected works. The Copyright Act and copyright law protect every original literary, dramatic, musical and artistic work, including lectures by University instructors

The recording of lectures, tutorials, or other methods of instruction may occur during a course. Recording may be done by either the instructor for the purpose of authorized distribution, or by a student for the purpose of personal study. Students should be aware that their voice and/or image may be recorded by others during the class. Please speak with the instructor if this is a concern for you.

EXTREME CIRCUMSTANCES

The University reserves the right to change the dates and deadlines for any or all courses in extreme circumstances (e.g., severe weather, labour disruptions, etc.). Changes will be communicated through regular McMaster communication channels, such as McMaster Daily News, A2L and/or McMaster email.


Faculty Notices
"The Faculty of Engineering is concerned with ensuring an environment that is free of all discrimination.  If there is a problem, individuals are reminded that they should contact the Department Chair, the Sexual Harrassment Officer or the Human Rights Consultant, as the problem occurs."