0% found this document useful (0 votes)
27 views49 pages

Mega QP Collection

The document is a question bank for the 4th semester course 'Analysis & Design of Algorithms' at R.R. Institute of Technology, covering various topics such as algorithm analysis, asymptotic notations, sorting algorithms, and complexity classes. It includes detailed questions across multiple modules, focusing on algorithm design methods, efficiency analysis, and problem-solving techniques. The course aims to equip students with the skills to analyze and design algorithms effectively.

Uploaded by

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

Mega QP Collection

The document is a question bank for the 4th semester course 'Analysis & Design of Algorithms' at R.R. Institute of Technology, covering various topics such as algorithm analysis, asymptotic notations, sorting algorithms, and complexity classes. It includes detailed questions across multiple modules, focusing on algorithm design methods, efficiency analysis, and problem-solving techniques. The course aims to equip students with the skills to analyze and design algorithms effectively.

Uploaded by

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

lOMoARcPSD|40032759

PKM Educational Trust ®

R.R. Institute of Technology


Affiliated to VTU Belgaum and Approved by AICTE, New Delhi, Recognised by Govt. of Karnataka
Accredited by NAAC with ‘A+’, NBA
Raja Reddy Layout, Chikkabanavara, Bengaluru – 560 090
Department of Computer Science & Engineering

Question Bank – 4th Semester


Subject Name: Analysis & Design of Algorithms Subject Code: BCS401

Course Learning Objectives: This course (BCS401) will enable students to:
 To learn the methods for analyzing algorithms and evaluating their performance.
 To demonstrate the efficiency of algorithms using asymptotic notations.
 To solve problems using various algorithm design methods, including brute force greedy,
divide and conquer, decrease and conquer, transform and conquer, dynamic programming,
backtracking, and branch and bound.
 To learn the concepts of P and NP complexity classes.
Q.No Question COs

MODULE 1
Define an algorithm? What are the properties of an algorithm? Briefly discuss
1 CO1
the algorithm specification
Draw a Analysis framework and explain all its dimensions(6 dimensions) CO1
2

3 Explain Fundamentals of Algorithmic Problem Solving. CO1

Discuss the notion of algorithm and elaborate with an example how a new CO1
4 variable count introduced in a program can be used to find the number of steps
needed by a program to solve a particular problem instance
Design an algorithm to search an element in an array using sequential search. CO1
5
discuss the worst case, best case and average case efficiency of this algorithm
CO1
6 Elaborate the general plan for analyzing efficiency of non-recursive algorithms.

List and Define the commonly encountered asymptotic notations and illustrate CO1
7
with figures(3 notations)
a)Prove the theorem of asymptotic notations: If t1(n)Є O(g1(n)) and t2(n)Є CO1
O(g2(n)) then prove the following assertion t1(n) + t2(n) Є O(max(g1(n)),
(g2(n)))
8
b)Express the following using asymptotic notations.
(i)6*2n+ n2 (ii) ½ n(n-1)
Write an algorithm to compute n! Recursively. Set up a recurrence relation for CO1
9
the algorithm’s basic count and solve it.
Give the general plan for analysing the recursive algorithms. Mathematically CO1
10 analyse the tower of Hanoi problem, clearly indicating the steps and comment on
its complexity

Downloaded by Abhishek Kumar Maurya (abhishekkumar63767@gmail.com)


lOMoARcPSD|40032759

Find the time efficiency for computing product of n x n matrices with an CO1
11
algorithm
Develop an algorithm to determine the minimum and maximum values in an CO1
12
array of integers. Determine the worst case complexity
Write down the Selection sort and Bubble sort algorithm with example and find CO1
13
its time complexity for both.
CO1
14 Write the Sequential search algorithm with example and analyse its efficiency.
Describe brute-force approach. What are the advantages and disadvantages of CO1
15
this approach?
Design a brute-force algorithm for string matching with example and find its CO1
16
time complexity for the same.
MODULE 2

Give the general divide and conquer recurrence and explain the same. CO2
1
Explain the Exhaustive Search method using Travelling Salesman problem with CO2
2 the example.

Describe how the Knapsack Problem work using Exhaustive Search method with CO2
3 the example.
.
Write the Insertion sort algorithm and sort the list 89,45,68,90,29,34,17 using CO2
4 insertion sort algorithm and discuss the time efficiency.
What is topological sorting? Explain the Source Removal algorithm for CO2
topological Sort. Obtain topological sorting for the given diagraph using source
removal method

Inscribe the algorithm for DFS and explain how it canbe used to solve the CO2
6
topological sorting problem with one example
Write down the algorithm for BFS and explain how it canbe used to solve the CO2
7
topological sorting problem with one example
8 Construct an algorithm for merge sort. Analyze its efficiency. CO2

Write the merge sort algorithm and Sort the list E, X, A, M, P, L, E in CO2
9 alphabetical order using merge sort and discuss the efficiency of merge sort.

10 Trace the merge sort algorithm for the data set 8, 4, 1, 6, 7, 2, 3, 9. CO2

11 Construct an algorithm for Quick sort. Analyze its efficiency. CO2

Discuss how quick sort works to sort an array. Trace quick sort algorithm for the CO2
12
following data set 65, 70, 75, 80, 85, 60, 55, 50, 45
Consider the numbers given below. Show how partitioning algorithm of quick CO2
13
sort will place 106 in its correct position. Show all the steps clearly. “106 117

Downloaded by Abhishek Kumar Maurya (abhishekkumar63767@gmail.com)


lOMoARcPSD|40032759

128 134 141 91 84 63 42”


14 Explicate the Binary tree Traversals with an example CO2
15 Explain Strassen’s matrix multiplication and derive its time complexity CO2
MODULE 3

