Sem7 First Sessional

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

DHARMSINH DESAI UNIVERSITY, NADIAD

FACULTY OF TECHNOLOGY
FIRST SESSIONAL
SUBJECT: (CE-701)Artificial Intelligence
:CE o23
Examination :B.Tech Semester VII Seat No.
Date :31/07/2023 Day Monday
Time :2:30 to 3:45 PM Max. Marks :36

INSTRUÇTIONS:
1. Figures to the right indicate maximum marks for that question.
2. The symbols used carry their usual meanings.
3 Assume suitable data, if required & mention them clearly.
4 Draw neat sketches wherever nccessary.

Q.1 Do as directed. [12]


CO1 R [2]
(a) Define following properties of inference rules: i) Sound i) Complete [1]
COI U (b) Which generation language is PROLOG? Justify your answer.
(C) Assuming appropriate declarations are being made, state the output of the following 3J
PROLOG clauses for the goal a(X).
a(X):- b(X),!, c(Y).
a(X) :- d(X).
b(1).
CO3 N b(4).
c(1).
c(X);- fail.
c(3).
c(4).
d(5).
CO1 R
(d) List the capabilities, which are required by machines to pass the Turing's test. Write (2]
the purpose of each capability listed.
CO1 R (e) Define fo0lowing terms: i) Operationalization ii) Chronological backtracking [2]
CO1 () What are the arguments favoring use of heuristic? [2]

Q.2 Write PROLOG programs for any 2 of the following: - [12|


C04 C (a) Finding n" element of a list. [6]
Validate n, i.e. if it is not appropriate then a relevant message should be printed.
Goal: nthelement ([1, 2, 3], 2) prints 2 as the output.
CO4 C (b) Splitting list into two parts -- 1s list contains only odd elements and second ist [6]
contains only even clements. eg. oddeven ((1, 2, 3, 4, 5]. X, Y) generates
X= [1, 3, 5] Y= (2, 4], 1 solution as the output.
CO4 C (c) Rotating left elements of alist. eg. rl ([1, 2, 3,4], X)generates X=[2, 3, 4, 1] as the [6]
output.

Q.3 Attempt the follpying questions. |12]


CO2 A (a) Solve BLÁK+GREEN=ORANGE crypt-arithmetic problem based on given rules: [6]
Rules:Each letter or symbolrepresents only one digit throughout the problem. When
letters are replaced by their digits, the resultant arithmetical operation must be
correct. The numerical base is 10. Numbers must not begin with a zero. Show all
necessary calculations.
COZ N (b) i) Show how means ends analysis could be used to solve the problem of getting from |3]
one place to another. Assume that the available operators are walk, hire the auto.
take a bus, take a train and take a flight.
CO2 N ii) Explain disadvantages of Hill Climbing and its solutions. [3]
OR

Page 1 of 2
Q.3 Attempt the following questions. To calculate [6]
C02 A (a) Solve 8-puzzle problem using steepest ascent hill climbing algorithm.
desirability of amove use following heuristic function.
positions.
H(X): Sum of Manhattan distance of the tiles from their goal
+0+1+1+0+1=5
H(Start) - h(1)+h(2)+h(3)+h(4)+h(5)+h(6)-+h(7) +h(8)-0+1+1
H(Goal)= 0
Start State Goal State

2 1
1
4 5 6
4
7 8

horizontal and/or vertical direction.


Note: Tile'smovement is restricted only to
Show all necessary calculations. [4]
(b) i) Discuss following problem characteristic with respect to Travelling Salesman
CO2 N
problems.
and Missionary and Cannibals
undone? Which class does it belong?
1. Can solution steps be ignored or
2. Is the universe predictable? Explain.
Explain.
3. Is a good solution is absolute or relative?
4. Is the solution a State or a path? Explain. (2]
programs?
Co2 N ii) What are the issues in the design of search

Page 2 of 2
DHARMSINH DESAI UNIVERSITY, NADIAD

DExamination
Date
:B.Tech Semester VI
:01-08-2023
FACULTY OF TECHNOLOGY
FIRST SESSIONAL
SUBJECT: (CE -714) Image Processing
Seat No.
Day :Tuesday
io 3374

Max. Marks :36


Time :02:30 PM To 03:45 PM
INSTRUCTIONS:
1. Figures to the right indicate maximum marks for that question.
The symbols used carry their usual meanings.
3 Assume suitable data, if required & mention them clearly.
4 Draw neat sketches wherever necessary.

