SlideShare a Scribd company logo
1 of 10
COMPUTER
ONLINE
CLASS X
CHAPTER 1
PROBLEM SOLVING
AND ALGORITHM
DESIGNING
Outline
– Algorithm
– What is an algorithm?
– How are mathematical statements and algorithms
related?
– What do algorithms have to do with computers?
– Pseudo Code
– What is pseudocode?
– Writing pseudocode
– Pseudo Code vs Algorithm
What is an algorithm?
–An algorithm is a finite, explicit step-by-step procedure for solving a specific problem
or accomplishing a specific goal.
–We frequently talk about algorithms in mathematical terms, and many algorithms are
expressed using notation borrowed from mathematics, but algorithms aren't
necessarily mathematical in the operations performed, or in the results produced.
– In general, an effective algorithm has these characteristics:
– Explicit, complete, and precise initial conditions;
– A finite, complete, unbroken
– Explicit, complete, and precise terminal (stopping) conditions
WATCH A TUTORIAL
https://youtu.be/jaQzQC3ADQU
How are mathematical statements
and algorithms related?
5(𝐹− 32) = 9
𝐶
– First, convert expression into a form that expresses C as a function of F:
C=5/9 * (F – 32)
– Now it's a straightforward task to write an algorithm (based on the standard
order
of arithmetic operations) to convert from Fahrenheit to Celsius.
– Start with a given temperature in degrees Fahrenheit.
– Subtract 32 from the value used in step # 1.
– Multiply the result of step # 2 by 5.
– Divide the result of step # 3 by 9.
– The result of step # 4 is the temperature in degrees Celsius.
What do algorithms have to do
with computers?
– Computer programming consists, in large part, of creating unambiguous, step-by-step
procedures for the computer to follow, to produce specific results. In other words, we
might say that computer programming is almost all about algorithms.
– In many respects, computers are electronic idiot savants: they can perform amazing
feats of calculation and memory, but without our help, they're almost totally
incompetent when it comes to applying those abilities to practical problems.
– Want to compute the sine of an angle? How about computing the natural logarithm of a
number? These tasks are easy for a computer –, in most modern computers, these
operations are built into the CPU itself.
– But if you want to plot the graph of y=sin x on the screen, or balance your cheque
book, or compute the area of the region 1≤x≤100,0≤y≤1/x, the computer is helpless –
until someone writes algorithms to accomplish these tasks, and “teaches” them to the
computer.
Pseudo Code vs Algorithm
HOME WORK
DO
Q1: Describe the steps involved
in problem solving.
THANK YOU MEET YOU
NEXT CLASS!

More Related Content

Similar to Learn Algorithm Design and Problem Solving with Pseudocode

19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdfGOWTHAMR721887
 
PPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORYPPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORYbutest
 
complexity analysis.pdf
complexity analysis.pdfcomplexity analysis.pdf
complexity analysis.pdfpasinduneshan
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniyaTutorialsDuniya.com
 
ProgFund_Lecture7_Programming_Algorithm.pdf
ProgFund_Lecture7_Programming_Algorithm.pdfProgFund_Lecture7_Programming_Algorithm.pdf
ProgFund_Lecture7_Programming_Algorithm.pdflailoesakhan
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptracha49
 
Introduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptIntroduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptBhargaviDalal4
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit onessuserb7c8b8
 
c_algo_flowchart.pdf
c_algo_flowchart.pdfc_algo_flowchart.pdf
c_algo_flowchart.pdfsimmis5
 
CS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsCS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
Lec 2 -algorithms-flowchart-and-pseudocode1.pptx
Lec 2 -algorithms-flowchart-and-pseudocode1.pptxLec 2 -algorithms-flowchart-and-pseudocode1.pptx
Lec 2 -algorithms-flowchart-and-pseudocode1.pptxAbdelrahmanRagab36
 
Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithmsPraveen M Jigajinni
 

Similar to Learn Algorithm Design and Problem Solving with Pseudocode (20)

19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf
 
PPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORYPPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORY
 