1 Define Binary Tree. What is the important for Balanced Binary search tree CO3
explain its Types
2 Define AVL trees explain its Rotations with example CO3

3 Construct AVL trees for the list 5,6,8,3,2,4,7 by successive insertion along with CO3
its time complexity.
4 Define heap. Explain the properties of heap along with its representation. CO3
Construct bottom up heap for the list 2,9,7,6,5,8. Obtain its time complexity
5 Write the algorithm of Heap sort. Along with the bottom approach for CO3
constructing the heap. Find its Time complexity.
6 Algorithm for Comparison Counting sort and sort the list 62,31,84,96,19,47 using CO3
the same.
7 Algorithm for Distribution Counting sort and sort the list 13,11,12,13,12,12 using CO3
the same.
8 Explain Horspool’s algorithm cases with example. CO3

9 Design Horspools algorithm for string matching. Apply Horspools algorithm to CO3
find the pattern BARBER in the text: JIM_SAW_ME_IN_A_BARBERSHOP.
10 Write Horspool’s algorithm and find the pattern SORTING in the text CO3
BRUTE_FORCE_METHOD_USED_FOR_SORTING_ALGORITHM
MODULE 4

1 Using dynamic programming, solve the following instance of knapsack problem, CO3
for M=20

2 Solve the knapsack instance n=3, (w1,w2,w3)=(1,2,2) and (p1,p2,p3)=(18,16,6) CO3


and M=4 by dynamic programming
3 Define Transitive closure. Write Warshall‟s algorithm to compute transitive CO3
closure. Find its efficiency.
4 Apply Warshall’s Algorithm to find transitive closure of graph defined by the CO3
following adjacency matrix.

5 Define transitive closure of a graph. Apply Warshalls algorithm to compute CO3


transitive closure of a directed graph.

Downloaded by Abhishek Kumar Maurya (abhishekkumar63767@gmail.com)


lOMoARcPSD|40032759

6 Using Warshall‟s algorithm to find transitive closure of a digraph. CO3

7 Explain all Pair Shortest Path Floyd’s Algorithm with its time complexity. CO3

8 Relate Floyd‟s algorithm to compute all pairs shortest paths for the following CO3
graph.

9 Elaborate the concept of greedy technique for prim’s algorithm. Obtain the CO4
minimum cost spanning tree for the graph below using the same.

Find the minimum spanning tree using Prim’s algorithm for the given graph CO4
along with the Algorithm.

10

Construct minimum cost spanning tree using Kruskals algorithm for the CO4
11
following graph

Downloaded by Abhishek Kumar Maurya (abhishekkumar63767@gmail.com)


lOMoARcPSD|40032759

Develop the minimum cost spanning tree for the below graph using kruskal’s CO4
algorithm along with the

12

13 Explain the Kruskals algorithm . Find its efficiency. CO4

Apply Dijkstra’s algorithm to find single source shortest path for the given graph CO4
by considering S as the source vertex.

14

Solve the below instance of the single source shortest path with vertex a as the CO4
source with the help of Dijikstra’s algorithm

15

16 Explain the Dijikstra’s algorithm. Find its efficiency. CO4

Construct the Huffman tree for the following data. CO4

17
Encode DAD-CBE using Huffman Encoding.
What is Huffman tree? Construct a Huffman tree and resulting code word for the CO4
following and Encode the words DAD and ADD
18

Downloaded by Abhishek Kumar Maurya (abhishekkumar63767@gmail.com)


lOMoARcPSD|40032759

MODULE 5

Explain the following with examples


1 CO5
i) P problem ii) NP Problem iii) NP- Complete problem iv) NP – Hard Problems
What is backtracking? Apply backtracking to solve the below instance of sum of CO6
2
subset problem S={5,10,12,13,15,18} d=30
3 Illustrate N queen’s problem using backtracking to solve 4-Queens problem CO6

Using Branch and Bound technique solve the below instance of knapsack CO6
problem. Capacity 5

5 Discuss the concept of Classes of NP- Hard and NP-Compete CO5

Course Outcomes: Students will be able to

Apply asymptotic notational method to analyze the performance of the algorithms in terms of
CO1 time complexity.

CO2 Demonstrate divide & conquer approaches and decrease & conquer approaches to solve
Computational problems.
CO3 Make use of transform & conquer and dynamic programming design approaches to solve the
given real world or complex computational problems.
CO4 Apply greedy and input enhancement methods to solve graph & string based computational
Problems.
CO5
Analyse various classes (P,NP and NP Complete) of problems
CO6 Illustrate backtracking, branch & bound and approximation methods.

Downloaded by Abhishek Kumar Maurya (abhishekkumar63767@gmail.com)


BCS401(2022 Scheme) SIMP Questions
-TIE REVIEW TEAM

Module -1 SIMP Questions

1. Explain the analysis framework of algorithms. Explain the worst case, best case and average
case efficiencies, with an algorithm.
2. Explain the concept of asymptotic notations and basic efficiency classes, with examples.
Explain O, θ, and Ω, with examples.

express the following assertions using asymptotic notations with proof from its
3. What is an algorithm? Explain the notion of an algorithm with an example, Write an
algorithm to find the maximum element in an array of n elements. Give the mathematical
analysis of this non recursive algorithm.
4. If t1(n) є 0 (g1(n)) and t2(n) є 0(g2(n)), prove that t1(n) + t2(n) є0(max {g1(n), g2(n)}).
5. Design a recursive algorithm for solving the tower of hanoi problem and give the general
plan of analyzing that algorithm. Show that the time complexity of the tower of hanoi
algorithm is exponential in nature.

OR

Explain the mathematical analysis of fibonacci recursive algorithms.


