Tải bản đầy đủ (.pdf) (53 trang)

Tài liệu GRE_ Computer Science Test docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (903.57 KB, 53 trang )

This book is provided FREE with test registration by the Graduate Record Examinations Board.
GRADUATE RECORD EXAMINATIONS
®
Computer
Science Test
Practice Book
This practice book contains
Ⅲ one actual full-length GRE Computer Science Test
Ⅲ test-taking strategies
Become familiar with
Ⅲ test structure and content
Ⅲ test instructions and answering procedures
Compare your practice test results with the performance of those who
took the test at a GRE administration.
Visit GRE Online at www.gre.org
Listening.
Learning.
Leading.
Copyright © 2004 by Educational Testing Service. All rights reserved.
EDUCATIONAL TESTING SERVICE, ETS, the ETS logos, GRADUATE RECORD EXAMINATIONS,
and GRE are registered trademarks of Educational Testing Service.
Note to Test Takers: Keep this practice book until you receive your score report.
The book contains important information about content specifications and scoring.
3
COMPUTER SCIENCE TEST
PRACTICE BOOK
Table of Contents
Purpose of the GRE Subject Tests 3
Development of the Subject Tests 3
Content of the Computer Science Test 4
Preparing for a Subject Test 5


Test-Taking Strategies 6
What Your Scores Mean 6
Practice GRE Computer Science Test 9
Scoring Your Subject Test 47
Evaluating Your Performance 50
Answer Sheet 51
Purpose of the GRE
Subject Tests
The GRE Subject Tests are designed to help graduate
school admission committees and fellowship sponsors
assess the qualifications of applicants in specific fields
of study. The tests also provide you with an assessment
of your own qualifications.
Scores on the tests are intended to indicate
knowledge of the subject matter emphasized in
many undergraduate programs as preparation for
graduate study. Because past achievement is usually
a good indicator of future performance, the scores
are helpful in predicting success in graduate study.
Because the tests are standardized, the test scores
permit comparison of students from different
institutions with different undergraduate programs.
For some Subject Tests, subscores are provided in
addition to the total score; these subscores indicate
the strengths and weaknesses of your preparation,
and they may help you plan future studies.
The GRE Board recommends that scores on the
Subject Tests be considered in conjunction with other
relevant information about applicants. Because numer-
ous factors influence success in graduate school,

reliance on a single measure to predict success is not
advisable. Other indicators of competence typically
include undergraduate transcripts showing courses
taken and grades earned, letters of recommendation,
the GRE Writing Assessment score, and GRE General
Test scores. For information about the appropriate use
of GRE scores, write to GRE Program, Educational
Testing Service, Mail Stop 57-L, Princeton, NJ 08541,
or visit our Web site at www.gre.org/codelst.html.
Development of the
Subject Tests
Each new edition of a Subject Test is developed by a
committee of examiners composed of professors in the
subject who are on undergraduate and graduate facul-
ties in different types of institutions and in different
regions of the United States and Canada. In selecting
members for each committee, the GRE Program seeks
the advice of the appropriate professional associations
in the subject.
The content and scope of each test are specified and
reviewed periodically by the committee of examiners.
Test questions are written by the committee and by
other faculty who are also subject-matter specialists
and by subject-matter specialists at ETS. All questions
proposed for the test are reviewed by the committee
and revised as necessary. The accepted questions are
assembled into a test in accordance with the content
specifications developed by the committee to ensure
adequate coverage of the various aspects of the field
and, at the same time, to prevent overemphasis on any

single topic. The entire test is then reviewed and
approved by the committee.
4
COMPUTER SCIENCE TEST
PRACTICE BOOK
Subject-matter and measurement specialists on the
ETS staff assist the committee, providing information
and advice about methods of test construction and
helping to prepare the questions and assemble the test.
In addition, each test question is reviewed to eliminate
language, symbols, or content considered potentially
offensive, inappropriate for major subgroups of the test-
taking population, or likely to perpetuate any negative
attitude that may be conveyed to these subgroups. The
test as a whole is also reviewed to ensure that the test
questions, where applicable, include an appropriate
balance of people in different groups and different roles.
Because of the diversity of undergraduate curricula,
it is not possible for a single test to cover all the
material you may have studied. The examiners, there-
fore, select questions that test the basic knowledge and
skills most important for successful graduate study in
the particular field. The committee keeps the test
up-to-date by regularly developing new editions and
revising existing editions. In this way, the test content
changes steadily but gradually, much like most cur-
ricula. In addition, curriculum surveys are conducted
periodically to ensure that the content of a test
reflects what is currently being taught in the under-
graduate curriculum.

After a new edition of a Subject Test is first admin-
istered, examinees’ responses to each test question are
analyzed in a variety of ways to determine whether
each question functioned as expected. These analyses
may reveal that a question is ambiguous, requires
knowledge beyond the scope of the test, or is inappro-
priate for the total group or a particular subgroup of
examinees taking the test. Answers to such questions
are not used in computing scores.
Following this analysis, the new test edition is
equated to an existing test edition. In the equating
process, statistical methods are used to assess the
difficulty of the new test. Then scores are adjusted so
that examinees who took a difficult edition of the test
are not penalized, and examinees who took an easier
edition of the test do not have an advantage. Varia-
tions in the number of questions in the different
editions of the test are also taken into account in
this process.
Scores on the Subject Tests are reported as three-
digit scaled scores with the third digit always zero.
The maximum possible range for all Subject Test total
scores is from 200 to 990. The actual range of scores for
a particular Subject Test, however, may be smaller. The
maximum possible range of Subject Test subscores is
20 to 99; however, the actual range of subscores for
any test or test edition may be smaller than 20 to 99.
Subject Test score interpretive information is provided
in Interpreting Your GRE Scores, which you will receive
with your GRE score report, and on the GRE Web site

at www.gre.org/codelst.html.
Content of the Computer
Science Subject Test
The test consists of about 70 multiple-choice
questions, some of which are grouped in sets and
based on such materials as diagrams, graphs, and
program fragments.
The approximate distribution of questions in each
edition of the test according to content categories is
indicated by the following outline. The percentages
given are approximate; actual percentages will vary
slightly from one edition of the test to another.
I. SOFTWARE SYSTEMS AND
METHODOLOGY — 40%
A. Data organization
1. Data types
2. Data structures and implementation
techniques
B. Program control and structure
1. Iteration and recursion
2. Procedures, functions, methods, and
exception handlers
3. Concurrency, communication, and
synchronization
C. Programming languages and notation
1. Constructs for data organization and
program control
2. Scope, binding, and parameter
passing
3. Expression evaluation

5
COMPUTER SCIENCE TEST
PRACTICE BOOK
D. Software engineering
1. Formal specifications and assertions
2. Verification techniques
3. Software development models, patterns,
and tools
E. Systems
1. Compilers, interpreters, and run-time systems
2. Operating systems, including resource
management and protection/security
3. Networking, Internet, and distributed systems
4. Databases
5. System analysis and development tools
II. COMPUTER ORGANIZATION AND
ARCHITECTURE — 15%
A. Digital logic design
1. Implementation of combinational and
sequential circuits
2. Optimization and analysis
B. Processors and control units
1. Instruction sets
2. Computer arithmetic and number representation
3. Register and ALU organization
4. Data paths and control sequencing
C. Memories and their hierarchies
1. Performance, implementation, and management
2. Cache, main, and secondary storage
3. Virtual memory, paging, and segmentation

D. Networking and communications
1. Interconnect structures (e.g., buses,
switches, routers)
2. I/O systems and protocols
3. Synchronization
E. High-performance architectures
1. Pipelining superscalar and out-of-order
execution processors
2. Parallel and distributed architectures
III. THEORY AND MATHEMATICAL
BACKGROUND — 40%
A. Algorithms and complexity
1. Exact and asymptotic analysis of specific
algorithms
2. Algorithmic design techniques (e.g., greedy,
dynamic programming, divide and conquer)
3. Upper and lower bounds on the complexity
of specific problems
4. Computational complexity, including NP-
completeness
B. Automata and language theory
1. Models of computation (finite automata,
Turing machines)
2. Formal languages and grammars (regular
and context-free)
3. Decidability
C. Discrete structures
1. Mathematical logic
2. Elementary combinatorics and
graph theory

3. Discrete probability, recurrence relations,
and number theory
IV. Other Topics — 5%
Example areas include numerical analysis, artificial
intelligence, computer graphics, cryptography,
security, and social issues.
Note: Students are assumed to have a mathematical
background in the areas of calculus and linear
algebra as applied to computer science.
Preparing for a Subject Test
GRE Subject Test questions are designed to measure
skills and knowledge gained over a long period of time.
Although you might increase your scores to some
extent through preparation a few weeks or months
before you take the test, last-minute cramming is
unlikely to be of further help. The following informa-
tion may be helpful.
A general review of your college courses is
probably the best preparation for the test. How-
ever, the test covers a broad range of subject
matter, and no one is expected to be familiar
with the content of every question.

