Skip to main content

Algorithm Introduction and Applications

Algorithm

What is algorithm?


Algorithm is a sequence of steps used for computation to transform the input into the output. It is a tool used to solve specific computational problems. A step by step process which takes some input process the input to produce some output.

Example:


To sort a sequence of numbers into non-decreasing order an algorithm can be designed. This problem is known as sorting problem. This problem is defined as-

INPUT: A sequence of n numbers (a1, a2, ..., an).

OUTPUT: A permutation of the input sequence such that a1'<a2'<...<an'.

How to know which algorithm is best for given application?


When looking for best algorithm for given application the factors to see are-

  • Number of items to be sorted

  • Extent to which items are already sorted.

  • Possible restrictions on item values.

  • Architecture of computer.

  • Kind of storage to be used.

Comments

Post a Comment

Popular posts from this blog

Facebook Login In PHP

As we all know Time is Money. When there's a long form on your site for registration you could sometimes lose your visitors. To make this registration step a success, adding a small social login button to your site may cut down lot of burden on visitors side and will help you in getting more attention on your data rather than wasting time on the lengthy registration process. By doing so visitor will be glad to see that you care for their precious time.   What do you think will there be anyone in this small world who is not having a Facebook account? According to recent stats 1 in every 13 person in this world is using facebook.

USB Boot Procedure

Simple step-by-step solution to create a bootable usb in cmd: 1)   Take a pen drive of more than 4gb . 2)   Now the most important step is to open cmd from start->search program and files->type cmd . 3)   Now in the new window, type diskpart and hit enter. 4)   Type the command list disk . Now, note the disk which have size identical to that of your pen drive. eg. disk 1. 5)   Type the command select disk 1 . 6)   Then type clean and hit enter. 7)   Just type create partition primary and press enter. 8)  Then run the command list partition . 9)  Type select partition 1 and hit enter. 10) Format it using the command format fs=ntfs . 11) Type the commands active , assign and exit in sequence. Now just copy all the files from Boot-able disc of  windows 7 to the pen drive and your pen drive is ready to be used as a boot-able device.