If we modify Dijkstra algorithm from "single source to all nodes shortest path" to find the shortest path from "single source to a single destination point", then what will be the difference between this modified Dijkstra and uniform cost search? Any help will be appreciated. Thanks.
What's the difference between Modified Dijkstra with single source, single destination point and Uniform Cost Search?
1.5k Views Asked by Ayesha At
2
There are 2 best solutions below
1
GolamMazid Sajib
On
There is no difference. If you use dijkstra, When you start from single source there will be calculated shortest path for all node. You visit from source node to connected node. Then next node is shortest cost node from priority queue. Before insert new node in priority queue, check current node cost and new cost. If new cost is less than node cost then insert this node in priority queue.
Look at this to get how to calculate single source to all node.
Related Questions in ALGORITHM
- Two different numbers in an array which their sum equals to a given value
- Given two arrays of positive numbers, re-arrange them to form a resulting array, resulting array contains the elements in the same given sequence
- Time complexity of the algorithm?
- Find a MST in O(V+E) Time in a Graph
- Why k and l for LSH used for approximate nearest neighbours?
- How to count the number of ways of choosing of k equal substrings from a List L(the list of All Substrings)
- Issues with reversing the linkedlist
- Finding first non-repeating number in integer array
- Finding average of an array
- How to check for duplicates with less time in a list over 9000 elements by python
- How to pick a number based on probability?
- Insertion Sort help in javascript -- Khan Academy
- Developing a Checkers (Draughts) engine, how to begin?
- Can Bellman-Ford algorithm be used to find shorthest path on a graph with only positive edges?
- What is the function for the KMP Failure Algorithm?
Related Questions in COMPARISON
- Cell comparison and row inserts
- How to speed up string comparisons in an array with a for loop?
- Count number of ones in a array of characters
- why the following code gives the first mobile no. irrespective of name
- Comparing two decimals
- Groovy comparison chaining
- Numpy matrix row comparison
- What is faster: equal check or sign check
- In JavaScript, is there any difference between typeof x == 'y' and typeof x === 'y'?
- Using comparable to compare different variables
- count how many times characters from a range occur in a string
- MySQL Comparison Query
- Dynamically comparing two tables from two different databases and serves in SQL Server Management Studio
- Compare two DATETIME fields from multidimensional array and return a value or index
- Bash string comparison
Related Questions in UPDATES
- Apps that need access to camera wont work on newest android version
- how to update data from meteor in meteor using template helper which contain iteration
- update database java
- D3.js Enter, Update, Exit issue
- Unable to update a document elastica
- Cannot install typescript 1.4 after Windows 10 reservation
- Update list of items in c#
- Wordpress RPM not showing plugins update
- Is there away to specify which server you want?
- How I can execute extern Module Commands on a remote Computer in Powershell without install the Module?
- change routes of update rails
- Objective-C app update is deleting saved pictures
- OTA updates for Device Owner Android Application(Kiosk mode)
- Rethinkdb multiple update by one query and conditional
- Trigger Chrome extension update checking
Related Questions in DIJKSTRA
- Can Bellman-Ford algorithm be used to find shorthest path on a graph with only positive edges?
- Multi-source single destination algorithm
- Pacman java Game runs very slow almost freezes when smart ghost is moving (DIjkstra algorithm shortest path)
- How to get the minimum element from a priority queue after modifying the contents of queue
- Difference between Neo4j Dijkstra and shortestPath performance?
- neo4j shortest with connector node and multiple options
- calculating graph weight in python with NetworkX
- What is the most efficient way to represent edge weights for Dijkstra's algorithm
- Graph shortest path confusion
- Graph shortest path infinite cycle
- Dijkstra's Method in java (stpe-by-step)
- Multiple paths in Dijkstra's algorithm
- algorithm for 2D array that represents the topographic map of geographic surface
- Adding to object in list ends up adding to all list objects
- Shortest path of Dijkstra algorithm
Related Questions in UCS
- C++: implementation-defined accepted physical source file characters
- Why do we need both UCS and Unicode character sets?
- What does 'case insensitive' mean in RFC 3986 with respect to non-English characters?
- How do you determine the byte width of a UTF-16 character?
- Dijkstra's algorithm Vs Uniform Cost Search (Time comlexity)
- What's the difference between Modified Dijkstra with single source, single destination point and Uniform Cost Search?
- How to change python from UCS2 to UCS4
- Trouble in Perl using split() function on tab chars when string contains non-Latin characters
- How to resolve this error "undefined symbol: PyUnicodeUCS4_FromObject " while including Python packages in Odoo 8?
- Numpy needs the ucs2
- Build numpy with ucs4 issue
- Build Python as UCS-4 via pyenv
- Enter key works manually but not when sent via paramiko invoke_shell.sendall
- What is the difference between System.Speech.Recognition and Microsoft.Speech.Recognition?
- How do I get a UCS code of a 1-byte letter of UTF-8 in C++?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
A very good dissection of the differences between both algorithms can be seen in Dijkstra’s Algorithm versus Uniform Cost Search or a Case Against Dijkstra’s Algorithm. I just quote you some of the conclusions from Arial Felner:
As we suspect, both algorithms are equivalent from the theoretical point of view.
Thus,
In summary, UCS and modified Dijkstra are equivalent in their big O complexity, expand the same nodes and in the same order, but UCS should be preferred from a practical point of view and it is more widely used when approach the single source - single destination problem without heuristic information.