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. Queue
C. Priority queue
D. Stack

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. Priority queue
C. Stack
D. Lookup table

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. Depth First Search
B. Greedy Best First Search
C. Breadth First Search
D. Hill Climbing

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

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

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

Informed search: Best First Search Easy
A. Priority queue
B. Adjacency matrix
C. LIFO stack
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. Moves to a better neighboring state
B. Chooses the oldest generated state
C. Returns directly to the initial 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. Uniform edge cost
B. Local optimum
C. FIFO ordering
D. Breadth expansion

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. Count every graph edge
D. Store all visited states

10 What does an admissible heuristic guarantee?

Heuristic functions Easy
A. It ignores the goal completely
B. It always equals the true cost
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. Breadth First Search
B. Bidirectional Search
C. Uniform Cost Search
D. Depth First Search

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

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

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

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

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

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

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

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

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. User interface
B. Search frontier
C. Inference engine
D. Data compiler

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. Logical NOT operations
B. Logical AND operations
C. Quantifiers over objects
D. Truth values for statements

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. Store visited states in an explored set
B. Expand all nodes at the same depth
C. Estimate each node's distance to the goal
D. Sort successors by increasing path cost

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 frontier exceeded its predefined memory limit
B. The search reached a local optimum or plateau
C. The heuristic became mathematically inadmissible
D. The search violated breadth-first expansion order

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. Replace the evaluation function with path depth
B. Expand every state at the current search level
C. Remove all previously generated neighboring states
D. Restart from several randomly selected 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 never overestimates the remaining optimal cost
B. It decreases by one after every search action
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 inadmissible whenever its estimate exceeds
B. is more informed because its estimates are smaller
C. is more informed and usually expands no more nodes
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. Hill climbing using the nearest city
B. A* Search using distance as a heuristic
C. Depth First Search using a visited set
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. Breadth First Search
B. Uniform-cost 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. Entities linked by relations and class hierarchies
B. Observations represented only as isolated Boolean values
C. Actions stored only as unordered text fragments
D. States arranged only by their numerical path costs

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 inherits the property has-wings
C. A canary becomes identical to every bird
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. unknown, because the two slot values must be discarded
B. false, because the specialized frame overrides the default
C. true, because inherited values cannot be replaced
D. both, because frame slots retain every inherited value

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. R2, because it contains more conditions
B. Both rules, because specificity is ignored
C. Neither rule, because their conclusions differ
D. R1, because it contains fewer conditions

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. Explanation display
C. Inference engine
D. Knowledge editor

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. Tree search must reach the goal; graph search may fail only when repeated-state detection is disabled.
B. Tree search may never reach the goal; graph search is complete whenever repeated states are removed.
C. Tree search may never reach the goal; graph search also may fail if the infinite branch has infinitely many distinct states.
D. Both searches are complete because the goal is located at a finite depth.

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 is selected before .
B. with cost , because admissibility guarantees optimality.
C. with cost , because accumulated cost breaks the initial tie.
D. with cost , because the frontier combines both branches.

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 can terminate on the plateau before reaching the higher-valued state.
B. It becomes optimal if previously visited plateau states are never revisited.
C. It must reach the higher-valued state because sideways moves preserve value.
D. It becomes complete because the plateau contains a finite improving path.

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 the admissible heuristic is inconsistent.
B. A* returns with cost because admissibility alone prevents closure errors.
C. A* returns with cost because consistency is irrelevant in graph search.
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 removed from OPEN as the minimum- state.
D. Terminate when a goal is first generated as a successor of any 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 admissible because every original solution is feasible in the relaxation.
B. dominates every admissible heuristic constructed from another relaxation.
C. is inadmissible because relaxed paths can be cheaper than original paths.
D. is exact because removed constraints cannot alter an optimal solution.

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. Actions are irreversible, both frontiers use queues, and intersection is checked only at depth .
B. Predecessors can be generated, both frontiers use visited sets, and intersection is detected correctly.
C. Successors have unit cost, DFS controls both frontiers, and duplicate states are retained.
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 treats the allergy as unknown; closed-world reasoning normally infers its negation.
B. Both forms treat it as unknown unless an explicit negation is stored in the knowledge base.
C. Open-world reasoning infers the allergy; closed-world reasoning normally treats it as unknown.
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 the numerically smaller inherited value is the safer default.
B. Mark the inherited values as conflicting until an explicit priority or local value resolves them.
C. Select because inheritance from the first asserted superclass has logical priority.
D. Average the inherited values because multiple inheritance combines quantitative slots.

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. Specificity, which always prefers rules containing the greatest number of conditions.
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. Refraction, which blocks the same rule instantiation until relevant facts change.

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

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. Unification fails because it would require the cyclic substitution .
D. The most general unifier is .

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 and third clauses, derive from the second and fourth, then resolve them.
B. Derive from the last two clauses, then resolve it with the first clause.
C. Derive from the first and third clauses, derive from the second and fourth, then resolve them.
D. Derive from the first two clauses, then resolve it directly with .

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

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

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 two likelihood ratios are added to the prior probability.
C. , because the prior odds are multiplied by likelihood ratios and .
D. , because the prior odds cancel the product of the likelihood ratios.