CS302 Data Structures

31
CS302 Data Structures Dr. George Bebis Spring 2012

description

CS302 Data Structures. Dr. George Bebis Spring 2012. General Information. Instructor: Dr. George Bebis Of fi ce: 235 SEM Phone: 784-6463 E-mail: [email protected] Office Hours: TR 2:30pm - 3:45pm or by appointment Course Web Page: http://www.cse.unr.edu/˜bebis/CS302. - PowerPoint PPT Presentation

Transcript of CS302 Data Structures

Page 1: CS302  Data Structures

CS302 Data Structures

Dr. George BebisSpring 2012

Page 2: CS302  Data Structures

General Information

• Instructor: Dr. George Bebis

• Office: 235 SEM• Phone: 784-6463 • E-mail: [email protected]

• Office Hours: TR 2:30pm - 3:45pm or by appointment

• Course Web Page: http://www.cse.unr.edu/˜bebis/CS302

Page 3: CS302  Data Structures

General Information (cont’d)

• Assistant: Emily Hand

• Office: 314 LME (Computer Vision Lab)• E-mail: [email protected]

• Office Hours: Wednesday 4:00pm – 6:00pm Friday, 1:00pm – 4:00pm.

Page 4: CS302  Data Structures

Prerequisites

• C or above in CS202

• If you do not meet the prerequisite requirements for this course, you should see me immediately.

Page 5: CS302  Data Structures

Texts• Required

– C++ Plus Data Structures by N. Dale, Jones and Bartlett Publishers, 4th edition, 2007.

• Optional– Data Structures with C++ by W.Ford and

W.Topp, Prentice Hall.– Data Structures and Program Design in C++ by

R.Kruse and A. Ryba, Prentice Hall.– Data Structures and Other Objects Using C++

by M.Main and W.Savitch, Addison-Wesley.

Page 6: CS302  Data Structures

Course Objectives

• Introduce you to fundamental and advanced data structures.

• Discuss different implementations and analyze algorithm efficiency in terms of time and memory.

• Expose you to the field of image processing where data structures could be used to efficiently solve many practical problems.

Algorithm Analysis

Page 7: CS302  Data Structures

Course Outline (tentative)

• C++ Review – Call by value/reference– Dynamic Array Allocation– Constructors/Destructors/Copy-constructors– Operator Overloading

Study for next time!

Page 8: CS302  Data Structures

Course Outline (tentative)

• Introduction to Image Processing and Computer Vision– What are IP and CV?– Relation to other fields– Challenge– Image Representation– Applications

Page 9: CS302  Data Structures

Course Outline (tentative)

• Analysis of Algorithms

– Predict how running time increases as the size of the problem increases.

– Should be independent of machine, programming style.

– Best/Average/Worst

Page 10: CS302  Data Structures

Course Outline (tentative)

• Stacks

array-based

linked-list-based

TOP OF THE STACK

Page 11: CS302  Data Structures

Course Outline (tentative)

• Queues array-based

linked-list-based

Page 12: CS302  Data Structures

Course Outline (tentative)

• Unsorted Lists – array-based

• Sorted Lists– array-based– Binary search: very efficient

search when using arrays!

Page 13: CS302  Data Structures

Course Outline (tentative)

• Unsorted Lists– linked-list-based

• Sorted Lists– linked-list-based

Page 14: CS302  Data Structures

Course Outline (tentative)

• Recursion

+=

=

=

=

=

=

+ +

+ + + +

++ + + + +

+

+

+

+

+ + +

+ + + + + + +

+ +

+

++++++++3

3

C om b (3 , 1 )

2

C o m b (2 , 1 )

1

C om b (2 , 2 )

C o m b (3 , 2 )

C om b (4 ,2 )

2

C o m b (2 , 1 )

1

C o m b (2 , 2 )

C o m b (3 , 2 )

1

1

C o m b (3 , 3 )

C om b (4 , 3 )

C om b (5 , 3 )

2

C om b (2 , 1 )

1

C om b (2 , 2 )

C om b (3 , 2 )

1

1

C om b (3 , 3 )

C om b (4 , 3 )

1

1

1

C om b (4 , 4 )

C o m b (5 , 4 )

C o m b (6 ,4 )

Page 15: CS302  Data Structures

Course Outline (tentative)

