11)What is computational thinking?
2)Steps to computational thinking
1)It is about thinking how a problem can be solved
2) state it in such a way that it is potentially solvable using an algorithm
Try to construct an algorithm to solve the problem
21)Define Abstraction
2)Define Data Abstraction
1) Representation arrived at by removing unnecessary details.
2)The details of how data are actually represented are hidden
31)How can computational problems be showed in a diagram?
input-info relevant to the problem, which could for example be passed as parameters to a subroutine.
Output- solution to the problem, which could be passed back from a subroutine.
A clear statement what the inputs and outputs of a problem are is a necessary first step in constructing a solution.
4Pros of specifying precondtions
ensures that the user knows what checks, if any, must be carried out before calling the subroutine.
user can be confident that necessary checks will be carried out in the subroutine itself =saving unnecessary coding.
Clear documentation of inputs, outputs and preconditions helps to
make the subroutine reusable=put in library of subroutines and called from any program with access to that library
5Use of reusbale componets
having components which have already been written, debugged and thoroughly tested will save time in completing the project.
61)Define caching
2)Pros
1)temporary storage of program instructions or data that have been used once and may be needed again shortly.
2)gives fast access to pages that have been recently looked at ( may be returned to)
=saves having to download pages again= using up bandwidth unnecessarily
71) Define Procedural abstraction
procedure to carry out a sequence of steps for achieving some task such as calculating a student's grade
8Example
To draw a house at a given position on the screen, the programmer
may write a procedure buildHouse() which uses the drawTriangle() and drawRectangle()
91)Define Problem decomposition
2)Define top-down technique
1)broken down into sub-problems before they can be solved.
2)problem into the major tasks to be performed;
each of these tasks is then further broken down into separate subtasks,
101)Pros of Problem decomposition
1)very much simpler to test and maintain.
relatively easy to find the modules which need to be changed,
111)Define Hierarchy chart
1)Tool for representing the structure of a program, showing how the modules relate to each other to form the complete solution.
12What three basic programming structures are used:
sequence — one statement following another
selection — if then else... endif and switch/case endswitch statements
iteration — while ... endwhile, do... until and for ... next loops
13Main ways to show algrothim
Flow diagrams and pseudocode
141)Define parallel
2)Define concurrent
1)requires multiple processors each executing different instructions simultaneously, with the goal of speeding up computations
2)takes place when several processes are running, with each in turn being given a slice of processor time.
151)Pros of Concurrent
2)Cons
1)the number of tasks completed in a given time is increased
Time that would be wasted by the processor waiting for the user to
input data or look at output is used on another task
2)large number of users and some , these programs will take longer to complete
161)Pros of Parallel
2)Cons
1)several tasks to be performed simultaneously by different processors. -browser can display several web pages in separate window
Graphics processors can quickly render a 3-D object by working simultaneously on individual components of the graphic
2)overhead in coordinating the processors and some tasks may run faster with a single processor than with multiple processors
17Methods to solve a problem
enumeration (listing all cases) ,simulation
theoretical approach ,creative solution
181)Define Enumeration
2)CON
1)algorithmic puzzles can be solved by exhaustive search — trying all possible solutions until the correct one is found.
2)inefficiency - in general, the number of possible solutions increases exponentially as the size of the problem increases.
191)Define simulation
1)process of designing a model of a real system in order to understand the behaviour of the system, and to evaluate various strategies for its operation.
Such problems include:population predictions queueing problems
201)Define probelm abstraction
1)involves removing details until the problem is represented in a way that it is possible to solve because it reduces to one that has already been solved
211)Define automation
1)with building and putting into action models to solve problems
221)Define backtracking
2)Define data minining
3)Define Big data
1 methodical way of trying out different sequences until you find one that leads to a solution.
2)process of digging through big data sets to discover hidden connections and predict future trends, typically involving the use of different kinds of software packages such as analytics tools
3)large sets of data that cannot be easily handled in a traditional database.
231) Define Intractable problems
2) Define Heuristic methods
algorithm may exist for their solution, it would take an unreasonably long time to find the solution. -Can be brute forced
2)An adequate solution may be achieved by trading optimality, completeness, accuracy or precision for speed
241)Define Performance modelling
process of simulating different user and system loads on a computer using a mathematical approximation,
rather than doing actual performance testing which may be difficult and expensive
251)Define pipelining
1)the technique of splitting tasks into smaller parts and overlapping the processing of each part of the task.