 Hello everyone, this is Alice Gao. In this video, I will describe the lowest cost-first search algorithm. Technically, LCFS is an uninformed search algorithm because it doesn't make use of the heuristic function. So far, the uninformed search algorithms focus on finding any solution. There's little guarantee on the quality of the solution found. DFS has no guarantee. BFS and IDS are guaranteed to find the solution with the fewest edges, but this path is not necessarily the one with the least total cost. If all the edges have the same costs, the solution is optimal. What if our goal is to find the optimal solution? One way to do this is to keep track of the costs of the path found so far. This idea takes us to the lowest cost-first search algorithm. LCFS maintains a frontier, which is a priority queue ordered by the path costs. It always selects the path with the lowest total cost to remove from the frontier. You may have learned the Dijkstra's shortest path algorithm, which is similar to LCFS. Let's trace lowest cost-first search on a search graph. We'll break ties as follows. If multiple paths have the same cost, we will order the path by the last node and choose the one that comes first in alphabetical order. Pause the video and trace the algorithm yourself. Then keep watching for the answer. This is the search tree when the algorithm terminates. I will describe the tracing process in a separate video. Let's look at the properties of LCFS. First, the space and time complexities for LCFS are both exponential. LCFS generates all the path whose cost is less than the cost of the optimal solution. The number of such paths could be very large. It is not doing well with space and time because we're doing some intensive optimization to make sure that we find the optimal solution first. As we start talking about more complex search algorithms using the cost and the heuristic functions, it becomes more challenging to characterize the time and space complexities. It is also less interesting to discuss these complexities because they tend to be exponential in the worst case. Let's look at completeness and optimality. LCFS is complete and optimal under some mild conditions. The first condition is that the branching factor must be finite. The algorithm may decide to expand all the children of one node before going deeper into the tree. Having a finite branching factor makes it possible for the algorithm to explore all the children of a node if necessary. The second condition is that the cost of every edge is bounded below by some positive constant. In other words, the cost of an edge cannot be arbitrarily small. Without such bounds, there could be infinite path with a finite cost. The Xenos paradox devised by Aristotle illustrated the idea of this case. Suppose that we have edges with costs 1 over 2, 1 over 4, 1 over 8, 1 over 16, and etc. We can construct an infinite many number of paths using these edges and the cost of every path is less than 1. The problem here is that we would be exploring these paths forever and never reach a path of cost of 1. In general, LCFS is cautious and conservative. It looks at all of the potential paths so that it doesn't miss the optimal solution. That's everything on the lowest cost first search algorithm. Let me summarize. After watching this video, you should be able to do the following. Explain LCFS at a high level. Trace LCFS on search graph. Explain the properties of LCFS. Space complexity, time complexity, completeness, and optimality. Thank you very much for watching. I will see you in the next video. Bye for now.