6. Design an algorithm to search an element in an array using sequential search. discuss the
worst case, best case and average case analysis of this algorithm
7. Give the mathematical analysis of non recursive Matrix Multiplication Algorithms.
8. Consider the following algorithm

a.What does the algorithm compute and explain basic operation and efficiency
Module -2 SIMP Questions
9. Explain divide and conquer algorithm with its advantages and disadvantages, Compare
straight forward method and divide and conquer method for finding max and min elements of
the list
10. Design merge sort algorithm. Write a descriptive note on its best case, average case, and
worst-case time efficiency.
11. Explain Binary Search as an Iterative and recursive algorithm - 16M
12. What is a Quick Sort Algorithm? Apply a quick sort algorithm to sort the list E, X, A, M, P,
L, E in alphabetical order. Draw the tree of recursive calls made( Practice similar type
questions/problems)
13. Explain Strassen’s Algorithm and derive its time complexity.-14M
14. Explain in detail about the Travelling Salesman Problem using exhaustive search- 12m
15. Explain in detail about the knapsack problem and closest pair problem

Module -3 SIMP Questions


16. Define heap, explain the notion of the heap with illustrations also explain the properties of
heap
17. Define Heap Sort. Consider the array: arr[ ] = {4, 10, 3, 5, 1}.Build a complete binary tree
from the array.
18. Explain the principles for constructing a heap- explain bottom up and top down heap
construction in detail with appropriate algorithms for each
19. Explain (i) New key insertion (ii)Deletion of a key (iii)Maximum key deletion and (iv)The
efficiency of deletion in heap with appropriate illustrations and algorithmic examples - 16M
20. Discuss with examples (i)Horspool’s algorithm (ii)Boyle moore algorithm
21. Define AVL trees? Explain different rotation types in AVL trees with sketches-12M
Module -4 SIMP Questions

22. Explain given Algorithms with an example i)HeadBottomUp ii)Kruskal iii)Huffman


23. What is Dijkstra’s algorithm used for? Apply Dijkstra’s algorithm for the following graph,
Given 1 is the source node, What are the distances of shortest paths from source node to all
other nodes

24. Define minimum cost spanning tree & Prim's algorithm . Write Prim’s algorithm to find
minimum cost spanning tree for the given weighted connected graph

25. Solve the following instance of greedy knapsack problem where n=4, m=10, p = (40, 42, 25,
12) and w = (4, 7, 5, 3) ( Practice similar type questions/problems)
26. Write the problem statement for job sequencing with a deadline? Let n=5, profits (10, 3, 33,
11, 40) and deadlines (3, 1, 1, 2, 2). Find the optimal sequence of execution of job solution
using greedy algorithm ( Practice similar type questions/problems)
27. Obtain the Huffman tree and the code for the following data
28. Discuss Warshall’s Algorithm with suitable diagrams?
29. Explain how Floyd's Algorithm works.

Module -5 SIMP Questions

30. Explain the use of Decision Trees for Searching a Sorted Array- 16M
31. Explain the following with examples
i) P problem ii) NP Problem iii) NP- Complete problem iv) NP – Hard Problems
32. Explain backtracking in detail by explaining - General method, General Algorithm
(Recursive and Iterative)
33. What is backtracking, list out its advantages, Considering 4-queen problem, provide two
possible solutions to this problem using backtracking
34. Apply branch and bound method for knapsack problem C=10( Practice similar type
questions/problems)

35. Apply backtracking to solve the following instance of the subset sum problem: A = {1, 3, 4,
5} and d = 11.
36. Write a note on each with an example: i) Hamiltonian Cycle ii)Graph coloring iii) N – Queen
problem
37. Explain LC branch & bound, FIFO branch & bound.n
38. With the help of a state space tree. Solve the Traveling Salesman Problem for the following
graph using branch and bound concepts.
BCS402
Model Question Paper-1/2 with effect from 2023-24
USN

Fourth Semester B.E. Degree Examination


Subject Title: Microcontrollers
TIME: 03 Hours Max. Marks: 100

Note: 01. Answer any FIVE full questions, choosing at least ONE question from each MODULE.

*Bloom’s
Module -1 Taxonomy Marks
Level
Q.01 a L2 10
Mention the difference between 1. Microctroller and Microprocessor Marks
2. RISC and CISC

b L2 10
Explain the architecture of an ARM embedded device with the help of neat Marks
diagram.
OR
Q.02 a L2 10
Explain in detail about Current Program Status Register (CPSR). Marks
b With a neat diagram, explain embedded system Hardware. L2 10
Marks
Module-2
Q. 03 a L2 10
Explain different arithmetic instructions in ARM processor with an example. Marks
b L2 10
Explain single register load store addressing mode syntax, table, index mode with Marks
an example.
OR
Q.04 a L2 10
Explain barrel shifter instructions in ARM with suitable examples. Marks
b L2 10
Explain different Logical instructions in ARM processor with an example. Marks
Module-3
Q. 05 a Explain code optimization, profiling and cycle counting. L3 10
Marks
b Write a C program that prints the square of the integers between 0 to 9 using L3 10
functions and explain how to convert this C function to an assembly function Marks
with command.
OR
Q. 06 a Discuss how registers are allocated to optimize the program. L3 10
Marks
b Develop an ALP to find the sum of first 10 integer numbers. L3 10
Marks
Module-4
Q. 07 a With a neat diagram explain ARM processor exceptions and modes. L2 10
Marks
b Explain assigning interrupts and interrupt latency. L2 10
Marks
OR
Q. 08 a Briefly explain what happens when an IRQ and FIQ exception is raised with an L2 10
ARM processor. Marks

