Q31
Q31 Which of the following algorithms uses a priority queue to manage the exploration of nodes?
Depth-first search
Breadth-first search
A* search
Hill climbing
Q32
Q32 What role does the heuristic function play in the A* search algorithm?
It ensures optimality
It estimates the cost to reach the goal
It guarantees completeness
It defines the search space
Q33
Q33 How would you implement a basic depth-first search (DFS) in Python?
Use a queue for node storage
Use a stack for node storage
Use a priority queue for node storage
Use a list for node storage
Q34
Q34 Which Python library can be used to implement search algorithms like A*?
matplotlib
networkx
Pandas
NumPy
Q35
Q35 What is the basic structure of a recursive depth-first search (DFS) in Python?
A loop to iterate through nodes
A function that calls itself
A priority queue
A global variable to track nodes
Q36
Q36 How would you modify a breadth-first search (BFS) algorithm to find the shortest path in an unweighted graph?
Add a heuristic function
Use a priority queue
Track the depth of each node
Use a stack
Q37
Q37 Your A* search algorithm is not finding the optimal solution. What could be wrong?
The heuristic is overestimating
The priority queue is too small
The graph is weighted
The nodes are not sorted
Q38
Q38 Your DFS algorithm is running indefinitely in a large graph. What is the likely issue?
The graph is cyclic
The stack is not large enough
The nodes are not connected
The algorithm is using a queue
Q39
Q39 Your greedy best-first search algorithm is not finding a valid solution. What might be the cause?
The heuristic function is not admissible
The search space is too large
The graph is unweighted
The algorithm is too simple
Q40
Q40 What is knowledge representation in AI?
The process of storing data
The way knowledge is organized and structured
A method to optimize algorithms
A programming language
Q41
Q41 Which of the following is a key characteristic of good knowledge representation?
Ambiguity
Compactness
Incompleteness
Complexity
Q42
Q42 What is the primary advantage of using semantic networks for knowledge representation?
They use a symbolic structure
They provide graphical representations
They store data in tables
They are easy to update
Q43
Q43 In knowledge representation, what does a frame represent?
A sequence of events
A static data structure
An organized set of facts
A loop in a program
Q44
Q44 What is the key difference between propositional logic and predicate logic in knowledge representation?
Propositional logic uses variables
Predicate logic uses variables and quantifiers
Propositional logic is graphical
Predicate logic cannot handle negation
Q45
Q45 Which of the following is a limitation of using rule-based systems for knowledge representation?
They are too complex
They cannot handle uncertainty
They require large databases
They are easy to maintain
Q46
Q46 Which of the following is an advantage of ontologies in knowledge representation?
They provide a universal truth
They enable data sharing and reuse
They simplify reasoning
They eliminate all ambiguities
Q47
Q47 In Python, which library would you use to work with ontologies and semantic networks?
NumPy
NetworkX
RDFlib
TensorFlow
Q48
Q48 How would you represent a simple knowledge base in Python using a dictionary?
Use a list of tuples
Use nested dictionaries
Use a string
Use a NumPy array
Q49
Q49 How would you implement a frame-based system in Python?
Use a list of lists
Use object-oriented programming
Use a set of rules
Use a single dictionary
Q50
Q50 Which Python library can be used to query a knowledge base represented as a graph?
Pandas
Scikit-learn
RDFlib
PyTorch
Q51
Q51 Your rule-based AI system is not handling exceptions correctly. What could be the issue?
The rules are too specific
There are too many rules
The system lacks a default rule
The rules are incorrect
Q52
Q52 Your frame-based system is not reasoning correctly. What could be the issue?
The frames are nested too deeply
The system is not using inference
The frames lack sufficient data
The frames are too complex
Q53
Q53 Your ontology-based AI is not finding relationships between concepts. What could be the cause?
The ontology is incomplete
The system is using the wrong algorithm
The concepts are unrelated
The graph is not connected
Q54
Q54 What is the primary goal of machine learning?
To write rules to solve problems
To enable computers to learn from data
To perform complex calculations
To create new programming languages
Q55
Q55 Which of the following is a type of supervised learning?
K-means clustering
Decision trees
Autoencoders
PCA
Q56
Q56 What is the difference between supervised and unsupervised learning?
Supervised learning uses labeled data, unsupervised does not
Unsupervised learning uses labeled data, supervised does not
Both use labeled data
Both use unlabeled data
Q57
Q57 Which machine learning algorithm is best suited for predicting continuous values?
Decision trees
K-means
Linear regression
Naive Bayes
Q58
Q58 In machine learning, what is the purpose of cross-validation?
To evaluate model performance
To prevent underfitting
To improve training speed
To collect more data
Q59
Q59 Which of the following is a common problem in machine learning models when training on imbalanced data?
Overfitting
Underfitting
Bias
Class imbalance
Q60
Q60 What is the difference between batch learning and online learning in machine learning?
Batch learning updates the model continuously
Online learning updates the model only once
Batch learning updates the model after seeing all data
Online learning processes the entire dataset at once