SlideShare a Scribd company logo
Computational Thinking
and Problem Solving
DR. SHAMIK TIWARI
“The computer is incredibly fast, accurate, and
stupid. Man is incredibly slow, inaccurate, and
brilliant. The marriage of the two is a force beyond
calculations”
…………….Leo Cherne
When you program, you have to solve out few problems
such as:
How am I going to write this
How exactly will this work
What all functions will I need
All of these depend on your critical & logical thinking. You
need to analyze these things to go on to solve problems,
and build your program.
Computational Thinking is a problem-solving process
that includes the following characteristics.
 decomposition - breaking down a complex problem or
system into smaller, more manageable parts
 pattern recognition – looking for similarities among and
within problems
 abstraction – focusing on the important information only,
ignoring irrelevant detail
 algorithms - developing a step-by-step solution to the
problem, or the rules to follow to solve the problem
Computational thinking in practice
 A complex problem is one that, at first glance, we don't know how to solve
easily.
 Computational thinking involves taking that complex problem and
breaking it down into a series of small, more manageable problems
(decomposition). Each of these smaller problems can then be looked at
individually, considering how similar problems have been solved previously
(pattern recognition) and focusing only on the important details, while
ignoring irrelevant information (abstraction). Next, simple steps or rules to
solve each of the smaller problems can be designed (algorithms).
 Finally, these simple steps or rules are used to program a computer to help
solve the complex problem in the best way.
Decomposition
If you can't solve a problem, then there is an easier problem
you can solve: find it"
Decomposition
Part of being a computer scientist is breaking down a big
problem into the smaller problems that make it up. If you
can break down a big problem into smaller problems, then
you can give them to a computer to solve.
Look at an example, the equation to work out the roots
of a quadratic equation:
Pattern Recognition
 By noting the steps down to solve a problem, we can
often recognize patterns, and by giving a list of steps,
we are one step closer to creating an algorithm.
 we are often given a set of raw data and then are
asked to find the pattern behind it:
1, 4, 7, 10, 13, 16, 19, 22, 25, …
 Once we have recognized patterns, we need to put it in
its simplest terms so that it can be used whenever we
need to use it. For example, if you were studying the
patterns of how people speak, we might notice that all
proper English sentences have a subject and a
predicate.
 This is pretty easy with number sets, the above pattern
An=n+3.
ALGORITHM DESIGN
 Once we have our patterns and abstractions, we can
start to write the steps that a computer can use to solve
the problem. We do this by creating Algorithms.
Algorithms are not computer code, but are
independent instructions that could be turned into
compute code. We often write these independent
instructions as pseudo code.
Designing algorithms
 Determine the right steps
 Determine the correct order of the steps
 Follow the steps completely
 Verify that the algorithm is working correctly
 Determine if algorithm is the best" approach
for solving problem
Computational Thinking (Example-1)
(Decomposition+pattern recoginition+Abstraction+Algorithm)
Sum up all of the numbers between 1 & 200
You have 1 minute to add.
Your time starts
Answers?
Solution
If we break the problem up into smaller pieces, it
becomes easier to manage.
Let's start at the two ends. What is 200 + 1?
What is 199 + 2?
What is 198 + 3?
See a pattern?
 How many of these pairs will we have? What is
the last pair we will find? 100 + 101
 That means that we have 100 total pairs.
 If we have 100 total pairs of sums of 201, how do
we find the final total?
 What is 100 * 201?
 Can we do it easily with 2,000?
 How about 20,000?
 What stays the same? What is different?
 If we use abstractions to make our end goal something
that can change (say we name it "blank") then we can
make an algorithm that will work for any number
 Work through the problem until you ultimately get ? = ("blank"/2) *
("blank"+1)
 Do a few simple examples to show that the algorithm is correct for blanks=
2, 3, 4, & 5.
 "This is all to show that if you use the tools of
