0% found this document useful (0 votes)
55 views15 pages

What Is Computational Thinking?

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 15

COMPUTATIONAL THINKING

WHAT IS COMPUTATIONAL THINKING?

 ‘Computational thinking is the thought processes involved in formulating a


problem and expressing its solution(s) in such a way that a computer—
human or machine—can effectively carry out.’

 ‘The mental activity for abstracting problems and formulating solutions that can be
automated.’

 ‘The process of recognizing aspects of computation in the world that surrounds us, and
applying tools and techniques from Computer Science to understand and reason about
both natural and artificial systems and processes.’

 ‘A mental orientation to formulating problems as conversions of some input to an


output and looking for algorithms to perform the conversions.

CORE STRATEGIES REGULARLY USED FOR PROBLEM SOLVING

1. Problem definition
2. Logical thinking
3. Algorithmic thinking
4. Decomposition
5. Generalization and Pattern Recognition
6. Abstraction
7. Modelling
8. Evaluation

OTHER PERIPHERAL CONCEPTS

1. Data Representation
2. Critical Thinking
3. Computer Science
4. Automation
5. Simulation/Visualization

COMPUTATIONAL THINKING IN DIFFERENT SITUATIONS

 CT can be applied by anyone who is attempting to solve a problem and have a computer
play a role in the solution.
 To a computer scientist, it means the study of algorithms and their application
to different problems. To a mathematician, it might mean carrying out long
division factoring or doing carries in addition or subtraction. A scientist might
think of it as the process of doing an experimental procedure.

 CT teaches an approach to problem-solving where the ultimate aim is to provide a


solution whose form means it is ready to be programmed into a computer.

 CT takes a relatively small subset of concepts – which just happen to be important to


CS – and uses them to construct a widely applicable, problem-solving approach.

SUMMARY

Computational thinking is an approach to problem-solving that involves using a


set of practices and principles from computer science to formulate a solution
that’s executable by a computer. It’s not just for programmers. In fact, it’s
applicable in a diverse array of fields.
LOGIC
WHAT IS A LOGIC?

 You may be surprised to hear those numerous mathematicians and


philosophers have defined human reasoning as a logical system. Logic, in
its broadest sense, deals with correct and incorrect ways to reason.

 Logic provides a way to tell the difference between incorrect and correct
thinking, and can therefore be defined as the Science of correct thinking.

THE STUDY CAN BE CATEGORISED INTO 2 WAYS:

 Inductive logic
 Deductive logic.

INDUCTIVE LOGIC

 Inductive logic is a type of reasoning that begins with a set of


observations or experiences from which conclusions can be derived with
some degree of certainty.

 Conclusions reached in an inductive system are necessarily uncertain and


are directly related to the number of experiences on which the
conclusion is based

 It is the act of making generalized conclusion based on specific scenarios

EXAMPLES OF INDUCTIVE LOGIC

 I got allergy when I ate strawberry for the past 3 times so I must be
allergic to strawberry (it might have caused by other reasons too but we
get conclusions with more experience like 5 or 6 times)

 Every quiz has been easy so the upcoming test will also be easy

DEDUCTIVE LOGIC

 Deductive logic, by contrast, begins by assuming that certain things are


absolutely true from which other facts must also be absolutely true.

 Any conclusions that are reached under deductive logic are absolutely,
irrefutably, and certainly true if the assumptions are true.
EXAMPLES OF DEDUCTIVE LOGIC

 All students of this class play violin, Sam is a Student of this class,
Hence Sam knows violin.

 In the conference all the people are aged above 40, Daniel was there in
the conference, Hence Daniel is above 40.

PREMISE: It is a statement that is assumed to be true and that is used


to justify a conclusion.

CONCLUSION: It is a statement of truth that must logically flow from the


premises.

3 MAIN LOGICS USED HERE ARE:


1. Symbolic logic
2. Boolean logic
3. Digital logic

SYMBOLIC LOGIC:
 Logic requires precision and an absence of ambiguity, but it can be difficult to meet
these requirements when using natural language.

 To help us manage our reasoning, mathematics gives us symbolic logic, which


recommends using symbols instead of natural language sentences

 It is a modern extension of Aristotelian logic where symbols, rather than phrases


drawn from human language, are used to represent statements of truth.

 Not only does that reduce the clutter, but it becomes more intuitive to treat each
proposition as a variable.

BOOLEAN LOGIC:

 It’s a form of logic that deals with statements having one of only two values: true
or false (usually). Different corresponding values could be used in other contexts: 1 or 0

 Boolean logic does not allow for uncertainties or for probabilities.

 In order to instruct computers to make logical decisions, we need a system of logic that
maps well onto this way of thinking
DIGITAL LOGIC:

 Digital logic is the manipulation of binary values through printed circuit board
technology that uses circuits and logic gates to construct the implementation of
computer operations. 

PREPOSITIONS
Statements in Boolean logic are also known as propositions, which have several
basic properties.
 A proposition can only have one value at any one time. In other words, a
single proposition can’t be both true and false simultaneously
 Second, propositions must have clear and unambiguous meaning

 Third, it’s possible to combine individual propositions to make more


