You have on the order of 15k ngrams. This is an extremely small data set. It will likely fit into 1 MB of memory, probably less than 1/5000 of the total memory on your machine. You don't need hadoop to solve such a problem. Further, it's not really a machine learning problem at all, it's just an optimization problem.
You could think of your n-grams as (small) sets of words, and your frequent word list as a larger set. For your first problem, you want to pick the fewest number of n-grams such that you can cover (or come as close to covering as possible) the frequent word list with those n-grams. This is exactly a set cover problem. You probably won't get an exact solution, but there are simple heuristics that do well.
I am not totally clear on how your first problem differs from your second problem, however.