## What's hot

Algorithm: Quick-Sort
Algorithm: Quick-Sort
Tareq Hasan
Â
Data Structure (Queue)
Data Structure (Queue)
Â
Quicksort Presentation
Quicksort Presentation
irdginfo
Â
Asymptotic notation
Asymptotic notation
Dr Shashikant Athawale
Â
Branch and bound.ppt
Branch and bound.ppt
umairshams6
Â
Collision in Hashing.pptx
Collision in Hashing.pptx
NBACriteria2SICET
Â
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
Dr. Rajdeep Chatterjee
Â
Sorting
Sorting
Ashim Lamichhane
Â
Insertion sort algorithm power point presentation
Insertion sort algorithm power point presentation
University of Science and Technology Chitttagong
Â
Asymptotic Notation
Asymptotic Notation
Protap Mondal
Â
Analysis of Algorithm - Binary Search.pptx
Analysis of Algorithm - Binary Search.pptx
Maulana Abul Kalam Azad University of Technology
Â
Linear search-and-binary-search
Linear search-and-binary-search
International Islamic University
Â
Binary search algorithm
Binary search algorithm
maamir farooq
Â
strassen matrix multiplication algorithm
strassen matrix multiplication algorithm
evil eye
Â
Brute force-algorithm
Brute force-algorithm
9854098540
Â
Asymptotic notations
Asymptotic notations
Ehtisham Ali
Â
how to calclute time complexity of algortihm
how to calclute time complexity of algortihm
Sajid Marwat
Â
Analysis of algorithm
Analysis of algorithm
Rajendra Dangwal
Â
Searching
Searching
Ashim Lamichhane
Â
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS
Gokul Hari
Â

### What's hot(20)

Algorithm: Quick-Sort
Algorithm: Quick-Sort
Â
Data Structure (Queue)
Data Structure (Queue)
Â
Quicksort Presentation
Quicksort Presentation
Â
Asymptotic notation
Asymptotic notation
Â
Branch and bound.ppt
Branch and bound.ppt
Â
Collision in Hashing.pptx
Collision in Hashing.pptx
Â
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
Â
Sorting
Sorting
Â
Insertion sort algorithm power point presentation
Insertion sort algorithm power point presentation
Â
Asymptotic Notation
Asymptotic Notation
Â
Analysis of Algorithm - Binary Search.pptx
Analysis of Algorithm - Binary Search.pptx
Â
Linear search-and-binary-search
Linear search-and-binary-search
Â
Binary search algorithm
Binary search algorithm
Â
strassen matrix multiplication algorithm
strassen matrix multiplication algorithm
Â
Brute force-algorithm
Brute force-algorithm
Â
Asymptotic notations
Asymptotic notations
Â
how to calclute time complexity of algortihm
how to calclute time complexity of algortihm
Â
Analysis of algorithm
Analysis of algorithm
Â
Searching
Searching
Â
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS
Â

## More from NALESVPMEngg

a simple idealized machine used to recognize patterns within input taken from...
a simple idealized machine used to recognize patterns within input taken from...
NALESVPMEngg
Â
Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...
NALESVPMEngg
Â
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
NALESVPMEngg
Â
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
NALESVPMEngg
Â
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
NALESVPMEngg
Â
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
NALESVPMEngg
Â
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
NALESVPMEngg
Â
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
NALESVPMEngg
Â
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
NALESVPMEngg
Â
Wk5_UML_ActivityDiagram.pptx
Wk5_UML_ActivityDiagram.pptx
NALESVPMEngg
Â
TutorialUML.pptx
TutorialUML.pptx
NALESVPMEngg
Â
6 Use Case Modeling.pptx
6 Use Case Modeling.pptx
NALESVPMEngg
Â
Introduction To Data Structures.ppt
Introduction To Data Structures.ppt
NALESVPMEngg
Â

### More from NALESVPMEngg(13)

a simple idealized machine used to recognize patterns within input taken from...
a simple idealized machine used to recognize patterns within input taken from...
Â
Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...
Â
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
Â
Information retrieval is the process of accessing data resources. Usually doc...
Information retrieval is the process of accessing data resources. Usually doc...
Â
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Â
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Â
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
Â
Activity diagrams show the flow of one activity to another within a system or...
Activity diagrams show the flow of one activity to another within a system or...
Â
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...
Â
Wk5_UML_ActivityDiagram.pptx
Wk5_UML_ActivityDiagram.pptx
Â
TutorialUML.pptx
TutorialUML.pptx
Â
6 Use Case Modeling.pptx
6 Use Case Modeling.pptx
Â
Introduction To Data Structures.ppt
Introduction To Data Structures.ppt
Â

