[algogeeks] Re: Backtracking algorithm for binpacking-like problem

2011-12-12 Thread Lucifer
@Gene Great information.. Wasn't aware of the above cited finding... Thanks.. @ For all active followers of this post.. The problem posted by ania is a slight modification of the bin-packing problem as pointed out above because here the no. of bins to be filled is fixed and the capacity (of the

[algogeeks] Re: Backtracking algorithm for binpacking-like problem

2011-12-12 Thread Gene
Guys, if you can find a solution that is not exponential time in the worst case you are going to be famous because this problem is NP-Hard in the strong sense. I.e. there is not even a pseudo-polynomial time algorithm. To get a perfect solution every time, you can't do better than heuristic searc

[algogeeks] Re: Backtracking algorithm for binpacking-like problem

2011-12-12 Thread Lucifer
A slightly different approach on the lines of data access and ease of understanding: 1) Sort the input array i.e the weights array W[N] . 2) Identify the no. of unique elements in it and create the following: a) Count[R] - count of each unique element based on its sorted order.

[algogeeks] Re: Backtracking algorithm for binpacking-like problem

2011-12-12 Thread Lucifer
@ania My idea is based on the post that i had replied in http://groups.google.com/group/algogeeks/browse_thread/thread/8a58ea05c96f811b?hl=en# A simple tweak to the above algo can be used to solve bin-packing problem in a (probably) faster time. First, please go through the above post. The maxim

[algogeeks] Re: Backtracking algorithm for binpacking-like problem

2011-12-10 Thread Ania
Hi, I'm really interested in your idea as my solution is probably far from being optimal. On 11 Gru, 00:00, Lucifer wrote: > @ania, > > I think there is a faster way to solve the bin-tracking problem... i > have an idea, in case you want to discuss it do reply... > > On Dec 3, 3:28 am, Ania wro

[algogeeks] Re: Backtracking algorithm for binpacking-like problem

2011-12-10 Thread Lucifer
@ania, I think there is a faster way to solve the bin-tracking problem... i have an idea, in case you want to discuss it do reply... On Dec 3, 3:28 am, Ania wrote: > Hi, > > Here is my problem: > I have a list of items (only positive integers are allowed) and fixed > number of bins of identical

[algogeeks] Re: Backtracking algorithm

2008-11-06 Thread Miroslav Balaz
I am sorry, but i am not able to find out why you need any tree in this problem, it is excercise in school? and why should length ofset should be index in it? On Thu, Nov 6, 2008 at 7:18 PM, Luciano Pinheiro <[EMAIL PROTECTED]>wrote: > > Oh ! I'm so sorry. > > I will try to be more clearly. > > F

[algogeeks] Re: Backtracking algorithm

2008-11-06 Thread Luciano Pinheiro
Oh ! I'm so sorry. I will try to be more clearly. For example: I have John (J) and Mary (M) that each take two numerical sets ((Rj, Dj) ; (Rm, Dm)). Supose that : N = {1, 2, 3, ... 500} and Rj = {5, 10, 50, 54} Dj = {1, 2, 3, ..., 10} Rm = { 2, 5, 7, 20, 120} and Dm = {1, 3, 5, 6, 30, 35, 54}

[algogeeks] Re: Backtracking algorithm

2008-11-06 Thread Miroslav Balaz
I dont thing if that problem is requiring backtracking algorithm, pleas try better description of the real case. how are those sets defined? if they are defined by enumerating its elements, you can compute intersection in O(n) if they are sorted. On Thu, Nov 6, 2008 at 2:32 PM, Luciano Pinheiro <[

[algogeeks] Re: Backtracking algorithm

2008-11-06 Thread Luciano Pinheiro
Thank's everybody to yours answers. But, my problem is described below. I have this problem: In somewhere have a finite number set where all its elements are natural numbers. Well, this numeric set is defined here by N. I have two others sets number (R and D), where R is a subset of N and R # N

[algogeeks] Re: Backtracking algorithm

2008-11-04 Thread Rahul Singhal
there ia a book called "FUNDAMENTALS OF DATA STRUCTURES BY HOROWITZS AND SAHNI". NOTE:There are two versions of it.The ebook of the version containing this topic is not available as per knowlegde but it is available in market.This version's size is long as compare to other version. This topic is n

[algogeeks] Re: Backtracking algorithm

2008-11-04 Thread Ajinkya Kale
Can you be a bit more specific ? On Tue, Nov 4, 2008 at 9:12 AM, Luciano Pinheiro <[EMAIL PROTECTED]>wrote: > > Please, help me people ! > > I need understand and develop a backtracking algorithm to include into > a program and I don't nkow where find these. > > Someone have any document, or URL