COMP 103 INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS

  • Slides: 24
Download presentation
COMP 103 INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Alex Potanin (based on slides by

COMP 103 INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Alex Potanin (based on slides by Rashina Hoda, Marcus Frean, and Peter Andreae) School of Engineering and Computer Science

2 PEOPLE Co-ordinator: Alex Potanin [Co 262, 463 5302] Office hours: By Appointment via

2 PEOPLE Co-ordinator: Alex Potanin [Co 262, 463 5302] Office hours: By Appointment via Email Lecturer: Senior Tutor: same as above Ambreen Khan-Evans [Co 340, 463 5936] Email: firstname. lastname@ecs. vuw. ac. nz School Office is shared with SMSOR: Co 358 Course URL: http: //ecs. victoria. ac. nz/Courses/COMP 103_2012 T 1 2 Class Rep: YOUR NAME HERE!

3 ADMINISTRATION Prerequisite: You should have PASSED comp 102 (or have been granted a

3 ADMINISTRATION Prerequisite: You should have PASSED comp 102 (or have been granted a prerequisite waiver) If you failed comp 102, you can take it again (comp 102 and comp 103 offered both trimesters, not summer) If you got a ‘C’ in comp 102 you’re likely to find comp 103 very difficult! 3

4 4 HELPING YOU SUCCEED

4 4 HELPING YOU SUCCEED

5 103 timetable http: //ecs. victoria. ac. nz/Courses/COMP 103_2011 T 2/Timetable Lectures: Labs with

5 103 timetable http: //ecs. victoria. ac. nz/Courses/COMP 103_2011 T 2/Timetable Lectures: Labs with tutors: Tutorials and Help desk: M-W-F 11: 00 -11: 50 am indicated in red to be announced soon

6 LECTURES Mon-Wed-Fri 11: 00 -11: 50 am, HMLT 002 Slides printouts provided in

6 LECTURES Mon-Wed-Fri 11: 00 -11: 50 am, HMLT 002 Slides printouts provided in class also on course webpage Goals: Provide a framework for your learning Provide explanations/demonstrations 6 SLIDES NOTES TEXTBOOK

7 TUTORIALS Taken by David Wang Starting next week location, to be announced What

7 TUTORIALS Taken by David Wang Starting next week location, to be announced What happens: “Lecture stuff”, but from a different viewpoint. Ask questions and get answers – maybe even email him beforehand with suggestions/ questions? Practice with exam-like questions Work through assignment issues together 7

8 ASSIGNMENTS Critical for your learning! 9 Assignments, total 20% Must submit reasonable attempt

8 ASSIGNMENTS Critical for your learning! 9 Assignments, total 20% Must submit reasonable attempt at least 6 of 9 Assignments out: Fridays in lecture (except Good Friday) Assignments due: FOLLOWING Fridays, at 11 am (electronically, before lecture) Late assignments cannot be accepted once solutions are made available! 8

9 ASSIGNMENTS Some THEMES for the assignments: Graphical editors: painting, diagrams, family trees… Processing

9 ASSIGNMENTS Some THEMES for the assignments: Graphical editors: painting, diagrams, family trees… Processing files of TEXT DATA: analysing log files, stories, web pages etc Simulations: programs that implement bits of REAL world 9 Do it yourself – NO pairing like comp 102!

10 LABS 10 You can work in the ECS labs at all sorts of

10 LABS 10 You can work in the ECS labs at all sorts of hours of day and night, but. . . Starting next week, there will be teaching assistants in the lab at specific times, to help you with the Assignment work. Register on a lab computer to obtain a user login (if you haven’t already got on from 102) At the given times, labs are for use of 103 students: if over-full with others, they can/will be booted out.

11 HELP DESK Intended for small groups, of about 1. . . One-on-one help

11 HELP DESK Intended for small groups, of about 1. . . One-on-one help with assignment work. Close to the labs but not in them: print out your code, highlight what you want to discuss. 11 Day/Time/Venue: To be announced

12 TEXT BOOK 12 JAVA FOUNDATIONS: Introduction to Program Design & Data Structures -

12 TEXT BOOK 12 JAVA FOUNDATIONS: Introduction to Program Design & Data Structures - by Lewis, De. Pasquale and Chase - the 2 nd edition is best SAME textbook as comp 102 COMPLEMENTS lectures and assignments (but we do not always follow the text closely)

13 WEB RESOURCES FORUM: Post questions Collaborate and help each other Tutors and Lecturers

13 WEB RESOURCES FORUM: Post questions Collaborate and help each other Tutors and Lecturers monitor and answer when appropriate NO posting chunks of ANSWERS to assignments! 13 Copies of lecture SLIDES and ASSIGNMENTS LINKS to Java reference material TIPS on getting Java and Blue. J working at home.

14 ASSESSMENT 9 Assignments [20%] Mid-term Test [20%] 45 mins, during Monday lecture in

14 ASSESSMENT 9 Assignments [20%] Mid-term Test [20%] 45 mins, during Monday lecture in week 7 Final Exam [60%] 3 hours, during exam period Mandatory Requirements: Submit reasonable attempt for at least 6 out of 9 Assignments (all submitted assignments may be used for borderline cases and aegrotats) 14 At least ‘C’ grade overall to PASS

15 PLAGIARISM UNACCEPTABLE We want you to LEARN, TALK to each other, learn TOGETHER,

15 PLAGIARISM UNACCEPTABLE We want you to LEARN, TALK to each other, learn TOGETHER, and HELP each other, but PLAGIARISM is UNACCEPTABLE! Got help from anybody other than lecturer or tutor? STATE IT ON THE ASSIGNMENT! Copied bits of code from anywhere other than lecture slides or textbook? 15 STATE IT ON THE ASSIGNMENT!

16 SAFETY in the LABS 16 Computer Labs are the most dangerous labs in

16 SAFETY in the LABS 16 Computer Labs are the most dangerous labs in the university! More people are injured at computer labs than in any other science lab! Your computer at home is probably even more dangerous! OOS is rampant and debilitating Read the POSTERS in the lab See student health quickly if you get problems

QUICK RECAP 17 What have you have SEEN and DONE in comp 102? Classes,

QUICK RECAP 17 What have you have SEEN and DONE in comp 102? Classes, Objects, Fields, Methods Conditionals, Loops (if, if. . . else, for, while, do. . while) Using variables, reading input, writing, drawing Algorithm design Using GUI’s (Graphical User Interface) Arrays QUICK TIP: Revise these concepts to get a head-start! 17

18 18 Some Basic Terms Algorithm: step-by-step process to solve a Program: actual implementation

18 18 Some Basic Terms Algorithm: step-by-step process to solve a Program: actual implementation of an Data Structure: the way data is structured Collection: an object that serves as a problem (pseudocode: part code, part English) algorithm in a programming language or organized (example: Array) repository for other objects (like a “container”)

19 COLLECTIONS What kinds of Collections of data do you deal with? Collections of

19 COLLECTIONS What kinds of Collections of data do you deal with? Collections of books, CDs, coins. . . Organized in a way to ease access and use items Some STANDARD types of Collections we use in our programs List, Set, Stack, Queue, Trees, Map. . .

20 COLLECTIONS Different types of values Different structures No structure – just a collection

20 COLLECTIONS Different types of values Different structures No structure – just a collection of values Linear structure of values – order matters Hierarchical structures . . . Different constraints for accessing elements get, 20 put, remove anywhere get, put, remove only at the ends, or only at top, or. . .

21 WHAT CAN YOU EXPECT. . . Using and understanding the current Java Collections

21 WHAT CAN YOU EXPECT. . . Using and understanding the current Java Collections Library Creating your own Collections! How to add, remove, search, sort, . . . efficiently So this is what 103 is all about: Fundamental data structures Fundamental algorithms Measuring fundamental efficiency of algorithms

22 Course Overview – Part 1 Programming with Linear collections Different Kinds of collections:

22 Course Overview – Part 1 Programming with Linear collections Different Kinds of collections: Lists, 22 Sets, Stacks, Queues, Priority Queues Implementing, using, sorting, searching Linear collections. . .

23 Course Overview – Part 2 Programming with Hierarchical collections Building, traversing Tree structured

23 Course Overview – Part 2 Programming with Hierarchical collections Building, traversing Tree structured collections Re-implementing linear collections with 23 binary search trees with partially ordered trees with hash tables

24 RECURRING THEMES Good Design Choosing appropriate implementations How do you get it right

24 RECURRING THEMES Good Design Choosing appropriate implementations How do you get it right first time? 24 Efficiency How fast is it? How much memory does it take? Analysis and benchmarking