V SEM Merged

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Ciass Test 1

Subject Name: Design and Analysis of Algorithms Subject Code: KCS-503


Semester: 5th
Rranch:Computer Science &Engineering
Time: 1-hour Max Marks 10

Noté: Attempt any 2 questions. Each question carries equal marks. Please answer every
question with proper explanation.

1. Solve the foilowing Recursive Equatior using Recursive trec method.

T(n) =T(G)+T)+1()|+ 0(r) where T((1) = 1

2. Proof that T(n) = 0(n09b ") if T(n) =aT() + fn).for some a >1,b>1
and f(n) = 0(nlo9b a-e), where [ > 0.
3. Suppose that the splits at every leve! of Quicksort are in the proportion 1-a to a,
ihere 0 s1/2 is a constant. Show that the minimum depth of a leaf in the
los r/loga and the maximum depth of a leaf is
recursion tree is approximately
approximately -log n/log (l-.Dot warry aboutinteger round-off )
Bundelkhand Institute of Engineering and Technology, Jhansi
Department of Computer Science & Engg
Class Test 1 (2022-2023)
B.Tech Vh Semester
Sub Code: KCS-054
Time: 1Hours Sub: Object Oriénted System
Max. Marks: 10 Design
INSTRUCTION: Roll No.
1) Attempt all the questions with suitable Example.
Q.No. Question
Attempt all parts of the following: Marks CO
a Distinguish between data abstraction and data encapsulation using suitable code.
b Discuss 02
polymorphism. What are the advantages of polymorphism? 02
Attempt all parts of the following:
a Difference between OOA and OOD. 02
b What do you understand by UML? 02
3
Difference between Links and Association. 02
JOnlyfor 3rd Year VSemester CS&E Students]

CT-II(2022-23)
Compiler Design (KCS-502)
Time:01 hr. Max Marks: 10

Roll No.
Note :Attempt any 4 questions. Each question carries equal marks.
Q.No Question Marks Co

1. Show the following Grammar: S-> AaAb|BbBa A-> ¬ B-> ¬ 2.5 C03
Is LL(1)
2. Consider the followingGrammar: C-> CDd|Ca la D-> De |b 2.5 CO3
Remove left recursion.
3.Differentiate between Top down and Bottom up Parsing methods. 2.5 CO3
Describe the various representations of three-address codes.Translate 2.5 CO4
he, A=-B*(ctd) | E
t t expression into Quadruples and Triples.
Ssynt
5. Explain the following categories of Intermediate codes: 2.5 CO4
(i). Syntax trees (ii). Quadruples (üi). Triples
6. What is Syntax-directed-translation? How are semantic actions attached 2.5 C04
to the productions? Explain with example.
Bundelkhand Institute of Engineering and Technologv.
Department of Computer Science & Engg
Class Test 2 (2021-2022)
B.Tech-5 Semester
Sub Code: KCS-601
Time: 1 Hours
Sub: Software Engineering
Max. Marks: 10
Roll No.

NSTRUCTION:
Attempt all questions with suitable examples.
Question Marks
What do you understand by Coupling and Cohesion measures? 02
b Discuss Unit, Integration and Acceptance testing. 02
Define Top-Down and Bottom-Up design model. 02
d Describe White box and Black Box Testing. 02
What do you mean by risk Management? 02
Class Test-II, B.Tech.(Computer Science &
Database Management System-KCS-501
Engineering)Session 2022-23
Note: Attempt all five questions. Each question carries 2 marks.
Time: 1.0 Hour
Question 3 has internal choice.
M Marks:10

Q.No
1) Discuss lossless join and dependency
Questions Marks CO
preservation.
2 CO3
2)| If relation R(ABCDEGH) has functional dependency F=
B>G, B>D}, then decompose the relation up to third normal form.
{AB-’C, AC->B, AD>E, BC>A,
2 CO3
3)| STUDENT (Sid, Sname, DoB),
COURSE (Cid, Cname, Faculty), 2 CO2
GRADES (Sid, Cid, grade)
Using the above data write down the SQL query of the
a. Retrieve Sname of the student who got 'A' questions given beloW.
b. Retrieve Sname of students who got grade at last one course taught by Lazart
'A' grade in all the courses:
OR
Write the above queries asked in relational
algebra
4) Consider the universal relation:
given as follows:
F-{AB->C,R=(A,B,Ç,D,E,F,G,H,I,J) and set of
A>DE, B->F, F>GH, D>J} functional dependency F 2 CO3
ii. Determine the key for R
iv.
Decompose R into second normal form.
5)| What are the ACID properties?
Discuss each one with example 2 CO4
Class Test 2

Analysis of Algorithms
Subject Name: Design and Subject Code: KCS-503
Branch: Computer Science & Engineering Semester: 5th
Time: 1-hour Max Marks 10
Mote: Attempt al 3 questions. Please answer evey question with a
proper explanation.
1 Any message is divided into trames ala
Caence of frames, Let us assume tne Ske
transmitted from source to destination in a
of each frame is 100
characters and the size of
the message is 10000 characters. Ihe net/OTKIng COmpany uses a compression technigue to
compress the message before transmitting over the network. Suppose the message contains
the following characters with their occurrence probability. Then find out the number of
frames saved when a compressed message is transmitted over the network. 3
Character Occurrence Probability
a 0.25
b 0.125
C 0.0625
d 0.0625
e 0.5
Hint: If the number of frames required to transmit the message is 10 without using
compression and the number of frames required to transmit the compressed message is
8, then the number of frames saved is 2.

2. What is minimum spanning tree? Let a Graph G has e,, e, ..,e, distinct edges with
increasing order of weights than answer the following with valid reason and vaiid exampie:
a. Is the Minimum Spanning Tree unique?
b. Is Minimum Spanning Tree containing en?
Construct the minimum cost spanning tree for the following graph: 1+2

6 5

3
5 6
3
5

3. Solve the following instance of 0/1 Kanpsack Problem by Branch and Bound. 4

Item Weight Profit Knapsack Size


1. 10

