Computer Science, asked by anshult887p582kh, 5 months ago

explain uniform cost search with suitable example.​

Answers

Answered by Anonymous
2

Answer:

Introduction to Uniform Cost Search

Uniform Cost Search is an algorithm used to move around a directed weighted search space to go from a start node to one of the ending nodes with a minimum cumulative cost. This search is an uninformed search algorithm, since it operates in a brute-force manner i.e it does not take the state of the node or search space into consideration. It is used to find the path with the lowest cumulative cost in a weighted graph where nodes are expanded according to their cost of traversal from the root node. This is implemented using a priority queue where lower the cost higher is its priority.

Algorithm of Uniform Cost Search

Below is the algorithm to implement Uniform Cost Search in Artificial Intelligence:-

center;”>Algorithm for USC

Insert RootNode into the queue.

Repeat till queue is not empty:

Remove the next element with the highest priority from the queue.

if the node is destination node then print the cost and the path and exit

else insert all the children of removed elements into the queue with their cumulative cost as their priorities.

Here rootNode is the starting node for the path and a priority queue is being maintained to maintain the path with the least cost to be chosen for the next traversal. In case 2 paths have the same cost of traversal, nodes are considered alphabetically.

Example of Uniform Cost Search

Consider the below example, where we need to reach any one of the destination node{G1, G2, G3} starting from node S. Node{A, B, C, D, E and F} are the intermediate nodes. Our motive is to find the path from S to any of the destination state with the least cumulative cost. Each directed edge represents the direction of movement allowed through that path and its labeling represents the cost is one travels through that path. Thus Overall cost of the path is a sum of all the paths.

Explanation:

Answered by pratiyabhusagar
1

Answer:

Uniform-cost search is a searching algorithm used for traversing a weighted tree or graph. ... Uniform-cost search expands nodes according to their path costs form the root node. It can be used to solve any graph/tree where the optimal cost is in demand. A uniform-cost search algorithm is implemented by the priority queue.

Explanation:

. 4 MEANING OF UNIFORM COSTING Uniform costing is not a method of costing like marginal costing or ABC. But it is good costing system to operate a business in which all the companies in any industry follow the same type of costing principles and methods. For example, we talk about electrical industry.

Similar questions