Skip to content

Commit

Permalink
Merge branch 'work' of git@github.com:IndianGuru/RPCFN6
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrupiano committed Jan 21, 2010
2 parents 74af43f + 361b3e2 commit f52ba5a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
22 changes: 16 additions & 6 deletions DESCRIPTION
Expand Up @@ -12,11 +12,11 @@ following test cases. The code in the test cases is sufficient to define the
methods you must implement.

This is an NP complete problem, and as such I have only provided very small
datasets in the test cases. Test case #3 takes the longest to solve and
you may find it easier to comment it out early in your development phase.
On a MBP Pro with a 2.4 GHz dual core processor and 4GB RAM, it took
just over 3 minutes to solve. The other four test cases took only a
couple of seconds.
datasets in the test cases. Test case #3 takes the longest to solve (See
**Notes below about how to run the Test Case #3) and you may find it easier
to comment it out early in your development phase. On a MBP Pro with a 2.4
GHz dual core processor and 4GB RAM, it took just over 3 minutes to solve.
The other three test cases took only a couple of seconds.

Note that test cases 2 and 4 define specific distributions against which you
can verify. Test cases 1 and 3 have more than one acceptable distribution
Expand All @@ -25,4 +25,14 @@ and as such I have not provided a specific distribution to test against.
Note also that there is a well known algorithm that provides a much
faster though not optimal solution. It will pass all tests except for test
case #3. If you are only able to determine this particular solution, please
still consider submitting your solution for consideration.
still consider submitting your solution for consideration.

** Notes:
To accommodate the fact that Test Case #3 takes a long time to run, you
can run the test normally, and TC#3 will not run. When you want the TC#3
to run, then you can run the following:

ruby test_solution_acceptance.rb full

The word "full" will signal it to run all the test cases.

4 changes: 2 additions & 2 deletions test_solution_acceptance.rb
Expand Up @@ -50,7 +50,7 @@ def test_basic3
# [3.0, 0.73],
# [2.3, 1.09, 0.23],
# [1.75, 1.5, 0.27, 0.11]
end
end if ARGV[0] == "full" # only use this TC if 'full' is added as an argument.

def test_basic4
jobs = [5,5,4,4,3,3,3]
Expand Down Expand Up @@ -115,4 +115,4 @@ def distributions_are_equivalent?(dist1, dist2)
def arrays_have_same_elements?(arr1, arr2)
arr1.size == arr2.size && (arr1 - arr2).empty?
end
end
end

0 comments on commit f52ba5a

Please sign in to comment.