SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY BE - SEMESTER V MID SEMESTER-I EXAMINATION WINTER 2018 Enroll. No. SUBJECT: ANALYSIS AND DESIGN OF ALGITHMS (2150703) (CE\IT) DATE: 08/08/2018 TIME: 2:00 PM TO 3:30 PM TOTAL MARKS: 40 Q.1 (a) Explain the following terms: 1. Set 2. Relation 3. Function [3] (b) What is an algorithm? Explain various properties of an algorithm. [3] (c) What do you mean by linear inequalities and linear equation? [4] Q.2 (a) Explain all the asymptotic notations in detail. [6] (b) Write an algorithm for merge sort with divide and conquer strategy. Sort the following data: 4,8,6,3,5,1,7,2,9. (c) Sort the following data with Max Heap Sort: 98,74, 32, 151, 27, 85, 66, 123, 13, 57. [5] [4] Q.2 (a) What is an amortized analysis? Explain aggregate method of amortized analysis [6] using simple example. (b) Write an algorithm for quick sort with divide and conquer strategy. [5] Sort the following data: 4,8,6,3,5,1,7,2,9 (c) Sort the following data with Radix Sort: 98,74, 32, 151, 27, 85, 66, 123, 13, 57. [4] Q.3 (a) i) Solve recurrence equation T (n) =T (n-1) + n using forward substitution [6] method. ii) Solve recurrence equation T(n)= 9T(n/3) + n using Master Theorem. (b) What is principle of optimality? Compute Binomial Co-efficient for C(6,4) using [5] dynamic programming. (c) Explain Selection Sort Algorithm and drive its best case, worst case and [4] average case complexity. Q.3 (a) i) Solve recurrence equation T (n) =T (n-1) + n using backward substitution [6] method. ii) Solve recurrence equation T(n) = 2T(n/3)+1 using Master Theorem. (b) i) Write down difference between Divide and conquer & Dynamic Programming. [5]
(c) ii) Write the algorithm of Binary Search. Explain Insertion Sort Algorithm and drive its best case, worst case and average case complexity. [4]
Enroll. No. SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY BE - SEMESTER V MID SEMESTER-I EXAMINATION WINTER 2018 SUBJECT: SYSTEM PROGRAMMING (2150708) (CE/IT) DATE: 09-08-2018 TIME: 02:00 pm to 03:30 pm TOTAL MARKS: 40 Q.1 (a) Define Following terms: [03] 1. Language Processor 2. Semantic Gap 3. Forward Reference (b) How constant differs from literal in assembly language? [03] (c) Consider the grammar: S->AA A->aA A->b Parse the string: abaab and check whether the grammar is ambiguous or not. Q.2 (a) Explain the various stages of the life cycle of a source program with a neat diagram. (b) What is Symbol table? Explain how one can organize Symbol table using Linear Data Structure. (c) Explain types of grammars. Q.2 (a) List various phases of a language processor. Explain roles of phases of language processor. Also explain symbol table. (b) Explain left recursion. Remove left recursion from below grammar and rewrite it. A -> A+B A-B B B -> B*C B/C C C-> (A) id (c) State differences between System Software and Application Software Q.3 (a) Explain use of various data structures (tables) needed in PASS I of the assembler. Also give details of their fields. Explain various suitable data structures for the symbol table. (b) Explain & compare various intermediate code forms (Re- presentations) for an assembler. (c) What is macro-preprocessor? Explain steps of macro-preprocessor design. Q.3 (a) Which are the different assembly language statements? Explain each of them with suitable example. (b) For the given assembly language code: (a) Show the contents of the symbol table at the end of Pass I. (b) Show the intermediate code generated for the program using Variant-1 representation. Instruction Opcode: STOP 00, MOVER 04, MOVEM 05, MULT-03 PRINT 10 Assembler directives: START 01, END 02 EQU -04
Declaration statements: DC 01, DS 02 Register code: BREG 02 START 100 P DS 4 L1 MOVER BREG, Q MULT BREG, S MOVEM BREG, R R EQU P+2 L2 PRINT R IGIN P-5 S DC 9 IGIN L2+1 STOP Q DC 7 END (c) Explain macro expansion in detail.
Enroll. No. SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY BE SEMESTER V MID SEMESTER-I EXAMINATION WINTER 2018 SUBJECT: COMPUTER GRAPHICS (2151603) (IT) DATE: 10-08-2018 TIME: 02:00 to 03:30 pm TOTAL MARKS:40 Q.1 (a) Write the differences between Random Scan display and Raster scan display. (b) Define the following terms for 2D: [03] [03] 4. Translation 5. Rotation 6. Scaling (c) Explain the working of Cathode Ray tube. Q.2 (a) Input coordinates A (20,10) B(30,18) are given solve using Bresenham s algorithm. (b) Explain three methods of character generation. (c) Explain boundary fill algorithm for 4 connected pixels. Q.2 (a) Explain DDA line drawing algorithm. What are the limitations of DDA line drawing algorithm? (b) Explain inside outside test. (c) Write a short note on: Reflection. Q.3 (a) Explain cohen Sutherland subdivision line clipping algorithm. (b) Apply the shearing transformation to square with A(0,0) B(1,0) C(1,1) And D(0,1) as given below A) Shear parameter value of 0.5 relative to the line Yref= 1. B) Shear parameter value of 0.5 relative to the line Xref= 1. (c) Explain shadow mask technique and explain how does it differ from beam penetration technique? Q.3 (a) Explain and write Liang Bersky line clipping algorithm (b) Explain viewing pipeline in 2D. (c) How long would it take to load a 1280 by 1024 frame buffer with 12 bits per pixel if transfer rate is 1 Mbps?
Enroll. No. SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY BE - SEMESTER V MID SEMESTER-I EXAMINATION WINTER 2018 SUBJECT: OBJECT IENTED PROGRAMMING USING JAVA (2150704) (CE/IT) DATE: 11-08-2018 TIME:02:00 pm to 03:30 pm TOTAL MARKS:40 Q.1 (a) Why is Java platform independent? [03] (b) Explain Wrapper classes in java. [03] (c) Explain various steps required for class design. Q.2 (a) Explain features of Java in detail. (b) Explain garbage collection and finalize method in JAVA. (c) Explain following with example: (i)super (ii)final (iii)static (iv)this Q.2 (a) What is visibility modifier? Explain all with example [public, private, protected, default] (b) Differentiate between Compile time polymorphism and Run time polymorphism (c) Write a program to take two float value as command line arguments and display its addition and multiplication. Q.3 (a) What is constructor? What are the rules for creating constructor in java? Explain constructor overloading using example. (b) Explain activity diagram with the help of an example. (c) Compare String and StringBuffer Q.3 (a) Describe Inheritance and its type with suitable example. (b) Explain sequence diagram with the help of book issue process of library. (c) Write a program to find whether the given string is palindrome or not.