private static int connectedEdges(boolean[][] nabomatrise, boolean[] visited) {
		int antallKanter = 0;
		for (int i = 0; i < visited.length; i++) {
			if(!visited[i]){
				antallNoderMed++;
				for (int j = 0; j < nabomatrise.length; j++) {
					if(nabomatrise[i][j] && !visited[j]) {
						antallKanter++;
					}
				}
			}
		}
		return antallKanter;
	}