Please show work for upvote!
18. Given a weighted graph G, sort the edges from heaviest to lightest. Go through the edges one by one and remove the edges if they do not disconnect the graph. Does this algorithm find a minimum spanning tree?
19. True or false:
Every tree is a bipartite graph. Every bipartite graph is a tree. Every cycle graph is bipartite. Every graph with n vertices and m edges has a cycle.
20. Using the optimal greedy algorithm described in class, solve the following instance of Interval Scheduling. Show enough work to convince me that you are using the algorithm and that your answer isn't just a guess or arrived at via brute force.
21. Solve the following instance of Interval Scheduling: {(0,5), (2,3), (4,6), (6,12), (8,13), (10,11), (12,14), (14,20), (16,21), (18,19)}.
22. Using the optimal greedy algorithm taught in class, solve the following problem instance of Channel Allocation: |={1,2), (1,4), (2,5), (3,11), (5,9), (6,8), (10,14), (12,19), (14,22), (15,20), (16,18), (17,18), (19,21)}.
23. Schedule lectures in minimum classrooms: {(9,10:30), (9,12:30), (9,10:30), (11,12:30), (11,4:30), (1,2:30), (1,2:30), (3,4:30), (3,4:30)}.
24. Assume that you have a set of jobs where each has a processing time and a deadline (p_i, d_i). Explain how you could schedule the jobs on a single machine to minimize the maximum lateness. Execute your procedure on the instance: {(1, 11), (2, 8), (3, 6), (5, 9), (6, 4), (8, 12)}.
25. Schedule all jobs to minimize maximum lateness. Job 1: time 3, deadline 6. Job 2: time 8, deadline 9. Job 3: time 6, deadline 15.
26. What's the Huffman code for the message below: BCCABDDAECCBBAEDDCCB.