2020-2021 ● Contest 4: Shorts ● Junior Division
1. Graph Theory
   Given the set of vertices: {A, B, C, D, E} and the set of directed edges:       A.   1
   {AB, BE, AD, EA, CB, DB, BA, BC}, how many paths are there of length 2          B.   2
   from Vertex B?                                                                  C.   3
                                                                                   D.   4
                                                                                   E.   5
2. Graph Theory
  Given the following directed graph, how many cycles are there from A?            A.   7
                                                                                   B.   6
                                                                                   C.   5
                                                                                   D.   4
                                                                                   E.   3
3. Digital Electronics
   Simplify the Boolean expression represented by the following digital circuit:   A.   A
                                                                                   B.   A+B
                                                                                   C.   B
                                                                                   D.   AB
                                                                                   E.   1
4. Digital Electronics
   Identify all possible ordered triples that make the following digital circuit   A.   (*,*,0)
   TRUE.                                                                           B.   (*,0,1)
                                                                                   C.   (*,*,1)
                                                                                   D.   (0,*,1)
                                                                                   E.   (0,*,*)
5. What Does This Program Do? (Strings)
   What is the length of the longest substring of B in which the elements are in   A.   2
   ascending alphabetical order?                                                   B.   3
                                                                                   C.   4
   a = “FOURTHACSLCONTEST”                                                         D.   5
   b = “”                                                                          E.   6
   for x = 1 to len(a) − 2
        if a[x] > “O” then
             b = b + a[x+1]
        end if
        if a[x] < “O” then
             b = a[x−1] + b
        end if
   next x