Click here to Skip to main content
15,888,050 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Hough Circular transform Pin
lcssiva16-Sep-09 4:34
lcssiva16-Sep-09 4:34 
QuestionImage circle counting Pin
lcssiva16-Sep-09 1:14
lcssiva16-Sep-09 1:14 
AnswerRe: Image circle counting Pin
Alan Balkany16-Sep-09 3:31
Alan Balkany16-Sep-09 3:31 
AnswerRe: Image circle counting Pin
Fatbuddha 116-Sep-09 5:03
Fatbuddha 116-Sep-09 5:03 
QuestionNeed cut optimization algorith Pin
xx77abs14-Sep-09 1:42
xx77abs14-Sep-09 1:42 
QuestionRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 1:49
harold aptroot14-Sep-09 1:49 
AnswerRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 1:54
xx77abs14-Sep-09 1:54 
GeneralRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 2:22
harold aptroot14-Sep-09 2:22 
Greedy is when a series of optimal local choices will always lead to a global optimum
Which is not the case here. It would have been for some sizes of small rectangles.

But basically, this sucks. Does it absolutely have to be actually optimal?

Also, are the coordinates not-too-big integers?

If they are, what you could try (but I don't guarantee it's the best way) is a limited form of Branch&Bound combined with a heuristic to determine which choice to test first (to test "probable" cases first) and bound the subtree when you can determine that due to earlier choices it would be completely impossible to find a solution in that subtree (such as when the biggest open space is not big enough to place the biggest unplaced small-rectangle in it)
It will still suck for any but tiny instances of the problem. There would be an enormous number of choices at each node - the total number of possible placements of all rectangles that were not yet placed. The heuristic might be something like "try the biggest rectangle first" combined with a sane way to place it (eg near the edge).
I don't even see a way to do real B&B on this..

It's stupid though, there are many overlapping subproblems (you could use memoization but you'd get a Huge lookup table - maybe try something like "memoization only for the first k levels of recursion") and this algorithm would likely take longer than the estimated age of the universe to run on any interesting instance of the problem.

If a non-optimal (but "good") result is also OK, you could use basically the same algorithm but with far less choices (eg use an heuristic to do only the k "probably best" choices at each node) - you can still expect major suckage.


I hope this helped anyway.. though I don't think that's likely.. sorry


Note: I apologize for all errors and falsities in this post, there can't be none but I don't know what they are yet.



GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 2:40
xx77abs14-Sep-09 2:40 
GeneralRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 2:57
harold aptroot14-Sep-09 2:57 
GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 3:21
xx77abs14-Sep-09 3:21 
GeneralRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 3:39
harold aptroot14-Sep-09 3:39 
AnswerRe: Need cut optimization algorith Pin
IdUnknown14-Sep-09 5:46
IdUnknown14-Sep-09 5:46 
GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 6:50
xx77abs14-Sep-09 6:50 
QuestionSearch for repeated character combinations algorithm Pin
khalidelmeknesi9-Sep-09 2:31
khalidelmeknesi9-Sep-09 2:31 
AnswerRe: Search for repeated character combinations algorithm Pin
Richard MacCutchan9-Sep-09 3:01
mveRichard MacCutchan9-Sep-09 3:01 
GeneralRe: Search for repeated character combinations algorithm Pin
khalidelmeknesi9-Sep-09 20:50
khalidelmeknesi9-Sep-09 20:50 
AnswerRe: Search for repeated character combinations algorithm Pin
Luc Pattyn9-Sep-09 12:23
sitebuilderLuc Pattyn9-Sep-09 12:23 
GeneralRe: Search for repeated character combinations algorithm Pin
khalidelmeknesi11-Sep-09 0:38
khalidelmeknesi11-Sep-09 0:38 
GeneralRe: Search for repeated character combinations algorithm Pin
Luc Pattyn11-Sep-09 1:14
sitebuilderLuc Pattyn11-Sep-09 1:14 
GeneralRe: Search for repeated character combinations algorithm [modified] Pin
khalidelmeknesi16-Sep-09 22:46
khalidelmeknesi16-Sep-09 22:46 
GeneralRe: Search for repeated character combinations algorithm Pin
Luc Pattyn17-Sep-09 2:05
sitebuilderLuc Pattyn17-Sep-09 2:05 
GeneralRe: Search for repeated character combinations algorithm Pin
khalidelmeknesi17-Sep-09 2:18
khalidelmeknesi17-Sep-09 2:18 
GeneralRe: Search for repeated character combinations algorithm Pin
Luc Pattyn17-Sep-09 3:31
sitebuilderLuc Pattyn17-Sep-09 3:31 
AnswerRe: Search for repeated character combinations algorithm [modified] Pin
Moreno Airoldi12-Sep-09 4:40
Moreno Airoldi12-Sep-09 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.