public int minCost(int i, int j) throws Exception
	{
		if (i > j)
			throw new Exception("Invalid Matrix sequence");
		if (i > n || j > n)
			throw new Exception("Non existent matrix specified");
		
		return m[i][j];
	}