public int linearConflict(Object[] x) {
		int lin_distance = 0;
		boolean plustwo = false;
		Map<Integer, Integer> tmp = null;
		Integer coor_x, coor_y, o_cor_x, o_cor_y;
		int row;

		for (int i = 0; i < x.length; ++i) {
			Object value = x[i];
			if (!value.toString().equals(" ")) {
				// coordinates of the current state
				row = i / ev_len;

				tmp = coor.get(new Integer(value.toString()));
				// coordinates of the goal state
				coor_x = tmp.keySet().iterator().next();
				coor_y = tmp.get(coor_x);

				// looking for tj's
				for (int j = i + 1; j < ev_len; ++j) {
					if (!x[j].toString().equals(" ")) {
						int o_row = i / ev_len;
						tmp = coor.get(new Integer(x[j].toString()));
						o_cor_x = tmp.keySet().iterator().next();
						o_cor_y = tmp.get(coor_x);
						if (o_row == row)
							if (coor_x.intValue() == o_cor_x.intValue())
								if (o_cor_y.intValue() < coor_y.intValue())
									plustwo = true;
					}
				}
				if (plustwo)
					lin_distance += manhattan(x) + 2;
				else
					lin_distance += manhattan(x);
				plustwo = false;
			}

		}
		return lin_distance;
	}