fgdfg

© All Rights Reserved

1 views

fgdfg

© All Rights Reserved

- Report Rubrics
- Kwiatkowski
- Pic 877
- Samsung S3C2440 Soc
- unit-4
- 6 Important Points from a Googler.docx
- Es 15 Libro
- Hwc Cis 142 Syllabus
- gsoc_1
- Goar a Methodology for the Synthesis of Expert
- Presentation1.ppt
- A6030_AGA92.pdf
- Chapter 1
- Resolve Switching Alarm
- 1986-01_HP Journal Papers
- Appendix Instruct Set
- Gatito
- Rebuttal Draft
- Scimakelatex.24217.None
- Scimakelatex.7329.None

You are on page 1of 3

OR

An algorithm is a finite set of well defined instructions or step by step procedure to solve a

given problem.

Programs= Algorithms + Data.

Characteristics of an Algorithm

1) Input : It may accept zero or more inputs

2) Definiteness : Each instruction must be clear, well-defined and precise. There should not

be any ambiguity

3) Effectiveness : Each instruction must be simple and be carried out in a finite amount of

time.

4) Finiteness : Algorithm should have finite sequence of instructions. That is, it should end

after a fixed time. It should not enter into an infinite loop

5) Output :It should produce at least one output.

Algorithm Notation

1)

2)

3)

4)

Step no - Identification tag of an instruction and it is an unsigned position number.

Explanatory comment within the square brackets

Termination

Advantages of Algorithm

Effective communication: Since algorithm is written in English like language, logic of the

problem can be explained easily to others

Easy and efficient coding : It acts as a blue print during a program development

Program debugging : Helps in debugging so that we can identify the logical errors in a

program

Program maintenance : maintaining the software becomes much easier

1) Sequential : In this different steps occur in a sequence

2) Conditional : In this different steps are executed based on a condition(whether

true/false) . In programming languages, an conditional pattern is

implemented using decision making statements.

3) Iterational : In this a task (one or more steps ) is repeated more than once. In

programming languages, an iterational pattern is implemented using

loops. An iterational construct is also known as repetitive construct

Examples

1. Write an algorithm to find sum and average of 3 numbers

Step 1: start

Step 2: read a,b,c [ input 3 numbers]

Step 3: sum a + b + c

[ find sum]

Step 4: avg sum/3

[find average]

Step 5: print sum, avg

[output the result]

Step 6: stop

2. Write an Algorithm to find whether an entered integer number is positive or negative

(Decision making type)

Step 1: Start

[Beginning of the Algorithm]

Step 2: Read a number A [Input the integer number]

Step 3: If A is greater than 0 [compare A to zero]

print number as positive

else

print number as negative

Step 4: Stop

[End of the Algorithm]

3.

Step 1: Start

[Beginning of the Algorithm]

Step 2: Read a and b [Input two numbers a,b]

Step 3: if a is greater than b [ compare a and b]

print a as large

else

print b as large

[output the result]

Step 4: Stop

Disadvantage of algorithm

Developing algorithm for large and complex problems would be time consuming and

difficult to understand

Understanding complex logic through algorithms would be difficult

