Artificial Intelligence Introduction
- 67Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What was the central goal of the 1956 Dartmouth workshop on artificial intelligence?
What was the central goal of the 1956 Dartmouth workshop on artificial intelligence?
67 questions
- 1
What was the central goal of the 1956 Dartmouth workshop on artificial intelligence?
- A
To replace symbolic reasoning with statistical learning from large datasets
- B
To precisely capture aspects of learning and intelligence so machines could simulate them
- C
To create a universal programming language for controlling industrial robots
- D
To build the first commercially successful system for recognizing handwritten digits
Correct answer
BTo precisely capture aspects of learning and intelligence so machines could simulate them
Explanation
The Dartmouth researchers hoped that every aspect of learning or intelligence could be precisely described well enough for a machine to simulate it.
- A
- 2
Which development is associated with the early Dartmouth-era AI programs?
- A
Programs that generated deep neural networks from satellite imagery
- B
Programs that played checkers and proved mathematical theorems
- C
Programs that drove autonomous vehicles through crowded cities
- D
Programs that translated every language accurately in real time
Correct answer
BPrograms that played checkers and proved mathematical theorems
Explanation
Early AI produced programs that could play checkers, prove theorems, and generate other interesting computational artifacts.
- A
- 3
What did the failed English–Russian–English translation example illustrate?
- A
Government funding increased after the translation produced humorous results
- B
Early optimism underestimated the complexity and subtlety of language
- C
Translation errors occurred only because Russian lacked precise vocabulary
- D
Machine translation succeeded once enough computational resources were added
Correct answer
BEarly optimism underestimated the complexity and subtlety of language
Explanation
The translation of “The spirit is willing but the flesh is weak” into “The vodka is good but the meat is rotten” illustrated the limits of early systems and excessive optimism.
- A
- 4
Which combination of factors contributed to the first AI winter?
- A
A lack of programming languages, hardware manufacturers, and mathematical notation
- B
Insufficient computing power, exponential search, and limited information
- C
Poor hardware reliability, perfect language models, and excessive funding
- D
Excessive computing power, linear search, and unlimited training data
Correct answer
BInsufficient computing power, exponential search, and limited information
Explanation
Early AI faced far less computing power than today, problems involving exponential search, and insufficient information or experience for tasks such as translation.
- A
- 5
Why could additional computation alone not solve early machine translation?
- A
Translation depends exclusively on faster processors rather than information
- B
Translation is impossible for systems that use mathematical representations
- C
Translation requires learning a language and its contextual subtleties
- D
Translation can be solved only by increasing the number of search branches
Correct answer
CTranslation requires learning a language and its contextual subtleties
Explanation
The lecture emphasized that translation is not merely a computation problem; a system must learn the language and experience its subtleties.
- A
- 6
Which contribution emerged from early AI research despite its limited progress toward general intelligence?
- A
The proof that neural networks cannot represent logical relationships
- B
Ideas such as garbage collection and time-sharing in computing
- C
The elimination of the need for abstraction in programming languages
- D
The discovery that all intelligence can be represented by fixed rules
Correct answer
BIdeas such as garbage collection and time-sharing in computing
Explanation
Early AI contributed ideas underlying high-level programming languages, including garbage collection and time-sharing.
- A
- 7
What was the defining approach of expert systems in the 1970s and 1980s?
- A
Using random actions to discover solutions without domain knowledge
- B
Representing every possible real-world situation with a continuous equation
- C
Training multilayer neural networks on massive image datasets
- D
Encoding experts’ knowledge about a narrow domain as rules
Correct answer
DEncoding experts’ knowledge about a narrow domain as rules
Explanation
Expert systems focused on narrow applications and generally encoded expert knowledge as a set of deterministic rules.
- A
- 8
Why did rule-based expert systems eventually face major limitations?
- A
Deterministic rules could not capture all world nuances and required manual maintenance
- B
They were too flexible to represent expert knowledge consistently
- C
They learned too rapidly from data and became impossible to interpret
- D
They depended on neural-network training that was unavailable at the time
Correct answer
ADeterministic rules could not capture all world nuances and required manual maintenance
Explanation
Rule-based knowledge was not rich enough to represent the world’s nuances and required substantial manual effort to maintain.
- A
- 9
What was the significance of the McCulloch–Pitts work from 1943?
- A
It demonstrated that convolutional networks could recognize postal codes
- B
It established gradient descent as an optimization method for AI
- C
It introduced the first expert system for medical diagnosis
- D
It developed a mathematical theory of artificial neural networks
Correct answer
DIt developed a mathematical theory of artificial neural networks
Explanation
McCulloch and Pitts developed a theory of artificial neural networks and mathematically connected neural activity with logic.
- A
- 10
What limitation of single-layer linear classifiers was highlighted by the work on perceptrons?
- A
They cannot classify any examples with two input features
- B
They cannot solve the XOR classification problem
- C
They cannot be expressed using mathematical equations
- D
They cannot produce outputs without a hidden layer
Correct answer
BThey cannot solve the XOR classification problem
Explanation
The lecture identified the inability of linear classifiers to solve XOR as an important result associated with the perceptron analysis.
- A
- 11
What did backpropagation make possible for neural networks?
- A
It restricted neural networks to handwritten-digit recognition
- B
It converted every nonlinear network into a single linear classifier
- C
It provided a general way to train multilayer neural networks
- D
It eliminated the need for data when learning network parameters
Correct answer
CIt provided a general way to train multilayer neural networks
Explanation
Backpropagation enabled the training of multilayer neural networks, overcoming the limited expressive power of single-layer models.
- A
- 12
Why was Yann LeCun’s 1989 convolutional neural network work historically important?
- A
It was the first system to prove that logic and neural networks were identical
- B
It solved general machine translation without language-specific training
- C
It introduced expert systems for converting customer orders into parts
- D
It recognized handwritten digits and was deployed to read postal codes
Correct answer
DIt recognized handwritten digits and was deployed to read postal codes
Explanation
LeCun applied a convolutional neural network to handwritten-digit recognition, and the technology was deployed by the USPS for reading ZIP codes.
- A
- 13
What effect did AlexNet have in 2012?
- A
It introduced the first logical representation of the game of Go
- B
It demonstrated that symbolic rules outperform learning in visual tasks
- C
It produced major gains on ImageNet and transformed computer vision
- D
It ended the use of neural networks in image-processing applications
Correct answer
CIt produced major gains on ImageNet and transformed computer vision
Explanation
AlexNet’s strong ImageNet results helped trigger the major transformation of the computer-vision community under deep learning.
- A
- 14
Which statement best describes the two major intellectual traditions in AI?
- A
One rejects mathematics, while the other rejects empirical evaluation
- B
One studies games exclusively, while the other studies medical diagnosis exclusively
- C
One focuses only on hardware, while the other focuses only on software engineering
- D
One emphasizes logic and symbolic reasoning, while the other is inspired by neuroscience
Correct answer
DOne emphasizes logic and symbolic reasoning, while the other is inspired by neuroscience
Explanation
The lecture contrasted the logical tradition associated with McCarthy with the neuroscience-inspired neural-network tradition.
- A
- 15
Why does AlphaGo illustrate a connection between symbolic and neural approaches?
- A
Neural networks can play Go only after the game is reduced to a linear classifier
- B
AlphaGo uses only manually written rules and does not rely on learned models
- C
Go has no formal rules, so neural networks must invent the game’s legal moves
- D
Go has mathematically precise rules, but neural networks can learn to play it extremely well
Correct answer
DGo has mathematically precise rules, but neural networks can learn to play it extremely well
Explanation
The rules of Go can be formally specified using logic, yet neural networks provide the learned capabilities needed for very strong play.
- A
- 16
How does AI relate to fields such as statistics, economics, and optimization?
- A
AI combines techniques that were often developed independently in other fields
- B
AI replaces techniques from other fields rather than combining them
- C
AI developed all of these techniques internally before other fields adopted them
- D
AI uses statistics but has no meaningful connection to optimization or economics
Correct answer
AAI combines techniques that were often developed independently in other fields
Explanation
The lecture described AI as a melting pot that combines ideas such as maximum likelihood, game theory, optimization, and gradient descent.
- A
- 17
What is the difference between the agent view and the tool view of AI?
- A
The agent view focuses on narrow tasks, while the tool view rejects practical applications
- B
The agent view seeks to recreate intelligence, while the tool view seeks to benefit society
- C
The agent view concerns data collection, while the tool view concerns mathematical proofs
- D
The agent view studies only software, while the tool view studies only hardware
Correct answer
BThe agent view seeks to recreate intelligence, while the tool view seeks to benefit society
Explanation
The agent view asks how to create or recreate intelligence; the tool view asks how technology can be used to help people and society.
- A
- 18
Which capability is an example of declarative knowledge?
- A
Knowing how to coordinate movements while walking
- B
Knowing how to grasp a cup without spilling it
- C
Knowing that Paris is the capital of France
- D
Knowing how to ride a bicycle
Correct answer
CKnowing that Paris is the capital of France
Explanation
Declarative knowledge concerns facts about the world, such as the capital of France.
- A
- 19
Which capability is an example of procedural knowledge?
- A
Knowing that a certain object is visible
- B
Knowing how to ride a bicycle
- C
Knowing that Paris is the capital of France
- D
Knowing that a particular city is hot
Correct answer
BKnowing how to ride a bicycle
Explanation
Procedural knowledge concerns how to perform an activity, such as riding a bicycle.
- A
- 20
What role does learning play in human-like intelligence?
- A
It allows systems to acquire capabilities through experience rather than having them fully specified at birth
- B
It prevents systems from applying knowledge to new situations
- C
It ensures that systems need only one example for every possible task
- D
It replaces perception, language, and reasoning with fixed reflexes
Correct answer
AIt allows systems to acquire capabilities through experience rather than having them fully specified at birth
Explanation
Humans are not born with all their capabilities; they have the capacity to acquire them through experience and learning.
- A
- 21
What most clearly distinguishes current narrow AI systems from humans, according to the lecture?
- A
AI systems cannot optimize any task, while humans can optimize every task perfectly
- B
AI systems and humans operate in essentially identical learning regimes
- C
AI systems often excel at specific tasks using enormous data, while humans handle diverse tasks from few examples
- D
AI systems learn broadly from few examples, while humans require millions of examples for each task
Correct answer
CAI systems often excel at specific tasks using enormous data, while humans handle diverse tasks from few examples
Explanation
Current systems typically specialize in narrow tasks and use millions or billions of examples, whereas humans learn diverse tasks from relatively few examples.
- A
- 22
What is an adversarial example in an AI system?
- A
A training example that contains more information than the model can store
- B
A randomly selected example used to measure ordinary generalization
- C
A human explanation that corrects a model’s prediction after deployment
- D
An intentionally modified input that causes a model to make an incorrect prediction
Correct answer
DAn intentionally modified input that causes a model to make an incorrect prediction
Explanation
Adversarial examples are inputs altered in ways that can fool systems, such as causing face-recognition or stop-sign classifiers to misidentify objects.
- A
- 23
What problem did the translation example involving Malay illustrate?
- A
A model becomes unbiased when trained on data produced by society
- B
A model’s predictions are independent of the data used to train it
- C
A model cannot process languages that use alphabetic writing systems
- D
A model can reproduce societal gender biases present in its training data
Correct answer
DA model can reproduce societal gender biases present in its training data
Explanation
The translation system associated nursing with “she” and programming with “he,” illustrating how social biases can enter models through data.
- A
- 24
Why can different definitions of fairness conflict mathematically?
- A
Different fairness criteria may each seem reasonable but cannot all be satisfied simultaneously
- B
Fairness can always be achieved by assigning identical predictions to everyone
- C
Fairness has one universally accepted mathematical definition in every context
- D
Fairness criteria conflict only when models use no data
Correct answer
ADifferent fairness criteria may each seem reasonable but cannot all be satisfied simultaneously
Explanation
The lecture emphasized that different notions of fairness may appear reasonable from first principles while being mathematically incompatible.
- A
- 25
What is the modeling–inference–learning paradigm intended to provide?
- A
A replacement for all programming and mathematical analysis
- B
A fixed neural-network architecture for every AI application
- C
A principled structure for approaching complex real-world AI problems
- D
A procedure that avoids simplifying the real world into mathematical form
Correct answer
CA principled structure for approaching complex real-world AI problems
Explanation
The paradigm provides a structured way to move from complex real-world problems to models, computations, and learned parameters.
- A
- 26
What is a model in the modeling–inference–learning paradigm?
- A
A mathematically precise simplification of a complicated real-world situation
- B
A complete copy of every detail in the real world
- C
A programming language that automatically solves every problem
- D
A collection of predictions made without any underlying assumptions
Correct answer
AA mathematically precise simplification of a complicated real-world situation
Explanation
A model simplifies reality while retaining a mathematically precise structure that can be processed computationally.
- A
- 27
Why must modeling involve deciding which information to retain?
- A
A model should discard information randomly to avoid introducing assumptions
- B
A model necessarily discards information, so useful details must be selected carefully
- C
A model becomes mathematically precise only when it includes all observations
- D
A model can preserve every real-world detail without computational cost
Correct answer
BA model necessarily discards information, so useful details must be selected carefully
Explanation
Modeling requires simplification, so the modeler must determine which information matters and which can be discarded.
- A
- 28
How could finding a route through a city be represented as a graph model?
- A
Locations are outputs, connections are training examples, and costs are model parameters
- B
Locations are variables, connections are probability distributions, and costs are omitted
- C
Locations are edge weights, connections are nodes, and costs are assigned to routes only
- D
Locations are nodes, connections are edges, and travel costs are assigned to edges
Correct answer
DLocations are nodes, connections are edges, and travel costs are assigned to edges
Explanation
In the example, nodes represent points in the city, edges represent possible travel between points, and edge weights represent costs.
- A
- 29
What does inference mean in this framework?
- A
Replacing a model with a collection of manually written instructions
- B
Estimating model parameters directly from raw data without a model
- C
Asking questions about a model and computing answers from its structure
- D
Choosing which real-world details should be discarded during modeling
Correct answer
CAsking questions about a model and computing answers from its structure
Explanation
Inference involves asking questions about a model, such as finding the shortest path in a weighted graph.
- A
- 30
What is the purpose of learning in the modeling–inference–learning paradigm?
- A
To estimate model parameters from data rather than manually specifying every detail
- B
To answer model queries without performing any computation
- C
To guarantee that the model preserves every feature of reality
- D
To remove the need for a model before making predictions
Correct answer
ATo estimate model parameters from data rather than manually specifying every detail
Explanation
Learning fills in the parameters of a model using data, avoiding the need to manually encode all relevant information.
- A
- 31
What is the central benefit of machine learning described in software-engineering terms?
- A
It eliminates the need for code by storing only raw observations
- B
It moves all data complexity into a larger hand-written rule set
- C
It moves complexity from manually written code into data
- D
It replaces generalization with memorization of the training examples
Correct answer
CIt moves complexity from manually written code into data
Explanation
Machine learning can use large amounts of naturally collected data with relatively less code instead of requiring huge manually written rule systems.
- A
- 32
What does generalization mean in machine learning?
- A
Memorizing every example so that no prediction is uncertain
- B
Using a model only on the exact data from which it was learned
- C
Reducing the training error without considering future inputs
- D
Performing well on new experiences rather than merely fitting the training data
Correct answer
DPerforming well on new experiences rather than merely fitting the training data
Explanation
The key goal is performance on new experiences, not merely performance on the examples used to fit the model.
- A
- 33
Which description best fits a reflex model?
- A
It explicitly searches through future states before producing an action
- B
It stores uncertain dependencies between variables over time
- C
It applies a fixed set of computations directly from input to output
- D
It assigns values to variables subject to a collection of constraints
Correct answer
CIt applies a fixed set of computations directly from input to output
Explanation
Reflex models perform a fixed computation from input to output without explicitly planning through possible future states.
- A
- 34
Which pair consists of examples of reflex models?
- A
Linear classifiers and deep neural networks
- B
Adversarial games and stochastic navigation
- C
Shortest-path search and chess planning
- D
Constraint satisfaction and Bayesian networks
Correct answer
ALinear classifiers and deep neural networks
Explanation
The lecture gave linear classifiers and deep neural networks as examples of reflex models.
- A
- 35
When is a state-based model especially appropriate?
- A
When the system must respond without representing any situation
- B
When all dependencies are soft and represented by probability distributions
- C
When situations can be represented as states connected by actions
- D
When a solution is only an assignment to variables with no meaningful sequence
Correct answer
CWhen situations can be represented as states connected by actions
Explanation
State-based models represent possible situations as states and actions as transitions between those states.
- A
- 36
Which application is naturally suited to a state-based model?
- A
Representing a Sudoku solution only as simultaneous variable assignments
- B
Estimating a soft dependency between noisy sensor variables
- C
Encoding a fixed relationship between input features and an output label
- D
Planning moves in a game or navigating through a physical environment
Correct answer
DPlanning moves in a game or navigating through a physical environment
Explanation
Games, robotics, motion planning, and navigation involve situations and actions that change one state into another.
- A
- 37
What distinguishes a search problem from an adversarial game in state-based modeling?
- A
In search, the objective is classification, whereas adversarial games require no strategy
- B
In search, states do not exist, whereas adversarial games contain only variables
- C
In search, the agent controls the relevant actions, whereas an adversary actively opposes it in a game
- D
In search, outcomes are always random, whereas adversarial games are always deterministic
Correct answer
CIn search, the agent controls the relevant actions, whereas an adversary actively opposes it in a game
Explanation
Search problems involve controlling the choices needed to find an optimal path, while adversarial games include an opponent trying to defeat the agent.
- A
- 38
How does randomness affect a state-based model?
- A
Randomness removes the need to represent states and actions
- B
Randomness converts every state-based problem into a reflex model
- C
Randomness means the model contains only deterministic hard constraints
- D
Actions or transitions may have uncertain outcomes, such as traffic or dice rolls
Correct answer
DActions or transitions may have uncertain outcomes, such as traffic or dice rolls
Explanation
Stochastic state-based problems include uncertain events such as traffic conditions or dice rolls.
- A
- 39
Why is Sudoku naturally represented as a variable-based model rather than primarily as a state-based model?
- A
Sudoku is solved by a fixed reflex computation with no constraints
- B
Sudoku requires an opponent who actively changes the board after every move
- C
A solution is an assignment of values satisfying constraints, and order of assignments is not central
- D
Sudoku contains no variables because all digits are fixed in advance
Correct answer
CA solution is an assignment of values satisfying constraints, and order of assignments is not central
Explanation
Sudoku is naturally described by assigning values to variables subject to row, column, and sub-block constraints; the sequence of assignments is not essential.
- A
- 40
What is a constraint satisfaction problem?
- A
A probabilistic model containing only soft dependencies
- B
A state-based problem in which every transition has a random outcome
- C
A reflex model that maps images directly to classifications
- D
A variable-based problem in which assignments must satisfy hard constraints
Correct answer
DA variable-based problem in which assignments must satisfy hard constraints
Explanation
Constraint satisfaction problems assign values to variables while obeying hard restrictions, such as preventing one person from being in two places at once.
- A
- 41
What characterizes a Bayesian network in the lecture’s framework?
- A
It is a state-based model with an opponent choosing transitions
- B
It is a reflex model with no internal variables
- C
It is a variable-based model with soft dependencies between variables
- D
It is a constraint model in which every relationship is an absolute prohibition
Correct answer
CIt is a variable-based model with soft dependencies between variables
Explanation
Bayesian networks were described as variable-based models that represent soft dependencies, such as noisy sensor observations.
- A
- 42
In a tracking example using a Bayesian network, what might the variables represent?
- A
Only the final destination, with no intermediate positions or observations
- B
The fixed weights of a linear classifier with no uncertainty
- C
The legal moves available to an opponent in a board game
- D
The positions of a car and sensor readings associated with those positions
Correct answer
DThe positions of a car and sensor readings associated with those positions
Explanation
The example represented car positions over time and sensor readings that provide noisy evidence about those positions.
- A
- 43
What is the main purpose of logic-based systems in the lecture’s example?
- A
To store heterogeneous statements and derive consequences from them
- B
To classify images using millions of labeled examples
- C
To generate predictions without using explicit statements
- D
To replace all reasoning with random sampling
Correct answer
ATo store heterogeneous statements and derive consequences from them
Explanation
The logic system accepted facts and rules, then used them to answer questions and derive consequences.
- A
- 44
If a logic system knows that students are people and that Alice is a student, what can it infer?
- A
Alice is a person
- B
Every person is necessarily a student
- C
Alice is not a person
- D
Alice must live in the same city as every student
Correct answer
AAlice is a person
Explanation
Applying the rule that students are people to the fact that Alice is a student allows the system to infer that Alice is a person.
- A
- 45
Why might a logic system answer “I don’t know” to a question about Bob being a student?
- A
The system automatically assumes that every unknown person is not a student
- B
The system can reason only about facts involving cities and weather
- C
Neither the fact nor a rule deriving that fact is present in its knowledge
- D
The system rejects all questions that contain a person’s name
Correct answer
CNeither the fact nor a rule deriving that fact is present in its knowledge
Explanation
A logic system does not need to classify an unmentioned fact as true or false; it may simply lack sufficient information.
- A
- 46
What advantage of logic systems was emphasized compared with many typical machine-learning systems?
- A
They perform only one narrowly defined task after training
- B
They are guaranteed to handle every real-world ambiguity without brittleness
- C
They require millions of examples before using any new statement
- D
A single statement can support many logically related conclusions
Correct answer
DA single statement can support many logically related conclusions
Explanation
Logic systems can accept a statement once and derive its ramifications and consequences, although they may be brittle.
- A
- 47
What is discrete optimization concerned with?
- A
Classifying inputs using a fixed computation with no objective function
- B
Finding the best object from a discrete set, such as a minimum-cost path
- C
Finding the best real-valued vector under a differentiable objective only
- D
Estimating probabilities without comparing candidate solutions
Correct answer
BFinding the best object from a discrete set, such as a minimum-cost path
Explanation
Discrete optimization seeks the best discrete object, such as the path with minimum cost among many possible paths.
- A
- 48
Why is dynamic programming useful for many discrete optimization problems?
- A
It evaluates every possible complete solution independently
- B
It expresses a complex problem through smaller overlapping subproblems
- C
It avoids defining base cases or recurrence relationships
- D
It works only when the number of candidate paths is already small
Correct answer
BIt expresses a complex problem through smaller overlapping subproblems
Explanation
Dynamic programming reduces a complex problem to simpler subproblems and reuses solutions to overlapping subproblems.
- A
- 49
What is continuous optimization?
- A
Assigning discrete labels while satisfying hard logical constraints
- B
Searching through an opponent’s possible moves in a game
- C
Finding a real-valued vector that minimizes or maximizes an objective function
- D
Finding a path through a finite graph without assigning numerical parameters
Correct answer
CFinding a real-valued vector that minimizes or maximizes an objective function
Explanation
Continuous optimization seeks the best vector of real numbers according to an objective function.
- A
- 50
What does gradient descent do at each iteration?
- A
It selects a random parameter value without evaluating the objective
- B
It moves the parameters in the direction of greatest increase
- C
It moves the parameters opposite the direction of the gradient
- D
It enumerates every possible parameter vector before choosing one
Correct answer
CIt moves the parameters opposite the direction of the gradient
Explanation
The gradient points in the direction of increase, so gradient descent subtracts a scaled gradient to move toward lower objective values.
- A
- 51
What role does the step size play in gradient descent?
- A
It controls how far the parameters move in response to the gradient
- B
It changes a continuous optimization problem into a discrete one
- C
It guarantees that the objective is globally convex
- D
It determines which training examples are included in the objective
Correct answer
AIt controls how far the parameters move in response to the gradient
Explanation
The step size, denoted by �eta in the lecture, scales each update and helps control the size of parameter movements.
- A
- 52
What is the edit distance between two identical strings?
- A
One, because one comparison is required
- B
The square of the string length, because all alignments must be checked
- C
The length of the string, because every character must be replaced
- D
Zero, because no edits are needed
Correct answer
DZero, because no edits are needed
Explanation
Edit distance counts the minimum number of insertions, deletions, and substitutions needed to transform one string into another. Identical strings require no edits.
- A
- 53
Which operations are allowed in the edit-distance problem described?
- A
Only insertion and deletion of complete words
- B
Insertion, deletion, and substitution of characters
- C
Only substitution of characters at matching positions
- D
Transposition, reversal, sorting, and duplication of substrings
Correct answer
BInsertion, deletion, and substitution of characters
Explanation
The described edit operations are inserting a character, deleting a character, or substituting one character for another.
- A
- 54
What recurrence subproblem is used in the edit-distance algorithm?
- A
The distance between the first m characters of one string and the first n characters of the other
- B
The distance between only the two complete strings after every possible edit sequence
- C
The distance between the first character of one string and the last character of the other
- D
The number of unique characters appearing in either string
Correct answer
AThe distance between the first m characters of one string and the first n characters of the other
Explanation
The recurrence is defined on prefixes: the first m characters of one string and the first n characters of the other.
- A
- 55
What is the edit distance between an empty string and a string of length n?
- A
n
- B
0
- C
1
- D
n2
Correct answer
An
Explanation
Transforming an empty string into a string of length n requires inserting all n characters, so the distance is n.
- A
- 56
What happens in the edit-distance recurrence when the current characters match?
- A
The recurrence deletes both characters and adds cost 2
- B
The recurrence removes both matching characters without adding an edit cost
- C
The recurrence substitutes one matching character for the other at cost 1
- D
The recurrence branches into insertion, deletion, and substitution cases
Correct answer
BThe recurrence removes both matching characters without adding an edit cost
Explanation
Matching final characters can be removed from consideration without an edit, reducing the subproblem to prefixes of lengths m−1 and n−1.
- A
- 57
When the current characters differ, which three choices are considered in the edit-distance recurrence?
- A
Comparing the next three characters, skipping the strings, and restarting
- B
Keeping both characters, deleting both, and halting the computation
- C
Substitution, deletion from one string, and insertion relative to the other
- D
Sorting, reversing, and copying the remaining suffix
Correct answer
CSubstitution, deletion from one string, and insertion relative to the other
Explanation
When characters differ, the recurrence considers substitution, deletion, and insertion, each with an edit cost.
- A
- 58
Why does the edit-distance recurrence take the minimum of its alternatives?
- A
Every possible edit sequence has the same cost
- B
Taking the minimum eliminates the need for base cases
- C
The goal is to find the least costly sequence of edits
- D
The maximum branch always represents the most accurate alignment
Correct answer
CThe goal is to find the least costly sequence of edits
Explanation
Edit distance is defined as the minimum number of edits, so the recurrence chooses the least costly among the available operations.
- A
- 59
Why is a naive recursive edit-distance implementation slow?
- A
It repeatedly solves the same subproblems, creating an exponential recursion tree
- B
It uses too few recursive calls to explore valid edit sequences
- C
It evaluates only the base cases and skips the recursive cases
- D
It performs no comparisons between corresponding characters
Correct answer
AIt repeatedly solves the same subproblems, creating an exponential recursion tree
Explanation
Each nonmatching subproblem can branch into several recursive calls, and many resulting subproblems are duplicated, producing exponential behavior.
- A
- 60
How does memoization improve the recursive edit-distance algorithm?
- A
It explores more recursion branches to improve the final answer
- B
It stores each solved subproblem so later calls can reuse its result
- C
It removes all base cases and estimates their values statistically
- D
It changes character edits into fixed-length word substitutions
Correct answer
BIt stores each solved subproblem so later calls can reuse its result
Explanation
Memoization caches results indexed by the subproblem parameters, such as (m,n), so each subproblem is computed only once.
- A
- 61
What is the objective in the least-squares regression example?
- A
To maximize the number of points lying exactly on the fitted line
- B
To minimize the sum of squared prediction errors over the training points
- C
To minimize the absolute number of training points regardless of predictions
- D
To choose the steepest possible line through the origin
Correct answer
BTo minimize the sum of squared prediction errors over the training points
Explanation
Least squares measures the error at each point, squares the error, and sums these squared errors over all training examples.
- A
- 62
In the simplified regression example, what does the parameter w represent?
- A
The slope of a line constrained to pass through the origin
- B
The squared error for the first training example
- C
The vertical intercept of a line with fixed slope
- D
The number of training points in the dataset
Correct answer
AThe slope of a line constrained to pass through the origin
Explanation
The model predicts using wx, so w is the slope of the line, with the intercept fixed at zero.
- A
- 63
For a training point (xi,yi), what prediction does the regression model make?
- A
wxi2
- B
xi−yi
- C
w+yi
- D
wxi
Correct answer
Dwxi
Explanation
With a line through the origin, the model’s prediction for input xi is wxi.
- A
- 64
What does an objective value of zero mean in the least-squares example?
- A
The model has made the largest possible prediction error
- B
The model contains no adjustable parameters
- C
The model’s predictions match all training targets exactly
- D
The model has not been evaluated on any training points
Correct answer
CThe model’s predictions match all training targets exactly
Explanation
Because squared errors are nonnegative, an objective of zero means every prediction error is zero.
- A
- 65
What is the derivative of the squared error (wxi−yi)2 with respect to w?
- A
2(wxi−yi)xi
- B
2wxi−yi
- C
2(wxi−yi)yi
- D
(wxi−yi)2xi
Correct answer
A2(wxi−yi)xi
Explanation
Applying the chain rule gives 2(wxi−yi) multiplied by the derivative of wxi−yi with respect to w, which is xi.
- A
- 66
Why is the derivative of a sum of squared errors computed by summing individual derivatives?
- A
The squared terms cancel before differentiation is performed
- B
Differentiation is linear, so the derivative of a sum is the sum of the derivatives
- C
Only the first training point contributes to the derivative of the objective
- D
The derivative of a sum is always the product of individual derivatives
Correct answer
BDifferentiation is linear, so the derivative of a sum is the sum of the derivatives
Explanation
The derivative operator distributes over sums, allowing the total gradient to be computed by summing each point’s contribution.
- A
- 67
What happened to the regression parameter in the numerical example after gradient descent?
- A
It diverged toward infinity while the objective increased
- B
It remained fixed at 0 because the gradient was always zero
- C
It converged toward 0.8 while the objective decreased
- D
It converged toward 7.2, which was the optimal parameter value
Correct answer
CIt converged toward 0.8 while the objective decreased
Explanation
Starting from w=0, the iterations moved through values such as 0.3 and approximately 0.8, while the objective decreased to about 7.2.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.