About Me

My photo
Vijayapur, Karnataka, India
I am interested in Teaching.

Tuesday 27 March 2018

Assignment-2 for IV Sem B CSE students "Design and Analysis of Algorithms"

Write an algorithm to find maximum and minimum from given list of array elements a[1-n] using divide and conquer approach. Find its time efficiency.

Write merge sort algorithm. Find its time efficiency.

Apply merge sort algorithm for given list of numbers 8  3 2 9 7 1 5 4

Apply merge sort algorithm for the characters M E R G E S O R T

Write quicksort algorithm.

Apply quicksort algorithm for 5 3 1 9 8 2 4 7. Draw its recursive call tree.

Apply quicksort algorithm for the letters E X A M P L E.

Apply quicksort algorithm for the letters Q U I C K S O R T

Write differences between brute force approach and Strassen's method to find multiplication of two matrices of size 2 by 2.

Apply Strassen's method to find multiplication of following 2 matrices.

  A               B
2   5           1   0
5   2           0   1


Apply Strassen's method to find multiplication of following 2 matrices.

  A                               B
2  4  6  3                1   1  1   1
1  2  2  1                1   1  1   2
3  1  1  3                2   1   1  2
1  1  1  1                3   1   1  3

Discuss 3 categories of decrease and conquer technique with examples.

What is topological sort? Give example for both DFS based and source removal algorithms.

Module 3 :

Discuss Greedy Technique with its general plan to find optimal solution for the given problem.

Discuss Coin Change Problem with its algorithm.

Discuss Knapsack Problem with example. Write GrredyKnapsack algorithm.

What is the difference between spanning tree and minimum spanning tree?

Discuss Prim's and Kruskal's algorithm with example.










Monday 26 March 2018

Assignment-II PCD for II Sem. 'A' division students. Even Sem 2017-18

1. Write explanation, syntax, flowchart and give 2 programming examples for each of the following.

while

do while

for

2. Write differences between while and do while loop.

3. Write differences between break and continue statements with programming examples.

4. What is one dimensional array?Discuss its declaration and initialization with syntax and examples.

5. What is two dimensional array?Discuss its declaration and initialization with syntax and examples.

6. What is string? Discuss declaration and initialization of string variables with examples.

7. Discuss string handling functions with syntax and examples.

8. Discuss the 3 elements of user defined functions with syntax and examples.

9. What are actual and formal parameters?Discuss with example.

10. Discuss different parameter passing mechanisms. (call by value and call by reference)

11. What is recursive function? Give programming example.

12. Discuss storage classes used in C. (auto,global,static,register)

13. Write programs for following.


To find sum and average of 1 to n numbers.

To find factorial of n.

To display first 'n' fibonacci numbers. i.e. 0  1  1  2  3  5  8  13 ...........

To check, whether the number is prime or not prime.

To find maximum and minimum of n numbers.

Bubble sort

Polynomial Equation

Linear Search

Binary Search

Addition of Matrices

Multiplication of Matrices

To find length of string without using built in function.

To copy one string to another string without using built in function.

To concatenate two strings into single string.

To reverse a string.

To check, whether the string is palindrome or not palindrome.









Friday 2 March 2018

Assignment-I Test on Programming in C and Data Structures

Assignment Test-I on "PCD"

1. Discuss the 'Structure of C program" with programming example.

2. What are C tokens?list and discuss in brief.

3. What are I/O functions? Discuss in brief with syntax and examples.

4. Discuss any five C operators with examples.

5. What are decision making statements? List and discuss with syntax and examples.
    (simple if, if else, nested if, else if ladder, switch)


Write C programs for following.
To find simple interest.
To find area and perimeter of rectangle.
To find area of triangle by reading three sides of it.
To find largest of 2 numbers.
To find largest of 3 numbers.
To find roots of quadratic equation.
To check the number n for Palindrome or Not palindrome.
To check, whether the year is leap year or not leap year.
To sort n numbers using bubble sort technique.





Assignment Test-I on Design and Analysis of Algorithms [09-03-2018 (Friday)]

1. What is an algorithm?Discuss its characteristics.

2. Discuss the steps used by computer professionals for Design and Analysis of Algorithms process.

3. What are asymptotic notations? List and discuss with definition, graph and examples.

4. Design and find the time complexity of non recursive algorithms.
    (MaxElement, ElementUniqueness, Matrix Multiplication, Binary(n)

5. Design and find the time complexity of recursive algorithms.
   (Factorial, Tower of Hanoi, Binary(n)

6. What is space complexity?Discuss with examples.





GCD of two numbers and its application...

The greatest common divisor (gcd) of two numbers is the largest positive integer that divides both numbers without leaving a remainder. The ...