6
COMPUTER SCIENCE TEST
PRACTICE BOOK
Ⅲ Use this practice book to become familiar with
the types of questions in the GRE Computer
Science Test, paying special attention to the
directions. If you thoroughly understand the

directions before you take the test, you will have
more time during the test to focus on the ques-
tions themselves.
Test-Taking Strategies
The questions in the practice test in this book illus-
trate the types of multiple-choice questions in the test.
When you take the test, you will mark your answers on
a separate machine-scorable answer sheet. Total test-
ing time is two hours and fifty minutes; there are no
separately timed sections. Following are some general
test-taking strategies you may want to consider.
Ⅲ Read the test directions carefully, and work as
rapidly as you can without being careless. For
each question, choose the best answer from the
available options.
Ⅲ All questions are of equal value; do not waste
time pondering individual questions you find
extremely difficult or unfamiliar.
Ⅲ You may want to work through the test quite
rapidly, first answering only the questions about
which you feel confident, then going back and
answering questions that require more thought,
and concluding with the most difficult questions
if there is time.
Ⅲ If you decide to change an answer, make sure you
completely erase it and fill in the oval corre-
sponding to your desired answer.
Ⅲ Questions for which you mark no answer or more
than one answer are not counted in scoring.
Ⅲ As a correction for haphazard guessing, one-

fourth of the number of questions you answer
incorrectly is subtracted from the number of
questions you answer correctly. It is improbable
that mere guessing will improve your score
significantly; it may even lower your score.
If, however, you are not certain of the correct
answer but have some knowledge of the question
and are able to eliminate one or more of the
answer choices, your chance of getting the right
answer is improved, and it may be to your advan-
tage to answer the question.
Ⅲ Record all answers on your answer sheet. Answers
recorded in your test book will not be counted.
Ⅲ Do not wait until the last five minutes of a
testing session to record answers on your
answer sheet.
What Your Scores Mean
Your raw score–that is, the number of questions you
answered correctly minus one-fourth of the number
you answered incorrectly–is converted to the scaled
score that is reported. This conversion ensures that a
scaled score reported for any edition of a Subject Test
is comparable to the same scaled score earned on any
other edition of the same test. Thus, equal scaled
scores on a particular Subject Test indicate essentially
equal levels of performance regardless of the test
edition taken. Test scores should be compared only
with other scores on the same Subject Test. (For
example, a 680 on the Computer Science Test is not
equivalent to a 680 on the Mathematics Test.)

Before taking the test, you may find it useful to
know approximately what raw scores would be required
to obtain a certain scaled score. Several factors influ-
ence the conversion of your raw score to your scaled
score, such as the difficulty of the test edition and the
number of test questions included in the computation
of your raw score. Based on recent editions of the
Computer Science Test, the table on the next page
gives the range of raw scores associated with selected
scaled scores for three different test editions. (Note
that when the number of scored questions for a given
test is greater than the number of possible scaled scores,
it is likely that two or more raw scores will convert to
the same scaled score.) The three test editions in the
table that follows were selected to reflect varying
degrees of difficulty. Examinees should note that future
test editions may be somewhat more or less difficult
than the test editions illustrated in the table.
7
COMPUTER SCIENCE TEST
PRACTICE BOOK
Range of Raw Scores* Needed to
Earn Selected Scaled Scores on
Three Computer Science Test Editions
That Differ in Difficulty
Raw Scores
Scaled Score Form A Form B Form C
Number of Questions Used to Compute Raw Score
*Raw Score = Number of correct answers minus one-fourth the
number of incorrect answers, rounded to the nearest integer.

