Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Algorithm and Logic?

I know an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function.But how we can differentiate it from Logic?

like image 466
Rohit Sisodia Avatar asked Apr 08 '16 12:04

Rohit Sisodia


People also ask

Are algorithms based on logic?

An algorithm is a process, which must be based on logic in order to be useful for an individual or a computer. An algorithm is not "a form of deductive or inductive reasoning".

What types of logics are used in algorithm?

Algorithmic logic is one of many logics of programs. Another logic of programs is dynamic logic, see dynamic logic, Harel, Kozen & Tiuryn (2000).

What is the main difference between algorithm and program?

Algorithm – It is a well-defined, systematic logical approach that comes with a step-by-step procedure for computers to solve any given program. Program – It refers to the code (written by programmers) for any program that follows the basic rules of the concerned programming language.


2 Answers

Wow your question took me on a voyage and I found something!! This may not stand as an answer but putting it here as a reference.

Algorithm = Logic + Control

An algorithm can be regarded as consisting of a logic component, which specifies the knowledge to be used in solving problems, and a control componentwhich determines the problem-solving strategies by means of which that knowledge is used.

The logic component determines the meaning of the algorithm whereas the control component only affects its effeciency. The effeciency of an algorithm can often be improved by improving the control component without changing the logic of the algorithm.

like image 114
Vivek Molkar Avatar answered Dec 18 '22 08:12

Vivek Molkar


Logic would be the reason behind the well-defined instructions.

like image 20
Rob Avatar answered Dec 18 '22 07:12

Rob