question stringlengths 6 13.7k | text stringlengths 1 25.8k | source stringclasses 3
values |
|---|---|---|
Let S(x) be the statement “x has been in a lake” and L(x) be the statement “x lives in Lausanne” and the domain of x consists of all the humans in the world.
The sentence : “there exists exactly one human that lives in Lausanne and that has never been in a lake” corresponds to the statement (multiple choices possible)... | To analyze the statement "there exists exactly one human that lives in Lausanne and that has never been in a lake," we need to break down what this entails in terms of logical quantifiers and structure.
### Key Components of the Statement:
1. **Existence**: The phrase "there exists" indicates we are using the existent... | M1 preference data |
In an automated email router of a company, we want to make the distinction between three kind of
emails: technical (about computers), financial, and the rest ('irrelevant'). For this we plan to use a
Naive Bayes approach.
What is the main assumption made by Naive Bayes classifiers? Why is it 'Naive'?
We will consider ... | The main assumption made by Naive Bayes classifiers is the independence of features, meaning that the presence or absence of a particular feature (word) in an email is assumed to be independent of the presence or absence of any other feature. This is why it is called "Naive"—the classifier simplifies reality by assumin... | M1 preference data |
Let $f(x, y)$ be a general function over $\mathbb{R}^{2}$. Mark any of the following statements that is always (independent of the function) correct? | To solve the problem, we can approach it using various reasoning methods. Here are a few possible approaches:
1. **Order Relations in Min/Max**:
- Understand that for any function \(f(x, y)\), the relationships between minimum and maximum values provide inherent inequalities.
2. **Theorems of Minimax**:
- Use k... | M1 preference data |
You are discussing coding habits with a colleague, who says:
"When I code, if a function I write has more than 10 lines, I always refactor to make it call another function, so that all my functions have less than 10 lines."
In one sentence, explain if this is a good habit and why: | While maintaining functions with fewer than 10 lines can enhance readability and modularity, it is essential to balance this practice with considerations for maintainability and performance, as overly fragmenting code may lead to excessive function calls and reduced clarity in the overall logic. | M1 preference data |
Which one of these is \emph{not} a stream cipher? | To determine which of the options is not a stream cipher, let's first clarify some key concepts related to stream ciphers and the options provided:
1. **Stream Cipher**: A stream cipher encrypts plaintext one bit or byte at a time. It typically uses a key that generates a pseudo-random keystream, which is then combine... | M1 preference data |
Which of the following statements about code instrumentation is/are correct? | To analyze the statements about code instrumentation, we will evaluate each option one by one.
1. **We should instrument basic blocks when collecting edge coverage.**
- Edge coverage requires tracking transitions between basic blocks. Instrumenting basic blocks can help achieve this as it allows us to count how man... | M1 preference data |
An expression is referentially transparent if it always returns the same value, no matter
the global state of the program. A referentially transparent expression can be replaced by its value without
changing the result of the program.
Say we have a value representing a class of students and their GPAs. Given the follow... | To understand referential transparency, let's use a real-world analogy. Imagine you have a vending machine that dispenses drinks. Each time you press a button for a specific drink, it always gives you the same drink, regardless of what else is happening around it (like other people using the machine or the time of day)... | M1 preference data |
The result of $2^{2015} \bmod{9}$ is $\ldots$ | To find \( 2^{2015} \mod 9 \), we can use properties of modular arithmetic, particularly the concept of finding the pattern in the powers of 2 modulo 9.
Let's compute the first few powers of \( 2 \) modulo \( 9 \):
\[
2^1 \equiv 2 \mod 9
\]
\[
2^2 \equiv 4 \mod 9
\]
\[
2^3 \equiv 8 \mod 9
\]
\[
2^4 \equiv 16 \equiv 7... | M1 preference data |
Provide a formal definition of a transducer. Give some good reasons to use such a tool for morphological processing. | A **transducer** is a computational model that maps input sequences to output sequences, often applied in the context of automata theory and formal language processing. Formally, a transducer can be defined as a tuple \( T = (Q, \Sigma, \Gamma, \delta, q_0, F) \), where:
- \( Q \) is a finite set of states,
- \( \Sigm... | M1 preference data |
Consider a linear model $\hat{y} = xv ^ op \wv$ with the squared loss under an $\ell_\infty$-bounded adversarial perturbation. For a single point $(xv, y)$, it corresponds to the following objective:
egin{align}
\max_{ ilde{xv}:\ \|xv- ilde{xv}\|_\infty\leq \epsilon} \left(y... | To solve the optimization problem given by Eq. (1), we will first figure out what the objective function is and then maximize this function under the constraints provided by the adversarial perturbation.
Given:
- \(\wv = (3, -2)^T\)
- \(xv = (-1, 2)^T\)
- \(y = 2\)
The objective function we need to maximize is:
\[
(y... | M1 preference data |
Implement weigthing estimation of kNN classification | To implement weighted estimation for kNN classification, the provided function `knn_weighting_estimate` calculates the contribution of each nearest neighbor to the classification score based on their similarity to the query vector. Here's a breakdown of how it works:
1. **Parameters**: The function takes in document v... | M1 preference data |
Tick the \textbf{true} assertion. In a zero-knowledge interactive proof for $L$, \ldots | 1. For any ppt verifier, there is a simulator which for any \( x \in L \) produces a conversation indistinguishable from the original conversation.
This assertion is valid because, in the context of zero-knowledge proofs, one of the key properties is that the interaction between the prover and the verifier can be simu... | M1 preference data |
To avoid the effect of the prefetcher, one could use a hash
table to randomize the access order during probing so that the
prefetcher cannot anticipate the access pattern. What is the
potential problem with this idea? | Using a hash table to randomize access order during probing in order to avoid the effects of the prefetcher can indeed mitigate some predictability of memory access patterns. However, there are several potential problems with this approach:
1. **Increased Cache Misses**: Hash tables typically involve non-sequential ac... | M1 preference data |
In which group is the discrete logarithm problem believed to be hard? | The discrete logarithm problem (DLP) is believed to be hard in certain mathematical groups. Let's analyze the options provided:
1. **In a subgroup of \(\mathbb{Z}_p^*\) with large prime order**:
- This is a well-known setting where the discrete logarithm problem is hard. The security of many cryptographic systems,... | M1 preference data |
Can we implement TRB with an eventually perfect failure detector ◇P, under the assumption that at least one process can crash? | Yes, we can implement Total Order Broadcast (TRB) using an eventually perfect failure detector ◇P, even with the possibility of process crashes. The failure detector will eventually identify correct processes, enabling reliable message delivery in total order as outlined in the reasoning. | M1 preference data |
Which cipher is AES? | The correct answer is **3: RIJNDAEL**. I arrived at this by recognizing that AES (Advanced Encryption Standard) is based on the Rijndael cipher, which was selected by NIST after a competition.
Students may confuse this with other ciphers like Blowfish or RC5, which are also well-known but unrelated to AES. To avoid si... | M1 preference data |
Tick the \emph{false} assertion. Given a ring $R$, $R^\star$ is\ldots | To determine which assertion about \( R^\star \) is false, let's analyze each statement step by step.
1. **"A group."**
The set of invertible elements in a ring \( R \), which we denote by \( R^\star \), is indeed a group under the operation of multiplication. This is because:
- **Closure:** If \( a, b \in R^... | M1 preference data |
What is the length in bits of the input and output of a DES S-Box respectively? | The length of the input to a DES S-Box is 6 bits, and the output is 4 bits, making option 3 the correct choice. This is because the S-Box takes a 6-bit input and maps it to a 4-bit output based on a fixed substitution table. | M1 preference data |
Assume that your team is discussing the following java code:
public final class DataStructure {
public void add(int val) { /*...*/ }
private boolean isFull() { /*...*/ }
}
One of your colleagues suggests that "add" should be changed to return a boolean indicating whether the passed value was added or not. Ex... | Changing the `add` method to return a boolean indicating whether the value was added would break backward compatibility.
Backward compatibility means that existing code relying on the original method should still function correctly after changes. If the method signature changes from `public void add(int val)` to `pub... | M1 preference data |
You have been publishing a daily column for the Gazette over the last few years and have recently reached a milestone --- your 1000th column! Realizing you'd like to go skiing more often, you decide it might be easier to automate your job by training a story generation system on the columns you've already written. Then... | The model might reproduce exact names, home addresses or contact details of healthcare workers or patients that appeared in the COVID-19 news corpus, thereby leaking personally identifiable information. | M1 preference data |
Assume Your project depends on the latest available minor release version of a package instead of a hardcoded exact version, what are the pros and cons of this? | Depending on the latest available minor release version of a package has both advantages and disadvantages:
**Pros:**
1. **Up-to-Date Fixes:** You benefit from the latest bug fixes, security patches, and performance improvements, which can enhance the stability and security of your project.
2. **Less Maintenance:** Yo... | M1 preference data |
Consider the exhaustive search of a uniformly distributed key in a set of size $N$. Think of the possible strategies and their complexities. Which of the following is \textbf{not} possible (We assume that memory access is constant.) | The option that is **not** possible is **C**.
Justification:
- Option A: This option suggests that we can find the key with precomputation time of $0$, using $O(1)$ memory and $O(N)$ time. This is feasible if we have a direct access to the key (for example, if we simply check each possibility one by one without prior... | M1 preference data |
Which of the following terms represents a mode of operation which transforms a block cipher into a stream cipher? | When comparing the options, 3DES, CBC, and ECB are modes that primarily apply to block ciphers without transforming them into stream ciphers. 3DES is a block cipher that applies the DES algorithm three times to enhance security, but it does not offer the functionality of a stream cipher. CBC (Cipher Block Chaining) and... | M1 preference data |
In class, we saw Karger's beautiful randomized algorithm for finding a minimum cut in an undirected graph $G=(V,E)$. Recall that his algorithm works by repeatedly contracting a randomly selected edge until the graph only consists of two vertices which define the returned cut. For general graphs, we showed that the retu... | To explore why Karger's algorithm returns a minimum cut with probability 1 when applied to a spanning tree, we should first consider the properties of spanning trees. A spanning tree is a connected graph that contains no cycles, and its edges are critical for maintaining connectivity. Interestingly, this characteristic... | M1 preference data |
An element of the finite field $\mathrm{GF}(2^8)$ is usually represented by\dots | An element of the finite field \(\mathrm{GF}(2^8)\) is typically represented by two hexadecimal digits. This is because \(\mathrm{GF}(2^8)\) consists of \(256\) elements, ranging from \(0\) to \(255\). Each of these elements can be represented by a byte, which is \(8\) bits long. Since one byte can be expressed using t... | M1 preference data |
Why do block ciphers use modes of operation? | Block ciphers operate on fixed-size blocks of data. However, real-world applications often require encrypting data that exceeds this block size, such as messages or files of arbitrary length. Modes of operation provide a method for handling these scenarios by defining how to encrypt data larger than the block size and ... | M1 preference data |
Design an algorithm that implements consensus using multiple TRB instances. | Run one TRB instance per process. Each process p invokes TRB[p].broadcast(vâ) with its proposal vâ. Then every correct process waits until it has either delivered a value or ⥠from each TRB instance. Let S be the multiset of delivered values (treating missing ones as â¥). Finally, apply a deterministic decision ... | M1 preference data |
Pick the \emph{false} statement. | The false statement is A. A ring is not necessarily commutative, meaning that in a general ring, it is possible for \( ab \neq ba \). While all rings satisfy associativity, distributivity, and the existence of additive identities, commutativity is an additional property that only some rings (called commutative rings) p... | M1 preference data |
When computing PageRank iteratively, the computation ends when... | To determine when the PageRank computation ends in an iterative process, we need to analyze the options provided. PageRank uses a specific algorithm to rank nodes in a graph based on their importance. The process involves iterating until the rank vector converges.
### Key Definitions and Formulas:
1. **PageRank Vecto... | M1 preference data |
Explain the difference between inflectional and derivational morphology. Illustrate your explanation with concrete examples in English or French. | Inflectional morphology refers to modifications of a word that do not change its grammatical category but rather provide grammatical information, such as tense, number, or case. For example, in English, the verb "give" can change to "gives" (present tense) or "given" (past participle), but it remains a verb throughout ... | M1 preference data |
Is $(\mathbb{Z} / 8\mathbb{Z}^*, \cdot)$ isomorphic to $(\mathbb{Z} / k\mathbb{Z}, +)$ for some $k$? | The correct answer is **False**. Let's analyze the reasoning step-by-step:\n\n1. **Structure of \((\mathbb{Z} / 8\mathbb{Z}^*, \cdot)\)**:\n - The group consists of the units modulo 8: \{1, 3, 5, 7\}, which indeed has 4 elements. However, this group is non-cyclic because it cannot be generated by a single element.\n\... | M1 preference data |
In an x86 multiprocessor with JOS, how many Bootstrap Processors (BSP) is it possible to have at most? And how many Application Processors (AP) at most? | {"answer":["B"],"rationale":"In an x86 multiprocessor system, there can be at most one Bootstrap Processor (BSP) responsible for booting the system, while the number of Application Processors (AP) can be infinite, as they can be added dynamically."} | M1 preference data |
Is the processors in recoder buffers ordered (e.g., FIFO-like) or an unordered structure?
Why? | The processors in reorder buffers are ordered (FIFO-like) because they ensure that instructions are completed in the same order they were issued to maintain program correctness and consistency. | M1 preference data |
Given the following method:
1 def mystery6(nIter: Int) (ss: List[String] ): List[String] =
2 if nIter <= 0 then ss
3 else mystery6 (nIter - 1) (
4 for
5 s <- ss
6 c <- List (’c’ , ’b’ , ’a’)
7 yield
8 s + c
9 ) ::: ss
What is the output if we call mystery6 this way:
mystery6(5)(List("")).filter(_.exists(_ == ’b’))(0) | To determine the output of the call `mystery6(5)(List(""))`, we can analyze how the `mystery6` function processes the input.
### Step-by-step Analysis:
1. **Initial Call**: `mystery6(5)(List(""))`
- `nIter` is `5`, and `ss` is `List("")`.
- Since `nIter` is greater than `0`, it proceeds to the `else` clause.
2.... | M1 preference data |
Which of the following acronyms does not designate a mode of operation? | The correct answer is **3. CRC**.
### Justification:
The acronyms listed in the question refer to different concepts in cryptography:
1. **CBC (Cipher Block Chaining)** - This is a mode of operation for block ciphers that uses chaining to provide confidentiality.
2. **CTR (Counter Mode)** - This is another mode of op... | M1 preference data |
You have been hired to evaluate an email monitoring system aimed at detecting potential security issues. The targeted goal of the application is to decide whether a given email should be further reviewed or not. You have been given the results of three different systems that have been evaluated on the same panel of 157... | **Answer:** I would recommend system 2 for the email monitoring system. While the classification error of system 2 (0.081) is slightly higher than that of system 1 (0.079), the difference in error rates is statistically non-significant given the standard deviations (stddev) of both systems. System 2 has a much lower st... | M1 preference data |
The $n^2$ problem ... | The "$n^2$ problem" in the context of communication and symmetric ciphers refers to the challenge of managing unique keys for secure interactions among users. Here's a breakdown:
1. **Context**: The problem arises when $n$ users need to communicate securely, necessitating unique keys for each pair of users.
2. **Symm... | M1 preference data |
Consider a classification problem using either SVMs or logistic regression and separable data. For logistic regression we use a small regularization term (penality on weights) in order to make the optimum welldefined. Consider a point that is correctly classified and distant from the decision boundary. Assume that we m... | To analyze the effect of moving a correctly classified point that is distant from the decision boundary on the decision boundary itself, we need to consider the fundamental differences between Support Vector Machines (SVMs) and logistic regression.
1. **Understanding SVMs**:
- SVMs focus on maximizing the margin be... | M1 preference data |
What is the algorithm to perform optimization with gradient descent? Actions between Start loop and End loop are performed multiple times. (One answer) | To determine the correct order of actions to perform optimization using gradient descent, we need to understand the typical process involved in this algorithm. The process generally involves the following steps:
1. **Initialize weights**: Before starting the optimization, the weights of the model need to be initialize... | M1 preference data |
Tick the \emph{incorrect} assertion regarding the security of the Diffie-Hellman key exchange over a subgroup $\langle g \rangle \subset \mathbb{Z}_p^*$. | The incorrect assertion regarding the security of the Diffie-Hellman key exchange is:
**3. The binary representation of the output of the key exchange is a uniformly distributed bitstring.** | M1 preference data |
Tick the \textbf{false} assertion. In Linear Cryptanalysis, the corresponding mask circuit of \ldots | To identify the false assertion among the given statements related to Linear Cryptanalysis, let's evaluate each one:
1. **Assertion 1**: For an XOR gate \(X \oplus Y = Z\), the corresponding mask circuit is \(a \cdot Z = (a \cdot X) \oplus (a \cdot Y)\).
This assertion is **true**. The masking of the output \(Z\) ... | M1 preference data |
Select the \emph{correct} answer. | A dictionary attack is a method used to guess passwords by trying every word in a predefined list, called a dictionary. The larger the dictionary, the higher the chances of successfully guessing the correct password because it includes more possible options that a user might have chosen. Therefore, the success rate of ... | M1 preference data |
Let the first four retrieved documents be N N R R, where N denotes a non-relevant and R a relevant document. Then the MAP (Mean Average Precision) is: | To solve the problem of calculating the Mean Average Precision (MAP) for the retrieved documents represented as N N R R, we will follow the suggested strategy step by step.
1. **Identify Relevant Documents**:
In the sequence N N R R, we have two relevant documents (R) and two non-relevant documents (N). The relevan... | M1 preference data |
Use the integrality of the bipartite perfect matching polytope (as proved in class) to show the following classical result: \begin{itemize} \item[] The edge set of a $k$-regular bipartite graph $G=(A\cup B, E)$ can in polynomial time be partitioned into $k$ disjoint perfect matchings. \end{itemize} \noindent A graph is... | To show that the edge set of a \( k \)-regular bipartite graph \( G = (A \cup B, E) \) can be partitioned into \( k \) disjoint perfect matchings, we will leverage the properties of perfect matchings in bipartite graphs and the concept of integrality of the bipartite perfect matching polytope.
### Step 1: Understandi... | M1 preference data |
For each of the sub-questions of this question (next page), tick/check the corresponding box if the presented sentence is correct
at the corresponding level (for a human). There will be a penalty for wrong boxes ticked/checked.The mouse lost a feather as it took off. | At the lexical level all words are valid English tokens, and syntactically the sentence is well-formed; semantically itâs false (mice have no feathers), and pragmatically itâs odd, so only lexical and syntactic are correct. | M1 preference data |
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... | Show that \( P(1)\), \(P(2)\), and potentially use other values like \(P(3)\) are true; then apply strong induction starting from there to conclude that valid implications lead us through all positive integers effectively asserting statement holds universally across them due being able to satisfy conditions repeatedly ... | M1 preference data |
Suppose that q is density reachable from p. The chain of points that ensure this relationship are {t,u,g,r} Which one is FALSE? | In the context of density reachability in clustering algorithms, particularly with DBSCAN, if point \( q \) is density reachable from point \( p \), it means that there is a sequence of points connecting \( p \) to \( q \) such that each point in the sequence is within a specified distance from the previous point and h... | M1 preference data |
Consider the following grammar:
S -> NP VP
NP -> Det N
VP -> VBe Adj
NP -> NP PP
VP -> V
N -> Adj N
VP -> VP PP
Adj -> Adj PP
V -> VBe
Adj -> Ving
PP -> Prep NP
and the following lexicon:
at:Prep is:VBe old:Adj
black:Adj looking:Ving the:Det
cat:N mouse:N under:Prep
former:Adj nice:Adj with:Prep
The above grammar ... | To address the issue of over-generation in the given grammar, we need to establish a clear distinction between different types of adjectives and their placement in sentence structures. The first step involves recognizing that some adjectives, such as 'former', are inherently restricted to occur only before nouns and ca... | M1 preference data |
Consider two Information Retrieval systems S1 and S2 that produced the following outputs for
the 4 reference queries q1, q2, q3, q4:
S1: | referential:
q1: d01 d02 d03 d04 dXX dXX dXX dXX | q1: d01 d02 d03 d04
q2: d06 dXX dXX dXX dXX | q2: d05 d06
q3: dXX d07 d09 ... | To calculate the mean Precision and Recall for the two information retrieval systems (S1 and S2), we will follow a systematic approach for each query:
### Definitions:
- **Precision**: The proportion of relevant documents retrieved out of all documents retrieved.
\[
\text{Precision} = \frac{\text{True Positives}}{... | M1 preference data |
Tick the \emph{incorrect} assertion. In \emph{all} finite Abelian groups $(G,+)$ \ldots | Answer:**
2) all the elements are generators.
**Explanation:**
The incorrect assertion is that "all the elements are generators." While certain elements may serve as generators for the group, this is not universally true for all elements in a finite Abelian group. For instance, in the group \( \mathbb{Z}/6\mathbb{Z} \... | M1 preference data |
Select the \emph{incorrect} statement | To identify the incorrect statement among the options provided, let's analyze each statement step-by-step:
**A) RC4, A5/1, E0 are stream ciphers.**
- **True.** RC4 is a widely known stream cipher used in various encryption protocols. A5/1 is a stream cipher used in GSM (Global System for Mobile Communications) for e... | M1 preference data |
Which of the following statements about symbolic execution is/are correct? | 2. State space explosion is a common challenge for symbolic execution.
1. Symbolic execution can efficiently handle and solve constraints in programs with simple logics but large input space.
These two options are correct. State space explosion refers to the overwhelming growth of possible execution paths in complex... | M1 preference data |
Consider a matrix factorization problem of the form $\mathbf{X}=\mathbf{W Z}^{\top}$ to obtain an item-user recommender system where $x_{i j}$ denotes the rating given by $j^{\text {th }}$ user to the $i^{\text {th }}$ item . We use Root mean square error (RMSE) to gauge the quality of the factorization obtained. Selec... | **Plan:**
1. Analyze the implications of adding a new item to the recommender system and the need for retraining.
2. Evaluate the regularization terms applied to the matrices \(\mathbf{W}\) and \(\mathbf{Z}\) and their effect on the convexity of the objective function.
3. Assess the relationship between the latent dime... | M1 preference data |
Consider the following snippet used to produce a
high-performance circuit using a statically scheduled HLS tool, such
as Xilinx Vivado HLS. Assume that a erb+double+ multiplication
takes several cycles (latency) to compute.
egin{verbatim}... | Answer: 1. Yes, a dynamically scheduled circuit would likely achieve better performance due to its ability to handle varying latencies and dependencies more flexibly. The performance gain depends on techniques such as loop unrolling and pipelining, which allow for overlapping computations and better utilization of hard... | M1 preference data |
When are paired t-tests helpful? Justify. | Paired t-tests are a statistical method used to determine whether there is a significant difference between the means of two related groups. This test is particularly useful in specific scenarios, which I will outline step by step:
### 1. **Understanding the Context**:
- A paired t-test is applicable when the sampl... | M1 preference data |
Give well chosen examples of applications that can be evaluated with the single metric derived from Precision/Recall and illustrate:
• a situation where more weight should be given to Precision;
• a situation where more weight should be given to Recall. | In evaluating applications with respect to Precision and Recall metrics, we can consider two distinct situations that illustrate when to prioritize each metric:
1. **Situation Favoring Precision**: Spam Email Filtering
- In scenarios like spam detection systems, itâs crucial to minimize false positives since misc... | M1 preference data |
We want to generate a $\ell$-bit prime. The complexity is roughly\dots | $\ell^4$ | M1 preference data |
Which of the following is WRONG for Ontologies? | 1. "The question asks which statement about ontologies is wrong."
2. "Option A is correct because ontologies are essential for interoperability."
3. "Option B is correct as ontologies facilitate the integration of data."
4. "Option C is correct because ontologies allow the specification of schemas."
5. "Option D is inc... | M1 preference data |
Tick the \textbf{false} assertion. The SEI of the distribution $P$ of support $G$ \ldots | To determine which assertion about the SEI (Squared Euclidean Imbalance) of the distribution \( P \) of support \( G \) is false, we will analyze each option step by step, considering potential edge cases.
### Assertion 1:
**"is equal to \( \# G \cdot \sum_{x \in G} \left( P(x) - \frac{1}{\# G} \right)^2 \)"**
**Anal... | M1 preference data |
Which of the following statements are correct? | Let's evaluate each of the statements carefully:
1. **One iteration of standard SGD for SVM costs roughly \(\Theta(D)\), where \(D\) is the dimension.**
- **Correct.** In standard stochastic gradient descent (SGD) for a support vector machine (SVM), each iteration involves computing the gradient of the loss functio... | M1 preference data |
Recall that we say that a kernel $K: \R imes \R
ightarrow \R $ is
valid if there exists $k \in \mathbb{N}$ and $\Phi: \R
ightarrow \R^k$
such that for all $(x, x') \in \R imes \R $, $K(x, x') = \Phi(x)^ op \Phi(x')$. The kernel $K(x, x') = \cos(x + x')$ is a valid kernel. | To determine if the kernel \( K(x, x') = \cos(x + x') \) is a valid kernel, we need to verify whether it can be expressed in the form \( K(x, x') = \Phi(x)^\top \Phi(x') \) for some mapping \( \Phi: \mathbb{R} \to \mathbb{R}^k \).
1. **Understanding the Kernel Definition**:
A kernel is considered valid if it can be... | M1 preference data |
Compared to the plain RSA cryptosystem and for equivalent key sizes, the plain Elgamal cryptosystem has\dots | To compare the plain RSA cryptosystem with the Elgamal cryptosystem, we need to analyze their key characteristics, particularly focusing on key generation, encryption, decryption, and ciphertext size.
1. **Key Generation**: The RSA key generation involves selecting two large prime numbers, calculating their product, a... | M1 preference data |
Which of the following statements about index merging (when constructing inverted files) is correct? | Thank you for the opportunity to revisit the analysis of index merging in the context of constructing inverted files. Let's go through the options again with a more focused lens on their accuracy and implications.
1. **"While merging two partial indices on disk, the inverted lists of a term are concatenated without so... | M1 preference data |
A service is an application component that performs long-running operations, usually in the background. A service doesn't provide a UI.
While reviewing the pull request of a friend you notice that he periodically fetches data from the cloud in his activity? What potential problem this could lead to, and how can you fix... | In reviewing the pull request of my friend, I noticed that he is periodically fetching data from the cloud directly within the main activity thread. This can lead to several potential problems, primarily due to the role of the main thread in a mobile application.
### Implications of Network Operations in the Main Thre... | M1 preference data |
Implement a uniform reliable broadcast algorithm without using any failure detector, i.e., using only BestEffort-Broadcast(BEB). | Protocol: the sender BEB-broadcasts m; any process that receives m for the first time immediately BEB-rebroadcasts it (implicit ACK). Each node tracks ack[m], the set of distinct processes from which it has received m. A process delivers m once |ack[m]| > N/2. Because a majority of correct nodes eventually ACK, if one ... | M1 preference data |
Ignoring their different evaluation characteristics in this exercise, we consider here
that filter and withFilter are equivalent. To which expression is the following for-loop translated ?
1 def mystery7(xs : List[Int], ys : List[Int]) : List[Int] =
2 for
3 y <- ys if y < 100
4 x <- xs if x < 20
5 yield
6 if y < x then... | Answer:
```scala
ys.filter(y => y < 100).flatMap(y => xs.filter(x => x < 20).map(x => if (y < x) 0 else y - x))
```
### Explanation:
In this translation, we first filter the `ys` list to include only those elements less than 100, preserving the outer loop structure. For each valid `y`, we then apply `flatMap` to `xs` ... | M1 preference data |
Consider the following sequence of random variables $S_1,\ldots,S_n,\ldots$ Assume that the limit $H^\star(\mathcal{S})=k$ exists and is finite. Suppose that there exists $\hat{n}>0$ such that for all $i\geq \hat{n}$ one has that the marginal distributions of $S_{i+1}$ and $S_i$ satisfy $p_{S_{i+1}}=p_{S_i}$. Denote wi... | To determine whether the statement "one can use this information to infer that \( |\mathcal{Y}_{\hat{n}}| \geq 2^k \)" is true or false, we can analyze the components involved.
1. **Definition of \( H^\star(\mathcal{S}) \)**: The limit \( H^\star(\mathcal{S}) = k \) represents the asymptotic entropy rate of the sequen... | M1 preference data |
What is WRONG regarding the Transformer model? | The correct answer to the question about what is WRONG regarding the Transformer model is: **"Its computation cannot be parallelized compared to LSTMs and other sequential models."**
Let's evaluate each option:
1. **"It uses a self-attention mechanism to compute representations of the input and output."**
- **Re... | M1 preference data |
To which expression is the following for-loop translated ?
1 def mystery8(xs : List[List[Int]]) =
2 for
3 x <- xs
4 y <- x
5 yield
6 y | Answer: xs.flatMap(x => x)
Reasoning: The for-loop iterates over a list of lists, first extracting each sublist (x) from the outer list (xs) and then iterating over each element (y) in the sublist. The result is a flattened list containing all elements from the inner lists, which is exactly what the flatMap function ... | M1 preference data |
Fitting a Gaussian Mixture Model with a single Gaussian ($K=1$) will converge after one step of Expectation-Maximization. | **Answer: True**
Rationale: When fitting a Gaussian Mixture Model (GMM) with a single Gaussian component ($K=1$), the model effectively reduces to a standard Gaussian distribution. The Expectation-Maximization (EM) algorithm will converge in the first step because the expectation step (E-step) will calculate the respo... | M1 preference data |
In this exercise, we will see how to combine the Principal Component Analysis (PCA) and the kernel method into an algorithm known as kernel PCA. We are given $n$ observations in a low dimensional space $\mathbf{x}_{1}, \cdots, \mathbf{x}_{n} \in \mathbb{R}^{L}$ and we consider a kernel $k$ and its associated features $... | The primary reason we cannot directly apply the standard PCA algorithm in the high-dimensional space $\mathbb{R}^{H}$ as described is that we cannot explicitly compute the feature mapping $\phi(\mathbf{x})$ for our data points $\mathbf{x}_1, \ldots, \mathbf{x}_n$. The kernel method relies on the ability to compute the ... | M1 preference data |
What hardware support is necessary in a processor to implement
modulo scheduling? Name all hardware features involved and give a
brief explanation of each of them. | To implement modulo scheduling, a specific set of hardware features in a processor is necessary. Modulo scheduling is an advanced scheduling technique used in compiler design, particularly for optimizing loops in instruction-level parallelism. Here’s a breakdown of the required hardware support:
1. **Multiple Function... | M1 preference data |
Does the following code snippet contain bugs? If so, which line(s)?
\begin{lstlisting}[language=C,style=c]
void echo() {
char buf[100];
scanf("%s", buf);
printf(buf);
}
\end{lstlisting} | **Elimination of Wrong Options:**
- **Line 1 has a bug / vuln:** This line simply defines the function and does not contain any code that could be problematic.
- **Line 2 has a bug / vuln:** This line declares a character buffer and does not have any issues.
- **There is no bug / vuln in the code snippet:** This optio... | M1 preference data |
The purpose of this first exercise part is to ensure that the predictions produced by minimizing the true $\phi$-risk are optimal. As for the $0-1$ loss, it can be shown that the true $\phi$-risk is minimized at a predictor $g^\star:\mathcal X o \R$ satisfying for all $\xv\in\mathcal X$:
Let $b: \R o \R$ a f... | To show that
\[
\mathcal{L}(g) - \mathcal{L}^\star \leq \mathbb{E}[|2\eta(X) - 1 - b(g(X))|],
\]
let's break this down step by step.
1. **Understanding the Terms**:
- The term \( \mathcal{L}(g) \) represents the expected loss for the predictor \( g \), while \( \mathcal{L}^\star \) is the optimal loss that woul... | M1 preference data |
What happens in the reliable broadcast algorithm if the completeness property of the failure detector is violated? | Hey! Great question! The reliable broadcast algorithm depends on the failure detector to ensure messages reach the right destinations.
If the completeness property is violated, some crashed processes might still be reported as alive, leading to several issues:
1. **Message Delivery Problems:** Messages may be sent to... | M1 preference data |
In User-Based Collaborative Filtering, which of the following is TRUE? | Answer:**
2) Pearson Correlation Coefficient and Cosine Similarity have different value ranges and can return different similarity rankings for the users.
**Explanation:**
In User-Based Collaborative Filtering, the Pearson Correlation Coefficient (PCC) and Cosine Similarity (CS) are two popular methods for measuring s... | M1 preference data |
When using linear regression, how do you help prevent numerical instabilities? (One or multiple answers) | To address the question regarding how to prevent numerical instabilities in linear regression, let’s analyze each option provided:
1. **Reduce learning rate**:
Reducing the learning rate can help stabilize the training process in optimization algorithms (like gradient descent), particularly when dealing with erra... | M1 preference data |
The goal of this question is to illustrate how to use transducers to implement a simplified version of the conjugation of English verbs. We will restrict to the conjugated forms corresponding to the indicative mode and the present tense.
The idea is to build a transducer corresponding to the composition of three transd... | To define transducer \( T_1 \) formally, we need to consider its role in identifying the morphological paradigm for regular English verbs in the present tense indicative mood. The main goal of \( T_1 \) is to categorize verbs based on their endings and to determine the appropriate conjugation rules that will be applied... | M1 preference data |
Select the \emph{incorrect} statement. | The incorrect statement is:
- The non-deterministic encryption always provides perfect secrecy.
To identify the incorrect statement, we must analyze each option based on the principles of encryption.
1. "The non-deterministic encryption can encrypt one plaintext into many ciphertexts." - This is correct. Non-determ... | M1 preference data |
Graph coloring consist of coloring all vertices \ldots | **Plan:**
1. Define graph coloring and its purpose in graph theory.
2. Analyze each option to determine its correctness regarding the principles of graph coloring.
3. Identify the option that accurately describes the requirements of graph coloring.
4. Select the correct option based on the analysis.
**Step 1:** Graph ... | M1 preference data |
Assume you are part of a team developing a mobile app using Scrum. One of your colleagues, who was tasked with adding a "dark mode" to the app, has found an unrelated bug during testing:
a race condition occasionally causes stale data to be displayed. Your colleague wants to immediately fix it, though the source of the... | It is not a good idea to immediately fix the unrelated bug, as doing so may divert attention and resources from the primary task of implementing the 'dark mode,' potentially delaying the project timeline and leading to further complications if the root cause of the bug is not fully understood. | M1 preference data |
In this problem, we give a $2$-approximation algorithm for the submodular vertex cover problem which is a generalization of the classic vertex cover problem seen in class. We first, in subproblem~\textbf{(a)}, give a new rounding for the classic vertex cover problem and then give the algorithm for the more general pr... | To tackle the problem, we need to analyze the randomized rounding scheme for the vertex cover problem in detail. The goal is two-fold: to show that the output \( S_t \) is a feasible vertex cover for any \( t \in [0, 1/2] \), and to demonstrate that the expected cost of this output is at most twice the cost of the line... | M1 preference data |
Which of the following scheduler policies are preemptive? | The correct options among the provided scheduler policies that are preemptive are:
**'STCF (Shortest Time to Completion First)'** and **'RR (Round Robin)'**.
### Explanation of Correct Options:
1. **STCF (Shortest Time to Completion First)**:
- STCF is a preemptive scheduling algorithm that selects the process wi... | M1 preference data |
If A is an uncountable set and B is an uncountable set, A − B cannot be : | To answer this question, we need to understand the properties of set operations, particularly when dealing with uncountable sets. Let's break it down step-by-step.
### Step 1: Understanding the Sets
1. **Uncountable Sets**: These are sets that cannot be put into one-to-one correspondence with the natural numbers. Exam... | M1 preference data |
AES\dots | To analyze the options related to AES (Advanced Encryption Standard), let’s break down the characteristics of AES:
1. **Key Length**: AES supports key lengths of 128 bits, 192 bits, and 256 bits. This means that the key length is variable, as there are multiple options for how long the key can be.
2. **Block Length**... | M1 preference data |
We consider a classification problem on linearly separable data. Our dataset had an outlier---a point that is very far from the other datapoints in distance (and also far from margins in SVM but still correctly classified by the SVM classifier).
We trained the SVM, logistic regression and 1-nearest-... | In the context of the hard-margin SVM for linearly separable data, we aim to minimize the Euclidean norm of the weight vector \( \ww \) under specific constraints that ensure correct classification of all training data points while maintaining a margin.
Given a training dataset comprised of pairs \( (x_n, y_n) \), whe... | M1 preference data |
Which of the following is TRUE for Recommender Systems (RS)? | To determine which of the provided statements about Recommender Systems (RS) is true, let's analyze each option step by step:
**A) The complexity of the Content-based RS depends on the number of users.**
- Content-based recommender systems focus on the characteristics of items and user preferences rather than the acti... | M1 preference data |
Let $\mathcal{C}$ be a binary $(5,2)$ linear code with generator matrix egin{equation*} G = egin{pmatrix} 1 &0 &1 &0 &1 \ 0 &1 &0 &1 &1 \end{pmatrix} \end{equation*} and consider a minimum-distance decoder obtained by choosing the coset leaders of the standard array of $\mathcal{C}$ so that th... | **
To determine whether the word \(00101\) is certainly not one of the coset leaders for the binary \((5,2)\) linear code defined by the generator matrix
\[
G = \begin{pmatrix}
1 & 0 & 1 & 0 & 1 \\
0 & 1 & 0 & 1 & 1
\end{pmatrix},
\]
we first need to find the codewords generated by this matrix. The possible message... | M1 preference data |
Which of these primitives can be surely considered insecure today? | To determine which of the listed primitives can be considered insecure today, we can analyze each option based on contemporary standards of cryptographic security.
1. **Symmetric key encryption with an 82-bit key**: This is considered insecure today. The general recommendation for symmetric keys is to use at least 128... | M1 preference data |
What are the drawbacks of non-preemptive scheduling compared to preemptive scheduling? | **
Imagine a busy restaurant kitchen where the head chef (the CPU) is preparing meals (the processes). In a non-preemptive scheduling system, once the chef starts cooking a dish, they won't stop until that dish is finished. This means that if the chef is working on a complicated order, the other dishes (tasks) have to... | M1 preference data |
Tick the \textbf{true} assertion. | To determine the true assertion among the options provided, let's analyze each statement step-by-step:
A. **It is asymptotically harder to do a collision than to do a preimage attack.**
- In cryptography, finding a collision (two different inputs producing the same hash) is generally considered easier than finding ... | M1 preference data |
Consider the following toy learning corpus of 59 tokens (using a tokenizer that splits on whitespaces and punctuation), out of a possible vocabulary of $N=100$ different tokens:
Pulsed operation of lasers refers to any laser not classified as continuous wave, so that the optical power appears in pulses of some duration... | Thank you for your patience. Let's carefully re-evaluate the calculation of the probabilities for the 2-grams "continuous wave" and "pulsed laser" using Dirichlet smoothing.
### Step 1: Definitions and Counts
1. **Total Tokens**: The total number of tokens in the corpus is \( T = 59 \).
2. **Vocabulary Size**: The si... | M1 preference data |
You have been hired to evaluate an email monitoring system aimed at detecting potential security issues. The targeted goal of the application is to decide whether a given email should be further reviewed or not. You have been given the results of three different systems that have been evaluated on the same panel of 157... | To determine the minimal size of a test set required to ensure, at a 95% confidence level, that a system's error is 0.02 lower than that of system 3, we can use the concept of confidence intervals for proportions.
System 3 has an observed error rate of 0.118, and we want to ensure that our new system's error is at mo... | M1 preference data |
Given a function $f:\left\{ 0,1 \right\}^p \rightarrow \left\{ 0,1 \right\}^q$, given $a\in\left\{ 0,1 \right\}^p$ and $b \in \left\{ 0,1 \right\}^q$, we define $DP^{f}(a,b) = \Pr_{X}[f(X \oplus a) = f(X) \oplus b]$. We have that $\ldots$ | To reach the 'aha!' moment regarding the options provided, we need to analyze the definitions and implications of the function \( DP^f(a,b) \) and how it interacts with the properties of the function \( f \).
### Recall of Given Definition:
The expression \( DP^f(a,b) = \Pr_{X}[f(X \oplus a) = f(X) \oplus b] \) repres... | M1 preference data |
For a blockcipher $B:\{0,1\}^k\times \{0,1\}^n \rightarrow \{0,1\}^n$ that has decorrelation $Dec^q_{\| \cdot \|_{\infty}}(B,C^*)=d$ (from a perfect cipher $C^*$), the best advantage of \textit{any} distinguisher that makes $q$ queries is \ldots | The correct option is:
**A. bounded by \( d/2 \).**
### Explanation:
The concept of decorrelation measures how close a given cipher is to a perfect cipher. In this case, the decorrelation measure \( Dec^q_{\| \cdot \|_{\infty}}(B,C^*)=d \) indicates that the cipher \( B \) is \( d \) away from behaving like a perfec... | M1 preference data |
You are given the following collection of premises:
If I go to the museum, it either rains or snows.
I went to the museum on Saturday or I went to the museum on Sunday.
It did not rain and it did not snow on Saturday.
It did not rain on Sunday.
Which conclusions can be drawn from these premises ? (more than one answer ... | Reasoning: From the first premise, if I go to the museum, it either rains or snows. The second premise states that I either went to the museum on Saturday or Sunday. The third and fourth premises indicate that it did not rain or snow on Saturday and it also did not rain on Sunday. Since it did not rain or snow on eithe... | M1 preference data |
The goal of the 4 following questions is to prove that the methods map and mapTr are equivalent. The
former is the version seen in class and is specified by the lemmas MapNil and MapCons. The later version
is a tail-recursive version and is specified by the lemmas MapTrNil and MapTrCons.
All lemmas on this page hold fo... | Certainly! Let's correct and clarify the proof of the lemma \( AccOut \) given the right steps and lemmas to apply.
We need to show that:
\[
(x :: xs).mapTr(f, y :: ys) === y :: (x :: xs).mapTr(f, ys)
\]
We will prove this by induction on the list \( l \).
### Induction Step:
Assume \( l \) is of the form \( x :: x... | M1 preference data |
Which of the following statement(s) is/are true about CFI? | Let's analyze each statement regarding Control Flow Integrity (CFI):
1. **"When producing valid target sets, missing a legitimate target is unacceptable."**
This statement is true. If a legitimate target is omitted from the valid target set, it could lead to unexpected behavior or vulnerabilities, as legitimate c... | M1 preference data |
Consider a binary classification problem with classifier $f(\mathbf{x})$ given by $$ f(\mathbf{x})= \begin{cases}1, & g(\mathbf{x}) \geq 0 \\ -1, & g(\mathbf{x})<0\end{cases} $$ and $\mathbf{x} \in \mathbb{R}^{6}$. Consider a specific pair $(\mathbf{x}, y=1)$ and assume that $g(\mathbf{x})=8$. In particular this means ... | To find the offset \(\delta\) that yields the smallest value for \(g(\mathbf{x}+\delta)\), we can leverage the fact that \(g\) is (locally) linear around the point \(\mathbf{x}\).
Using the first-order Taylor expansion, we have:
\[
g(\mathbf{x} + \delta) \approx g(\mathbf{x}) + \nabla_{\mathbf{x}} g(\mathbf{x}) \cdot... | M1 preference data |
There are N philosphers sitting around a circular table eating spaghetti and discussing philosphy. The problem is that each philosopher needs two forks to eat, and there are only $N$ forks, one between each pair of philosophers. We want to design an algorithm that the philosophers can use, that ensures that no one star... | To address the problem of N philosophers sitting around a circular table with N forks, we must ensure that each philosopher can eat without causing deadlocks while maximizing the number of philosophers who can eat simultaneously.
### Problem Breakdown
1. **Setup**: There are N philosophers and N forks, with one fork l... | M1 preference data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.