Changes

Jump to navigation Jump to search
1,224 bytes added ,  17:28, May 30, 2007
no edit summary
Line 4: Line 4:  
# In elementary education, where an 'algorithm' is used for calculation, such as the decomposition algorithm, or the equal addition method of subtraction. Many of these algorithms are, in fact derivations from  methods in Al-Khwārizmī's original treatise.
 
# In elementary education, where an 'algorithm' is used for calculation, such as the decomposition algorithm, or the equal addition method of subtraction. Many of these algorithms are, in fact derivations from  methods in Al-Khwārizmī's original treatise.
 
# In computing, where an algorithm is the methodology which underlies a computer program. This tells the computer what specific steps to perform (in what specific order) in order to carry out a specified task, such as calculating employees’ paychecks or printing students’ report cards.
 
# In computing, where an algorithm is the methodology which underlies a computer program. This tells the computer what specific steps to perform (in what specific order) in order to carry out a specified task, such as calculating employees’ paychecks or printing students’ report cards.
 +
 +
All algorithms must adhere to two rules -
 +
 +
*They must work for any given input or network.
 +
*They must have a single start point, and a single finish point.
    
==Examples of Algorithms==
 
==Examples of Algorithms==
    
===Dijkstra's algorithm===
 
===Dijkstra's algorithm===
 +
 +
Dijkstra's algorithm finds the shortest path through a [[network]], from one point to another.
 +
 +
#Start by labelling the first [[node]] (1,0,0). The first number, the ordinal value, denotes the order in which the arcs were labelled, the second, the label value (the distance travelled thus far), while the third, the working value, denotes the possible distance to that point.
 +
#Then, update the working values for nodes separated to the current node(s) by one [[arc]], by adding the weight of the arc to that node to the label value of the node at the other end. This value may decrease during the progression of the algorithm, as new, shorter, routes are found.
 +
#Choose the node with the lowest working value, and promote its working value to the label value, and write in its new ordinal value. For example, if this was the second node labelled, its complete annotation would now read (2, x, x), where 'x' would be the distance between it and the first node.
 +
#Now return to the second step. If there are no more nodes to be added, the algorithm has finished.
 +
 +
 
 
===Planarity algorithm===
 
===Planarity algorithm===
 
===Critical path analysis===
 
===Critical path analysis===

Navigation menu