Вы находитесь на странице: 1из 3

ACSL

2007 - 2008 American Computer Science League


All-Star

Short Round Questions


A. A B C
1. Boolean Algebra
B. A B C
Simplify:
C. A B C
A( B C ) B ( A B ) D. A B C
E. None of the above

2. Digital Electronics
A. 11
Let be a gate with 3 inputs that is true if only one input is true.
B. 12
Let be a gate with 3 inputs that is true if at most 2 inputs are
true. How many ordered quadruples make the following circuit C. 13
true? D. 14
E. None of the above

A. 4
3. Prefix-Infix-Postfix
B. 5
Define a # b = b - a and a % b = a + b
C. 6
Evaluate the following postfix expression:
D. 7
Note all numbers are single digits.
E. None of the above
12#3%45%#5%6#78##
4. Computer Number Systems A. 1
Find the values of A, B, and C that solve the following octal B. 2
cryptarithm. A, B, and C are unique octal numbers. A 0 C. 3
and C 0. How many solutions are there? D. 4
ABC E. None of the above
+ AB
C 2 2

5. Bit String Flicking A. 0


How many values of X (five bits long) solve the following B. 2
equation? C. 4
D. 6
(RCIRC-3 (LSHIFT-2 X)) OR (11110 AND 11001) = E. None of the above
(RCIRC-3 (NOT X)) OR (11010 OR 10001)

6. What Does This Program Do? A. 139


Given an initially empty array, A, what is the output after the B. 147
program is run? C. 177
S=0 D. 202
FOR I = 1 TO 5 E. None of the above
FOR J = 1 TO 4
IF J < I THEN A( I, J) = I ^ J
ELSE A ( I, J) = I + J
NEXT J
NEXT I
FOR I = 1 TO 5
FOR J = 1 TO 4
IF A(I,J)^0.5<>INT(A(I,J)^0.5) THEN
S = S + A(I,J)
NEXT J
NEXT I
PRINT S
END

7. Recursive Functions A. -37


Find f (11,4) where [ a ] is the greatest integer less B. -49
than or equal to a , a = absolute value function and C. -51
gcf ( a, b) =greatest common factor of a and b D. -63
f ( x / 2 2 , 2 * y - 1 ) x * y if x 9 E. None of the above

f ( x, y) f ( y x , x/y - 2) - y if 1 x 9 8. Graph Theory
How many more cycles would there be from A if the

gcf ( x, y) * y / x
directed edges AE and BD were added to the directed graph
if x 1 below?
A. 3
B. 4
C. 5
A B D. 6
E. None of the above

E
D

9. Data Structures A. 4
What is the positive difference between the internal path B. 5
lengths in the binary search trees of : C. 6
D. 7
MARRIOTTSRIDGE and MARRIOTTSVILLE? E. None of the above

A. (4 3)
10. LISP
B. (2 1)
Evaluate the following LISP expression:
C. ((4 3))
D. (2 1)
(REVERSE(CDR ( (1 2) 3 4)))
E. None of the above

11. FSA and Regular Expressions A. 7


What is the length of the longest string that can be generated B. 8
by the following regular expression, given that the string must C. 9
contain at most 3 as and at most 4 bs? D. 10
E. None of the above
ab((bc)*a*Ucb*)a*

12. Assembly Language A. 405


After the code is executed, what is the final value of S? B. 560
C. 740
A. 405
S DC 0 LOAD I D. 950
B. 560
A DC 5 ADD A E. None of the above
C. 740
B DC 40 STORE I
D. 950
I DC 1 LOAD B
E. None of the above
TOP LOAD I SUB I
MULT A BG TOP
ADD S PRINT S
STORE S END

Вам также может понравиться