11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil இயற்கை வேளாண்மை,சுற்றுச்சூழல் -செய்யுள் - மனோன்மணீயம் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil என்னுயிர் என்பேன் -துணைப்பாடம் - இசைத்தமிழர் இருவர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மொழி கலை -செய்யுள் - ஒவ்வொரு புல்லையும் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - இலக்கணம் - பகுபத உறுப்புகள் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - துணைப்பாடம் - வாடிவாசல் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - குறுந்தொகை Important Questions And Answers Study Material - QB365 Set A

Published on: 13/05/2022
QB365 provides detailed and simple solution for every Creative Questions in class 11 Computer Science Subject. It will helps to get more idea about question pattern in every Creative questions with solution.
latest Creative QuestionsDownload Tamil Nadu 11th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
Design a recursive algorithm to compute an, We constructed an iterative algorithm to compute an in Example 8.5. an can be defined recursively as
\(a^n= \begin{cases}1 & \text { if } \mathrm{n}=0 \\ a^n \times a^{n -1} & \text { otherwise }\end{cases}\)
2.
Explain recursive - problem solving.
3.
Customers are waiting in a line at a counter. The man at the counter wants to know how many customers are waiting in the line.
4.
Give an example for loop invariant.
5.
Explain the outline of recursive problem-solving technique.
1.
The recursive definition can be expressed as a recursive solver for computing power(a, n).
power (a, n)
-- inputs: n is an integer, n \(\ge\) 0
-- outputs : an
if n = 0 -- base case
1
else --recursion step
a x power (a, n-1)
The recursive process with solvers for calculating power(2, 5).·
The recursive process resulting from power(2, 5)
power (2,5)
= 2 x power (2,4)
= 2 x 2 x power(2,3)
= 2 x 2 x 2 x power(2, 2)
= 2 x 2 x 2 x 2 x power (2,1)
= 2 x 2 x 2 x 2 x 2 x power (2,0)
= 2 x 2 x 2 x 2 x 2 x 1
= 2 x 2 x 2 x 2 x 2
= 2 x 2 x 2 x 4·
= 2 x 2 x 8
= 2 x 16
= 32
2.
To solve a problem recursively, the solver reduces the problem to sub-problems, and calls another instance of the solver, known as sub-solver, to solve the sub-problem. The input ,size to a sub-problem is smaller than the input size to the original problem. When the solver calls a sub-solver, it is known as recursive call. The magic of recursion allows the solver to assume that the sub-solver (recursive call) outputs the solution to the sub-problem. Then, from the, solution to the sub-problem, the solver constructs the solution to the given problem.
As the sub-solvers go on reducing the problem into sub-problems of smaller sizes, eventually the sub-problem becomes small enough to be solved directly, without recursion. Therefore, a recursive solver has two cases:
1. Base case: The problem size is small enough to be solved directly. Output the solution. here must be at least one base case.
2. R-ecursion step: The problem size is not small enough. Deconstruct the problem into a sub-problem, strictly smaller in size than the given problem. Call a sub-solver to solve the sub problem. Assume that the sub-solver outputs the solution to the sub problem. Construct the solution to the given problem.
This outline of recursive problem solving technique is shown below.
solver (input)
if input is small enough
construct solution
else
find sub_Problems of reduced
input
solutions to sub problems =
solver for each sub .Problem
construct solution to the
problem from
solutions to the sub_problems
Whenever we solve a problem using recursion, we have to ensure these two cases: In the recursion step, the size of the input to the recursive call is strictly smaller than the size of the given input, and there is at least one base case.
3.
Customers are waiting in a line at a counter. The man at the counter wants to know how many customers are waiting in the line.

Instead of counting the length himself, he asks customer A for the length of the line with him at the head, customer A asks customer B for the length of the line with customer B at the head, and so on. When the query reaches the last customer in the line, E, since there is no one behind him, he replies 1 to D who asked him. D replies 1 + 1 = 2 to C, C replies 1 + 2 = 3 to B, B replies 1 + 3 = 4 to A, and A replies 1 + 4 = 5 to the man in the counter
4.
The loop invariant is true in four crucial points in a loop. Using the loop invariant, we can construct the loop and reason about the properties of the variables at these points.
Example:
Design an iterative algorithm to compute an , Let us name the algorithm power(a, n).
For example,
power(10, 4) = 10000
power (5 , 3) = 125
power (2 , 5) = 32
Algorithm power (a, n) computes an by multiplying a cumulatively n times.

The specification and the loop invariant are shown as comments.
power (a, n)
-- inputs: n is a positive integer
-- outputs: p = an
p, i := 1 ,0
while i \(\neq \) n
-- loop invariant: p = a i
p, i:=p x a, i+ 1
The step by step execution of power (2, 5) is shown in Table. Each row shows the values of the two variables p and i at the end of an iteration, and how they are calculated. We see that p = a' is true at the start of the loop, and remains true in each row. Therefore, it is a loop invariant.
| iteration | p | p\(\times \)a | i | i+1 | ai |
| 0 1 2 3 4 5 |
1 2 4 8 16 32 |
1 \(\times \) 2 2 \(\times \) 2 4 \(\times \) 2 8 \(\times \) 2 16 \(\times \) 2 |
0 1 2 3 4 5 |
0+1 1+1 2+1 3+! 4+1 |
20 21 22 23 24 25 |
When the loop ends, p = a' is still true, but i = 5. Therefore, p = a5. In general, when the loop ends, p = an. Thus, we have verified that power(a, n) satisfies its specification.
5.
The outline of recursive problem-solving technique.
solver (input)
if the input is small enough
construct solution
else
find subproblems of reduced input solutions to subproblems = solver for each subproblem construct a solution to the problem from solutions to the subproblems
Whenever we solve a problem using recursion, we have to ensure these two cases: In the recursion step, the size of the input to the recursive call is strictly smaller than the size of the given input, and there is loop at least one base case.
11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - காவடிச்சிந்து Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - உரைநடை - மலை இடப்பெயர்கள் : ஓர் ஆய்வு Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - துணைப்பாடம் - யானை டாக்டர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - செய்யுள் - ஐங்குறுநூறு Important Questions And Answers Study Material - QB365 Set A
Tamilnadu Stateboard 11th Standard Subjects

Maths

Commerce

Economics

Biology

Business Maths and Statistics

Accountancy

Computer Science

Physics

Chemistry

Maths

Biology

Economics

Physics

Chemistry

History

Business Maths and Statistics

Computer Science

Accountancy

Computer Applications

History

Computer Technology

Commerce

Computer Applications

Computer Technology

Tamil

English

French
Tamilnadu Stateboard Standards