3 -(a-e
10
4 14 70 W=30
5. 2
6 4
KCS-056
Total Number of Printcd Pages.02

(Roll No. to be filled by candidate)

o 1 3 obs
B. TECH.
2021-22
FIFTH SEMESTER THEORY EXAMINATION,
APPLICATION OF SOFT COMPUTING
Max. Marks: 100
Time: 03 Hours

Note:
marks.
Attempt all questions. All questions carry equal
Assume missing data suitably.

4x5 CO
1. Attempt any FOUR parts of the following:
neural network?
CO1
What are the characteristics of
a CO2
Exclusive OR problem.
6. Draw a network for solving CO3
Define a Fuzzy set and Crisp set. CO4
defuzzification.
d. Explain the concept of COl
and multilayer perception model.
Compare single layer COl
What is activation function?
2x10 CO
of the following:
2 Attempt any TWO parts function? CO4
set and what is a fuzzy
a. Define fuzziness of fuzzy CO4
set operations.
Discuss the basic fuzzy model and Write C02
Explain neuron
McCullochs-Pitt

disadvantage ofit

2x10 CO
3 Attempt any TWO parts of the following crossOver in CO5
and yniform
plain two point
crossover
a.
genetic algorithm. CO2
of error signal in perceptron
b. What is the significance
network? Explain. Col
building blocks of biological
C. What are the fundamental
neural network? Discuss

c c h d d t a n

exdudo{milde ? men
Total Number of Printed
Pages:02 KCS-056
4. Attempt any TWO parts of the following: 2x10 CO
State the different selection method in Genetic Algorithm. CO5
b. Write the algorithm for back
propagation training method. CO2
Explain neuron with its structure COl

Attempt any FOUR parts of the following: 4x5 CO


a Explain Rosenblatt's perceptron model. CO2
Frite note on partition and covering C03
C hat is called supervised and unsupervised training? CO1
Discuss with suitable example.
d Explain the working of any one fuzzy controller. CO4
i v e the detail of genetic representation (Encoding). CO5
fDraw a single layer feed forward network and explain. COI
Total Number of Printed Pages:04
KCS 503

(Roll No. to be filled by candidate)

B. TECH.
EXAMINATION, 2021-22
FIFTH SEMESTER THEORY
KCS-503

DESIGN AND ANALYSIS OF ALGORITHM


Max. Marks: 100
Time: 03 Hours

Note:
Attempt all questions. All questions carry equal marks.
Assume missing data suitably.

4x5 CO
1 Attempt any FOUR of the following:
parts
CO1
relation:
Betermine the bound for the recurrence

27 (+0(7051), T(1) 1
=

T(n) =

function: COl
Find out the time complexity of the following
fun(intn){,
ifns 1)
return;
for(int i =0; i< n; i t t )
printf(" ");
fun(0.6n)
C.
Write down the best algorithm to find out the square root CO
of a number n and discuss the time complexity of the
suggested approach.
Describe the worst case of Quick Sort with proper COl

example and give the recursive of the same.


e. Find out the time complexity of BuildHeap() function. CO
Total Number of Printed Pages:04 KCS 503

f. Write down the algorithm to find out minimum element CO1


in MaxHeap, which takes minimum number of
comparisons.

2 Attempt any TWO parts of the following: 2x10 Co


aproof that Red-Black tree is a heigh balanced tree. What is CO2
the main advantage of Red-Black tree over AVL tree?
Insert following keys into an empty Red-Black Tree.
{6, 15, 4, 14, 24, 28, 30}
bWiat are advantages of B-Tree over B-Tree? Insert the CO2
following keys into an empty B-1ree.
(15, 30, 25,18, 7,19, 17, 32, 35, 37, 20, 27, 22, 1, 5, 39, 42
45, 12) ninlwd m deha
C. Write down the short notes upon the following terms: CO2
i. Binomial Heap
ii. Fibonacci Heap
ii. Bt-Tree

3. Atteapt any THWO parts of the following: 2x10 CO


W h a t is meant by Divide - and - Conquer approach? CO05
Write Divide And - Conquer recursive Quick sort
algorithm and derive the time complexity of this
algorithm.
b. State the Greedy Knapsack with its time complexity? Find CO5
an optimal solution to the Knapsack instance:
n = 3, W = 20, (p1,p2, p3) = (25, 24, 15) and

(w1, w2, w3) = (18, 15, 10).

CWhat are the limitations of Dijkstra's Algorithm for Single CO5


Source Shortest Path? Apply the Dijkstra's Algorithm on
given graph find out the shortest
to path to all the nodes
from Source node S.
Total Number of Printed Pages:04
KCS 503

Attempt any TWO parts of the following: 2x10 CO


h a t do you mean by All Pair Shortest Path? Discuss the CO3
Floyd Warshall's algorithm with its time complexity.
Apply Floyd Warshell's algorithm to find the shortest
path between all the pairs of vertices.

12

b. Solve the following instance of 0/1 Kanpsack Problem by CO3


Branch and Bound.
Item Weigh Profit Knapsack
Size
10 80
8 8
10 20
14 W-30
70
5 2 4
6. 4 36
Let A1, Az, A3 and A4 be four matrices of dimensions COS
10x 5,5 x 20,20 Xx 10
and 10X 5 respectively.
3
|oX>oo x soxlses
SXIO SOx
S
SOx N
Total Number of Printed Pages:04 KCS 503
Find out the minimum number of scalar
multiplications
required to find the
product A1A2Agh4 using the basic
matrix multiplication method and the order of
multiplication.
5. Attempt any
TWO parts of the following:
2x10 CO
aDescribe the Rabin-Karp string matching algorithm along CO4
with time complexity and suitable
example.
b. Explain the P, NP, NP-hard, NP-complete classes. Give CO4
the relationship between them. If an
which solved the 3-SAT Problem in algorithm
is found
what will the polynomial time, then
classes?
relationship between different complexity
C.
C. Write down the short note
upon any two of the following: CO4
i. Randomized Algorithms
ii. Hamiltonian Cycles
iii. Graph Coloring
TCn+ 19
T6+13)+

i -h
di+
Total Number of Printed Pages 02
KNC 501

(Roll No. to be filled by candidate)

9 4 3 S
B. TECH.
FIFTH SEMESTER THEORY EXAMINATION, 2021-22
KNC-501
CONSTITUTION OF INDIA, LAW AND ENGINEERING
Time: 02 Hours Max. Marks: 50

Note:
Attempt all questions. All questions carry equal marks.
Assume missing data suitably.

1. TWO parts of the following:


Attempt any 2x5 CO
a. Discuss Historical background of the constituent assembly COi
and Government of India act 1935.
orate Role & Function of Prime minister of India. CO2
Discuss Function of Lok sabha.
C cuss enacted law & common law. CO3
2. Attempt any TWO parts of the following: 2x5 CO
h a t is intellectual property law? Discuss Legal aspects of C04
patent.
h a t is memorandum of association? Discuss article of CO5
assoçiation.
laborate Indian constitution & its salient features. COl

3. Attempt any TWO parts of the following:


Explain judicial review & Public interest litigation.
25 CO
CO2
b. Describe arbitration as alternative to resolve
disputes. CO3
What do you mean by E- governance'? COS
Total Number of Printed Pages:02 KNC 501

4. Attempt any TWO parts of the following: 2x5 CO


What are powers of President of India? Compare,jt with his CO2
U.Scounterpart.
Explain Right to Information act 2005. CO4
C. Describe contract law & law at workplace. CO3

5.
5. Attempt any TWO parts of the following: 2x5 CO
axplain procedure of amendment in constitution of India: CO2
What are the functions of high court & subordinate court? CO2
Cxplain rights of patents & infringement of patents. CO4
olb ject
i t a r dhiel

Toti Number of Printed Pages:03 KCS 501

candidate)
(koll No.
to befilled by
4 3|1 oS
B. TECH.
FIFT SE AESTEk THEORY EXAMINATION, 2021-22
KCS-501
DATABASE MANAGEMENT SYSTEM
Max. Marks: 100
rin. 0 rs

Note:
Atempt ail questions. All questions carry equal marks.
Assume missing data suifably.

Attempt any FOUR parts of the following: 4x5 CO

What is deta and database? Co1


b at are data modeis? Describe different types of data COl
mode.
C. Differentiate between DBMS and RDBMS. COi

dExplain 2-tier and 3- tier architecture of DBMS. CO1


in o l
What are generalization, specialization and aggregation
DBMS?
f. Explain different degree of relationship. CCl

2Attempt any FOUR parts of the following: a5 CO


a. What are different types of relational operations? CO2
b What is Jin Operation? Explain inner join and outer join. C02.
CO2
Pescribe the characteristics and advantages of SQL CO2
Explain different symbols used in ER diagram. Co2
e. What ara different SQL data type and Literals? CO2
Differentiae between DDL and DML. CO2

1
Total Number of Printed
Pages 0
KCS 5
3 Attempt any THO parts of the 1ollowY
a. What are
10
different types of inference riies? Proof the
CO
CO3
followings using inference rules-
1)Ifx Y and X Z then X YZ
2) If X YZ then X Y and X Z
3)IfX Y and YZ W ther XZ W
Given a relation R(( X, Y, Z) and Functional Depedency CO3
set PD XY and Y-Z}, determine whether the
given R is in 3NF? If not convert it into 3 NF?
C. Consider a relation schema R( X Y ZW P) (above table CO3
R) is decomposed into R I(XY) and R2(7 W ). determine
whether the above Ri and R2 are Lossless or Lossy?
2) Given a relatiou R( P, Q, R, S, T, U, V, W, X, Y) and
Functional Dependency set Fi)= { PQ R. PS -VW,
QSTU, P> X, W-Y}, deiermine whether the given
R is in 2NF? If not convert it into 2 NF.
PoS
4ttempt any TWO parts of the following: 2x10Co
aConsider the following schedules involving two CO4
transactions-
S1:RI(X) RI(Y) R2X) R2(Y) W2(Y) WI(X)
S2: R1(X) R2(X) R2(Y) W2(Y) RI(Y) W1(X)
Explain which transaction is conflict serializable and why?
b. Why Recovery is needed in DBMS? Explain the log based CO4
recovery in DBMS.
What are checkpoints in DBMS? Explain deadlock in cO4
DBMS cons 8

