Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Overig

Basic of python

Beoordeling
-
Verkocht
-
Pagina's
43
Geüpload op
23-06-2024
Geschreven in
2023/2024

Easy to learn, it is a simple programming language, it is easy language comparing to other languages like c, c++, java etc...., The program is shortly writen

Instelling
Vak

Voorbeeld van de inhoud

https://www.poriyaan.in/ Problem Solving and Python Programming https://eee.poriyaan.in/

UNIT I (GE8151 PROBLEM SOLVING AND PYTHON PROGRAMMING)
ALGORITHMIC PROBLEM SOLVING




/
Algorithms are procedural solutions to problems. Algorithmic problem solving is defined as the




in
formulation and solution of problems where solution involves the principles and techniques to




n.
construct the correct algorithms. It means that solving problems that require formulation of an




aa
algorithm for their solution.
Steps in designing and analyzing an algorithm




iy
The steps are




or
i) Understanding the problem
ii) Ascertaining the capabilities of a computational device



.p
iii) Choosing between exact and approximate problem solving
w
iv) Deciding on appropriate data structures.
w
v) Algorithm design techniques
//w

vi) Methods of specifying an algorithm.
vii) Proving an algorithm’s correctness.
viii) Analyzing an algorithm.
s:



ix) Coding an algorithm.
tp




i) Understanding the problem
ht




→Before designing an algorithm, you need to understand the problem completely.
→Read the problem description carefully.
→ Check if it is similar to some standard problems and if a known algorithm exists.
→Ask Questions if you have any doubts and do a few small examples by hand.
→Think about special cases.
→Ask Questions again if needed.

,https://www.poriyaan.in/ https://eee.poriyaan.in/


Understand the problem




/
.in
Decide on: computational




n
means,




aa
Algorithm design techniques




iy
or
.p
Design an algorithm

w
w
Prove correctness
//w
s:



Analyze the algorithm
tp
ht




Code the algorithm




Fig 1: Steps in designing and analyzing an algorithm

ii) Ascertaining the capabilities of a computational Device

The second step is to ascertain the capabilities of a machine.
Sequential algorithms:
→ The essence of von-Neumann machines architecture is captured by RAM; here h
te
instructions are executed one after another, one operation at a time.

,https://www.poriyaan.in/ https://eee.poriyaan.in/

→Algorithms designed to be executed on such machines are called sequential algorithms.
Parallel algorithms:
→ An algorithm which has the capability of executing the operations concurrently




/
in
iscalled parallel algorithms.




n.
→RAM model doesn’t support this.
iii) Choosing between exact and approximate problem solving




aa
→The next decision is to choose between solving the problem exactly or solving ti




iy
approximately.




or
→Based on this, the algorithms are classified as exact and approximation algorithms.
Exact algorithms:



.p
→ The algorithms that can solve the problem exactly are called exact algorithms.
w
Approximate algorithms:
w
→The algorithms that can solve the problem not exactly are called approximate
w

algorithms.
//


→There are three issues to choose an approximation algorithm.
s:



→First, there are certain problems like extracting square roots, solving non-linear
tp




equations which cannot be solved exactly.
ht




→Secondly, if the problem is complicated it slows the operations. E.g. Traveling
salesman problem.
→Third, this algorithm can be a part of a more sophisticated algorithm that solves
aproblem exactly.
iv) Deciding on appropriate data structures

→Data structures play a vital role in designing and analyzing the algorithms.
→Some of the algorithm design techniques also depend on the structuring data specifying
a problem’s instance.
Algorithm + Data structure = Programs
v) Algorithm design techniques

→An algorithm design technique is a general approach to solving problems
algorithmically that is applicable to a variety of problems from different areas of computing.
Download Binils Android App in Playstore Download Photoplex App

, https://www.poriyaan.in/ https://eee.poriyaan.in/
→Learning these techniques is important for two reasons.
i) First, they provide guidance for designing for new problems.
ii) Second, algorithms are the cornerstones of computer science.




/
vi) Methods of specifying an algorithm




in
Once you have designed an algorithm, you need to specify it in some fashion.




n.
There are two options for specifying algorithms.




aa
→ Pseudo code
→ Flowchart




iy
Pseudo code is a mixture of a natural language and programming language. It is more




or
precise.
Flowchart is a method of expressing an algorithm by a collection of connected geometric



.p
shapes containing descriptions of the algorithm’s steps.
w
vii) Proving an algorithm’s correctness
w
→Once an algorithm has been specified, you have to prove its correctness.
w

→You have to prove that the algorithm yields a required result for every legitimate input
//


in a finite amount of time.
s:



→A common technique for proving correctness is to use mathematical induction.
tp




viii) Analyzing an algorithm

→ Our algorithm should possess several qualities.
ht




→ Analysis of algorithms and performance analysis refers to the task of determining how
much computing time and storagean algorithm requires.
→After correctness, the most important quality of an algorithm is Efficiency.
→There are two kinds of algorithm Efficiency.
i) Time efficiency: It indicates how fast the algorithm runs.
ii) Space efficiency: Indicates how much extra memory the algorithm needs.
ix) Coding an algorithm
→ Algorithms are implemented as computer programs.
→ Verification and validation is done for error correction.




Download Binils Android App in Playstore Download Photoplex App

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
23 juni 2024
Aantal pagina's
43
Geschreven in
2023/2024
Type
OVERIG
Persoon
Onbekend

Onderwerpen

$8.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
arunkumar30

Maak kennis met de verkoper

Seller avatar
arunkumar30 University College of engineering, BIT campus, trichy
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
1 jaar
Aantal volgers
0
Documenten
3
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen