NEIGHBOR MATCHING METHODS
=========================

Neighbor matching is an approach to defining and measuring graph node
similarity. This approach can be used to measure the similarity of 
whole graphs too. There are two programs that this document covers.

nmnodes is used to calculate the similarity of nodes of two graphs.

nmgraphs is used to calculate the similarity of two graphs.

Neighbor matching software can be obtained from 
http://www.matf.bg.ac.rs/~nikolic/software

The software uses the implementation of the Hungarian algorithm from
the Stanford GraphBase:
http://www-cs-faculty.stanford.edu/~uno/sgb.html

Compilation
===========

The software is compiled using the make tool. To compile both programs,
use 'make all'. Also, each program can be compiled separately using 
'make nmnodes' or 'make nmgraphs'.


Usage
====================

Both programs require two arguments --- names of the files that contain 
the description of input graphs. Additionally, required precision of the 
calculation can be given. Some examples of running the program can be

./nmnodes grapha graphb
./nmnodes grapha graphb 0.0001
./nmgraphs grapha graphb
./nmgraphs grapha graphb 0.0001


Input file format
=================
The programs use a custom file format. First line specifies the number 
of the nodes in the graph N. Next N lines contain numbers denoting node 
colors. The following lines describe edges. Each edge is described by
a pair of indices of its constituent nodes, the beginning node being 
written first, and the termination node being writen second. Indices
of the nodes are zero based. For instance input file

3
1
1
1
0 1
1 2

describes the graph 0->1->2.


License
=======

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (www.fsf.org); either version 2 of the 
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

A copy of the GNU General Public License is available at
http://www.fsf.org/licensing/licenses


Contact
=======

For all questions or suggestions concerning neighbor matching contact 
Mladen Nikolic at nikolic@matf.bg.ac.rs.
