New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Data Structures

by: Melissa Metz

Data Structures EECS 560

Melissa Metz
GPA 3.74

Jun Huan

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Jun Huan
Class Notes
25 ?




Popular in Course

Popular in Elect Engr & Computer Science

This 15 page Class Notes was uploaded by Melissa Metz on Monday September 7, 2015. The Class Notes belongs to EECS 560 at Kansas taught by Jun Huan in Fall. Since its upload, it has received 27 views. For similar materials see /class/184023/eecs-560-kansas in Elect Engr & Computer Science at Kansas.

Similar to EECS 560 at KU

Popular in Elect Engr & Computer Science


Reviews for Data Structures


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/07/15
Relax operation du the distance from the source to the node u getting updated during single source shortest path computation 11u the parent of u for trace back Wvu the edge weight from V to u if there is no edge the weight is positive in nity 5u is the shortest distance from source to the node u Relax u V If du gt dv wvu du dv wv u 11u V Bellman ford algorithm for graphs with negatively weighted edges Single source shortest path G s For each u e V du positive infinity ds 0 ForI l V For each u v e E Relaxuv Dijkstra39s Algorithms S lt 0 T lt VG initialize a priority queue While i 0 u lt extract MinQ S lt S U u for each V e Adj u relaxuvw if we use array to implement Dijkstra s algorithms Initialize V extract Min V V relax 1E Therefore OVVVEOV2 Use minheap V lgVV lgVE Therefore OVV1g V E 1g V OE 1g V using Fibonacci heap OE V 1g V All Pairs Sh01test Path Johnson39s Algorithm Johnson s algorithm contains three steps 1 For a graph G construct a new graph G with an additional node U and create directed edges from U to each and every node in G with weight 0 2 Compute the weight potential of the nodes in G where the weight The weight of a node X hX is the shortest distance from U to X 3 Update the weight of each edge W W with the following formula W uv hll39hV W uv Claims 1 ifuV ifthe shortest path is G uV ifthe shortest path is C 2 W W 2 0 Implementation Run Bellmanford algorithm VVE to obtain the potential of each node Run Dijkstra s algorithm V times to obtain all pair shortest distance Total running time V E 1g V Key de nitions A binary relation R for a set S is a set of SxS or RE SxS 1 For example SN natural numbers R is a divisor of3 is a divisor of 6 3R6 2 lt for real numbers R 3 is less than 6 3lt6 A relation is o re exive if aRa for all a e S o Symmetric if aRb ltgt bRa o Transitive if aRb and bRc gt aRc Re exive Symmetric Transitive Is a divisor of Yes No Yes lt No No Yes S Yes No Yes Assume all the undergraduate students have only one advisor sharing the same advisor is a binary relation de ned on the set of students Sharing the same advisor Re exive Yes Symmetric Yes Transitive Yes We call a re exive symmetric and transitive relation an equivalence relation If we have an equivalence relation we could partition the set into a group of subsets such that S1 U S2U SnS Si 0 Sj Si ifij for all ij 6 Ln and Q otherwise for example Susan gt Dr Wang Mike gt Dr Smith Tome gt Dr Singh John gt Dr Smith Susan Disjoint set is a data structure for equivalence relation between two operations 1 find returns a unique ID such that ndX ndy if and only if X and y belong to the same class 2 Union merges two classes For the time being lets assume that the elements are called 0123k k D N Design options Hash table or look up table Find 0 1 Union On Tree representation merge gives merge Gives Find operation returns the root of the tree find 1 ONJkJkt It Ot I union 03 01 union 13 Nothing Binomial Tree De nition 0 B0 is a single node 0 Bk is de ned recursively o Binomial tree has heaporder property 13k xquot Bo Bkl Binomial heap is a set of binomial trees with different ranks Binomial Tree Binomial Heap Yes Yes Yes Yes N0 N0 6 No Yes Q E 9 aka a a Merge Operation Rule 1 Merge two trees with different size Rule 11 Merge two trees with same size Select the one with the smallest root and attach the other one to the root as the right most child example 1 exampleZ lt3 00 Insert operation recursively apply rule I and rule II Insert 10 Insert 9 Insert 8 Insert 7 Insert 6 DeleteMin 1 Find the Min Root 2 Delete the Root 3 Merge Example Deleting the min Merging Step1 Step 2 Step 3


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.