0% found this document useful (0 votes)
13 views28 pages

Report On Algorithms For Complete Set Partitioning Problem

Complete Set Partitioning Problem Algorithm

Uploaded by

Ronit Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views28 pages

Report On Algorithms For Complete Set Partitioning Problem

Complete Set Partitioning Problem Algorithm

Uploaded by

Ronit Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

ALGORITHMS FOR COMPLETE SET

PARTITIONING PROBLEM

A seminar report submitted to N.I.T. Durgapur


for partial fullfilment of degree of

B.Tech.

in

Information Technology

by

Akanksha Srivastav (14/IT/90)


Tirtha Mandal (14/IT/73)
Ronit Tiwari (14/IT/58)

DEPARTMENT OF INFORMATION TECHNOLOGY


N.I.T. Durgapur
West Bengal
May 2018
DEPARTMENT OF INFORMATION TECHNOLOGY

NATIONAL INSTITUTE OF TECHNOLOGY


DURGAPUR, WEST BENGAL,

Certificate

This is to certify that this report entitled “ Algorithms for Complete Set Par-

titioning Problem” is a bonafied record of the projects by Akanksha Sri-

vastav (14/IT/90), Tirtha Mandal (14/IT/73) and Ronit Tiwari

(14/IT/58) for the partial fulfilment of the requirements for the degree of

Bachelor of Technology in Information Technology of the National

Institute of Technology, Durgapur under the guidance of

Prof.Animesh Dutta
Assistant Professor
Dept. of Information
Technology
N.I.T. Durgapur
Durgapur, West Bengal
Abstract

Complete set partitioning problem

The Complete Set Partitioning problem models the setting where every sub-

set of a finite set is associated with a (positive or negative) real value, and the

goal is to partition the set into pairwise disjoint subsets so as to maximize

the sum of the subset values.This problem captures a number of important

applications in industries, business etc.

In this article, our main goal is to improve our understanding of the com-

plete set partitioning problem and to develop exact and heuristic algorithms

for this problem. Observe that the input to the complete set partitioning

problem is a list of 2n−1 real values (where n is the size of the ground set),

and every algorithm that is guaranteed to find an optimal solution on every

instance of this problem has to inspect all of these values. Thus, the running

time of any of these algorithm is at least exponential in n, and in some of the

applications we have discussed (such as multi-agent systems) the value of n

can be quite large. Therefore, an important goal is to design an algorithm

that can find an optimal partition as efficiently as possible, both in the worst

case and on average (for realistic value distributions).


Contents

1 Introduction :Agents in artificial intelligence 3

1.1 Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 Desirable properties of agent to be intelligent . . . . . . . . . 4

1.2.1 Reactivity . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2.2 Proactiveness . . . . . . . . . . . . . . . . . . . . . . . 4

1.2.3 Social ability . . . . . . . . . . . . . . . . . . . . . . . 5

1.2.4 Situatedness . . . . . . . . . . . . . . . . . . . . . . . 5

1.2.5 Autonomy . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.2.6 Adaptivity . . . . . . . . . . . . . . . . . . . . . . . . 5

1.2.7 Sociability . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Multi-Agent System and Agent-based model 6

2.1 Multi-agent system . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 Agent-based models . . . . . . . . . . . . . . . . . . . . . . . 7

2.3 Difference between multi-agent system and agent-based model 8

3 Coalition formation theory and complete set partitioning 9

3.1 Coalition formation theory . . . . . . . . . . . . . . . . . . . . 9

1
3.2 Complete set partitioning problem and its relation with coali-

tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Exact algorithm for partitioning 12

4.1 The D.P. Algorithm . . . . . . . . . . . . . . . . . . . . . . . 13

5 Heuristic based approach for partitioning 18

5.1 Tabu Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.2 Partitioning based on Tabu Search . . . . . . . . . . . . . . . 20

5.2.1 Tabu seach algorithm . . . . . . . . . . . . . . . . . . 21

6 Conclusion and future work 24

2
Chapter 1

Introduction :Agents in
artificial intelligence

1.1 Agents

Agent is an autonomous entity which observes through sensors and acts upon

