Picking sample data keeping some data characteristics preserved
I just figured that its very easy to keep standard deviation of each subtree in a binary tree. And this made me think of a problem. I don’t know if people have already been working on it or not. But its an interesting problem. Suppose I have a large data of numbers. And someone asks me to give him k numbers so that they have the same average. How do I do that?
Let me express it in mathematical form. You are given ‘n’ numbers, . Give me ‘k’ numbers out of these ‘n’ numbers so that their average is nearest to