- Report RubricsUploaded byswaggerz95
- KwiatkowskiUploaded bySunil Kumar Sabbineni
- Pic 877Uploaded byJayanta Paul
- Samsung S3C2440 SocUploaded byCao Duc Quan
- unit-4Uploaded byVenkata Hemanth
- 6 Important Points from a Googler.docxUploaded byta_1091
- Es 15 LibroUploaded byasasasasas1
- Hwc Cis 142 SyllabusUploaded byyotnomuk
- gsoc_1Uploaded byVidishSharma
- Goar a Methodology for the Synthesis of ExpertUploaded byAuthor
- Presentation1.pptUploaded byvishallchhaya
- A6030_AGA92.pdfUploaded byTomcat_fighter
- Chapter 1Uploaded byNitin Pandey
- Resolve Switching AlarmUploaded byrikjah
- 1986-01_HP Journal PapersUploaded byElizabeth Williams
- Appendix Instruct SetUploaded byMakhloufi Hocine
- GatitoUploaded bypudreteestupido
- Rebuttal DraftUploaded byNC
- Scimakelatex.24217.NoneUploaded byImran
- Scimakelatex.7329.NoneUploaded byMustafar
- Development of Operating SystemsUploaded byTimothy Parks
- The Impact of Concurrent Theory on E-Voting TechnologyUploaded byJohn
- I-ME-ADS NotesUploaded bySeethamani Palanivel
- Algorithms.pdfUploaded byJanaka Dinesh
- addition algorithm annotated planning templateUploaded byapi-400542088
- multiplication algorithm annotated planning templateUploaded byapi-400542088
- division algorithm annotated planning templateUploaded byapi-400542088
- Spc2016 RulesUploaded byOmar Trigui
- Lab 3Uploaded byAbdurRehman
- ComputerProgramming1.pdfUploaded byJaena Mae Bonior

- C languageUploaded byVenkata Prasad
- Nitrkl.ac.in FacultyStaff 9SRICCE DOC ConferenceUploaded bypalla gopal
- Experiment Number1Uploaded bypriya
- Decision MakingUploaded bypriya
- Notes of c LanguageUploaded byapi-3723265
- 04.algorithm.pdfUploaded bypriya
- Features of c LanguageUploaded bypriya
- 14_prg_langUploaded bypriya
- 04.algorithm.pdfUploaded bypriya
- MIT6 087IAP10 Assn02 SolUploaded bypriya
- A Programming Language is a Language That is Designed to Be UsedUploaded bypriya
- Camp AchievementUploaded bypriya
- CsiUploaded bypriya

- soluciones1_lprogramacionUploaded byGabriel Reiriz Sanchez
- Advanced Data StructuresUploaded bypramodtripathi7
- Perceptron Learning RulesUploaded byVivek Goyal
- Chapter 5Uploaded bysaroj
- Splitting algorithms for the multiple depot arc routing problem- application by ant colony optimizat.pdfUploaded byFrancysNava
- Selenium CommamndUploaded byjayantkal310
- 978-3-642-39467-6_6Uploaded bySyed Muzammil Ali
- Codes Used in Satellite CommunicationUploaded byahad523
- Data Structure and Algorithm.Uploaded byPardeep Vats
- LISP ExamplesUploaded byValer Kyler
- Studies in Graph Theory-distance Related Concepts in GraphsUploaded bysatheesh
- 9781852338244-c1Uploaded byAnonymous
- Lecture-3-CS210-2012 (1).pptxUploaded byMoazzam Hussain
- 20-MidtermReviewUploaded byNishank Modi
- LN4Uploaded byApurva Jaipal
- Formal Languages and Automata Solution ManualUploaded byKimberly Greene
- Unit-5 String MatchingUploaded byVamika Chandra
- Lec-1 Introduction.pptUploaded bySanchita Kadambari
- Assignment 1 AnswersUploaded byvkthik
- Elective 4 the Mathematics of GraphsUploaded byGwen Fedilus Fabrero
- Quanti FiersUploaded byAngelo Lugtu
- A Comparison of Vertex Ordering Algorithms for Large Graph VisualizationUploaded byharry_3k
- ADA - Lesson PlanUploaded bysoniadrall
- Artificial Intelligence AlgorithmsUploaded byMukhtar Ahmed
- Logic GatesUploaded byMehar Gupta
- CLOSET+- Searching for the Best Strategies for Mining Frequent Closed ItemsetsUploaded byWin Min Tun
- 9A05403 Design and Analysis of AlgorithmsUploaded bysivabharathamurthy
- Bab 8 Calculus MethodsUploaded bynope uli
- Ch2Uploaded byAbdul Rehman
- Some Basic Properties of Fix-Free Codes Chunxuan Ye and Raymond W. Yeung,Uploaded byMan Mohan Goel

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.