CSE 332 Team
Instructors: Richard Anderson, Steve Seitz
TAs:
CSE 332: Data Structures
W inter 2014
Richard Anderson, Steve Seitz
Lecture 1
Jacob
Gile
Hyein
Kim
Aaron
Nech
Daniel
Noteboom
David
Swanson
Sam
W ilson
2
Todays Outline
Course Information
Intr
2/11/2014
Announcements (2/12/14)
Exams
Return at end of class
Mean 62.5, Median 63, sd 7.2
HW 5 available
Project 2B due Thursday night
Reading for this lecture: Chapter 9.
CSE 332: Graphs
Richard Anderson, Steve Seitz
W inter 2014
1
2
Graphs
Graph
2/25/2014
Announcements
Project 3 Part A due Thursday night
CSE 332: Parallel Sorting II
Richard Anderson, Steve Seitz
Winter 2014
1
2
2nd Pass:
Review: Parallel prefix
Passing partial sums back down
Sum [0,7]:
Sum<0:
Sum [0,7]:
Sum [0,3]:
Sum [2,3]:
Sum
CSE 332:
Concurrency and Locks
Richard Anderson, Steve Seitz
Winter 2014
1
Banking
Two threads both trying to withdraw(100) from the same account:
Assume initial balance 150
class BankAccount cfw_
private int balance = 0;
int getBalance()
cfw_ return bal
2/18/2014
Announcements (2/19/2014)
CSE 332:
HW #5 due today
HW #6 out today
Read Grossman 2.1-3.4
Intro to Parallelism:
Multithreading and Fork-Join
Richard Anderson, Steve Seitz
Winter 2014
1
2
Sequential
Parallel Sum
Sum up N numbers in an array
S
2/20/2014
New Story: Shared Memory with Threads
CSE 332:
Heap for all objects
and static fields, shared
by all threads
Threads, each with own unshared
call stack and program counter
Analysis of Fork-Join Parallel
Programs
pc=0x
Richard Anderson, Steve Sei
Announcements
Last week of the quarter lots of
deadlines
Exam Monday
CSE 332: Data Structures
Disjoint Set Union/Find
Richard Anderson, Steve Seitz
Winter 2014
2
Disjoint Set ADT
Application: Building Mazes
Data: set of pairwise disjoint sets.
Require
CSE 332:
Locks and Deadlocks
Richard Anderson, Steve Seitz
Winter 2014
1
Recall Bank Account Problem
class BankAccount cfw_
private int balance = 0;
synchronized int getBalance()
cfw_ return balance;
synchronized void setBalance(int x)
cfw_ balance = x;
Announcements
Reading for this lecture: Chapter 8.
CSE 332: Disjoint Set Union/Find
(and finishing Dijkstras algorithm)
Richard Anderson, Steve Seitz
Winter 2014
2
http:/www.cs.utexas.edu/users/EWD/
Edsger Wybe Dijkstra was one of the most
influential m
Announcements (3/5/14)
HW 7 due today
HW 8 out today
Reading for this lecture: Chapter 9.
CSE 322: Shortest Paths
Richard Anderson, Steve Seitz
Winter 2014
2
Locking a Hashtable
Consider a hashtable with
Wrapping up concurrency
many simultaneous looku
How fast can we sort?
CSE 332:
Sorting Bound, and Radix Sort
Heapsort, Mergesort, Heapsort, AVL sort all have
O(N log N) worst case running time.
These algorithms, along with Quicksort, also have
O(N log N) average case running time.
Richard Anderson, Ste
CSE 326: Data Structures
AVL Trees
Richard Anderson, Steve Seitz
Winter 2014
1
Announcements
HW 2 due now
HW 3 out today
2
Balanced BST
Complexity of operations depend on tree height
For a BST with n nodes
Want height to be ~ log n
Balanced
But balanc
1/17/2014
Announcements
CSE 332: Data Structures
Binary Search Trees
HW #2 due next Wednesday
Project 2 out today
can work with partners (optional). Must sign up
harder than project 1 (16 files to implement)
start early!
Richard Anderson, Steve Seitz
Administrative
CSE 332: Data Structures
P1A due tonight (Monday) by 11:59pm
via catalyst
Priority Queues Binary Heaps
HW1 due beginning of class Wednesday
Reading for this week: Chapter 6.1-6.5
Richard Anderson, Steve Seitz
W inter 2014
1
2
Priority Q
CSE 332: Data Structures
Priority Queues Binary Heaps
Richard Anderson, Steve Seitz
Winter 2014
1
Administrative
P1A due tonight (Monday) by 11:59pm
via catalyst
HW1 due beginning of class Wednesday
Reading for this week: Chapter 6.1-6.5
2
Recall Queu
Announcements
Due next week
CSE 332: Data Structures
Project 1A, Monday, 11:59 PM
Homework 1, Wednesday, beginning of class
Project 1B, Thursday, 11:59 PM
Asymptotic Analysis II
Richard Anderson, Steve Seitz
Winter 2014
2
Binary Search Analysis
Linear Se
Announcements
Homework requires you get the textbook
(either E2 or E3)
CSE 332: Data Structures
Go to Thursdays sections
Asymptotic Analysis
Homework #1 out on today (Wednesday)
Due at the beginning of class
next Wednesday(Jan 17).
Richard Anderson, S
CSE 332:
Hash Tables
Richard Anderson, Steve Seitz
Winter 2014
1
Announcements (1/29/14)
HW #3 due now
HW #4 out today
Project 2A due Thursday night.
Reading for this lecture: Chapter 5.
2
AVL find, insert, delete: O(log n)
Suppose (unique) keys between 0
Announcements (1/29/14)
CSE 332:
Hash Tables
Richard Anderson, Steve Seitz
Winter 2014
HW #3 due now
HW #4 out today
Project 2A due Thursday night.
Reading for this lecture: Chapter 5.
1
AVL find, insert, delete: O(log n)
Suppose (unique) keys between 0 a
CSE 332: Sorting
Richard Anderson, Steve Seitz
Winter 2014
Announcements (2/3/14)
Reading for this lecture: Chapter 7.
HW 4 due Wednesday
no new HW out this week
Midterm next Monday
2
Sorting
Input
an array A of data records
a key value in each dat
1/26/2014
Announcements
This week:
HASHING
Next week:
SORTING
CSE 326: Data Structures
B-Trees and B+ Trees
Upcoming dates
Wednesday: HW 3 Due
Thursday (11:59 pm): Project 2, Part A Due
Monday, February 10. Midterm
Richard Anderson, Steve Seitz
Wi
Announcements (2/3/14)
Reading for this lecture: Chapter 7.
HW 4 due Wednesday
CSE 332: Sorting
no new HW out this week
Midterm next Monday
Richard Anderson, Steve Seitz
Winter 2014
2
Sorting
Consistent Ordering
Input
The comparison function must pr
Announcements
Review session for the final
Saturday, noon, EEB 125
CSE 332:
NP Completeness
Final
Monday, March 17, Johnson 102
4:30 PM or 6:30 PM
110 minutes, closed book
Richard Anderson, Steve Seitz
Winter 2014
2
Try it with paper and pencil
Your