Q:

what's the algorithm about how to get all subsets from a char string without cover all distinct letters?

I've been struggling with a Subset algorithm question recently.
How to get all subsets from a char string? 
Condition: each subset cannot cover all the distinct letters of the original char string.
For instance, abbc, [a,b,c] -> output->  a, b, c, ab, abb, bbc, bb, bc
Subset: {abc}, and {abbc} should be removed!
My initial thought is to preprocess the original string into a1b2c1, then go recursively, each recursive layer process one distinct letter. In the last layer, like here, we need process c, whether we should put c in the subset depends on the information passed down by previous layers. 
I am not sure my idea is good, does anyone has ideas about this question?

A:

In the worst case scenario, you will have to process all 2^n subsets, therefore I don't think that you can do better time wise.
Your idea for an answer is pretty good that way.
The only piece of information that needs to be passed to the next recursive step is whether you've chosen all distinct characters until now or not. Which can be done with only one bit. Here's an example:
Denote value and count pairs as v[i] and c[i]. Let n denote the number of such pairs.
The state of the recursive function can be defined as
F(i, b) = Return all subsets including values > v[i]. b = 1, if these subsets should not contain all distinct members.
F(n, b) is a trivial solution to the above recursion.
You seek F(0, 1)
Naturally you'll have to iterate from j = 0 to c[i] to consider all possible cases, ie, how many v[i] the subset shall include.
For j = 0 or b = 0, next recursive set will have b=0
Otherwise it should be 1.
This should generate all subsets that you seek.

