SlideShare a Scribd company logo
1
1
Programming, Computation, Simulation
Applications in Math & Physics
The Basics
Algorithm, Pseudo Code, Flowchart
Syeilendra Pramuditya
Department of Physics
Institut Teknologi Bandung
2
Algorithm
 Logical steps to solve a problem, that’s it!
 A process or set of rules to be followed in
calculations or other problem-solving
operations, especially by a computer.
 A finite sequence of well-defined,
computer-implementable instructions,
typically to solve a class of specific
problems or to perform a computation.
3
Algorithm
 Sample problem
 Find the largest number in a list of numbers of
random order
 39, 7, 68, 55, 3
 Algorithm
 Assume the first number in the set is the largest
number in the set.
 For each remaining number in the set: if this number is
larger than the current largest number, consider this
number to be the largest number in the set.
 When there are no numbers left in the set to iterate
over, consider the current largest number to be the
largest number of the set.
4
Flowchart
5
Flowchart
6
Pseudo Code
 A bridge between algorithm and actual coding
Input: A list of numbers a[N]
largest = a[0]
for each item in a, do
if item > largest, then largest = item
Output: The largest number in the list a[N]
7
General Steps in Programming in Physics
 Find a (physical) problem!
 Describe the problem with mathematical
modeling (get the equations)
 Make an algorithm to solve the problem
 Make a flowchart
 Make a pseudo code
 Develop the computer program

More Related Content

PDF
Integer sequence learning using Python
PDF
Algorithms
PDF
Fundamentals of algorithms
PPTX
Linear search-and-binary-search
PPTX
Binary search python
DOCX
Python Math Concepts Book
PPTX
Workshop 04 Review
PPTX
Binary search2
Integer sequence learning using Python
Algorithms
Fundamentals of algorithms
Linear search-and-binary-search
Binary search python
Python Math Concepts Book
Workshop 04 Review
Binary search2

What's hot (13)

PDF
What is Discrete Mathematics?
PPTX
Ai 8 puzzle problem
PPT
Pd Power Point
PPT
Aad introduction
PPTX
Pa1 session 1_recap
PPT
Bullseye Review Ch 1
PPTX
Searching techniques in Data Structure And Algorithm
PDF
mathematics
PPTX
Sequential & binary, linear search
PPT
Daa presentation 97
PPT
Introduction and Applications of Discrete Mathematics
PPT
proving non-computability
PDF
Intro to machine learning
What is Discrete Mathematics?
Ai 8 puzzle problem
Pd Power Point
Aad introduction
Pa1 session 1_recap
Bullseye Review Ch 1
Searching techniques in Data Structure And Algorithm
mathematics
Sequential & binary, linear search
Daa presentation 97
Introduction and Applications of Discrete Mathematics
proving non-computability
Intro to machine learning
Ad

Similar to SPSF01 - Algorithm (20)

PDF
Discrete structure ch 3 short question's
PPT
chapter 1
PPTX
Algorithm, Concepts in performance analysis
PDF
Design & Analysis Of Algorithm
PPTX
daa unit 1.pptx
PPT
467719275-Lecture-01 designe and alg.ppt
PPT
Lecture 01-2.ppt
PDF
Performance Analysis,Time complexity, Asymptotic Notations
PPT
Chap08
PPT
introegthnhhdfhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhppt
PPTX
IntroductionToAlgo_v1_1709293290768 (2).pptx
PPTX
9 big o-notation
PPTX
Algorithm analysis (All in one)
PPTX
application of algorithm Presentation1.pptx
PPTX
Chapter two
PPTX
Introduction to Artificial Intelligence...pptx
PPTX
Data Structure and Algorithms.pptx
PPTX
Chapter #1 (Introduction To Algorithms).pptx
PPTX
Lecture 5: Asymptotic analysis of algorithms
PPT
algorithms-1 master in computer application
Discrete structure ch 3 short question's
chapter 1
Algorithm, Concepts in performance analysis
Design & Analysis Of Algorithm
daa unit 1.pptx
467719275-Lecture-01 designe and alg.ppt
Lecture 01-2.ppt
Performance Analysis,Time complexity, Asymptotic Notations
Chap08
introegthnhhdfhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhppt
IntroductionToAlgo_v1_1709293290768 (2).pptx
9 big o-notation
Algorithm analysis (All in one)
application of algorithm Presentation1.pptx
Chapter two
Introduction to Artificial Intelligence...pptx
Data Structure and Algorithms.pptx
Chapter #1 (Introduction To Algorithms).pptx
Lecture 5: Asymptotic analysis of algorithms
algorithms-1 master in computer application
Ad

Recently uploaded (20)

PPTX
INTRODUCTION TO EVS | Concept of sustainability
PPTX
2Systematics of Living Organisms t-.pptx
PPTX
2. Earth - The Living Planet Module 2ELS
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PDF
Biophysics 2.pdffffffffffffffffffffffffff
PPT
protein biochemistry.ppt for university classes
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PPTX
2. Earth - The Living Planet earth and life
PDF
The scientific heritage No 166 (166) (2025)
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
PDF
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
PPTX
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PPTX
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
PPTX
BIOMOLECULES PPT........................
PDF
Placing the Near-Earth Object Impact Probability in Context
INTRODUCTION TO EVS | Concept of sustainability
2Systematics of Living Organisms t-.pptx
2. Earth - The Living Planet Module 2ELS
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
Biophysics 2.pdffffffffffffffffffffffffff
protein biochemistry.ppt for university classes
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
2. Earth - The Living Planet earth and life
The scientific heritage No 166 (166) (2025)
7. General Toxicologyfor clinical phrmacy.pptx
Introduction to Fisheries Biotechnology_Lesson 1.pptx
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
The KM-GBF monitoring framework – status & key messages.pptx
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
BIOMOLECULES PPT........................
Placing the Near-Earth Object Impact Probability in Context

SPSF01 - Algorithm

  • 1. 1 1 Programming, Computation, Simulation Applications in Math & Physics The Basics Algorithm, Pseudo Code, Flowchart Syeilendra Pramuditya Department of Physics Institut Teknologi Bandung
  • 2. 2 Algorithm  Logical steps to solve a problem, that’s it!  A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.  A finite sequence of well-defined, computer-implementable instructions, typically to solve a class of specific problems or to perform a computation.
  • 3. 3 Algorithm  Sample problem  Find the largest number in a list of numbers of random order  39, 7, 68, 55, 3  Algorithm  Assume the first number in the set is the largest number in the set.  For each remaining number in the set: if this number is larger than the current largest number, consider this number to be the largest number in the set.  When there are no numbers left in the set to iterate over, consider the current largest number to be the largest number of the set.
  • 6. 6 Pseudo Code  A bridge between algorithm and actual coding Input: A list of numbers a[N] largest = a[0] for each item in a, do if item > largest, then largest = item Output: The largest number in the list a[N]
  • 7. 7 General Steps in Programming in Physics  Find a (physical) problem!  Describe the problem with mathematical modeling (get the equations)  Make an algorithm to solve the problem  Make a flowchart  Make a pseudo code  Develop the computer program