private int min(int i, int j) {
		if (i == j && i == 0) {
			return 0;
		}
			int del = delete(i, j);
			int ins = insert(i, j);
			int rep = replace(i, j);
			int res;
			if (del <= ins && del <= rep) {
				res = del;
			}
			else {
				if (ins <= del && ins <= rep) {
					res = ins;
				}
				else {
					res = rep;
				}
			}
	return res;
    }