(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
Priyanka Aash
Â
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
Â
Step-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From Scratch
softsuave
Â
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
Priyanka Aash
Â
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
Â
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
Arpan Buwa
Â
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
ankush9927
Â
How UiPath Discovery Suite supports identification of Agentic Process Automat...
How UiPath Discovery Suite supports identification of Agentic Process Automat...
DianaGray10
Â
July Patch Tuesday
July Patch Tuesday
Ivanti
Â
Patch Tuesday de julio
Patch Tuesday de julio
Ivanti
Â
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
NicolÃĄs LopÃŠz
Â
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Â
(CISOPlatform Summit & SACON 2024) Workshop _ Most Dangerous Attack Technique...
(CISOPlatform Summit & SACON 2024) Workshop _ Most Dangerous Attack Technique...
Priyanka Aash
Â
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
Baishakhi Ray
Â
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
Â
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
Â
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
Â
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
DianaGray10
Â
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
alexjohnson7307
Â
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
Â

(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
Â
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
Â
Step-By-Step Process to Develop a Mobile App From Scratch
Step-By-Step Process to Develop a Mobile App From Scratch
Â
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
Â
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
Â
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
The Impact of the Internet of Things (IoT) on Smart Homes and Cities
Â
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
Â
How UiPath Discovery Suite supports identification of Agentic Process Automat...
How UiPath Discovery Suite supports identification of Agentic Process Automat...
Â
July Patch Tuesday
July Patch Tuesday
Â
Patch Tuesday de julio
Patch Tuesday de julio
Â
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Â
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Â
(CISOPlatform Summit & SACON 2024) Workshop _ Most Dangerous Attack Technique...
(CISOPlatform Summit & SACON 2024) Workshop _ Most Dangerous Attack Technique...
Â
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
Â
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Â
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Â
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Â
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Â
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
leewayhertz.com-Generative AI tech stack Frameworks infrastructure models and...
Â
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Â

### Introduction To Algorithms.ppt

• 1. Tuesday, March 28, 2023 1 Data Structures & Algorithms Represented By Nale Rajesh K. (Lecturer COE Malegaon (Bk)) Introduction To Algorithms
• 2. Tuesday, March 28, 2023 2 How do we solve problems? ī¯ We "just do" ī¯ Guesswork-and-luck ī¯ Trial-and-error ī¯ Experience (possibly someone else's) ī¯ "Scientifically"
• 3. Tuesday, March 28, 2023 3 0100111010110010101010101 0010101010101001100101010 1010100101101001110101010 1010010010111010011110101 010111110101010001101âĻ sterilize(saw,alcohol); raise_hammer(); lower hammer(fast); start(saw); /* etc. etc. */ Patient has elevated pressure in anterior parietal lobe The Problem-solving Process Problem specification Algorithm Program Executable (solution) Design Implementation Compilation "Doctor, my head hurts" Analysis 1. Sterilize cranial saw 2. Anaesthetize patient 3. Remove top of skull 4. Get the big spoon... 5. etc., etc.
• 4. Tuesday, March 28, 2023 4 sterilize(saw,alcohol); raise_hammer(); lower hammer(fast); start(saw); /* etc. etc. */ The Problem-solving Process Problem specification Algorithm Program Executable (solution) Analysis Design Implementation Compilation "Doctor, my head hurts" Patient has elevated pressure in anterior parietal lobe. 1. Sterilize cranial saw 2. Anaesthetize patient 3. Remove top of skull 4. Get the big spoon... 5. etc., etc. 01001110101100101010101010010 10101010100110010101010101001 011010011101010101010010010111 010011110101010111110101010001 10100001101...
• 5. Tuesday, March 28, 2023 5 The Problem-solving Process Problem specification Algorithm Program Executable (solution) Analysis Design Implementation Compilation
• 6. Tuesday, March 28, 2023 6 ī¯ A sequence of instructions specifying the steps required to accomplish some task ī¯ Named after: Muhammad ibn Musa al-Khwarizmi of Khowarezm (now Khiva in Uzbekistan) Algorithm
• 7. Tuesday, March 28, 2023 7 ī¯ A sequence of instructions describing how to do a task Algorithm â Working Definition [As opposed to actually executing the instructions]
• 8. Tuesday, March 28, 2023 8 Algorithm -- Examples ī¯ A cooking recipe ī¯ Assembly instructions for a model ī¯ The rules of how to play a game ī¯ VCR instructions ī¯ Description of a martial arts technique ī¯ Directions for driving from A to B ī¯ A knitting pattern ī¯ A car repair manual
• 9. Tuesday, March 28, 2023 9 Algorithm â Examples (cont) ī¯ Recipe for Almond and honey slice ī¯ Recipe for Arroz con pollo
• 10. Tuesday, March 28, 2023 10 Almond and Honey Slice 1/2 quantity Shotcrust Pastry 185 g unsalted butter 100 g castor sugar 5 tablespoons honey 50 ml cream 50 ml brandy or any other liqueur or spirit 300 g flaked almonds Preheat oven for 200Â° C Line a 30 cm ī´ 20 cm baking tray with baking paper, and then with pastry Bake blind for 20 minutes, then remove weights and foil Turn oven up to 220Â° C. Bring remaining ingredients to a boil, stirring. Spread evenly over pastry. Bake until topping is bubbling and has caramelised evenly, about 15 minutes. Cool before cutting into fingers or squares. From: Stephanie Alexander, The Cookâs Companion, Viking/Penguin, Ringwood, Victoria, 1996, p. 349.
• 11. Tuesday, March 28, 2023 11 Almond and Honey Slice 1/2 quantity Shotcrust Pastry 185 g unsalted butter 100 g castor sugar 5 tablespoons honey 50 ml cream 50 ml brandy or any other liqueur or spirit 300 g flaked almonds Preheat oven for 200Â° C Line a 30 cm ī´ 20 cm baking tray with baking paper, and then with pastry Bake blind for 20 minutes, then remove weights and foil Turn oven up to 220Â° C. Bring remaining ingredients to a boil, stirring. Spread evenly over pastry. Bake until topping is bubbling and has caramelised evenly, about 15 minutes. Cool before cutting into fingers or squares. Instructions are given in the order in which they are performed (âexecutedâ)
• 12. Tuesday, March 28, 2023 12 Correct Algorithm? Cut chicken into pieces and brown the pieces on all sides in a casserole dish in hot olive oil. Remove the chicken and to the juices in the casserole add garlic, onions and green peppers, and sautÃŠ until onion is golden. Add bay leaf, whole tomatoes, and chicken broth. When the broth boils add salt, saffron and rice. Arrange chicken on rice, cover casserole and bake in a moderate oven (350Â°F) for 20 minutes or until the rice is tender. Add beans and artichokes during last 10 minutes of cooking.
• 13. Tuesday, March 28, 2023 13 Cut chicken into pieces and brown the pieces on all sides in a casserole dish in hot olive oil. Remove the chicken and to the juices in the casserole add garlic, onions and green peppers, and sautÃŠ until onion is golden. Add bay leaf, whole tomatoes, and chicken broth. When the broth boils add salt, saffron and rice. Arrange chicken on rice, cover casserole and bake in a moderate oven (350Â°F) for 10 minutes. Add beans and artichokes. Cover, and bake for another 10 minutes or until rice is tender. Correct Algorithm?
• 14. Tuesday, March 28, 2023 14 From Algorithms to Programs Problem C Program Algorithm: A sequence of instructions describing how to do a task (or process)
• 15. Tuesday, March 28, 2023 15 Components of an Algorithm ī¯ Variables and values ī¯ Instructions ī¯ Sequences ī¯ Procedures ī¯ Selections ī¯ Repetitions ī¯ Documentation
• 16. Tuesday, March 28, 2023 16 Values ī¯ Represent quantities, amounts or measurements ī¯ May be numerical or alphabetical (or other things) ī¯ Often have a unit related to their purpose ī¯ Example: īŽ Recipe ingredients
• 17. Tuesday, March 28, 2023 17 Variables This jar can contain 10 cookies 50 grams of sugar 3 slices of cake etc. Values Variable īą Are containers for values places to store values
• 18. Tuesday, March 28, 2023 18 Restrictions on Variables ī¯ Variables may be restricted to contain a specific type of value
• 19. Tuesday, March 28, 2023 19 Components of an Algorithm īŧ Values and Variables ī¯ Instruction (a.k.a. primitive) ī¯ Sequence (of instructions) ī¯ Procedure (involving instructions) ī¯ Selection (between instructions) ī¯ Repetition (of instructions) ī¯ Documentation (beside instructions)
• 20. Tuesday, March 28, 2023 20 Instructions (Primitives) ī¯ Some action that is simple... ī¯ ...and unambiguous... ī¯ ...that the system knows about... ī¯ ...and should be able to actually do
• 21. Tuesday, March 28, 2023 21 Instructions â Examples ī¯ Take off your shoes ī¯ Count to 10 ī¯ Cut along dotted line ī¯ Knit 1 ī¯ Purl 2 ī¯ Pull rip-cord firmly ī¯ Sift 10 grams of arsenic Directions to perform specific actions on values and variables.
• 22. Tuesday, March 28, 2023 22 Instructions -- Application ī¯ Some instructions can only be applied to a specific type of values or variables ī¯ Examples:
• 23. Tuesday, March 28, 2023 23 Instructions (Primitives) -- Recommendations ī¯ When writing an algorithm, make each instruction simple and unambiguous ī¯ Example: Cut chicken into pieces and brown the pieces on all sides in a casserole dish in hot olive oil. Cut chicken into pieces. Heat olive oil in a casserole dish. Brown the chicken pieces in the casserole dish.
• 24. Tuesday, March 28, 2023 24 Instruction (Primitives) ī¯ When writing an algorithm, make the instructions simple and unambiguous. ī¯ Example: Cut chicken into pieces and brown the pieces on all sides in a casserole dish in hot olive oil. Cut chicken into pieces. Heat olive oil in a casserole dish. Brown the chicken pieces in the casserole dish. A âsequenceâ of simple instructions
Current LanguageEnglish
EspaÃąol
Portugues
FranÃ§ais
Deutsche
ÂŠ 2024 SlideShare from Scribd