Atempt any TWO parts ofthe following: 2x10 CO


AExplain the properties of transaction and consider the CO5
following transaction involving two bank accounis x and y:
KCS 501
Printed Pages:03
Total Number of'

read(x);
x:X-50;
3. writ-(X):
4. read(y)
5. y y +50;
6. write(y);
that
Which transaction propertis is there when constraint
should remain constant?
Jhe sum of the accounts x and y CO5
6. locking in DBMS.
Expiain multiple granualarity
and validation based CO5
C. Describe the timestamp protocol
protocol.

Sax

STY
Total Number of Printed Pages 03 KCS 502

(Roll No. to be filled by candidate)

4 3 eos
B. TECH.
FIFTH SEMESTER THEORY EXAMINATION, 2021-22
KCS-502
COMPILER DESIGN
Max. Marks: 100
Time: 03 Hours

Note:
marks.
Attempt all questions. All questions carry equal
Assume missing data suitably.
2 10 CO
UAttempt any 7WO parts of the following: CO1
Dscuss the phases of a compiler indicating the inputs and
the statement
outputs of each phase in translating
a m o u n t = principle + rate * 3 6 . 0 "

CO
Explain the following terms: -

i) Translators, compiler and


erpreters. i1) Bootstrapping.
What is meant by Input buffering? Explain the use of COi
sentinels in recognizing tokens.

2x10 CO
22 Attempt any TWO parts of the following:
CO2
a. What is an LALR (1) grammar? Construct LALR parsing
S CC, C c C .
table for thefollowing grammar:
Ccld.
b. What is an LR (0) item? Construct an SLR parsing table CO2
L-R |R, L *R | id , R L Is it
forthe grammar S
SLR () grammar?
Total Number of Printed Pages 03
KCS 502
c.Define
C. an LL ()
grammar. Is the following grammar LL CO2
(1). G:SiCtS| iCtSes | a, C-b. Also write the
rules for computing FIRST ) and FOLLOW 0.