Examples of Ways to Earn a Scaled Score
of 700 on the Edition Labeled as “Form A”
Number of
Questions Questions Questions Questions Used
Answered Answered Not to Compute
Raw Score Correctly Incorrectly Answered Raw Score
For a particular test edition, there are many ways to
earn the same raw score. For example, on the edition
listed above as “Form A,” a raw score of 31 would earn
a scaled score of 700. Below are a few of the possible
ways in which a scaled score of 700 could be earned
on that edition.
31 31 0 39 70
31 34 12 24 70
31 38 28 4 70
800 47 41-42 37-38
700 31 27 22-23
600 16-17 15 11
500 3-4 3 0
70 69 67
8
COMPUTER SCIENCE TEST
PRACTICE BOOK
Practice Test
To become familiar with how the administration will be conducted at the test
center, first remove the answer sheet (pages 51 and 52). Then go to the back
cover of the test book (page 46) and follow the instructions for completing the
identification areas of the answer sheet. When you are ready to begin the test,
note the time and begin marking your answers on the answer sheet.
Copyright © 2002, 2003 by Educational Testing Service. All rights reserved.

GRE, GRADUATE RECORD EXAMINATIONS, ETS, EDUCATIONAL TESTING SERVICE
and the ETS logos are registered trademarks of Educational Testing Service.
FORM GR0329
THIS TEST BOOK MUST NOT BE TAKEN FROM THE ROOM.
GRADUATE RECORD EXAMINATIONS
®
Do not break the seal
until you are told to do so.
The contents of this test are confidential.
Disclosure or reproduction of any portion
of it is prohibited.
COMPUTER SCIENCE TEST
29
9


Unauthorized copying or reuse of
any part of this page is illegal.

COMPUTER SCIENCE TEST
Time—170 minutes
70 Questions

Notation, Conventions, and Definitions:

In this test a reading knowledge of modern programming languages is assumed. The following notational
conventions and definitions are used.

1. All numbers are assumed to be written in decimal notation unless otherwise indicated.
2.

x denotes the greatest integer that is less than or equal to x.
3.
x denotes the least integer that is greater than or equal to x.
4.
gn O f n() ( ())= denotes “gn() has order at most fn()” and means that there exist positive constants
C and N such that
gn Cf n() ()£ for all nN> .

gn f n() ( ())= W denotes “gn()has order at least fn()” and for this test means that there exist positive
constants C and N such that
gn Cf n() ()≥ for all nN> .

gn f n() ( ())= Q denotes “ gn() has the same order as fn()” and means that there exist positive constants
C
C
12
,,and N such that
C
fn gn
C
fn
12
() () ()££ for all nN> .
5.
$ denotes “there exists.”

" denotes “for all.”

Æ denotes “implies;” … is also used to denote “implies;” and fiis also used to denote “implies.”


ÿ denotes “not”; “
A
” is also used as meaning “ÿ A.”

⁄ denotes “inclusive or”; + also denote “inclusive or,” e.g., PQ+ can denote “ PQ or .”

≈ denotes “exclusive or.”

Ÿ denotes “and”; also, juxtaposition of statements can denote “and,” e.g., PQ can denote “P and Q.”
A boolean formula is satisfiable
if it is true under some assignment of boolean values for its variables.
A boolean formula is a tautology
(or is valid) if it is true under all assignments of boolean values for its
variables.
6.
∆ denotes the empty set.
If A and B denote sets, then:
AB
» is the set of all elements that are in A or in B or in both;

AB« is the set of all elements that are in both A and B;

A
is the set of all elements not in A that are in some specified universal set.

A is the cardinality of A.
7. In a string expression, if S and T denote strings or sets of strings, then:
An empty string is denoted by
e
or by L ;

ST denotes the concatenation of S and T ;

ST+ denotes ST» or {, }ST, depending on context;

S
n
denotes SS S
n
;
factors



S
*
denotes
e ++ + +SS S
23
;

S
+
denotes SS S+++
23

10


Unauthorized copying or reuse of
any part of this page is illegal.

GO ON TO THE NEXT PAGE.

8. In a grammar:
a
b
Æ represents a production in the grammar.
a
b
fi means
b
can be derived from a by the application of exactly one production.
ab
*

means
b
can be derived from a by the application of zero or more productions.
Unless otherwise specified,
(i) symbols appearing on the left-hand side of productions are nonterminal symbols; the remaining
symbols are terminal symbols;
(ii) the leftmost symbol of the first production is the start symbol; and
(iii) the start symbol is permitted to appear on the right-hand side of productions.

9. In a logic diagram:

10. represents a D-type flip-flop, which stores the value of its D input when clocked.

11. Binary tree traversal is defined recursively as follows.
Preorder: visit the root, traverse the left subtree, traverse the right subtree
Inorder: traverse the left subtree, visit the root, traverse the right subtree

