====== CSC2100B Data Structures ====== ==== Breaking News ==== - **1 January 2010**. Happy New Year! Welcome to CSC2100B Data Structures. This is an important fundamental course not only for Computer Scientists but for all engineering students. The knowledge learned here can be applied in any programming environment to help you write better programs and applications. Let's have fun in this course! - **11 January 2010**. No tutorial this week as the TAs are busy setting up the on-line judge system. - **13 January 2010**. The lecture notes and the audio recordings for the first week is now available. - **18 January 2010**. The tutorials will begin this week. - **19 January 2010**. The Checker Group will meet in room 1021 on Friday, January 22, 2010 from 3:30 pm to 4:30 pm or beyond. - **28 January 2010**. The login id for the Online Judgement System has been sent to you cuhk email(sxxxxxxx@mailserv.cuhk.edu.hk). - **Saturday, 10 April 2010**. **The CSC2100B Programming Midterm will be held in room 924 of the HSH Engineering Building from 9:30 am sharp to 1:00 pm. We will let people in around 9:00 am.** * **Scope**: Everything in the programming assignments. * **What you can bring**: Print out of codes, books, notes, etc. that you can haul in. No electronic devices. * **Available editors for the programming midterm**: * Notepad ++ * Microsoft Visual C++ 6.0 * gvim - **28 April 2010**. Important information for the final examination. The final examination will be a **closed book and closed note written examination**. You will not require to have a calculator and need only to bring writing instruments and your ID.\\ \\ The final examination **covers ALL materials** from the course, but emphasis will be placed on materials since the written midterm. There is not a programming component to the final examination.\\ \\ You may find the marks for all your work [[:teaching:csc2100b:2010:marks|here]]. Please make sure that your marks are accurately reflected by **May 1, 2010**. We will not change any marks from work before the final examination after May 1, 2010. - **9 June 2010**. **URGENT and IMPORTANT!** We have discovered mistakes regarding to the on-line judge system. The mistakes are setting the system deadline one day before the actual deadline. In light of this, many valid and correct submissions on the day of the actual deadline have been recorded incorrectly. These errors have basically lowered the scores for at least 20 students. We have corrected these mistakes and revised the corresponding grades accordingly. The good news is that these changes have not led to any grades being lowered. Here is the [[:teaching:csc2100b:2010:marks20100609|final scores]] (latest) and here is the [[:teaching:csc2100b:2010:marks|original scores]] (earlier) for your reference. ===== Spring 2010 ===== | ^ Lecture I ^ Lecture II ^ Tutorial I ^ Tutorial II ^ ^ Time | M7-8, 2:30 pm - 4:15 pm | T2, 9:30 am - 10:15 am | T9, 4:30 pm - 5:15 pm | H9, 4:30 pm - 5:15 pm | ^ Venue | ERB LT | ERB LT | ERB 404 | ERB 404 | The Golden Rule of CSC2100B: No member of the CSC2100B community shall take unfair advantage of any other member of the CSC2100B community. ====== Course Description ====== The concept of abstract data types and the advantages of data abstraction are introduced. Various commonly used abstract data types including vector, list, stack, queue, tree, and set and their implementations using different data structures (array, pointer based structures, linked list, 2-3 tree, B-tree, etc.) will be discussed. Sample applications such as searching, sorting, etc. will also be used to illustrate the use of data abstraction in computer programming. Analysis of the performance of searching and sorting algorithms. Application of data structure principles. 本科介紹抽象數據類型之概念及數據抽象化的優點。並討論多種常用的抽象數據類型,包括向量、表格、堆棧、隊列、樹形;集(合)和利用不同的數據結構(例如:陣列、指示字為基的結構、連接表、2-3樹形、B樹形等)作出的實踐。更以實例(例如:檢索、排序等)來說明數據抽象化在計算機程序設計上的應用。並討論檢索與排序算法及數據結構之應用。 ===== Learning Objectives ===== - To understand the concepts and operations of various data structures and their applications - To understand the concept of abstract data types - To have basic knowledge of algorithms and complexity of algorithms ===== Learning Outcomes ===== - To be able to implement the following data structures as abstract data types in a high level programming lanauge: stack, queue, hash table, list, binary search tree (including AVL tree, red black tree and splay tree), B-tree, trie, disjoint set, graph (including minimum spanning tree and shortest path). - To be able to use appropriate data structures in different applications. - To be able to implement abstract data types. - To be able to analyse the complexity of simple algorithms (such as searching and sorting). ===== Learning Activities ===== - Lectures - Tutorials - Web resources - Videos - Quizzes - Examinations ====== Personnel ====== | ^ Lecturer ^ Tutor ^ Tutor ^ Tutor ^ Tutor ^ Tutor ^ ^ Name | [[:home|Irwin King]] | [[http://www.cse.cuhk.edu.hk/~jyhao|Jianye Hao]] | Haifeng Wan | Xin Xin | Joe Chan Wing-Yin | Tom Chao Zhou | ^ Email | king AT cse.cuhk.edu.hk | jyhao AT cse.cuhk.edu.hk | hfwan | xxin | wychan AT cse.cuhk.edu.hk | NA | ^ Office | Rm 908 | Rm 905 | Rm 905 | Rm 101 | Rm 1026 | NA | ^ Telephone | 2609 8398 | 2609 8395 | 31634264 | 68492792 | 3163 8438 | NA | ^ Office Hour(s) | * M3, Monday 10:30 to 11:30\\ \\ * T3, Tuesday 10:30 to 11:30 | T7, T8 | Friday, 9:30-11:30 am | Monday, 13:30-15:30 | W9,W10 | NA | Note: This class will be taught in English. Homework assignments and examinations will be conducted in English. ====== Syllabus ====== The pdf files are created in Acrobat 6.0. Please obtain the correct version of the [[http://www.adobe.com/prodindex/acrobat/readstep.html#reader | Acrobat Reader]] from Adobe. ^ Week ^ Date ^ Topics ^ Tutorials ^ Homework & Events ^ Resources ^ | 1 | 11/1, 12/1 | **Introduction**\\ \\ 1. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/CSC2100BK-Introduction.pdf|CSC2100BK-Introduction.pdf]] **NEW** | No Tutorial | TBD | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100111-01.aiff|1. CSC2100B-20100111-01.aiff]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100112-01.aiff|2. CSC2100B-20100112-01.aiff]] | | 2 | 18/1, 19/1 | 1. **Algorithm Analysis**\\ 2. **Recurrence**\\ \\ 1. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/CSC2100BK-Analysis.pdf|CSC2100BK-Analysis.pdf]] **NEW** | Introduction to C | Read Chapter 1 and 2 | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100118-01.m4a|1. CSC2100B-20100118-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100119-01. m4a |2. CSC2100B-20100119-01.m4a]] | | 3 | 25/1, 26/1 | **List, Stacks, and Queues** \\ \\ 1. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/CSC2100BK-LSQ.pdf|CSC2100BK-LSQ.pdf]] **NEW** | Online Judge Guide | * Read Chapter 3\\ \\ * HW #1 [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/hw110.pdf|(version 1.10)]] **UPDATED** \\ * Written Assignment (Due on or before 6:00 pm, Monday, February 8, 2010)\\ * 1.1 (1), (3), and (6); 1.2 (1) and (2); 1.3 (1) and (2); 1.4 (7) and (8); 1.5; 1.6 (1), (3), and (5)\\ \\ * Programming Assignment (Due on or before 11:59 pm, Tuesday, February 9, 2010)\\ * 1.16 and 1.18 | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100125-01.m4a|1. CSC2100B-20100125-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100126-01.m4a|2. CSC2100B-20100126-01.m4a]] | | 4 | 1/2, 2/2 | **List, Stacks, and Queues**\\ \\ **Tree Data Structures and Algorithms** \\ \\ 1. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/CSC2100BK-Tree.pdf|CSC2100BK-Tree.pdf]] | LSQ | TBD | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100201-01.m4a|1. CSC2100B-20100201-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100202-01.m4a|2. CSC2100B-20100202-01.m4a]] | | 5 | 8/2, 9/2 | Tree Data Structures and Algorithms | TBD | * Read Chapter 4\\ Please check the announcement in tutorial page | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100208-01.m4a|1. CSC2100B-20100208-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100209-01.m4a|2. CSC2100B-20100209-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100209-02.m4a|3. CSC2100B-20100209-02.m4a]] | | 6 | 15/2, 16/2 | **CHINESE NEW YEAR HOLIDAY** | **NO TUTORIALS** | TBD | TBD | | 7 | 22/2, 23/2 | Hash Functions\\ \\ 1. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/CSC2100BK-Hash.pdf|CSC2100BK-Hash.pdf]] **NEW** | TBD | TBD | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100222-01.m4a|1. CSC2100B-20100222-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100223-01.m4a|2. CSC2100B-20100223-01.m4a]] | | 8 | 1/3, 2/3 | 1. Hash Functions | TBD | * Read Chapter 5 \\ \\ * HW #2 [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/hw111.pdf|(version 1.11)]] NEW!\\ * Written Assignment (Due on or before 6:00 pm, Monday, March 15, 2010)\\ * 3.1 (4); 3.2 (4); 3.3 (4); 3.4; 3.6 (4); 3.7; 3.8; 3.10; 3.11; 3.12 (4) \\ \\ * Programming Assignment (Due on or before 11:59 pm, Monday, March 15, 2010) NEW! \\ * 2.15 and 3.32.\\ Please check the announcement in tutorial page | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100301-01.m4a|1. CSC2100B-20100301-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100302-01.m4a|2. CSC2100B-20100302-01.m4a]] | | 9 | 8/3, 9/3 | 1. Heaps\\ 2. Sorting Algorithms\\ \\ 1. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/CSC2100BK-Heaps.pdf|CSC2100BK-Heaps.pdf]]\\ 2. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/07_Sortc.pdf|07_Sortc.pdf]] | TBD | TBD | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100308-01.m4a|1. CSC2100B-20100308-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100309-01.m4a|2. CSC2100B-20100309-01.m4a]] | | 10 | 15/3, 16/3 | Sorting Algorithms | TBD | * HW #3 [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/hw112.pdf|(version 1.12)]] NEW!\\ * Written Assignment (Due on or before 6:00 pm, Wednesday, March 31, 2010)\\ * 3.13(4), 4.1 using inputs {9575, 9649, 1576, 9706, 9572, 4854, 8003, 1419}, 4.4, 5.5, 5.6, 5.7 \\ \\ * Programming Assignment (Due on or before 11:59 pm, Thursday, April 1, 2010) NEW! \\ * 5.11.\\ Please check the announcement in tutorial page | [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100315-01.m4a|1. CSC2100B-20100315-01.m4a]]\\ [[http://appsrv.cse.cuhk.edu.hk/~king/csc2100b/podcasts/CSC2100B-20100316-01.m4a|2. CSC2100B-20100316-01.m4a]] | | 11 | 22/3, 23/3 | Sorting Algorithms | TBD | TBD | TBD | | 12 | 29/3, 30/3 | **WRITTEN MIDTERM EXAMINATION**\\ | TBD | TBD | TBD | | 13 | 5/4, 6/4 | **EASTER HOLIDAY**\\ \\ \\ **PROGRAMMING MIDTERM EXAMINATION** | TBD | TBD | TBD | | 14 | 12/4, 13/4 | Graph Data Structures and Algorithms\\ \\ 1. [[http://www.cse.cuhk.edu.hk/~king/csc2100b/PDF/09_Graphs.pdf|09_Graphs.pdf]] | TBD | * HW #4\\ Please check the announcement in tutorial page | | | 15 | 19/4, 20/4 | Course summary and final examination pointers | TBD | TBD | | * For detailed tutorial information, please go to [[:teaching:csc2100B:tutorials|Tutorial Page]]. ====== Examination Matters ====== ===== Examination Schedule ===== | ^ Time ^ Venue ^ Notes ^ ^ Midterm Examination\\ Written | 29 March 2010\\ 2:30 pm to 4:30 pm | LT, MMW Engineering Building | The scope is all materials up to HW #2. | ^ Midterm Examination\\ Programming | 10 April 2010\\ 9:00 am to 1:00 pm | Room 924 | The CSC2100B Programming Midterm will be\\ held in room 924 of the HSH Engineering Building\\ from 9:30 am sharp to 1:00 pm. We will let people in around 9:00 am.\\ You can bring print outs of previous programming homework assignments. The scope is all programming assignments. | ^ Final Examination | TBD | TBD | The final examination covers all materials presented in the class\\ but emphasizes more on the materials after the midterm. This is a closed book examination. | * [[http://rgsntl.rgs.cuhk.edu.hk/rws_prd_life/main1.asp|CUHK Registration and Examination]] ===== Programming Midterm Matters ===== - The programming midterm is an open-book and open-notes examination. You may bring what you can carry on printed (hard copy) materials to room 924. You MUST not take anything that can record program code electronically to the examination venue. You will not need a calculator for any calculation. - The computer configuration will have these basic editors: - VI - Visual Studio - Notepad++ - If you would like to have other editors, you MUST send an email to the instructor and TAs no later than 7 days before the examination date and it will be subject to approval to be included on the computer system. - You should arrive to the venue before 9:30 am on the day of the examination to receive your information and check the system. - The examination will begin when the Chief TA starts the clock and will end when the Chief TA stops the clock, which is usually three hours after the starting time including any missing time due to technical and other difficulties. - You should work on Problem #1 first and then others afterwards. They are in increasing difficulties as judged by the instructor. - You MUST complete one problem in order not to fail the course. - Anyone who attempts to spam the server either through excessive submissions, allocating large amount of unnecessary memory, etc. will be penalized severely. - If you leave early from the examination, you will not be able to come back to the examination. ===== Written Midterm Matters ===== - The midterm will test your knowledge of the materials upto Assignment #3, that will be to include Trees. - You will be assigned the venue according to your last name. - Answer all questions using the answer booklet. There will be more available at the venue if needed. - Write legibly. Anything we cannot decipher will be considered incorrect. ====== Grade Assessment Scheme ====== ^ Final Examination\\ (Written) ^ Midterm Examination\\ (Written Part) ^ Midterm Examination\\ (Programming Part) ^ Essays ^ Presentation ^ Lab reports ^ Assignments ^ | 50% | 10% | 20% | % | % | % | 20% | -Assignments (20%) -Written assignment -Programming assignment -Optional quizs -Midterms (30%) - Written (10%) - Programming (20%) -Final Examination (50%) -Extra Credit (There is no penalty for not doing the extra credit problems. Extra credit will only help you in borderline cases.) Note: One must solve at least one problem in the programming examination to pass the examination. ====== Required Background ====== - Pre-requisites -- CSC 1110 or 1130 or its equivalent. (Not for students who have taken CSC 2520). ====== Reference Books ====== /* - [[http://www.amazon.com/exec/obidos/ASIN/0201498405/qid%3D949475985/sr%3D1-6/002-0319810-4772266|Data Structures and Algorithm Analysis in C]], **Mark Allen Weiss, Addison Wesley, second edition, 1997.** - [[http://www.amazon.com/exec/obidos/ASIN/0805316663/ref=sim_books/002-0319810-4772266|Data Structures and Algorithm Analysis in C++]], **Mark Allen Weiss, Addison Wesley, second edition, 1999.** */ - {{amazon>0201498405}} @Book{weissc, AUTHOR = {Weiss, Mark}, YEAR = {1997}, TITLE = {Data Structures and Algorithm Analysis in C}, PUBLISHER = {Addison Wesley}, address = {}, series = {}, volume = {}, pages = {}, month = {}, edition = {}, keywords = {}, summary = {}, supersedes = {D-}, SEMNO = {D-}, PUF = {Bog}, ID = {Bog}, URL = {http://www.amazon.com/exec/obidos/ASIN/0201498405/qid%3D949475985/sr%3D1-6/002-0319810-4772266}} - {{amazon>0201498405}} @Book{weissc++, AUTHOR = {Weiss, Mark}, YEAR = {1999}, TITLE = {Data Structures and Algorithm Analysis in C++}, PUBLISHER = {Addison Wesley}, address = {}, series = {}, volume = {}, pages = {}, month = {}, edition = {}, keywords = {}, summary = {}, supersedes = {D-}, SEMNO = {D-}, PUF = {Bog}, ID = {Bog}, URL = {http://www.amazon.com/exec/obidos/ASIN/0805316663/ref=sim_books/002-0319810-4772266}} - {{amazon>0262031418}} @Book{cormen, AUTHOR = {Cormen, Thomas H. and Leiserson, Charles E. and Rivest, Ronald L.}, YEAR = {1990}, TITLE = {Introduction to Algorithms}, PUBLISHER = {The MIT Press}, address = {}, series = {}, volume = {}, pages = {}, month = {}, edition = {}, keywords = {}, summary = {}, URL = {http://www.amazon.com/Introduction-Algorithms-Electrical-Engineering-Computer/dp/0262031418}} ====== Other Books ====== - [[http://www.amazon.com/exec/obidos/ASIN/0201000237/qid%3D949476152/sr%3D1-1/002-0319810-4772266|Data Structures and Algorithms]], **Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman, Addison Wesley, 1983.** - [[http://www.amazon.com/exec/obidos/ASIN/0262530910/qid%3D949476326/sr%3D1-3/002-0319810-4772266|Introduction to Algorithms]], **Thoas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest, MIT Press, 1990.** - [[http://www.amazon.com/exec/obidos/ASIN/067339736X/qid%3D949476404/sr%3D1-1/002-0319810-4772266|Data Structures and Their Algorithms]], **Harry R. Lewis and Larry Denenberg, HarperCollins Publisher, 1991.** - [[http://www.amazon.com/exec/obidos/ASIN/0130369977/qid%3D949476491/sr%3D1-2/002-0319810-4772266|Data Structures Using C and C++]], **Aaron M. Tenenbaum, Yedidyah Langsam, and Moshe J. Augenstein, Prentice Hall, 1995. ** ====== Book Sources ====== - **Academic & Professional Book Centre**, 1H Cheong Ming Bldg., 80-86 Argyle St., Kowloon, 2398-2191, 2391-7430 (fax) - **Caves Books (H. K.)**, 4B Ferry St., G/F., Yaumatei, Kowloon, 2780-0987, 2771-2298 - **Man Yuen Book Company**, 45 Parkes street, Jordan Road, Kowloon, Hong Kong, 2366-0594. Not very large, Asian edition books, fair price, wide range, some 10% discount. - **Swindon Book Co. Ltd**, 13-15 Lock Road, Tsim Sha Tsiu, Kowloon, 2366-8001. One of the largest book stores in Hong Kong, exchange rate is not favorable. - **Hongkong Book Centre**, 522-7064. A branch of the Swindon book shop. ====== FAQ ====== - **Q: What is departmental guideline for plagiarism?**\\ A: If a student is found plagiarizing, his/her case will be reported to the Department Discipline Committee. If the case is proven after deliberation, the student will automatically fail the course in which he/she committed plagiarism. The definition of plagiarism includes copying of the whole or parts of written assignments, programming exercises, reports, quiz papers, mid-term examinations. The penalty will apply to both the one who copies the work and the one whose work is being copied, unless the latter can prove his/her work has been copied unwittingly. Furthermore, inclusion of others' works or results without citation in assignments and reports is also regarded as plagiarism with similar penalty to the offender. A student caught plagiarizing during tests or examinations will be reported to the Faculty Office and appropriate disciplinary authorities for further action, in addition to failing the course. - **Q: What is ACM ICPC?** \\ A: Association of Computer Machinery International Collegiate Programming Contest. Teams from CUHK have done quite well in the previous years. More information on the CSE's programming team can be found at http://www.cse.cuhk.edu.hk/~acmprog. - **Q: What are some of the common mistakes made in online and real-time contest?**\\ A: There are a few common mistakes. Please check out [[http://www.acm.org/crossroads/xrds7-5/contests.html|this site]] for more information. ====== Resources ====== -[[http://www.cyberdiem.com/vin/learn.html|Learn C/C++ Today]] -[[http://www.awl.com/cseng|Addison Wesley's Computer and Engineering Book Catalog and Programming Codes ]] -[[http://www.mathworks.com/|Matlab Homepage]] This site is the creator of Matlab. You will be able to obtain much Matlab-related information. -[[http://www.cse.cuhk.edu.hk/~acmprog|CSE's ACM Programming Contest Homepage]] -C Programming -http://www.strath.ac.uk/CC/Courses/OldCcourse/CCourse.html -http://www.cm.cf.ac.uk/Dave/C/CE.html -http://devlib.virtualave.net/dir/files/cguide_3.zip -[[http://pweb.netcom.com/~tjensen/ptr/pointers.htm |Arrays and Pointers]] -[[http://gcc.gnu.org/onlinedocs/gcc/|The 'gcc' compiler]] -[[http://sourceware.org/gdb/current/onlinedocs/gdb_toc.html|The 'gdb' debugger]] -[[http://www.gnu.org/software/make/manual/make.html|The 'make' utility]] -[[http://www.redhat.com/developer/whitepapers/intro_dev/|Programming C under Linux, provided by RedHat]] -[[http://cg.scs.carleton.ca/~morin/misc/sortalg/|Sorting Algorithm Animation Demo]] -[[http://pauillac.inria.fr/algo/AofA/|Analysis of Algorithms Home Page]] -[[http://glossary.computing.society.informs.org/ |Mathematical Programming Glossary]] -[[http://www.cs.oswego.edu/~birgit/html/diplom/links.html |Algorithm Animation Links]] -[[http://www.alistapart.com/articles/pickle/|The Pickle Story]]