public int minStrokes(String stripe) {
		int[][] dp = new int[stripe.length()][stripe.length()];
		for (int x = 0; x < stripe.length(); x++)
			dp[x][x] = 1;

		for (int size = 1; size < stripe.length(); size++) {
			for (int from = 0; from < stripe.length(); from++) {
				int to = from + size;
				if (to >= stripe.length())
					continue;
				int min = 50;
				for (int x = from; x < to; x++) {
					min = Math.min(min, dp[from][x] + dp[x + 1][to]);
					if (stripe.charAt(x) == stripe.charAt(x + 1))
						min = Math.min(min, dp[from][x] + dp[x + 1][to] - 1);
					if (stripe.charAt(from) == stripe.charAt(to))
						min = Math.min(min, dp[from][x] + dp[x + 1][to] - 1);
				}
				dp[from][to] = min;
			}
		}

		return dp[0][stripe.length() - 1];
	}