04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

522<br />

Chapter 8 NP and Computational Intractability<br />

party views the set of goods they’re getting as more valuable than the set<br />

of goods they’re giving in return. Historically, societies tend to move from<br />

barter-based to money-based economies; thus various online systems<br />

that have been experimenting with barter can be viewed as intentional<br />

attempts to regress to this earlier form of economic interaction. In doing<br />

this, they’ve rediscovered some of the inherent difficulties with barter<br />

relative to money-based systems. One such difficulty is the complexity<br />

of identifying opportunities for trading, even when these opportunities<br />

exist. To model this complexity, we need a notion that each person assigns<br />

a value to each object in the world, indicating how much this object would<br />

be worth to them. Thus we assume there is a set of n people p~ ..... P~,<br />

and a set of m distinct objects al ..... am. Each object is owned by one<br />

of the people. Now each person Pi has a valuation function v~, defined so<br />

that vdaj) is a nonnegative number that specifies how much object aj is<br />

worth to p~--the larger the number, the more valuable the object is to the<br />

person. Note that everyone assigns a valuation to each object, including<br />

the ones they don’t currently possess, and different people can assign<br />

very different valuations to the same object.<br />

A two-person trade is possible in a system like this when there are<br />

people p~ and pj, and subsets of objects A~ and A1 possessed by p~ and pi,<br />

respectively, so that each person would prefer the objects in the subset<br />

they don’t currently have. More precisely,<br />

¯ pi’s total valuation for the objects in A1 exceeds his or her total<br />

valuation for the objects in &, and<br />

. pis total valuation for the objects in A~ exceeds his or her total<br />

valuation for the objects in Aj.<br />

(Note that A~ doesn’t have to be all the objects possessed b y p~ (and<br />

likewise for Ai); Ai and A1 can be arbitrary subsets of their possessions<br />

that meet these criteria.)<br />

Suppose you are given an instance of a barter economy, specified<br />

by the above data on people’s valuations for objects. (To prevent problems<br />

with representing real numbers, we’ll assume that each person’s<br />

valuation for each object is a natural number.) Prove that the problem of<br />

determining whether a two-person trade is possible is NP-complete.<br />

34. in the 1970s, researchers including Mark Granovetter and Thomas<br />

Schelling in the mathematical social sciences began trying to develop<br />

models of certain kinds of collective human behaviors: Why do particular<br />

fads catch on while others die out? Why do particular technological<br />

innovations achieve widespread adoption, while others remain focused<br />

Exercises<br />

on a sma~ group of users? What are the dynamics by which rioting and<br />

looting behavior sometimes (but only rarely) emerges from a crowd of<br />

angry people? They proposed that these are all examples of cascade<br />

processes, in which an individual’s behavior is highly influenced by the<br />

behaviors of his or her friends, and so ff a few individuals instigate the<br />

process, it can spread to more and more people and eventually have a<br />

very wide impact. We can think of this process as being like the spread<br />

of an illness, or a rumor, jumping from person to person.<br />

The mos~ basic version of their models is the following. There is some<br />

underlying behavior (e.g., playing ice hockey, owning a cell phone, taking<br />

part in a riot), and at any point in time each person is either an adopter of<br />

the behavior or a nonadopter. We represent the population by a directed<br />

graph G = (V, E) in which the nodes correspond to people and there is<br />

an edge (v, w) ff person ~ has influence over the behavior of person w: If<br />

person v adopts the behavior, then this helps induce person u; to adopt<br />

it as well. Each person w also has a given threshold O(w) ~ [0, 1], and this<br />

has the following meaning: At any time when at least a O(w) fraction of<br />

the nodes with edges to tv are adopters of the behavior, the node tv will<br />

become an adopter as well.<br />

Note that nodes with lower thresholds are more easily convinced<br />

to adopt the behavior, while nodes with higher thresholds are more<br />

conservative. A node w with threshold O(w) = 0 will adopt the behavior<br />

immediately, with no inducement from friends. Finally, we need a convention<br />

about nodes with no incoming edges: We will say that they become<br />

adopters ff O(w) = 0, and cannot become adopters if they have any larger<br />

threshold.<br />

Given an instance of this model, we can simulate the spread of the<br />

behavior as follows.<br />

Initially, set all nodes w with 0(w)=0 to be adopters<br />

(All other nodes start out as nonadopters)<br />

Until there is no change in the set of adopters:<br />

For each nonadopter w simultaneously:<br />

If at least a O(w) fraction of nodes w~ith edges to w are<br />

adopters then<br />

~3 becomes an adopter<br />

Endif<br />

End~or<br />

End<br />

Output the final set of adopters<br />

523

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!