CS302 Data Structures Dr. George Bebis Spring 2012 General Information • Instructor: Dr.

Download Report

Transcript CS302 Data Structures Dr. George Bebis Spring 2012 General Information • Instructor: Dr.

CS302 Data Structures
Dr. George Bebis
Spring 2012
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
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.
Prerequisites
• C or above in CS202
• If you do not meet the prerequisite requirements
for this course, you should see me immediately.
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, AddisonWesley.
Course Objectives
• Introduce you to fundamental and advanced data
structures.
Algorithm Analysis
• 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.
Course Outline (tentative)
• C++ Review
–
–
–
–
Call by value/reference
Dynamic Array Allocation
Constructors/Destructors/Copy-constructors
Operator Overloading
Study for next time!
Course Outline (tentative)
• Introduction to Image Processing and Computer
Vision
–
–
–
–
–
What are IP and CV?
Relation to other fields
Challenge
Image Representation
Applications
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
Course Outline (tentative)
• Stacks
TOP OF THE STACK
array-based
linked-list-based
Course Outline (tentative)
• Queues
array-based
linked-list-based
Course Outline (tentative)
• Unsorted Lists
– array-based
• Sorted Lists
– array-based
– Binary search: very efficient
search when using arrays!
Course Outline (tentative)
• Unsorted Lists
– linked-list-based
• Sorted Lists
– linked-list-based
Course Outline (tentative)
• Recursion
Comb (6,4)
=
Comb (5, 3)
=
Comb (4,2)
Comb (4, 3)
+
=
Comb (3, 1)+
=
3
+ Comb (2,
+ 1) + Comb (2, 2) + +Comb (2, 1) + Comb (2,
+ 2) +
=
3
+
=
Comb (3, 2)
+
2
+
Comb (3, 2)
+
1
+
Comb (5, 4)
+
2
+
+
Comb (4, 3)
+
Comb
+ (3, 3)
+
1
+
Comb
+ (3, 2)
Comb (4, 4)
+
Comb
+ (3, 3) +
+
1
1
+ +Comb (2, 1) + Comb (2,
+ 2) +
1
+
1+
1
+
+
1
+
1
2
1
+
Course Outline (tentative)
• Binary Search Trees
– Very efficient for searching!
• Heaps
– Very efficient for
implementing priority queues
5
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)
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
6
24
10
10
12
6
24
12
36
Course Outline (tentative)
• Advanced Data Structures for Searching
– Exact Query, Range Query, Nearest Neighbor Query
– Multi-dimensional keys
Range Trees
kD Trees
Course Outline (tentative)
• Advanced Data Structures for Searching
– Exact Query, Range Query, Nearest Neighbor Query
– Multi-dimensional keys
h
Hashing
k  h(k)
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
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
Programming Language/Environment
• We will be using C++
• Either Windows or Unix/Linux
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.
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.
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
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/
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)
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.
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.
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)
Questions?