Fill This Form To Receive Instant Help
Homework answers / question archive / WRIGHT STATE UNIVERSITY Department of Computer Science and Engineering CS7200: Algorithm Design and Analysis Spring 2021 Midterm (30 pts [Stable Matching Problem: 4 + 4 + 1 + 1 pts] Consider an instance of the stable marriage problem with the priority lists: Albert Diane Emily Fergie Bradley Diane Emily Fergie Charles Diane Emily Fergie Diane Albert Bradley Charles Emily Albert Charles Bradley Fergie Charles Bradley Albert Is {Albert-Diane, Bradley-Emily, Charles-Fergie} a stable matching? If yes, then provide an informal justification
WRIGHT STATE UNIVERSITY
Department of Computer Science and Engineering
CS7200: Algorithm Design and Analysis
Spring 2021 Midterm (30 pts
[Stable Matching Problem: 4 + 4 + 1 + 1 pts]
Consider an instance of the stable marriage problem with the priority lists:
Albert |
Diane |
Emily |
Fergie |
Bradley |
Diane |
Emily |
Fergie |
Charles |
Diane |
Emily |
Fergie |
Diane |
Albert |
Bradley |
Charles |
Emily |
Albert |
Charles |
Bradley |
Fergie |
Charles |
Bradley |
Albert |
(b) Determine man-optimal and woman-optimal solutions.
Man-optimal:
Woman-optimal:
(c) Number of functions from the set {Albert, Bradley, Charles} to the set {Diane, Emily, Fergie} =
(d) Number of perfect matchings from the set {Albert, Bradley, Charles} to the set {Diane, Emily, Fergie} =
Original Coin Exchange Problem: Given coins of denominations, say, 1, 5, 10, and 25, find the minimum number of coins that add up to a given amount of money.
YES / NO
GREEDY SOLUTION:
OPTIMAL SOLUTION:
YES / NO
GREEDY SOLUTION:
OPTIMAL SOLUTION:
State whether the following are true or false providing brief justification.
( = is to be interpreted as belongs to.)
TRUE / FALSE
TRUE / FALSE
TRUE / FALSE
TRUE / FALSE
(Subscript of log is the base (e.g., 2, e, 10).)
TRUE / FALSE
4) [Divide and Conquer: 5 pts]
An odd-length array A[1...2n+1] of distinct numbers is bouncy if
A[1] > A[2] < A[3] > A[4] < ...> A[2n] < A[2n + 1].
The inequality constraints are required only of adjacent numbers.
Given an array B[1…2n+1] of distinct numbers, describe a linear-time algorithm that outputs a reordering of numbers belonging to the input array B in A[1...2n+1] such that A is bouncy. Your solution will be graded on its clarity and correctness. Base your solution on the ideas underlying Quicksort Algorithm and you may assume that Median can be computed in linear-time using Quicksort logic.
Already member? Sign In