Are you stating all of the constraints? To minimize the x*y area, it would often be preferable to have two very long sides and two very short ones for the inner rectangle.
For example, say that all rectangles are the same shape and that there are 4n of them. They could be arranged to leave a square in the middle. Let's say the size of the square is a*a and that the four outer areas are also a*a. The x*y area would then be 3a*3a=9a^2.
But instead of leaving an inner square, we can reduce two of its sides by 50% and increase the other two by 50%. Now we have an area of (7a/2)(5a/2) = (35/4)a^2, which is slightly smaller. The size of the inner rectangle is now (a/2)*(3a/2) = (3/4)a^2 instead of a^2.
If the problem can be stated more clearly, my guess is that it's a variant of the bin packing problem[^]. The article mentions that this problem is NP-hard, which effectively means that the time required to find the optimal solution rises exponentially, although it may be possible to more efficiently find a solution that is known to bounded in terms of how close it is to the optimal one.
Given an array A of n integers and k <= n, we want to choose k numbers from this array and split them to pairs, such that the sum of the differences of those pairs (in absolute value) is minimal.
Does someone have an idea? Where do I start from in this problem?
If you want to ask a question, then you need to watch what you are doing.
Edit the question, change teh subject line to a short (a dozen words max) description of the problem, then put the actual question in the "Message" area, which can take a fair amount of data.
At the moment, the subject is truncated so we have no idea what help you need.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
Here are some suggestions for distinguishing music from voice: Music usually has melody, which uses a wider range of sustained frequencies than voice. Polyphonic music has harmony, which uses more chords than does voice. A chord usually has multiple harmonics and subharmonics, while voice is much more limited in its harmonics.
As general guidance, I would write tests based on realtime Fourier analysis, comparing samples of the range of music and the range of voice which you wish to distinguish (you have to make decisions about this so you know when you are successful). Each test can yield a measurement of effectiveness that you can use to direct the evolution of your ideas and program. Basically, if a test program gets 50% correct answers when faced with music and voice samples, then it is 0% successful, but if it gets 100% correct answers, it is 100% successful for that set of samples.
I'm not sure what Confucius has to do with AI, but okay. Distinguishing music from voice must be done within a corpus of examples representative of a typical usage. I think I can say for sure that Gregorian Chant is not representative of typical use cases. But thanks for your post.
Last Visit: 31-Dec-99 19:00 Last Update: 8-Dec-23 9:43