Page 01 of 02
BCS402
b Explain firmware execution flow and explain Red Hat RedBoot. L2 10
Marks
Module-5
Q. 09 a Explain the basic architecture of cache memory. L2 10
Marks
b Explain how main memory maps to a cache memory. L2 10
Marks
OR
Q. 10 a With a neat block diagram explain associative cache. L2 10
Marks
b L2 10
Briefly explain cache line replacement policies. Marks
*Bloom’s Taxonomy Level: Indicate as L1, L2, L3, L4, etc. It is also desirable to indicate the COs and POs to be
attained by every bit of questions.

Page 02 of 02
BCS402 and SIMP Questions-2024

Prepared by: By the TIE review team

Module-1-5 SIMP questions

1. Differentiate between i) RISC & CISC architecture ii) Microcontroller & Microprocessor
2. Explain ARM registers used under various modes & ARM philosophy.
3. What is pipelining? Illustrate it with an example.
4. Explain the architecture of a typical embedded system based on ARM.
5. Discuss the following with diagram- i)Von Newman architecture with
6. cache ii) Harvard architecture with TCM
7. Explain ARM core data flow model in detail with a neat diagram.
8. Draw the basic layout of the generic program status register and briefly the various fields.

(module 3 and module 2 is mixed here)


9. Write a note on: i) Register allocation ii)Allocation variables to register numbers
10. List out the problems faced by Compiler. Explain the Effect of local variable types by
considering Checksum function.
11. Explain different data types in C and Explain different C looping structures in detail with
examples
12. Show the post condition when MOV’s Instruction shifts register r1 left by one bit and result
is stored in r0.where r0=0X00000000, r1= 0X80000004 and CPSR=nzcvqiFt.
13. Explain the Barrel shifter operation in ARM processor with a neat diagram.
14. Briefly explain the different load store instruction categories used in ARM.
15. Explain the following in ARM: i) different data processing instruction ii)the co-processor
instruction iii)instruction scheduling
16. Explain briefly the software interrupt instruction with syntax and example.
17. Write an ALP using ARM instructions to find a factorial of a number.

18. With a neat diagram explain ARM processor exceptions and modes.
19. What is exception handling? Explain the mechanism which is adopted to handle the
exceptions which occur simultaneously. Also indicate the reasons for these exceptions.
20. Briefly explain what happens when an IRQ and FIQ exception is raised with an ARM
processor.
21. Explain assigning interrupts and interrupt latency.
22. Explain firmware execution flow and explain Red Hat RedBoot.
23. Explain the code structure and directory layout of sandstone

24. Explain (i)Architecture of cache memory (ii)Memory hierarchy (iii)Lache line replacement
policies (iv)Allocation policy in cache
25. Explain how main memory maps to a cache memory.
26. Explain the basic operation of a cache controller
27. Write a note on Write Buffers. And give an expression to measure Cache Efficiency.
28. Explain Write Policy—Writeback or Writethrough policy.
Model Question Paper- II with effect from 2022

Fourth Semester B.E Degree Examination 2024-25


Database Management System (BCS403)
TIME: 03 Hours Max.Marks:100
1. Note: Answer any FIVE full questions, choosing at least ONE question from each MODULE
2. M: Marks, L: Bloom’s level, C: Course outcomes.

Module - 1 M L C
Q.1 a What is a Database? Explain the three schema architecture with neat diagram. 8 L2 CO1

b What are the advantages of using DBMS approach? Explain 8 L2 CO1

c Explain the following terms. 4 L2 CO1


1. Data Dictionary 2. Weak Entity

OR

a Explain the categories of Data Models. 8 L2 CO1


Q.2
b Explain the component modules of DBMS & their interactions with 8 L2 CO1
diagram.

c What are the responsibilities of DBA & database designers? 4 L2 CO1

Module - 2
Q.3 a Explain the different types of update operations on relational database. How 6 L2 CO2
basic operation deals with constraint violation.

b Explain Unary relational operations with examples. 6 L2 CO2

c What is an Integrity Constraint? Explain the importance of Referential 8 L2 CO2


Integrity Constraint.

OR

Q.4 a Explain the following relational algebra operation. 10 L3 CO2


JOIN, DIFFERENCE, SELECT, UNION

b Discuss the E.R to Relational mapping algorithm with example for each 6 L3 CO2
step.

c Explain the relational algebra operation for set theory with examples. 4 L2 CO2

Module - 3
Q.5 a Illustrate insert, delete, update, alter & drop commands in SQL. 6 L4 CO3
Model Question Paper- II with effect from 2022
b Explain informal design guidelines for relational schema design. 4 L2 CO3

c What is Functional dependency? Explain the inference rules for functional 10 L3 CO4
dependency with proof.
OR

a Consider two sets of functional dependency. F={AC, ACD, EAD, 10 L3 CO4


Q.6 EH} E= {ACD, EAH}. Are they Equivalent?
b Explain the types of update anomalies in SQL with an example. 10 L2 CO3

Module - 4
Q.7 a Demonstrate transaction states & additional operations. 10 L3 CO4

b Demonstrate working of Assertion & Triggers in database? Explain with an 10 L2 CO3


example.
OR

Q.8 a Demonstrate the System Log in database transaction. 6 L2 CO4

b Discuss the ACID properties of database transaction. 4 L2 CO4

c Explain stored procedure language in SQL with an example. 10 L2 CO3

Module - 5
Q.9 a Explain the Two phase locking protocol used for concurrency control. 8 L3 CO5

b Define Schedule? Illustrate with an example. 4 L2 CO5

c. Why Concurrency control is needed? Demonstrate with an example. 8 L3 CO5

OR

Q.10 a What is NOSQL? Explain the CAP theorem. 6 L2 CO5

b What are document based NOSQL systems? basic operations CRUD in 8 L2 CO5
MongoDB.