an environment using actuators and directs its activity towards achieving

goals. Intelligent agents may also learn or use knowledge to achieve their

goals. They may be very simple or very complex. A reflex machine, such as

a thermostat, is considered an example of an intelligent agent. Intelligent

agents are often described schematically as an abstract functional system

similar to a computer program.

Intelligent agents in artificial intelligence are closely related to agents in

economics, and versions of the intelligent agent paradigm are studied in cog-

nitive science, ethics, the philosophy of practical reason, as well as in many

interdisciplinary socio-cognitive modeling and computer social simulations.

3
Intelligent agents are also closely related to software agents (an au-

tonomous computer program that carries out tasks on behalf of users). In

computer science, the term intelligent agent may be used to refer to a soft-

ware agent that has some intelligence, regardless if it is not a rational agent

by Russell and Norvig’s definition. For example, autonomous programs used

for operator assistance or data mining (sometimes referred to as bots) are

also called ”intelligent agents”.

Simple reflex agent

1.2 Desirable properties of agent to be intelligent

1.2.1 Reactivity

Intelligent agents should respond in a timely fashion to changes they

perceive in their environment.

1.2.2 Proactiveness

Intelligent agents can take the initiative to meet their design objectives,

and they exhibit goal-directed behaviour.

4
1.2.3 Social ability

Intelligent agents can interact with other agents to satisfy their design

objectives.

1.2.4 Situatedness

When an Agent receives some form of sensory input from its environment,

it then performs some actions that change its environment in some way.

1.2.5 Autonomy

This agent characteristic means that an agent is able to act without direct

intervention from humans or other agents. This type of agent has almost

complete control over it own actions and internal state.

1.2.6 Adaptivity

This agent characteristic means that it is capable of reacting flexibly to

changes within its environment. It is able to accept goal directed

initiatives when appropriate and is also capable of learning from it’s own

experiences, environment and interaction with others.

1.2.7 Sociability

This type of characteristic means that the agent is capable of interacting in

a peer-to-peer manner with other agents or humans.

5
Chapter 2

Multi-Agent System and


Agent-based model

2.1 Multi-agent system

A multi-agent system (MAS or ”self-organized system”) is a computerized

system composed of multiple interacting intelligent agents. Multi-agent

systems can solve problems that are difficult or impossible for an

individual agent or a monolithic system to solve. Intelligence may include

methodic, functional, procedural approaches, algorithmic searchor

reinforcement learning.

Multi-agent systems consist of agents and their environment. Typically

multi-agent systems research refers to software agents. However, the agents

in a multi-agent system could equally well be robots, humans or human

teams. A multi-agent system may contain combined human-agent teams.

6
Learning agent

2.2 Agent-based models

An agent-based model (ABM) is a class of computational models for

simulating the actions and interactions of autonomous agents with a view

to assessing their effects on the system as a whole. It combines elements of

game theory, complex systems, emergence, computational sociology,

multi-agent systems, and evolutionary programming. ABMs are also called

individual-based models(IBMs), and individuals within IBMs may be

simpler than fully autonomous agents within ABMs. Agent-based models

are a kind of microscale model that simulate the simultaneous operations

and interactions of multiple agents in an attempt to re-create and predict

the appearance of complex phenomena.

Agent-based models consist of dynamically interacting rule-based agents.

The systems within which they interact can create real-world-like

complexity. Typically agents are situated in space and time and reside in

networks or in lattice-like neighborhoods. The location of the agents and

their responsive behavior are encoded in algorithmic form in computer

programs. In some cases, though not always, the agents may be considered

as intelligent and purposeful.

7
Agent-based model

2.3 Difference between multi-agent system and

agent-based model

Multi-Agent systems (MAS) focuses on solving specific complex problems

using independent agents while Agent-based Model (ABM) focuses on

whether agents (not necessary to be “intelligent”) are obeying assigned

rules that formed their behaviours. MAS designed for engineering and

applied science, while ABM is quite good with natural systems. MAS can

be implemented using ABM.

8
Chapter 3

Coalition formation theory


and complete set partitioning

