public Graph create( ArrayList<Pair> pairs, int numVersions )
		throws Exception
	{
		unattached = new UnattachedSet();
		incomplete = new HashSet<Node>();
		allVersions = new BitSet();
		for ( int i=1;i<=numVersions;i++ )
			allVersions.set( i );
		graph = new Graph();
		origSize = pairs.size();
		if ( pairs.size() > 0 )
			deserialise( pairs );
		// generate the constraint set
		for ( int i=1;i<=numVersions;i++ )
			graph.constraint.set( i );
		parents = new HashMap<Arc,Pair>();
		orphans = new HashMap<Arc,Pair>();
		return graph;
	}