0% found this document useful (0 votes)
12 views2 pages

American Computer Science League: 2019-2020 Contest #4 Junior Division

The document outlines Contest #4 for the Junior Division of the American Computer Science League for the 2019-2020 season. It includes questions on graph theory, digital electronics, and string manipulation in programming. Participants are tasked with solving problems related to adjacency matrices, cycles in directed graphs, Boolean expression simplification, and analyzing the output of a given program.

Uploaded by

nathansun5560
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

American Computer Science League: 2019-2020 Contest #4 Junior Division

The document outlines Contest #4 for the Junior Division of the American Computer Science League for the 2019-2020 season. It includes questions on graph theory, digital electronics, and string manipulation in programming. Participants are tasked with solving problems related to adjacency matrices, cycles in directed graphs, Boolean expression simplification, and analyzing the output of a given program.

Uploaded by

nathansun5560
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

American Computer Science League

2019-2020 Contest #4
JUNIOR DIVISION

1. Graph Theory 1.

How many 1’s are in the adjacency matrix for this directed graph?

2. Graph Theory 2.

​How many cycles are there from vertex A in the directed graph?

3. Digital Electronics 3.

Simplify the Boolean expression represented by the following digital


circuit.
4. Digital Electronics 4.

​How many ordered quadruples make the following digital circuit TRUE?

5. What Does This Program Do? - Strings 5.


​How many unique letters are in the output of the following program?

A = “HARTFORDISTHEINSURANCECAPITALOFTHEWORLD”
for i = 0 to len(A) - 1
if A[i] <= "H" then
B = B + A[i]
end if
if A[i] >= "P" then
C = C + A[i]
end if
next i
for i = 0 to len(B) - 1
if B[i] != “A” && B[i] != “E” then
D = D + B[i]
end if
next i
for i = 0 to len(C) - 1
if C[i] != “R” && C[i] != “T” then
E = E + C[i]
end if
next i
if len(D) <= len(E) then
for i = 0 to len(D) - 1
F = F + D[i] + E[i]
next i
else
for i = 0 to len(E) - 1
F = F + D[i] + E[i]
next i
end if
print F
​ ​end

You might also like