c What is NOSQL Graph database? Explain Neo4j. 6 L2 CO5


Model Question Paper- I with effect from 2022

Fourth Semester B.E Degree Examination 2024-25


Database Management Systems (BCS403)
TIME: 03 Hours Max.Marks:100
1. Note: Answer any FIVE full questions, choosing at least ONE question from each MODULE
2. M: Marks, L: Bloom’s level, C: Course outcomes.

Module - 1 M L C
Q.1 a Explain the types of end users with examples. 8 L2 CO1

b What are the advantages of using DBMS? Explain. 8 L2 CO1

c Describe the characteristics of database. 4 L2 CO1

OR
a Explain three schema architecture. Why mappings b/w schema levels are 8 L2 CO1
Q.2
required?
b Explain the different types of attributes in ER model. 8 L2 CO1

c Explain the following. 4 L2 CO1


1. Cardinality Ratio 2. Weal Entity

Module - 2
Q.3 a Explain the different Relational Model constraints. 6 L2 CO2

b Demonstrate the concepts of Generalization & Specialization with examples. 6 L2 CO2

c Explain Entity Integrity Constraint & Referential Integrity Constraints? Why 8 L2 CO2
each of these is important in a database.

OR
Model Question Paper- I with effect from 2022
Q.4 a Consider the Sailors-Boats-Reserves DB described 10 L3 CO2
s (sid, sname, rating, age)
b (bid, bname, color)
r (sid, bid, date)
Write each of the following queries in SQL.
1. Find the colors of boats reserved by Alber.
2. Find all sailor ids of sailors who have a rating of at least 8 or reserved
boat 103.
3. Find the names of sailors who have not reserved a boat whose name
contains the string “storm”. Order the names in ascending order.
4. Find the sailor ids of sailors with age over 20 who have not reserved
a boat whose name includes the string “thunder”.
b Discuss the Equijoin & Natural Join with suitable example. 6 L3 CO2

c Explain the relational algebra operation for set theory with examples. 4 L2 CO2

Module - 3
Q.5 a Explain the Cursor & its properties in embedded SQL with an example. 6 L2 CO3

b What is a Normalization? Explain the 1NF, 2NF & 3NF with examples. 10 L2 CO4

c Explain informal design guidelines for relational schema design. 4 L2 CO3


OR
a What is Functional Dependency? Write algorithm to find minimal cover for 10 L2 CO4
Q.6 set of Functional Dependency. Construct the minimal cover m for set of
functional dependency. E={ BA, DA, ABD}
b Explain the types of update anomalies in SQL with an example. 10 L4 CO3

Module - 4
Q.7 a Demonstrate the Database Transaction with transaction diagram. 10 L2 CO4

b Demonstrate working of Assertion & Triggers in SQL? Explain with an 10 L3 CO3


example.
OR

Q.8 a Demonstrate the System Log in database transaction. 6 L2 CO4

b Demonstrate the ACID properties of database transaction. 4 L2 CO4

c Explain stored procedure language in SQL with an example. 10 L2 CO3


Model Question Paper- I with effect from 2022

Module - 5
Q.9 a Demonstrate the Two phase locking protocol used for concurrency control. 8 L3 CO5

b Demonstrate the Concurrency control based on Timestamp ordering. 4 L2 CO5

c. Why Concurrency control is needed? Demonstrate with an example. 8 L3 CO5

OR

Q.10 a What is NOSQL? Explain the CAP theorem. 6 L2 CO5

b What are document based NOSQL systems? Explain basic operations 8 L2 CO5
CRUD in MongoDB.
c What is NOSQL Graph database? Explain Neo4j. 6 L2 CO5
BCS403 SIMP Questions

Prepared by the CS/IS-TIE review team

Module-1 to 5 SIMP

1. With a neat diagram, explain three schema architectures.


2. List and explain the characteristics, advantages of the DBMS approach.
3. Explain the following in detail a) DBMS b) Database c) Database Schema d) Weak Entity Type e)
Participation Constraint f) Cardinality ratio g) Recursive relationship h) Specialization i) DBMS catalog j)
Snapshot.
4. Develop an ER diagram for various databases [Company, University, Airlines], considering at least 5 entities.
5. Explain different types of user-friendly interfaces and types of users who typically use each.
6. Explain component modules of DBMS and their interaction.
6. Study SQL queries for different databases. * (vvimp)
7. Mention all the steps involved in conversion of ER constructs to corresponding relational
tables.
8. Briefly explain the various Data Types and Domains in SQL.
9 What are the relational algebra operations in Set Theory? Briefly explain them with
examples.
10. Write a note on Relational Model Constraints in SQL.
11. What are the characteristics of Relations? Explain
12. Explain 1NF,2NF,3NF & BCNF with examples. What is needed for normalization?
13. What are the informal design guidelines for relational schema design? Explain
14. Define functional dependency. Explain the various inference rules for functional dependencies proof.
15. Explain insertion, deletion & modification anomalies. Why are they considered bad? Illustrate with an
example. .
16. Given below are two sets of FD’s for a relation R(A,B,C,D,E).Are they equivalent?
17. Define non-additive join property of a decomposition and write an algorithm for testing of non-additive join
property.
18. Explain 4NF with an example? Explain about multivalued dependency

19. Explain SQL data definition and all the different data types in SQL

20. Explain the concept of specifying constraints in SQL retrieval queries in SQL

21. Explain all the SQL commands with syntax and examples

22. Briefly explain the various Data Types and Domains in SQL.

23.Explain the concept of views and joins in SQL with an example, Create a view named

HighValueCustomers that displays customer names, email addresses, and total purchase amounts for