Computational Thinking (decomposition,
pattern matching, abstraction, and algorithms),
then you can figure out how to solve problems”
Computational Thinking (Example-2)
Konigsberg Bridge Problem
You may or may not have heard of a town in Prussia known
as Konigsberg. The people there had a very interesting
activity which came to be a puzzle among them. The town
had seven bridges which connected four pieces of land
(See Figure below). The task with which people challenged
each other was to walk over every bridge in the town
without crossing back over any bridge twice. You may
wonder why this was such a challenge or may even think
that it seems quite easy.
Were you able to find a path??
The puzzle was solved by mathematician Leonhard Euler
back in 1736, but it was not so much his solution but his way
of going about solving it that was revolutionary. He used
what are now core parts of a computer scientist’s
computational thinking toolkit.
What Euler realised was that the puzzle was easier to solve if
you threw away most of the information on the map of the
town. That is just the computational thinking idea of
abstraction: problems are easier to solve if you hide all
unnecessary information.
All you need for the bridge problem is information showing
the different land masses and how they are connected
(i.e. the bridges between them). He made it really simple
and drew small circles for each land mass (a circle for
each of the two islands and the two sides of the river). He
then drew lines between each pair of circles that were
connected by bridges. A computer scientist calls a picture,
or ‘representation’, like this a graph. The lines are called
the ‘edges’ and the circles the ‘nodes’ of the graph.
he problem now becomes a question of whether you can
visit every node in the graph following each edge once
and only once. The simplified picture given by the graph
allowed Euler to see, when combined with some logical
thinking, the answer to the problem.
These ideas became the foundation of what is now called
graph theory. Just as they helped Euler see a simpler
solution to the puzzle, graphs now help computer scientists
solve all sorts of problems and are the basis of all sorts of
computing, from the way find the best routes, to how
computers organize data to make it easier to search etc.
Having done this, Euler realised that you could show it was
impossible to come up with a route by thinking about
individual nodes and the number of edges connected to
them. Any suitable route must visit every node. It must also
involve every line (as they are the bridges).
all nodes must have an even number of edges connected
to them if there is such a route.
All the nodes on the Königsberg graph have an odd number
of edges, so there is no such tour possible.
City Tour Map
Starting at the hotel, plan a route
so that tourists can visit every
tourist attraction just once ending
up back at the hotel
One possible solution route
to the tour guide problem
The Knight’s Tour
Place the piece on square 1. By making only “knight” moves as in
chess (see below), find a series of moves so that the knight visits
every square exactly once, returning to where it started.
(Abstraction)
 A knight moves in an L-shape: one square along and
