Please enable JavaScript.
Coggle requires JavaScript to display documents.
computer science paper 2 - Coggle Diagram
computer science paper 2
designing, creating and refining algorithms
pseudocode
understanding the problem
Before an algorithm can be designed, it is important to check that the problem is completely understood. There are a number of basic things to know in order to really understand the problem
What are the inputs into the problem?
What will be the outputs of the problem?
In what order do instructions need to be carried out?
What decisions need to be made in the problem?
Are any areas of the problem repeated?
Once these basic things are understood, it is time to design the algorithm.
flow diagrams
2.1.1 computational thinking
abstraction
Abstraction is one of the four cornerstones of Computer Science. It involves filtering out – essentially, ignoring - the characteristics that we don't need in order to concentrate on those that we do.
Abstraction is the process of filtering out – ignoring - the characteristics of patterns that we don't need in order to concentrate on those that we do. It is also the filtering out of specific details. From this we can create something that is more useful.
example of abstraction
this is a good example as it has taken away useless info like what the distance is between stations and what else is around them
algorithmic thinking
Algorithms are step-by-step plans for solving problems. Algorithms can be designed using pseudocode and flow diagrams.
An algorithm should be seen as a starting point before writing a program. The finished program should follow the steps the algorithm describes.
decomposition
Decomposition involves breaking down a complex problem or system into smaller parts that are more manageable and easier to understand. The smaller parts can then be examined and solved, or designed individually, as they are simpler to work with.
If a problem is not decomposed, it is much harder to solve. Dealing with many different stages all at once is much more difficult than breaking a problem down into a number of smaller problems and solving each one, one at a time. Breaking the problem down into smaller parts means that each smaller problem can be examined in more detail.
Similarly, trying to understand how a complex system works is easier using decomposition. For example, understanding how a bicycle works is more straightforward if the whole bike is separated into smaller parts and each part is examined to see how it works in more detail.
Why do we need searching algorithms?
We often need to find one particular item of data amongst many hundreds, thousands, millions or more. For example, you might need to find someone’s phone number on your phone, or a particular business’s address in the UK.
This is why searching algorithms are important. Without them you would have to look at each item of data – each phone number or business address – individually, to see whether it is what you are looking for. In a large set of data, it will take a long time to do this. Instead, a searching algorithm can be used to help find the item of data you are looking for.
Why do we sort Algorithms?
A sorting algorithm will put items in a list into an order, such as alphabetical or numerical order. For example, a list of customer names could be sorted into alphabetical order by surname, or a list of people could be put into numerical order by age.
Sorting a list of items can take a long time, especially if it is a large list. A computer program can be created to do this, making sorting a list of data much easier.
linear search
A linear search if by far the easiest to code. Create an algorithm for a Linear Search (you may want to use Algorithmic Thinking section to help you).
binary search