ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.

Exclusive for LQ members, get up to 45% off per month. Click here for more info.

While learning and reading about my growing interest in various security issues, etc, I keep coming across Algorithms. I have a very basic understanding of this, but I am still lost on quite a bit.

My current understanding is that there are some slight variations on the exact definition of Algorithms. Can anyone give me any information, views, opinions, etc., on this?

If an algorithm is a procedure for solving mathematical problems, then how would it apply to, for ex., a blowfish algorithm? What would be the mathematical problem be?

In higher mathematics there is the concept of defining a mathematical system. For example Euclidean geometry defines five axioms and then builds a mathematical system based on a logical application of those axioms. You can solve geometry problems by using algorithms which are consistent with the Euclidean geometry mathematical system.

Quote:

If an algorithm is a procedure for solving mathematical problems, then how would it apply to, for ex., a blowfish algorithm? What would be the mathematical problem be?

blowfish is an algorithm within a mathematical theory or system for dealing with encryption.

A programming language can be described as a mathematical system. It is possible to describe a problem as being solvable within that mathematical by using an algorithm which is logically consistent with the axioms (rules) of the programming language.

A theoretical mathematician would look at writing an encryption program based on the blowfish method as a mathematical transformation problem for transforming the blowfish algorithm from a logically consistent encryption system to an algorithm in the (pick a programming language name) mathematical system.

Fist of all mathematics is a very broad field and mathematics forms the underpinning of computer science. That is why if you choose to do a university degree in computer science then you will be faced with a substantial number of papers in mathematics. Although it is worth noting that you can do other courses associated with the field of computer science that don't have such a significant mathematical focus.

Algorithms are one of the key pillars to computer science. Without going into the exact details of the blowfish algorithm, it has been clearly defined as a number of steps that need to be performed. The real key to an algorithm in computer science terminology is the second part of the definition given in the link by jailbait: "broadly : a step-by-step procedure for solving a problem or accomplishing some end especially by a computer". Although that shouldn't preclude the idea that mathematics plays an integral part in algorithms, it does because it is mathematics that can be used to prove (or disprove) the validity of the algorithm. An important concept when looking at security and the field of cryptography.

Strictly speaking, you can define a concept of algorithm only within formal Mathematics or formal logic. Most of computer science can be formally dealt with through partial algebras or through various logics and horn clause programming.

If you want to really understand what algorithms are, you must consider studying "Formal Logic and Computing" and some algorithms too.

If you are more interested in applications to actual programming, then you must pick a huge 'book of algorithms'.

With the above replies and a quote, below, from some more information I found, This now makes sense to me. Well the meaning and what an Algorithm is.

Quote:

Algorithms
Informally, an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transform the input into the output.

We can also view an algorithm as a tool for solving a well-specified computational problem. The statement of the problem specifies in general terms the desired input/output relationship. The algorithm describes a specific computational procedure for achieving that input/output
relationship.

For example, one might need to sort a sequence of numbers into nondecreasing order. This problem arises frequently in practice and provides fertile ground for introducing many standard design techniques and analysis tools.

LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.