Data Structure and Algorithms
Prof. Michael Tsai Spring 2018
- Course Information
[CSIE 1212 Class 02]
資料結構與演算法
Data Structure and Algorithm – What are they?
• Data structure –
store, represent, and manipulate DATA in the computer.
• Algorithm –
well-defined computational procedure that take
some value(s) as input and produces some value(s) as output.
What are we learning?
• “Cookbook style”
- introduction of the most commonly used data structures
• Transformation of concept to program
• Learn by examples (C and pseudo code)
• LOTS of opportunities (in-class exercises and homework)
Know how to manipulate the data
“graphically”
in a step-by-step manner
Know how to implement the data structure using computer programs
What are we also learning?
• Learn how to analyze the running time of your program / algorithm
• So that you write good, fast, efficient programs
• Some commonly used software development tools
& methodology (if time permits)
We are NOT learning…
• Object-oriented programming – C++ or Java
• C++ is not permitted in all homework assignments and exams – strictly C only
• Some topics that will be covered in
“Algorithm Design and Analysis”
• Advanced graph algorithms
• Divide-and-conquer
• Dynamic programming
Topics to be covered
Before Midterm:
• Stack & Queue
• Linked List
• String Matching
• Sorting
• Tree
(tree traversal and binary search tree)
• Heap
After Midterm:
• Hash table
• Disjoint set
• Sorting in linear time
• Advance tree structure
• Graph basics
• Fast Fourier Transform (tentatively)
• One more topic to be determined later
Experimental DSA: Version 2.0
Teaching with Video Interactive classroom
課堂程式競賽、程式除錯、
分組討論、上台報告…
Uncertain but fun!
Teaching with Video: Why?
• Students have
diverse background and learning speed
• You can adjust your own learning speed,
choose the time and location to learn (sort of)
• We (teaching team) can track how individual and entire class of students are learning
Interactive Classroom: Why?
Teaching Modes
1. Conventional classroom teaching + recording + interactive problem solving
• I will teach in the class (~20 min segments)
• Problem solving with Zuvio (counted toward your grade)
• Recorded video will be available on NTU COOL after the class
Teaching Modes
2. Flipped Classroom
• You are required to watch and learning from the video on
NTU COOL before the class
• 2-3 hr of activities during the class (counted toward your grade)
You watch the video at home
In-class activities during the lecture time
Teaching Modes
3. Video teaching +
interactive problem solving
• Video will be played (~20 min segments)
• Problem solving with Zuvio (counted toward your grade)
• You can also ask us questions about the video in the class
Video is played during the class
In-class activities or problem solving
My teaching style
• GOAL: 80% of the students will understand 80% of the content
• NEW GOAL: hopefully DURING THE CLASS
• I will ask you questions
(or nudge you if you fall asleep during class)
• I will repeat until you understand
(looking for signs of comprehension)
• I tell icy jokes (to keep you awake)
For students
who have not yet got in…
• Maximum number of students: 110
• Priority:
1. 資訊工程系大一雙班(不小心退選了?)
2. 資訊工程系大四(及以上)>大三>大二(單班)>大一
3. 資訊學群研究所
4. 電機資訊學院學生(大四及以上>大三>大二>大一) 5. 其他學院(大四及以上>大三>大二>大一)
• Please fill out the form:
https://goo.gl/forms/VUtwYKE00UDZLc6v1
• Students who have special reasons and REQUIRE to take this course this semester:
please come and talk to me today.
Textbook
Introduction to Algorithms, 3rd edition, 2009, MIT Press by Cormen, Leiserson, Rivest, and Stein
Zuvio
• Allow real-time, in-class problem solving
• Most will be graded, counted toward your grade
• Accounts are already created for registered students
• Login using your NTU email at https://irs.zuvio.tw or download an app (ios or android)
• Default password: 123
• Not yet registered:
http://zuv.io/9795333
NTU COurse OnLine (COOL)
• A new, video-centered NTU online learning platform
• Course video will be available on the platform
• Course materials (slides, reading materials) will also be available there
• Video watching behavior will be tracked
• Log in with your NTU CC account
Teaching Assistants
Name Picture Name Picture
曹爗文 馬揚格
黃晴 劉瀚聲
陳力 劉俊緯
林祐萱 王行健
江緯璿 周逸
TA Hours
Name Time Place Name Time Place
曹爗文 週四
14:00~15:00
地下室紅沙發 馬揚格 週三
19:00~20:00
地下室紅沙發
黃晴 週一
13:30~14:30
地下室紅沙發 劉瀚聲 週二
19:00~20:00
地下室紅沙發
陳力 週五
13:00~14:00
地下室紅沙發 劉俊緯 週五
18:30~19:30
地下室紅沙發
林祐萱 週三
15:30~16:30
地下室紅沙發 王行健 週四
13:20~14:20
地下室紅沙發
江緯璿 週四
18:30~19:30
地下室紅沙發 周逸 TBD 地下室
紅沙發 週一 地下室 Office hours before homework deadline
Grade
• 40% 4 Homework assignments
• 25% In-class performance
• 15% Midterm exam (programming + analysis)
• Covers all content before midterm
• 20% Final exam (programming + analysis)
• Covers all content taught in this semester
• Conversion between raw score & letter grade will be determined by the instructor
• Based on our experience:
“只要作業都有寫有交, 考試考卷每題都有寫不放棄, 就 很難被當“
Homework
In each assignment:
• 2 Programming problems
• Will be graded by online judge
• Maximum of 5 code submissions per day
• Learn how to test your own code!
(do not ask us for test input + output)
• 2-3 additional, non-programming problems
• Proofs, analysis
• Or design data structure / algorithm by “hands”
Homework: references
• We encourage discussion
• Please note references for all problems
• Example 1: Reference: wikipedia page at [URL]
• Example 2: Discussion with B87506055
• Example 3: Reference: book [title] p.xx
• No COPYING!
(write with references in front of you)
• We will use tools to monitor code similarity
• CONFIRMED case of PLAGIARISM:
F grade
Homework: submission
• Electronic submission only
(details to be announced, SVN or git)
• Late submission: up to one day after the deadline
• For all late submission, you get linearly increased penalty for that assignment.
• Example: you submit your homework 3 hours late.
Then you get (1-(3600*3/86400))*100% = 87.5% of your score.
• Detailed rules will be available at the beginning of each homework problem description document.
Exams
• 3-hour exam during the regular midterm & final exam time
• Both exams will feature
• Programming problems + online judge
• Additional hand-written problems
Lecture time
• Official time:
• Lecture: Tuesdays, 678 (13:20-16:20)
• Breaks: 14:10-14:20, 15:10-15:30
• We might do minor adjustments according to how the students react (too sleepy, for example).
• Note the difference with the other class taught by Prof. 張智星 (Tuesdays, 789)
Communications
• Course website:
to be updated
• How do you reach us?
1. Email to dsa1@csie.ntu.edu.tw 2. Facebook Group
https://www.facebook.com/groups/dsa2018spring/
3. Please come to our office hour.
• How do we reach you?
• Email to your NTU mailbox (via CEIBA) [id]@ntu.edu.tw
• Important announcements will also be available on Facebook Group
Typical DSA office hour (when no HW due soon)
TODO
• Get your textbook (required!)
• Make sure that you can receive your NTU emails (via CEIBA or NTU COOL)
• Test out your NTU COOL and Zuvio accounts
• Sleep well and prepare for a productive new semester