complexity analysis.pdf
complexity analysis.pdfcomplexity analysis.pdf
complexity analysis.pdf
 
Algorithm itabq
Algorithm itabqAlgorithm itabq
Algorithm itabq
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
 
UNIT-1.pptx
UNIT-1.pptxUNIT-1.pptx
UNIT-1.pptx
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniya
 
ProgFund_Lecture7_Programming_Algorithm.pdf
ProgFund_Lecture7_Programming_Algorithm.pdfProgFund_Lecture7_Programming_Algorithm.pdf
ProgFund_Lecture7_Programming_Algorithm.pdf
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
Introduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptIntroduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.ppt
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit one
 
c_algo_flowchart.pdf
c_algo_flowchart.pdfc_algo_flowchart.pdf
c_algo_flowchart.pdf
 
CS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of AlgorithmsCS8461 - Design and Analysis of Algorithms
CS8461 - Design and Analysis of Algorithms
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Lec 2 -algorithms-flowchart-and-pseudocode1.pptx
Lec 2 -algorithms-flowchart-and-pseudocode1.pptxLec 2 -algorithms-flowchart-and-pseudocode1.pptx
Lec 2 -algorithms-flowchart-and-pseudocode1.pptx
 
Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithms
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 

More from laraibali21

Computer software
Computer software Computer software
Computer software laraibali21
 
MSW LOGO PRIMITIVES
MSW LOGO PRIMITIVESMSW LOGO PRIMITIVES
MSW LOGO PRIMITIVESlaraibali21
 
More feature of MS POWER POINT
More feature of MS POWER POINTMore feature of MS POWER POINT
More feature of MS POWER POINTlaraibali21
 
INTRODUCTION TO MS EXCEL 2010
INTRODUCTION TO MS EXCEL 2010INTRODUCTION TO MS EXCEL 2010
INTRODUCTION TO MS EXCEL 2010laraibali21
 
ADVANCE ALGORITM AND FLOW CHARTS
ADVANCE ALGORITM AND FLOW CHARTSADVANCE ALGORITM AND FLOW CHARTS
ADVANCE ALGORITM AND FLOW CHARTSlaraibali21
 
Input and output devices
Input and output devices Input and output devices
Input and output devices laraibali21
 
Introduction to MS Windows 7
Introduction to MS Windows 7Introduction to MS Windows 7
Introduction to MS Windows 7laraibali21
 
Parts of computer
Parts of computerParts of computer
Parts of computerlaraibali21
 
Computer around us
Computer around us Computer around us
Computer around us laraibali21
 
Characteristic of computer
Characteristic of computer Characteristic of computer
Characteristic of computer laraibali21
 
Insert a HYPERLINK
Insert a HYPERLINK Insert a HYPERLINK
Insert a HYPERLINK laraibali21
 
HTML (presentation)
HTML (presentation)HTML (presentation)
HTML (presentation)laraibali21
 
ELECTRONIC MAIL
ELECTRONIC MAIL ELECTRONIC MAIL
ELECTRONIC MAIL laraibali21
 
MS PAINT (START AND CLOSE )
MS PAINT (START AND CLOSE )MS PAINT (START AND CLOSE )
MS PAINT (START AND CLOSE )laraibali21
 
COMPUTER BASIC PARTS
COMPUTER BASIC PARTSCOMPUTER BASIC PARTS
COMPUTER BASIC PARTSlaraibali21
 

More from laraibali21 (20)

Computer software
Computer software Computer software
Computer software
 
MSW LOGO PRIMITIVES
MSW LOGO PRIMITIVESMSW LOGO PRIMITIVES
MSW LOGO PRIMITIVES
 
More feature of MS POWER POINT
More feature of MS POWER POINTMore feature of MS POWER POINT
More feature of MS POWER POINT
 
INTRODUCTION TO MS EXCEL 2010
INTRODUCTION TO MS EXCEL 2010INTRODUCTION TO MS EXCEL 2010
INTRODUCTION TO MS EXCEL 2010
 
ADVANCE ALGORITM AND FLOW CHARTS
ADVANCE ALGORITM AND FLOW CHARTSADVANCE ALGORITM AND FLOW CHARTS
ADVANCE ALGORITM AND FLOW CHARTS
 
