0% found this document useful (0 votes)
0 views

Unit-1_SummaryNotes

The document outlines the fundamentals of algorithms, including their characteristics, types, and the relationship between algorithms and programs. It discusses how to display algorithms through written descriptions, flowcharts, and pseudocode, as well as the concepts of variables and constants. Additionally, it covers sorting and searching algorithms, decomposition, and abstraction in computational thinking.

Uploaded by

Coraline Jones
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Unit-1_SummaryNotes

The document outlines the fundamentals of algorithms, including their characteristics, types, and the relationship between algorithms and programs. It discusses how to display algorithms through written descriptions, flowcharts, and pseudocode, as well as the concepts of variables and constants. Additionally, it covers sorting and searching algorithms, decomposition, and abstraction in computational thinking.

Uploaded by

Coraline Jones
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Unit – 1:

1. Chapter 1: Understanding Algorithms


Characteristics of algorithm: 5 steps/ characteristics.
1. Clear Instructions
2. Sequence of steps
3. Selection/ Iteration
4. Iteration/ Selection
5. Result @ Output
Clear Instruction: means you’ve to give your program/ algorithm a specific instructions such as, go straight to 500 meters and turn left.
Sequence of steps: means a set of instructions that occurs when you a program for example, in seminar, there are modules of topics.
Selection: means when you reach a certain condition you are given with 2 or more choices and you’ve to select one. (Cross Road)
Iteration: means it will execute a process again and again until it reached it specified condition.
Result: means the final value (or) result of the process.
Successful Algorithms.
To make successful algorithms: there are 3 types – 1. Accuracy, 2. Consistency, 3. Efficiency.
1. Accuracy: getting expected result (or) value, input and output value is not fixed.
2. Consistency: getting the same result every time you ran the program, output will be same as long as input is.
3. Efficiency: the program should take only the amount of time it needs to load (or) run, not more than that.
Relationship between algorithms and programs
Relationship between algorithm and program is that they are closely related, but they are not same.
Algorithm is more like a blue-print of the program (or) detailed design solution for the problem.
Program is more like an actual building or program that you can see or use it. (or) when that detailed design solution is implemented.
Displaying an algorithm
To display an algorithm, there are so many ways that we can use. But we’ve learnt 3 ways. Those 3 ways are: 1. Written description, 2.
Flowchart, 3. Pseudocode.
1. Written Description: it like taking notes and writing down the steps that occurs in our program. Simplest and Easiest way to describe.
2. Flowchart: is a diagram which will show the workflow of the algorithm/ program. It uses symbols/ shapes to describe its workflow. We use
capsule (indicates start and end of the program), rounded rectangle (indicates a process), diamond (indicates decision to be make), skew
(indicates input and output from program), arrow (indicates the flow of the algorithm)
3. Pseudocode: is code-like language but it is not actual programming language. We use pseudocode to focus on the efficiency and logics of
our programs without having to consider the rules of programming languages.
Variable and Constant
Variable: it is a tool/ box/ container that will hold the data that user gives. The data that we stored inside a variable is called value. The name
of variable is called identifier.
The name of the variable should be descriptive, not too long (or) too short. We can use camelCase and snake_case to write the name of
variable.
Constant is similar to variable but there is one difference, the value inside a constant is fixed whereas in variable its not.
Arithmetic Operator
Inside arithmetic operator: we’ve 7 operators.
Addition + Python: (+)
Subtraction - Python: (-)
Multiplication x Python: (*)
Real Division ÷ Python: (/) forward slash
Quotient ÷ Python: (//) floor division
Modulus ÷ Python: (%)
Power ^ Python: (**)

2. Creating Algorithms
Selection: to draw in a flowchart, we’ve to use diamond and arrow to indicate/ describe a whole process.
Iteration: to draw in a flowchart, we’ve to use round rectangle, diamond, skew and arrow to indicate the process.
3. Sorting and Searching Algorithms
There are many different sorting algorithms but we’ve learnt 2 types sorting algorithm. These are – Bubble sort and Merge Sort.
Bubble Sort: Page 16
Merge Sort: It will break out the list into the smaller sub-list and then it will break down that sub-list again until we reach the size of list is
one. After that it will sort and combined it into the big data/ complete list.
Efficiency of Sorting Algorithm: it will decide the number of times it take to sort with bigger data.
There are 3 types of searching algorithms. These are Binary, Linear and Hash.
Linear: Page 20
Binary: It will find the median of the list. If the median is larger than the search key, then it will go left of the list, otherwise it will go the right
side of the list. This process will be repeated again and again until it found the search key or it searched/checked every item in the list.
Efficiency of Searching Algorithm: it will decide it with best and worst scenarios. For example, if the search key that we want to find is early
part of the list then, Linear search would be more suitable to use. But if the search key is later part of the list then, Binary search would be
more suitable.
4. Decomposition and Abstraction
Computational Thinking: subject vocab
Decomposition: It will break down the process into smaller part of it which is more manageable.
Abstraction: It will remove or hide unnecessary details from our program to focus more on the logic and efficiency of it.
Level of Abstraction: The higher the level of abstraction, less details are required.

When we break out the bigger problem into smaller problems and we provide solution of each of the problem. We called that solution as a
subprogram.

You might also like