Nepal's open education portal

EduNepalEduNepal

Artificial Intelligence — Complete Course Notes (BCA 7th Sem)

Comprehensive master lecture notes covering state space search, A* heuristic algorithms, Minimax, First Order Logic, Neural Networks, and NLP.

Artificial Intelligence · CACS401 · Semester 7

BCA Curriculum 2079

Unit 3•Unit 3 of 4

Unit 3: 2. Heuristic Search: The A* Search Algorithm

A* is an informed search algorithm that evaluates nodes by combining g(n), the cost to reach node n, and h(n), the estimated cost to get from node n to the goal:

f(n) = g(n) + h(n)

Properties of A*:

  • Completeness: A* is complete on finite graphs with positive step costs.
  • Admissibility Condition: A heuristic h(n) is admissible if it never overestimates the actual cost to reach the goal, i.e., h(n) ≤ h*(n) for all n.
  • Optimality: If h(n) is admissible (for tree search) or consistent/monotonic (for graph search), A* is guaranteed to return an optimal solution path!

Related notes

View all →

Related video lessons

View all →

Practice questions

View all →
  • Which of the following is an invalid variable name in C? (a) _salary (b) 1st_rank (c) total_sum (d) age2objective · 1 marks
  • What is the return type of the `malloc()` function in C? (a) `int*` (b) `char*` (c) `void*` (d) `float*`objective · 1 marks
  • Explain the difference between call by value and call by reference in C with suitable code snippets.short · 5 marks
  • What is recursion? Write a recursive function in C to calculate the factorial of a positive integer.short · 5 marks
  • Explain dynamic memory allocation in C. Differentiate between `malloc()` and `calloc()`. Write a C program to dynamically allocate memory for N integers, sort them in ascending order, and free the memory.long · 10 marks
  • What is the worst-case time complexity of Quick Sort algorithm? (a) O(n) (b) O(n log n) (c) O(n^2) (d) O(log n)objective · 1 marks

View all questions for this subject →

← Back to all notes