Advice for statistics/ML problem
I would suggest using bipartite matching.  Have one vertex on the left side for each hidden value you observed.  Have one vertex on the right side for each value in your approximate distribution (your model for the underlying distribution).  Draw an edge between each pair of vertices $(u,v)$, with a weight based on how similar their counts (frequencies) are.  Look for a matching of maximal weight.

This will work if you have no other information about the hidden values, other than their frequencies.  If you also have some information about their order or other side information, I don't know how to use bipartite matching for that.