cluster_loras / 24 /mmlu /college_computer_science.csv
Muqeeth's picture
Upload folder using huggingface_hub
9224edf verified
0,1,2,3,4,5,correct,choiceA_probs,choiceB_probs,choiceC_probs,choiceD_probs
The access matrix approach to protection has the difficulty that,"the matrix, if stored directly, is large and can be clumsy to manage",it is not capable of expressing complex protection requirements,deciding whether a process has access to a resource is undecidable,there is no way to express who has rights to change the access matrix itself,A,True,0.21340404450893402,0.10080493241548538,0.0785069689154625,0.1661992371082306
An integer c is a common divisor of two integers x and y if and only if c is a divisor of x and c is a divisor of y. Which of the following sets of integers could possibly be the set of all common divisors of two integers?,"{-6,-2, -1, 1, 2, 6}","{-6, -2, -1, 0, 1, 2, 6}","{-6, -3, -2, -1, 1, 2, 3, 6}","{-6, -3, -2, -1, 0, 1, 2, 3, 6}",C,False,0.14214445650577545,0.14214445650577545,0.06714428216218948,0.2655607759952545
"In the NoNicks operating system, the time required by a single file-read operation has four nonoverlapping components:
disk seek time-25 msec
disk latency time-8 msec
disk transfer time- 1 msec per 1,000 bytes
operating system overhead-1 msec per 1,000 bytes + 10 msec
In version 1 of the system, the file read retrieved blocks of 1,000 bytes. In version 2, the file read (along with the underlying layout on disk) was modified to retrieve blocks of 4,000 bytes. The ratio of-the time required to read a large file under version 2 to the time required to read the same large file under version 1 is approximately",1:4,1:3.5,1:1,1.1:1,B,False,0.1890893578529358,0.14726293087005615,0.08931948989629745,0.16687077283859253
"You want to cluster 7 points into 3 clusters using the k-Means Clustering algorithm. Suppose after the first iteration, clusters C1, C2 and C3 contain the following two-dimensional points: C1 contains the 2 points: {(0,6), (6,0)} C2 contains the 3 points: {(2,2), (4,4), (6,6)} C3 contains the 2 points: {(5,5), (7,7)} What are the cluster centers computed for these 3 clusters?","C1: (3,3), C2: (4,4), C3: (6,6)","C1: (3,3), C2: (6,6), C3: (12,12)","C1: (6,6), C2: (12,12), C3: (12,12)","C1: (0,0), C2: (48,48), C3: (35,35)",A,False,0.061480212956666946,0.04225469008088112,0.5147675275802612,0.1301536113023758
Any set of Boolean operators that is sufficient to represent all Boolean expressions is said to be complete. Which of the following is NOT complete?,"{AND, NOT}","{NOT, OR}","{AND, OR}",{NAND},C,False,0.09379784017801285,0.13647505640983582,0.08277630805969238,0.2889176905155182
"Consider the collection of all undirected graphs with 10 nodes and 6 edges. Let M and m, respectively, be the maximum and minimum number of connected components in any graph in the collection. If a graph has no selfloops and there is at most one edge between any pair of nodes, which of the following is true?","M = 10, m = 10","M = 10, m = 1","M = 7, m = 4","M = 6, m = 4",C,False,0.09843316674232483,0.07665982842445374,0.05970272794365883,0.18389736115932465
"Resolution theorem proving for showing that a formula of propositional logic is not satisfiable has which of the following properties?
I. It is a sound proof system in the sense that there does not exist a proof of the unsatisfiability of a satisfiable formula of propositional logic.
II. It is a complete proof system in the sense that there is a proof of unsatisfiability for every unsa tisfiable formula of propositional logic.
III. It is a succinct proof system in the sense that whenever an unsatisfiable formula F of propositional logic has a resolution proof, F also has a proof whose length is polynomial in the length of F.",I only,III only,I and II only,I and III only,C,False,0.13259613513946533,0.08042362332344055,0.11701567471027374,0.10326597839593887
"Which of the following statements describe(s) properties of a purely segmented memory system?
I. It divides memory into units of equal size.
II. It permits implementation of virtual memory.
III. It suffers from internal fragmentation.",I only,II only,III only,I and III,B,False,0.09607803821563721,0.10887066274881363,0.08478856086730957,0.26116713881492615
Which of the following statements about floating-point arithmetic is NOT true?,It is inherently nonassociative because some numbers have no exact representation.,It is inherently nonassociative because there have to be upper and lower bounds on the size of numbers.,Associativity can be achieved with appropriate roundoff conventions.,Some rational numbers have no exact representation.,C,False,0.07653287053108215,0.12618136405944824,0.14298222959041595,0.30269336700439453
"Suppose sharing of tiles in a multilevel directory structure is achieved with directory entries that are links pointing to a node containing information about a shared file. Information in this node includes (1) the owner of the file, (2) a count of the number of links to the tile, and (3) the disk block numbers of the file. What is a primary drawback to this approach to sharing?","If the owner modifies the file, another user who does not share will see the changes.","If the owner renames the file, other users will not be able to access it.","If the owner is allowed to delete a file, dangling links may result.","If any user who shares the file appends to it, others who share it will not be able to access the new disk blocks.",C,True,0.1042204275727272,0.1042204275727272,0.15163981914520264,0.15163981914520264
"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 O(n log n) time?
I. A singly linked list
II. A doubly linked list
III. An array",,III only,I and II only,"I, II, and III",D,True,0.078844353556633,0.11471785604953766,0.061404041945934296,0.2428576946258545
"If p(x) is the minimal-degree interpolating polynomial for the real-valued function f(x) at the n + 1 distinct real numbers x0, .... xn what is the maximum possible degree of p(x)?",n,n + 1,n + 2,2n,A,False,0.17182022333145142,0.19469782710075378,0.07162533700466156,0.15163081884384155
"An internal hash table has 5 buckets, numbered 0, 1, 2, 3, 4. Keys are integers, and the hash function h(i) = i mod 5 is used, with linear resolution of collisions (i.e., if bucket h(i) is filled, the buckets h(i) + 1, h(i) + 2, ... are tried successively with all bucket numbers computed modulo 5). If elements with keys 13, 8, 24, 10, and 3 are inserted, m that order, into an initially blank hash table, then the content of the bucket numbered 2 is",3,8,10,13,A,False,0.08358878642320633,0.13781461119651794,0.12162096053361893,0.15616440773010254
TCP protocol is responsible (among other things) for,Routing packets through the network,Reliable delivery of packets between directly connected machines,Reliable delivery of large (multi-packet) messages between machines that are not necessarily directly connected,Dealing with differences among operating system architectures,C,False,0.16137118637561798,0.2660561203956604,0.16137118637561798,0.08637577295303345
"Let A and B be two sets of words (strings) from Σ*, for some alphabet of symbols Σ. 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.",I only,II only,III only,I and II only,A,False,0.1059679463505745,0.07283063232898712,0.06427280604839325,0.22433413565158844
"For all strings x, the function x^M is defined recursively as follows.
e^M= e, and
if w is a string and a is a string with length 1, then
(aw)^M = aw^Ma.
Let a be a string with length 1, and let x and y be arbitrary strings. Which of the following is true?",a^M = a,(ax)^M = (xa)^M,(xy)^M = y^Mx^M,None of the above,D,True,0.058124832808971405,0.1085914894938469,0.06586406379938126,0.33448535203933716
Which of the following is NOT a reasonable justification for choosing to busy-wait on an asynchronous event?,The wait is expected to be short.,A busy-wait loop is easier to code than an interrupt handler.,There is no other work for the processor to do.,The program executes on a time-sharing system.,D,True,0.10152802616357803,0.11504631489515305,0.1303645521402359,0.27598175406455994
The language {ww | w in (0 + 1)*} is,not accepted by any Turing machine,"accepted by some Turing machine, but by no pushdown automaton","accepted by some pushdown automaton, but not context-free","context-free, but not regular",B,False,0.14498071372509003,0.08793524652719498,0.11291109770536423,0.21094569563865662
Which of the following statements about Ethernets is typically FALSE?,Ethernets use circuit switching to send messages.,Ethernets use buses with multiple masters.,Ethernet protocols use a collision-detection method to ensure that messages are transmitted properly.,Networks connected by Ethernets are limited in length to a few hundred meters.,A,False,0.08908151090145111,0.1664261668920517,0.1664261668920517,0.2743903696537018
"Let P be a procedure that for some inputs calls itself (i.e., is recursive). If P is guaranteed to terminate, which of the following statements must be true?
I. P has a local variable.
II. P has an execution path where it does not call itself.
III. P either refers to a global variable or has at least one parameter.",I only,II only,I and II only,II and III only,D,False,0.0831158459186554,0.12093284726142883,0.13703486323356628,0.12093284726142883
Which of the following comes closest to being a perfectly secure encryption scheme?,"The Caesar Cipher, a substitution cipher","DES (Data Encryption Standard), a symmetric-key algorithm","Enigma, a transposition cipher",One-time pad,D,True,0.06586847454309464,0.13944359123706818,0.07463876157999039,0.3790469169616699
"Of the following problems concerning a given undirected graph G, which is currently known to be solvable in polynomial time?",Finding a longest simple cycle in G,Finding a shortest cycle in G,Finding ALL spanning trees of G,Finding a largest clique in G,B,False,0.21799880266189575,0.10297534614801407,0.09087541699409485,0.192383274435997
The IP protocol is primarily concerned with,Routing packets through the network,Reliable delivery of packets between directly connected machines,Reliable delivery of large (multi-packet) messages between machines that are not necessarily directly connected,Dealing with differences among operating system architectures,A,True,0.27702823281288147,0.1680261194705963,0.08993789553642273,0.054550088942050934
"Of the following, which best approximates the ratio of the number of nonterminal nodes to the total number of nodes in a complete K-ary tree of depth N?",1/K,K-1/K,log_10 (1/N),N-1/m,A,True,0.18130892515182495,0.16000457108020782,0.09704767912626266,0.18130892515182495
"Consider a computer system in which processes can request and release one or more resources. Once a process has been granted a resource, the process has exclusive use of that resource until it is released. If a process requests a resource that is already in use, the process enters a queue for that resource, waiting until the resource is available. Which of the following will NOT deal effectively with the problem of deadlock?",Giving priorities to processes and ordering the wait queues by priority,"Having a process request all its required resources when it first begins, and restarting if it cannot obtain them all",Numbering the resources and requiring that processes request resources in order of increasing number,Having processes time out and restart after a random interval of waiting,A,False,0.12265367060899734,0.178460031747818,0.1082414910197258,0.20222170650959015
"""Magic memory""' has two operations: Read and Clear. Both are indivisible and mutually exclusive. Clear sets the magic memory to zero. Read returns a value that represents the number of Read operations since the last Clear operation. Which of the following is (are) true of ""Magic memory""?
I. It can provide the functionality of an atomic Test-and-Set.
II. It can be used to coordinate processes running on a shared-memory multiprocessor.
III. It is only useful on a multiprocessor.",I only,II only,III only,I and II,D,True,0.07756952196359634,0.07756952196359634,0.07756952196359634,0.18607960641384125
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?,Abstract Syntax Tree (AST),Attribute Grammar,Symbol Table,Semantic Stack,C,False,0.2358245700597763,0.09830629825592041,0.1836603581905365,0.036164868623018265
Which of the following algorithms has running time Θ(n^2) in the worst case but Θ(n log n) on average?,Bubblesort,Mergesort,Heapsort,Quicksort,D,False,0.1261477768421173,0.3026127815246582,0.08670001477003098,0.16197696328163147
"Languages with a structure that implements abstract data types (e.g., a C++ class) can prevent access to components of this structure by all operations except those that are part of this structure. However, definitions of such a structure often contain declarations of components of the structure (e.g., the header file for a C++ class may contain declarations of its private components). For such a language, an object's name could be bound at run time to stack storage for its component values (direct representation) or to a stack pointer referencing heap storage for its component values (indirect representation). Which of the following statements about comparisons between direct and indirect representations is (are) true?
I. Indirect representation noticeably increases compilation time.
II. Direct representation decreases the time needed to access components of a variable.
III. When the storage size of some private component of a variable changes, indirect representation minimizes the number of recompilations of source modules that must be performed.",I only,III only,I and II only,II and III only,D,False,0.08349466323852539,0.13765941560268402,0.17675819993019104,0.12148401141166687
Which of the following is NOT a property of bitmap graphics?,Fast hardware exists to move blocks of pixels efficiently.,Realistic lighting and shading can be done.,All line segments can be displayed as straight.,Polygons can be filled with solid colors and textures.,C,False,0.08931860327720642,0.12995779514312744,0.11468736082315445,0.3117525279521942
Which of the following is true of interrupts?,"They are generated when memory cycles are ""stolen"".",They are used in place of data channels.,They can indicate completion of an I/O operation.,They cannot be generated by arithmetic operations.,C,False,0.133706197142601,0.133706197142601,0.17168214917182922,0.19454136490821838
"In a height-balanced binary search tree, the heights of the left and right descendents of any node differ by at most 1. Which of the following are true of such a tree?
I. Worst-case search time is logarithmic in the number of nodes.
II. Average-case search time is logarithmic in the number of nodes.
III. Best-case search time is proportional to the height of the tree.
IV. The height of the tree is logarithmic in the number of nodes.",I and III only,II and III only,II and IV only,"I, II, and IV",D,True,0.09631985425949097,0.07501398026943207,0.06619960069656372,0.336189329624176
"Bob writes down a number between 1 and 1,000. Mary must identify that number by asking ""yes/no"" questions of Bob. Mary knows that Bob always tells the truth. If Mary uses an optimal strategy, then she will determine the answer at the end of exactly how many questions in the worst case?","1,000",999,500,10,D,True,0.11012744903564453,0.1247907355427742,0.08576733618974686,0.18156945705413818
"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.",I only,II only,I and II,I and III,A,False,0.10509834438562393,0.10509834438562393,0.2521178126335144,0.10509834438562393
Which of the following is usually NOT represented in a subroutine's activation record frame for a stack-based programming language?,Values of local variables,A heap area,The return address,Stack pointer for the calling activation record,B,False,0.23699702322483063,0.12685537338256836,0.09879505634307861,0.12685537338256836
Which of the following statements about a remote procedure call is true?,It is used to call procedures with addresses that are farther than 2^16 bytes away.,It cannot return a value.,It cannot pass parameters by reference.,It cannot call procedures implemented in a different language.,C,False,0.1357538402080536,0.15382924675941467,0.1357538402080536,0.25362154841423035
"Of the following sorting algorithms, which has a running time that is LEAST dependent on the initial ordering of the input?",Insertion sort,Quicksort,Merge sort,Selection sort,C,False,0.09423186630010605,0.13710655272006989,0.155362069606781,0.17604829370975494
"A particular parallel program computation requires 100 seconds when executed on a single processor. If 40 percent of this computation is ""inherently sequential"" (i.e., will not benefit from additional processors), then the theoretically best possible elapsed times for this program running with 2 and 4 processors, respectively, are",20 and 10 seconds,30 and 15 seconds,50 and 25 seconds,70 and 55 seconds,D,False,0.20883575081825256,0.09864702820777893,0.09864702820777893,0.11178172379732132
"Consider the representation of six-bit numbers by two's complement, one's complement, or by sign and magnitude. In which representation is there overflow from the addition of the integers 011000 and 011000?",Two's complement only,Sign and magnitude and one's complement only,Two's complement and one's complement only,All three representations,D,True,0.04251352325081825,0.11556373536586761,0.06185680627822876,0.190532386302948
"Of the following, which best characterizes computers that use memory-mapped I/O?",The computer provides special instructions for manipulating I/O ports.,I/O ports are placed at addresses on the bus and are accessed just like other memory locations.,"To perform an I/O operation, it is sufficient to place the data in an address register and call the channel to perform the operation.",Ports are referenced only by memory-mapped instructions of the computer and are located at hardwired memory locations.,B,True,0.08308007568120956,0.3285880982875824,0.08308007568120956,0.13697588443756104
Many cryptographic protocols base their security on assumptions about the computational difficulty of integer factorization. Integer factorization serves this purpose because we believe that,"integer multiplication is a function whose inverse, factorization, remains difficult for a large class of inputs",P = NP,"even if P = NP, integer factorization is still likely not to be polynomial-time computable",testing primality is computationally intractable,A,False,0.1563979685306549,0.12180286645889282,0.08371379971504211,0.33109450340270996
Which of the following sets of bit strings CANNOT be described with a regular expression?,All bit strings whose number of zeros is a multiple of five,All bit strings starting with a zero and ending with a one,All bit strings with an even number of zeros,All bit strings with more ones than zeros,D,True,0.14612820744514465,0.10043234378099442,0.08863124251365662,0.2409246861934662
"Which of the following conditions can be expressed by a Boolean formula in the Boolean variables p_1, p_2, p_3, p_4 and the connectives ∧,∨ (without ¬)?
I. At least three of p_1, p_2, p_3, p_4 are true.
II. Exactly three of p_1, p_2, p_3, p_4 are true.
III. An even number of p_1, p_2, p_3, p_4 are true.",I only,II only,III only,I and III,A,False,0.0968146026134491,0.085438571870327,0.06653963029384613,0.2631693482398987
"Two alternatives for interconnecting a set of processors with bidirectional links are (1) the fully interconnected network, in which each processor is directly connected to every other processor, and (2) the ring network, in which each processor is connected to two other processors. The worst-case path length for a network is the maximum, over all pairs of nodes in the network, of the minimum length paths (measured in number of links) between the nodes. For each type of interconnection of n processors, a figure of merit can be formed as the product of the number of links required for the network times the worst-case path length connecting any two processors. The ratio of this figure of merit for the fully interconnected network compared to that of the ring network, for even n > 2, is",1/(n^2),1/(n(n-1)),1/n,(n-1)/n,D,True,0.10354869067668915,0.09138140082359314,0.09138140082359314,0.17072291672229767
"For a connected, undirected graph G = (V, E), which of the following must be true?
I. Σ_{v∈V} degree(v) is even.
II. |E| ≥ |V| − 1
III. G has at least one vertex with degree 1.",I only,II only,III only,I and II,D,True,0.09633888304233551,0.08501876890659332,0.09633888304233551,0.2967446446418762
"In multiprogrammed systems it is advantageous if some programs such as editors and compilers can be shared by several users. Which of the following must be true of multiprogrammed systems in order that a single copy of a program can be shared by several users?
I. The program is a macro.
II. The program is recursive.
III. The program is reentrant.",I only,II only,III only,II and III only,C,False,0.06966007500886917,0.11485005170106888,0.07893521338701248,0.2145681232213974
Which of the following decimal numbers has an exact representation in binary notation?,0.1,0.2,0.3,0.5,D,True,0.1504935473203659,0.1328100860118866,0.10343260318040848,0.1705315262079239
"Function signatures describe the types of the arguments to a function as well as the return value of the function. For instance, the addition function on reals has a signature of
add : real x real -> real
since it takes two real numbers and returns a real number. But, for a language that allows functions as return values, addition could be considered to have the signature
add : real -> (real -> real)
which means that add takes a single real (the first operand) and returns a new function that itself takes a single real (the second operand) and returns a real (the result). This process of reducing a function with multiple arguments to a function with fewer arguments is called currying. Which of the following is correct?",Currying can be applied to any function to the point where it has exactly one input argument.,Currying cannot be applied to functions of more than two arguments.,Currying cannot be applied to functions that return functions as arguments.,Currying cannot be applied w functions that haw arguments that are functions.,A,False,0.12700575590133667,0.16307862102985382,0.11208218336105347,0.18479228019714355
"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];
During the execution of the loop, how many bytes will be written to memory if the cache has a write-back policy?",0,256,1024,2000,A,False,0.12519299983978271,0.18215471506118774,0.11048241704702377,0.08604378998279572
"In which of the following representations of numbers by 8-bit words is the addition of the integers 109 and -42 within range?
I. One's complement
II. Two's complement
III. Sign and magnitude",I only,II only,I and II only,"I, II, and III",D,True,0.09559822827577591,0.051170043647289276,0.0657036304473877,0.12275055050849915
If a malicious process is granted temporary administrator-level access to a system,the threat is over as soon as the process is killed,the threat is over after the operating system is rebooted,the thread is over after rebooting the machine and replacing files that show a virus infection,the threat is often permanent until the entire disk is wiped clean,D,True,0.1405460685491562,0.12403147667646408,0.1405460685491562,0.26257461309432983
"Which of the following statements about horizontal versus vertical microarchitecture is (are) true?
I. Programs for horizontal architectures require more time steps than those for vertical architectures.
II. Horizontal microinstructions are unencoded.
III. Horizontal microinstructions usually have a single opcode and multiple operand specifiers.",I only,II only,III only,II and III only,B,False,0.0926036536693573,0.1189054474234581,0.1189054474234581,0.22214461863040924
"A ""strictly binary tree"" is a binary tree in which every node that is not a leaf has two children. Suppose that for a class of strictly binary trees there exists c > 0 such that, for any tree in the class, the ratio of the lengths of any two root-to-leaf paths is bounded above by c. Which of the following best characterizes the height h of any tree in this class, where N is the number of nodes in the tree and N > 1 ?",h <= log2(N),h = 1/c * log2(N),h < c log2(N),h > c log2(N),C,False,0.11650558561086655,0.0800730362534523,0.05503334105014801,0.10281582176685333
Which of the following sorting algorithms has average-case and worst-case running times of O(n log n)?,Bubble sort,Insertion sort,Merge sort,Quicksort,C,False,0.04528515413403511,0.22997699677944183,0.22997699677944183,0.2029539942741394
"Consider the following equations concerning a stack module that has the operations Push, Pop, Top, and IsEmpty. Which of the equations does NOT represent the conventional semantics of a stack?","IsEmpty(Push(Stack,Elem)) = true","Pop(Push(Stack,Elem)) = Stack","Top(Push(Stack,Elem)) = Elem","IsEmpty(Push(Push(Stack,Elem1),Elem2)) = false",A,False,0.10218328982591629,0.09017642587423325,0.09017642587423325,0.2777629494667053
"Assume that any assignment statement can be executed in unit time. If as many identical processors as needed are used, what is the minimum number of time units needed to execute the assignments
A := B + C
B := A - B
C := A * E
D := A/F
E := B - C
F := A + B
with the same result as if the assignments were executed in the order shown?",1,2,3,4,C,False,0.09209039807319641,0.10435209423303604,0.07172007858753204,0.10435209423303604
"Two expressions E and F are said to be unifiable if there are substitutions for the variables of E and F that make the expressions lexically identical. In the following three expressions, only w, x, y, and z are variables.
I. f(w,w)
II. f(x,1)
III. f(y,g(z))
Which pairs of these expressions is (are) pairs of unifiable expressions?","(I, II) only","(I, III) only","(II, III) only","(I, II) and (I, III) only",D,True,0.0459117665886879,0.03155466169118881,0.027846893295645714,0.07569570094347
Which of the following instruction-set features is NOT generally considered an obstacle to aggressive pipelining of an integer unit?,Condition codes set by every instruction,Variable-length encoding of instructions,Instructions requiring widely varying numbers of cycles to execute,Several different classes (sets) of registers,D,False,0.12370307743549347,0.14017394185066223,0.10916757583618164,0.14017394185066223
"Let k >= 2. Let L be the set of strings in {0, 1}^* such that x \in L if and only if the number of 0's in x is divisible by k and the number of 1's in x is odd. The minimum number of states in a deterministic finite automaton (DFA) that recognizes L is",k + 2,2k,k log k,k^2,B,False,0.10693112015724182,0.15558385848999023,0.1211688295006752,0.1997736245393753
"Let G = (V, E) be a finite directed acyclic graph with |E| > 0. 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.",I only,II only,III only,I and II only,D,True,0.07972981780767441,0.07036131620407104,0.09034571796655655,0.2782844007015228
"Let T be a depth-first search tree of a connected undirected graph G. For each vertex v of T, let pre(v) be the number of nodes visited up to and including v during a preorder traversal of T, and post(v) be the number of nodes visited up to and including v during a postorder traversal of T. The lowest common ancestor of vertices u and v in T is a vertex w of T such that w is an ancestor of both u and v, and no child of w is an ancestor of both u and v. Let (u, v) be an edge in G that is not in T, such that pre(u) < pre(v). Which of the following statements about u and v must be true?
I. post(u) < post(v)
II. u is an ancestor of v in T.
III. If w is the lowest common ancestor of u and v in T, then w = u.",I only,II only,III only,II and III,D,True,0.05676048621535301,0.13616132736206055,0.09358222037553787,0.22449207305908203
"In systems with support for automatic memory management, a garbage collector typically has the responsibility for reclaiming allocated memory objects whose contents cannot affect any future legal computation. Such objects are identified by determining that they cannot be reached from a root set. Which of the following is NOT part of the root set in a typical garbage collector?",Actual parameters of the active procedures,Dynamically allocated objects on the heap,Global variables of the program,Local variables on the call stack,B,True,0.11978649348020554,0.1742883175611496,0.1057112067937851,0.11978649348020554
"In the Internet Protocol (IP) suite of protocols, which of the following best describes the purpose of the Address Resolution Protocol?",To translate Web addresses to host names,To determine the IP address of a given host name,To determine the hardware address of a given host name,To determine the hardware address of a given IP address,D,False,0.045916035771369934,0.18160144984722137,0.031557597219944,0.09720425307750702
Which of the following language features requires that stack-based storage allocation be used rather than static allocation?,Recursive procedures,Arbitrary goto's,Two-dimensional arrays,Integer-valued functions,A,True,0.15689630806446075,0.12219096720218658,0.13846050202846527,0.13846050202846527
"Which of the following is not a sentence that is generated by the grammar A -> BC, B -> x|Bx, C -> B|D, D -> y|Ey, E -> z?",xyz,xy,xxzy,xxxxy,A,False,0.11985326558351517,0.07269468903541565,0.10577014088630676,0.19760462641716003
Let T (n) be defined by T(1) = 7 and T(n + 1) = 3n + T(n) for all integers n ≥ 1. Which of the following represents the order of growth of T(n) as a function of n?,Θ(n)(n log n)(n^2)(n^2 log n),C,False,0.04816710576415062,0.07008272409439087,0.03751257807016373,0.054580479860305786
"Which of the following problems is (are) decidable?
I. Given a (finite) string w, is w a prefix of the decimal expansion of π?
II. Given a program and an input, is the program’s output the decimal expansion of π?
III. Given a program that takes as input a prefix of the decimal expansion of π, is the program’s output always the same for every prefix?",I only,II only,III only,I and II only,A,False,0.10112226009368896,0.07875408977270126,0.07875408977270126,0.1889212429523468
"Which of the following statements about circuits is (are) true?
I. Combinational circuits may have feedback; sequential circuits do not.
II. Combinational circuits have a ""memoryless"" property; sequential circuits do not.
III. Both sequential and combinational circuits must be controlled by an external clock.",I only,II only,I and II only,II and III only,B,False,0.12811732292175293,0.12811732292175293,0.16450589895248413,0.11306314915418625
"Two single-user workstations are attached to the same local area network. On one of these workstations, file pages are accessed over the network from a file server; the average access time per page is 0.1 second. On the other of these workstations, file pages are accessed from a local disk; the average access time per page is 0.05 second. A particular compilation requires 30 seconds of computation and 200 file page accesses. What is the ratio of the total time required by this compilation if run on the diskless (file server) workstation to the total time required if run on the workstation with the local disk, if it is assumed that computation is not overlapped with file access?",1/1,5/4,5/3,10/5,B,True,0.13362085819244385,0.17157256603240967,0.09183618426322937,0.10406401753425598
"Assume that a debugger places a breakpoint at a load instruction at virtual address 0x77E81234 (hexadecimal notation) in a debugged process P. If the text segment of P begins at 0x77E80000 in P’s virtual address space and if the debugger has mapped this same text segment at 0x01000000 in its virtual address space, which of the following is the virtual address used by the debugger in its WRITE operation, along with a description of how the debugger has mapped the virtual memory page containing this address?",0x01001234; page mapped with READ/WRITE access,0x01001234; page mapped with COPY-ON-WRITE access,0x76E81234; page mapped with READ/WRITE access,0x76E81234; page mapped with COPY-ON-WRITE access,A,True,0.1503533273935318,0.11709529161453247,0.06267658621072769,0.08047833293676376
"Which of the following considerations applies (apply) to choosing the page size in a paging system?
I. An advantage of larger pages is that they lead to smaller page tables.
II. An advantage of smaller pages is that they lead to less waste due to internal fragmentation.
III. Normally, the dominant factor in disk access time is not dependent on page length, so longer pages can be used advantageously.",I only,II only,I and III only,"I, II, and III",D,True,0.07969770580530167,0.10233388841152191,0.14889492094516754,0.2781723141670227
"Two processors, M-5 and M-7, implement the same instruction set. Processor M-5 uses a 5-stage pipeline and a clock cycle of 10 nanoseconds. Processor M-7 uses a 7-stage pipeline and a clock cycle of 7.5 nanoseconds. Which of the following is (are) true?
I. M-7’s pipeline has better maximum throughput than M-5’s pipeline.
II. The latency of a single instruction is shorter on M-7’s pipeline than on M-5’s pipeline.
III. Programs executing on M-7 will always run faster than programs executing on M-5.",I only,II only,I and III,II and III,A,False,0.11955533176660538,0.09310977905988693,0.22335875034332275,0.09310977905988693
"Which of the following pairs of 8-bit, two's-complement numbers will result in overflow when the members of the pairs are added?","11111111, 00000001","00000001, 10000000","11111111, 10000001","10000001, 10101010",D,False,0.21895475685596466,0.10342691093683243,0.07108420133590698,0.11719804257154465
"Two computers communicate with each other by sending data packets across a local area network. The size of these packets is 1,000 bytes. The network has the capacity to carry 1,000 packets per second. The CPU time required to execute the network protocol to send one packet is 10 milliseconds. The maximum rate at which one computer can send data to another is approximately","10,000 bytes/second","25,000 bytes/ second","100,000 bytes/ second","500,000 bytes/ second",C,False,0.09320393204689026,0.15366730093955994,0.11967620998620987,0.15366730093955994
"Consider the following grammar.
S → ( S )
S → x
Which of the following statements is (are) true?
I. The grammar is ambiguous.
II. The grammar is suitable for top-down parsing.
III. The grammar is suitable for bottom-up parsing.",I only,II only,III only,II and III only,D,True,0.10366082191467285,0.1331031322479248,0.10366082191467285,0.2194499522447586
Hash tables can contribute to an efficient average-case solution for all of the problems described below EXCEPT:,"Counting distinct values: Given a set of n keys, determine the number of distinct key values.","Dynamic dictionary: Support the operations of insert, delete, and search in a dictionary.","Range search: Given values a and b, find all the records whose key value is in the range a, b.","Symbol table lookup: Given a program identifier, find its type and address.",C,False,0.18484745919704437,0.2689514756202698,0.127043679356575,0.16312731802463531
"Let A be a finite set with m elements, and let B be a finite set with n elements. The number of distinct functions mapping A into B is",n^m,n!/(n - m)!,n!,n!/(m!(n - m)!),A,False,0.11866290122270584,0.0924147516489029,0.1047196313738823,0.3225591778755188
"To compute the matrix product M_1M_2, where M_1 has p rows and q columns and where M_2 has q rows and r columns, takes time proportional to pqr, and the result is a matrix of p rows and r columns. Consider the product of three matrices N_1N_2N_3 that have, respectively, w rows and x columns, x rows and y columns, and y rows and z columns. Under what condition will it take less time to compute the product as (N_1N_2)N_3 (i.e., multiply the first two matrices first) than to compute it as N_1(N_2 N_3)?","There is no such condition; i.e., they will always take the same time.",1/x + 1/z < 1/w + 1/y,x > y,1/w + 1/x < 1/y + 1/z,B,True,0.08159932494163513,0.19574660062789917,0.0924641489982605,0.17274576425552368
"The hit ratio of a cache memory is the percentage of accesses (reads and writes) for which data are found in the cache. Write-through is a policy whereby every write operation updates main memory. Write-back is a policy whereby a write operation to a line found in the cache does not affect main memory until the line is evicted from the cache. Write-allocation is a policy whereby a cache line is allocated and loaded on a write-miss. If it is assumed that write-allocation is always used, which of the following is true?",Write-back usually results in a better hit ratio than write-through.,Write-through usually results in a better hit ratio than write-back.,The percentage of write operations resulting in a main memory operation will never be larger for write-back than for write-through.,The percentage of write operations resulting in a main memory operation will never be larger for writethrough than for write-back.,C,False,0.1519712209701538,0.19513490796089172,0.1341141313314438,0.19513490796089172
"A particular disk unit uses a bit string to record the occupancy or vacancy of its tracks, with O denoting vacant and 1 denoting occupied. A 32-bit segment of this string has the hexadecimal value D4FE2003. The percentage of occupied tracks for the corresponding part of the disk, to the nearest percent, is",12%,25%,38%,44%,D,False,0.14237794280052185,0.16133534908294678,0.08635659515857697,0.14237794280052185
"An Euler circuit of an undirected graph is a circuit in which each edge of the graph appears exactly once. Which of the following undirected graphs must have an Euler circuit?
I. A complete graph with 12 vertices
II. A complete graph with 13 vertices
III. A tree with 13 vertices",I only,II only,III only,I and II,B,False,0.1305440366268158,0.08972151577472687,0.07917896658182144,0.21523071825504303
Which of the following characteristics of a programming language is best specified using a context-free grammar?,Identifier length,Maximum level of nesting,Operator precedence,Type compatibility,C,False,0.20519472658634186,0.1598058044910431,0.12445688992738724,0.0855378806591034
"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.",I only,II only,III only,II and III,D,True,0.079720139503479,0.1314362734556198,0.10236267745494843,0.21670177578926086
A starvation-free job-scheduling policy guarantees that no job waits indefinitely for service. Which of the following job-scheduling policies is starvation-free?,Round-robin,Priority queuing,Shortest job first,Youngest job first,A,True,0.16390042006969452,0.14464160799980164,0.14464160799980164,0.12764577567577362
"Of the following, which gives the best upper bound for the value of f(N) where f is a solution to the recurrence f(2N + 1) = f(2N) = f(N) + log N for N >= 1, with f(1) = 0?",O(log N),O(N log N),O(log N) + 0(1),O((log N)^2),D,False,0.19122394919395447,0.09032780677080154,0.03322973847389221,0.16875454783439636
"Company X shipped 5 computer chips, 1 of which was defective, and Company Y shipped 4 computer chips, 2 of which were defective. One computer chip is to be chosen uniformly at random from the 9 chips shipped by the companies. If the chosen chip is found to be defective, what is the probability that the chip came from Company Y?",2 / 9,4 / 9,1 / 2,2 / 3,D,False,0.10642540454864502,0.17546583712100983,0.10642540454864502,0.09392009675502777
"Which of the following problems can be solved by a standard greedy algorithm?
I. Finding a minimum spanning tree in an undirected graph with positive-integer edge weights
II. Finding a maximum clique in an undirected graph
III. Finding a maximum flow from a source node to a sink node in a directed graph with positive-integer edge capacities",I only,II only,III only,I and II only,A,False,0.12555699050426483,0.0977838858962059,0.08629398047924042,0.18268434703350067
"A program that checks spelling works in the following way. A hash table has been defined in which each entry is a Boolean variable initialized to false. A hash function has been applied to each word in the dictionary, and the appropriate entry in the hash table has been set to true. To check the spelling in a document, the hash function is applied to every word in the document, and the appropriate entry in the hash table is examined. Which of the following is (are) correct?
I. true means the word was in the dictionary.
II. false means the word was not in the dictionary.
III. Hash table size should increase with document size.",I only,II only,I and II only,II and III only,B,False,0.14394807815551758,0.14394807815551758,0.12703372538089752,0.08730892091989517
"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?",4,5,6,7,C,True,0.13076558709144592,0.11540023982524872,0.14817683398723602,0.13076558709144592
"Local caching of files is common in distributed file systems, but it has the disadvantage that",Temporary inconsistencies among views of a file by different machines can result,The file system is likely to be corrupted when a computer crashes,A much higher amount of network traffic results,Caching makes file migration impossible,A,True,0.1877981424331665,0.11390533298254013,0.11390533298254013,0.1877981424331665
"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];
During the execution of the loop, how many bytes will be written to memory if the cache has a write-through policy?",0,256,1024,2048,C,False,0.12482524663209915,0.160278782248497,0.0972139984369278,0.07571033388376236
"At time 0, five jobs are available for execution on a single processor, with service times of 25, 15, 5, 3, and 2 time units. Which of the following is the minimum value of the average completion time of these jobs?",50,208/5,92/5,10,C,False,0.09779966622591019,0.11082154512405396,0.11082154512405396,0.2346092015504837
"Let G = (V, E) be a connected, undirected graph, and let a and b be two distinct vertices in V. Let P_1 be the problem of finding a shortest simple path between a and b, and let P_2 be the problem of finding a longest simple path between a and b. Which of the following statements about P_1 and P_2 is true?",Both P_1 and P_2 can be solved in polynomial time.,P_1 can be solved in polynomial time but P_2 is not known to be solvable in polynomial time.,P_1 is not known to be solvable in polynomial time but P_2 can be solved in polynomial time.,It is not known whether either P_1 or P_2 can be solved in polynomial time.,B,False,0.10661524534225464,0.1551242470741272,0.08303202688694,0.2898102402687073
A major advantage of direct mapping of a cache is its simplicity. The main disadvantage of this organization is that,it does not allow simultaneous access to the intended data and its tag,it is more expensive than other types of cache organizations,the cache hit ratio is degraded if two or more blocks used alternately map onto the same block frame in the cache,its access time is greater than that of other cache organizations,C,False,0.18810831010341644,0.146498903632164,0.10068712383508682,0.2131546437740326
"Let M be a single-tape, deterministic Turing machine with tape alphabet {blank,0,1}, and let C denote the (possibly infinite) computation of M starting with a blank tape. The input to each problem below is M, together with a positive integer n. Which of the following problems is (are) decidable?
I. The computation C lasts for at least n steps.
II. The computation C lasts for at least n steps, and M prints a 1 at some point after the nth step.
III. M scans at least n distinct tape squares during the computation C.",,III only,I and II only,I and III only,D,False,0.12166594713926315,0.12166594713926315,0.1378655880689621,0.10736982524394989
"A 3-way, set-associative cache is",one in which each main memory word can be stored at any of 3 cache locations,effective only if 3 or fewer processes are running alternately on the processor,possible only with write-back,faster to access than a direct-mapped cache,A,True,0.26089709997177124,0.12323907017707825,0.10875809192657471,0.17931179702281952
"Consider an object-oriented language in which all entities are objects. Two relationships arise: (1) the instance relationship, between an object and the class of which that object is a member, and (2) the subclass relationship, between a class and the superclass from which that class inherits properties. In such a language, when a message is sent to an object requesting execution of one of its methods (procedures), the method is located by following",one instance link and then zero or more subclass links,one or more instance links and then one or more subclass links,one or more instance links,one subclass link and then one or more instance links,A,False,0.12081767618656158,0.09409289807081223,0.06466904282569885,0.17578867077827454
"In a pipelined RISC computer where all arithmetic instructions have the same CPI (cycles per instruction), which of the following actions would improve the execution time of a typical program?
I. Increasing the clock cycle rate
II. Disallowing any forwarding in the pipeline
III. Doubling the sizes of the instruction cache and the data cache without changing the clock cycle time",I only,II only,III only,I and III,D,True,0.08503054827451706,0.08503054827451706,0.12371871620416641,0.2311369776725769
"A microcomputer used for data acquisition and control is required to digitize and process four analog input signals and to output their average continually; i.e., in real time. The time for an external analog-to-digital converter (which is triggered by a CPU instruction) to digitize one input is 12 microseconds, and only one digitization occurs at a time. Five CPU instructions, including the triggering instruction, must be executed for each signal digitized. Ten CPU instructions are executed in order to average each set of four samples and output this value. The time to convert the output from digital to analog form is to be ignored. If it is assumed that suitable data buffering is employed, then the maximum average instruction execution time that allows the microcomputer to keep up with the input-output data rates, is",0.8 microseconds,1.2 microseconds,1.6 microseconds,2.4 microseconds,C,False,0.10406665503978729,0.17157691717147827,0.10406665503978729,0.10406665503978729
"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?",80%,90%,98%,99.80%,D,False,0.13887372612953186,0.09544642269611359,0.13887372612953186,0.057891178876161575