customers whose total purchase amount exceeds $1000. Then, write a SQL query to retrieve all
information from the HighValueCustomers view. Explain the advantages of using views in this scenario.

24. Write a SQL query to retrieve the top 5 customers who have made the highest total purchase

amounts, along with their total purchase amounts. Include customers who have made at least 3 purchases.

25. Explain the difference between assertions and triggers in SQL. Provide an example of each,

highlighting their use cases and how they help maintain data integrity.

26. Consider a database schema with a Products table. Write SQL statements to:

● Add a new column discount_percentage to the Products table.

● Modify the data type of the product_description column to VARCHAR(500).

● Rename the product_price column to list_price.

● Drop the product_category column from the Products table.

● Explain the potential impact of each schema change on existing data and applications.

27. List and explain ACID Properties, Briefly explain Transaction Support in SQL

28. With a neat state transition diagram, explain the states involved in transaction execution.

29. Explain the concept of serializability in the context of transaction scheduling. Differentiate between conflict

serializability and view serializability.

30. Define and differentiate between the following types of schedules based on recoverability: Recoverable, Cascadeless,

and Strict.

31. Discuss the SQL commands used for transaction management (BEGIN TRANSACTION, COMMIT, ROLLBACK,

SAVEPOINT)

32. Write short notes for the following: i) transaction rollback and cascading rollback. ii) transaction support in

iii) shadow paging iv) No UNDO/REDO recovery based on deferred update. v) Recovery based on
Immediate Update - out of syllabus but study this

33. How does deadlock and starvation problems occur? Explain how these problems can be resolved.

34. Explain why concurrency control is required. Justify the need for recovery.

35. With an example, explain basic Timestamp Ordering algorithm and two-phase locking protocol used in

concurrency control. How does it guarantee serializability?

36. Compare and contrast NoSQL databases with traditional relational databases,discuss the key motivations behind the

emergence of NoSQL databases.

37. Explain the CAP theorem and its implications for distributed systems. Define the properties of CAP theorem

38. Describe the document-based data model and its advantages,Explain the key features and components of

MongoDB,Write MongoDB queries to perform basic CRUD

39. Explain the key-value data model and its simplicity. Discuss the advantages and limitations of key-value stores,

Describe their typical use cases?

40. Explain the column-family data model,Discuss the architecture and key features of Apache Cassandra,Explain

advantages in terms of IOT applications

41.Explain the graph data model and its suitability for representing relationships between entities, describe (i)Neo4J

(ii)Graph databases in Social networks, fraud detection


Additional practice questions
Model Question Paper Set - 1 with effect from 2022(CBCS Scheme)
USN

Fourth Semester B.E Degree Examination


DISCRETE MATHEMATICAL STRUCTURES (BCS405A)
TIME: 03Hours Max.Marks:100
Note:

1. Answer any FIVE full questions, choosing at least ONE question from each MODULE
2. M: Marks, L: RBT levels, C: Course outcomes.
Module – 1 M L C
Q.1 a Show that the compound proposition 6 L2 CO1
 p  q    q  r    r  p     p  q    q  r    r  p   for
primitive statements p, q, r is logically equivalence.
b Establish the validity of the following argument using the Rules of 7 L2 CO1
Inference: {𝑝 ∧ (𝑝 → 𝑞) ∧ (𝑠 ∨ 𝑟) ∧ (𝑟 →∼ 𝑞)} ⟶ (𝑠 ∨ 𝑡).
c For the universe of all integers, let p(x), q(x), r(x), s(x) and t(x) denote the 7 L1 CO1
following open statements: p(x): x>0, q(x): x is even, r(x): x is a perfect
square, s(x): x is divisible by 3, t(x): x is divisible by 7. Write the following
statements in symbolic form: i) At least one integer is even. ii) There exists a
positive integer that is even. iii) If x is even, then x is not divisible by 3. iv) No
even integer is divisible by 7. v) There exists even integer divisible by 3.

OR
Q.2 a Define a tautology. Prove that, for any propositions p, q, r the compound 6 L2 CO1
propositions, {(𝑝→𝑞)∧(𝑞→𝑟)}→{(𝑝→𝑟)} is tautology.
b Prove the following using laws of logic: 𝑝→(𝑞→𝑟)⇔(𝑝∧𝑞)→𝑟. 7 L2 CO1
c Give i) direct proof ii) indirect proof iii) proof by contradiction for the 7 L3 CO1
following statement: “if n is an odd integer then n+9 is an even integer”.

Module – 2
𝑛(2𝑛+1)(2𝑛−1)
1 + 3 + 5 + ⋯ . +(2𝑛 − 1)2 =
2 2 2
Q.3 a Prove that
3
by 6 L2 CO2
Mathematical Induction.
Let 𝑎0 = 1, 𝑎1 = 2, 𝑎2 = 3 and 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 𝑎𝑛−3 for 𝑛≥3. Prove that
b 𝑎𝑛 ≤ 3𝑛 ∀ 𝑛 ∈ 𝑧 + . 7 L2 CO2
Find the number of ways of arrangement of the letters of the word
c ‘TALLAHASSEE’ which have no adjacent A’s. 7 L2 CO2

OR
Q.4 a Determine the coefficient of 𝑥𝑦𝑧 2 in the expansion of (2𝑥 − 𝑦 − 𝑧)4 . 6 L2 CO2
In how many ways one can distribute 8 identical marbles in 4 distinct
b containers so that i) no container is empty ii) the fourth container has an odd 7 L2 CO2
number of marbles in it.
How many positive integers n can we form using the digits 3,4,4,5,5,6,7 if we
c want n to exceed 5,000,000? 7 L2 CO2