Postorder: traverse the left subtree, traverse the right subtree, visit the root

12. In a finite automaton diagram, states are represented by circles, with final (or accepting) states indicated by two
concentric circles. The start state is labeled “Start”. An arc from state s to state t labeled a indicates a
transition from s to t on input a. A label
ab indicates that this transition produces an output b. A label
aa a
k12
, , , indicates that the transition is made on any of the inputs aa a
k12
, , , .

13. For a program segment S and predicates P and Q, to say that the triple
PSQ
{}{}
is partially correct means that
if P is true before initiation of S, then Q is true upon termination of S. To say that
PSQ
{}{}
is totally correct
means that it is partially correct and S terminates for all inputs for which P is true.
Given that
PSQ
{}{}
is partially correct, a precondition is any assertion that implies P, and a postcondition is
any assertion that is implied by Q.

14. A loop invariant
for a while statement
while B do S

is an assertion that is true each time the guard B is evaluated during execution of the while statement.

11


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

Directions: Each of the questions or incomplete statements below is followed by five suggested answers or comple-
tions. Select the one that is the best of the choices offered and then mark the corresponding space on the answer
sheet.

1. Suppose that a certain software product has a mean time between failures of 10,000 hours and has a mean time
to repair of 20 hours. If the product is used by 100 customers, what is its availability?
(A) 80% (B) 90% (C) 98% (D) 99.8% (E) 100%



2. The object-oriented paradigm includes which of the following properties?
I. Encapsulation
II. Inheritance
III. Recursion
(A) I only (B) II only (C) I and II only (D) II and III only (E) I, II, and III




12



Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

3. Which of the following algorithms has running time
()
2
nQ in the worst case but
()
lognnQ on average?
(A) Bubblesort
(B) Mergesort
(C) Heapsort
(D) Quicksort
(E) Tournament sort



4. Which of the following is the name of the data structure in a compiler that is responsible for managing
information about variables and their attributes?
(A) Abstract Syntax Tree (AST)
(B) Attribute Grammar
(C) Symbol

Table

(D) Semantic Stack
(E) Parse Table





13


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.
5. Consider the following pseudocode.
x := 1;
i := 1;
while (x
£ 1000)
begin
x :=
x
2 ;
i := i + 1;
end;

What is the value of i at the end of the pseudocode?
(A) 4
(B) 5
(C) 6
(D) 7
(E) 8




6. Suppose that
()
,Pxy means “x is a parent of y” and
()
Mx means “x is male”. If
()
,Fvw equals
() ( ) ( ) ( ) ( )
()
,, ,,Mv x y Pxy Pxv y v PywŸ$ $ Ÿ Ÿ π Ÿ
what is the meaning of the expression
(
)
,?Fvw
(A) v is a brother of
.w
(B) v is a nephew of
.w
(C) v is an uncle of
.w
(D) v is a grandfather of
.w
(E) v is a male cousin of
.w




14



Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.
Questions 7-8 are based on binary tree T shown below.



7. Which of the following represents a postorder traversal of T ?
(A) P Q U W X V Y Z
(B) U Q X W P V Z Y
(C) U X W Q Z Y V P
(D) U X Z Q W Y V P
(E) X Z U W Y Q V P



8. If T is a binary search tree with the smaller elements in the left subtree, which of the following nodes contains
the fourth smallest element in T ?
(A) Q (B) V (C) W (D) X (E) Z





15


Unauthorized copying or reuse of
any part of this page is illegal.

GO ON TO THE NEXT PAGE.

9. Which of the following statements about Ethernets is typically FALSE?
(A) Ethernets use circuit switching to send messages.
(B) Ethernets use buses with multiple masters.
(C) Ethernet protocols use a collision-detection method to ensure that messages are transmitted properly.
(D) Networks connected by Ethernets are limited in length to a few hundred meters.
(E) Packets sent on Ethernets are limited in size.



10. A k-ary tree is a tree in which every node has at most k children. In a k-ary tree with n nodes and height h,
which of the following is an upper bound for the maximum number of leaves as a function of h, k, and n ?
(A)
lo
g
k
n (B) lo
g
k
h (C)
lo
g
k
n
n
(D)
h
k (E)
k

h



11. Which of the following is (are) true about virtual memory systems that use pages?
I. The virtual address space can be larger than the amount of physical memory.
II. Programs must be resident in main memory throughout their execution.
III. Pages correspond to semantic characteristics of the program.
(A) I only (B) II only (C) I and II (D) I and III (E) II and III




