Pajek Program for Large Network Analysis
Vladimir Batagelj
e-mail: vladimir.batagelj@uni-lj.si
Andrej Mrvar
e-mail: andrej.mrvar@uni-lj.si
University of Ljubljana
Ljubljana
Slovenia
Started: November 15 1996
Last update:
Program for analysing large networks (networks having thousands of
vertices).
Six objects are used for that purpose:
- Networks - main objects (vertices and connections).
Default extension: .net.
Network can be presented on input file in different ways:
- using arcs/edges (e.g. 1 2 - line from 1 to 2)
- using arcslists/edgeslists
(e.g. 1 2 3 - line from 1 to 2 and from 1 to 3)
- Vega format (look at Pisanski project Vega)
I hope formats are self-explanatory. Using one of presentations
structure of network is defined. You can also add information
for network drawing. This is explained in
Drawnet.htm.
- Partitions - they tell for each vertex to which class vertex belong.
Default extension: .clu.
- Permutations - reordering of vertices.
Default extension: .per.
- Clusters - subset of vertices (e.g. one class from partition).
Default extension: .cls.
- Hierarchies - hierarchically ordered vertices. Example:
Root
g1 g2
g11 g12 5,6,7
1,2 3,4
Root has two subgroups - g1 and g2. g2 is leaf - cluster with
elements 5,6 and 7. g1 has two subgroups - g11 and g12....
Default extension: .hie.
- Vectors - they tell for each vertex some numerical property (real number).
Default extension: .vec.
By double clicking on selected network, partition,...
you can show the object on screen. In the case of hierarchy
you can also edit it (change name and type of node).
Short description of menu
- File Input/Output manipulation.
- Network - N
- Read network from Ascii file.
- Edit graph. Choose vertex, show its neighbours and then:
- add new lines to/from selected vertex
(by left mouse double clicking on Newline);
- delete lines (by left mouse double clicking);
- change value of line (by single right mouse clicking);
- subdivide line to two orthogonal lines using
new invisible vertex (by single middle mouse clicking).
- Save selected network to Ascii file.
- Export Matrix to EPS - write matrix in EPS form:
- Original - using default numbering
- Using Permutation - using current permutation.
Additionally lines can be drawn to divide different classes defined
by selected partition.
- Using Partition - using current partition.
In the text window number and density of lines among classes
(and vertices in selected two classes) are displayed.
Additionally matrix is exported to EPS where density is expressed
using shadowing:
- Structural - Densities are normalized according to
maximum possible number of lines among classes
(suitable for dense networks).
- Delta - Densities are normalized according to
vertices having the highest number of input and
output neighbors in classes
(suitable for sparse networks).
- Only Black Borders - If checked all squares in matrix will
have black borders, otherwise dark squares will have white and
light squares will have black borders.
- Dispose selected network from memory.
- Time Events Network - N
- Read Time Events - Read time network described
using time events. Following events can be used to describe development of network over time:
Command | Explanation
| TI t | initial events - following events happen when time point t starts
| TE t | end events - following events happen when time point t is finished
| AV v n s | add vertex v with label n and properties s
| HV v | hide vertex v
| SV v | show vertex v
| DV v | delete vertex v
| AA u v s | add arc (u,v) with properties s
| HA u v | hide arc (u,v)
| SA u v | show arc (u,v)
| DA u v | delete arc (u,v)
| AE u v s | add edge (u:v) with properties s
| HE u v | hide edge (u:v)
| SE u v | show edge (u:v)
| DE u v | delete edge (u:v)
| CV v s | change vertex property - change property of vertex v to s
| CA u v s | change arc property - change property of arc (u,v) to s
| CE u v s | change edge property - change property of edge (u:v) to s
CT u v | change type - change (un)directedness of line (u,v)
| CD u v | change direction of arc (u,v)
| PE u v s | replace pair of arcs (u,v) and (v,u) by single edge (u:v) with properties s
| AP u v s | add pair of arcs (u,v) and (v,u) with properties s
| DP u v | delete pair of arcs (u,v) and (v,u)
| EP u v s | replace edge (u:v) by pair of arcs (u,v) and (v,u) with properties s
| |
List of properties s can be empty as well.
If several edges (arcs) can connect two vertices,
additional tag like :k (k-th line)
must be given to determine to which line the command belongs.
E.g. command HE:3 14 37 results in hiding the third edge connecting
vertices 14 and 37.
Example of time network described using time events:
*Vertices 3
*Events
TI 1
AV 2 "b"
TE 3
HV 2
TI 4
AV 3 "e"
TI 5
AV 1 "a"
TI 6
AE 1 3 1
TI 7
SV 2
AE 1 2 1
TE 7
DE 1 2
DV 2
TE 8
DE 1 3
TE 10
HV 1
TI 12
SV 1
TE 14
DV 1
See also other possibility:
description of time network using time intervals
- Save - Save time network in time events format.
- Partition - C
- Read partition from Ascii file.
- Edit partition (put vertices to classes).
- Save selected partition to Ascii file.
- Dispose selected partition from memory.
- Permutation - P
- Read permutation from Ascii file.
- Edit permutation (interchange positions of two vertices).
- Save selected permutation to Ascii file.
- Dispose selected permutation from memory.
- Cluster - S (list of selected vertices)
- Read cluster from Ascii file.
- Edit cluster (add and delete vertices).
- Save selected cluster to Ascii file.
- Dispose selected cluster from memory.
- Hierarchy - H
- Read hierarchy from Ascii file.
- Edit hierarchy (change types and names of nodes).
- Save selected hierarchy to Ascii file.
- Dispose selected hierarchy from memory.
- Vector - V
- Read vector from Ascii file.
- Edit vector (change components of vector).
- Save selected vector(s) to Ascii file.
If cluster representing vector id's is present, all vectors with
corresponding id numbers will be saved to the same output file.
Vector's id can be added to cluster by pressing V
on the selected vector (empty cluster should be created first).
All vectors must have the same dimensions.
- Dispose selected vector from memory.
- Pajek Compound File - *.paj
- Read Pajek compound file (file containing all possible Pajek objects
- networks, partitions, permutations, clusters, hierarchies and vectors).
- Save currently loaded objects as a Pajek compound file.
- Repeat session - During program execution all commands are
written to file *.log. In this way you can repeat any execution by running
selected log file.
If you change name of file on disk to ?, program will ask for name when
running logfile next time (so you can repeat the same sequence of steps
- logfile with different input data).
If startup logfile (Pajek.log) exixts (in the same directory as Pajek.exe),
it is automatically executed every time when Pajek is run.
- Show Report Window - Bring the report window in the front
in the case that it was closed or is not visible.
- Exit program.
- Net - operations, for which only network is needed as input.
- Transform
- Transpose - Inverse (transpose) network of selected network
(change direction of arrows in directed network).
- Remove
- all edges - Remove all edges from selected network.
- all arcs - Remove all arcs from selected network.
- multiple lines - Remove all multiple lines from selected network.
- Sum Values - Values of all deleted lines are added to not deleted
line between corresponding two vertices.
- Do not Sum - Values of all deleted lines are not added
to not deleted line between corresponding two vertices.
- Min Value - Minimum value of all lines
between two vertices is selected.
- Max Value - Maximum value of all lines
between two vertices is selected.
- loops - Remove all loops from selected network.
- lines with value
- lower than - Remove all lines with value lower than specified value.
- higher than - Remove all lines with value higher than specified value.
- Add
- Sibling edges - Add sibling edges to vertices with a common
- Input - arc-ancestor
- Output - arc-descendant
- Edges->Arcs - Convert all edges to arcs (in both directions)
(make directed network).
- Arcs->Edges
- All - Convert all arcs to edges (make undirected network).
- Bidirected only - Convert only arcs in both directions to edges:
- Sum Values - Value of the new edge is a sum of both values of arcs.
- Min Value - Value of the new edge is smaller value of values of arcs.
- Max Value - Value of the new edge is larger value of values of arcs.
- Add source and sink - If network is acyclic, add unique first and
last vertex (new network has two artificial
vertices).
- Reduction
- Hierarchical - Recursively delete from network all vertices
that have only 0 or 1 neighbour. Results: simpler network and
hierarchy with deleted vertices. Original network can be later
restored (if we forget directions of lines).
- Betweenness - Recursively delete from network all vertices
that have exactly 2 neighbours (together with corresponding two
lines) and (instead of that) add direct line between these
two neighbours. Result is simpler network (for drawing).
Original network cannot be restored!
- Degree - (Recursively) delete from network all vertices
with degree lower than selected value (according to Input, Output or
All degree).
Original network cannot be restored!
- Design (flow graph) Reductuion of all structural
parts of network according to McCabe (for programs - flow graphs).
- Copy (Enlarge) - Copy network to new network.
Dimension can be enlarged for selected number of vertices
(additional vertices without lines are added).
- Generate in Time - Generate network in specified time(s).
Input first time, last time and step (integers).
Additional parameters when vertices and lines are active should be given
in network to perform this operation. They must be given between signs
[ and ]:
- is used to divide lower and upper limit of interval,
, is used to separate intervals,
* means infinity. Example:
*Vertices 3
1 "a" [5-10,12-14]
2 "b" [1-3,7]
3 "e" [4-*]
*Edges
1 2 1 [7]
1 3 1 [6-8]
Vertex 'a' is active from times 5 to 10, and 12 to 14,
vertex 'b' in times 1 to 3 and in time 7, vertex 'e' from time 4 on.
Line from 1 to 2 is active only in time 7, line from 1 to 3 in times 6 to 8.
Additional constraint: when generating netork in time, line will
not be generated even it is active in that time, if
appropriate vertices which are connected by the line are not active too.
Note that time records should always be written as last in the row
where vertices / lines are defined.
See also other possibility of describing time network:
description of time network using time events
- All - Generate all networks in specified times.
- Only Different - Generate network in specified time
only if the new network will differ in at at least one vertex or line
from the last network which was generated.
- 2-Mode to 1-Mode - Generate ordinary (1-mode) network
from input 2-mode (affiliation) network. Result is a valued network.
To store 2-mode network
in input file use Pajek or Ucinet format
(look at Davis.dat from Ucinet dataset).
- Rows - Result is network with relations among row elements
(actors). The value of line tells number of common events of the two actors.
- Columns - Result is network with relations among column elements (events).
The value of line tells number of actors that took part in both events.
The obtained network is usually not sparse. To make it sparser
use Net/Transform/Remove/lines with value/lower than...
It is also possible to generate unvalued 1-mode network,
where multiple lines among vertices can exist. The label of the generated
line corresponds to the label of the event/actor that
served to induce the line.
- Sort Lines - For each vertex sort lines connected to it in
increasing order according to vertex on
the other side of line.
- Random Network - Generate random network of selected dimension
- Total No. of Arcs - Generate random directed network of selected dimension
and given number of arcs.
- Vertices Output Degree - Generate random directed network of selected dimension
and output degree of each vertex in given range.
- Extended Model - Generate random network according to
extended model defined by: R. Albert and A.-L. Barabasi:
Topology of evolving networks: local events and universality.
- Partitions - Partitioning Network. Result is a Partition.
- Degree
- Input - Number of lines into vertices.
- Output - Number of lines out of vertices.
- All - Number of neighbours of vertices.
- Core - k-core is a subnetwork of given network
where each vertex has at least k neighbours in the same
core according to:
- Input ... lines coming into vertex.
- Output ... lines going out of vertex.
- All ... all neighbours.
- Valued Core - Generalized k-core: Instead of counting lines
(neighbours) use values of lines.
Sum of lines or maximum value can be used
when computing valued core (change using Options/ReadWrite):
Sum valued core of threshold val is a subnetwork of given network
where the sum of values of lines to (from) the members of the same core is at
least val.
Max valued core of threshold val is a subnetwork of given network
where the maximum value of all lines to (from) the members of the same core is
at least val.
Threshold values must be given in advance. Two different ways to
determine thresholds:
- First Threshold and Step - Select first threshold value
and step in which to increase threshold.
- Selected Thresholds - Thresholds (increasing numbers) are
given using vector.
Additionally, Input, Output or All valued cores can be used.
- Depth
- Acyclic Partition acyclic network according to depths of vertices.
- Genealogy Partition genealogy network according to layers of vertices.
- p-Cliques Partition network according to p-Cliques
(partition to clusters where vertices have at least proportion p
(number betwween 0 and 1) neighbours inside the cluster.
- Strong ... for directed network.
- Weak ... for undirected network.
- Vertex Labels Partition vertices with same labels to the same
class numbers (for moleculae).
- Vertex Shapes Partition vertices with same shapes (ellipse,
box, diamond) to the same class numbers (used in genealogy to show gender).
- Components
- Strong - Strong Components of selected network.
- Weak - Weak Components of selected network.
- Bi-Components - Biconnected Components of selected network.
Articulation points belong to several classes, so the result cannot be
stored in partition - biconnected components are stored in hierarchy!
Minimal number of vertices in components can be selected.
Additionaly, partition containing articulation points is produced:
number of biconnected components to which each vertex belongs
is given.
Partition containing vertices belonging to exactly one bicomponent,
vertices outside bicomponents and articulation points is
also produced: vertices outside bicomponents get class zero,
each bicomponent is numbered consecutively (from 1 to number of bicomponents)
and articulation points get class number 9999998.
- Hierarchical Decomposition
- Symmetric-Acyclic - Symmetric-Acyclic decomposition of
network. Result is hierarchy with nested clusters.
- Numbering
- Depth First - Depth first numbering of selected network...
- Strong ... taking directions of arcs into account.
- Weak ... forget directions (or undirected network).
- Breadth First - Breadth first numbering of selected network...
- Strong ... taking directions of arcs into account.
- Weak ... forget directions (or undirected network).
- Core + Degree - Numbering in decreasing order
according to all core partition. Within the same core number
vertices are ordered in decreasing order according to number
of neighbours which have the same or higher core number.
- Citation Weights - If a network represents citation network,
weights of lines (citations) and vertices (articles) can be computed.
A new network with values on lines representing importances of
citations is generated.
Vector with importances of vertices (articles) is also generated.
Two versions of algorithm:
- Source - Sink - Paths Count Method.
Compute from Source to Sink.
- Vertex - Sink - SPLC Method.
Each vertex is considered as Source.
- k-Neighbours - Select all vertices
- Input ...from which we can reach selected vertex
in at most k-steps.
- Output ...that can be reached from selected vertex
in at most k-steps.
- All ...Input + Output (forget direction of lines)
Result is partition where vertices are in class numbers
equal to the distance from given vertex,
vertices that cannot be reached from selected vertex
are in class number 999998 (65534 in older versions).
After you have a partition you can extract subnetwork.
- From Clusters - Compute selected distances according to each vertex in Cluster.
Results consist of so many partitions as is the number of vertices in cluster.
Instead of storing results in partitions they can be stored in vectors as well.
- Paths between 2 vertices
- One Shortest - Find the shortest path between two vertices.
Result is new network. Values on lines can
be taken into account (if they present distances
between vertices) or not (graph theoretical distance).
The latter possibility is faster.
- All Shortest - Find all shortest paths between two vertices.
Result is new network. Values on lines can
be taken into account (if they present distances
between vertices) or not (graph theoretical distance).
The latter possibility is faster.
- Walks with Limited Length - Find all walks between two vertices
with limited maximum length.
- Diameter - Find diameter - the length of the longest
shortest path in network and corresponding
two vertices. Full search is performed,
so the operation may be slow for very large
networks (number of vertices larger than 2000).
- Critical Path Method (CPM) - Find the critical path in acyclic
network - result is new network containing the critical path.
Algorithm can be used in the area of project planning
but also for analysing acyclic graphs. Additional networks
containing total and free delay times of activities are generated.
Two vectors (partitions) are generated, too:
First containing the earliest possible times
of coming into given states and the
second containing the latest feasible times
of coming into given states.
- Maximum Flow among vertices.
- Selected Pair - Find maximum flow between
selected two vertices (algorithm looks for paths to be saturated
and among them it always selects the shortest path).
Algorithm can be used in the technical area (actual flow,
values on lines mean capacities) or for analysing graphs
(if all values are 1).
Result is a new network, containing the two vertices
and lines contributing to maximum flow between them.
- Pairs in Cluster - Find maximum flow among vertices determined by cluster.
Result is a new network, where a value on line means
maximum flow between corresponding two vertices.
Algorithm is slow: Use it on smaller networks or
clusters with limited number of vertices only!
- Vector - Get vector from network
- Centrality - Result is a vector containing selected centrality
measure of each vertex and centralisation
index of the whole network.
- Closeness centrality (Sabidussi).
- Input - centrality of each vertex according to distances
of other vertices to selected vertex.
This measure can be applied to strongly connected networks only.
- Output - centrality of each vertex according to distances
of selected vertex to all other vertices.
This measure can be applied to strongly connected networks only.
- All - forget direction of lines - consider network as
undirected. This measure can be applied to weakly connected networks only.
- Betweenness centrality (Freeman).
- Centers - Find centers in a graph using robbery algorithm:
vertices that have higher degrees (are stronger) than their neighbours
steal from them:
- at the beginning give to vertices initial strength according to
their degrees, or start with value 1
- when 'weak' vertex is found, neighbours steal from it
according to their strengths, or they steal the same amount
- Get coordinate - x, y, or z coordinate of network.
You can also get all coordinates at once -
possibility to have more than 3 coordinates,
coordinates must contain character . (dot).
- Important Vertices - Find important vertices in directed
network (e.g. web pages, scientific citations) or 2-mode network.
Result are vectors with weights and
partition with selected number of important vertices.
- 1-Mode: Hubs/Authorities - In directed networks we can
usually identify two types of important vertices:
hubs and authorities. A vertex is a good hub, if it points to
many good authorities, and it is a good authority, if it is pointed to
by many good hubs.
- 2-Mode: Important Vertices - Generalization of algorithm
for 2-mode networks - find important vertices from first and
second subset.
Nets - binary operations on networks. Two networks
must be selected before performing binary operations.
- First Network - Network that is currently active,
will be used as first network in operations.
- Second Network - Network that is currently active,
will be used as second network in operations.
- Union of lines - Fuse selected networks. If you want to get
union of networks, multiple lines must still be deleted.
- Intersection - Intersection of selected networks.
- Difference - Difference of selected networks.
- Union of vertices - Add the second network at the
end of first network.
- Fragment (1 in 2) - Find all instances of
fragment (determined by network 1) in network 2.
- Find Execute command.
- Options Select appropriate model of fragment.
- Induced - there should be no additional lines between
vertices in instance of fragment to match (stronger
condition) otherwise additional lines can be
present (weaker).
- Labeled - labels must match (e.g. atoms in moleculae).
Labels are determined by classes (colors) in partition -
first patition and second partition must be selected
before searching for labeled fragments.
First partition determines 'labels' of first network (fragment),
second partition determines 'labels' of second (original) network.
- Check values of lines - values of lines must match
(e.g. in genealogy values represent sex: 1 - man, 2 - woman).
- Check only cluster - only fragments are searched
where first vertex is one of the vertices in cluster.
- Shrink coordinates (1 to 2) -
Useful if you shrink network, draw shrunk network separately,
and then apply all coordinates to vertices in original network
(vertices in same class get the same coordinates).
Replace coordinates in network 2 using coordinates of shrunk
network 1. Shrinking can be determined using
Operations - One network and something else is needed as input.
- Shrink Network -
Before starting shrinking, select appropriate blockmodel in
Options menu. Default is just number of lines between shrunk vertices
that must be present in original network, to cause a line in a new
network.
- Partition - Shrink network according to selected partition.
Vertices in class 0 are left unchanged, others are shrunk.
- Hierarchy - Shrink network according to selected hierarchy.
Nodes in hierarchy that are Closed are shrunk to new vertex.
Cut nodes are shrunk to virtual vertex. Border
nodes are not shrunk, but they are not visible.
Vertices belonging to other nodes are left unchanged.
Type of shrinking (blockmodel) can be selected in Options menu.
- Extract from Network
- Partition - Extract sub-network according to selected
partition (extract range of classes from partition).
- Cluster - Extract sub-network according to selected cluster.
- to GEDCOM - Extract sub-genealogy according to selected
partition (for example one weakly connected
component) to new GEDCOM file (genealogy must be
read as Ore graph).
- Dissimilarity - Compute selected dissimilarity matrix
(d1, d2, d3 or d4) among vertices in cluster
according to number of common neighbours.
The obtained matrix can be imported to some
data analysis software to perform further analyses
(e. g. hierarchical clustering).
Symbols used:
N(v) are input, output or all neighbours of vertex v;
You can include vertex v to its own neighbourhood or not
and display only upper triangle or complete matrix.
+ stands for symmetric sum, U stands for union and
\ stands for difference;
| stands for set cardinality;
1st and 2nd maxdegree are largest degree and second largest
degree in network, recpectivelly.
d1(u,v) = | N(u) + N(v) | / (1st maxdegree + 2nd maxdegree)
| N(u) + N(v) |
d2(u,v) = -----------------
| N(u) U N(v) |
| N(u) + N(v) |
d3(u,v) = -----------------
|N(u)| + |N(v)|
max(|N(u)\N(v)|,|N(v)\N(u)|)
d4(u,v) = ------------------------------
max(|N(u)|,|N(v|)
In the case N(u)=N(v)=0 we set all distances to 1.
- Vector - Operations on network and vector - result is vector.
- Network * Vector - Multiplication of matrix (network) by vector.
- Harmonic Function -
Let (G,a) be a connected weighted graph, with weight function a(x,y),
and let S is subset of vertices V(G).
A function f : V(G) ---> R is said to be harmonic
on (G,a), with boundary S, if
1
f(x)= ----- * SUM [a(x,y)*f(y)]
A(x) y
for every x in V(G)\S, and
A(x)=SUM [a(x,y)]
y }
See also: B. Bollobas: Random Walks on Graphs, page 328.
Implementation in Pajek:
- function f is determined by vector
- weight function a(x,y) is given by (valued) network
- subset S is determined by partition - vertices in class
1 are in subset S (fixed vertices), other vertices are in V(G)\S
- addditionally, permutation determines the order of vertices in computations.
In Pajek you can compute the harmonic function once or iterativelly -
as long as difference between successive functions become small enough.
Components of vector that represents function fcan be modified
immediately when they are computed or only at the end of each iteration
(after all components are computed). Procedure can be run according to:
- Input - neighbours
- Output - neighbours
- All - neighbours
- Summing up Neighbours - For each vertex compute the
sum of class numbers of its neighbours according to
- Input - neighbours
- Output - neighbours
- All - neighbours
- Min of Neighbours - For each vertex compute the
minimum class number of its neighbours according to
- Input - neighbours
- Output - neighbours
- All - neighbours
- Max of Neighbours - For each vertex compute the
maximum class number of its neighbours according to
- Input - neighbours
- Output - neighbours
- All - neighbours
- Put coordinate - take a vector as x, y, or z
coordinate of network.
- Transform - Transformations of network according to partition.
- Remove Lines Inside Clusters - Remove all lines that have both
vertices in the same (selected) cluster(s).
- Reorder
- Network - Reorder vertices in network according to
selected permutation.
- Partition - Reorder vertices in partition according to
selected permutation.
- Vector - Reorder vertices in vector according to
selected permutation.
- Count Neighbour Colors - For selected network and partition a new
partition is generated where for each vertex the frequency of vertices of selected
color in the neighbourhood is given. Colors to be counted are determined using cluster.
- Coloring
- Create New - Sequential coloring of vertices in order
determined by permutation. Result depends
on selected permutation significantly.
- Complete Old - Complete partial coloring
of vertices in order determined by permutation.
For example some vertices can be colored by hand,
but most of the vertices are still uncolored (in class 0).
In this way you can help program to produce better coloring.
- Balance - Relocation algorithm for partitioning signed graphs
(graphs with positive and negative values on lines representing
friends and enemies, for example).
Given partition is optimized to get as much as possible
positive lines inside classes and negative lines between classes.
If number of repetitions is higher than 1, initial partitions
into given number of classes are chosen randomly for every repetition
separately. If program finds several optimal solutions, all are reported.
For more details about algorithm see:
Doreian P., Mrvar A. (1996): A Partitioning Approach to Structural Balance.
Social Networks (18). 149-168.
- R-Enumeration - Starting with network and
(random) permutation find such permutation
that numbers of vertices that belong to same
(strongly connected) groups are close to each other.
- Expand Partition - Expand partial partition (some class numbers are
uknown - 0) to vertices with uknown class number:
- Greedy Partition - Put vertices in the same class as
selected vertices in partition if
- Input ...we can reach selected vertices in at most k-steps.
- Output ...we can come to vertices from selected vertices
in at most k-steps.
- All ...Input + Output (forget direction of lines)
Classes are joined if one vertex should belong to more classes.
- Influence Partition - Put every vertex with unknown class number (0)
in given partition in the same class as
is the class of the closest vertex. If several vertices with
known class number have the same distance, the highest value is used.
- Expand Reduction - Restore original network from reduced
network (hierarchical reduction!) and appropriate hierarchy (result is always undirected network).
- Identify - Identify (reorder and/or join some units).
- Petri - Execute Petri net according to starting marking
of places determined by partition. Number of places
in network is equal to dimension of partition.
Places must be defined furst (1..m) then
transitions (m+1..n).
What to do if more than one transition can fire?
Two possibilities:
- Random - Transition is chosen randomly.
- Complete - Complete tree of all possible transitions is built -
result is hierarchy. You can choose the maximum
depth of the tree, or execute Petri net
as long as possible.
Try for example -petri2.net petri2.clu-
from book of J. L. Peterson:
Petri Net Theory and the Modeling of Systems, p.21
or -petri51.net petri51.clu- p 65-67..
- Refine Partition Refine partition according to selected network
(reachability).
- Strong ... for directed network.
- Weak ... for undirected network.
- Leader Partition - find clusters of vertices of acycling
network inside layers.
Partition - Only Partition is needed as input.
- Create Null Partition - Create null partition of selected dimension.
Default dimension is the size of selected network
(if there is one in memory).
- Binarize - Make binary (0-1) partition from selected
partition.
- Canon Partition - Transform partition to its canonical (unique) form
(vertex 1 is always in class 1, the next vertex with smallest
number that is not in the same class as vertex 1 is in class 2...).
- Make Random Network - Generate random network where
input or output degree of each vertex is fixed using partition.
- Input - partition tells input degrees of vertices.
- Output - partition tells output degrees of vertices.
- Make Permutation - Make permutation from selected partition.
(first all vertices with the lowest class number, ...)
- Make Cluster - Transform partition to cluster.
- Make Hierarchy - Transform partition to hierarchy
(nested or not).
- Make Vector - Transform partition to vector (V[i]:=C[i]).
Partitions - operations on two partitions. Two partitions
must be selected before performing operations.
- First Partition - Partition that is currently active,
will be used as first (original) partition in operations.
- Second Partition - Partition that is currently active,
will be used as second (criterion) partition in operations.
- Extract second from first - Extract from first partition vertices
that satisfy criterion (are on specified interval) determined by
second partition.
This operation is useful when we have partition that actually saves
some information about vertices (for example gender). When you get
(extract) some smaller part of the network (for example vertices
that are on distances less than 3 from selected vertex),
information about gender would be lost without performing the
same operation (extraction) on partition.
- Add Partitions - Add two partitions (useful for example
when combining Input and Output neighbours in acyclic networks)
- Expand First According to Second - Expand first partition
according to shrinking determined by second partition.
- Intersection - of selected partitions.
- Info - Bivariate statistical measures between selected partitions:
- Cramer's V coefficient.
- Spearman Rank correlation coefficient.
Permut. - Only permutation is needed as input.
- Identity - Create identity permutation of selected dimension.
Default dimension is the size of selected network
(if there is one in memory).
- Random - Create random permutation of selected dimension.
Default dimension is the size of selected network
(if there is one in memory).
- Inverse - Create inverse permutation of selected permutation.
- Mirror - Create mirroring permutation of selected permutation
(sort in opposite direction).
- Make Partition - Create partition into selected number of
clusters from given permutation.
Cluster - Only cluster (and partition) is needed as input.
- Create Empty Cluster - Create cluster without vertices.
- Make Partition - Transform cluster to partition.
- Binarize Partition - Binarize partition according to cluster -
make binary partition of the same dimension as the given partition,
vertices that are in cluster numbers determined by the cluster
will go to class 1 other to class 0.
This allows noncontiguous ranges to be selected
(other choices in Pajek need contiguous ranges).
Note the exception: In this case cluster represents set of cluster numbers and
not set of vertices numbers.
Hierarchy - Only hierarchy is needed as input.
- Extract Cluster - Extract cluster from hierarchy -
the cluster is whole subtree of selected node in hierarchy.
- Make Network - Converts hierarchy to network
(use it for example to draw hierarchy - drawing by layers).
Closed nodes are also taken into account.
- Make Partition - Converts hierarchy to partition
(according to closed nodes).
Vector - Operations using vector.
- Create Identity Vector - Create identity vector
(vector containing only 1's) of selected dimension.
Default dimension is the size of selected network
(if there is one in memory).
- Extract Subvector - Extract subvector from given vector -
criterion is class in the selected partition.
- Make Partition - Convert vector to partition:
- by Intervals - according to selected dividing numbers in
vector vertices get appropriate class numbers. Intervals can be given by:
- First Threshold and Step - Select first threshold and step in
which to increase threshold.
- Selected Thresholds - Select all thresholds in advance.
- by Truncating (Abs) - partition is absolute
and truncated vector.
- Make Permutation - Convert vector to permutation -
sorting permutation.
- Transform - Transformations of given vector:
- Multiply by a constant.
- Absolute values of its elements.
- Absolute + Sqrt - square root of its absolute components.
- Truncate - truncated vector.
- Exp - exponential of vector.
- Ln - natural logarithm of vector.
- Power - selected power of vector.
- Normalize
- Sum - normalize so that the sum of elements is 1
- Max - normalize so that the maximum element will have value 1
Vectors - operations on two vectors. Two vectors
must be selected before performing operations.
- First Vector - Vector that is currently active,
will be used as first vector in operations.
- Second Vector - Vector that is currently active,
will be used as second vector in operations.
- Add Vectors - sum of selected vectors.
- Subtract Second from First - difference of selected vectors.
- Multiply Vectors - product of selected vectors.
- Divide First by Second - division of selected vectors.
- Linear Regression - fit the two vectors using linear regression.
Results are: regression line, linear estimates of second vector
and corresponding errors.
- Min (V1, V2) - smaller elements in selected vectors.
- Max (V1, V2) - bigger elements in selected vectors.
- Transform - two vectors to another two vectors:
- Cartesian -> Polar - First vector must contain x-coordinates
second y-coordinates. Results are: vector containing polar radious
and vector contatining polar angles in degrees.
- Polar -> Cartesian - First vector must contain polar radious
second polar angles in degrees. Results are: vector containing x-coordinates
and vector containing y-coordinates.
Results can be (de)normalized to enable direct use in Draw window.
- Info - Pearson correlation coefficient between selected vectors.
Options
- Read / Write
- Threshold - Value of line must be higher (absolutely) than
given to generate line between two vertices.
- Max. vertices to draw - Maximum number of vertices in
network to allow drawing (to prevent long waiting).
- Descriptions? - Read also coordinates, labels and
other graphical descriptions of vertices and
lines or not. I recommend to select that option,
especially if you are planning to draw pictures
of networks too.
- Auto Report? - Automatically report all text results to file rep1.rep.
- GEDCOM - Pgraph - Use pgraph format
(nodes are couples or individuals)
when reading genealogies (D. R. White),
otherwise nodes are only individuals.
- Bipartite Pgraph - Generate bipartite pgraph that
has squares for marriages, triangles
and circles for individuals.
- Pgraph+labels - Attach also labels of lines to pgraph, when
reading GEDCOM file.
- x / 0 = Specify the result when dividing nonzero value with 0.
- 0 / 0 = Specify the result when dividing 0 with 0.
- Valued core: Use max instead of sum - Specify the criterion
when computing valued core.
Use sum: Check whether the sum of values of lines to the
members of core is lower or equal to the current threshold value.
Use max: Check whether the maximum value of lines to the
members of core is lower or equal to the current threshold value.
- Blockmodel - Select type of blockmodel for shrinking.
Possibilities are:
- 0..Min Number of Links
- 1..Null
- 2..Complete
- 3..Row-Dominant
- 4..Col-Dominant
- 5..Row-Regular
- 6..Col-Regular
- 7..Regular
- 8..Row-Functional
- 9..Col-Functional
- 10..Degree Density
Look at Doreian, Batagelj, Ferligoj: Blockmodeling.
- FontSize - Size of Font for displays.
- Ini File
- Load - Use selected configuration of Pajek which is stored in the file (*.ini).
- Save - Save the current configuration of Pajek into a file (*.ini).
Draw
- Draw -
Draw Network. A new window is open, where a new menu appears.
You can edit network by hand (move vertices using left mouse button),
select a part of the picture (using right mouse button and select
the area), edit lines that belong to selected vertex by
clicking on vertex using right mouse button, spin picture
using keys X, Y, Z, S, x, y, z, s.
Description of Draw window menu:
- Layout - Generate layout of the network.
- Circular - Position vertices on circle
- Original - in order determined by the network.
- using Permutation - in order determined by current permutation.
- Random - in random order.
- Energy - Automatic layout generation.
- Kamada-Kawai - algorithm for automatic layout generation
in the plane.
- Free - Every position in the plane is possible.
- Fix first and last - First and last vertex are
fixed in opposite corners.
- Fix one vertex in the middle -
Select vertex which will be fixed in the middle of the picture.
- Selected group only - Only selected part of the picture
is taking into account during optimisation.
- Fix selected vertices -
Selected vertices (from partition) are fixed on given positions).
This item is visible only if Draw partition is active.
- Fruchterman Reingold - another algorithm for automatic
layout generation (faster than Kamada-Kawai).
- 2D - optimisation in plane.
- 3D - optimisation in space.
- Factor - Input factor for optimal distance among
vertices when using Fruchterman Reingold optimisation.
- Starting positions - for energy drawing
(random, circular, given positions on plane xy,
given z coordinates).
- EigenValues - Drawing using eigenvalues/eigenvectors
(Lanczos algorithm). Values of lines can be taken into account or not.
- 1 1 1 - Select 2 or 3 eigenvalues and algorithm will
compute corresponding eigenvectors. Eigenvalues may be multiple
so there are many possibilities. Some examples
- 1 1 1 - compute 3 eigenvectors that correspond to the first eigenvalue
- 1 1 2 - compute 2 eigenvectors that correspond to the first eigenvalue
and 1 that correspond to the second
- 1 2 2 - compute 1 eigenvector that correspond to the first eigenvalue
and 2 that correspond to the second
- 1 2 3 - compute 1 eigenvector that correspond to the first,
1 that correspond to the second and 1 that correspond to the
third eigenvalue
- 1 1 - compute 2 eigenvectors that correspond to the first eigenvalue
(2D picture)
- Layers - Visible only if Draw partition is active.
Draw in layers according to partition.
- Type of Layout Select type of picture
(2D - layers in y direction, or 3D - layers in z direction).
According to that, appropriate menu appears.
- In y direction Draw vertices in layers (y coordinate)
inside layers draw vertices centered-equidistantly (x coordinate),
z coordinate is 0.5 for all vertices.
- In y direction+random in x Same as first option,
only vertices are put on layers in random order
not according to vertex numbers.
- In z direction Draw layers in z direction,
live x and y coordinates as they are.
- In z direction + random in xy Draw layers in z direction,
x and y coordinates get random values
- Averaging x coordinate - Use it after vertices are put
on layers in 2D. Iteratively compute average x-cooordinate of all
neighbours and normalize. Good approximation of global picture,
but vertices are put to close to each other. Use it on all vertices
or only on selected one.
- Averaging x and y coordinates - Use it after vertices
are put on layers in 3D. Iteratively compute average x and y
cooordinates of all neighbours and normalize. Good approximation
of global picture, but vertices are put to close to each other.
Use it on all vertices or only on selected one.
- Tile in x direction After averaging x coordinate
vertices are put to close to each other, so using this option
vertices are repositioned to minimal distance described in resoultion.
- Tile in xy plane Same as previous, only this
option is used when drawing 3D pictures.
- Optimize layers in x direction Optimize layout in layers
using minimization of the total length of lines.
- Forward - go from first to last layer. In the current layer
optimize only layers having numbers equal or one smaller as
the current layer number.
- Backward - go from last to first layer. In the current layer
optimize only layers having numbers equal or one larger as
the current layer number.
- Complete - go from first to last layer. In the current layer
optimize only layers having numbers equal or one smaller
or one larger as the current layer number.
- Optimize layers in xy plane - Same as previous, only this
option is used when drawing 3D pictures.
- Resolution How many additional positions are available on
layers. Works only if Pgraph is selected. The higher the resolution,
the better is the result of optimization, but also slower.
- GraphOnly - Show complete picture without labels of vertices and arrows.
- Previous - Draw previous network, partition or
network and partition which is (are) loaded in memory
(depending on selection in Options/PreviousNext/Apply to).
- Redraw - Redraw network.
- Next - Draw next network, partition or
network and partition which is (are) loaded in memory
(depending on selction in Options/PreviousNext/Apply to).
- Options - Additional options for picture layout.
- Transform - Transformations of picture.
- Fit area
- max(x), max(y), max(z) - Draw picture as big as
possible to fit area (resize each coordinate to fit in
picture independently).
- max(x,y,z) - Resize to fit in area but keap
real proportions (resize according to largest
distance in all three coordinates, e.g. moleculae).
- Resize - Resize picture (or selected part of it) in all three directions
for selected factor.
- Translate - Translate picture (or selected part of it) in space.
- Reflect y axis - Reflect picture (or selected part of it) around y axis.
- Rotate 2D - Rotate picture (or selected part of it) in xy plane.
- Fisheye - Fisheye transformation (cartesian or polar)
of picture. If no vertex is selected the middle point of picture
(or selected part of it) is used as focus, otherwise first selected
vertex will be used as focus.
- Values of lines - Meaning of values of lines during
energy drawing or eigenvectors computing (no meaning, similarities,
dissimilarities (distances)).
- Mark vertices using - Labels can be marked using
- labels
- numbers
- vector values (if vector of the same size is also present)
- without labels
- without labels and arrows
- parameters selected above but using real sizes (x_fact and y_fact in input files).
- selected group - when Draw/Partition is selected also part of
labels can be displayed.
- Lines - Select the way the lines are drawn:
- Draw Lines
- Edges - draw edges or not
- Arcs - draw arcs or not
- Mark Lines
- No - do not mark lines
- with Labels
- with Values
- Size - Determine size of vertices, lines, arrows and font
or turn them to default values.
- Colors - Determine color of background, vertices, lines and font
(of labels of vertices and lines)
or turn them to default values.
You can also use colors of vertices, arcs and edges as
defined on input file:
List of all possible colors (Acrobat file).
Example NET file with different colors
of vertices and arcs.
- Layout - Layout options
- Redraw during moving - Redraw whole network during
moving selected vertex (slower) or not (faster).
- Real xy proportions - The draw window has always
square shape or not.
- Arrows in the Middle - Draw arrows in the middle
of lines - not at terminal vertices.
- Size of vertex 0 - How to handle vertices of size 0
(size of vertex is determined in input file or using vector)?
- Hide vertex - vertices of size 0 are shown or not.
- Hide attached lines - lines with one end
in vertex of size 0 are shown or not.
- Decimal Places - How many decimal places to use when
marking vertices using vectors.
- ScrollBar On/Off - Show/Hide the scrollbars in the top
left corner of Draw window. When part of picture is selected,
scrollbar is used for moving. When whole picture is selected,
scrollbar is used for spinning (like pressing keys
X, Y, Z, x, y, z - spinning around axis defined by the key,
and S - spin around selected normal)
- Interrupt - Interrupt period during optimisations
(stop every ? second, or not)
- Previous/Next - Select parameters when using
Previous or Next commands for drawing sequence of networks
in draw window:
- Max. number - How many networks to show in sequence.
If the number is higher than number of existing networks
the sequence will stop earlier.
- Seconds to wait - Seconds to wait between the two layouts.
- Optimize Layouts - Optimize the current layout or not.
If the sequence of networks is obtained from the same network,
it is useful to choose Energy/Starting Positions/ Given xy
to start optimization with existing coordinates.
- Kamada-Kawai - Optimize the current layout using Kamada-Kawai algorithm.
- 2D Frucht. Rein. - Optimize the current layout using 2D Frucht. Rein. algorithm.
- 3D Frucht. Rein. - Optimize the current layout using 3D Frucht. Rein. algorithm.
- No - Do not optimize the layout, just show the picture.
- Apply to - Which object (Network, Partition, Vector)
will change when Previous or Next is selected:
- Network - The previous / next network in memory is drawn.
If Draw-Partition is selected and the new network matches in dimension
with selected partition, the same partition will determine colors of
vertices of the new network.
If Draw-Vector is selected and the new network matches in dimension
with selected vector, the same vector will determine sizes of
vertices of the new network.
Option can be used to show several networks of equal size
using the same partition/vector.
- Partition - The previous / next partition in memory is selected.
If Draw-Partition is selected: The same network is drawn using previous / next partition
(network and partition must match in size).
Option can be used to show several partitions
of selected network.
- Vector - The previous / next vector in memory is selected.
If Draw-Vector is selected: The same network is drawn using previous / next vector
(network and vector must match in size).
Option can be used to show several vectors
of selected network.
By checking several objects (Network, Partition, Vector) at the same time
previous / next networks will be drawn using previous / next partitions and
(or) vectors at the same time. All consequent selected objects must match in size.
- Select all - Select all vertices in window
(then possible to put vertices in given class).
- Export - picture to one of the following formats
- EPS/PS - Export to EPS format (with or without Clip, or WYSIWYG
[What You See Is What You Get - exported EPS picture is similar to
picture in Draw window - except that colors are Black/White
or color determined by partition]).
PS - Export to PS format (similar to EPS but without header).
- SVG - Export to SVG (Scalable Vector Graphics) format.
The plugin for examining layouts can be obtained from:
http://www.adobe.com/svg/viewer/install/
The picture in SVG can be further edited using
Jasc Trajectory Pro
- General - Export to SVG without possibility to choose parts of the picture.
- Labels/Arcs/Edges - Export with possibility to turn labels, arcs and/or edges on/off.
- Partition - Export to SVG using one or two partitions.
One partition is used by default: the same partition determines
classes and colors.
But, if two partitions are defined by Partitions menu, first
partition will determine classes, the second colors of vertices.
- Classes - User can turn selected classes and lines among classes on/off.
- Classes with semi-lines - User can turn selected classes on/off.
Lines among classes are drawn as semi-lines.
- Nested Classes - Upper classes are nested in lower
- whenever selected class is turned on all higher classes
are turned on too, and all lower classes are turned off
(suitable for showing cores, for example).
- VRML - Export to VRML (Virtual Reality) format.
- MDL MOL file - Export to MDL Molfile format.
You need Chime plugin for Netscape to watch it.
Chemscape Chime
- Kinemages - Export to Kinemages format with balls or
labels. You need Mage viewer to watch it.
A free copy of the Mage software can be downloaded from
FTP or
WWW).
- Current Network Only - Export only current network to Kinemages.
Two partitions defined by Partitions menu can be used -
one for generations one for colors.
- Current and all Subsequent - Export current network and
all subsequent networks (use commands KINEMAGE/Next or
Ctrl N in Mage).
If also next partitions fit in dimension
to dimension of networks, partitions will determine color of vertices.
- Bitmap - Export to Windows bitmap (bmp) format.
- Options - PostScript default options
(additional border around picture, background color, border color,
shapes file, ...)
- Spin
- Spin around - Spin network around selected normal.
- Perspective - Distant vertices are drawn smaller (or not).
- Normal - Normal vector to spin around.
- Step in degrees - Step in degrees when showing rotation.
- Move - Give additional constraints on hand vertex moving:
- Fix - Fix (do not allow) moving in x or y direction,
or do not allow changing distance from center ( circulating).
- Grid - Define x*y positions on grid, these become
feasible positions for vertices during moving
by hand.
- Circle - Define x*y positions on concentric circles,
these become feasible positions for vertices
during moving by hand.
- Grasp - Determine which additional vertices are moving
when clicking with left mouse button close to vertex
in given class. Vertices that will be moved are in the:
- Closest Class Only
- Closest Class and Higher
- Closest Class and Lower
- Info - Select aestetic properties of the current layout
to compute:
- Closest Vertices
- Smallest Angle
- Shortest/Longest Line
- Number of crossings if lines
- Vertex Closest to Line
- All Properties
Remember that coordinates of vertices must be between 0 and 1!
- Draw-Partition - Similar to Draw. Colors
of vertices mean the classes in selected partition.
Additionally you can put selected vertex or selected vertices into
given class in partition (classes are shown using different colors)
by clicking on middle mouse button (or Shift+left button)
(increment class), or together with Alt (or Alt+left button) -
decrement class number.
See: Class numbers and colors (Acrobat file).
Some additional menu items
that were already described appeared (you can draw network
according to layers from partition and optimise energy using fixed
vertices determined using partition).
It is also possible to move the selected class
(by clicking close to vertex from that partition).
- Draw-Partition-Vector - Colors of vertices are determined using
selected partition, sizes of vertices are determined using selected vector.
- Draw-Vector - Sizes of vertices are determined using selected vector.
- Draw-SelectAll - Create null partition and draw network using it.
- Info
- Network - Information about network
- General - General information about network
- number of vertices
- number of arcs, edges and loops
- density of lines
- sort lines according to their values (ascending or
descending) to find the most/least important lines.
- Indices - Different indices on network (chemical and genealogical).
- Triadic Census - Number of different triads in network.
See book of Faust and Wasserman and Acrobat file.
- Partition - General information about partition.
Sort vertices according to their class numbers (ascending or
descending) to see the most important vertices.
Frequency distribution of class numbers. Average, median
and standard deviation of class numbers are also given.
- Hierarchy - General information about hierarchy.
Operation is possible only if node numbers are integers.
It returns number of vertices in nodes of hierarchy (on first level).
- Vector - General information about vector:
Vertices sorted according to their values, average and standard deviation.
- Layout - Aestetic properties of given layout.
- Memory - Available memory. Not very accurate.
- About - Try and see.
History;
Macros
|