public Graph mstFib(Graph G) {
		int graphSizeFib = G.getSize();
		int []parentFib = new int[graphSize];
		int []key       = new int[graphSize];

		Graph result = new Graph(graphSizeFib);
		for(int index = 0; index < graphSize; index++) {
			parentFib[index] = -2;
			key[index]    = 1001;
		}
		parentFib[root] = -1;

		FibonacciHeap fb = new FibonacciHeap();

		Map<Integer, Node> mappings = new HashMap<Integer, Node>();
			
		LinkedList<Integer> adjacencyList = G.getAdjacencyList(root);
		Node n1 = fb.addToHeap(new Node(0, 0));					
		for(Integer i = 1; i < graphSizeFib ; i++) {
			Node n = fb.addToHeap(new Node(i, 1001));
			//fb.printRootList();
			mappings.put(i, n);
		}

		//fb.printRootList();
		
		LinkedList<Integer> adjacencyListNeighbours;
		int edge = 0;
		int k = 0;
		int costk =0;
		while(fb.getSize() != 0) {
			int vertex = 0;
			Node smallest = fb.removeMin();
			if(smallest != null) {
				vertex = smallest.getElement();
				mappings.remove(vertex);
			 
			}
			adjacencyListNeighbours = G.getAdjacencyList(vertex);
			Integer adjacentVertexNeighbours = null;
			Integer cost = null;
			for(Integer j = 0; j < adjacencyListNeighbours.size(); j++) {
				adjacentVertexNeighbours = adjacencyListNeighbours.get(j);
				cost = G.getCost (vertex, adjacentVertexNeighbours);
				parentFib[adjacentVertexNeighbours] = vertex;
				if(mappings.containsKey(adjacentVertexNeighbours) && cost < smallest.getData()) {
					k = adjacentVertexNeighbours;
					costk = cost;
					fb.decreaseKey(mappings.get(adjacentVertexNeighbours), cost);
					mappings.remove(adjacentVertexNeighbours);
					mappings.put(adjacentVertexNeighbours, new Node(adjacentVertexNeighbours, cost));	
				}
			}
				
				result.addEdge(vertex, k, costk);
				edge++;
				 
			
		}
		//result.printGraph();
		return result;
	}