9th Computer Notes Unit 2 - Computational Thinking & Algorithms
9th Computer Notes Unit 2 - Computational Thinking & Algorithms
Following is the 9th class computer notes unit 2 according to the Federal Board of
Intermediate and Secondary Education (FBISE)
Logical thinking
Logical thinking refers to analyzing a particular situation or problem using reason
and accordingly reaching up to one or more decisions that are sensible.
Decomposition: Breaking down the larger problems into smaller/ manageable ones
and working on them one by one
Algorithm Design: This is the actual design of the solution. This involves creating a
step-by-step plan for the problem solution.
Concept Maps: A concept map is a graphical tool that represents concepts and
relationships between them. The concepts in these maps are represented as boxes
or circles, which relate to lines or arrows.
i. The first digit (area code) has no restrictions, so it can be any digit from 0 to 9.
ii. The second digit (area code) also has no restrictions, so it can also be any digit
from 0 to 9.
iii. The third digit (the first digit of the number part) cannot be 0, so there are 9
options (1 to 9).
iv. The remaining six digits (the number part) can each be any digit from 0 to 9, so
6
there are 10 possible combinations.
Therefore, the total number of possible telephone numbers with a given area code
6
is: 10×10×9×10 = =900,000,000
So, there are 8 possible routes from City A to City C passing by City B.
Give Long answers to the following
extended response questions (ERQs).
Q 1. Identify whether the given problems are
Decision Problems, Counting Problems or Search
Problems. Write your answer in front of each
problem given below:
a. Does a given binary string have an even number of zeros? Decision Problem
This problem involves determining whether a property holds true for a given input
(binary string). In this case, it’s determining if the number of zeros in the string is
even.
b. Flipping a coin results in Head or tails. I flip a coin 20 times, how many different
sequences of heads and tails are possible? Counting Problem
c. Does a certain Java program say “yes” to an empty input? Decision Problem
This problem involves determining whether a certain property holds true for a given
input (empty input in this case), i.e., whether the program outputs “yes” for an empty
input.
d. How many ways can the letters of the word TRIANGLE be arranged? Counting
Problem
e. N-queens problem: where the goal is to place eight queens on a chessboard such
that no queen attacks any other. Search Problem:
This problem involves searching for a solution that satisfies certain constraints. It’s
an example of a search problem where the solution space needs to be explored to
find a valid arrangement.
3×2×2=12
Decomposition: Breaking down the larger task of planning a birthday party into
smaller, more manageable parts and working on them one by one such as selecting
a theme, choosing a location, planning activities, arranging food, and managing
invitations. These smaller problems are referred as sub-problems. This way we
simplify the problem and solve it easily.
a) I, II, III
b) I, III, II
c) II, I, III
d) II, III, I
I. Counting Problems
a) l and II
b) l and III
c) ll and III
3. Computational thinking is
a) Programming
c) Coding
d) a,b and c
a. Sorting
b. Searching
c. Counting
d. Both a and b
a) Search
b) Traversal
c) Sort
Home