3.1 Coalition formation theory

Coalition formation theory deals with the analysis of one or more groups of

agents, called coalitions, that get together to jointly determine their

actions. It is related both to cooperative and non-cooperative games, as

the key concept of this theory, coalition, can be defined as a group of

agents which coordinates agreements among its members, while it interacts

non-cooperatively with its non-members. Although a coalition, once

formed, is cooperative, its creation can take place in a non-cooperative

way. Essentially, one may distinguish two main aspects of coalition

formation theories. One of them concerns the formation of groups, that is,

the process through which a coalition comes together to coordinate its

actions. Another aspect of coalition formation theories involves the

9
enforcement of group actions as the equilibrium of an appropriate game.

3.2 Complete set partitioning problem and its

relation with coalitions

The Complete Set Partitioning problem models the setting where every

subset of a finite set is associated with a (positive or negative) real value,

and the goal is to partition the set into pairwise disjoint subsets so as to

maximize the sum of the subset values.This problem captures a number of

important applications. For instance recently complete Set Partitioning

has been studied in the context of combinatorial auctions, where there are

multiple different items for sale, each bidder can place a bid on every

subset of items, and the auctioneer’s goal is to allocate the items to the

bidders (and charge each bidder what she bid for the set of items she

received) so as to maximize the total profit. It also plays an important role

in the analysis of cooperation in multi-agent systems. Indeed, one of the

most important aspects of such systems is the agents’ ability to interact

with one another in order to improve their performance and compensate

for each other’s deficiencies. One means of interaction that has been

extensively studied in the literature is to form a coalition, i.e., a group of

agents that agree to coordinate their activities (and possibly agree on how

the reward from cooperation should be divided among them) in order to

achieve a certain objective. The settings where the total worth of a

coalition is determined solely by the identities of its members (and not by

other co-existing coalitions) can be modelled by characteristic function

10
games. In such games, we are given a set of agents, denoted by A, and the

value of every subset, or coalition, of agents is specified by a characteristic

function. To optimize the social welfare, we need to find a partition of

agents into coalitions (a coalition structure) that maximizes the sum of the

values of the coalitions in the partition. A wide range of potential

applications of coalition formation have been considered in the literature.

For instance, by forming coalitions, autonomous sensors can improve their

surveillance of certain areas, green-energy generators can reduce their

uncertainty regarding their expected energy output, cognitive radio

networks can increase their throughput, and buyers can obtain cheaper

prices through bulk purchasing etc.

It is note-worthy that the input to the complete set partitioning problem is

a list of 2(n−1) real values (where n is the size of the ground set), and every

algorithm that is guaranteed to find an optimal solution on every instance

of this problem has to inspect all of these values. Thus, the running time

of every exact algorithm is at least exponential in n, and in some of the

applications we have discussed (such as multi-agent systems) the value of n

can be quite large. Therefore, an important goal is to design an algorithm

that can find an optimal partition as efficiently as possible, both in the

worst case and on average (for realistic value distributions).

11
Chapter 4

Exact algorithm for


partitioning

Every NP-hard problem can be solved by exhaustive search. Unfortunately

when the size of instance grows, the running time for exhaustive search

soon becomes forbiddingly large even for an instance of fairly small size.

For some problems it is possible to design algorithms that are significantly

faster than exhaustive search, though still not polynomial time. These fast,

super-polynomial time algorithms that solve NP-complete problems

optimally are called exact algorithms.

12
4.1 The D.P. Algorithm

This algorithm was originally proposed by Yeh to solve the complete set

partitioning problem, and was re-discovered by Rothkopf, who used it to

solve the winner determination problem in combinatorial auctions. This

algorithm is based on dynamic programming: to find an optimal partition

of the set of agents A, we start by computing an optimal partition of every

subset C ⊆ A with size(C) =2, then use those to compute an optimal

partition of every C ⊆ A with size(C)=3, and so on, until an optimal

partition of A is found.

Given a coalition C ⊆ A, the value of an optimal partition of C can be

computed recursively as follows:

The pseudocode of DP is given in Algorithm presented below. For every