16


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

12. Let
()
Tn be defined by
()
17T = and
() ()
13Tn n Tn+= + for all integers 1.n ≥ Which of the following
represents the order of growth of
()
Tn as a function of n ?

(A)
()
nQ (B)
()
lo
g
nnQ (C)
()
2
nQ (D)
()
2
lo
g
nnQ (E)
()
2
n
Q



13. One approach to handling fuzzy logic data might be to design a computer using ternary (base-3) logic so that
data could be stored as “true,” “false,” and “unknown.” If each ternary logic element is called a flit, how many
flits are required to represent at least 256 different values?
(A) 4 (B) 5 (C) 6 (D) 7 (E) 8



14. Hash tables can contribute to an efficient average-case solution for all of the problems described below

EXCEPT:
(A) Counting distinct values: Given a set of n keys, determine the number of distinct key values.
(B) Dynamic dictionary: Support the operations of insert, delete, and search in a dictionary.
(C) Range search: Given values a and b, find all the records whose key value is in the range
ab,.
(D) Symbol table lookup: Given a program identifier, find its type and address.
(E) Finding intersections: Given two sets of keys, find all key values in common to both sets.





17


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

15. An invariant for the loop below is “z*
=
kn
xb and ≥k0”.

x := b; k := n; z := 1;
while (k ≠ 0)
{
if odd(k) then z := z*x;
x := x*x;
k :=

Í˙
Î˚
k/2 ;
}

When the loop terminates, which of the following must be true?
(A)
=
n
xb (B) =
n
zb (C) =
n
bx (D) =
n
bz (E) πk0



16. In the Internet Protocol (IP) suite of protocols, which of the following best describes the purpose of the Address
Resolution Protocol?
(A) To translate Web addresses to host names
(B) To determine the IP address of a given host name
(C) To determine the hardware address of a given host name
(D) To determine the hardware address of a given IP address
(E) To determine the appropriate route for a datagram



17. A certain pipelined RISC machine has 8 general-purpose registers R0, R1, . . . , R7 and supports the

following operations.

ADD Rs1, Rs2, Rd Add Rs1 to Rs2 and put the sum in Rd

MUL Rs1, Rs2, Rd Multiply Rs1 by Rs2 and put the product in Rd

An operation normally takes one cycle; however, an operation takes two cycles if it produces a result required
by the immediately following operation in an operation sequence. Consider the expression
AB ABC B
C
++,
where variables A, B, C are located in registers R0, R1, R2. If the contents of these three registers must not
be modified, what is the minimum number of clock cycles required for an operation sequence that computes the
value of AB ABC B
C
++?
(A) 5 (B) 6 (C) 7 (D) 8 (E) 9




18


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

18. Below is a precedence graph for a set of tasks to be executed on a parallel processing system S.


Efficiency is defined as the ratio between the speedup and the number of processors. (The speedup is defined as
the ratio of the time taken to perform a set of tasks on a single processor to the time taken to perform the same
set of tasks on a parallel processor.)
System S has four processors (CPU’s). If each of the tasks
T
T
18
, , takes the same time, what is the efficiency
of this precedence graph on S ?
(A) 25% (B)
33
1
3
% (C) 50% (D) 100% (E) 125%



19. Let
()
,GVE= be a finite directed acyclic graph with 0.E > Which of the following must be true?
I.
G has a vertex with no incoming edge.
II.
G has a vertex with no outgoing edge.
III.
G has an isolated vertex, that is, one with neither an incoming edge nor an outgoing edge.

(A) I only (B) II only (C) III only (D) I and II only (E) I, II, and III






19


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

Questions 20-21 are based on the following information.
Array A contains 256 elements of 4 bytes each. Its first element is stored at physical address 4,096.

Array B contains 512 elements of 4 bytes each. Its first element is stored at physical address 8,192.

Assume that only arrays A and B can be cached in an initially empty, physically addressed, physically tagged,
direct-mapped, 2K-byte cache with an 8-byte block size. The following loop is then executed.

for (i = 0; i < 256; i++)
A[i] = A[i] + B[2*i];


20. During the execution of the loop, how many bytes will be written to memory if the cache has a write-through
policy?
(A) 0 (B) 256 (C) 1,024 (D) 2,048 (E) 4,096



