
I just talked to my developer. Actually, there are 2 rules:
1st rule: In case of an odd number of words, the system will show the first and last word and will remove alternate words in the middle. Example:
A pear and an apple.
After the algorithm, the system will show:
A _____ and _____ apple.
2nd rule: In the case of an even number of words, the system will also show the first and last word and will randomly remove any of the alternate clues. Example:
How are you today?
After the algorithm, the result could be rendered either a) or b)
a) How _____ you today?
b) How are _____ today?
My developer sent me a PHP file with a clarification. Here's the link:
ClueAlgo.php  Google Drive[^]
I would appreciate your help if this is a quick fix. If it takes time this could be a paid job, for example on Fiverr.com





Sorry, I don't understand what help you are asking for. If you want it changed then tell your developer what he needs to do.





Imagine having ‘N’ rectilinear blocks of varying sizes. 'N' can be any number (< 1000); and of different but similar sizes.
See here... blocks — ImgBB[^]
I need an algorithm that will place these in a “ring” fashion, such that the area is minimized. White spaces or blank spaces within the ring are fine.
Ring picture... ring — ImgBB[^]
The constraints are…
Each rectilinear block must be placed
Minimize the area (x*y)
Create a ring such as below
Ring implementation
Note that my two pictures don't align exactly, meaning not all the blocks in the first picture are placed in the second. These pictures are only provided as reference/examples.
I’m not a computer scientist by trade. This would seem to be a cost optimization problem, by I’m having a problem wading through the many optimization algorithms out there. Any guidance on which algorithm would be viable?
Thanks!





rbuchana wrote: Create a ring such as below What exactly is a ring? Of course I looked at the example, but it could be interpreted differently.
Can the ring look like this? Or this? Maybe like this? Maybe even like this?
Are the coordinates/sizes discrete?





Door #3... image — ImgBB[^]
Difficult to explain words, but the idea is to have a rectangle in the middle with no protusions.
Coordinates/sizes are not discrete.





Cut the pieces out, move them around until optimum, then reverse engineer into a software solution.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food





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.





You're correct. There is somewhat of a constraint on the aspect ratio (x/y), but also some flexibility. Meaning it doesn't need to be 50%, but 10% or 90% are probably too much. But no hard limit.





In that case, it's vague (at best) to speak of minimizing the total area.





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 NPhard, 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.





What is the difference between area and perimeter?





That's so simple to find out with a simple Google, like this[^].





Look at his previous message  he's a "homework help" spammer.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
 Homer





I saw "Messages: 1" and didn't bother to click on it to see any other messages.
Tagged as a spammer.





Unfortunately the previous message is no more.





Watch the above post for a payload.





That's not a carpet! ... That's an area rug!
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food





wrote: What is the difference between area and perimeter?
Serious ?
This primary school level. And you not even able to search internet.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein






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.
DP algorithm
Does someone have an idea? Where do I start from in this problem?
Thanks in advance.
modified 27Jul20 7:58am.






Please answer this question.





What question?
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 Tshirt
AntiTwitter: @DalekDave is now a follower!





What question ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein





This exact worded homework assignment "question" showed up on this site two and half years ago.
You'll get the exact same answers the previous person got.
No, we're not doing your homework for you.



