Question: 1 . Apply Kruskal's algorithm to find the minimum spanning tree. Use makeset ( x ) , find ( x ) , and union (
Apply Kruskal's algorithm to find the minimum spanning tree. Use makeset x find x and union xy to determine if there are cycles. Using the forest representation of subsets taught in class, show the tree after all edges have been processed do not use path compression When processing edges, make sure lower letters appear first ie use AB not BA When drawing the tree, put lower letters in left subtrees so that all the vertices in a level are sorted alphabetically from left to right.
Edges in MST:
Weight of MST:
Final tree resulting from unionfind algorithm:
Use Dijkstra's algorithm to find the shortest path between nodes A and FStart at A end at F; if two neighbors are at the same distance, pick first the neighbor with the lowest letter in alphabetical order
Path:
Distance:
a Construct a Huffman tree for the following data:
b Encode ABACABAD using the tree you generated for a
c Decode using the tree you generated for a
d What compression gain percent of improvement do we get by using Huffman encoding instead of a fixedlength encoding scheme assume the fixedlength scheme would require bits for each character
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