21. During the execution of the loop, how many bytes will be written to memory if the cache has a write-back
policy?

(A) 0 (B) 256 (C) 1,024 (D) 2,000 (E) 4,000




20


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

22. According to the IEEE standard, a 32-bit, single-precision, floating-point number N is defined to be
N = (−1)
S
× 1.F × 2
E−127

where S is the sign bit, F the fractional mantissa, and E the biased exponent.
A floating-point number is stored as
S
E
F::, where S, E, and F are stored in 1 bit, 8 bits, and 23 bits,
respectively. What is the decimal value of the floating-point number C1E00000 (hexadecimal notation) ?
(A) 26 (B) −15 (C)
-26 (D) -28 (E) −59



23. Which of the following predicate calculus formulas must be true under all interpretations?

I.
() ()
()
() ()
()
xP x xQ x x P x Q x"⁄" Æ" ⁄
II.
() ()
()
() ()
()
xPx Qx xPx xQx"⁄Æ"⁄"
III.
() ()
()
() ()
()
xP x xQ x x P x Q x$⁄$ Æ$ ⁄
(A) I only (B) III only (C) I and II (D) I and III (E) II and III




21


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.


Questions 24-25 are based on the following procedures.

procedure mystery
a : integer;
b : integer;

procedure enigma(x,y)
begin
y = y + b;
x = b + x;
b = x + b;
a = y;
end enigma;

begin
a = 2; b = 7;
enigma(a,b);
write(a); write(b);
end mystery;

The output of procedure mystery depends on the parameter-passing method used.


24. Suppose that all parameters are passed by value. Which of the following values are output when procedure
mystery is called?
a
b

(A) 2 7
(B) 2 9

(C) 9 14
(D) 14 16
(E) 30 30



25. Suppose that all parameters are passed by reference. Which of the following values are output when procedure
mystery is called?
a
b

(A) 2 7
(B) 2 9
(C) 9 14
(D) 14 16
(E) 30 30

22


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

26. Let A and B be two sets of words (strings) from
S*, for some alphabet of symbols S. Suppose that B is a
subset of A. Which of the following statements must always be true of A and B ?
I. If A is finite, then B is finite.
II. If A is regular, then B is regular.
III. If A is context-free, then B is context-free.

(A) I only (B) II only (C) III only (D) I and II only (E) I, II, and III



27. A CPU has an arithmetic unit that adds bytes and then sets its V, C, and Z flag bits as follows. The V-bit is set if
arithmetic overflow occurs (in two’s complement arithmetic). The C-bit is set if a carry-out is generated from the
most significant bit during an operation. The Z-bit is set if the result is zero. What are the values of the V, C, and
Z flag bits after the 8-bit bytes 1100 1100 and 1000 1111 are added?
V
C Z

(A) 0 0 0
(B) 1 1 0
(C) 1 1 1
(D) 0 0 1
(E) 0 1 0



23


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

28. Let k be an integer greater than 1. Which of the following represents the order of growth of the expression
1
n
i

i
k
=
Â
as a function of n ?
(A)
()
n
kQ (B)
()
lognn
kQ (C)
()
lo
g
n
knQ (D)
()
2kn
kQ (E)
()
1k
nQ
+




29. Mergesort works by splitting a list of n numbers in half, sorting each half recursively, and merging
the two halves. Which of the following data structures will allow mergesort to work in

()
lo
g
On n time?
I. A singly linked list
II. A doubly linked list
III. An array
(A) None (B) III only (C) I and II only (D) II and III only (E) I, II, and III



24


Unauthorized copying or reuse of
any part of this page is illegal.
GO ON TO THE NEXT PAGE.

30. Consider the following function.

double power(double base, unsigned int exponent)
{
if (exponent == 0)
return 1.0;
else
if (even(exponent))
return power(base*base, exponent/2);
else
return power(base*base, exponent/2)*base;
}



How many multiplications are executed as a result of the call power(5.0, 12) ? (Do not include divisions
in this total.)
(A) 12 (B) 9 (C) 8 (D) 6 (E) 5




31. Which of the following statements about datagrams sent by a node in a network using IPv4 protocol is (are)
true?
I. Datagrams at the source must be the size of the smallest maximum transmission unit (MTU) of all the
links on a path to the destination.
II. Datagrams may be fragmented during routing.
III. Datagrams are reassembled only at the destination.
(A) I only (B) II only (C) III only (D) I and III (E) II and III



25

×