For problems that require you to provide an algorithm, you must give a precise
description of the algorithm, together with a proof of correctness and an analysis of
its running time. You may use algorithms from class as subroutines. You may also
use any facts that we proved in class.
2. (Independent Set) You are given an n-vertex graph G = (V, E) with the property
that it consists of a bunch of connected components, each of which has size O(log n).
Design an algorithm for the maximum independent set problem with this input,
running in polynomial time.
3. (Labeling Butterflies) Inspired by the example of that great Cornellian, Vladimir Nabokov, some
of your friends have become amateur lepidopterists (they study butterflies).
Often when they return from a trip with specimens of butterflies,
it is very difficult for them to tell how many distinct species they’ve
caught—thanks to the fact that many species look very similar to one
another. One day they return with n butterflies, and they believe that each
belongs to one of two different species, which we’ll call A and B for
purposes of this discussion. They’d like to divide the n specimens into
two groups—those that belong to A and those that belong to B—but it’s
very hard for them to directly label any one specimen. So they decide to
adopt the following approach. For each pair of specimens i and j, they study them carefully side by
side. If they’re confident enough in their judgment, then they label the
pair (i, j) either “same” (meaning they believe them both to come from
the same species) or “different” (meaning they believe them to come from
different species). They also have the option of rendering no judgment
on a given pair, in which case we’ll call the pair ambiguous.
So now they have the collection of n specimens, as well as a collection
of m judgments (either “same” or “different”) for the pairs that were not
declared to be ambiguous. They’d like to know if this data is consistent
with the idea that each butterfly is from one of species A or B. So more
concretely, we’ll declare the m judgments to be consistent if it is possible
to label each specimen either A or B in such a way that for each pair (i, j)
labeled “same,” it is the case that i and j have the same label; and for each
pair (i, j) labeled “different,” it is the case that i and j have different labels.
They’re in the middle of tediously working out whether their judgments
are consistent, when one of them realizes that you probably have an
algorithm that would answer this question right away.
Give an algorithm with running time O(m + n) that determines
whether the m judgments are consistent.
4. (Number of Shortest Paths) A number of art museums around the country have been featuring work
by an artist named Mark Lombardi (1951–2000), consisting of a set of
intricately rendered graphs. Building on a great deal of research, these
graphs encode the relationships among people involved in major political
scandals over the past several decades: the nodes correspond to participants,
and each edge indicates some type of relationship between a pair
of participants. And so, if you peer closely enough at the drawings, you
can trace out ominous-looking paths from a high-ranking U.S. government
official, to a former business partner, to a bank in Switzerland, to
a shadowy arms dealer.
Such pictures form striking examples of social networks, which, as
we discussed in Section 3.1, have nodes representing people and organizations,
and edges representing relationships of various kinds. And the
short paths that abound in these networks have attracted considerable
attention recently, as people ponder what they mean. In the case of Mark
Lombardi’s graphs, they hint at the short set of steps that can carry you
from the reputable to the disreputable. Of course, a single, spurious short path between nodes v and w in
such a network may be more coincidental than anything else; a large
number of short paths between v and w can be much more convincing.
So in addition to the problem of computing a single shortest v–w path
in a graph G, social networks researchers have looked at the problem of
determining the number of shortest v–w paths.
This turns out to be a problem that can be solved efficiently. Suppose
we are given an undirected graph G = (V, E), and we identify two nodes v
and w in G. Give an algorithm that computes the number of shortest v–w
paths in G. (The algorithm should not list all the paths; just the number
suffices.) The running time of your algorithm should be O(m + n) for a
graph with n nodes and m edges.
What Students Are Saying About Us
.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"
.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."