CSCI2100B Data Structures

Breaking News

  1. 3 May 2013. The result of Assignment 4 is out. Please download the file result#4 to see your final score (full mark is 130). You can also retrieve your papers in SHB1024. If you find any inconsistency, please contact TA as soon as possible.
  2. 30 April 2013. The programming midterm award photo is now available. Congratulations to all the winners! From the left: LAM Ka Ho, YU Chun Lung, WAN Ka Ki, CHU Wing Yin, DERMAWAN Teresa and PANG Yui Tik.
  3. 24 April 2013. You can retrieve your exam papers and previous homework papers from now on in SHB 1024. This Friday is not applicable since there will be probably no one in the office. In addition, selected solutions for the written midterm has been put on the website.
  4. 16 April 2013. The last homework set has been announced. Please find the information below. You can regard it as a warm-up to the final.
  5. 5 April 2013. Notice for written midterm examination: For those whose last name is up to LEE (including LEE), please go to the venue of LHC 104 (besides Sir Run Run Shaw Hall). For those whose last name is after LEE, please go to the venue of LSB LT6 (the lecture venue).
  6. 25 March 2013. The result of Assignment 3 is out. Please download the file result#3 to see your final score for both written part and programming part. If you find any inconsistency, please contact TA as soon as possible.
  7. 19 March 2013. Please note that the date and time for midterm programming test have been re-scheduled to 9:00am - 1:00pm, Sat, April 13, 2013. Please get familiar with the Linux OS and editing environment as soon as possible.
  8. 17 March 2013. Issues for PA#3: (1)the problem submission ID are 1 and 2 respectively; (2)the reward vectors are (3,2,1,0,0,0,0) and (5,4,3,2,1,0,0) respectively; (3)the result page is here.
  9. 4 March 2013. The result of Programming Assignment 2 is out. Please download the file PA#2 to see your final score. The ranking is only for your reference. In addition, Written Assignment 2 has been announced in this website. Please check it.
  10. 24 February 2013. Issues for Homework 2: (1)the problem submission ID are 1, 2, and 3 respectively; (2)the reward vectors are (5,5,4,3,2,1,0), (4,4,3,2,1,0,0) and (3,3,2,1,0,0,0) respectively; (3)the result page is here.
  11. 20 February 2013. The grading of Written Assignment 1 has been finished. You may retrieve your homework from SHB1024 in appropriate time. The left will be distributed in the next lecture. If you find the sum of score is miscalculated, please contact TA as soon as possible.
  12. 9 February 2013. The result of Programming Assignment 1 is out. Please download the file PA#1 to see your final score. The ranking is only for your reference. Lastly, happy Chinese New Year to you all!
  13. 6 February 2013. Please download the file WA#1 to check whether we have received your Written Assignment 1. 'Y' means yes, 'N' means no, and 'Lx' means late for x day(s). If there is any mistake, please contact TA as soon as possible.
  14. 31 January 2013. The link of the ranking page is http://www.cse.cuhk.edu.hk/csci2100b/hw1-result.html. All the existing records will be emptied right before the programming assignment starts. When the submission period is over, we will save the page at that time as the final ranking. Now you can test this page by submitting Assignment 0 (Please do not submit Assignment 1 & 2 until Friday, you'll get “Wrong Answer” result if you do so).
  15. 30 January 2013. Due to the absence of tutor in Tuesday's tutorial, an additional tutorial will be held at W6:30-7:15 (today) in SHB503.
  16. 28 January 2013. Since some students just registered for this course in the end of last week, the starting time will further postpone to Friday (1 Feb, 2013) for fairness. Besides, the specifications for homework 1 have been posted on this website. Please have a look at it to better understand the problems.
  17. 24 January 2013. Because non-CSE students may not get their UNIX account by next Monday, the submission period of programming assignment 1 will start from Wednesday (30 January, 2013) for fairness. You can have more time to prepare. Also, please notice that only students who choose this course can have UNIX accounts for one semester.
  18. 22 January 2013. For non-CSE students, please send your student ID and name to hyzhang@cse.cuhk.edu.hk to get your CSE UNIX account before this Friday (25 January, 2013). You cannot submit programming assignments unless you have this account.
  19. 11 January 2013. Are you ready for the new semester? Welcome to CSCI2100B 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!

Spring 2013

Lecture I Lecture II Tutorial I Tutorial II
Time M7-8, 2:30 pm - 4:15 pm T2, 9:30 am - 10:15 am T5, 12:30 pm - 1:15 pm W8, 3:30 pm - 4:15 pm
Venue LSB LT6 LSB LT6 ERB 404 ERB 404

The Golden Rule of CSCI2100B: No member of the CSCI2100B community shall take unfair advantage of any other member of the CSCI2100B 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

  1. To understand the concepts and operations of various data structures and their applications
  2. To understand the concept of abstract data types
  3. To have basic knowledge of algorithms and complexity of algorithms

