Search:

Type: Posts; User: andreas90

Search: Search took 0.18 seconds.

  1. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    I have given up the approach with the permutations since it seems like a dead end. I'm working on a different approach now.
  2. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    As I said in my previous post this will effect the computational time of the program.
    In each run of the algorithm, the method that creates the permutations is called many times. Therefore the...
  3. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    Thanks for your suggestion.
    Unfortunately, at some point I'll need all the permutations together in the ArrayList to do some stuff with them, so the exception may be avoided when I'm generating them...
  4. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    Unfortunately I need the combinations/permutations themselves. Finding the number of them was a "trick" to improve the time and memory usage. ie using an ArrayList with initial size (which is the...
  5. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    Hello aesguitar!

    You are right about my RAM, it's 3GB. As you can see from the code I posted I keep the permutations, not combinations. My new approach involves finding the combinations (which are...
  6. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    Hello Z!

    Thanks for the time you spent on my problem. I tried calculating P(n,r) as you suggested and it worked as I thought. I don't get a java.lang.OutOfMemoryError exception in the internal...
  7. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    The number of permutations is P(n,r) = n!/(n-r)!
    So for n=60 and r=4 I have P(60,4) = 60! / (60 - 4)! = 11703240 permutations.

    I tried the same method with each quadraplet being a String instead...
  8. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    I didn't explain well what I'm doing. This is the method that causes the java.lang.OutOfMemoryError exception I posted in post#2. I generate P(n,r) permutations which for the following method is...
  9. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    It should be equal to the number of the permutations , if I'm getting right what you asked.

    You mean if I need all the permutations? Yes, I need them because I want to search every possible...
  10. Replies
    20
    Views
    3,067

    [SOLVED] Re: Number of permurations an memory problems.

    When I try to solve a large instance of the problem I get the following error:

    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown...
  11. Replies
    20
    Views
    3,067

    [SOLVED] Number of permurations an memory problems.

    Hello guys!

    I'll give you the big picture of what I'm doing. I'm solving a combinatorial optimization problem. I find an initial solution and then try to improve it with some heuristics. One of...
Results 1 to 11 of 11