click below
click below
Normal Size Small Size show me how
Ai midterm
| Question | Answer | |
|---|---|---|
| What data structure does Breadth-First Search (BFS) use? Queue (FIFO) | ||
| Which of the following is true about BFS? Complete and optimal (if all step costs equal) | ||
| Which traversal order represents BFS on this tree? A, B, C, D, E, F, G, H, I, J, K, L, M | ||
| DFS uses which structure to explore nodes? LIFO Stack | ||
| What is a disadvantage of DFS? May revisit nodes infinitely in cycles | ||
| What is the expansion order for DFS (left to right) on this tree? A, B, E, F, C, D | ||
| What is the Fringe in a search algorithm? Set of generated but unexpanded nodes | ||
| Advantage of BFS? Finds shortest path when costs equal | ||
| Disadvantage of BFS? High memory use | ||
| What is Iterative Deepening Search (IDS)? DFS with increasing depth limit | ||
| What is Uniform Cost Search (UCS)? Expands node with lowest path cost | ||
| What does a heuristic function h(n) estimate? Cost from current node to goal | ||
| In the 8-puzzle, if one tile is misplaced, what is h(n)? 1 | ||
| Manhattan Distance counts what type of movement? Horizontal + Vertical | ||
| What is a local maximum in Hill Climbing? Better than neighbors but not global best | ||
| Disadvantage of Hill Climbing? Can get stuck in local maxima | ||
| Displaying the heuristic function shows? Estimated values | ||
| Best-First Search expands? Node with lowest heuristic value | ||
| Best-First Search uses which structure? Priority Queue | ||
| Informed vs Uninformed Search? Heuristics used | ||
| Hill Climbing focuses on? Execution efficiency | ||
| A vector corresponds to which structure? 1D Series | ||
| What type of data can arrays store? Numeric or mixed data | ||
| DataFrame columns can be indexed by? Integers or labels | ||
| What does activity_df.iloc[-3] return? Third from end | ||
| Difference between loc and iloc? loc = label, iloc = position | ||
| Matplotlib is used for? Plotting data | ||
| To plot 'x' vs 'y' we use? plt.bar(x, y) or plt.plot(x, y) | ||
| Pandas DataFrame best described as? 2D labeled data | ||
| iloc[0:3] returns? First 3 rows | ||
| Formula for Euclidean Distance? √((x₁ − x₂)² + (y₁ − y₂)²) | ||