Module – 3
Q.5 a 3𝑥 − 5 𝑖𝑓 𝑥 > 0 6 L2 CO3
Let f: R → R be defined by, 𝑓(𝑥) = { . Find
1 − 3𝑥 𝑖𝑓 𝑥 ≤ 0
𝑓 −1 (0), 𝑓 −1 (1), 𝑓 −1 (−1), 𝑓 −1 (3), 𝑓 −1 (6), 𝑓 −1 ([−6, 5]) and 𝑓 −1 ([−5, 5])
State Pigeon hole principle. Prove that in any set of 29 persons; at least 5 7 L2 CO3
b persons have been born on the same day of the week.
Let A={1,2,3,4,6} and ‘R’ be a relation on ‘A’ defined by aRb if and only if “a 7 L2 CO3
c is multiple of b” represent the relation ‘R’ as a matrix, draw the diagraph and
relation R.

OR
If 𝑓:𝐴→𝐵, 𝑔:𝐵→𝐶, ℎ:𝐶→𝐷 are three functions, then Prove that
Q.6 a h∘(g∘f)=(h∘g)∘f. 6 L2 CO3
Show that if n+1 numbers are chosen from 1 to 2n then at least one pair
b add to 2n+1. 7 L2 CO3

c Draw the Hasse diagram representing the positive divisors of 72. 7 L2 CO3

Module – 4
In how many ways the 26 letters of English alphabet are permuted so
Q.7 a that none of the pattern’s CAR, DOG, PUN or BYTE occurs? 6 L2 CO4
Define Derangement. In how many ways can each of 10 people select a
b left glove and a right glove out of a total of 10 pairs of gloves so that no 7 L2 CO4
person selects a matching pair of gloves?
Solve the recurrence relation: 𝐶𝑛 = 3𝐶𝑛−1 − 2𝐶𝑛−2 , 𝑓𝑜𝑟 𝑛 ≥
c 2, given 𝐶 = 5, 𝐶 = 3. 7 L3 CO4
1 2

OR
In how many ways one can arrange the letters of the word
Q.8 a CORRESPONDENTS so that there are i) exactly 2 pairs of 6 L2 CO4
consecutive identical letters? ii) at least 3 pairs of consecutive identical
letters? iii) no pair of consecutive identical letters?
b Find the rook polynomial for the chess board as shown in the figure 7 L2 CO4

c Solve the recurrence relation 𝑎𝑛+2 − 3𝑎𝑛+1 + 2𝑎𝑛 = 0, 𝑎0 = 1, 𝑎1 = 6. 7 L3 CO4

Module – 5
Q.9 a If 𝐻, 𝐾 are subgroups of a group 𝐺, prove that 𝐻 ∩ 𝐾 is also a subgroup 6 L2 CO5
of 𝐺. Is 𝐻 ∪ 𝐾 a subgroup of 𝐺.
b Define Klein 4 group. Verify 𝐴 = {1, 3, 5, 7} is a klein 4 group. 7 L2 CO5
c State and prove Lagrange’s Theorem. 7 L2 CO5

OR
Show that i) the identity of 𝐺 is unique.
Q.10 a ii) the inverse of each element of 𝐺 is Unique. 6 L3 CO5
Show that (𝐴, ∙) is an abelian group where 𝐴 = {𝑎 ∈ 𝑄|𝑎 ≠ −1} and
b for any 𝑎, 𝑏 ∈ 𝐴, 𝑎 . 𝑏 = 𝑎 + 𝑏 + 𝑎𝑏. 7 L3 CO5
1 2 3 4
c Let 𝐺 = 𝑆4 , for 𝛼 = (2 3 4 1), find the subgroup 𝐻 = 7 L3 CO5
〈𝛼 〉. Determine the left cosets of 𝐻 in 𝐺.
Model Question Paper Set - 2 with effect from 2022(CBCS Scheme)
USN

Fourth Semester B.E Degree Examination


DISCRETE MATHEMATICAL STRUCTURES (BCS405A)
TIME:03Hours Max.Marks:100
Note:

1. Answer any FIVE full questions, choosing at least ONE question from each MODULE
2. M: Marks, L: RBT levels, C: Course outcomes.
Module - 1 M L C
Q.1 a Define tautology. Show that [(𝑝˅𝑞 )˄(𝑝 → 𝑟)˄(𝑞 → 𝑟)] → 𝑟 is a 6 L1 CO1
tautology by constructing the truth table.
b Prove the following using the laws of logic 7 L2 CO1
[¬𝑝˄(¬𝑞˄𝑟)]˅[(𝑞˄𝑟)˅(𝑝˄𝑟)] ⇔ 𝑟.
c For any two odd integers m and n, show that (i) m+n is even (ii) mn is 7 L2 CO1
odd.
OR
Q.2 a Define i) an open statement ii) Quantifiers 6 L2 CO1
b Write the following argument in symbolic form and then establish the 7 L1 CO1
validity
If A gets the Supervisor’s position and works hard, then he will get a
raise. If he gets a raise, then he will buy a car. He has not purchased a
car. Therefore he did not get the Supervisor’s position or he did not
work hard.
c For the following statements, the universe comprises all non-zero 7 L2 CO1
integers.
Determine the truth value of each statement.
a) ∋ 𝑥 ∋ 𝑦 [𝑥𝑦 = 1] b) ∋ 𝑥∀𝑦 [𝑥𝑦 = 1] c) ∀𝑥 ∋ 𝑦 [𝑥𝑦 = 1]
d) ∋ 𝑥 ∋ 𝑦 2𝑥 + 𝑦 = 5)˄(𝑥 − 3𝑦 = −8)] e) ∋ 𝑥 ∋ 𝑦[(3𝑥 − 𝑦 =
[(
7)˄(2𝑥 + 4𝑦 = 3)]

Module – 2
Define the well ordering principle. By Mathematical Induction, Prove that
Q.3 a (𝒏!) ≥ 𝟐𝒏−𝟏 for all integers 𝒏 ≥ 𝟏. 6 L2 CO2
Prove that every positive integer n≥24 can be written as a sum of 5’s
b and/or 7’s. 7 L3 CO2
How many positive integers 𝑛 , can we form using the digits 3,4,4,5,5,6,7, if
c we want 𝑛 to exceed 5,000,000. 7 L1 CO2

OR
Q.4 a By Mathematical Induction Prove that 6 L1 CO2
𝑛(𝑛+1)(2𝑛+7)
1.3 + 2.4 + ⋯ … … . . +𝑛(𝑛 + 2) = 6
.
Find the number of permutations of the letters of the word MASSASAUGA. In
b how many of these all four 𝐴’𝑠 are together? How many of them begin with 𝑆? 7 L2 CO2
i) Obtain the Coefficient of 𝑎5 𝑏2 in the expansion of (2a-3b)7
c 7 L1 CO2
ii) Using the Binomial theorem find the coefficient of 𝑥 5 𝑦 2 in
the expansion of (𝑥 + 𝑦)7 .

