Unit 2: Search and Knowledge Representation - Practice Quiz

CSE276 — Artificial Intelligence Foundations 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Which data structure is typically used by Breadth First Search (BFS)?

Uninformed search: Breadth First Search and Depth First Search Easy
A. Hash table
B. Stack
C. Queue
D. Priority queue

2 Which data structure is typically used by Depth First Search (DFS)?

Uninformed search: Breadth First Search and Depth First Search Easy
A. Queue
B. Lookup table
C. Priority queue
D. Stack

3 In an unweighted graph, which algorithm finds a shortest path measured by number of edges?

Uninformed search: Breadth First Search and Depth First Search Easy
A. Breadth First Search
B. Depth First Search
C. Hill Climbing
D. Greedy Best First Search

4 What information does Greedy Best First Search mainly use to select the next node?

Informed search: Best First Search Easy
A. Estimated distance to the goal
B. Cost of the previous edge
C. Depth of the current node
D. Number of generated nodes

5 Which data structure is commonly used to store the frontier in Best First Search?

Informed search: Best First Search Easy
A. LIFO stack
B. Priority queue
C. Adjacency matrix
D. FIFO queue

6 Which equation is used as the evaluation function in A* Search?

Hill Climbing and A* Search Easy
A.
B.
C.
D.

7 What does a basic hill-climbing algorithm do at each step?

Hill Climbing and A* Search Easy
A. Chooses the oldest generated state
B. Returns directly to the initial state
C. Moves to a better neighboring state
D. Explores every state at one depth

8 Which problem can cause hill climbing to stop before finding the global optimum?

Hill Climbing and A* Search Easy
A. Breadth expansion
B. Uniform edge cost
C. Local optimum
D. FIFO ordering

9 What is the main purpose of a heuristic function in search?

Heuristic functions Easy
A. Estimate the remaining cost
B. Generate random goal states
C. Store all visited states
D. Count every graph edge

10 What does an admissible heuristic guarantee?

Heuristic functions Easy
A. It always equals the true cost
B. It ignores the goal completely
C. It produces only negative costs
D. It never overestimates the true cost

11 Which search method usually requires less memory than BFS when exploring a deep search tree?

Comparison and applications of search algorithms Easy
A. Depth First Search
B. Bidirectional Search
C. Breadth First Search
D. Uniform Cost Search

12 Which algorithm is well suited to finding minimum-move solutions in an unweighted puzzle?

Comparison and applications of search algorithms Easy
A. Simple Hill Climbing
B. Depth First Search
C. Greedy Best First Search
D. Breadth First Search

13 What is the main goal of knowledge representation in artificial intelligence?

Knowledge representation Easy
A. Compress every program file
B. Replace all search algorithms
C. Increase the computer clock speed
D. Store knowledge in a usable form

14 In a semantic network, what do nodes usually represent?

Semantic networks and frames Easy
A. Probability calculations
B. Objects or concepts
C. Program execution times
D. Search queue positions

15 In frame-based knowledge representation, where are an object's attributes commonly stored?

Semantic networks and frames Easy
A. Queues
B. Slots
C. Branches
D. Predicates

16 What is the usual form of a production rule?

Production systems and expert systems Easy
A. START node END node
B. QUESTION option ANSWER option
C. IF condition THEN action
D. OBJECT slot VALUE slot

17 Which component of an expert system applies rules to known facts?

Production systems and expert systems Easy
A. Search frontier
B. Data compiler
C. User interface
D. Inference engine

18 Which connective represents logical AND in propositional logic?

Propositional logic and first-order predicate logic Easy
A.
B.
C.
D.

19 Which feature is available in first-order predicate logic but not in basic propositional logic?

Propositional logic and first-order predicate logic Easy
A. Truth values for statements
B. Logical AND operations
C. Logical NOT operations
D. Quantifiers over objects

20 Which expression correctly states Bayes' theorem?

Reasoning under uncertainty using Bayes' theorem Easy
A.
B.
C.
D.

21 A search tree has root . Its children from left to right are and . Node has children and , while node has child . If Breadth First Search tests for the goal when a node is removed from the frontier and is the goal, what is the expansion order?

Uninformed search: Breadth First Search and Depth First Search Medium
A.
B.
C.
D.

22 Depth First Search is applied to a finite graph containing cycles. Which modification is most important for preventing the search from repeatedly following the same cycle?

