Anyone know what Algorithm Verification implies?:-/

Recommended Answers

All 2 Replies

Anyone know what Algorithm Verification implies?:-/

To make sure the algorithm is a valid solution to your problem. Type code based on your algorithm to see if the algorithm actually works in a real program. If it doesnt work, the algorithm is flawed and must be re-written.

commented: you forgot about top-posting, ya fascist -1
commented: N/A +6

To make sure the algorithm is a valid solution to your problem. Type code based on your algorithm to see if the algorithm actually works in a real program. If it doesnt work, the algorithm is flawed and must be re-written.

Also, more formally, an algorithm must satisfy 2 sets of conditions. Inital conditions and final conditions. The set of initial condtions may be null. There must be one member of the set of final conditions. An algorithm is a well-formed set of n-procedures that satisfies the final condtions. For example, we have an algrorithm:

Count to 3. 
initial conditions: none
final conditions: number 3 is reached:
steps:
   initialize count to 0;
   increment count;
   is count equal to 3?
   if yes STOP
   if no, go to step 1

Very trivial, very easy to validate, but it helps to think about these things formally as you continue further into CS.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.