MS PAINT
MS PAINT MS PAINT
MS PAINT
 
Input and output devices
Input and output devices Input and output devices
Input and output devices
 
Introduction to MS Windows 7
Introduction to MS Windows 7Introduction to MS Windows 7
Introduction to MS Windows 7
 
Parts of computer
Parts of computerParts of computer
Parts of computer
 
Computer around us
Computer around us Computer around us
Computer around us
 
Characteristic of computer
Characteristic of computer Characteristic of computer
Characteristic of computer
 
Hyperlink
HyperlinkHyperlink
Hyperlink
 
INTERNET
INTERNETINTERNET
INTERNET
 
Insert a HYPERLINK
Insert a HYPERLINK Insert a HYPERLINK
Insert a HYPERLINK
 
More on QBASIC
More on QBASIC More on QBASIC
More on QBASIC
 
HTML (presentation)
HTML (presentation)HTML (presentation)
HTML (presentation)
 
ELECTRONIC MAIL
ELECTRONIC MAIL ELECTRONIC MAIL
ELECTRONIC MAIL
 
MS PAINT (START AND CLOSE )
MS PAINT (START AND CLOSE )MS PAINT (START AND CLOSE )
MS PAINT (START AND CLOSE )
 
GRADE 3
GRADE 3GRADE 3
GRADE 3
 
COMPUTER BASIC PARTS
COMPUTER BASIC PARTSCOMPUTER BASIC PARTS
COMPUTER BASIC PARTS
 

Recently uploaded

Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 

Recently uploaded (20)

Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 

Learn Algorithm Design and Problem Solving with Pseudocode

  • 2. CHAPTER 1 PROBLEM SOLVING AND ALGORITHM DESIGNING
  • 3. Outline – Algorithm – What is an algorithm? – How are mathematical statements and algorithms related? – What do algorithms have to do with computers? – Pseudo Code – What is pseudocode? – Writing pseudocode – Pseudo Code vs Algorithm
  • 4. What is an algorithm? –An algorithm is a finite, explicit step-by-step procedure for solving a specific problem or accomplishing a specific goal. –We frequently talk about algorithms in mathematical terms, and many algorithms are expressed using notation borrowed from mathematics, but algorithms aren't necessarily mathematical in the operations performed, or in the results produced. – In general, an effective algorithm has these characteristics: – Explicit, complete, and precise initial conditions; – A finite, complete, unbroken – Explicit, complete, and precise terminal (stopping) conditions
  • 6. How are mathematical statements and algorithms related? 5(𝐹− 32) = 9 𝐶 – First, convert expression into a form that expresses C as a function of F: C=5/9 * (F – 32) – Now it's a straightforward task to write an algorithm (based on the standard order of arithmetic operations) to convert from Fahrenheit to Celsius. – Start with a given temperature in degrees Fahrenheit. – Subtract 32 from the value used in step # 1. – Multiply the result of step # 2 by 5. – Divide the result of step # 3 by 9. – The result of step # 4 is the temperature in degrees Celsius.
  • 7. What do algorithms have to do with computers? – Computer programming consists, in large part, of creating unambiguous, step-by-step procedures for the computer to follow, to produce specific results. In other words, we might say that computer programming is almost all about algorithms. – In many respects, computers are electronic idiot savants: they can perform amazing feats of calculation and memory, but without our help, they're almost totally incompetent when it comes to applying those abilities to practical problems. – Want to compute the sine of an angle? How about computing the natural logarithm of a number? These tasks are easy for a computer –, in most modern computers, these operations are built into the CPU itself. – But if you want to plot the graph of y=sin x on the screen, or balance your cheque book, or compute the area of the region 1≤x≤100,0≤y≤1/x, the computer is helpless – until someone writes algorithms to accomplish these tasks, and “teaches” them to the computer.
  • 8. Pseudo Code vs Algorithm
  • 9. HOME WORK DO Q1: Describe the steps involved in problem solving.
  • 10. THANK YOU MEET YOU NEXT CLASS!