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} I need perform, for each pearson, a search method that will try find a numeric intersect between Ri and Di+1, where i = ith person into people roll. I think taht create a person tree's where | Ri | (length of R set of ith person) is the KEY. I will try use the backtrackiing algorithm to run this tree search all intersect numbers between Ri and Di+1 for eash ith person in this tree. Thank's You. 2008/11/6 Miroslav Balaz <[EMAIL PROTECTED]>: > 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 <[EMAIL PROTECTED]> > wrote: >> >> 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, and S is a subset of N and S # N, and R # D. >> >> Think me, if a person 'a' have Ra and Da (where Ra and Da is numerical >> subset of N) and another person 'b' have Rb and Db (where Rb and Db is >> a numerical subset of N too). That's ok ? >> >> Now, I want to know which elements in intersection between Di and R(i+1). >> >> But this is a small case of a real case I need to resolve. In Real >> case, I have a group of people P that, each element p in P have two >> sets numerical (Ri and Di, where i is a ith element of P). You see my >> problem ? >> >> I think that, if I use the backtracking algorithm that I can to >> resolve this problem into a O(n) analysis. What do You think about >> this ? >> >> regards, >> Luciano Pinheiro. >> 2008/11/4 Rahul Singhal <[EMAIL PROTECTED]>: >> > 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 nicely presented in that book with the help of examples >> > and >> > some good exercise questions at the end of the chapter >> > >> > On Tue, Nov 4, 2008 at 10: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 to indicate to me ? >> >> >> >> Sincerely, >> >> >> >> ---------------------------------------- >> >> Luciano Soares Pinheiro Jr. >> >> Analista desenvolvedor Sr. >> >> >> >> >> > >> > >> > >> > -- >> > Rahul singhal >> > B.Tech. PART IV >> > Department of Computer Engineering >> > NIT Kurukshetra >> > Kurukshetra >> > >> > > >> > >> >> >> >> -- >> ---------------------------------------- >> Luciano Soares Pinheiro Jr. >> Analista desenvolvedor Sr. >> >> > > > > > -- ---------------------------------------- Luciano Soares Pinheiro Jr. Analista desenvolvedor Sr. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---