SlideShare a Scribd company logo
1 of 48
Download to read offline
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 algorithms1Techglyphs
 
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 BenetisEimantas
 
Data Comes in Shapes
Data Comes in ShapesData Comes in Shapes
Data Comes in ShapesTim Poston
 
Introduction to theory of computation
Introduction to theory of computationIntroduction to theory of computation
Introduction to theory of computationVinod Tyagi
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine LearningPranav Ainavolu
 
Introduction to calculus
Introduction to calculusIntroduction to calculus
Introduction to calculussheetslibrary
 
Traveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed EnvironmentTraveling Salesman Problem in Distributed Environment
Traveling Salesman Problem in Distributed Environmentcsandit
 
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTTRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENT
TRAVELING SALESMAN PROBLEM IN DISTRIBUTED ENVIRONMENTcscpconf
 
5.5 back track
5.5 back track5.5 back track
5.5 back trackKrish_ver2
 
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 notesProf. Dr. K. Adisesha
 
A Survey Of NP-Complete Puzzles
A Survey Of NP-Complete PuzzlesA Survey Of NP-Complete Puzzles
A Survey Of NP-Complete PuzzlesAndrew Molina
 
Exploring Algorithms
Exploring AlgorithmsExploring Algorithms
Exploring AlgorithmsSri Prasanna
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1Abdul Khan
 

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
 
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
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1
 
lect
lectlect
lect
 

More from 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 usingShamik 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 networkShamik 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 learningShamik 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 detectionShamik Tiwari
 
An ensemble deep neural network
An ensemble deep neural networkAn ensemble deep neural network
An ensemble deep neural networkShamik 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 withShamik Tiwari
 
Questions and answers1
Questions and answers1Questions and answers1
Questions and answers1Shamik Tiwari
 
Deeplearning workshop
Deeplearning workshopDeeplearning workshop
Deeplearning workshopShamik 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

GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 

Recently uploaded (20)

GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 

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