CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Ceffa93

Search: Search took 0.01 seconds.

  1. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    Yes but how could i know if it is NP complete?
    is there a way to verify that?
  2. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    Yes i read it, what i'm looking for is this:

    we have x villages and m hospitals.
    we place the hospitals.
    every village is distant "L" from it's nearest hospital. (ex:if village is at km 4, and...
  3. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    I'm not so sure of that, i mean, A and C doesn't directly interact between them, but if i balance B and C, then i have to adjust the position of B and C centers...then i need to rebalance A and B...
  4. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    I'm not sure that you need to balance it only one time...i mean, if i balance B and C, then i pass to C and D and i find out that they need to be balanced. Now my C and D groups are different then...
  5. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    S@rK0Y, i had time to read your solution only now, the computation time is intresting, but how many times do you need to balance them? I've not tought deeply about it, but at a guess, every time i...
  6. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    sorry razzle, the greedy approach you were suggesting is interesting, but the result is not optimum, after that how do you manage to balance everything and get the optiumum solution?
  7. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    sorry, can you explain better?
  8. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    sure, in you example is pretty straightforward, but it is possible that you have to move a lot of them, maybe even move an element two or more times, in the end i think that we will end up with the...
  9. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    Exactly razzle, worst case is n = 2m, and its teta(n*binom(n m))...
  10. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    sadly i think superbonzo is right, i tried on paper a few examples, and there are situation where dividing into groups with max distance require so many aproximation that it is not worth it...
  11. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    Thanks, i was thinking something like it but you formalized it better...i'll try it, though i'm not sure how much computation time the "corrections" will require, it could be a lot, tomorrow i'll try...
  12. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    Ok thanks a lot!
  13. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    I think i get the point, but i didn't understand everything, sorry but my math notion are not superlative^^

    The best optimization i came out with is the bruteforce, which should be...
  14. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    S@rk0y: I thought of that, but it is not correct...i'll make an example:

    |_|_|_|_|__|

    the villages are at distance 1 one another, except the last one. I need to put two hospitals. Following...
  15. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    The point of the problem is to find the fastest algorithm possible, so i don't think teta(N^M) is the best one, not even close
  16. Replies
    45
    Views
    9,565

    Re: Difficult Algorithm!

    Yes, I thought of that, the problem is that the computation cost is around N^M, which is really bad, i'm sure that there is something better...
  17. Replies
    45
    Views
    9,565

    Difficult Algorithm!

    Hi everyone, i have a difficult problem to solve, and i need a risolutive algorithm, but i just can't find a solution to it...i'll explain the problem:

    I have N villages and M hospitals.
    The...
Results 1 to 17 of 17





Click Here to Expand Forum to Full Width

Featured