Please enable JavaScript.
Coggle requires JavaScript to display documents.
Problem Solving (Computational
Thinking (Abstraction
Take away…
Problem Solving
Computational
Thinking
-
-
Decomposition
Break down a problem into smaller
problems, solvable individually to build
a solution
Overview
Comp thinking - thought process to form
a problem and express a solution
Learn to understand problem, find solution
w/ three parts: Decomp, Abstract, A.thinking
Application
3 methods take complex problem to
slick solution; methods are very natural
(crossing road, making a meal etc.)
Methods use to be comp scientists
Algorithm
Representation
Algorithm
Sequence of instructions for performance/resolution
Can use programming languages, but plan first
Planning methods: Flowcharts & pseudocode
Flowchart
Diagrammatic way to represent an algorithm
To plan, demonstrate data flow, symbol = element
Oval - Start/stop; Parallelogram - Input/Output
Rectangle - Process; Diamond - Selection/Decision
Rectangle, two lines - Sub-process; Arrow - data flow
Pseudo-code
Programming language, not specific to a program
No set standard (Edexcel has their own website)
Written Description
Alternative to pseudocode
Easier to translate pseudocode to programming language
than written description
Errors
Common: counter isn't incremented
Relational operators are wrong (</>)
Variable is reset, in a loop by accident
Sorting
Algorithm
Definitions
Step-by-step procedure to order a data set
(e.g. Bubble, Merge) Usually in ascending order
Bubble Sort
Simplest to understand, starts at left comparing values
If 1st > 2nd, not in order, swap; otherwise leave them be
Checks w/ 2nd, 3rd repeats; 3rd, 4th etc. until the end
It does this (each run through = pass) until one pass
involves no change
Merge Sort
"Divide-and-Conquer" more efficient than bubble sort
Makes lists into one value lists - smaller, easier to sort
Merges the list together in the right order until whole
Quickest sort, difficult to code, only need to know process
Searching
Algorithms
Definition
Step-by-step procedure to find item in a set
Helpful w/ a time-consuming job
Two to know: linear, binary
Linear search
Simple sequential search, begins at start until end
Stops when value found or reaches end, whatever first
Binary Search
For ordered data sets; halves list, throwing away
part that doesn't contain the searched value
The Right
Algorithm
Binary vs. Linear
Data needs to be sorted for bubble
Linear better for one-off search out of order
Binary better for regular searches, saving more time
Data sorting compensated for by quicker search time
Further decomposition, consideration
Each main step can become sub-program
Solution influenced by inputs available,
and required outputs; Algorithm's design
depends on inputs available and desired outputs
Coding
Hi-level can be used to program algorithm
IDE - Integrated development system
(software which provides tools for soft. developers)
Is where the program is typed in to from flow/pseudocode