&sectionHeader('Shortest Paths (24 points)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('001', 'Small graph');
$subtotal += &runTest('002', 'Large acyclic');
$subtotal += &runTest('003', 'Extra large acyclic');
$subtotal += &runTest('004', 'Large cyclic');
$subtotal += &runTest('005', 'Extra large cyclic');
$subtotal += &runTest('006', 'No edges');
$subtotal += &runTest('007', 'No path, acyclic');
$subtotal += &runTest('008', 'No paths, cyclic');
$subtotal = $subtotal * 24 / 8;
my $shortest=$subtotal;
$checkpoint=$subtotal;
$total += floor($subtotal);
&sectionResults('Shortest Paths (24 points)', $subtotal, 8, $checkpoint );
$testCount += 8;

&sectionHeader('Shortest Paths w/ Valgrind (8 points)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
if ($shortest > 10) {
$subtotal = &runTest('009', 'Large acyclic');
}
else {
skipTest('009', 'Large acyclic');
}
if ($shortest > 10) {
$subtotal += &runTest('010', 'Large cyclic');
}
else {
skipTest('010', 'Large cyclic');
}
if ($shortest > 10) {
$subtotal += &runTest('011', 'No paths, acyclic graph');
}
else {
skipTest('011', 'No paths, acyclic graph');
}
if ($shortest > 10) {
$subtotal += &runTest('012', 'No paths, cyclic graph');
}
else {
skipTest('012', 'No paths, cyclic graph');
}
$subtotal = $subtotal * 8 / 4;
$checkpoint += $subtotal;
$total += floor($subtotal);
&sectionResults('Shortest Paths w/ Valgrind (8 points)', $subtotal, 4, $checkpoint );
$testCount += 4;

&sectionHeader('Shortest Paths Timing (10 points)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
if ($shortest > 10) {
$subtotal = &runTest('013', 'Shortest Paths');
}
else {
skipTest('013', 'Shortest Paths');
}
$subtotal = $subtotal * 10 / 1;
$checkpoint += $subtotal;
$total += floor($subtotal);
&sectionResults('Shortest Paths Timing (10 points)', $subtotal, 1, $checkpoint );
$testCount += 1;

&sectionHeader('Longest Paths in Acyclic Graphs (15 points)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('014', 'Class example');
$subtotal += &runTest('015', 'Large acyclic');
$subtotal += &runTest('016', 'Extra large acyclic');
$subtotal += &runTest('017', 'Acyclic, long branches, want longest path on shortest branch');
$subtotal += &runTest('018', 'No edges');
$subtotal += &runTest('019', 'No paths');
$subtotal = $subtotal * 15 / 6;
my $longest=$subtotal;
$checkpoint += $subtotal;
$total += floor($subtotal);
&sectionResults('Longest Paths in Acyclic Graphs (15 points)', $subtotal, 6, $checkpoint );
$testCount += 6;

&sectionHeader('Longest Paths in Acyclic w/ Valgrind (8 points)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
if ($longest > 8) {
$subtotal = &runTest('020', 'Longest paths in acyclic graph');
}
else {
skipTest('020', 'Longest paths in acyclic graph');
}
if ($longest > 8) {
$subtotal += &runTest('021', 'Acyclic, long branches, want longest path on shortest branch');
}
else {
skipTest('021', 'Acyclic, long branches, want longest path on shortest branch');
}
if ($longest > 8) {
$subtotal += &runTest('022', 'No paths in acyclic graph');
}
else {
skipTest('022', 'No paths in acyclic graph');
}
$subtotal = $subtotal * 8 / 3;
$checkpoint += $subtotal;
$total += floor($subtotal);
&sectionResults('Longest Paths in Acyclic w/ Valgrind (8 points)', $subtotal, 3, $checkpoint );
$testCount += 3;

&sectionHeader('Longest Paths Timing (15 points)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
if ($longest > 8) {
$subtotal = &runTest('023', 'Longest Paths');
}
else {
skipTest('023', 'Longest Paths');
}
$subtotal = $subtotal * 15 / 1;
$checkpoint += $subtotal;
$total += floor($subtotal);
&sectionResults('Longest Paths Timing (15 points)', $subtotal, 1, $checkpoint );
$testCount += 1;

&sectionHeader('Longest Paths in Cyclic Graphs (20 points)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('024', 'Small graph');
$subtotal += &runTest('025', 'Large cyclic');
$subtotal += &runTest('026', 'Extra large cyclic');
$subtotal += &runTest('027', 'Cyclic, multiple paths between from and to');
$subtotal += &runTest('028', 'Cyclic, even more paths between from and to');
$subtotal += &runTest('029', 'Cyclic, same as previous with different adjacency list ordering');
$subtotal += &runTest('030', 'No paths');
if ($subtotal > 1) {
$subtotal += &runTest('031', 'Valgrind (large cyclic)');
}
else {
skipTest('031', 'Valgrind (large cyclic)');
}
if ($subtotal > 1) {
$subtotal += &runTest('032', 'Valgrind (no paths)');
}
else {
skipTest('032', 'Valgrind (no paths)');
}
$subtotal = floor(($subtotal / 9)**2 * 20);
$checkpoint += $subtotal;
$total += floor($subtotal);
&sectionResults('Longest Paths in Cyclic Graphs (20 points)', $subtotal, 9, $checkpoint );
$testCount += 9;