Module – 3
Q.5 a State Pigeon –hole principle. Prove that if any number from1 to 8 are 6 L1 CO3
chosen then two of them will have their sum as 9.
3𝑥 − 5 , 𝑖𝑓 𝑥 > 0 7 L1 CO3
b Let 𝑓: 𝑅 → 𝑅 be defined by ,𝑓(𝑥 ) = { 1 − 3𝑥 , 𝑖𝑓𝑥 ≤ 0 }
𝑓𝑖𝑛𝑑, 𝑓 −1 ([−6,5]) 𝑎𝑛𝑑 𝑓 −1 ([−5,5]).
Let 𝐴 = 𝐵 = 𝐶 = 𝑅, and 𝑓: 𝐴 → 𝐵 and 𝑔: 𝐵 → 𝐶 be defined by 7 L2 CO3
c 1
𝑓 (𝑎) = 2𝑎 + 1, 𝑔(𝑏) = 𝑏, ∀𝑎 ∈ 𝐴, ∀𝑏 ∈ 𝐵.
3
Compute 𝑔𝑜𝑓 and show that 𝑔𝑜𝑓is invertible. What is (𝑔 𝑜 𝑓)−1 ?
OR
Let f and g be functions from R to R defined by 𝑓 (𝑥 ) = 𝑎𝑥 + 𝑏 and
Q.6 a 𝑔(𝑥 ) = 1 − 𝑥 + 𝑥 2, If (𝑔 𝑜 𝑓)(𝑥) = 9𝑥 2 − 9𝑥 + 3 determine 𝑎 and 𝑏. 6 L3 CO3
b Draw the Hasse (POSET) diagram which represents positive divisors of 36. 7 L2 CO3
c Let 𝐴 = {1,2,3,4,6} and 𝑅 be a relation on 𝐴 defined by 𝑎𝑅𝑏 if and 7 L2 CO3
only if “𝑎 is a multiple of 𝑏”. Write down the relation 𝑅, relation matrix
𝑀 (𝑅 )
And draw its diagraph. List out its in degree and out degree.

Module – 4
Q.7 a Determine the number of positive integers n such that 1 ≤ 𝑛 ≤ 100 and 6 L2 CO4
n is not divisible by 2, 3, or 5
b In how many ways can the 26 letters of the English alphabet be 7 L2 CO4
permuted so that none of the patterns CAR, DOG, PUN or BYTE
occurs?
c Solve the recurrence relation 𝑎𝑛 = 𝑛𝑎𝑛−1 where n ≥ 1and 𝑎0 = 1. 7 L2 CO4

OR
Q.8 a In how many ways 5 number of a’s, 4 number of b’s and 3 number of 6 L3 CO4
c’s can be arranged so that all the identical
letters are not in a single block?
b Five teachers 𝑇1, 𝑇2, 𝑇3, 𝑇4 , 𝑇5 are to be made class teachers for five 7 L2 CO4
classes, 𝐶1 , 𝐶2 , 𝐶3 , 𝐶4 , 𝐶5 , one teacher for each class. 𝑇1 and 𝑇2 do not
wish to become the class teachers for 𝐶1 or 𝐶2 , 𝑇3 and 𝑇4 for 𝐶4 or 𝐶5 ,
and 𝑇5 for 𝐶3 or 𝐶4 or 𝐶5 .In how many ways can the teachers be
assigned the work (without displeasing any teacher
c Solve the recurrence relation 𝐹𝑛+2 = 𝐹𝑛+1 + 𝐹𝑛 where n ≥ 0 and 𝐹0 = 0, 𝐹1 = 7 L2 CO4
1.

Module – 5
Q.9 a Define group. Show that fourth roots of unity is an abelian group . 6 L2 CO5
If G be a set of all non-zero real numbers and let a* b = ab/2 then show that
b (G,*) is an abelian group. 7 L2 CO5
c Define Klein 4-group. And if A = { e,a,b,c} then show that this is a Klein -4
group 7 L1 CO5

OR
Q.10 a Define Cyclic group and show that (G,8) whose multiplication table is as 6 L2 CO5
given below is
Cyclic
* a b c d e f
a a b c d e f
b b c d e f a
c c d e f a b
d d e f a b c
e e f a b c d
f f a b c d e
b State and prove Lagrange’s theorem 7 L1 CO5
c If G be a group with subgroup H and K. If |𝐺 | = 660 and |𝐾| = 66 and K C H 7 L2 CO5
C G and find the possible value for |𝐻|

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy