question_id
int64 6
6.85k
| course_id
int64 0
15.1k
| course_domain
stringclasses 3
values | course_type
stringclasses 3
values | question
stringlengths 6
1.87k
| choices
listlengths 4
4
| correct_answer
stringlengths 1
393
| correct_answer_idx
int64 0
3
|
---|---|---|---|---|---|---|---|
6,574 | 4 |
Computer Science
|
master
|
What makes \texttt{C++} inherently NOT type safe (i.e., unsafe casts may cause an
object of type X be interpreted as type Y even though types X and Y are not
related)?
|
[
"The absence of type information (and checks) for non-polymorphic objects at runtime.",
"The use of function pointers makes static analysis intractable.",
"Class and struct are indistinguishable at run-time due to their memory layout.",
"The polymorphic inheritance between interface and classes."
] |
The absence of type information (and checks) for non-polymorphic objects at runtime.
| 0 |
6,576 | 4 |
Computer Science
|
master
|
Current software is complex and often relies on external dependencies.
What are the security implications?
|
[
"During the requirement phase of the secure development\n lifecycle, a developer must list all the required dependencies.",
"It is necessary to extensively security test every executable\n on a system before putting it in production.",
"As most third party software is open source, it is safe by\n default since many people reviewed it.",
"Closed source code is more secure than open source code as it\n prohibits other people from finding security bugs."
] |
During the requirement phase of the secure development
lifecycle, a developer must list all the required dependencies.
| 0 |
6,579 | 4 |
Computer Science
|
master
|
Which of the following hold true for cross-site scripting (XSS)?
|
[
"XSS is a form of code injection that gives the attacker\n arbitrary code execution.",
"Reflected XSS requires that the server stores the injected\n code but the user does not need to click on any special link.",
"Client-side XSS is a unique problem of GMail.",
"XSS can only be used to leak private data of a user."
] |
XSS is a form of code injection that gives the attacker
arbitrary code execution.
| 0 |
6,582 | 4 |
Computer Science
|
master
|
Does AddressSanitizer prevent \textbf{all} use-after-free bugs?
|
[
"No, because quarantining free’d memory chunks forever prevents\n legit memory reuse and could potentially lead to out-of-memory\n situations.",
"No, because UAF detection is not part of ASan's feature set.",
"Yes, because free’d memory chunks are poisoned.",
"Yes, because free’d memory is unmapped and accesses therefore\n cause segmentation faults."
] |
No, because quarantining free’d memory chunks forever prevents
legit memory reuse and could potentially lead to out-of-memory
situations.
| 0 |
6,584 | 4 |
Computer Science
|
master
|
Which of the below security policies are violated by the following code
snippet?
\begin{lstlisting}[language=C,style=c]
char *foo(int b) {
char c = (char)(b & 0xff);
return &c;
}
int main(int argc, char *argv[]) {
char buf[100] = {0};
int x = 0x539; // 1337
int y = (int)(*foo(x));
putc(buf[y]);
return 0;
}
\end{lstlisting}
|
[
"Temporal memory safety",
"Spatial memory safety",
"Type safety",
"None of the other answers"
] |
Temporal memory safety
| 0 |
6,587 | 4 |
Computer Science
|
master
|
Which of the following measures will always improve fuzzing executions per second?
|
[
"Reducing overheads imposed by the fuzzing framework.",
"Performing structure-aware input generation.",
"Providing dictionaries for input generation.",
"Collecting code coverage as feedback."
] |
Reducing overheads imposed by the fuzzing framework.
| 0 |
6,599 | 4 |
Computer Science
|
master
|
In x86-64 Linux, the canary is \textbf{always} different for every?
|
[
"Thread",
"Function",
"Process",
"Namespace"
] |
Thread
| 0 |
6,604 | 4 |
Computer Science
|
master
|
Is Java as a programming language considered memory safe? Why?
(note: excluding Java Native Interface, the use of \texttt{sun.misc.unsafe}, or bugs in the JVM)
|
[
"Yes, because the JVM guarantees spatial and temporal memory safety at all times.",
"Yes, because you can't access objects by reference in Java.",
"No, there are Java programs vulnerable to use after free.",
"No, there are Java programs vulnerable to type confusion."
] |
Yes, because the JVM guarantees spatial and temporal memory safety at all times.
| 0 |
6,608 | 4 |
Computer Science
|
master
|
You share an apartment with friends.
Kitchen, living room, balcony, and bath room are shared resources among all parties.
Which policy/policies violate(s) the principle of least privilege?
|
[
"Different bedrooms do not have a different key.",
"There is no lock on the fridge.",
"To access the kitchen you have to go through the living room.",
"Nobody has access to the neighbor's basement."
] |
Different bedrooms do not have a different key.
| 0 |
6,615 | 4 |
Computer Science
|
master
|
Which of the following statement(s) is/are true about CFI?
|
[
"When producing valid target sets, missing a legitimate target is unacceptable.",
"CFI’s checks of the valid target set are insufficient to protect every forward edge control-flow transfer",
"Keeping the overhead of producing valid target sets as low as possible is crucial for a CFI mechanism.",
"CFI prevents attackers from exploiting memory corruptions."
] |
When producing valid target sets, missing a legitimate target is unacceptable.
| 0 |
6,622 | 4 |
Computer Science
|
master
|
When a test fails, it means that:
|
[
"either the program under test or the test itself has a bug, or both.",
"the program under test has a bug.",
"the test is incorrect.",
"that both the program and the test have a bug."
] |
either the program under test or the test itself has a bug, or both.
| 0 |
6,624 | 4 |
Computer Science
|
master
|
Which of the following statement(s) is/are true about different types of
coverage for coverage-guided fuzzing?
|
[
"If you cover all edges, you also cover all blocks",
"Full line/statement coverage means that every possible\n control flow through the target has been covered",
"Full data flow coverage is easier to obtain than full edge coverage",
"Full edge coverage is equivalent to full path coverage\n because every possible basic block transition has been covered"
] |
If you cover all edges, you also cover all blocks
| 0 |
6,625 | 4 |
Computer Science
|
master
|
Which of the following is/are typical AddressSanitizer use cases?
|
[
"Out-of-bounds violations visibility increase during fuzzing",
"Use-after-free mitigation in production",
"Uninitialized variable detection during unit tests",
"NULL-pointer dereference detection during fuzzing"
] |
Out-of-bounds violations visibility increase during fuzzing
| 0 |
6,631 | 4 |
Computer Science
|
master
|
Which of the following is/are true about fuzzing libraries?
|
[
"Fuzzing libraries is harder than standalone executables as no\n single ``binary'' is available for a complex API.",
"To fuzz effectively, every argument of every function must be\n fuzzed independently.",
"Every function of a library is part of the API that needs to be fuzzed.",
"FuzzGen's A\\textsuperscript{2}DG contains the control but not\n the data dependencies of the API calls."
] |
Fuzzing libraries is harder than standalone executables as no
single ``binary'' is available for a complex API.
| 0 |
6,632 | 5 |
Computer Science
|
bachelor
|
Consider the Diffie-Hellman secret-key-exchange algorithm performed in the cyclic group $(\mathbb{Z}/11\mathbb{Z}^\star, \cdot)$. Let $g=2$ be the chosen group generator. Suppose that Alice's secret number is $a=5$ and Bob's is $b=3$. Which common key $k$ does the algorithm lead to? Check the correct answer.
|
[
"$10$",
"$7$",
"$8$",
"$9$"
] |
$10$
| 0 |
6,634 | 5 |
Computer Science
|
bachelor
|
How many integers $n$ between $1$ and $2021$ satisfy $10^n \equiv 1 \mod 11$? Check the correct answer.
|
[
"1010",
"183",
"505",
"990"
] |
1010
| 0 |
6,635 | 5 |
Computer Science
|
bachelor
|
Consider a communication system consisting of a binary block code, an error channel, and a minimum-distance decoder. Check the correct statement about the minimum-distance decoder.
|
[
"It minimizes the error probability if the channel is a binary symmetric channel with crossover (flip) probability smaller than 1/2.",
"It always minimizes the error probability.",
"It minimizes the error probability if the channel is a binary symmetric channel.",
"None of the others can be stated with certainty due to missing information."
] |
It minimizes the error probability if the channel is a binary symmetric channel with crossover (flip) probability smaller than 1/2.
| 0 |
6,640 | 5 |
Computer Science
|
bachelor
|
Consider a $(7,4)$ Reed-Solomon code $\mathcal{C}$ over $\mathbb{F}_q$. Let $\vec{x}
eq \vec{y}$ be two different information vectors. The corresponding codewords $c(\vec{x})$ and $c(\vec{y})$ match in at most:
|
[
"3 places.",
"0 places.",
"2 places.",
"None of the others is correct."
] |
3 places.
| 0 |
6,641 | 5 |
Computer Science
|
bachelor
|
You are given an i.i.d source with symbols taking value in the alphabet $\mathcal{A}=\{a,b,c,d\}$ and probabilities $\{1/8,1/8,1/4,1/2\}$. Consider making blocks of length $n$ and constructing a Huffman code that assigns a binary codeword to each block of $n$ symbols. Choose the correct statement regarding the average codeword length per source symbol.
|
[
"It is the same for all $n$.",
"It strictly decreases as $n$ increases.",
"None of the others.",
"In going from $n$ to $n+1$, for some $n$ it stays constant and for some it strictly decreases."
] |
It is the same for all $n$.
| 0 |
6,642 | 5 |
Computer Science
|
bachelor
|
Let ${\cal C}_1=\{00,01,100,101, 110, 111\}$ and ${\cal C}_2=\{00,01,100,101, 111\}$ be two source codes (We exclude the possibility of source symbols of zero probability.) Check the correct statement.
|
[
"${\\cal C}_1$ can be a Huffman code but not ${\\cal C}_2$.",
"Both codes can be Huffman codes.",
" ${\\cal C}_2$ can be a Huffman code but not ${\\cal C}_1$.",
"Neither ${\\cal C}_1$ nor ${\\cal C}_2$ can be a Huffman code."
] |
${\cal C}_1$ can be a Huffman code but not ${\cal C}_2$.
| 0 |
6,643 | 5 |
Computer Science
|
bachelor
|
Let $0\leq\alpha\leq1$ be an unknown constant. Let $X$ be a random variable taking values in $\mathcal{X}=\{0,1,2\}$ with probability $p_X(0) = p_X(1) = \alpha$ and $p_X(2) = 1-2\alpha$. Let $Y$ be a random variable defined as follows egin{equation*}Y = egin{cases}1, & ext{if }X=2\0, & ext{if } X
eq 2\end{cases}.\end{equation*} You also know that $H(X|Y) = rac{1}{2}$. Choose the correct value of $\alpha$.
|
[
"$\frac{1}{4}$",
"$\frac{1}{2}$",
"$1$",
"$\frac{1}{8}$"
] |
$rac{1}{4}$
| 0 |
6,644 | 5 |
Computer Science
|
bachelor
|
A bag contains the letters of LETSPLAY. Someone picks at random 4 letters from the bag without revealing the outcome to you. Subsequently you pick one letter at random among the remaining 4 letters. What is the entropy (in bits) of the random variable that models your choice? Check the correct answer.
|
[
"$\frac{11}{4}$",
"$2$",
"$\\log_2(7)$",
"$\\log_2(8)$"
] |
$rac{11}{4}$
| 0 |
6,662 | 5 |
Computer Science
|
bachelor
|
Consider the group $(\mathbb{Z} / 23 \mathbb{Z}^*, \cdot)$. Find how many elements of the group are generators of the group. (Hint: $5$ is a generator of the group.)
|
[
"$10$",
"$22$",
"$11$",
"$2$"
] |
$10$
| 0 |
6,663 | 5 |
Computer Science
|
bachelor
|
Find $[3^{288294}]_{35}$.
|
[
"$29$",
"$11$",
"$9$",
"$33$"
] |
$29$
| 0 |
6,664 | 5 |
Computer Science
|
bachelor
|
In RSA, we set $p = 7, q = 11, e = 13$. The public key is $(m, e) = (77, 13)$. The ciphertext we receive is $c = 14$. What is the message that was sent? (Hint: You may solve faster using Chinese remainder theorem.).
|
[
"$t=42$",
"$t=14$",
"$t=63$",
"$t=7$"
] |
$t=42$
| 0 |
6,665 | 5 |
Computer Science
|
bachelor
|
Can a commutative group have two different identity elements, $e_1, e_2$?
|
[
"No.",
"Yes, but only if they are inverses of each other.",
"Yes, but only if $e_1^2 = e_2^2$.",
"Yes, product groups always have two different identity elements."
] |
No.
| 0 |
6,666 | 5 |
Computer Science
|
bachelor
|
Consider an RSA encryption where the public key is published as $(m, e) = (35, 11)$. Which one of the following numbers is a valid decoding exponent?
|
[
"$11$",
"$7$",
"$5$",
"$17$"
] |
$11$
| 0 |
6,667 | 5 |
Computer Science
|
bachelor
|
Consider an RSA encryption where the public key is published as $(m, e) = (55, 17)$. Which one of the following numbers is a valid decoding exponent?
|
[
"$53$",
"$23$",
"$43$",
"$83$"
] |
$53$
| 0 |
6,672 | 5 |
Computer Science
|
bachelor
|
Let $\mathcal{C}$ be a binary $(n,k)$ linear code with minimum distance $d_{\min} = 4$. Let $\mathcal{C}'$ be the code obtained by adding a parity-check bit $x_{n+1}=x_1 \oplus x_2 \oplus \cdots \oplus x_n$ at the end of each codeword of $\mathcal{C}$. Let $d_{\min}'$ be the minimum distance of $\mathcal{C}'$. Which of the following is true?
|
[
"$d_{\\min}' = 4$",
"$d_{\\min}' = 5$",
"$d_{\\min}' = 6$",
"$d_{\\min}'$ can take different values depending on the code $\\mathcal{C}$."
] |
$d_{\min}' = 4$
| 0 |
6,673 | 5 |
Computer Science
|
bachelor
|
Let $\mathcal{C}$ be a $(n,k)$ Reed-Solomon code on $\mathbb{F}_q$. Let $\mathcal{C}'$ be the $(2n,k)$ code such that each codeword of $\mathcal{C}'$ is a codeword of $\mathcal{C}$ repeated twice, i.e., if $(x_1,\dots,x_n) \in\mathcal{C}$, then $(x_1,\dots,x_n,x_1,\dots,x_n)\in\mathcal{C'}$. What is the minimum distance of $\mathcal{C}'$?
|
[
"$2n-2k+2$",
"$2n-k+1$",
"$2n-2k+1$",
"$2n-k+2$"
] |
$2n-2k+2$
| 0 |
6,689 | 5 |
Computer Science
|
bachelor
|
Consider the following mysterious binary encoding:egin{center} egin{tabular}{c|c} symbol & encoding \ \hline $a$ & $??0$\ $b$ & $??0$\ $c$ & $??0$\ $d$ & $??0$ \end{tabular} \end{center} where with '$?$' we mean that we do not know which bit is assigned as the first two symbols of the encoding of any of the source symbols $a,b,c,d$. What can you infer on this encoding assuming that the code-words are all different?
|
[
"The encoding is uniquely-decodable.",
"The encoding is uniquely-decodable but not prefix-free.",
"We do not possess enough information to say something about the code.",
"It does not satisfy Kraft's Inequality."
] |
The encoding is uniquely-decodable.
| 0 |
6,690 | 5 |
Computer Science
|
bachelor
|
Suppose that you possess a $D$-ary encoding $\Gamma$ for the source $S$ that does not satisfy Kraft's Inequality. Specifically, in this problem, we assume that our encoding satisfies $\sum_{i=1}^n D^{-l_i} = k+1 $ with $k>0$. What can you infer on the average code-word length $L(S,\Gamma)$?
|
[
"$L(S,\\Gamma) \\geq H_D(S)-\\log_D(e^k)$.",
"$L(S,\\Gamma) \\geq k H_D(S)$.",
"$L(S,\\Gamma) \\geq \frac{H_D(S)}{k}$.",
"The code would not be uniquely-decodable and thus we can't infer anything on its expected length."
] |
$L(S,\Gamma) \geq H_D(S)-\log_D(e^k)$.
| 0 |
6,707 | 5 |
Computer Science
|
bachelor
|
Find all solutions of $24x + [9]_{45} = [13]_{45}$ in the range $[0,44]$. How many different solutions are there?
|
[
"$0$",
"$1$",
"$2$",
"$3$"
] |
$0$
| 0 |
6,708 | 5 |
Computer Science
|
bachelor
|
Find $[5263^{79359}]_{15}$.
|
[
"$7$",
"$12$",
"$8$",
"$13$"
] |
$7$
| 0 |
6,709 | 5 |
Computer Science
|
bachelor
|
Passing on secrets: Alice has posted her RSA credentials as $(m,e)$, with $m$ the modulus and $e$ the encoding exponent. As required by RSA, she keeps her decoding exponent $d$ preciously secret. Bob has a message $t_1$, RSA-encrypts it using $(m,e_1)$ and passes the resulting cryptogram $c_1$ on to Carlos. Carlos has a message $t_2$, RSA-encrypts it using $(m,e_2)$ to obtain the cryptogram $c_2$. Then, Carlos multiplies the two cryptograms, $(c_1\cdot c_2) \mod m,$ and passes this to Alice. Alice applies her regular RSA decryption to $(c_1\cdot c_2) \mod m.$ Under what condition is the result of this decryption exactly equal to the product $(t_1\cdot t_2) \mod m$?
|
[
"If $e_1=e_2=e$.",
"If $e_1+e_2=e$.",
"If for some integer $\\ell,$ we have $e_1 e_2 d=\\ell \\phi(m)+1,$ where $\\phi(\\cdot)$ denotes Euler's totient function.",
"If $d$ is prime and $(e_1+e_2) \\mod m=1$."
] |
If $e_1=e_2=e$.
| 0 |
6,710 | 5 |
Computer Science
|
bachelor
|
A colleague challenges you to create a $(n-1,k,d_{min})$ code $\mathcal C'$ from a $(n,k,d_{min})$ code $\mathcal C$ as follows: given a generator matrix $G$ that generates $\mathcal C$, drop one column from $G$. Then, generate the new code with this truncated $k imes (n-1)$ generator matrix. The catch is that your colleague only gives you a set $\mathcal S=\{\vec s_1,\vec s_2, \vec s_3\}$ of $3$ columns of $G$ that you are allowed to drop, where $\vec s_1$ is the all-zeros vector, $\vec s_2$ is the all-ones vector, and $\vec s_3$ is a canonical basis vector. From the length of the columns $s_i$ you can infer $k$. You do not know $n$, neither do you know anything about the $n-3$ columns of $G$ that are not in $\mathcal S$. However, your colleague tells you that $G$ is in systematic form, i.e., $G=[I ~~ P]$ for some unknown $P$, and that all of the elements in $\mathcal S$ are columns of $P$. Which of the following options in $\mathcal S$ would you choose as the column of $G$ to drop?
|
[
"$\\vec s_1$ (the all-zeros vector).",
"$\\vec s_2$ (the all-ones vector)",
"$\\vec s_3$ (one of the canonical basis vectors).",
"It is impossible to guarantee that dropping a column from $\\mathcal S$ will not decrease the minimum distance."
] |
$\vec s_1$ (the all-zeros vector).
| 0 |
6,711 | 5 |
Computer Science
|
bachelor
|
Let $\mathcal C$ be a $(n,k)$ linear block code over $\mathbb F_2$ of block length $n$ such that $n$ is even and minimum distance $d_{min}=3$. We construct a new code $\mathcal C'$ by appending onto each codeword $\vec x \in \mathcal C$ three parity bits as follows: $x_{n+1}=x_1 \oplus x_3 \oplus x_5 \oplus \ldots \oplus x_{n-1}$, $x_{n+2}=x_2 \oplus x_4 \oplus x_6 \oplus \ldots \oplus x_{n}$, $x_{n+3}=x_1 \oplus x_2 \oplus x_3 \oplus \ldots \oplus x_{n}$. Denote the minimum distance of this new linear block code by $d'_{min}$. Which of the following is true?
|
[
"We cannot tell with certainty what $d'_{min}$ is; it depends on $\\mathcal C$.",
"$d'_{min}=3$",
"$d'_{min}=4$",
"$d'_{min}=5$"
] |
We cannot tell with certainty what $d'_{min}$ is; it depends on $\mathcal C$.
| 0 |
6,712 | 5 |
Computer Science
|
bachelor
|
Let $\mathcal C_1$ be a $(n_1,k)$ linear block code over $\mathbb F_p$ with $p$ prime and $|\mathcal C_1| = 27$. Let $\mathcal C_2$ be a $(n_2,k)$ linear block code over $\mathbb F_2$ of the same dimension $k$. Which of the following is true?
|
[
"$|\\mathcal C_2| = 8$",
"$|\\mathcal C_2| = 16$",
"$|\\mathcal C_2| = 27$",
"$|\\mathcal C_2| = 21$"
] |
$|\mathcal C_2| = 8$
| 0 |
6,713 | 5 |
Computer Science
|
bachelor
|
Let $X_1,X_2,\dots$ be i.i.d. binary random variables with $p_{X_i}(1) =rac{1}{4}$ for every $i\geq 1$. Let $Y_1$ be a uniform binary random variable, and let $Y_i = Y_{i-1} \oplus X_{i-1}$ for every $i\geq 2$, where $\oplus$ denotes the modulo-2 sum. For any given $n\geq 1$, what is the value of $H(Y_1,Y_2,\dots,Y_n)$? [Hint: what is the value of $H(Y_i|Y_1,\dots,Y_{i-1})$?]
|
[
"$\\left(2-\frac{3}{4}\\log 3\right) n + \frac{3}{4}\\log 3 - 1$.",
"$n$.",
"$\\left(2-\frac{3}{4}\\log 3\right) n + 1$.",
"$\\left(3 - \frac{3}{4}\\log 3\right) n +\frac{3}{4}\\log 3 -2$."
] |
$\left(2-rac{3}{4}\log 3
ight) n + rac{3}{4}\log 3 - 1$.
| 0 |
6,714 | 5 |
Computer Science
|
bachelor
|
A binary prefix-free code $\Gamma$ is made of four codewords. The first three codewords have codeword lengths $\ell_1 = 2$, $\ell_2 = 3$ and $\ell_3 = 3$. What is the minimum possible length for the fourth codeword?
|
[
"$1$.",
"$2$.",
"$3$.",
"$4$."
] |
$1$.
| 0 |
6,815 | 9 |
Computer Science
|
bachelor
|
Let P be the statement ∀x(x>-3 -> x>3). Determine for which domain P evaluates to true:
|
[
"-3<x<3",
"x>-3",
"x>3",
"None of the other options"
] |
x>3
| 2 |
6,817 | 9 |
Computer Science
|
bachelor
|
Which of the following is equivalent to ¬(∀x ∃y ∃!z P(x, y, z) )
|
[
"∃x ∀y ∃z ¬P(x, y, z)",
"∃x ∀y ∀z ¬P(x, y, z)",
"∃x ∀y ∀z (¬P(x, y, z) ∨∃z’(P(x,y,z’)∧z’≠z))",
"None of the other options"
] |
∃x ∀y ∀z (¬P(x, y, z) ∨∃z’(P(x,y,z’)∧z’≠z))
| 2 |
6,818 | 9 |
Computer Science
|
bachelor
|
Let p(x,y) be the statement “x visits y”, where the domain of x consists of all the humans in the world and the domain of y consists of all the places in the world. Use quantifiers to express the following statement: There is a place in the world that has never been visited by humans.
|
[
"∃y ∀x ¬p(x,y)",
"∀y ∃x ¬p(x,y)",
"∀y ∀x ¬p(x,y)",
"¬(∀y ∃x ¬p(x,y))"
] |
∃y ∀x ¬p(x,y)
| 0 |
6,819 | 9 |
Computer Science
|
bachelor
|
Which of the following arguments is correct?
|
[
"All students in this class understand math. Alice is a student in this class. Therefore, Alice doesn’t understand math.",
"Every physics major takes calculus. Mathilde is taking calculus. Therefore, Mathilde is a physics major.",
"All cats like milk. My pet is not a cat. Therefore, my pet does not like milk.",
"Everyone who eats vegetables every day is healthy. Linda is not healthy. Therefore, Linda does not eat vegetables every day."
] |
Everyone who eats vegetables every day is healthy. Linda is not healthy. Therefore, Linda does not eat vegetables every day.
| 3 |
6,821 | 9 |
Computer Science
|
bachelor
|
Suppose we have the following function \(f: [0, 2] o [-\pi, \pi] \).
\[f(x) =
egin{cases}
x^2 & ext{ for } 0\leq x < 1\
2-(x-2)^2 & ext{ for } 1 \leq x \leq 2
\end{cases}
\]
|
[
"\\(f\\) is not injective and not surjective.",
"\\(f\\) is injective but not surjective.",
"\\(f\\) is surjective but not injective.",
"\\(f\\) is bijective."
] |
\(f\) is injective but not surjective.
| 1 |
6,822 | 9 |
Computer Science
|
bachelor
|
Which of the following is the powerset of \(A= \{\{\emptyset\}\}\):
|
[
"\\( \\emptyset \\)",
"\\( \\{\\emptyset\\} \\)",
"\\( \\{\\{\\emptyset\\}, \\emptyset\\} \\)",
"\\( \\{\\{\\{\\emptyset\\}\\}, \\emptyset\\} \\)"
] |
\( \{\{\{\emptyset\}\}, \emptyset\} \)
| 3 |
6,824 | 9 |
Computer Science
|
bachelor
|
The solution of the recurrence relation \(a_n = a_{n-1} + 2a_{n-2}\) and initial conditions \(a_0=1\) and \(a_1=2\) is:
|
[
"\\( a_n = 2^n \\)",
"\\( a_n = n + 1 \\)",
"\\( a_n = n^2 + 1 \\)",
"\\( a_n = 2n^2-n+1 \\)"
] |
\( a_n = 2^n \)
| 0 |
6,826 | 9 |
Computer Science
|
bachelor
|
The Fibonacci numbers are a famous sequence throughout nature and history, often called the ”golden ratio”. They consist of each proceeding number as the sum of the two that come before it: 0, 1, 1, 2, 3, 5, 8, 13 ... and so on. How can we describe this sequence of numbers ?
|
[
"It can be described as an arithmetic sequence.",
"It can be described as a geometric sequence.",
"None of the other options are correct",
"It can be described as a recurrence relation."
] |
It can be described as a recurrence relation.
| 3 |
6,829 | 9 |
Computer Science
|
bachelor
|
If A is an uncountable set and B is an uncountable set, A − B cannot be :
|
[
"countably infinite",
"uncountable",
"the null set",
"none of the other options"
] |
none of the other options
| 3 |
6,831 | 9 |
Computer Science
|
bachelor
|
Consider the list : 5, 12, 7, 8, 41
In which sorting algorithm(s) do you directly compare 5 and 41 ?
We are considering the version of insertion sort seen in the slides of the lecture: we compare \( a_j \) to \( a_{j-1} \), then \( a_{j-2} \) etc ...
|
[
"Bubble sort",
"Insertion sort",
"They are directly compared in both algorithms",
"They are not compared in any of the algorithms"
] |
They are not compared in any of the algorithms
| 3 |
6,832 | 9 |
Computer Science
|
bachelor
|
You need to quickly find if a person's name is in a list: that contains both integers and strings such as:
list := ["Adam Smith", "Kurt Gödel", 499, 999.95, "Bertrand Arthur William Russell", 19.99, ...]
What strategy can you use?
|
[
"Insertion sort the list, then use binary search.",
"Bubble sort the list, then use binary search.",
"Use binary search.",
"Use linear search."
] |
Use linear search.
| 3 |
6,834 | 9 |
Computer Science
|
bachelor
|
Let \( f : A
ightarrow B \) be a function from A to B such that \(f (a) = |a| \).
f is a bijection if:
|
[
"\\( A= [0, 1] \\) and \\(B= [-1, 0] \\)",
"\\( A= [-1, 0] \\) and \\(B= [-1, 0] \\)",
"\\( A= [-1, 0] \\) and \\(B= [0, 1] \\)",
"\\( A= [-1, 1] \\) and \\(B= [-1, 1] \\)"
] |
\( A= [-1, 0] \) and \(B= [-1, 0] \)
| 1 |
6,835 | 9 |
Computer Science
|
bachelor
|
Let A = {4, 8} be the set containing integers 4 and 8. What is the total number of possible relations from A to A ?
|
[
"4",
"32",
"8",
"16"
] |
16
| 3 |
6,836 | 9 |
Computer Science
|
bachelor
|
Let \(f(x) = 3 x \left(\log_2(x)
ight)^2 + x^2 \). Select the correct statement:
|
[
"\\(f(x)\\) is \\(O\\left(3 x \\left(\\log_2(x) \right)^2 \right) \\) but not \\(\\Omega\\left(3 x \\left(\\log_2(x) \right)^2 \right) \\)",
"None of the other statements are correct",
"\\(f(x)\\) is \\(\\Theta \\left(3 x \\left(\\log_2(x) \right)^2 \right) \\)",
"\\(f(x)\\) is \\(\\Omega\\left(3 x \\left(\\log_2(x) \right)^2 \right) \\) but not \\(O\\left(3 x \\left(\\log_2(x) \right)^2 \right) \\)"
] |
\(f(x)\) is \(\Omega\left(3 x \left(\log_2(x)
ight)^2
ight) \) but not \(O\left(3 x \left(\log_2(x)
ight)^2
ight) \)
| 3 |
6,838 | 9 |
Computer Science
|
bachelor
|
Let \( P(n) \) be a proposition for a positive integer \( n \) (positive integers do not include 0).
You have managed to prove that \( orall k > 2, \left[ P(k-2) \wedge P(k-1) \wedge P(k)
ight]
ightarrow P(k+1) \).
You would like to prove that \( P(n) \) is true for all positive integers. What is left for you to do ?
|
[
"None of the other statement are correct.",
"Show that \\( P(1) \\) and \\( P(2) \\) are true, then use strong induction to conclude that \\( P(n) \\) is true for all positive integers.",
"Show that \\( P(1) \\) and \\( P(2) \\) are true, then use induction to conclude that \\( P(n) \\) is true for all positive integers.",
"Show that \\( P(1) \\), \\( P(2) \\) and \\( P(3) \\) are true, then use strong induction to conclude that \\( P(n) \\) is true for all positive integers."
] |
Show that \( P(1) \), \( P(2) \) and \( P(3) \) are true, then use strong induction to conclude that \( P(n) \) is true for all positive integers.
| 3 |
6,840 | 9 |
Computer Science
|
bachelor
|
We consider a month of 30 days. I have \(n\) chocolates and each day, I can either: not eat chocolate or eat exactly one chocolate. All chocolates needs to be eaten by the end of the month. What is the smallest number of chocolates needed to guarantee that I will eat chocolate 5 days in a row during the month?
|
[
"27",
"25",
"24",
"26"
] |
25
| 1 |
6,842 | 9 |
Computer Science
|
bachelor
|
What is the value of \(f(4)\) where \(f\) is defined as \(f(0) = f(1) = 1\) and \(f(n) = 2f(n - 1) + 3f(n - 2)\) for integers \(n \geq 2\)?
|
[
"41",
"45",
"39",
"43"
] |
41
| 0 |
6,843 | 9 |
Computer Science
|
bachelor
|
Which of the following are true regarding the lengths of integers in some base \(b\) (i.e., the number of digits base \(b\)) in different bases, given \(N = (FFFF)_{16}\)?
|
[
"\\((N)_2\\) is of length 16",
"\\((N)_{10}\\) is of length 40",
"\\((N)_4\\) is of length 12",
"\\((N)_4\\) is of length 4"
] |
\((N)_2\) is of length 16
| 0 |
6,844 | 9 |
Computer Science
|
bachelor
|
Let \(S\) be the subset of \(\mathbb{Z}\) defined as follows:
\(3 \in S\)
\(x \in S
ightarrow (x + 1 \in S \land x^2 \in S)\)
Which of the following statement is true?
|
[
"By applying the recursive step twice from the basis step, the resulting set is of size 9.",
"\\( 5 \not\\in S \\)",
"\\(S\\) is countably infinite.",
"By applying the recursive step three times from the basis step, the resulting set is of size 11."
] |
\(S\) is countably infinite.
| 2 |
6,845 | 9 |
Computer Science
|
bachelor
|
In a lottery, a bucket of 10 numbered red balls and a bucket of 5 numbered green balls are used. Three red balls and two green balls are drawn (without replacement).
What is the probability to win the lottery? (The order in which balls are drawn does not matter).
|
[
"$$\frac{1}{14400}$$",
"$$\frac{1}{7200}$$",
"$$\frac{1}{1200}$$",
"$$\frac{1}{1900}$$"
] |
$$rac{1}{1200}$$
| 2 |
6,847 | 9 |
Computer Science
|
bachelor
|
Take the recurrence relation $$a_n = -3a_{n-1} + 4a_{n-2}$$ with initial conditions $$a_0 = 1$$, $$a_1=3$$ and transform it in the form $$a_n = lpha_1r_1^n + lpha_2r_2^n$$. Which statement is true?
|
[
"$$\u0007lpha_1 = \frac{4}{5}$$ and $$\u0007lpha_2 = \frac{1}{5}$$",
"$$\u0007lpha_1 = -4$$ and $$\u0007lpha_2=1$$",
"$$\u0007lpha_1 = \frac{7}{5}$$ and $$\u0007lpha_2 = \frac{-2}{5}$$",
"$$\u0007lpha_1 = \frac{13}{5}$$ and $$\u0007lpha_2 = \frac{-7}{5}$$"
] |
$$lpha_1 = rac{7}{5}$$ and $$lpha_2 = rac{-2}{5}$$
| 2 |
6,850 | 9 |
Computer Science
|
bachelor
|
A vending machine dispensing books of stamps accepts only $1 bills, $2 bills and $5 bills.
Find a recurrence relation for the number of ways to deposit $$n$$ dollars in the vending machine, where the order in which the coins and bills are deposited matters.
|
[
"$$a_{n} = a_{n-1} + a_{n-2} + a_{n-5}$$",
"$$a_{n+1} = a_{n-1} + a_{n-2} + a_{n-5}$$",
"$$a_{n+1} = a_{n-1} + 2a_{n-2} + 5a_{n-5}$$",
"$$a_{n} = a_{n-1} + 2a_{n-2} + 5a_{n-5}$$"
] |
$$a_{n} = a_{n-1} + a_{n-2} + a_{n-5}$$
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.