Uninformed search: Breadth First Search and Depth First Search Medium
A. Expand all nodes at the same depth
B. Store visited states in an explored set
C. Sort successors by increasing path cost
D. Estimate each node's distance to the goal

23 A robot moves through an unweighted maze where every move has cost . Why is Breadth First Search preferred over standard Depth First Search when the goal is to minimize the number of moves?

Uninformed search: Breadth First Search and Depth First Search Medium
A. BFS always stores fewer nodes than DFS
B. BFS finds a shallowest goal before deeper goals
C. BFS uses heuristic estimates for each location
D. BFS avoids expanding every non-goal location

24 Greedy Best First Search has frontier nodes with heuristic values , , , and . Which node will it select next?

Informed search: Best First Search, Hill Climbing and A* Search Medium
A. Node
B. Node
C. Node
D. Node

25 A hill-climbing algorithm reaches a state whose neighboring states all have equal or worse evaluation values, although a better state exists elsewhere. What has most likely occurred?

Informed search: Best First Search, Hill Climbing and A* Search Medium
A. The search reached a local optimum or plateau
B. The heuristic became mathematically inadmissible
C. The search violated breadth-first expansion order
D. The frontier exceeded its predefined memory limit

26 Which strategy most directly improves hill climbing when the search repeatedly becomes trapped in different local maxima?

Informed search: Best First Search, Hill Climbing and A* Search Medium
A. Expand every state at the current search level
B. Restart from several randomly selected states
C. Replace the evaluation function with path depth
D. Remove all previously generated neighboring states

27 A* Search evaluates nodes using . The frontier contains with , with , with , and with . Which node is selected next?

Informed search: Best First Search, Hill Climbing and A* Search Medium
A. Node
B. Node
C. Node
D. Node

28 In A* tree search, what property of a heuristic guarantees that the algorithm can return an optimal solution?

Informed search: Best First Search, Hill Climbing and A* Search Medium
A. It decreases by one after every search action
B. It never overestimates the remaining optimal cost
C. It assigns different values to different states
D. It always returns a positive integer estimate

29 For an edge from state to state with cost , which condition defines a consistent heuristic?

Heuristic functions Medium
A.
B.
C.
D.

30 Two admissible heuristics satisfy for every state , while neither overestimates the true remaining cost. What can generally be concluded for A* Search?

Heuristic functions Medium
A. is more informed and usually expands no more nodes
B. is more informed because its estimates are smaller
C. is inadmissible whenever its estimate exceeds
D. and must expand exactly the same nodes

31 A navigation system must find the least-cost route on a weighted road network and has reliable straight-line distance estimates. Which search algorithm is the most appropriate?

Comparison and applications of search algorithms Medium
A. Depth First Search using a visited set
B. Hill climbing using the nearest city
C. A* Search using distance as a heuristic
D. Breadth First Search using road count

32 A state space has a very large branching factor, solutions may be deep, and memory is severely limited. Finding any solution is more important than finding the shortest one. Which algorithm is the best basic choice?

Comparison and applications of search algorithms Medium
A. Uniform-cost Search
B. Breadth First Search
C. Bidirectional BFS
D. Depth First Search

33 An AI system must represent that a particular patient has symptoms, that diseases belong to broader disease categories, and that categories share inherited properties. Which representation feature is most useful?

Knowledge representation Medium
A. Observations represented only as isolated Boolean values
B. States arranged only by their numerical path costs
C. Entities linked by relations and class hierarchies
D. Actions stored only as unordered text fragments

34 In a semantic network, Canary is linked to Bird by an IS-A relation, and Bird has the property has-wings. What can normally be inferred about a canary?

Semantic networks and frames Medium
A. Every winged object must be a canary
B. A canary becomes identical to every bird
C. A canary inherits the property has-wings
D. The IS-A relation removes bird properties

35 A Bird frame has a default slot can-fly = true, while a Penguin frame inherits from Bird and sets can-fly = false. What value should an instance of Penguin use?

Semantic networks and frames Medium
A. false, because the specialized frame overrides the default
B. true, because inherited values cannot be replaced
C. both, because frame slots retain every inherited value
D. unknown, because the two slot values must be discarded

36 A production system has two enabled rules: R1: IF fever THEN investigate infection and R2: IF fever AND rash THEN investigate measles. The facts include both fever and rash. If conflict resolution prefers the most specific rule, which rule fires?

