Question 1
We wish to cluster the following set of points:
into 10 clusters. We initially choose each of the green points (25,125), (44,105), (29,97), (35,63), (55,63), (42,57), (23,40), (64,37), (33,22), and (55,20) as a
centroid. Assign each of the gold points to their nearest centroid.
(Note: the scales of the horizontal and vertical axes differ, so you
really need to apply the formula for distance of points; you can't just
"eyeball" it.)
Then, recompute the centroids of each of the clusters.
Do any of the points then get reassigned to a new cluster on the next round?
Identify the true statement in the list below. Each statement
refers either to a centroid AFTER recomputation of centroids (precise
to one decimal place) or to a
point that gets reclassified.
Question 2
When performing a k-means clustering, success
depends very much on the initially chosen points. Suppose that we
choose two centroids (a,b) = (5,10) and (c,d) = (20,5),
and the data truly belongs to two
rectangular clusters, as suggested by the following diagram:
Under what circumstances will the initial clustering be successful?
That is, under what conditions will all the yellow points be assigned
to the centroid (5,10), while all of the blue points are assigned to
cluster (20,5))? Identify in the list below, a pair of rectangles (described by
their upper left corner, UL, and their lower-right corner LR) that are
successfully clustered.
Yellow: UL=(7,12) and LR=(12,8); Blue: UL=(16,16) and LR=(18,5)
Yellow: UL=(3,15) and LR=(13,7); Blue: UL=(14,10) and LR=(23,6)
Yellow: UL=(3,15) and LR=(13,7); Blue: UL=(11,5) and LR=(17,2)
Yellow: UL=(6,7) and LR=(11,4); Blue: UL=(11,5) and LR=(17,2)
Question 3
Suppose we apply the BALANCE algorithm with bids of 0 or 1 only, to a situation where advertiser A bids on query words x and y, while advertiser B bids on query words x and z. Both have a budget of $2. Identify in the list below a sequence of four queries that will certainly be handled optimally by the algorithm.
Question 4
The set cover problem is: given a list of sets, find a smallest collection of these sets such that every element in any of the sets is in at least one set of the collection. As we form a collection, we say an element is covered if it is in at least one set of the collection.
Note: In this problem, we shall represent sets by concatenating their elements, without brackets or commas. For example, {A,B} will be represented simply as AB.
There are many greedy algorithms that could be used to pick a collection of sets that is close to as small as possible. Here are some that you will consider in this problem.
Dumb: Select sets for the collection in the order in which they appear on the list. Stop when all elements are covered.
Simple: Consider sets in the order in which they appear on the list. When it is considered, select a set if it has at least one element that is not already covered. Stop when all elements are covered.
Largest-First: Consider sets in order of their size. If there are ties, break the tie in favor of the one that appears first on the list. When it is considered, select a set if it has at least one element that is not already covered. Stop when all elements are covered.
Most-Help: Consider sets in order of the number of elements they contain that are not already covered. If there are ties, break the tie in favor of the one that appears first on the list. Stop when all elements are covered.
Here is a list of sets:
AB, BC, CD, DE, EF, FG, GH, AH, ADG, ADF
First, determine the optimum solution, that is, the fewest sets that can be selected for a collection that covers all eight elements A,B,...,H. Then, determine the sizes of the collections that will be constructed by each of the four algorithms mentioned above. Compute the ratio of the size returned by the algorithm to the optimum size, and identify one of these ratios in the list below, correct to two decimal places.
Question 5
This bipartite graph:
Has several perfect matchings. Find all the perfect matchings and
then identify, in the list below, a pair of edges that can appear together
in a perfect matching.