complex ones (called compound propositions).

 A compound proposition is formed by combining simple propositions


with logical connectives, also known as logical operators.

LOGICAL OPERATORS

Logical operators, also known as logical connectives, are used to express logical
thought.

SIX MAIN OPERATORS USED

1. AND 4. IMPLIES
2. OR 5. IF AND ONLY IF
3. NOT 6. EQUIVALENCE

AND
 The technical name for this operator is conjunction. It chains propositions together in a
way that all of them must be true for the conclusion to be true.

 If anyone of these is false then the conclusion is also false.

OR
 The technical name for this operator is disjunction. This operator chains
propositions together in a way that at least one of them must be true for the conclusion
to be true also
NOT
 The technical name for this operator is negation. This operator doesn’t chain
propositions together itself,

 Rather it modifies a single proposition. Specifically, it flips the truth value.

IMPLIES

 The technical name for this operator is implication. Using this operator is to state
that there is a correlation between the two statements.

 If the first statement is true, then the second must be true also.

IF AND ONLY IF
 The technical name for this operator is biconditional. This behaves very similarly to
implication, but a biconditional means that the second proposition is influenced
solely by the first.

 If the first is true, the second is true. If the first is false, the second is false. No
exceptions.

EQUIVALENCE
 Variables P and Q are said to be equivalent if they have the same truth value.
The truth table for logical equivalence
PROBLEM DEFENITION
WHAT IS PROBLEM DEFENITION ?
 The problem definition specifies what task(s) are to be performed by the associated
software. The problem definition also serves as the software developer’s goal.

 A problem statement is usually one or two sentences to explain the problem your
process improvement project will address. In general, a problem statement will
outline the negative points of the current situation and explain why this matters

 Without such a goal it is impossible to know whether the problem has been solved,
impossible to say whether a computer application is correct.

 Without such a goal it is impossible to know whether the problem has been solved,
impossible to say whether a computer application is correct.

3 MAJOR PHASES IN PROBLEM DEFENITION :


 Analysis
 Design
 Implementation

ANALYSIS – It is all about defining the problem and is an important phase as


successful design and implementation is only possible given adequate analysis.

DESIGN – It is the design of the solution based on the analysis given has top level
design(outline) and top-down design(detailed)

IMPLEMENTATION – Final process where the problem is implemented into a


useful solution in real world that can be used by all

PROBLEM DEFENITION CONSISTS MAINLY OF REQUIREMENTS


 Functional requirements
 Non functional requirements

FUNCTIONAL REQUIREMENTS
 Specify the particular or the main task that need to be performed. Functional
requirements are features that allow the system to function as it was intended.

 If the functional requirements are not met, the system will not work. Functional
requirements are product features and focus on user requirements.

NON-FUNCTIONAL REQUIREMENTS
 Characteristics and constraints related to the solution. Non-functional requirements
include expectations for things like reliability, safety, security, performance,
delivery, and help facilities.

GOOD LIST OF FUCTIONAL REQUIREMENTS MUST BE


1. Clear
2. Consistent
3. Complete

CLEAR

 A clear requirement is one that is easily understood Clear requirements need to be


unambiguous and precise.

CONSISTENT

 Consistent requirements are those that do not contradict one another

COMLETE

 Completeness is perhaps the most elusive. It takes careful consideration to be


certain that every possible scenario has been considered and explained in one or
more requirement.

 Two scenarios that should always be included for completeness are how the
application begins and ends its execution.

 Another way that functional requirements may lack completeness is when they fail
to consider all possible combinations of situations.

 A good way to analyze for adequate completeness is to construct a state activity


table that lists all possible application states against all possible user actions
PROBLEM SOLVING
SYSTEMATIC APPROACH BY SCIENTISTS
 Form hypothesis
 Plan experiment
 Execute experiment
 Evaluate results

SYSTEMATIC APPROACH BY POLYO


 Understand the problem
 Devise the plan
 Execute the plan
 Review and extend

WHAT IS PROBLEM SOLVING

 Problem-solving involves transforming an undesirable state of affairs (the start


point) into a desirable state of affairs (the goal).

 The start point and the goal are intimately linked. By examining the start point, you
nail down exactly what is undesirable and why. In doing so, you reveal more about
what your goal should be

 Understanding the problem is the important process so solving a problem and you don’t
know what the problem will be an error so If someone else gave it to you, try restating
the problem in your own words.

 Try and represent the problem using pictures and diagrams. Humans deal better
with visual representations.

 There will be knowns and unknowns at the start. You should ensure that enough
information is known for you to form a solution. If there isn’t, make the unknowns
explicit

 Try describing how a working solution should look. Or perhaps describe how it should
work, but only at a very broad level (remember, details are no concern yet).

 If the end goal is more complicated, you could describe every desired
‘feature’ of the solution. In this case, you’d be writing a specification.
 As you develop your solution, keep comparing it to the specification to
make sure you’re solving the problem correctly.
IMPORTANT NOTE
 Whatever the problem, the key thing to remember is that a goal defines what needs to
