Data Structures and Algorithms
Data Structures and Algorithms
MINIMUM HEAP
Min heap is implemented by array
Operations on Min Heap:
1) getMini(): It returns the root element of Min Heap. Time Complexity of this operation is O(1).
2) extractMin(): Removes the minimum element from Min Heap. Time Complexity of this Operation is
O(Logn) as this operation needs to maintain the heap property (by calling heapify()) after removing root.
3) decreaseKey(): Decreases value of key. Time complexity of this operation is O(Logn). If the decreases
key value of a node is greater than parent of the node, then we don’t need to do anything. Otherwise,
we need to traverse up to fix the violated heap property.
4) insert(): Inserting a new key takes O(Logn) time. We add a new key at the end of the tree. IF new key
is greater than its parent, then we don’t need to do anything. Otherwise, we need to traverse up to fix
the violated heap property.
5) delete(): Deleting a key also takes O(Logn) time. We replace the key to be deleted with minum infinite
by calling decreaseKey(). After decreaseKey(), the minus infinite value must reach root, so we call
extractMin() to remove key.
A*ALGORITHM
IMPLEMENTATION
The project is implemented by different data structures.Minimum heap is used to find the smallest
distant from the adjacent node.it is implemented by the array.Graphs are used to store the vertices and
the edges it is implemented by the linked list.An input file is also used which contains the source or the
staring positions and destinations the weight are also included in the file and the
APPLICATIONS
A* is commonly used for the common pathfinding problem in applications such as games, but was
originally designed as a general graph traversal algorithm.It finds applications to diverse problems,
including the problem of parsing using stochastic grammars in NLP. Other cases include an
Informational search with online learning.
ISSUES
There were no issues in the project .The minor issues were solved
CONCLUSION
A star algorithm is successfully implemented.A star uses heuristic. This heuristic helps to reach nearer.
Efficiency of this algorithm depends on heuristic function, which can be either complete or optimal. This
algorithm is faster than Dijkstra and more efficient.