coalition C ⊆ A, the algorithm first computes f ( C ) as well as t ( C ) — a

variable that provides an indication of the optimal partition of C . Once f (

C ) and t ( C ) are computed for every C ⊆ A, an optimal coalition

structure CS ∗ is computed recursively. A four-agent example is illustrated

in figure.

DP requires storing a total of 2(n+1) values, namely f ( C ) and t ( C ) for

every C ⊆ A. This memory requirement is not burdensome since we are

dealing with the complete set partitioning problem, and the input to this

13
problem contains 2n values already. In other words, we implicitly assume

there is O (2n ) available space. The running time of DP has been shown to

be O (3n ). This is significantly less than Ω( nn/2 ) — the time required to

exhaustively enumerate all coalition structures. However, the disadvantage

is that DP provides no interim solution before completion, meaning that it

is not possible to trade computation time for solution quality.

Algorithm:

14
A working example of dp on four agents

15
Coalition structure graph on four agents

The work of DP into three main tasks, which can all be seen on the graph.

Task 1: Evaluate all the movements in the graph: For every

coalition C with size(C) ≥2, the algorithm evaluates every partition C’, C”

∈ C by computing f(C’) +f(C”) ( line 9 of the pseudocode). This can be

interpreted as evaluating every movement that involves splitting C in two.

Since the algorithm does this for every possible coalition of size s ≥2, all

the movements in the graph are eventually evaluated.

Task 2: store the most beneficial movements: The algorithm

determines, for every coalition C, whether it is beneficial to make a

movement that involves splitting C and, if so, what is the best such

movement (this decision is stored in t(C)). In terms of the coalition

structure graph, this step can be interpreted as follows. Setting t(C) =C

means that, from any node representing a coalition structure C ∈ CS, it is

not beneficial to make a movement that involves splitting C. On the other

hand, setting t(C) = C’, C” means that, from any node representing C ∈

16
CS, one of the most beneficial movements is to split C into C’ and C”.

Task 3: move upwards in the graph: Here, DP first initializes CS ∗ by

setting CS ∗ = A. This means that DP starts at the node that represents A,

i.e., the bottom node in the graph. After that, DP selects some coalition C

∈ CS ∗ with t(C)6=(C) (if such a coalition exists), and replaces it with t(C).

By doing this, DP makes a movement that involves splitting C into the

two coalitions that are stored in t(C). This process is repeated until t(C)

={C} for all C ∈ CS. In other words, DP keeps moving upwards in the

graph through a series of connected nodes — a “path”— until it reaches a

node after which no movement is beneficial. For instance, in our example

from Fig, the way DP reached {{a1}, {a2}, {a3, a4}}can be visualized as a

sequence of movements through the dashed path in Fig, where the first

movement involved splitting {a1, a2, a3, a4}into {a1, a2}and {a3, a4}, and

the second movement involved splitting {a1, a2}into {a1}and {a2}.

17
Chapter 5

Heuristic based approach for


partitioning

Heuristic methods spend little computational effort to find solutions that

are not necessarily optimal but are close to optimal (Blumenfeld, 2009). In

general, it is difficult to guarantee that a method produces an optimal

solution. However they provide solutions that are adequate for practical

use. Their main aim is to find acceptable solutions as quickly as possible.

Some key features of heuristic based approach are listed below:

Average performance: When tested on popular value distributions,

heuristic methods has been shown to be faster than DP, by several orders

of magnitude for some distributions . This is because, in practice, these

methods are able to identify many (if not the vast majority of) subspaces

and/or branches of the search trees as being unpromising. DP, on the

other hand, is not capable of any such shortcuts.

18
Returning solutions anytime: The key feature of an anytime

algorithm is the ability to allow early termination whilst still providing

some guarantees on the solution. The disadvantage however is that most

anytime algorithms have a worst case run time of (). This means that, in

the worst-case, they will end up exhaustively searching the entire space of

all coalition structures. Anytime methods can be classified into two types:

coalition structure graph search methods and integer partition based

search methods.

5.1 Tabu Search

Tabu Search (TS) is a method of search of the optimum (here a minimum)