3.
3. Attempt any 7WO parts of the following: 2x10 CO
a. a) What is the difference between synthesized and CO3
inherited attribute? Explain with example.
b) Explain about the syntax directed translation scheme for
the Boolean expression with example.

b Obtain the directed acyclic graph for the expression CO3


x+x(y+ z)+(y+z)* w
b) Explain the following with example:
i) Quadruples ii) Triples ii) Indirect triple.

C. Generate intermediate code for the following segment CO3


along with the required syntax directed translation scheme:
Ifab)
Xatb
else
xFa-b
where a and x are of real and b of int type data

2x10 CO
4. Attempt any TWO parts of the following: CO4
a. Explain the concepts of static, stack and heap allocation
with its merits and demerits.
and CO4
Explain the various strategies of symbol table creation
organization.
What are the various types of Errors that may appear in C04
Error
compilation process? Explain the function of
handling phase of a compiler?
Total Number of Prunted Pages 03 KCS 502

5. Attempt any TWO parts of the following: 2 10 CO


a. Explain the following with examples. COS
iConstant propagation ii) Strength reduction iii)
Frequency reduction iv) Loop unrolling and jamming

b r i t e short notes:- COS


i)Loop optimization ii) Dead code elimination
jBack patching iv) Peephole optimization
Explain the following with examples. CO5
i) Redundant sub expression ii) DAG
iii) Copy propagation iv) Activation record.
Total Number of Printed Pages:03 KCS-054

(Roll No. to be filled by candidate)

3 ol4 3 os
B. TECH.
FIFTH SEMESTER THEORY EXAMINATION, 2021-22
KCS-054
OBJECT ORIENTED SYSTEM DESIGN
Max. Marks: 100
Time: 03 Hours

Note:
marks.
Attempt all questions. All questions carry equal
Assume missing data suitably.

4x5-20 CO
1. Attempt any FOUR parts of the following:
a. Differentiate between structured approach
and object- CO1
oriented approach.
b. Describe the structured analysis and structured design COO3
Approach with an example.
C. Explain "this pointer' with the help of example. COs
machine diagram for CO2
. Befine state machine? Draw a state
answering a telephone call.
h a t do you mean by generalization? Explain.
How is it cO
related with inheritance?
Write a program to print the length of a rectangle using CO
friend function.

Attempt any FOUR parts of the following: 4x5-20 CO


2
a. Identify major differences among Aggregation, Association CO2
and Composition with help of an example.
b. Write short notes on: CO
G). Data store
(ii). Actors
(ii). Control flows
Total Number of Printed Pages:03 KCS-054

occurs in multiple inheritance, CODs


h e n ambiguity (Collision)
how it can resolve explain with the help of suitable
example.
the term namespace, identifiers, variables, CO4
,dDescribe briefly
constants, enum.
CPrepare a Data Flow Diagram for competing the volume CO2
and surface area of cylinder. Inputs are height and radius of
the cylinder. Output is volumes and surface area.
f.What do you mean by modeling? Discuss several purposes CO
served by models with suitable examples.

3 Attempt any FOUR parts of the following: 4x5-20 CO


aDescribe call by reference and return by reference with help CO4
of an example.
b. What do you mean by events and states in dynamic model? CO2
Draw scenarios and event trace for the phone call.
C. Describe operator overloading with an example. COs
d h a t do you mean by UML? Discuss the conceptual model CO
of UML with the hep of an appropriate exanple.
e. Write short note on object-oriented analysis and object- CO3
oriented design.
Explain Virtual Function and Pure Virtual Function with the CO4
help of an example

4 Attempt any TWO parts of the following: 2x10-20 CO


h a t is Polymorphism, explain its types. How runtime COs
polymorphism is different from the compile time
polymorphism. Implement the runtime polymorphism with
the help of virtual function.
b. Differentiate the following terms: CO
i) Link vs. Association
(ii) Generalization vs. Specialization
Aii) Constraints on Objects
C. Explain each of the following with in reference to object CO3
oriented programming style with an example:
G) Reusability
Total Number of Printed Pages:03 KCS-054

(i) Rebustness
m)Extenstbility
Abstraction
5. Attempt any TWO parts of the following: 2x10-20 CO
a t is the role of access modifiers (Visibility Modes) in the
context of Inheritance? Explain the visibility of inherited
COs

members with the help of suitable example.


Dstribe the relation offunctional model, object model and CO3
zdynamic models. What is relationship and difference between
O0A (Object oriented analysis) and OOD (Object oriented
design)?
C. Write the short note on the following: CO2
() Propagation of operations
(ii) Abstract Classes
(ii) Recursive Aggregate and its types

You might also like