[12]
Q.1 Doas directed. [2
CO2 A (a) Validate that convolution in spatial domain is analogous to multiplication in
frequency domain.
COI N (b) When you enter a dark theater on a bright day, it takes an appreciable interval of 12]
time before you can see well enough to find an empty seat. Which of the visual
process is at play in this situation? [2]
CO1 R (C) Consider an impulse function S (t, z) of two continuous variables, tand z. Write the
general form (equation) of8 (t, z) and sifting property of ô(t, z) at (t, z) =0 and (t,
z) =(to, Z).
U(d) Give the general form (equations) of Log and Power-Law intensity transformation (2]
CO1
functions and draw the graph representing these within the range (0 to L-l), where L
is maximum intensity. (2]
CO1 E (e) Consider the following 3 bit image of size 3 x 3:
2
3
4
Find the average value of intensities in the image using the probability information about
the number of pixels being at a particular intensity level (p(r).
CO2 A () i Is the filter shown below a smoothing filter or sharpening filter? Give brief [2]
reason.
1|2 1
2| I|2
12 1
ii. In a given application an averaging mask is applied to input images to reduce
noise, and then a Laplacian mask is applied to enhance small details. Would
the result be same if the order is reversed?

Q.2 AttemptAny TWOfrom the following questions. [12]


CO1 C (a) The pixel intensity values of a gray level image have the probability density [6]
functionp, (r) given by p, (r)=2(1-r), for0<r<(- 1), and zero otherwise.
It is desired to transform the gray levels of the image so that they have probability
density function p, (2)= 2z, for 0 < z s(L-1), and zero otherwise. Assume that r
and z are continuous variables,
1, Find the transformation that accomplishes this.
2. Validate that T) obtained after applying histogram equalization on p- ()
has uniform probability density function.
q
CO1 E (b) Compute the lengths of the shortest 4-,8- and m- path (if exists) between p and
[6]
i. V={0,1}
ii. V={1,2}
3 1 2 1(q)
2 2 0 2
1
(p) 1 0 1 2
CO1 E(c) Findthe Fourier Transform of the box function in 1D shown in figure below and [6]
analyze the Fourier spectrum generated.
f()

-W/2 0 W/2
Q.3 Attempt the following. (12]
CO2 E (a) The following figures show {06|
fig 1: a 3-bit image of size 5 x5
fig 2: a laplacian filter

1 2 3 4
Laplacian
13 7620
filter
-| - 2 - |
2 214 |6 1 1
3 4 7 (2)5 |4 1 (74+
22g
tea)
1
43 0 6 21
0
S|7|5I20
fig 1 IC24s fig2
1

-(2,+

compute the following


i. The output of a3 x3 mean (average)filter at (3,3)
ii The output of a 3 x 3 laplacian filter shown in fig 2 at (3,3)
iii. The output of a 3 x 3 sobel mask at (3,3) i.e., G, (Gradient in x direction)
iv. The output of a 3 x 3 sobel mask at (3,3) i.e., G,( radient in y direction)
V. Calculate Gradient magnitude.
vi. The output of median filter at (4, 5) with zero padding.
CO1 E (b) For the 8 x 8, 4 bit image shown below, draw the histogram. Show the new image 06]
along with its new histogram after histogram equalization.
Gray Level 012 3 4 6 7

No. of Pixels 11 10 15 3
OR

Q.3 Attempt the following. [12]


CO2 U (a) Explain image formation model. Also discuss sampling and quantization to generate [06]
a digital image with suitable diagram.
CO1 E (b) a) Perform Histogram Equalization on the image with following data and draw [04]
the histogram of new image.

Gray Level 2 4 6 7
No. of Pixels 6 4 8 10 12 12

b) For Histogram Equalization Transformation function T¢) give reasons for {02]
the following conditions to be true.
i. T(r) is monotonically increasing inthe interval 0 <rsL-l.
i. 0<T(r) sL-1 for 0<r<L-1.

Page 2 of 2
D DHARMSINH DESAI UNIVERSITY, NADIAD
FACULTY OF TECHNOLOGY
FIRST SESSIONAL
SUBJECT: (CE725) BIG DATA ANALYTICS
bI5 30
2G

Examination :B.Tech Semester VII


Date Seat No.
Time :02-08-2023
:2:30 P.M. Day : Wednesday
to 3:45 P.M.
Max. Marks :36
JNSTRUCTIONS:
Figures to the right
indicate maximum marks for that
2
The symbols used carry question.
3
Assume suitable data, if their usual meanings.
required &
4
Draw neat sketches wherever mention them clearly.
necessary.
Q.1 Do as directed.
CO1 U |12]
(a) Summarize the evolution of
CO1
analytics/analysis:
(0) DeScribe how you wil! handle OLTP, OLAP ... KIA.
data migration from companyA to
[2]
given software product? companyB of a l
(C) Determine categories of Digital Data for the
following via placing in the
CO1 A basket of Structured, Unstructured or Semi-structured : Email, MS relevant 12J
Access,
Images, XML, Chat Conversations., HTML. Relations/Tables, Videos, MS Excel,
JSON.
CO5 R (d) How does HDFS handle datanode failure ?
COS E (2]
(e) State True or False with justification: Secondary namenode is a backup node."
CO6 N () Differentiate the following. [2)
(I) Failed task vs killed task [2]
(1) CopyFromLocal command vs MoveFromLocal command
Q.2 Attempt Any THOfrom the following:
CO4 (a) (I) Explain characteristics/V's of Big data in [12]
detail. (Any three). [3]
( )Explain the similarities and differences between client server
master slave architecture. architecture and (3]
CO5 A (b) Suppose a HDFS client wants to
store the data of a file named as 6
"demo.txt'(size-356MB) in HDFS,Assume that the system block size is
configured as 128MB.Considering the above example illustrate the
HDFS Write mechanism in detail. steps of
CO6 (c) Illustrate the steps of a MapReduce job that
reads any text input and computes [6]
the average length of all words that start with
each character. For any text
input,thejob should report the average length of words that begin with
'a','b',and so forth. case sensitive.
For example.
Mapper Input:-No now is definitely not the time
Reducer Qutput :
2

