12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 06/01/2020
Algorithmic Strategies
Download Tamil Nadu 12th 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.
Which of the following is an example of data structures?
List
Tuple
Dictionary
All of these.
2.
Which of the following is not an example of data structures?
Control statement
Structure
List
Dictionary
3.
Time complexity of bubble sort in best case is
θ (n)
θ (nlogn)
θ (n2)
θ (n(logn) 2)
4.
Which of the following is not a stable sorting algorithm?
Insertion sort
Quick sort
Merge sort
Selection sort
5.
From the following sorting algorithms which algorithm needs the minimum number of swaps?
Bubble sort
Insertion sort
Selection sort
All the above
6.
What is best algorithm?
7.
What is algorithmic solution?
8.
What is searching? Write its types.
9.
10.
What is an Algorithm?
11.
Write a pseudo code that defines Fibonacci Iterative algorithm with Dynamic programming approach.
12.
Write a pseudo code for bubble sort algorithm
13.
What do you understand by Dynamic programming?
14.
Write a note on Asymptotic notation.
15.
List the characteristics of an algorithm.
16.
Explain the selection sort Algorithm with an example.
17.
Explain complexity of an algorithm.
18.
Explain the Bubble sort algorithm with example.
19.
What is Binary search? Discuss with example
1.
(d)
All of these.
2.
(a)
Control statement
3.
(a)
θ (n)
4.
(d)
Selection sort
5.
(c)
Selection sort
6.
The best algorithm to solve a given problem is one that requires less space in memory and takes less time to execute its instructions to generate output.
7.
An algorithm that yields expected output for a valid input is called an algorithmic solution
8.
A searching algorithm is the step-by step procedure used to locate specific data among a collection of data. There are two types of searching are.
(i) Linear Search
(ii) Binary Search
9.
10.
An algorithm is a finite set of instructions to accomplish a particular task. It is a step-by-step procedure for solving a given problem.
11.
The following shows a simple Dynamic programming approach for the generation of Fibonacci series.
Initialize f0 = 0,f1 =1
Step 1 - Print the initial values of Fibonacci f0 and f1
Step 2 - Calculate fibanocci fib \(\leftarrow \) f0+ f1
Step 3 - Assign f0\(\leftarrow \) fl , f1\(\leftarrow \) fib
Step 4 - Print the next consecutive value of fibanocci fib
step 5 - Goto step-2 and repeat until the specified number of terms generated
For example if we generate fibobnacci series upto 10 digits, the algorithm will generate the series as shown below:
The Fibonacci series is : 0 1 1 2 3 5 8 13 21 34 55
12.
(i) Start with the first element i.e., index = 0, compare the current element with the next element of the array.
(ii) If the current element is greater than the next element of the array, swap them.
(iii) If the current element is less than the next or right side of the element, move to the next element. Go to Step 1 and repeat until end of the index is reached.
13.
(i) Dynamic programming is an algorithmic design method that can be used when the solution to a problem can be viewed as the result of a sequence of decisions.
(ii) Dynamic programming approach is similar to divide and conquer. The given problem is divided into smaller and yet smaller possible sub-problems.
(iii) Dynamic programming is used whenever problems can be divided into similar sub-problems. So that their results can be re-used to complete the process.
(iv) Dynamic programming approaches are used to find the solution in optimized way. For every inner subproblem, dynamic algorithm will try to check the results of the previously solved sub-problems. The solutions of overlapped sub-problems are combined in order to get the better solution.
14.
Asymptotic Notations are languages that uses meaningful statements about time and space complexity. The following three asymptotic notations are mostly used to represent time complexity of algorithms:
(i) Big O: Big O is often used to describe the worst -case of an algorithm.
(ii) Big \(\Omega \):Big Omega is the reverse Big O, if Big O is used to describe the upper bound (worst - case) of a asymptotic function, Big Omega is used to describe the lower bound (best -case).
(iii) Big \(\Theta \):When an algorithm has complexity with lower bound = upper bound, Say that an algorithm has a complexity O(n log n) and \(\Omega \) (n log n), it's actually has the complexity \(\Theta \) (n log n), which means the running time of that algorithm always falls in n log n in the best-case and worst-case.
15.
(i) Input
(ii) Output
(iii) Finiteness
(iv) Definiteness
(v) Effectiveness
(vi) Correctness
(vii) Simplicity
(viii) Unambiguous
(ix) Feasibility
(x) Portable
(xi) Independent
16.
(i) The selection sort is a simple sorting algorithm that improves on the performance of bubble sort by making only one exchange for every pass through the list.
(ii) This algorithm will first find the smallest elements in array and swap it with the element in the first position of an array, then it will find the second smallest element and swap that element with the element in the second position, and it will continue until the entire array is sorted in respective order.
(iii) This algorithm repeatedly selects the next smallest element and swaps in into the right place for every pass. Hence it is called selection sort.
Pseudo code:
(i) Start from the first element i.e., index-(), we search the smallest element in the array, and replace it with the element in the first position.
(ii) Now we move on to the second element position, and look for smallest element present in the sub-array, from starting index to till the last index of sub - array.
(iii) Now replace the second smallest identified in step-2 at the second position in the or original array, or also called first position in the sub array.
(iv) This is repeated, until the array is completely sorted.
(v) Let's consider an array with values {13, 16, 11, 18, 14, 15}
(vi) Below, we have a pictorial representation of how selection sort will sort the given array respective order.
(i) In the first pass, the smallest element will be 11, so it will be placed at the first position.
(ii) After that, next smallest element will be searched from an array.
(iii) Then leaving the first element, next smallest element will be searched. It get 13 as smallest, so it will be placed at the second position.
(iv) Then leaving 11 and 13. It will search for the next smallest element and put it at third position and keep doing this until array is sorted.
(v) Finally, it will get the sorted array end of the pass.
17.
Suppose A is an algorithm and n is the size of input data, the time and space used by the algorithm A are the two main factors, which decide the efficiency of A.
(i) Time Factor: Time is measured by counting the number of key operations like comparisons in the sorting algorithm.
(ii) Space Factor: Space is measured by the maximum memory space required by the algorithm. The complexity of an algorithm f (n) gives the running time and/or the storage space required by the algorithm in terms of n as the size of input data.
(iii) Time Complexity: The Time complexity of an algorithm is given by the number of steps taken by the algorithm to complete the process.
(iv) Space Complexity: Space complexity of an algorithm is the amount of memory required to run to its completion. The space required by an algorithm is equal to the sum of the following two components:
A fixed part is defined as the total space required to store certain data and variables for an algorithm. For example, simple variables and constants used in an algorithm.
A variable part is defined as the total space required by variables, which sizes depends on the problem and its iteration. For example: recursion used to calculate factorial of a given value n.
18.
Bubble sort algorithm:
(i) Bubble sort algorithm simple sorting algorithm. The algorithm starts at the beginning of the list of values stored in an array. It compares each pair of adjacent elements and swaps them if they are in the unsorted order.
(ii) This comparison and passed to be continued until no swaps are needed, which indicates that the list of values stored in an array is sorted. The algorithm is a comparison sort, is named for the way smaller elements "bubble" to the top of the list.
(iii) Although the algorithm is simple, it is too slow and less efficient when compared to insertion sort and other sorting methods.
(iv) Assume list is an array of n elements. The swap function swaps the values of the given array elements.
Procedure :
(i) Start with the first element i.e., index = 0, compare the current element with the next element of the array.
(ii) If the current element is greater than the next element of the array, swap them.
(iii) If the current element is less than the next or right side of the element, move to the next element. Go to Step 1 and repeat until the end of the index is reached.
(iv) Let's consider an array with values {15, 11, 16, 12, 14, 13} Below, we have a pictorial representation of how bubble sort will sort the given array.
(v) The above pictorial example is for iteration-d. Similarly, remaining iteration can be done. The final iteration will give the sorted array. At the end of all the iterations we will get the sorted values in an array as given below:
| 11 | 12 | 13 | 14 | 15 | 16 |
19.
Binary Search:
Binary search also called half-interval search algorithm. It finds the position of a search element within a sorted array. The binary search algorithm can be done as a divide- and -conquer search algorithm and executes in logarithmic time.
Pseudo Code:
Start with the middle element:
(i) If the search element is equal to the middle element of the array i.e., the middle value = number of elements in array/2, then return the index of the middle element.
(ii) If not, then compare the middle element with the search value,
(iii) If the search element is greater than the number in the middle index, then select the elements to the right side of the middle index, and go to Step-1.
(iv) If the search element is less than the number in the middle index, then select the elements to the left side of the middle index, and start with Step-1.
(v) When a match is found, display success message with the index of the element matched.
(vi) If no match is found for all comparisons, then display unsuccessful message.
Binary Search Working principles :
(i) List of elements in an array must be sorted first for Binary search. The following example describes the step by step operation of binary search.
(ii) Consider the following array of elements, the array. is being sorted so itenables to do the binary searçh algorithm. Let us assume that the search element is 60 and we need to search the location or index of search element 60 using binary search.

(iii) First, we find index of middle element of. the array byusing this formula:
mid = low + (high - low) /2
(iv) Here it is, 0 + (9-0)/2=4 (fractional part ignored). So, 4 is thè mid value of the array.

(v) Now compare the search element with the value stored at mid value location 4. The value stored at location or index 4 is 50, which is not match with search element. As the search value 60 is greater than 50.

(vi) Now we change our low to mid+1 and find the new mid value again using the formula.
low = mid + 1
mid = low + (high - low) / 2
(vii) Our new mid is 7 now. We compare the value stored at location 7 with our target value 60.

(viii) The value stored at location or index 7 is not a match with search element, rather it is more than what we are looking for. So, the search element must be in the lower part from the current mid value location.

(ix) The search element still not found. Hence, we calculated the mid again by using the formula.
high = mid -1
mid = low +(high - low)/2
Now the mid value is 5.

(x) Now we compare the value stored at location 5 with our search element. We found that it is a match.

(xi) We can conclude that the search element 60 is found at locationor index 5. For example if we take the search element as 95, For this value this binary search algorithm return unsucessful result.
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards