beaunus/stanford-algs

Create Test Cases 1.4

Closed this issue · 5 comments

Create Test Cases 1.4

Unconfirmed test cases are waiting for approval from @dgrcode.

Since the algorithm is not deterministic, I wouldn't be surprised if there are errors.

https://github.com/beaunus/stanford-algs/tree/unconfirmedTestCases1.4/testCases/course1/assignment4MinCut

I'm on it!
I'm updating my Python tester at the same time, so it can take a bit.

To test these files, I've run the algorithm n^2 times, being 'n' the size of the input. This number of repetitions is a bit smaller than the recommended in the lectures, but it was already too slow. My algorithm to solve the min cuts can definitely be improved. For sizes 150 or bigger, I run the algorithm 1000 times, that is not really close to the optimal amount of repetitions, so we have the risk of having missed the min cut there.

For files under 150, I've detected two files where my results were smaller. I'll edit them in the PR before merging.

random_23_100 ✘
Expected: 10
Result: 8
random_27_125 ✘
Expected: 11
Result: 10

For sizes 150 or bigger, I got the same results, but as I said, we might have missed the min cut. I think we could make a note in the README of this assignment, stating that any result smaller than expected for those files should be considered correct, and reported to the maintainers (us) to update the output value.

What do you think?

Opened #23 with the modifications

Great ideas. I'll merge your updates into master today.