Learning Outcomes

  1. 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).
  2. To be able to use appropriate data structures in different applications.
  3. To be able to implement abstract data types.
  4. To be able to analyse the complexity of simple algorithms (such as searching and sorting).

Learning Activities

  1. Lectures
  2. Tutorials
  3. Web resources
  4. Assignments
  5. Examinations

Personnel

Lecturer Tutor Tutor
Name Irwin King Yuanming Yu Hongyi Zhang
Email king AT cse.cuhk.edu.hk ymyu AT cse.cuhk.edu.hk hyzhang AT cse.cuhk.edu.hk
Office Rm 908 Rm 606 Rm 1024
Telephone 3943 8398 6761 7170 5984 1406
Office Hour(s) * M2, Monday 9:30 to 10:30
* M3, Monday 10:30 to 11:30
* By appointment.
NA * H7, Thursday 14:30 to 15:30
*H8, Thursday 15:30 to 16:30

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 XI. Please obtain the correct version of the Acrobat Reader from Adobe.

Week Date Topics Tutorials Homework & Events Resources
1 14/1, 15/1 Introduction

Introduction.pdf
Introduction to C TBD TBD
2 21/1, 22/1 Algorithm Analysis

Analysis.pdf
Online Judge System * HW #1 (Version 1.13)
* Written Assignment (Due on or before 5:00 pm, Monday, February 4, 2013)
* 1.1 (5), (8), and (13); 1.2 (1) and (3); 1.3 (5) and (8); 1.4 (3) and (5); 1.6 (2), (4), and (6); 1.9 (3) and (4)

* Programming Assignment (Begin at 00:00 am, Friday, Feburary 1, 2013; Due on or before 11:59 pm, Thursday, February 7, 2013)
* 1.15 and 1.19
TBD
3 28/1, 29/1 1.Recurrence Relations
2. List, Stacks, and Queues

Recurrence.pdf
I/O Issues in C Specifications for Homework 1 TBD
4 4/2, 5/2 List, Stacks, and Queues

LSQ.pdf
List, Stacks, and Queues in C TBD TBD
5 11/2, 12/2 CHINESE NEW YEAR HOLIDAY NO TUTORIALS Solutions for HW #1 TBD
6 18/2, 19/2 List, Stacks, and Queues Homework #1 Solutions HW #2 (All Programming: 2.4, 2.16, 2.17)
(Begin at 00:00 am, Monday, February 25, 2013; Due on or before 11:59 pm, Sunday, March 3, 2013)
TBD
7 25/2, 26/2 Tree Data Structures and Algorithms

Tree.pdf
Binary and AVL Tree in C Extra Credit Problem
(Due on or before the last day of this semester)
TBD
8 4/3, 5/3 Tree Data Structures and Algorithms More issues on Tree * HW #3 (Version 1.14)
* Written Assignment (Due on or before 5:00 pm, Friday, March 15, 2013)
* 3.1(3); 3.2(3); 3.3(3); 3.4; 3.6(3); 3.7; 3.10; 3.11; 3.12(3); 3.13(3)
5 points each, 50 points in total


* Programming Assignment (Begins at 00:00 am, Monday, March 18, 2013, ends at 11:59 pm, Sunday, March 24)
3.24; 3.29
TBD
9 11/3, 12/3 NO CLASS
NO TUTORIALS TBD TBD
10 18/3, 19/3 1. Hash Functions
2. Heaps

Hash.pdf
Heaps.pdf
Homework #3 Solutions Solutions for HW #3 TBD
11 25/3, 26/3 Sorting Algorithms

Sort.pdf
Hash in C TBD TBD
12 1/4, 2/4 EASTER HOLIDAY
Sorting Algorithms
Written Midterm Review TBD TBD
13 8/4, 9/4 WRITTEN MIDTERM EXAMINATION

Sorting Algorithms

PROGRAMMING MIDTERM EXAMINATION

Exams.pdf
Midterm Tips and PC2 Tutorial Written Midterm Paper
Selected Written Midterm Solutions
Programming Midterm Results
Programming Midterm Review
Champion CHAN, Pak Hay (1155029810)
1st Runner-up LAM, Ka Ho (1155031192)
2nd Runner-up YU, Chun Lung (1155029407)
Best Female Coder CHU, Wing Yin (1155030760)
Best Non-CSE Coder LAM, Ka Ho (1155031192)
Most Effective Coder PANG, Yui Tik (1155030526)
Honorable Mention WAN, Ka Ki (1155030851)
DERMAWAN, Teresa (1009637094)
TBD
14 15/4, 16/4 Graph Data Structures and Algorithms