Production systems and expert systems Medium
A. R1, because it contains fewer conditions
B. Both rules, because specificity is ignored
C. R2, because it contains more conditions
D. Neither rule, because their conclusions differ

37 In an expert system, which component applies rules from the knowledge base to known facts in order to derive conclusions?

Production systems and expert systems Medium
A. User interface
B. Knowledge editor
C. Inference engine
D. Explanation display

38 Given the propositions and , which conclusion follows by modus tollens?

Propositional logic and first-order predicate logic Medium
A.
B.
C.
D.

39 Which first-order logic formula correctly represents the statement "Every student studies at least one subject"?

Propositional logic and first-order predicate logic Medium
A.
B.
C.
D.

40 A disease affects of a population. A test has sensitivity and a false-positive rate of . Approximately what is the probability that a person has the disease given a positive result?

Reasoning under uncertainty using Bayes' theorem Medium
A.
B.
C.
D.

41 Breadth-first graph search starts at . Successors are generated left to right: , , , and have no successors. States are marked visited when enqueued, and the goal test is applied when a state is dequeued. Which result is correct?

Uninformed search: Breadth First Search and Depth First Search Hard
A. The expansion order is , and the returned path is .
B. The expansion order is , and the returned path is .
C. The expansion order is , and the returned path is .
D. The expansion order is , and the returned path is .

42 A search tree has a goal at depth , but the first child of the root begins an infinite branch containing no goal. What is the strongest correct statement about standard depth-first tree search and depth-first graph search?

Uninformed search: Breadth First Search and Depth First Search Hard
A. Both searches are complete because the goal is located at a finite depth.
B. Tree search may never reach the goal; graph search is complete whenever repeated states are removed.
C. Tree search must reach the goal; graph search may fail only when repeated-state detection is disabled.
D. Tree search may never reach the goal; graph search also may fail if the infinite branch has infinitely many distinct states.

43 Greedy best-first search uses only . From , edge costs with , and edge costs with . Edges and cost and , respectively, with . Even though all listed heuristic values are admissible, which path is returned?

Informed search: Best First Search Hard
A. with cost , because the frontier combines both branches.
B. with cost , because accumulated cost breaks the initial tie.
C. with cost , because is selected before .
D. with cost , because admissibility guarantees optimality.

44 A hill-climbing algorithm maximizes an evaluation function. At state , every neighbor has the same value as , but a higher-valued state is reachable after three sideways moves. The algorithm permits at most two consecutive sideways moves. Which conclusion follows?

Hill Climbing and A* Search Hard
A. It becomes complete because the plateau contains a finite improving path.
B. It must reach the higher-valued state because sideways moves preserve value.
C. It becomes optimal if previously visited plateau states are never revisited.
D. It can terminate on the plateau before reaching the higher-valued state.

45 Consider A* graph search that never reopens a closed state. Edges are , , , and . Let , , and . What can happen?

Hill Climbing and A* Search Hard
A. A* returns with cost because consistency is irrelevant in graph search.
B. A* returns with cost because the admissible heuristic is inconsistent.
C. A* returns with cost because admissibility alone prevents closure errors.
D. A* returns with cost because overestimates the remaining cost.

46 A* uses with a consistent heuristic and nonnegative edge costs. Which goal-termination rule preserves optimality in standard graph search?

Hill Climbing and A* Search Hard
A. Terminate when every immediate predecessor of a goal has been expanded.
B. Terminate when a goal has the smallest heuristic value on OPEN.
C. Terminate when a goal is first generated as a successor of any state.
D. Terminate when a goal is removed from OPEN as the minimum- state.

47 A heuristic is defined as the optimal remaining cost in a relaxed problem obtained by removing constraints while retaining corresponding actions at the same or lower costs. Which property necessarily follows?

Heuristic functions Hard
A. is exact because removed constraints cannot alter an optimal solution.
B. is admissible because every original solution is feasible in the relaxation.
C. dominates every admissible heuristic constructed from another relaxation.
D. is inadmissible because relaxed paths can be cheaper than original paths.

48 A uniform unweighted problem has branching factor , a unique known goal, and an optimal solution depth . Under which conditions can bidirectional BFS reduce the dominant time from to approximately ?

Comparison and applications of search algorithms Hard
A. Predecessors can be generated, both frontiers use visited sets, and intersection is detected correctly.
B. Successors have unit cost, DFS controls both frontiers, and duplicate states are retained.
C. Actions are irreversible, both frontiers use queues, and intersection is checked only at depth .
D. The heuristic is consistent, the goal depth is unknown, and only one frontier stores visited states.