two squares up (in any direction. For example a piece
on square 1 can move to square 6, 7 or 9.
Abstraction
Each spot is a square on the
original board. Each line show a
possible square a knight could
jump to from a square.
 One possible solution
1-9-3-11-5-7-12-4-10-2-8-6-1
https://www.youtube.com/watch?v=VFcUgSYyRPg
Thanks

More Related Content

Similar to Criticalthinking

A sample Lab report on a game.
A sample Lab report on a game. A sample Lab report on a game.
A sample Lab report on a game.
Junayed Ahmed
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
Techglyphs
 
How to learn how to design your functions - Žygimantas Benetis
How to learn how to design your functions - Žygimantas BenetisHow to learn how to design your functions - Žygimantas Benetis
How to learn how to design your functions - Žygimantas Benetis
Eimantas
 
Data Comes in Shapes
Data Comes in ShapesData Comes in Shapes
Data Comes in Shapes
Tim Poston
 
Np completeness
Np completenessNp completeness
Np completeness
Muhammad Saim
 
Introduction to theory of computation
Introduction to theory of computationIntroduction to theory of computation
Introduction to theory of computation
Vinod Tyagi
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine Learning
Pranav Ainavolu
 
Introduction to calculus
Introduction to calculusIntroduction to calculus
Introduction to calculus
sheetslibrary
 
Traveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed EnvironmentTraveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed Environment
csandit
 
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTTRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
cscpconf
 
5.5 back track
5.5 back track5.5 back track
5.5 back track
Krish_ver2
 
CSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptxCSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptx
AjayPratap828815
 
integral calculus.pdf
integral calculus.pdfintegral calculus.pdf
integral calculus.pdf
AudreyMendoza6
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theoryNYversity
 
Analysis and Design of Algorithms notes
Analysis and Design of Algorithms  notesAnalysis and Design of Algorithms  notes
Analysis and Design of Algorithms notes
Prof. Dr. K. Adisesha
 
DS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .pptDS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .ppt
TanveerAhmed817946
 
Complex variable transformation presentation.pptx
Complex variable transformation presentation.pptxComplex variable transformation presentation.pptx
Complex variable transformation presentation.pptx
HuzaifaAhmad51
 
A Survey Of NP-Complete Puzzles
A Survey Of NP-Complete PuzzlesA Survey Of NP-Complete Puzzles
A Survey Of NP-Complete Puzzles
Andrew Molina
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
Aamir Shahzad
 
Exploring Algorithms
Exploring AlgorithmsExploring Algorithms
Exploring AlgorithmsSri Prasanna
 

Similar to Criticalthinking (20)

A sample Lab report on a game.
A sample Lab report on a game. A sample Lab report on a game.
A sample Lab report on a game.
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
 
How to learn how to design your functions - Žygimantas Benetis
How to learn how to design your functions - Žygimantas BenetisHow to learn how to design your functions - Žygimantas Benetis
How to learn how to design your functions - Žygimantas Benetis
 
Data Comes in Shapes
Data Comes in ShapesData Comes in Shapes
Data Comes in Shapes
 
Np completeness
Np completenessNp completeness
Np completeness
 
Introduction to theory of computation
Introduction to theory of computationIntroduction to theory of computation
Introduction to theory of computation
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine Learning
 
Introduction to calculus
Introduction to calculusIntroduction to calculus
Introduction to calculus
 
Traveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed EnvironmentTraveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed Environment
 
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTTRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
 
5.5 back track
5.5 back track5.5 back track
5.5 back track
 
CSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptxCSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptx
 
integral calculus.pdf
integral calculus.pdfintegral calculus.pdf
integral calculus.pdf
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theory
 
Analysis and Design of Algorithms notes
Analysis and Design of Algorithms  notesAnalysis and Design of Algorithms  notes
Analysis and Design of Algorithms notes
 
DS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .pptDS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .ppt
 
Complex variable transformation presentation.pptx
Complex variable transformation presentation.pptxComplex variable transformation presentation.pptx
Complex variable transformation presentation.pptx
 
A Survey Of NP-Complete Puzzles
A Survey Of NP-Complete PuzzlesA Survey Of NP-Complete Puzzles
A Survey Of NP-Complete Puzzles
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
 
Exploring Algorithms
Exploring AlgorithmsExploring Algorithms
Exploring Algorithms
 

More from Shamik Tiwari

Reserach data
Reserach dataReserach data
Reserach data
Shamik Tiwari
 
Prediction and visualisation of viral genome antigen using
Prediction and visualisation of viral genome antigen usingPrediction and visualisation of viral genome antigen using
Prediction and visualisation of viral genome antigen using
Shamik Tiwari
 
Dermatoscopy using multi layer perceptron, convolution neural network
Dermatoscopy using multi layer perceptron, convolution neural networkDermatoscopy using multi layer perceptron, convolution neural network
Dermatoscopy using multi layer perceptron, convolution neural network
Shamik Tiwari
 
Covid 19 diagnosis using x-ray images and deep learning
Covid 19 diagnosis using x-ray images and deep learningCovid 19 diagnosis using x-ray images and deep learning
Covid 19 diagnosis using x-ray images and deep learning
Shamik Tiwari
 
Convolutional capsule network for covid 19 detection
Convolutional capsule network for covid 19 detectionConvolutional capsule network for covid 19 detection
Convolutional capsule network for covid 19 detection
Shamik Tiwari
 
An ensemble deep neural network
An ensemble deep neural networkAn ensemble deep neural network
An ensemble deep neural network
Shamik Tiwari
 
A comparative study of deep learning models with
A comparative study of deep learning models withA comparative study of deep learning models with
A comparative study of deep learning models with
Shamik Tiwari
 
Yagaanddatascience
YagaanddatascienceYagaanddatascience
Yagaanddatascience
Shamik Tiwari
 
Ecg classification
Ecg classificationEcg classification
Ecg classification
Shamik Tiwari
 
Blurclassification
BlurclassificationBlurclassification
Blurclassification
Shamik Tiwari
 
Questions and answers1
Questions and answers1Questions and answers1
Questions and answers1
Shamik Tiwari
 
Publication
PublicationPublication
Publication
Shamik Tiwari
 
Yoga_anddatascience
Yoga_anddatascienceYoga_anddatascience
Yoga_anddatascience
Shamik Tiwari
 
Php1
Php1Php1
Conference plan
Conference planConference plan
Conference plan
Shamik Tiwari
 
Deeplearning workshop
Deeplearning workshopDeeplearning workshop
Deeplearning workshop
Shamik Tiwari
 

More from Shamik Tiwari (16)

Reserach data
Reserach dataReserach data
Reserach data
 
Prediction and visualisation of viral genome antigen using
Prediction and visualisation of viral genome antigen usingPrediction and visualisation of viral genome antigen using
Prediction and visualisation of viral genome antigen using
 
Dermatoscopy using multi layer perceptron, convolution neural network
Dermatoscopy using multi layer perceptron, convolution neural networkDermatoscopy using multi layer perceptron, convolution neural network
Dermatoscopy using multi layer perceptron, convolution neural network
 
Covid 19 diagnosis using x-ray images and deep learning
Covid 19 diagnosis using x-ray images and deep learningCovid 19 diagnosis using x-ray images and deep learning
Covid 19 diagnosis using x-ray images and deep learning
 
Convolutional capsule network for covid 19 detection
Convolutional capsule network for covid 19 detectionConvolutional capsule network for covid 19 detection
Convolutional capsule network for covid 19 detection
 
An ensemble deep neural network
An ensemble deep neural networkAn ensemble deep neural network
An ensemble deep neural network
 
A comparative study of deep learning models with
A comparative study of deep learning models withA comparative study of deep learning models with
A comparative study of deep learning models with
 
Yagaanddatascience
YagaanddatascienceYagaanddatascience
Yagaanddatascience
 
Ecg classification
Ecg classificationEcg classification
Ecg classification
 
Blurclassification
BlurclassificationBlurclassification
Blurclassification
 
Questions and answers1
Questions and answers1Questions and answers1
Questions and answers1
 
Publication
PublicationPublication
Publication
 
Yoga_anddatascience
Yoga_anddatascienceYoga_anddatascience
Yoga_anddatascience
 
Php1
Php1Php1
Php1
 
Conference plan
Conference planConference plan
Conference plan
 
Deeplearning workshop
Deeplearning workshopDeeplearning workshop
Deeplearning workshop
 

Recently uploaded

HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 

Recently uploaded (20)

HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 

Criticalthinking

  • 1. Computational Thinking and Problem Solving DR. SHAMIK TIWARI
  • 2.
  • 3. “The computer is incredibly fast, accurate, and stupid. Man is incredibly slow, inaccurate, and brilliant. The marriage of the two is a force beyond calculations” …………….Leo Cherne
  • 4. When you program, you have to solve out few problems such as: How am I going to write this How exactly will this work What all functions will I need All of these depend on your critical & logical thinking. You need to analyze these things to go on to solve problems, and build your program.
  • 5. Computational Thinking is a problem-solving process that includes the following characteristics.
  • 6.
  • 7.  decomposition - breaking down a complex problem or system into smaller, more manageable parts  pattern recognition – looking for similarities among and within problems  abstraction – focusing on the important information only, ignoring irrelevant detail  algorithms - developing a step-by-step solution to the problem, or the rules to follow to solve the problem
  • 8. Computational thinking in practice  A complex problem is one that, at first glance, we don't know how to solve easily.  Computational thinking involves taking that complex problem and breaking it down into a series of small, more manageable problems (decomposition). Each of these smaller problems can then be looked at individually, considering how similar problems have been solved previously (pattern recognition) and focusing only on the important details, while ignoring irrelevant information (abstraction). Next, simple steps or rules to solve each of the smaller problems can be designed (algorithms).  Finally, these simple steps or rules are used to program a computer to help solve the complex problem in the best way.
  • 9. Decomposition If you can't solve a problem, then there is an easier problem you can solve: find it"
  • 10. Decomposition Part of being a computer scientist is breaking down a big problem into the smaller problems that make it up. If you can break down a big problem into smaller problems, then you can give them to a computer to solve.
  • 11. Look at an example, the equation to work out the roots of a quadratic equation:
  • 12.
  • 13. Pattern Recognition  By noting the steps down to solve a problem, we can often recognize patterns, and by giving a list of steps, we are one step closer to creating an algorithm.
  • 14.  we are often given a set of raw data and then are asked to find the pattern behind it: 1, 4, 7, 10, 13, 16, 19, 22, 25, …
  • 15.  Once we have recognized patterns, we need to put it in its simplest terms so that it can be used whenever we need to use it. For example, if you were studying the patterns of how people speak, we might notice that all proper English sentences have a subject and a predicate.  This is pretty easy with number sets, the above pattern An=n+3.
  • 16. ALGORITHM DESIGN  Once we have our patterns and abstractions, we can start to write the steps that a computer can use to solve the problem. We do this by creating Algorithms. Algorithms are not computer code, but are independent instructions that could be turned into compute code. We often write these independent instructions as pseudo code.
  • 17. Designing algorithms  Determine the right steps  Determine the correct order of the steps  Follow the steps completely  Verify that the algorithm is working correctly  Determine if algorithm is the best" approach for solving problem
  • 18. Computational Thinking (Example-1) (Decomposition+pattern recoginition+Abstraction+Algorithm) Sum up all of the numbers between 1 & 200 You have 1 minute to add.
  • 21. Solution If we break the problem up into smaller pieces, it becomes easier to manage. Let's start at the two ends. What is 200 + 1? What is 199 + 2? What is 198 + 3? See a pattern?
  • 22.  How many of these pairs will we have? What is the last pair we will find? 100 + 101  That means that we have 100 total pairs.  If we have 100 total pairs of sums of 201, how do we find the final total?  What is 100 * 201?
  • 23.
  • 24.  Can we do it easily with 2,000?  How about 20,000?  What stays the same? What is different?  If we use abstractions to make our end goal something that can change (say we name it "blank") then we can make an algorithm that will work for any number
  • 25.  Work through the problem until you ultimately get ? = ("blank"/2) * ("blank"+1)  Do a few simple examples to show that the algorithm is correct for blanks= 2, 3, 4, & 5.
  • 26.  "This is all to show that if you use the tools of Computational Thinking (decomposition, pattern matching, abstraction, and algorithms), then you can figure out how to solve problems”
  • 27. Computational Thinking (Example-2) Konigsberg Bridge Problem You may or may not have heard of a town in Prussia known as Konigsberg. The people there had a very interesting activity which came to be a puzzle among them. The town had seven bridges which connected four pieces of land (See Figure below). The task with which people challenged each other was to walk over every bridge in the town without crossing back over any bridge twice. You may wonder why this was such a challenge or may even think that it seems quite easy.
  • 28.
  • 29. Were you able to find a path??
  • 30. The puzzle was solved by mathematician Leonhard Euler back in 1736, but it was not so much his solution but his way of going about solving it that was revolutionary. He used what are now core parts of a computer scientist’s computational thinking toolkit.
  • 31. What Euler realised was that the puzzle was easier to solve if you threw away most of the information on the map of the town. That is just the computational thinking idea of abstraction: problems are easier to solve if you hide all unnecessary information.
  • 32. All you need for the bridge problem is information showing the different land masses and how they are connected (i.e. the bridges between them). He made it really simple and drew small circles for each land mass (a circle for each of the two islands and the two sides of the river). He then drew lines between each pair of circles that were connected by bridges. A computer scientist calls a picture, or ‘representation’, like this a graph. The lines are called the ‘edges’ and the circles the ‘nodes’ of the graph.
  • 33.
  • 34. he problem now becomes a question of whether you can visit every node in the graph following each edge once and only once. The simplified picture given by the graph allowed Euler to see, when combined with some logical thinking, the answer to the problem.
  • 35. These ideas became the foundation of what is now called graph theory. Just as they helped Euler see a simpler solution to the puzzle, graphs now help computer scientists solve all sorts of problems and are the basis of all sorts of computing, from the way find the best routes, to how computers organize data to make it easier to search etc.
  • 36. Having done this, Euler realised that you could show it was impossible to come up with a route by thinking about individual nodes and the number of edges connected to them. Any suitable route must visit every node. It must also involve every line (as they are the bridges).
  • 37.
  • 38. all nodes must have an even number of edges connected to them if there is such a route. All the nodes on the Königsberg graph have an odd number of edges, so there is no such tour possible.
  • 39. City Tour Map Starting at the hotel, plan a route so that tourists can visit every tourist attraction just once ending up back at the hotel
  • 40. One possible solution route to the tour guide problem
  • 41. The Knight’s Tour Place the piece on square 1. By making only “knight” moves as in chess (see below), find a series of moves so that the knight visits every square exactly once, returning to where it started. (Abstraction)
  • 42.
  • 43.  A knight moves in an L-shape: one square along and two squares up (in any direction. For example a piece on square 1 can move to square 6, 7 or 9.
  • 44.
  • 45. Abstraction Each spot is a square on the original board. Each line show a possible square a knight could jump to from a square.
  • 46.  One possible solution 1-9-3-11-5-7-12-4-10-2-8-6-1