# What is a conventional format for presenting algorithms?

I'm writing a technical paper and the review committee wants my methodology to be represented in a conventional algorithm format.

I've been searching all over the web for the conventional structure of an algorithm with little luck. Can someone tell me the conventional format of an algorithm or any specification from IEEE for writing algorithms?

• "Conventional algorithm format" means "the conventional format for algorithms", not "the format for conventional algorithms." – David Richerby Dec 5 '14 at 10:42
• This question appears to be off-topic because it based solely on a misunderstanding of typesetting instructions. – David Richerby Dec 5 '14 at 10:43
• @DavidRicherby I'm not sure which translation caused this. It seems to me the OP wants to know how to write down algorithms, which is a valid question. – Raphael Dec 5 '14 at 12:39
• @Raphael If that is indeed the question, I'm happy to retract my close vote. But the current phrasing makes it look very much like the question is "What is a 'conventional algorithm'?" and one of the answers starts by addressing that. prince, could you please clarify? – David Richerby Dec 5 '14 at 13:44

There is no such thing as the "format" for algorithms. A general agreement¹ is to use pseudocode, i.e. code that abstracts from the particulars of specific programming languages, machines and/or libraries.

The most important thing is to be consistent. If you want to follow a specific style, I recommend you pick up some textbooks on algorithms and/or data structures and follow the style you like best.

Some kinds of pseudocode have specific package support in LaTeX, e.g. clrscode, algorithms or pseudocode. For help with these go to tex.SE.

1. As long as you publish about algorithms as scientist. Articles featuring concrete technology frequently use real code, for better or worse.
• Pseudo code can use mathemathical notation to express computations that are straightforward in the context considered. It does not have necessarily into details, nor have to give the definition of subprograms, when the name of the subprograms is enough to understand what they are doing and how they do it. – babou Dec 5 '14 at 15:28
• @babou I think that's best summarised by "source code is for machines, pseudo code for humans". – Raphael Dec 5 '14 at 15:51

A quick google search will tell you what an algorithm is.

Now for "convential algorithm format" I think it would be helpful to look at how to write pseudocode.

From wikipedia: "Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm."

It is useful to express ideas and main concepts behind an algorithm without relying on implementation details and is used in almost any paper discussing implementation.

Even though people aim to write pseucode anyone with any programming background can read, there are some general guidelines. One example could be this