• Binary Search Trees– Very efficient for searching!

• Heaps– Very efficient for

implementing priority queues

5

Page 16: CS302  Data Structures

Course Outline (tentative)

• Graphs (i.e., array-based an linked-list-based)– Searching (i.e., DFS and BFS)– Shortest Paths (i.e., Dijkstra’s and Bellman-Ford

algorithms)

Page 17: CS302  Data Structures

Course Outline (tentative)• Sorting

– Selection Sort, Bubble Sort, Insertion Sort

(slow but easy to understand)

– Heapsort, Mergesort, Quicksort

(fast but more complicated)

– Linear Time Sorts (under assumptions)

36

24

10

6

12

6

10

12

24

36

Page 18: CS302  Data Structures

Course Outline (tentative)

• Advanced Data Structures for Searching– Exact Query, Range Query, Nearest Neighbor Query– Multi-dimensional keys

Range Trees kD Trees

Page 19: CS302  Data Structures

Course Outline (tentative)

• Advanced Data Structures for Searching– Exact Query, Range Query, Nearest Neighbor Query– Multi-dimensional keys

Hashing

k h(k)

h

Page 20: CS302  Data Structures

Exams and Assignments

• Two exams (midterm, final) – Final will be comprehensive.

• 6-7 Quizzes– Will be announced in advance.

• 4-5 Programming assignments– Will be done in teams of two students/team

• Homework will be assigned but not graded– Solutions will be posted on the web– Study homework for quizzes and exams

Page 21: CS302  Data Structures

Grading• Midterm: ~ 25%• Final: ~ 25%• Quizzes~ 20%• Programming assignments: ~ 30%

A 90 and above B 80-89 C 70-79 D 60-69 F<59

Page 22: CS302  Data Structures

Programming Language/Environment

• We will be using C++

• Either Windows or Unix/Linux

Page 23: CS302  Data Structures

Course Policies

• Lecture slides, assignments, and other useful information will be posted on the web.

• If you miss a class, you are responsible for all material covered or assigned in class.

• A missed quiz/exam may be made up only if it was missed due to an extreme emergency.

Page 24: CS302  Data Structures

Course Policies

• Both team members are expected to fully understand the structure of the code and the implemented algorithms.

• Discussion of the programming assignments is allowed and encouraged.

• However, team members are expected to do their own work.

Assignments which are too similar will receive a zero.

Page 25: CS302  Data Structures

Course Policies (cont’d)

• No late programming assignments will be accepted unless there is an extreme emergency.

• No incomplete grades (INC) will be given in this course

Page 26: CS302  Data Structures

Extra Credit

• Class participation is highly encouraged and will be rewarded with extra credit.

• Additional extra credit will be offered to the students who attend the departmental colloquia.

• You will be reminded in class about upcoming talks but you should also check the colloquia page on a regular basis

http://www.cse.unr.edu/get-involved/colloquia/

Page 27: CS302  Data Structures

Academic Dishonesty

• Your continued enrollment in this course implies that you have read the section on Academic Dishonesty found in the UNR Student Handbook and that you subscribe to the principles stated therein.

http://www.unr.edu/stsv/acdispol.html

Remember: I can Google too (and I have the copies of everybody’s assignments from the last four years this class was offered)

Page 28: CS302  Data Structures

Disability Statement

• Any student with a disability needing academic accommodations is requested to speak with me or contact the Disability Resource Center (Thompson Building, Suite 101), as soon as possible to arrange for appropriate accommodations.

Page 29: CS302  Data Structures

Unauthorized class audio recording or video-taping

• Surreptitious or covert video-taping of class or unauthorized audio recording of class is prohibited by law and by Board of Regents policy. 

• This class may be videotaped or audio recorded only with the written permission of the instructor.  

• In order to accommodate students with disabilities, some students may have been given permission to record class lectures and discussions. 

• Therefore, students should understand that their comments during class may be recorded. 

Page 30: CS302  Data Structures

Important Dates

• March 15, 2012 – Midterm exam • March 23, 2012 – Final Day to Drop Classes• March 17-25, 2012 – Spring Break (no classes)• May 9, 2012 – Prep Day • May 10, 2012 - Final exam (12:30pm – 2:30pm)

Page 31: CS302  Data Structures

Questions?