in combinatorial optimization problems, and it was proposed by Glover

(1989,1990). Let S be the finite or countable set of states s of the problem,

and f : S −¿ R the function to be minimized. It is assumed we can be

define for each s ∈ S a neighborhood N(s) of s, that is, a subset of S

formed by the states that can be reached in one step (of the algorithm)

from s. TS builds and handles a tabu list T of moves that are forbidden,

that is, some states that cannot be reached, unless some special conditions

— called the aspiration criterion — are satisfied. By definition, the

algorithm moves from a current state s ∈ S to another state s0 ∈ N(s)

defined by f(s0) = minf(x)/x ∈ N(s) − T.

The aspiration criterion establishes that a state s0 ∈ N(s) ∩ T can be

reached from s if it has the minimum value that f has ever attained in the

previous steps of the algorithm.

19
Usually, a TS algorithm begins with a random state s0 and it computes

iteratively — by moving into the neighborhood of the current state — a

sequence of states s1, s2, s3, . . . that may improve the criterion, but can

also be worse than the previous step. It is this feature that gives TS the

capacity to avoid local optima and reach the global optimum. TS ends at a

maximum number of iterations fixed by the user, big enough to let the

algorithm visit many “local valleys” of f.

It should be noted that TS makes a systematic use of the memory for

handling the tabu list, and for this reason the size of T must be limited.

Hence, a “forget strategy” is needed: it is necessary to define which state

must be deleted from T when it is full and a new state should be put into

T. Many forget strategies can be proposed: delete the worst state in T,

delete the first state in T, etc. TS has been used in many combinatorial

optimization problems.

5.2 Partitioning based on Tabu Search

Tabu search can be applied to partitioning problem stated in introduction.

Partitioning problems requires dividing the given set into subsets that the

sum of those subsets is maximum. If subsets are coalitions then we can

model the problem as:

Given a coalition C ⊆ A, the value of an optimal partition of C can be

computed by recursively dividing C into 2 sets. Let v(C) be the value

associated with each partition.

20
5.2.1 Tabu seach algorithm

Input: v(C) for all C ⊆ A.

Output: An optimal coalition structure CS ∗ .

Algorithm:

1. Divide coalition C into two partitions c1 and c2 such that sum of values

of c1 and c2 is maximum among all such partitions possible.

2. Store the partition for the coalition in a search data structure like hash

table or dictionary.

3. Similarly c1 and c2 are divided recursively into two partitions such that

sum of their respective subset is maximum and their partitions are stored

until size(c1) 6= 1 and size(c2) 6= 1.

4. Now using stored partitions backtrack to find the required optimum

coalition structure.

21
A snapshot of code:

Recursive finding of partition for a coalition

22
Backtracking to find elements in each partition

23
Chapter 6

Conclusion and future work

Our goal in this article was to provide extensive theoretical analysis of the

search space of the Complete Set Partitioning problem and to discuss upon

two different approaches for solving, an exact algorithm based on dynamic

programming and other heuristic based approach using tabu search. Both

of these algorithms significantly improve the running time to around O(3n ).

The choice between exact and heuristic approaches is made on the basis of

search space of problem, expected worst case running time, structure of

the problem and constraints involved, degree of precision required. The

complete set partition problem has widespread applications in industries,

economics and these two approaches may be used to obtain the desired

results. While the focus in this article was on settings where there are no

influences (or externalities) among co-existing coalitions, it would be

interesting to see whether the underlying techniques of ODP-IP can be

extended to settings with externalities, and to identify conditions under

which such an extension can be efficient.

24
Bibliography

1. ”A hybrid exact algorithm for complete set partitioning” by Thomasz

Michalak, Talal Rahwan, Edith Elkind.

2. ”A tabu search algorithm for partitioning” by Javier Trejos ,University

of Costa Rica;Eduardo Piza,University of Costa Rica;Alex

Murillo,University of Costa Rica.

3. Niazi, Muaz; Hussain, Amir (2011). ”Agent-based Computing from

Multi-agent Systems to Agent-Based Models: A Visual Survey”

25

You might also like