be done and not how it should be done.

 Thinking about details like designs and algorithms at this stage is too early. Focus
instead on what your goal looks like.

 However, you specify the goal, make sure that your language is clear and specific. For
example,

 if you aim to improve the speed of the current system, don’t specify your end goal
simply as ‘it should be faster’. Give it measurable accuracy.

 Always write your problem definition and goal as though someone else will
eventually take what you’ve produced and verify for themselves that you’ve solved
the problem. This will force you to take a more objective, considered view.
LOGICAL THINKING AND ALOGORITHMIC THINKING

WHAT IS LOGICAL THINKING?

 Logic includes a set of principles that, when applied to arguments, allow us to


demonstrate what is true.

 All software applications depend upon some form of logical instructions because an
executing program must make choices

 Most programming languages uses a so – called IF instruction  forces to consider


cause effect relations

 A cause effect relationship consists of a logical condition (the cause) that forces the
program to perform some task (the effect)

WHAT IS ALOGORITHMIC THINKING?

 Logic and algorithms are not the same. Algorithms build on logic because, as
part of their work, they make logical decisions. The other part of their work is
‘stitching’ those decisions together.
 Algorithm is a sequence of clearly defined steps that describe a process to follow a
finite set of unambiguous instructions with clear start and end points.

 Algorithms are a way of specifying a multi-step task, and are especially useful
when we wish to explain to a third party (be it human or machine) how to carry out
steps with extreme precision.

 As with logic, humans already have an intuitive understanding of algorithms. But, at


the same time, a rich and precise science dictates exactly how algorithms work

INTUTION VS PRECISION

 While performing an algorithm we may come across intuitive thinking vs precisive


thinking an intuitive way is that ideas or solutions with common ways says add
sugar

 While precisive idea is the one with add 50 grams of sugar for some algorithm a
common outline algorithm is enough but as we move on we need to have a
precisive algorithm
DEFINING AN ALGORITHM
1. Collection of individual steps
2. Definiteness (one step--one meaning with precision)
3. Sequential
DECOMPOSITION

WHAT IS DECOMPOSITION?

 Decomposition techniques are often called divide and conquer strategies.

 The idea is to approach a single problem by separating (dividing) it into its


constituent subproblems, and then to solve (conquer) each sub- problem
individually

 By applying decomposition, you aim to end up with a number of sub-problems


that can be understood and solved individually.

 This may require you to apply the process recursively (see above). That is to say, the
problem is re-formed as a series of smaller problems that, while simpler, might be
still too complex,

 Decomposition is frequently taught as a technique for writing, known as outlining

 Another benefit to decomposition is that it allows programmers to easily copy and


reuse useful chunks of code for other programs

 Decomposition won’t result in a complete plan of action, but it can give you a
starting point for formulating one.

 For example, a fully decomposed problem definition can show all the individual tasks,
but doesn’t necessarily show the order in which you should tackle them
 Decomposition aids collaboration. If you decompose a problem well (so that the sub-
problems can be solved independently), then different people can work on different
tasks, possibly in parallel.

 Data decomposition is so important that there is an entire field of computing known


as data organization

EXAMPLES
GENERALISATION AND PATTERN RECOGNITION

WHAT IS A PATTERN?

 A pattern can either be seen physically or it can be observed


mathematically by applying algorithms

 It involves finding the similarities or patterns among small, decomposed


problems that can help us solve more complex problems more
efficiently.

WHY SHOULD WE LOOK FOR A PATTERN?

 As you analyze a problem and begin work on its solution, you’ll


probably notice that some elements repeat or are at least very similar to
one another.

 If you don’t automatically notice the patterns in a solution, you should


make an effort to seek them out because they are the first step to making
your solution more manageable and powerful.

RECOGNISING PATTERNS

 Look for nouns that appear repeatedly. These could correspond to objects
that your solution deals with.
 Look for verbs that appear repeatedly. These could be operations that
the solution carries out.
 Look for concrete descriptions. These could probably be substituted
by placeholders that vary in different situations. For example:
 Adjectives (‘red’, ‘long’, ‘smooth’) which indicate properties of things and
could be replaced by the property name (colour, size, texture)
 Actual numbers, which could be replaced with variables.

WHAT IS GENERALISATION?

 A generalization is a form of abstraction whereby common properties of specific


instances are formulated as general concepts or claims.

 Pattern generalisation is spotting things that are common between patterns. We can
represent parts of a system in general terms, including Variables, Constants, Key
Processes, repeated Processes, Inputs and Outputs.

 As a result, your solution becomes simpler because it contains fewer distinct concepts,
and it becomes more powerful because you can reuse it in other situations and
solutions

ABSTRACTION

WHAT IS AN ABSTRACTION?
abstraction is anything that allows us to concentrate on important characteristics while
deemphasizing less important, perhaps distracting, details.
A control structure is a mechanism for specifying the proper order in which
instructions must be performed. Algorithms are composed of five
fundamental control structures:

1.Sequential control
2.Selection
3.Repetition
4.Control abstraction
5.Concurrency

You might also like