d 10

t 3.5

Page 1 of 2
MaraliOt A’B ’ t

Q.3 Attempt the following: [12]


C02 A (a) Apply and explain in detail the Data Smoothing Technique using Equal Width [6]
Binning, Bin Means, and Bin Boundaries for the following Data:
5,10,I1,13.15.35,50,55,72,92
CO3 E (b) Evaluate association rules on data items with Minimum
Support threstoru
40% and Minimum Confidence level as 60% for the following transactions. Use
Apriorialgo for Market Basket Analysis.
Transaction ID ITEMS List

TI (Bread, Milk}
T2 {Bread, Donut, Book, Eggs)
T3 {Milk, Donut, Book, Cola}
T4
{Bread, Milk, Donut, Book}
TS
{Bread, Milk, Donut, Cola)
OR
Q.3 Attempt the following: |12]
C02 A (a) Apply the statistics of Five Number Summary ( Upper
Extreme, Lower Extreme, l°}
Median, Upper & Lower Quartile) for Interquartile range on the dataset (3, 7. 3, J.
12, 14, 21, 13, 18}, and Visualize it using the
CO3 E Whisker/Box plot.
(b) Support Data Characterization using Attribute oriented Induction (AO) with [6]
example.

Bloom's Taxonomy levels :


R-Remembering, U- Understanding, A-Applying, N-Analy zing, E-
Page 2 of 2
Evaluating, C-Creating
153o &o
k
NADIAD
DHARMSINH DESAI UNIVERSITY,

ID FACULTY OFTECHNOLOGY
B.TECH. SEMESTER VII [CE]
SUBJECT: (CE-718)COMPILER
Seat No
CONSTRUCTION
Examination : First Sessional :Thursday
:03/08/2023 Day
Date Max. Marks :36
Time :02:30 PM to 03:45 PM

INSTRUCTIONS:
that question.
1. Figures to the right indicate maximum marks for
2 The symbols used carry their usual meanings.
clearly.
3. Assume suitable data, if required & mention themn
4. Draw neat sketches wherever necessary.
(12]
Q.1 Do as directed. 2
example: Token, Lexeme and Pattern
CO1-R a) Explain the following Terms with suitable 2
CO1-A b) Identify the lexemes that make up the tokens from the
given C code
int max (i,j)

return i >j?i:j;
} 2
CO1-U c) Compare: Compiler and Interpreter.
2
CO4-E d) State the number of nodes and edges in the DAG for the expression
x+x+ (x+x +x+ (xtx+xt x)
CO4-U e) Define strength reduction and frequency reduction with an example. 2
instructions,
CO4-À f) Perform local copy propagation on the given code block with 4
p=r=ptq; S=p;p=r* s;

Q.2 Attempt Any Two [12]


CO1-R a) Explain phases of Compiler with a suitable block diagram. 6
CO1-A b) Construct Moore Machine for f(x)-x mod 3. Convert the Moore Machine to Mealy 6
Machine.
Ex. F(101l)=2
F(100)=1
F(011)-0

CO1-C c) Construct Transition Diagrams for 6


(1) Relational Operators
(2) Identifiers
(3) White space

Q.3 Answer the following


CO4-A a) Translate the arithmetic (12]
expression a = (- c * b) + (-c
* code, 6
quadruple form and triple form. d) into three address
6
CO4-E O) Find local common subexpression elimination using AEB on the following code block.
(1) c=a+b (5) a =j+a
(2) d= m&n (6) j=b+ d
a =-b
(3) e=b+d (7)
(8) If m & n goto L2
(4) h=bta

OR
[12]
Q.3 Answer the following 6
CO4-A a) Compute EVALi) and KIlLL() for the graph in Fig, A. 6
product of two vectors a and b of length 20.
CO4-E D) Consider the source code in Fig. B. for dot
Dothe following:
Write the cquivalent three address code
Identify leader(s) and construct basic block(s)
Draw the control flow graph

ENTRY
begin
prod:= 0;
i:=1;
B
(1) a = 1 do begin
(2) b = 2
prod := prod + a<i] * b[iJ:
i:=i+ 1;
(3) c = a+b
end
(4) = C-a
B
while i <=20
end
(5) d = b+d
B

(8} b atb
B(6) d = a+b (9) e = C-&
e = e+1

(10) a = b*d
(11) b = a-d

EXIT

Fig, A. Fig. B.

You might also like