49 Which first-order formula correctly represents: "Every researcher reviews at least one paper," allowing different researchers to review different papers?

Knowledge representation Hard
A.
B.
C.
D.

50 A knowledge base contains no statement about whether patient has allergy . How do open-world and closed-world reasoning differ?

Knowledge representation Hard
A. Open-world reasoning infers the allergy; closed-world reasoning normally treats it as unknown.
B. Open-world reasoning treats the allergy as unknown; closed-world reasoning normally infers its negation.
C. Both forms treat it as unknown unless an explicit negation is stored in the knowledge base.
D. Both forms infer the negation because the allergy cannot be proved from stored facts.

51 In a semantic network, AmphibiousVehicle inherits maximumSpeed = 120 from Vehicle and maximumSpeed = 15 from Watercraft. Neither superclass is more specific than the other. What is the soundest treatment?

Semantic networks and frames Hard
A. Select because inheritance from the first asserted superclass has logical priority.
B. Mark the inherited values as conflicting until an explicit priority or local value resolves them.
C. Average the inherited values because multiple inheritance combines quantitative slots.
D. Select because the numerically smaller inherited value is the safer default.

52 A Bird frame provides the default slot canFly = true, while a Penguin frame is a subclass with canFly = false. An instance Pingo belongs to Penguin. Which value should normal default inheritance produce?

Semantic networks and frames Hard
A. false, because the more specific frame overrides the inherited default.
B. Both values, because frame systems cannot override inherited slot values.
C. Unknown, because defaults may never be applied to individual frame instances.
D. true, because superclass slots are inherited before subclass slots are examined.

53 A forward-chaining production system repeatedly fires R1: IF A THEN B even though is already present and no working-memory facts have changed. Which mechanism most directly prevents this redundant refiring?

Production systems and expert systems Hard
A. Refraction, which blocks the same rule instantiation until relevant facts change.
B. Recency, which always prefers rules matching the newest working-memory elements.
C. Backward chaining, which removes conclusions that are not currently requested as goals.
D. Specificity, which always prefers rules containing the greatest number of conditions.

54 An expert system reaches a diagnosis through rules , , and . A user asks why a particular symptom question is being asked before answering it. Which subsystem should provide the response?

Production systems and expert systems Hard
A. The explanation facility, using the current inference goal and supporting rule chain.
B. The working-memory manager, by deleting facts unrelated to the requested diagnosis.
C. The conflict-resolution module, by listing every rule currently stored in the system.
D. The knowledge-acquisition facility, by requesting a new rule from the domain expert.

55 Using standard first-order unification with the occurs check, what is the result of attempting to unify with ?

Propositional logic and first-order predicate logic Hard
A. Unification fails because function symbols and may never coexist.
B. The most general unifier is .
C. The most general unifier is .
D. Unification fails because it would require the cyclic substitution .

56 Consider the clauses , , , and . Which resolution strategy derives the empty clause?

Propositional logic and first-order predicate logic Hard
A. Derive from the first two clauses, then resolve it directly with .
B. Derive from the first and third clauses, derive from the second and fourth, then resolve them.
C. Derive from the last two clauses, then resolve it with the first clause.
D. Derive from the first and third clauses, derive from the second and fourth, then resolve them.

57 A propositional knowledge base contains , , and . Which statement is entailed?

Propositional logic and first-order predicate logic Hard
A. , because every implication entails at least one of its consequents.
B. , because is false while the first implication remains true.
C. , because assuming forces , contradicting .
D. , because both implications can be applied in the reverse direction.

58 Which formula is logically equivalent to ?

Propositional logic and first-order predicate logic Hard
A.
B.
C.
D.

59 A disease has prevalence . A test has sensitivity and specificity . What is ?

Reasoning under uncertainty using Bayes' theorem Hard
A.
B.
C.
D.

60 Let . Evidence variables and are conditionally independent given both and . Suppose , , , and . What is ?

Reasoning under uncertainty using Bayes' theorem Hard
A. , because conditional independence makes both observations certainly reliable.
B. , because the prior odds are multiplied by likelihood ratios and .
C. , because the prior odds cancel the product of the likelihood ratios.
D. , because the two likelihood ratios are added to the prior probability.