Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect output files for test cases in course2/assignment1SCC? #67

Open
marvinmednick opened this issue Oct 5, 2022 · 1 comment
Open

Comments

@marvinmednick
Copy link

The first error in in output_mostlyCycles_3_8.txt
The input file input_mostlyCycles_3_8.txt has 7 edges and 7 vertex
1 3
2 7
3 2
4 1
5 8
7 5
8 4

I verified manually has a single cycle that covers all edges/vertexes -> 1->3->2->7->5->8-> 4->1
The corresponding output file has 7,1,0,0,0 but it should be 7,0,0,0,0 as there is a single connected component of 7 vertexes
and has an extra '1' (note also that the sum counts in the output file indicate 8 Vertex, but the graph only has 7)
(note there is no vertex 6 in this graph)

Similarly input_mostlyCycles_4_8.txt has 7 vertex (and 7 edges)
1 2
2 1
3 6
5 8
6 5
7 3
8 7
and has two strongly connected components (1->2->1) and (3->6->5->8->7->3)
and so the output should be 5,2,0,0,0 but output_mostlyCycles_4_8.txt has 5,2,1,0,0 (and the sum of the counts is '8' which is one more that in in the file (there is no vertex 4)

I've also checked output_mostlyCycles_10_32.txt
which has 11,10,5,4,1 and should be 11,10,5,4,0 (I've checked this one manually, and found input file has 30 Vertex but the sum of the counts show 31)

Other files which seem to have the a similar problem (but I have not verified other than my program)
output_mostlyCycles_11_32.txt (Contains 16,8,5,2,1 but I think this should be 11,10,5,4,0)
output_mostlyCycles_14_64.txt (Contains 48,11,2,2,1 but I think this should be 48,11,2,2,0)
output_mostlyCycles_22_200.txt (Contains 121,64,7,4,1 but I think this should be 121,64,7,4,0)
output_mostlyCycles_40_3200.txt (Contains 3187,4,4,3,1 but I think this should be 3187,4,4,3,0)

In all of the cases there seems to be a extra "1" size in the result

One thought that I had that since first few files with issues have less vertex that the problem size (e.g. input_mostlyCycles_3_8.txt has a problem size of '8' but only has 7 vertexes from the edges in the file that the intention is that that any vertexes not listed need to be filled in with no edges, but if that that the case, it is not clear.

@marvinmednick
Copy link
Author

One additional note -- I tried the adding vertexes from 1-problem size as indicated in the test case file name in before building the rest of the graph and that seemed to make all of the above test cases match, but then I found additional which fails with or without adding the vertexes
input_mostlyCycles_5_16.txt

In that one the graph is:
1 3
2 15
3 14
4 13
5 11
7 1
8 4
10 7
11 12
12 2
13 8
14 5
15 10

vertexes 6, 9 and 16 are not listed in the graph.
With adding the vertexes I get 10,3,1,1,1 (with the 3 "1"s reflecting the 3 missing vertexe
Without adding the vertexes I get 10,3,0,0,0

The output file contains 10,3,1,1,0 which doesn't seem be correct with either approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant