private int getLinearConflict() {
		/*
		 * Two tiles tj and tk are in a linear conflict if tj and tk are in the same line, 
		 * the goal positions of tj and tk are both in that line, tj is to the right of tk and 
		 * goal position of tj is to the left of the goal position of tk.
		 */
		int linearConflict = 0;
		for(int i=0;i<currentState.getCurrentPuzzleBoard().length;i++) {
			ArrayList<String> initialCombinations = generateCombinations(currentState.getCurrentPuzzleBoard()[i], currentState.getCurrentPuzzleBoard()[i].length, 2);
			ArrayList<String> goalCombinations = generateCombinations(goalState.getCurrentPuzzleBoard()[i], goalState.getCurrentPuzzleBoard()[i].length, 2);
			
			for(String combination : initialCombinations) {
				if(goalCombinations.contains(new StringBuilder(combination).reverse().toString())) {
					linearConflict+=2;
					
				}
			}
		}
		
		for(int i=0;i<currentState.getCurrentPuzzleBoard().length;i++) {
			Node[] initialColumn = new Node[currentState.getCurrentPuzzleBoard().length];
			Node[] goalColumn = new Node[goalState.getCurrentPuzzleBoard().length];
			for(int k=0;k<currentState.getCurrentPuzzleBoard().length;k++) {
				initialColumn[k] = currentState.getCurrentPuzzleBoard()[k][i];
				goalColumn[k] = goalState.getCurrentPuzzleBoard()[k][i];
			}
			ArrayList<String> initialCombinations = generateCombinations(initialColumn, initialColumn.length, 2);
			ArrayList<String> goalCombinations = generateCombinations(goalColumn, goalColumn.length, 2);
			
			for(String combination : initialCombinations) {
				if(goalCombinations.contains(new StringBuilder(combination).reverse().toString())) {
					linearConflict+=2;
					
				}
			}
			
		}
		return linearConflict;
	}