Cuestionarios IA
Cuestionarios IA
-Between depth first search (DFS) and breadth first search (BFS), which will find a shorter
path through a maze?
• DFS will sometimes, but not always, find a shorter path than BFS
• BFS will sometimes, but not always, find a shorter path than DFS ←
-The following question will ask you about the below maze. Grey cells indicate walls. A
search algorithm was run on this maze, and found the yellow highlighted path from point
A to B. In doing so, the red highlighted cells were the states explored but that did not
lead to the goal.
B
A
Of the four search algorithms discussed in lecture — depth-first search, breadth-first
search, greedy best-first search with Manhattan distance heuristic, and A* search with
Manhattan distance heuristic — which one (or multiple, if multiple are possible) could be
the algorithm used?*
• Could only be A*
• Depth-limited minimax will achieve the same output as minimax without a depth
limit, but can sometimes use less memory
• Depth-limited minimax can make a more optimal decision by not exploring states
known to be suboptimal
-The following question will ask you about the Minimax tree below, where the green up
arrows indicate the MAX player and red down arrows indicate the MIN player. The leaf
nodes are each labelled with their value.
9 6 5 1 4 3 7 2 8
• 6
• 5←
• 1
• 4
• 3
• 7
• 2
• 8
QUIZ 1
The following question will ask you about the following logical sentences.
1. If Hermione is in the library, then Harry is in the library.
2. Hermione is in the library.
3. Ron is in the library and Ron is not in the library.
4. Harry is in the library.
5. Harry is not in the library or Hermione is in the library.
6. Ron is in the library or Hermione is in the library.
-There are other logical connectives that exist, other than the ones discussed in lecture.
One of the most common is "Exclusive Or" (represented using the symbol ⊕). The
expression A ⊕ B represents the sentence "A or B, but not both." Which of the following
is logically equivalent to A ⊕ B?
• (A ∨ B) ∧ ¬ (A ∧ B) ←
• (A ∧ B) ∨ ¬ (A ∨ B)
• (A ∨ B) ∧ (A ∧ B)
• (A ∨ B) ∧ ¬ (A ∨ B)
Let propositional variable R be that "It is raining," the variable C be that "It is cloudy,"
and the variable S be that "It is sunny." Which of the following a propositional logic
representation of the sentence "If it is raining, then it is cloudy and not sunny."?
• (R → C) ∧ ¬S
• R → C → ¬S
• R ∧ C ∧ ¬S
• R → (C ∧ ¬S) ←
• (C ∨ ¬S) → R
Consider, in first-order logic, the following predicate symbols. Student(x) represents the
predicate that "x is a student." Course(x) represents the predicate that "x is a course."
Enrolled(x, y) represents the predicate that "x is enrolled in y." Which of the following is a
first-order logic translation of the sentence "There is a course that Harry and Hermione
are both enrolled in."?
• ∀x. Course(x) ∧ Enrolled(Harry, x) ∧ Enrolled(Hermione, x)
• ∃x. Enrolled(Harry, x) ∧ ∃y. Enrolled(Hermione, y)
• ∃x. Enrolled(Harry, x) ∨ Enrolled(Hermione, x)
• ∀x. Enrolled(Harry, x) ∨ Enrolled(Hermione, x)
• ∀x. Enrolled(Harry, x) ∧ ∀y. Enrolled(Hermione, y)
• ∃x. Course(x) ∧ Enrolled(Harry, x) ∧ Enrolled(Hermione, x) ←
QUIZ 2
-Consider a standard 52-card deck of cards with 13 card values (Ace, King, Queen, Jack,
and 2-10) in each of the four suits (clubs, diamonds, hearts, spades). If a card is drawn at
random, what is the probability that it is a spade or a two?*
Note that "or" in this question refers to inclusive, not exclusive, or.
• About 0.019
• About 0.077
• About 0.17
• About 0.25
• About 0.308 ←
• About 0.327
• About 0.5
• None of the above
-Imagine flipping two fair coins, where each coin has a Heads side and a Tails side, with
Heads coming up 50% of the time and Tails coming up 50% of the time. What is
probability that after flipping those two coins, one of them lands heads and the other
lands tails?
• 0
• 0.125
• 0.25
• 0.375
• 0.5 ←
• 0.625
• 0.75
• 0.875
• 1
-The following question will ask you about the Bayesian Network shown in lecture,
reproduced below.
Rain
{none, light, heavy}
Maintenance
{yes, no}
Train
{on time, delayed}
Appointment
{attend, miss}
-For which of the following will you always find the same solution, even if you re-run the
algorithm multiple times?
Assume a problem where the goal is to minimize a cost function, and every state in the
state space has a different cost.
• Steepest-ascent hill-climbing, each time starting from a different starting state
• Steepest-ascent hill-climbing, each time starting from the same starting state←
• Stochastic hill-climbing, each time starting from a different starting state
• Stochastic hill-climbing, each time starting from the same starting state
• Both steepest-ascent and stochastic hill climbing, so long as you always start from
the same starting state←
• Both steepest-ascent and stochastic hill climbing, each time starting from a different
starting state
• No version of hill-climbing will guarantee the same solution every time
-The following two questions will both ask you about the optimization problem described
below
A farmer is trying to plant two crops, Crop 1 and Crop 2, and wants to maximize his profits.
The farmer will make $500 in profit from each acre of Crop 1 planted, and will make $400
in profit from each acre of Crop 2 planted.
However, the farmer needs to do all of his planting today, during the 12 hours between
7am and 7pm. Planting an acre of Crop 1 takes 3 hours, and planting an acre of Crop 2
takes 2 hours.
The farmer is also limited in terms of supplies: he has enough supplies to plant 10 acres of
Crop 1 and enough supplies to plant 4 acres of Crop 2.
Assume the variable C1 represents the number of acres of Crop 1 to plant, and the variable
C2 represents the number of acres of Crop 2 to plant.
After enforcing arc consistency on this entire problem, what are the resulting domains for
the variables C, D, and E?
• C's domain is {Mon, Tue}, D's domain is {Wed}, E's domain is {Mon}
• C's domain is {Mon}, D's domain is {Mon, Wed}, E's domain is {Mon, Tue, Wed}
• C's domain is {Mon}, D's domain is {Mon, Wed}, E's domain is {Tue, Wed}←
• C's domain is {Mon}, D's domain is {Wed}, E's domain is {Tue}
• C's domain is {Mon}, D's domain is {Tue}, E's domain is {Wed}
• C's domain is {Mon, Tue, Wed}, D's domain is {Mon, Wed}, E's domain is {Mon, Tue,
Wed}
Quiz 4
-Imagine a regression AI that makes the following predictions for the following 5 data
points. What is the total L2 loss across all of these data points (i.e., the sum of all the
individual L2 losses for each data point)?*
For data point 1, the true output is 2 and the AI predicted 4. For data point 2, the true
output is 4 and the AI predicted 5. For data point 3, the true output is 4 and the AI
predicted 3. For data point 4, the true output is 5 and the AI predicted 2. For data point 5,
the true output is 6 and the AI predicted 5.
• 0
• 4
• 5
• 8
• 16←
• 19
• 21
• 64
-If Hypothesis 1 has a lower L1 loss and a lower L2 loss than Hypothesis 2 on a set of
training data, why might Hypothesis 2 still be a preferable hypothesis?
• Hypothesis 1 might be the result of overfitting.←
• Hypothesis 1 might be the result of regularization.
• Hypothesis 1 might be the result of loss.
• Hypothesis 1 might be the result of regression.
• Hypothesis 1 might be the result of cross-validation.
In the ε-greedy approach to action selection in reinforcement learning, which of the
following values of ε makes the approach identical to a purely greedy approach?
• ε = 0←
• ε = 0.25
• ε = 0.5
• ε = 0.75
• ε=1
QUIZ 5
-The following question will ask you about the below neural network, where we set w0 =
-5, w1 = 2, w2 = -1, and w3 = 3. x1, x2, and x3 represent input neurons, and y represents
the output neuron.
w0
x1
w1
x2 w2
y
w3
x3
What value will this network compute for y given inputs x1 = 3, x2 = 2, and x3 = 4 if we
use a step activation function? What if we use a ReLU activation function?
• 0 for step activation function, 0 for ReLU activation function
• 0 for step activation function, 1 for ReLU activation function
• 1 for step activation function, 0 for ReLU activation function
• 1 for step activation function, 1 for ReLU activation function
• 1 for step activation function, 11 for ReLU activation function
• 1 for step activation function, 16 for ReLU activation function
• 11 for step activation function, 11 for ReLU activation function
• 16 for step activation function, 16 for ReLU activation function
-How many total weights (including biases) will there be for a fully connected neural
network with a single input layer with 3 units, a single hidden layer with 5 units, and a
single output layer with 4 units?
• 9
• 12
• 20
• 35
• 39
• 40
• 44←
• 60
• 69
-Consider a recurrent neural network that listens to a audio speech sample, and classifies
it according to whose voice it is. What network architecture is the best fit for this
problem?
• Many-to-many (multiple inputs, multiple outputs)
• One-to-many (single input, multiple outputs)
• Many-to-one (multiple inputs, single output)←
• One-to-one (single input, single output)
-The following question will ask you about a 4x4 grayscale image with the following pixel
values.
2 4 6 8
16 14 12 10
18 20 22 24
32 30 28 26
What would be the result of applying a 2x2 max-pool to the original image?*
Answers are formatted as a matrix [[a, b], [c, d]] where [a, b] is the first row and [c, d] is
the second row.
• [[16, 12], [32, 28]]
• [[16, 14], [32, 30]] ←
• [[22, 24], [32, 30]]
• [[14, 12], [30, 28]]
• [[16, 14], [22, 24]]
• [[16, 12], [32, 30]]
QUIZ 6
The following question will ask you about the below context-free grammar, where S is
the start symbol
S → NP V
NP → N l A NP
A → “small” l “white”
N → “cats” l “trees”
V → “climb ” l “run”
-The following question will also ask you about the following four sentences.
Sentence 1: Cats run.
Sentence 2: Cats climb trees.
Sentence 3: Small cats run.
Sentence 4: Small white cats climb.
Of the four sentences above, which sentences can be derived from the above context-free
grammar?
• Only Sentence 1
• Only Sentence 1 and Sentence 2
• Only Sentence 1 and Sentence 3
• Only Sentence 1 and Sentence 4
• Only Sentence 1, Sentence 2, and Sentence 3
• Only Sentence 1, Sentence 2, and Sentence 4←
• Only Sentence 1, Sentence 3, and Sentence 4
• All four sentences
• None of the four sentences
-Which of the following is not a true statement?
• Attention mechanisms can be used to determine which parts o an input sequence
are most important to focus on.
• One-hot representations of words better represent word meaning than distributed
representations of words. ←
• Transformers can be faster to train than recurrent neural networks because they are
more easily parallelized.
• A Naive Bayes Classifier assumes that the order of words doesn’t matter when
determining how they should be classified.
-From the phrase "must be the truth", how many word n-grams of length 2 can be
extracted?
• 0
• 1
• 2
• 3←
• 4
• 5
• 6
• 15
• 17