Graphs.pdf
Quick Sort and Merge Sort * HW #4 (Version 1.14)
* Written Assignment (Due on or before 5:00 pm, Monday, April 29, 2013)
* 4.1; 4.14; 4.15; 5.1; 5.2; 6.1; 6.2; 6.3; 6.6(2); 7.1; 7.3(1); 7.4; 7.5
(for the answers of all graph problems except 7.4, only table is needed (no figures); for 7.4, only figure is needed.
TBD
15 22/4, 23/4 1. Graph Data Structures and Algorithms
2. Course summary
Graph Revisited Solutions for HW #4
Solutions for HW#4 (Part 2)
TBD

Tutorial Page

Examination Matters

Examination Schedule

Time Venue Notes
Midterm Examination
Written
8 April 2013
2:30pm-4:15pm
LSB LT6
&
LHC 104
The scope is all materials up to Trees (Week 8).
You can bring an one-page paper (A4, both-side) with you.
Calculators are not allowed.
Midterm Examination
Programming
13 April 2013
9:30am-1:00pm
SHB924 The scope is all materials up to Trees (Week 8).
Please come to the venue before 9:00am.
Final Examination 13 May 2013
9:30-11:30am
Sir Run Run Shaw Hall (Stage) The final examination covers all materials presented in the class
but emphasizes more on the materials after the midterm. You can bring an one-page paper (A4, both-side) with you. Calculators are not allowed.

Programming Midterm Matters

  1. 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.
  2. The operation system will be Ubuntu. And the computer configuration will have these basic editors:
    1. vi/vim
    2. emacs
    3. gedit
    4. nano
  3. 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.
  4. You should arrive to the venue before 9:00am on the day of the examination to receive your information and check the system.
  5. 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.
  6. You should work on Problem #1 first and then others afterwards. They are in increasing difficulties as judged by the instructor.
  7. You MUST complete one problem in order not to fail the course.
  8. Anyone who attempts to spam the server either through excessive submissions, allocating large amount of unnecessary memory, etc. will be penalized severely.
  9. If you leave early from the examination, you will not be able to come back to the examination.

Written Midterm Matters

  1. The midterm will test your knowledge of the materials upto Homework #3, that will be to include Trees.
  2. You will be assigned the venue according to your last name.
  3. Answer all questions using the answer booklet. There will be more available at the venue if needed.
  4. Write legibly. Anything we cannot decipher will be considered incorrect.

Grade Assessment Scheme

Final Examination
(Written)
Midterm Examination
(Written Part)
Midterm Examination
(Programming Part)
Assignments
50% 10% 20% 20%
  1. Assignments (20%)
    1. Written assignment
    2. Programming assignment
    3. Optional quizs
    4. Late penalty: 10% for each day (no late than 4 days, only applicable for written assignment)
  2. Midterms (30%)
    1. Written (10%)
    2. Programming (20%)
  3. Final Examination (50%)
  4. 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

  1. Pre-requisites
    1. - CSCI 1110 or 1130 or its equivalent. (Not for students who have taken CSCI 2520).

Reference Books

  1. failed to fetch data: Could not connect to ecs.amazonaws.com:80 Connection timed out (110)

    [1997, book | www]
    Mark Weiss, Data Structures and Algorithm Analysis in C, Addison Wesley, 1997.

  2. failed to fetch data: Could not connect to ecs.amazonaws.com:80 Connection timed out (110)

    [1999, book | www]
    Mark Weiss, Data Structures and Algorithm Analysis in C++, Addison Wesley, 1999.

  3. failed to fetch data: Could not connect to ecs.amazonaws.com:80 Connection timed out (110)

    [1990, book | www]
    Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest, Introduction to Algorithms, The MIT Press, 1990.

Other Books

  1. Data Structures and Algorithms, Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman, Addison Wesley, 1983.
  2. Introduction to Algorithms, Thoas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest, MIT Press, 1990.
  3. Data Structures and Their Algorithms, Harry R. Lewis and Larry Denenberg, HarperCollins Publisher, 1991.
  4. Data Structures Using C and C++, Aaron M. Tenenbaum, Yedidyah Langsam, and Moshe J. Augenstein, Prentice Hall, 1995.

Book Sources

  1. Academic & Professional Book Centre, 1H Cheong Ming Bldg., 80-86 Argyle St., Kowloon, 2398-2191, 2391-7430 (fax)
  2. Caves Books (H. K.), 4B Ferry St., G/F., Yaumatei, Kowloon, 2780-0987, 2771-2298
  3. 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.
  4. 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.
  5. Hongkong Book Centre, 522-7064. A branch of the Swindon book shop.

FAQ

  1. 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.
  2. 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.
  3. 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 this site for more information.
  4. Q: What does error message 'Restricted Function' mean in online judge?
    A: There is no standard definition of “Restricted Function”. One general accepted guideline is that any code which may threat the system should not be executed. More specifically, any functions which are not need when solving the problem should not be called. There are several possible reasons: 1. Using file-operating functions which are not allowed; 2. Mis-usage of pointers or malloc(); 3. Using system('pause').

Resources

 
teaching/csci2100b/2012.txt · Last modified: 2015/01/24 13:11 by hyzhang     Back to top