0% found this document useful (0 votes)
33 views

3rd Sem Endsemester

Uploaded by

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

3rd Sem Endsemester

Uploaded by

doviva8391
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
Proba (MAIR3D) a) bv) ° d e) 2) h) ns RUCHIRAPPALLL TAMIL NADU = 620.015, INDIA yy & Operations Research Date-06/12/2022 nswver the fallowing questions [10% 2 = 20] Ue probability that machine 4 willbe perfrming aust fnton in 5 years” ime 3 while the probability that machine B wil still be operating usefully at the end of the same period is 4. Find the probability in the following eases that in "time: : | 1) Only machine B will be operating. | i) At Teast one of the machines will be operatin Given that P(A. B pand PA UB) = 3 find (i) PCA. (id) PCB) 3 times in 5 shots, B 2 times in 5 shots and C 3 times in 4 shots, All of them fire one shot cach simultaneously a the target, What isthe probability that 1) 2 shots hit. ii) At Teast wvo shots hit? Acan hit a tangy | | | An underground mine has 5 pumps installed for pumping out storm water; the probability of any one of the pumps failing during the storm is 5. What is the probability that i) at least 2 pumps will be working: ii) all the pumps will be working during a particular storm. If the density function of a continuous random variable X is given by 0, x<0 _ jax, Osxs2 FO=Va@q-x, 2ex4 0, x>4 ) Find the value of a and the cumulative distribution function of X. ) Find P(X > 2.5). A continuous random variable X has the probability distribution dF =aePldx, -m 3,7 > 1) and POX FY S10). IfX is normal (1,0), then prove that E(x) = 4 and Var(X) = 0 IfX is normal (1,0), and ¢(2) is the standard normal distribution, then prove that P(a $X > = 3 ABIC -> + | * | () | b) Draw the inheritance diagram and complete Class Inheritance Record (with viable) for the following program. class Add t public: int WX YE virtual void add() {...} virtual void sub) {.--} B class Sub { public: int 2; virtual void sub() {...} virtual void sum() {... } & class Div : public Add, public Sub { public: int u; virtual void add{) {... } virtual void sub() {...) Dr. R, Bala Krishnan, Asst. Prof,, Dept of CSE, NIT, Tiruchiroppalli ~620 015 alee virtual void dud) {. ' i 2. For the following program (2msimM+9M) a) Write the basic Activation feecord Instance bb) Write the order in which the function calls ate made ) Draw the Activation Record Instance /Hlint: Mark all the possible locations of (and SP using dotted arrows) procedure Main 2 ls Xr Integer: procedure igaubs Is ALB, Ct Integers ocedure sub Is A, Df Inteqar: begin ~ AG Integer Is Integer: procedure Sub3 Is CG, Et Integer: begin -- of Sub3 Ba: -- of Sub3 begin =~ of sub2 Sub3; Ain't es end; ~~ of sub2 ub2 (7) ; ~ of subi of Bigsub of Bigsub begin -- of Main 2 Bigsub; end; of main_2 3. a) Consider that a program has 2 classes namely “A” and “8. Class Bis a subtype of Class A. Also, Class A and class B has 1 variable each namely “x” and “y” respectively. Suppose, you create an object b1 of type class A and b2 of type class B in stack memory. What will happen if you execute the following statement: b2=b1 (2M+1M+1M+1M) (a) Value of “x” in b2 is alone copied to “x” in b1 {b) Both “x” and “y" values of b2 will be copied to bt (c) Throws error 21 Page rR, Bala Krishnan, Asst. Prof, Dept of CSE, NIT, Tiruchirappalli -620 015 ow w pens an 2 yo (d)_ None of the above = b) In C44 program, a throw keyword without any value/variable_name can____— (a) Occur only inside a handler —(b) Occur anywhere inside a program (c) Occur only inside a try loop (d) None of the above c) Any object that is created inside a try loop_ (a) Will be deleted at the end of that try loop (b) Will be active even outside that try loop (c) Will be active throughout the whole program (d) None of the above ) The class at point A and point B are called as_______ respectively. class base <—— point A { class derived <—— Point 8 { } } (a) Nested and Nesting Class (b) Nesting and Nested Class (c) Virtual Class and Nesting Class {d) Nesting and Virtual Class 4. a) At which point and in what order, the destructor will be called in the following C++ program? (2M+1M+1M+1M) void main() t Base bi); b.adal);«—— Point A Derived dl); d.sub(); <—— Point B J+— Pointe b) Headless Horn clause in Prolog is called as statement ‘ ¢) If the base class members are declared as “private” and the derived class is derived using the access modifier “public”, then the class members of base class will become. 3|Page Dr. R. Bola Krishnan, Asst. Prof, Dept of CSE, NIT, Tiruchirappalli ~ 620 015 in derived class. {a) Visible {b) Hidden (c) Accessible 4) Write the names of the two types of synchronization that are required when different tasks share data. 5. What will be the output of the following code? (1M+1M+3M) [Hint: Do step-by-step derivation for question c] a) (CAR'A) b) (COR ((A B) C 0) c) (CADDAR “((A 8 (C) 0) E)) 4|Page f, Dept of CSE, NIT, Tiruchirapalli ~620 015 Programme: B.TECH Date: 08.12.2022 % 10. NATIONAL INSTITUTE OF TECHNOLOGY, TIRUCHIRAPPALLI DEPARTMENT OF COMPU SCIENCE AND ENGINEERING CSPC32- Data Structures Final Assessment Session: JULY/2022 Duration: 3 Hours Total Marks: 40, . nswer all the questions Write a program to reverse the stack elements using only stack operations (push() and pop() ). What is the time complexity? [4 M] Two linked list id L2, are piven as shown in the diagram, The first Linked list L1 ngth is (m#k) and the second Linked list L2 length is (nk). Assume that you know the first node addresses of the both lists. Write algorithm or function to find the intersection point node using only the stack data structure, What is the time complexity? (4 M] - m u 3 2: Oooo Sa < .—— Write a program or function to display the single linked list elements from the end (Do not use the other data structures), Your program time complexity should be O(n). [4 M] <——___ k —> FET Write a program or function to find the addition of two polynomials using linked list. [4M] Write a function to find the level of a binary tree that has maximum number of nodes. (4M] Write a program for finding a next immediate higher value for given array clements. Use a suitable data structure to solve this problem. You are allowed to traverse the array only once. Input: 5,2,1,4,7,3.8 Output:7,4.4,7,8,8,-1 (Next immediate higher values for the elements 5,2,1,4,7,3.8 are 7,4,4,7,8,8.-1, respectively. The next immediate higher value for the last element assumes as -1) [4 M] Write a function to find the occurrence of 2 given pattem in a given text. [4 M] Show the step by step process of Heap sort to solve the following list of elements, Derive the time complexity of the Heap sort. 10, 6, 7, 17, 26, 72, 20, 57, 100, 38, 128 [4M] Compare Red-Black and AVL trees, List he properties of Red-Black Trees. Construct the Red-Black tree with the following elements. [4 M] 18, 17, 16, 4, 61, 131, 109, 203, 25, 191, 157, 10, 52, 3, 58 Explain linear probing and quadratic probing with examples and write the disadvantages of both techniques. (4 M] ao wo’ National Institute of Technology, Tiruchirappalli ience and Engineering Department of Computer S Digital System Design End Semeste! ination Course/ Branch : B.Teeh/ C Course Code ; CSPC33 Duration 3 Hours Max Marks _: 50 An All Questions a. combinational circuit with 4-bit input and 2-bit output, The first output complement value of the input is greater than 5. The second 6) is set to 1 if the on output bit is set to 1, if the XOR value of the all the input bits is 1. b) Solve the following functions using K-map. 6) Ym (,1,2,3,476,8,10,12,14,16,17,18,19,20,22,24,26,28,29,30,31) ii) G=IIM(, 1,2, 9, 10, 14, 15) +d (5, 6, 13) ) Implement the following Boolean expression using multiplexer considering B as v the input variable. F(A,B,C,D)= m(@, 1,3,4,8,9, 15) ) Consider you are working in a company where a customer approach you with a problem. He owns a machinery company where he asks your help find faults in machine. A machine is attached with n number of sensors (say temperature sensor, low oil sensor, etc.). All the sensors are connected.to LEDs, in which, particular LED will be ON when there is some abnormality (e.g. less oil in machine) in particular sensor. But due to increase in the number of sensors, he can’t have one LED for each sensor and would like to reduee the number of LEDs. Given this problem, how will you solve this issue and what solution will you give to the customer? Explain in 6) 6) detail. 3. a) Design a JK counter which counts the following sequence. © a 0, 5, 6,9, 4, 11, 7,3, 12, 10, 8, 0,5... by Analyze the following synchronous sequential circuit. Derive the equations, draw necessary tables and state diagram. ® 7 1 A »n eHLt},, at so 0a WI rec te c Ka ids oo h-fko ik 4, a) Write a short note on the real-time application of the following terminologies. i) Flip-flops ii) Multiplexer iii) Encoders iv) Counters @) b) Design a circuit for voting system for a class to select class representative. There are 12 students in the class amongst which 2 students are standing for the election. Explain the steps, components needed for designing the system. Draw necessary truth tables and circuit diagrams. © 5. a) Explain in detail about the conditional statements in verilog. “ b) What is the difference between always and assign statements. Q) _ A) Registers x and y are declared as reg [2:0] x,y;. x and y have initial values of 1 and 2 respectively. Find the value of x and y after each of the following Verilog codes have been executed. @ (a)y=x&& ys ()x=(y) ?¥ 2% x=y&x; y=(x)?x (b) x <=(y) 2y x5 (iv) x=3) vertices is Hamiltonian, if d(v) >= n/2 for every vertex v of G. b) Prove that a connected planar graph with n vertices and e edges has e ~ n +2 regions. ¢) Prove that for a given spanning tree T, a chord ci that determines a fundamental circuit occurs in every fundamental cut-set associated with the branches in’ and in no other. 3. a) Identify whether Euler path or circuit exist A Pm 3 in the following graph. If sv, trace one Js —~9! such path’ circuit. Also, provide a suitable ‘ 7 matrix representation of this graph. , aa \./ OX / Se \ a b) Construct edge induced ($1) and vertex induced (S2) subgraphs from the graph G given in Question 3 d Bdge set, E(S1) = {(A,B), (CE), (A.D), (C.D), (C.F), (A.C)} and vertex set, V(S2) = (A, C, E, F}. Perform ring sum operation on SI and $2 to obtain $3. Fuse vertices E and G of graph G. Show the resultant subgraphs. ©) Perform minimization of the switching function a’b'c + a’be" + able’ + able + abe! + abe using edge covering, Page 1 of 2 2) Q) Q) Q) Q) G) GB) @) Q) Q) 4) Suppose that you want to provide water @) connection to a set of houses, The houses are not at equal distances. Given a connected graph where the vertices and edges denote these houses, and the possible conngetions between them. respectively. How can y&u connect these houses for providing water in minimum cost without looking for reliability of conncetion? What is the cost? 4, a) Suppose the graph represents a network of pipelines for transporting oil, what is the maximum flow possible through the network between vertices 3 and 10? b) Find the chromatic number and chromatic @) polynomial of the given graph, c) Check whether the given graph is planar or not @) by performing elementary reduction, 5. Y (3) a) There are 6 gifis labeled 1,2,34,5, and 6 under ennoeend ici ee the Christmas tree, and 5 children receiving them: Alice, Bob, Charles, Danielle, and ALICE 61,63 Edward. Can the gifts be distributed 10 each BoB @.64.65,c6 | person so that each one of them gets a gift they"Il like? Solve the problem by constructing the | graph. Give any possible solutions. Bor G1.G2,G3 pwarp_| G2 CHARLES _| G%Gs~ b) From the graph, find Maximal Independent sets, 4 e @) and Minimal Dominating sets. Derive your answer by showing required steps, Page 2 of 2

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