search
Log In
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Recent questions tagged multiple-selects

2 votes
2 answers
1
Consider the following sets, where $n \geq 2$: $S_1$: Set of all $n \times n$ matrices with entries from the set $\{ a, b, c\}$ $S_2$: Set of all functions from the set $\{0,1,2, \dots, n^2-1\}$ to the set $\{0, 1, 2\}$ Which of the following ... to $S_2$ There exists a surjection from $S_1$ to $S_2$ There exists a bijection from $S_1$ to $S_2$ There does not exist an injection from $S_1$ to $S_2$
asked Feb 18 in Set Theory & Algebra Arjun 557 views
1 vote
3 answers
2
Let $L_1$ be a regular language and $L_2$ be a context-free language. Which of the following languages is/are context-free? $L_1 \cap \overline{L_2} \\$ $\overline{\overline{L_1} \cup \overline{L_2}} \\$ $L_1 \cup (L_2 \cup \overline{L_2}) \\$ $(L_1 \cap L_2) \cup (\overline{L_1} \cap L_2)$
asked Feb 18 in Theory of Computation Arjun 590 views
0 votes
3 answers
3
In the context of compilers, which of the following is/are $\text{NOT}$ an intermediate representation of the source program? Three address code Abstract Syntax Tree $\text{(AST)}$ Control Flow Graph $\text{(CFG)}$ Symbol table
asked Feb 18 in Compiler Design Arjun 913 views
1 vote
1 answer
4
Which of the following statement(s) is/are correct in the context of $\text{CPU}$ scheduling? Turnaround time includes waiting time The goal is to only maximize $\text{CPU}$ utilization and minimize throughput Round-robin policy can be used even when the $\text{CPU}$ time required by each of the processes is not known apriori Implementing preemptive scheduling needs hardware support
asked Feb 18 in Operating System Arjun 576 views
3 votes
2 answers
5
Choose the correct choice(s) regarding the following proportional logic assertion $S$: $S: (( P \wedge Q) \rightarrow R) \rightarrow (( P \wedge Q) \rightarrow (Q \rightarrow R))$ $S$ is neither a tautology nor a contradiction $S$ is a tautology $S$ is a contradiction The antecedent of $S$ is logically equivalent to the consequent of $S$
asked Feb 18 in Mathematical Logic Arjun 512 views
0 votes
1 answer
6
Suppose the following functional dependencies hold on a relation $U$ with attributes $P,Q,R,S$, and $T$: $P \rightarrow QR \\ RS \rightarrow T$ Which of the following functional dependencies can be inferred from the above functional dependencies? $PS \rightarrow T$ $R \rightarrow T$ $P \rightarrow R$ $PS \rightarrow Q$
asked Feb 18 in Databases Arjun 438 views
3 votes
2 answers
7
For a string $w$, we define $w^R$ to be the reverse of $w$. For example, if $w=01101$ then $w^R=10110$. Which of the following languages is/are context-free? $\{ wxw^Rx^R \mid w,x \in \{0,1\} ^* \}$ $\{ ww^Rxx^R \mid w,x \in \{0,1\} ^* \}$ $\{ wxw^R \mid w,x \in \{0,1\} ^* \}$ $\{ wxx^Rw^R \mid w,x \in \{0,1\} ^* \}$
asked Feb 18 in Theory of Computation Arjun 547 views
1 vote
2 answers
8
Consider the following multi-threaded code segment (in a mix of C and pseudo-code), invoked by two processes $P_1$ and $P_2$, and each of the processes spawns two threads $T_1$ and $T_2$: int x = 0; // global Lock L1; // global main () { create a thread to execute foo( ... will print the value of $y$ as $2.$ Both $T_1$ and $T_2$, in both the processes, will print the value of $y$ as $1.$
asked Feb 18 in Operating System Arjun 771 views
2 votes
1 answer
9
Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing of resources are done by holding a global lock $(L)$. The ... that deadlocks will not occur The scheme may lead to live-lock The scheme may lead to starvation The scheme violates the mutual exclusion property
asked Feb 18 in Operating System Arjun 661 views
2 votes
4 answers
10
If the numerical value of a $2$-byte unsigned integer on a little endian computer is $255$ more than that on a big endian computer, which of the following choices represent(s) the unsigned integer on a little endian computer? $0\text{x}6665$ $0\text{x} 0001$ $0\text{x} 4243$ $0\text{x} 0100$
asked Feb 18 in Digital Logic Arjun 2.1k views
1 vote
1 answer
11
Consider a computer network using the distance vector routing algorithm in its network layer. The partial topology of the network is shown below. The objective is to find the shortest-cost path from the router $R$ to routers $P$ and $Q$. Assume that $R$ does not initially know the shortest routes ... for a packet from $R$ to $P$ is $Y$ The next hop router for a packet from $R$ to $Q$ is $Z$
asked Feb 18 in Computer Networks Arjun 409 views
2 votes
1 answer
12
Consider the following directed graph: Which of the following is/are correct about the graph? The graph does not have a topological order A depth-first traversal starting at vertex $S$ classifies three directed edges as back edges The graph does not have a strongly connected component For each pair of vertices $u$ and $v$, there is a directed path from $u$ to $v$
asked Feb 18 in Algorithms Arjun 519 views
2 votes
1 answer
13
​​​​​​​Which of the following regular expressions represent(s) the set of all binary numbers that are divisible by three? Assume that the string $\epsilon$ is divisible by three. $(0+1(01^*0)^*1)^*$ $(0+11+10(1+00)^*01)^*$ $(0^*(1(01^*0)^*1)^*)^*$ $(0+11+11(1+00)^*00)^*$
asked Feb 18 in Theory of Computation Arjun 455 views
1 vote
2 answers
14
In the context of operating systems, which of the following statements is/are correct with respect to paging? Paging helps solve the issue of external fragmentation Page size has no impact on internal fragmentation Paging incurs memory overheads Multi-level paging is necessary to support pages of different sizes
asked Feb 18 in Operating System Arjun 549 views
2 votes
3 answers
15
Let $\langle M \rangle$ denote an encoding of an automaton $M$. Suppose that $\Sigma = \{0,1\}$. Which of the following languages is/are $\text{NOT}$ recursive? $L= \{ \langle M \rangle \mid M$ is a $\text{DFA}$ such that $L(M)=\emptyset \}$ $L= \{ \langle M \rangle \mid M$ is ... $L(M)=\emptyset \}$ $L= \{ \langle M \rangle \mid M$ is a $\text{PDA}$ such that $L(M)=\Sigma ^* \}$
asked Feb 18 in Theory of Computation Arjun 521 views
3 votes
1 answer
16
Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery. Which of the following statements is/are correct? The same undo and redo list ... any further All the transactions that are already undone and redone will not be recovered again The database will become inconsistent
asked Feb 18 in Databases Arjun 647 views
3 votes
3 answers
17
Which of the following standard $C$ library functions will always invoke a system call when executed from a single-threaded process in a $\text{UNIX/Linux}$ operating system? $\textsf{exit}$ $\textsf{malloc}$ $\textsf{sleep}$ $\textsf{strlen}$
asked Feb 18 in Operating System Arjun 1.1k views
1 vote
1 answer
18
Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory $\textsf{foo}$. Which of ... file from $\textsf{foo}$ Renaming of an existing file in $\textsf{foo}$ Opening of an existing file in $\textsf{foo}$
asked Feb 18 in Operating System Arjun 702 views
1 vote
2 answers
19
Define $R_n$ to be the maximum amount earned by cutting a rod of length $n$ meters into one or more pieces of integer length and selling them. For $i>0$, let $p[i]$ denote the selling price of a rod whose length is $i$ meters. Consider the array of prices: ... $R_7$? $R_7=18$ $R_7=19$ $R_7$ is achieved by three different solutions $R_7$ cannot be achieved by a solution consisting of three pieces
asked Feb 18 in Algorithms Arjun 859 views
4 votes
2 answers
20
An $articulation$ $point$ in a connected graph is a vertex such that removing the vertex and its incident edges disconnects the graph into two or more connected components. Let $T$ be a $\text{DFS}$ tree obtained by doing $\text{DFS}$ in a connected undirected graph $G$. Which of the following ... and $y$ is a descendent of $u$ in $T$, then all paths from $x$ to $y$ in $G$ must pass through $u$.
asked Feb 18 in DS Arjun 1.9k views
2 votes
1 answer
21
Consider the following Boolean expression. $F=(X+Y+Z)(\overline X +Y)(\overline Y +Z)$ Which of the following Boolean expressions is/are equivalent to $\overline F$ (complement of $F$)? $(\overline X +\overline Y +\overline Z)(X+\overline Y)(Y+\overline Z)$ $X\overline Y + \overline Z$ $(X+\overline Z)(\overline Y +\overline Z)$ $X\overline Y +Y\overline Z + \overline X \overline Y \overline Z$
asked Feb 18 in Digital Logic Arjun 332 views
2 votes
4 answers
22
A relation $R$ is said to be circular if $aRb$ and $bRc$ together imply $cRa$. Which of the following options is/are correct? If a relation $S$ is reflexive and symmetric, then $S$ is an equivalence relation. If a relation $S$ is circular and symmetric, ... and circular, then $S$ is an equivalence relation. If a relation $S$ is transitive and circular, then $S$ is an equivalence relation.
asked Feb 18 in Set Theory & Algebra Arjun 501 views
1 vote
2 answers
23
A $\text{TCP}$ server application is programmed to listen on port number $P$ on host $S$. A $\text{TCP}$ client is connected to the $\text{TCP}$ server over the network. Consider that while the $\text{TCP}$ connection was active, the server machine $S$ crashed ... it will receive a $\text{RST}$ segment If the client sends a packet after the server reboot, it will receive a $\text{FIN}$ segment
asked Feb 18 in Computer Networks Arjun 1.2k views
1 vote
2 answers
24
Consider the following pseudocode, where $\textsf{S}$ is a semaphore initialized to $5$ in line $\#2$ and $\textsf{counter}$ is a shared variable initialized to $0$ in line $\#1$. Assume that the increment operation in line $\#7$ is $\textit{not}$ ... $0$ after all the threads successfully complete the execution of $\textsf{parop}$ There is a deadlock involving all the threads
asked Feb 18 in Operating System Arjun 696 views
0 votes
1 answer
25
Consider a $\textit{dynamic}$ hashing approach for $4$-bit integer keys: There is a main hash table of size $4$. The $2$ least significant bits of a key is used to index into the main hash table. Initially, the main hash table entries are empty. Thereafter, when more keys are hashed into it, to resolve ... in decimal notation)? $5,9,4,13,10,7$ $9,5,10,6,7,1$ $10,9,6,7,5,13$ $9,5,13,6,10,14$
asked Feb 18 in Algorithms Arjun 373 views
...