+ All Categories
Home > Documents > INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer...

INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer...

Date post: 28-Dec-2015
Category:
Upload: dwight-cain
View: 217 times
Download: 2 times
Share this document with a friend
22
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2 Welcome
Transcript
Page 1: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

INTRODUCTION TO

DATA STRUCTURES AND ALGORITHMS

Marcus FreanSchool of Engineering and Computer Science, Victoria

University of Wellington

CO

MP 1

03

2014-T2 Welcome

Page 2: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

2

PEOPLE Co-ordinator: Marcus Frean [Co227, 463-

5674]Office hours: 9-11am Fridays

Lecturer: Marcus Frean Senior Tutor: Zarinah Amin [Co343, 463-

5936]

Email: [email protected]

Course URL:http://ecs.victoria.ac.nz/Courses/COMP103_2014T2

Class Rep: YOUR NAME HERE?

2

Page 3: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

3

ADMINISTRATION Prerequisite:

You need to have passed COMP102 with a B- or better, or passed COMP112.

If you did not meet this, you can take 102/112 again (COMP102 is offered both trimesters, but not over the summer)

3

Page 4: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

4

HELPING YOU SUCCEED4

Page 5: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

5

LECTURES Mon-Tue-Thur in MCLT103

Slides printouts provided in class also on course webpage I’m looking into video – should be fine

Goals: Provide a framework for your learning Provide explanations/demonstrations

SLIDES NOTES TEXTBOOK

5

Page 6: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

6

TUTORIALS Taken by a successful former student

of 103 Starting next week various locations

What happens: Quick quiz work with peers to understand the tricky

bits The tutor will set topical problems – you

will work out answers, get feedback, discuss with the tutor and each other...

Our aim: help you to understand both lectures and assignments better

6

Page 7: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

7

ASSIGNMENTS Critical for your learning! 10 Assignments, total 20%

out: Mondays (in lecture) due: 3pm on Monday of the

following week (submitted electronically)

Solutions will be available in the Monday lecture too.

Late assignments can’t be marked.

7

Page 8: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

8

ASSIGNMENTSSome THEMES for the assignments:

Graphical editors: painting, diagrams, family trees..

Processing files of TEXT DATA: analysing data files, stories, web pages etc.

Simulations: programs that implement bits of REAL world

Do it yourself – no pairing up You can work in the ECS labs at all sorts of

hours of day and night Register on a lab computer to obtain a user

login (if you haven’t already got one from 102/112)

8

Page 9: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

9

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.

Where and When: to be announced

9

Page 10: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

10

TEXT BOOK JAVA FOUNDATIONS: Introduction to

Program Design & Data Structures - by Lewis, DePasquale and Chase

- 2nd or 3rd edition is best

SAME textbook as comp 102/112 COMPLEMENTS lectures and assignments

(but we do not always follow the text closely)

10

Page 11: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

11

WEB RESOURCES FORUM:

Post questions Collaborate and help each other Course staff monitor and answer when

appropriate NO posting chunks of ANSWERS to

assignments!

all the lecture notes and assignments videos (soon) links to Java reference material tips on getting Java and BlueJ working at

home previous tests and exams

11

Page 12: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

12

ASSESSMENT

10 Assignments [20%] Mid-term test [20%] 45 mins, Thurs

21st August Tutorials – get there! [2%] Final Exam [58%] 2 hours, in exam

period

Mandatory Requirements: Submit reasonable attempt for at least 7

out of 10 Assignments (all submitted assignments may be used for borderline cases and aegrotats)

At least ‘C-’ grade overall to PASS (and at least a D in the exam)

12

Page 13: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

13

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? STATE IT ON THE ASSIGNMENT!

13

Page 14: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

14

SAFETY in the LABS 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! AAAAAaaaaargh!

OOS is rampant and debilitating

Read the POSTERS in the lab See student health quickly if you get

problems

14

Page 15: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

15

QUICK RECAP What was in comp 102/112?

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, and using ArrayList

Revise these concepts to get a head-start!

15

Page 16: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

16

Some Basic Terms

Algorithm: step-by-step process to solve a problem (pseudocode: part code, part English)

Program: actual implementation of an algorithm in a programming language

Data Structure: the way data is structured or organized (example: Array)

Collection: an object that serves as a repository for other objects (like a “container”)

16

Page 17: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

COLLECTIONS Big chunks of real life involve what

we could call Collections, and this is reflected in programs written to help real life: Collections of books, music, photos,

clothes, ... Organized in a way to ease access and

use items

Some STANDARD types of Collections we use in our programs: List, Set, Bag, Stack, Queue, Trees, Map

17

Page 18: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

18

Varieties of collection Different structures

No structure – just a collection of values Linear structure of values – order

matters Hierarchical structures

Different constraints for accessing elements get, put, remove anywhere get, put, remove only at the ends, or

only at top (and so on).

18

Page 19: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

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 about: The fundamental data structures of

computer science The crucial algorithms on those

structures Especially the efficiency of those

algorithms

19

Page 20: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

20

Course Overview – Part 1Programming with Linear collections

Different Kinds of collections: Lists, Sets, Bags, Maps, Stacks, Queues,

Priority Queues Implementing, using, sorting, and

searching these Linear collections...

20

Page 21: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

21

Course Overview – Part 2Programming with Hierarchical

collections

Building, traversing Tree-structured collections

Re-implementing linear collections with binary search trees with partially ordered trees with hash tables

21

Page 22: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Marcus Frean School of Engineering and Computer Science, Victoria University of Wellington COMP 103 2014-T2.

22

RECURRING THEMES Good Design Choosing appropriate

implementationsHow do you get it right first

time?

Efficiency How fast is it?How much memory does it

take?Analysis and benchmarking

22


Recommended