Professional Documents
Culture Documents
CSA Test Paper
CSA Test Paper
Semester :I
Q1. A combinational circuit controls a light bulb using three binary switches. The bulb glows
whenever even number of switches is turned ON. Draw truth table for the said combinational
circuit and obtain an optimized Boolean expression in Sum Of Products (SOP) and Product
Of Sums (POS) forms using Karnaugh Maps. Also draw the logic diagrams for Boolean
expressions obtained in both SOP and POS forms.
Q2. Consider the following snapshot of a memory to answer the questions that follow:
Memory
200 600
.
.
.
400 MODE OPCODE
401 200
.
.
.
600 30
A two word instruction is stored at location 400 with its address field at location 401. Which
addressing mode is being used if the value of operand is 30, 200 and 600 respectively? If the
effective address obtained by using indexed register addressing mode is 300. What is the
content of index register? If the OPCODE of the instruction is BUN, what would be the value
of program counter before and after the execution of the instruction? What would be the
value of program counter before and after the execution of the instruction if the OPCODE is
ADD? Give the excitation table for a flip flop AB whose characteristic table is given as
follows:
A B Q(t+1)
0 0 Q’(t)
0 1 0
1 0 1
1 1 Q(t)
Q3. Perform the following operations as directed:
Convert 4433₅ in the given radix to decimal number system and then to binary
number system
CF6D16 to octal number system
Add 648 and 358
Subtract 7B₁₆ from C4₁₆ using signed 2’s complement form
Give BCD representation of 5468.
Q4. Specify the number of bytes that can be stored in a 32M × 16 memory. How many
address lines and data lines are required for it? How many 32 × 8 chips are required to
provide a memory capacity of 1024 × 8. Show the interconnections required to construct a
256 × 8 ROM from 128 × 8 ROM chips and a decoder.
Identify the type of following I/O interface commands:
check to see if a printer is ready for printing
skip to the beginning of a tape
check for an error during an I/O transfer
write a block of data onto a magnetic disk.
Q5. A computer uses a memory unit of 256K words of 16 bits each. A binary instruction code
is stored in two words of memory. The instruction has four parts: an addressing mode field to
specify one of the two addressing modes, an operation code, a register code part to specify
one of the 256 registers and an address part. Calculate the number of bits in each part of the
instruction and indicate them by drawing the instruction format. Calculate the number of
operations that can be supported by the above mentioned instruction format.
Q6. A non pipe line system takes 30 ns to process a task. The same task can be processed in
a four – segment pipe line with a clock cycle of 10ns. Determine the speedup ratio of the pipe
line for 100 tasks.
Using the appropriate operation codes listed in Table II, specify the 14-bit control word that
must be applied to the processor to implement each of the following microoperations:
R5←R4 ᴧ R1, R3 ← R2
2. A two-word instruction at address 300 and 301 is a “load to AC” instruction with an
address field equal to 400. The first word of the instruction specifies the operation code
and mode, and the second word specifies the address part. PC has the value 300 for
fetching the instruction. The content of processor register R1 is 500, and the content of
index register XR is 200. Consider the following memory state:
Address Memory
300 Load to AC | Mode
301 400
400 425
425 450
499 525
500 550
501 575
600 650
700 725
701 726
702 750
900 925
925 950
4. Perform the arithmetic operation (-54) - (-35) in binary using signed 2’s complement
representation for the negative numbers.
Perform the following conversions to the indicated bases:
• (973456)10 = ( ? )6
• (FE123)16 = ( ? )8
• (101110.101)2 = ( ? )10
Give the logic diagram and truth table of a 3-to-8-line decoder using NAND gates only.
Include an active low enable input.
5. In a certain scientific computation, it is necessary to perform the arithmetic operation
(Ai * Bi) + (Ci * Di) with a stream of numbers. Using a diagram of combinational
circuit, specify a pipeline configuration to carry out this task. Assuming that there are
6 tasks for the given computation, list the contents of all registers in the pipeline for i =
1 through 6 with the help of a table. Draw a space time diagram for this pipeline.
6. Assuming 5-bit registers that hold signed numbers, show the step-by-step
multiplication process using Booth algorithm when numbers
(-8) & (-12) are multiplied in binary.
Also perform the division of 0101010 by 111. (Both the dividend and divisor are fixed-
point binary number in signed magnitude representation)
[This question paper contains 3 printed pages.]
Your Roll No. …………….............
Unique Paper Code : 12365125_OC
Name of the Paper : Introduction to Operational Research and Linear Programming
Name of the Course : B.Sc. (Hons.) /B.A. (Hons.)
Semester : I
Q2. A firm produces three products A, B and C. It uses two types of raw materials I & II.The
maximum availability of raw materials I & II is 5000 and 7500 units, respectively. The raw
material requirement per unit of products are given below:
The labour time for each unit of product A is twice as that of product B and three times of
product C. The entire labour force of the firm can produce the equivalent of 3000 units. The
minimum demand for the three products are 600, 650, and 500 units respectively. The number of
units produced must be in ratio 2:3:4. Assuming the profit per unit of A, B, C is 50, 50 and 80
respectively, formulate the problem as a linear programming problem in order to determine the
number of units of each product which will maximize the profit. Use the simplex method to
obtain the optimal solution.
Q3. Find all possible basic solutions for the following system of linear equations:
2𝑥1 + 𝑥2 − 𝑥3 + 2𝑥4 = 2
3𝑥1 + 2𝑥2 + 𝑥3 + 6𝑥4 = 3
Classify them as feasible, infeasible, degenerate and non-degenerate.
Q4. Use the dual simplex method to solve the following LPP:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 3𝑥1 − 2𝑥2
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥1 + 𝑥2 ≥ 1
𝑥1 + 𝑥2 ≤ 7
𝑥1 + 2𝑥2 ≥ 10
𝑥2 ≤ 3
𝑥1 , 𝑥2 ≥ 0
Q5. Solve the following Linear Programming Problem using Big-M method:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 3𝑥1 + 2𝑥2 + 𝑥3
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 2𝑥1 + 5𝑥2 + 𝑥3 = 12
3𝑥1 + 4𝑥2 = 11
𝑥1 𝑖𝑠 𝑢𝑛𝑟𝑒𝑠𝑡𝑟𝑖𝑐𝑡𝑒𝑑 𝑖𝑛 𝑠𝑖𝑔𝑛 , 𝑥2, 𝑥3 ≥ 0
Q6. Consider the following LPP:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 3𝑥1 + 𝑐2 𝑥2 + 𝑐3 𝑥3
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 2𝑥1 + 3𝑥2 ≤ 8
2𝑥2 + 5𝑥3 ≤ 𝑏2
3𝑥1 + 2𝑥2 + 4𝑥3 ≤ 15
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Find an optimal solution to the above problem by taking c2=5, c3=4, and b2=10. Also, find the
range within which these three parameters must lie so that the current solution remains feasible
as well as optimal.
.
Unique Paper Code : 32341303
Name of the Course : B.Sc. (H) Computer Science
Name of the Paper : Computer Networks
Semester : III
Duration : 3 Hours
Maximum Marks : 75
Year of Admission : 2019
Q1 What are the three flow control/Error recovery protocols used for noisy channel?
Compare and contrast the Go-Back-N ARQ with Selective Repeat ARQ. Consider that
a 1Mbps satellite link connects two ground stations. The altitude of the satellite is
36,504 km and speed of the signal is 3 × 108 m/s. Assume that the acknowledgment
packets are negligible in size and that there are no errors during communication. What
should be the packet size for a channel utilization of 25% for the satellite link using go-
back-127 sliding window protocol? Further consider that a message M = 1010001101
needs to be transmitted over this link. Cyclic redundancy check (CRC) with divisor
polynomial x5 + x4 + x2 + 1 is used for error detection. What will be the final message
transmitted over the link?
Q2 Explain the circuit switching and packet switching techniques. How is virtual circuit
approach different from datagram approach? A message of size 500 bytes has to be sent
in a network having bandwidth 10Mbps. Assume that each packet contains a header of
100 bytes and packet switching technique is used. If the message is divided into 5
packets, what would be the transmission delay?
Q3 What characteristics of the carrier signal are changed to represent the digital signal in
each of the following modulation techniques: - ASK, FSK, PSK and QAM?
Which of the four digital to analog modulation techniques (ASK, FSK, PSK, QAM) is
most susceptible to noise? Defend your answer.
In a QAM modulation scheme, there are 4 amplitude levels and 16 phase levels and bit
rate is 72 Kbps. Calculate the baud rate.
Q4 The following character encoding is used in a data link protocol:
Show the bit sequence transmitted (in binary) for the five character frame. A ESC B
ESC FLAG when each of the following framing methods are used:
i. Character count
ii. Flag bytes with byte stuffing.
iii. Starting and ending flag bytes, with bit stuffing
Also find the original data for the given output obtained after applying byte-stuffing
technique:
FLAG A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D E FLAG.
All the routers use the distance vector routing algorithm to update their routing tables.
Each router starts with its routing table initialized to contain an entry for each neighbor
with the weight of the respective connecting link. After all the routing tables stabilize,
how many links in the network will never be used for carrying any data? Also show the
distance vector maintained at each router.
Consider a paging system with the page table stored in memory. If a memory
reference takes 100 nanoseconds how long does a paged memory reference take? If
we add a TLB and 70 % of all page-table references are TLB hits, what is the
effective memory reference time? (Assume that finding a page-table entry in the TLB
takes 10 nanoseconds, if the entry is there.)
Assuming a 2-KB page size, what are the page numbers and offsets for the following
address references (provided as decimal numbers): 5378, 15300, and 20500. Show
calculation at each step.
Q 2. Consider a system consisting of four resources of the same type that are shared by
three processes, each of which needs at most two resources. Show that the system is
deadlock free using resource allocation graph. What is the effect of multithreading on
deadlock?
A program has just read the fifth record. It next wants to read the eleventh record.
How many records must the program read to input the eleventh record using Direct
Access and Sequential Access methods? Explain your answer.
If the total number of frames in main memory is 120 and there are 4 processes in the
system with the demand as 40, 10, 90 and 60 frames, respectively. What will be the
number of frames allocated using the equal and proportional allocation strategies?
Q 4. Consider the following set of processes, with the length of the CPU burst times given
in milliseconds:
Processes Burst Time Priority Arrival Time
P1 12 3 0
P2 10 4 1
P3 2 2 2
P4 3 1 3
P5 5 2 4
Draw four Gantt charts illustrating the execution of these processes using FCFS, pre-
emptive SJF (equal burst length processes are scheduled in FCFS), a pre-emptive
priority (small priority number means high priority, equal priority processes are
scheduled in FCFS), and a RR (quantum=3) scheduling.
And calculate average waiting and turnaround time for all above mentioned
scheduling algorithms.
Q 5. Suppose that a disk drive has 3000 cylinders, numbered 0 to 2999. The drive is
currently serving a request at cylinder 140, and the previous request was at cylinder
120. The queue of pending requests, in FIFO order, is
Starting from the current head position, what is the total distance (in cylinders) that
the disk arm moves to satisfy all the pending requests, using SSTF, C-LOOK and
SCAN disk scheduling algorithms?
What will happen if a user program to get stuck in an infinite loop and never return
control to the operating system. Explain how operating system deals with such
problem?
Q 6. Consider the following code fragment executed by a process. What will be the output
of this code? Justify your answer.
#include < unistd.h >
int main ()
{
int i ;
for (i=0; i<8; i++)
if (i%2 == 0) fork ( ) ;
return 0 ;
}
List three major activities of an operating system with regard to File Management
and Memory Management. Give justification for your answer.
Explain what may happen if setting the values of Base and Limit registers are not
privileged instructions? Also why is it easy to add a new service in microkernel
approach?
Unique Paper Code : 32341301-OC
Name of the Paper : Data Structures
Name of the Course : B.Sc. (H) Computer Science
Semester : Third (III)
Duration of Examination : Three Hours
Maximum Marks : 75 marks
h(n) = 0 if n=0;
= n if n > 4
= h(2+h(2n)) if n <=4
55, 45, 89, 35, 99, 23, 78, 12, 0, 25, 69, 49
Give the post order traversal of the constructed tree. What are the
advantages of B-tree over binary search tree? Construct a B tree of order
5 by inserting the following keys:
9,14,3,16,4,1,17,6,5,28
Q6. Write a template function to insert a new node p into a single linked list
before the node q where p and q are the node pointers. The function takes
p and q as input. Give the necessary class definitions. Describe the
situation in which double linked list has an advantage over single linked
list. Does self-organising the list helps in searching? What are the different
ways of self-organizing lists? For a given linked list having A, B, C, D as
nodes, show the list after each step using Move to Front method. Steps
are:
i) search D, ii) search D iii) search B iv) search A v) search B vi) search D
vii) search A viii) search B
Unique Paper Code : 32347506
Name of the Course : B. Sc. (Hons.) Computer Science (CBCS)
Name of the Paper : Advanced Data Structures and Algorithms
Semester : V
Duration : 3 Hours
Maximum Marks : 75
Year of Admission : (Admission of 2015, 2016, 2017 & 2018)
Q1.
a) List the trade off between choosing a binary heap vs a Fibonacci heap to implement priority
queue.
b) Suppose we implement increase_key function in a min heap using Fibonacci heap as follows:
increase_key(node, new_key)
1. Increase the key of node to new_key
2. Concatenate the child-list of node to root-list, update the parent of all children
to NULL. Erase the mark attribute (if present) of child nodes.
3. Cut the node from its parent z and insert it to root list. Apply cascading cut to z
similar to the decrease_key() function of Fibonacci heaps. Reset (erase) the
mark attribute on node.
iii) If we add an additional step of consolidating the root list after step 3, would the
amortized cost change, explain?
Q2.
a) Suppose a document is composed of six unique characters A-F. Probabilities of occurrence of
the characters are given as:
Compression ratio of a document is defined as the ratio of average code length in Huffman code
to average code length in fixed length code. What is the compression ratio achieved by Huffman
algorithm for this document?
i) Give a recurrence for Opt[i] when ith assignment is included in the selection.
ii) Give a recurrence for Opt[i] when ith assignment is not included in the selection.
iii) Give the final recurrence for Opt[i].
iv) Give the base cases for the recurrence.
v) Derive the time complexity of the approach and explain.
b) Using a dynamic programming approach, identify if there is any negative cycle in the following
graph. Show all steps.
Q4.
a) Given a min heap of n positive integers. Consider the following strategies to find largest integer
in this heap.
Strategy 1: Treating the heap as an unordered array, do a sequential search for the largest integer.
b) Write the recurrence relation for time complexity of Karatsuba’s algorithm of fast integer
multiplication for multiplying two large integers in O(n 1.59) time. Using your recurrence compute
the number of single digit multiplications for the product 1552×2374. Compare this to the number
of single digit multiplications required in basic multiplication method.
Q5.
a) A k-coloring of a graph G = (V,E) is a function f: V→{1, 2, ... k} so that for every edge (u, v),
we have f(u) ≠ f (v). The available colors here are named 1, 2, ... k, and the function f represents
our choice of a color (or a label) for each node. The k-coloring problem is defined as follows:
“Given a graph G and a bound k, does G have a k-coloring?”
b) Ankit and Neha have been debating about two optimization problems X and Y. Both X and Y
are known to be in NP. Ankit shows a polynomial time reduction from the set-packing problem to
X, and Neha shows a polynomial time reduction from Y to vertex cover.
Ankit infers: X is NP complete while nothing can be said whether Y is NP complete or not.
Neha infers: Y is NP complete while nothing can be said whether X is NP complete or not.
Q6.
Consider the problem of finding the maximum flow in a network graph G = (V, E), with capacity
ce on each edge e, source vertex s and sink vertex t. Let f be the flow through the graph at i-1th
iteration of Ford-Fulkerson’s max flow algorithm. Let f’ be the flow in ith iteration. Given that
initially, the flow is zero which is a valid flow in terms of both capacity and conservation
constraints, argue along the following points regarding validity of flow at each iteration. Let the s-
t path selected in ith iteration be P.
a) Show that in following two cases for an arbitrary edge e = (u,v) on path P, the capacity
constraint is satisfied i.e. 0 ≤ f’(e) ≤ ce:
i) Argue that if e = (u, v) is a forward edge, the capacity constraint is satisfied.
ii) Argue that if e = (u, v) is a backward edge on path P, the capacity constraint is satisfied.
b) Let v be a node on P, argue that in each of following four cases, the conservation constraint is
satisfied on v, i.e., fin(v) = fout(v).
i) Show that if both e and e0 are forward edges, the conservation constraint is satisfied at v.
ii) Argue that if both e and e0 are backward edges, the conservation constraint is satisfied
at v.
iii) Show that if e is a forward edge and e0 is a backward edge, the conservation constraint
is satisfied at v.
iv) Argue that if e is a backward edge and e0 is a forward edge, the conservation constraint
is satisfied at v.
Unique Paper Code : 32347501
Name of Course : B.Sc. Hons. Computer Science
Name of the Paper : Systems Programming
Semester :V
Duration of Examination : 3 Hours
1. Assume
1 that three object files b.obj, c.obj and a.obj are given to the Pass I of the
linker in the order specified. Consider the following section and symbol tables for the
three object files. Construct the combined section table (CST) and public definition
table (PDT) generated during Pass I of linking process showing all intermediate steps.
Also draw the layout of final executable file generated after Pass II of linking process
(show all the intermediate steps in CST).
main( ) {
int arr[ ] = { 9, −8, 4, 42, −5 };
int n = sizeof(arr) / sizeof(arr[0]);
selectionSort(arr, 0, n);
printArray(arr, n); }
3. Write a Lex program that checks whether the given name of a URL (Uniform
Resource Locater) is in the correct format. The program should also identify the
protocol, domain name and path name as well as file name, if any, in the URL.
4. Consider the following grammar with set of non-terminals as {S,P,Q,R} and set of
terminals as {=,+,int,(,),id }. S is the start symbol.
𝑆→𝑃=𝑄
𝑄 →𝑅|𝑄+𝑅
𝑅 → 𝑃 | 𝑖𝑛𝑡 | (𝑄)
𝑃 → 𝑖𝑑
Construct LR (1) set of items and GOTO graph (DFA) for the above grammar. Also,
construct LALR parsing table for the above grammar by compacting states formed in
LR (1) set of items.
5. Consider the following grammar:
𝑆 → 𝑆(𝐸) | 𝐸
𝐸 → (𝑆)𝐸 | 0 | 1| ∈
Determine five strings of length greater than five that can be parsed by the above
grammar and draw the corresponding parse trees. Is the above grammar ambiguous?
Justify your answer.
6. Construct a syntax directed definition that generates correct three-address code for C-
style for-statements and do-while statements.
Unique Paper Code : 32341502
Name of Course : B.Sc. Hons. Computer Science
Name of the Paper : Theory of Computation
Semester :V
Duration of Examination : 3 Hours
1. Construct
1 a regular expression and corresponding deterministic finite automaton
(DFA) defining a language comprising all strings of length 5 or more such that the
letter appearing just before the last is same as the second letter of the string.
2. Construct a finite automaton (FA) for 𝐹𝐴1 + 𝐹𝐴2 , 𝐹𝐴1 . 𝐹𝐴2 , and 𝐹𝐴1 ∗ .
𝐹𝐴1 𝐹𝐴2
𝑆 →0𝐴0|1𝐵1|𝐵𝐵
𝐴→𝐶
𝐵 →𝑆|𝐴
𝐶 →𝑆| ∈
Also, write an HTML code to create a part of Periodic Table as given below.
What are frames? Discuss the Frameset tag and the iframe tag used in HTML to create
frames and write HTML code to create the following layout using them.
FRAME 1 FRAME 2
FRAME 3
FRAME 4
Also write a Javascript code to swap the value of two variables. (Swap means interchange. If
a = 10 and b = 20 then after swapping a = 20 and b = 10).
6. Write short notes on different types of network topologies (Bus, Ring, Mesh, Star). Which
topology is the best for broadcasting? Justify your answer.
1 Write a C++ program/ function/ program segment to do each of the following tasks:
• Write a function to generate the given sequence. For example, if n=4 your
function should produce output as follows: 1, 2, 2, 3, 3, 3, 4, 4, 4,
4, ….
You may assume that n is a positive integer.
2 Create an abstract class called Vehicle that defines the characteristics of an object of
Vehicle class using data members vehicle_id, engine_capacity and
no_of_wheels. The Vehicle has a member function enginecapacity()also.
Further,
• Create a derived class from class Vehicle called FourWheeler from base
Vehicle class with data member no_of_seats.
• Create two more derived classes Car and Bus using single inheritance from
class Vehicle. The derived class Car has a member function
enginecapacity() that displays the engine_capacity in cubic
centimeters.
• Use the FourWheeler derived class to further create the derived class Truck
to show multilevel inheritance with data member loading capacity in
kgs.
• If the access modifiers for Car's data members is set to private, which
functions/ data members will now become inaccessible?
3 Rewrite the following while loops using for loops and vice versa wherever applicable:
• int x= 0;
int y = 10
while(x < y)
{
cout<< x << endl;
x++;
}
• #include <iomanip>
using namespace std;
int main()
{
int numb;
for(numb=1; numb<=10; numb++)
{
cout << setw(4) << numb;
int cube = numb*numb*numb;
cout << setw(6) << cube << endl;
}
return 0;
}
• #include <iostream>
using namespace std;
int main()
{
int j; //define a loop variable
for(j=0; j<15; j++)
cout << j * j << “ “;
cout << endl;
return 0;
}
#include <iostream>
using namespace std;
int x;
int& setx();
int main()
{
setx() = 92;
cout << “x=” << x << endl;
return 0;
}
int& setx()
{
return x;
}
4 Find error(s)(if any) in each of the following program segments:
• class du{
private:
...;
public:
void~du (void);
}
• #include <iostream>
#define PI=3.14
int main( )
{
float r, a;
cout<<"enter any radius";
cin>>r;
a=PI*pow(r,2);
cout<<"Area="<<a;
return 0;
}
• #include
main( )
{
first = 10, second = 30;
Jumpto(First; Second);
Jumpto(Second);
}
Define a main() function which creates three objects of class Distance and
implements the four member functions given below.
• Write a function to overload (--) operator (both prefix & postfix),
• Write a function to overload operator (+) (to add two distances),
• Write a function to overload operator (==) (to check equality of two distances),
• Write a function to overload (=) Assignment operator.
6 Write a C++ program that calls the functions given below on an array entered by the user
in the main function. The program should present a menu to the user and ask for one of the
options. The menu should also include options to re-enter array and to quit the program:
i) Print the even-valued elements
ii) Print the odd-valued elements
iii) Calculate and print the sum and average of the elements of array
iv) Print the maximum and minimum element of array
v) Print the array in reverse order.
Note for the typesetter:
1. Please DO NOT Change Courier font to any
other font.
2. Please do not change alignment of the text that
has been set in courier.
Unique Paper Code : 32347504
Name of the Paper : Microprocessor (DSE)
Name of Course : B.Sc. (H) Computer Science
Semester :V
Duration of Examination : Three Hours
1. How does the real mode memory addressing scheme work? Explain using an example.
What is the first and the last address that can be accessed in the Data segment when DS =
0008H?
Given DS = 3200H, BX = 0120H, SI = 0020H, ARRAY = 0015H. Determine the data
addressing mode used and the source address accessed by each of the following
instructions, considering real mode memory addressing scheme:
a) MOV AX, [BX+SI+140H]
b) MOV AX, [34H]
c) MOV AX, ARRAY[SI+3H]
Explain how the following descriptor stored in the global descriptor table can be used to
find the first and last address that can be accessed when DS = 0008H in protected mode
memory addressing scheme of 80286. Find the requested privilege level (RPL) and the
descriptor privilege level (DPL). Explain the access control provided for this segment,
given the value of the access right byte provided in the descriptor.
00
00
92
20
00
00
00
0008 FF
Given below are some instructions. If the instruction is valid, explain the function
performed by it; if not valid, justify.
a) JMP [4]
b) POP CS
c) MOV AX, BL
d) MOV AX, ‘RX’
e) MOV [SI], [AX]
f) MOV AX, OFFSET DX
3. Differentiate between JMP SI, JMP [SI] and JMP FAR PTR [SI] instructions. How does
the CALL instruction differ from the JMP instruction? Explain the working of Near and
Far call instructions using an example. Also, show how RET instruction is used to return
from a procedure.
What are the steps followed whenever a software interrupt instruction INT executes?
How is it different from a Far CALL?
Using a diagram, illustrate the minimum mode 8088 bus timing for a Read operation and
show the signals for the pin connections a) to d) given above. Name the pins of 8088
microprocessor which are available in minimum mode but not in maximum mode.
Describe the error correction and detection circuit built using 74LS636 with the help of a
diagram.
5. Explain Mode 2 operation of the 82C55 programmable peripheral interface. Which Port
is used for this mode and what bit combination in the Command Byte A register is used
to select this mode?
Explain two conditional software interrupt instructions available to the microprocessor.
Differentiate between the two hardware interrupt inputs NMI and INTR. Describe the
Operation Command Words (OCW) for Programmable Interrupt Controller 8259A.
Which OCW should be programmed to read the interrupt request register and what
should be the required bit values in the OCW for the same?
6. Describe the improvements brought in by the Pentium Pro microprocessor when
compared with the earlier microprocessors. Explain with the help of diagram how
dynamic execution architecture of Pentium Pro functions.
Discuss the three software commands used to control the operation of the 8237 DMA
controller. How is memory to memory DMA transfer accomplished?
UNIQUE PAPER CODE : 62361101
SEMESTER : I
DURATION : 3 hours
MAXIMUM MARKS : 75
5. What is duality in LPP? Give Economic Interpretation of duality. Find the dual of the following
linear programming problem
Maximize Z = x1 + x2 + x3
Subject to x1 – 3x2+4x3 = 5
x1 – 2x2 ≤ 3
2x2 – x3 ≥ 4
x1, x2 ≥ 0, x3 unrestricted
6. What is meant by ‘Sensitivity Analysis’ in Linear Programming Problem? Consider the LPP
Maximize Z = 5x1 + 12x2 + 4x3
Subject to x1 + 2x2 + x3 ≤ 5
2x1 -x2 + 3x3 = 2
x1, x2, x3≥0
Solve the LPP and Discuss the effect of changing the requirement vector [5, 2]T to [7,2]T on the optimum
solution. (Where T indicates transpose of a vector). Which resource should be decreased and by how
much to achieve the best marginal increase in the value of the objective function?
Unique paper Code : 62373904_OC
Name of the Paper : Data Analysis using Spreadsheet ( SE-1)
Name of the Course : B.A.(Programme)
Semester : III
Duration : 2 Hours
Maximum Marks : 50
6. Explain the step of creating boxplot and pie chart in spreadsheet. What is standard error
of regression? How do you determine the goodness of regression? Explain the process
of running a regression in a excel spreadsheet.
Unique Paper Code: 42344304
Name of the Course: B.Sc. Physical Science/Mathematical Science
Name of Paper: Operating Systems
Semester: III
Duration: 3 Hours
Maximum Marks: 75
Year of Admission: 2019
Attempt any four out of six questions. All questions carry equal marks.
Q1. What are the various difficulties that a user can face while interacting with a computer
system, which is without an operating system? Differentiate between the two types of
user interfaces provided by the operating system. What are the advantages of dual mode
operations of operating system? Explain the problems that may arise due to the lack of a
hardware-support of dual mode in an operating system.
Q2. Consider a set of 5 processes, with the length of the CPU-burst time given in
milliseconds. The processes are assumed to have arrived in the order P1, P2, P3, P4,
P5, all at time 0.
Q4. Explain briefly paging memory management scheme. Consider user program (executing
under paging memory) of logical address of size 6 pages and page size is 4 bytes. The
physical address contains 300 frames. The user program consists of 22 instructions a, b,
c, . . . u, v. Each instruction takes 1 byte. Assume at that time the free frames are 7, 26,
52, 20, 55, 6, 18, 21, 70, and 90. Find the following?
Q5. What is a shell? Write a Shell Script to find the largest among the 3 given numbers using
‘nested if’ commands. Write the commands that does the following actions:
to know the shell that is running on your system.
to get a one-line manual page descriptions.
to print second, fifth and seventh character from each line of the file F1
to print only duplicate lines in a file F1.
to convert from lower case to upper case
Consider six memory partitions of size 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and 250
KB. These partitions need to be allocated to four processes of sizes 357 KB, 210 KB, 468 KB
and 491 KB in that order. Perform the allocation of processes using First Fit, Best Fit and
Worst Fit Algorithm.
Unique Paper Code : 42347902
Name of Course : B.Sc Prog. Computer Science/ B.Sc Mathematical Science
Name of the Paper : Analysis of Algorithms and Data structures
Semester :V
Year of Admission : Upto 2018
1. Which data structure would you chose for the following tasks and Why? Justify your answer
in each of the following case: Case 1: to implement undo/redo operation in a text editor;
Case 2: bookmarks tab of a web-browser; Case 3: you need to get out of a maze (without
using recursion), for which you are required to store the path that you are currently
exploring and be able to go back one step in case of a dead-end and then explore a new
possibility from there; Case 4: to store two sorted lists of strings and support their merging
into one, in-place (i.e., without creating a copy of the lists); Case 5: write a software for a
call center, in which whenever a client calls, his call record should be stored if there is no
free operator to pick it up; Case 6: to store the stations of a public transportation line in
which new stations can be added at both ends of the line but not between existing stations.
Transportation line can be traversed in both the directions; Case 7: create table of contents,
i.e., index page of a book. It must show every chapter, its sections and corresponding sub-
sections, to all levels.
2. Given a binary search tree and the following pseudocode to traverse the tree. Determine in
what order is the function traversing the tree? Modify it to count the number of nodes in the
tree.
fun traverse(Node t)
if t==NULL
return
else
traverse(right child of t)
print(value of t)
traverse(left child of t)
Also, determine which of the following statements is/are false about tree traversals?
Justify your answer.
a. If values 1,2,3,4,5,6 are inserted in the given order in a Binary search tree, then in-
order, pre-order and level-by-level traversal are all same.
b. If values 6,5,4,3,2,1 are inserted in the given order in a Binary search tree, then in-
order and pre-order traversal are same.
c. If values 6,5,4,3,2,1 are inserted in the given order in a Binary search tree, then pre-
order and level-by-level traversal are same.
d. If values 6,5,4,3,2,1 are inserted in the given order in a Binary search tree, then in-
order and post-order traversal are same.
3. We want to sort an array of 1000 integers, in which every element in its correct place except
10 elements. Arrange the following sorting techniques in decreasing order of preference for
sorting: Insertion, Quick, Merge, Count. Justify your preference with suitable arguments.
Suppose the condition now reverses, i.e., only 10 elements are in their correct place. Specify
the order of preference again with justifications.
4. Consider the following modification in (binary) search algorithm on an array A[1...n], sorted
in increasing order. The array is divided into three equal parts. Instead of finding one middle
index, we find two middle indices, mid1 and mid2. If element at mid1 or mid2 equals the
element ‘x’ that we are trying to search, we stop. Else, we do either of the following: search
x from A[1...mid1 -1] if x is less than element at mid1 or search x from A[mid1 +1...mid2 -1] if
x is greater than element at mid1 but less than element at mid2 or search x from A[mid2 +1 ...
n] if element at mid2 is less than x. Write an iterative algorithm for the above mentioned
search strategy. What should be the running time of the algorithm? Also, write the recursive
version of the algorithm.
5. What value should be chosen as pivot in the following array so that when we apply quick
sort to it, the first call to partition should belong to worst-case scenario?
-5,-3,1,4,2,-6,1,5
Justify your answer. Also, show steps in partitioning the array around the chosen pivot.
Can you use Count sort to sort the above array? If yes, modify the algorithm to do so. If no,
justify your answer by giving suitable arguments.
6. Write algorithms to implement the following operations on a circular doubly linked list:
i. Search for an element x in the linked list.
ii. Using the function implemented in part (i) above, insert an element x after an element y
in the linked list.
iii. Using the function implemented in part (i) above, replace an element x with an element
y in the linked list.
iv. Remove ith element from the linked list.
Using the algorithms above, perform the following functions. Also, specify which
algorithms (out of above mentioned) along with their parameters, would you use for
performing the tasks mentioned below.
Insert every character of the word “ALGORITHMS AND DATA STRUCTURES” as a node
in an initially empty list. Now, scan the list and replace ‘ ’ (space) character with a ‘#’.
Change the case of value of every alternate node, i.e., AlGoRiThMs and so on. Delete ith
node of the list where i = (length of list)%10 from back. Print the final list.
Unique Paper Code : 62353325_OC
Name of the Paper : SEC : Latex and HTML
Name of the Course : B. A. (Prog.) (CBCS)
Semester : III
Time : 2 Hrs
Maximum Marks : 38
1. Write codes in Latex to draw a circle with shaded sector. Also label its radius.
Write codes in Latex to create a beamer presentation on the Pythagorean Theorem (with at least
three slides). Be sure to include diagrams of right triangles.
Write codes in HTML to create a web page showcasing some of your mathematical interests (at
least three interests). Make one of your interests in the list a hyperlink.
Write codes in Latex to draw a square and an equilateral triangle using PSTricks and mark
their vertices.
Write codes in Latex to create a beamer presentation on the circumference of a circle (with at
least three slides), with first slide being the title slide. Use Latex’s picture environment to draw
the image of a circle on the second slide while labelling its circumference.
4. Write codes in Latex to plot the functions sin 𝑥 and sin 3𝑥 over −2𝜋 ≤ 𝑥 ≤ 2𝜋. Show the
function sin 𝑥 as a solid curve and sin 3𝑥 as a dotted curves.
Write codes in HTML to create a web page containing a numbered list of five universities. One of
the universities in the list should have big font size.
Write codes in Latex to create a beamer presentation of at least three slides on Prime numbers.
1
5. Write codes in Latex for the following
( )
(1 + 𝑥) = 1 + + + ⋯.
! !
r
Write codes in Latex to create a beamer presentation of (at least three slides) on a mathematical
topic of your choice excluding the Pythagorean Theorem and Prime numbers. Also include
diagrams.
Choose a theorem or a problem and write codes in HTML to create a web page showing its proof
or solution.
2
Sr. No. of Question Paper : Your Roll No....................
Semester : III
How many workers should be scheduled to report for each of the five shifts if the
company wishes to minimize its total work force? Formulate and solve this problem as a
linear programming problem.
2. Define media and its different types. What is the difference between traditional and online
media? What role do media play in our daily life?
3. Ram is planning to produce at least 2000 widgets on three machines. The minimum lot size
on any machine is 500 widgets. The following table gives the pertinent data of the situation:
Formulate the problem as an integer programming problem, and find the optimum solution.
4. A truck can carry 20 tons of loads. Four types of products are to be loaded. Their per unit
weights in tons and values in thousand of rupees are given below:
At least one unit of each type of load is to be shifted. Determine the loading which will
maximize the value of the load.
5. A transport company has trucks available at four different localities A, B, C and D; the
number of trucks at these localities is 5,10,7 and 3 respectively. The three stores at
destinations P, Q and R require 5, 8 and 10 trucks respectively. Variable costs (hundred of
rupees) of getting trucks to the destinations are given below. Find the optimum
transportation cost.
From/To P Q R
A 7 3 6
B 4 6 8
C 5 8 4
D 8 4 3
Maximum Marks: 75
NOTE FOR TYPESETTER: Please do not change the font and spacing of text written in
courier.
1. Differentiate between (i) class and object (ii) constructor and destructor.
Is a data member accessible outside the class? If yes, how to access the data
member? If not, why?
Define a class Box that has the three data members Width, Height and
Depth and following methods:
Methods:
• Constructor to initialize the data members Width, Height and
Depth
• Volume – This computes volume of the box
• __str__ function to generate a string that may be used to display
the data members of the box.
2. Apply the Bubble Sort scheme of sorting on the following list to sort it in
ascending order. Show the content of the list after applying each iteration of
Bubble sort: =[74, 31, 82, 25, 63, 96, 49, 11].
How many iterations are required to sort the list? What is the number of
comparisons performed in each iteration?
Apply Binary search to search for the item 50 in the sorted list. You should show
the computation of the index at which the value is compared with 50. When will
you prefer to use binary search over linear search? Justify your answer.
3. • The following operations are performed on a stack in the sequence given
here (assume stack is initially empty): push('Red'),
push('Green'), pop(), push('White'), pop(),
pop(). Show the content of the stack after each operation. What will
happen if one more pop operation is performed on the stack? Can this
condition be prevented?
• A print application processes the print jobs in the first come, first served
manner. Suggest a suitable data structure for the print application. What
are the permissible operations on the suggested data structure?
print(add())
print(add(7))
print(add(6,8))
print(add(2,4,5))
print(add(c=9))
• Consider:
set1 = set(['P','Q','M','O' ])
set2 = set(['R','P','N','S','O' ])
Give the output that will be produced on execution of the following code
segment:
print(set2 | set1)
print(set2 - set1)
print(set2 & set1)
print('X' in set2)
Unique paper Code : 42347901
Name of the Course : B.Sc. (Programme): DSE 1A
Name of the Paper : Programming in JAVA
Semester : V
Year of Admission : 2015, 2016, 2017 & 2018
Maximum Marks : 75
Duration : Three hours
1
Q1. Is JVM a compiler or interpreter? Give justification. How does polymorphism promote
extensibility? Explain with an example.
1. class Test {
2. public static void main(String[] args)
3. {
4. int i = 0, j = 9;
5. do {
6. i++;
7. if (j-- < i++) {
8. break;
9. }
10. } while (i < 5);
11. System.out.println(i + "" + j);
12. }
13. }
What are the two control structures used in Java for making decisions? Explain with
suitable example.
How many elements will be allocated in the array twoD after the execution of following
statements?
int twoD[][] = new int [2][];
twoD[0] = new int [2];
twoD[1] = new int [4];
Q2. Write a Java program to create a user defined exception MyException and use this to
signal an error condition if the number is negative. Write a method MySqrt(int num)
to compute the square root of a number which raises an exception of type
MyException if the input (i.e. num) is a negative number. Explain the terms try,
catch, throw and finally with respect to exception handling in your program.
Write a program in Java to replace a substring in a string by another one. Make use of
indexOf()and substring() methods.
What do you mean by applets? Explain its types. How do applets differ from application
Q3. program? Write a program in Java using AWT to display a string message “Stay Safe Stay
Healthy” in an applet window with pink as background colour and blue as text colour.
Write a program in Java to read a file named A.txt and copy the contents in another file
named B.txt after removing the vowels.
Name the two types of I/O streams available in Java. What is the difference between the
two types of streams?
2
Q4. Write a program in Java to create a class CountAndPrintArgs to print the number of
arguments passed on the command line as well as the first character of each argument
passed. For example, if the command line arguments are “Mango Cucumber Apple” then
the output will be:
What are the properties of a constructor? Why are the overloaded constructors needed?
Explain the use of overloaded constructors with the help of an example.
Referring to the following Java code snippet, what data type could be returned by the
method check()and why?
if (check(storeNum)!= Null) {}
Q6. Write a program in Java to create a class BankAccount that represents a bank account
including appropriate data members. Construct the methods to:
Assign initial values to data members
Deposit an amount
Withdraw amount after checking balance
Display the name, balance and interest earned.
Do you need to use static keyword for the above bank account program? Explain.
What is the purpose of final keyword in context of variable, method and class?
Explain with the help of suitable examples.
3
Unique paper Code : 42347901
Name of the Course : B.Sc. (Programme): DSE 1A
Name of the Paper : Programming in JAVA
Semester : V
Year of Admission : 2015, 2016, 2017 & 2018
Maximum Marks : 75
Duration : Three hours
CL1.java
package P1;
public class CL1 {
private int x;
int convert(){
return (x/10) + (x%10);
}
}
CL2.java
package P1;
public class CL2 {
CL1 qq;
CL3.java
package P2;
import P1.*;
public class CL3 {
public static void main(String args[]){
CL1 qq;
qq=new CL1(45);
System.out.println(" X = " +qq.x);
System.out.println("Converted X = "+qq.convert());
}
}
Q2. Write a Java program that counts the words and the occurrences of each of the vowels
(a, e, i, o, u) in the strings entered as command line arguments. The program will
output the input strings in upper case, number of words and occurrences of each of
the vowels in the input string. When are the StringBuffer objects preferred over
String objects? What is meant by immutable objects?
Q3. Create a class Fraction to represent the fraction numbers. It should have data
elements for numerator and denominator of a fraction number. Include two
constructors – one default and the other parameterized. Include a method that
determines whether it is a proper fraction or an improper fraction. A fraction is proper
if its value is strictly less than one, otherwise it is improper. For example, 4/3 is
improper, whereas 2/3 is proper. Whenever an object of type Fraction is passed as
parameter to System.out.println(), display a proper fraction as b/c and for an improper
fraction number, display its mixed fraction in the form of a+b/c if b % c is not zero;
otherwise, display only the integer. For example, 4/3 should printed as 1+1/3.
Write a program that prompts the user to enter the positive integer numerator and
denominator of a fraction number and determines whether it is a proper fraction and
improper fraction and prints the fraction number.
Q4. How do static binding and dynamic binding of methods help to achieve
polymorphism? Explain with appropriate examples. Mohan has code of two
abstract classes each with two abstract methods. He needs to create a new class with
the properties of both these classes. Can this new class inherit from both the
classes? Justify your answer. Why a class that extends an abstract class need to
override all the abstract methods of the super class? Explain how we can create a
class which inherits properties and methods from multiple sources?
Q5. Create a class PlayWithNums, with a static method LargerNums that accepts
two integer arrays and returns an array such that the ith element of the resulting
array contains the number that is greater between the elements at the same ith
index in input arrays. If the sizes of the input arrays are not same, the method
should throw SizeMismatchException. (Assume there is a user-defined
SizeMismatchException class available with the relevant data members and
methods in it). Show the use of LargerNums method in main() method of
PlayWithNums class. For example, LargerNums([2,7,3,12],
[3,1,2,16]) will result in [3,7,3,16].
What happens to your program if you do not declare LargerNums as static? What
is the significance of declaring a static data member in a class?
Q6. You are provided with a package pkgInt having a class clsInt. It has a method
Average() that takes variable number of integers as parameters and returns the
average of these integers.
package pkgInt;
public class clsInt{
float Average(int … Ints)
{ //Returns the average of the input integers
}
}
Write the code of the method Average(int … Ints). Use this function to
report average of integers read from a file.
Write a program in Java, to create an applet that prints the unique paper code and
the subject of this examination in the centre.
Set-A
Semester : III
Duration : 3 hours
1. Rajni is a student. Due to lockdown she has to make arrangement for attending her
online classes and solve the practice questions at home. When she made online search
she came to know about micro-computers, mainframes and supercomputers. You are
required to compare these type of computers based on their features and utility and
finally suggest Rajni which type of computer she should buy.
3. What do you mean by a computer network? How does wired networking differ from
wireless networking? What are the challenges associated with wireless networking?
6. Do you agree that database management system is better than traditional file system
as data management model? Give at least six points of differences between both the
data management models.
Unique Paper Code : 62347501
Semester : V
Duration : 3 Hours
Maximum Marks : 75
Q. 1) For each of the control names given below, identify the type of controls and
specify one property: lblAddress, cmdExit, txtName and optTextBlue. Write VB
statement to change a Label lb1 Caption to italic at run time. For Image Control
img1 in VB, write steps to make a graphic appear in it. Write VB statements to
hide the image and to ensure that it fills the Image Control completely. Find the
value of the variable sum in the following VB code:
sum = 0
count = 1
For count = 1 to 10
sum = sum + count
If sum >= 10 Then
Exit For
EndIf
Next
Q. 2) Write VB code to search an element in a Two-Dimensional array. The VB code
should display the index if the element is found, otherwise it should display -1.
Explain with the help of an example how to convert a For/Next structure to
Do/Loop structure. Write VB code to change the text color of the form depending
on the selection from the three colors given in the form.
Q. 3) Write a VB code to calculate and display the area and circumference of a circle
using the relation Area = πr2 and Circumference = 2πr where π = 3.14 and r is user
input. What will be the value of K on execution of the following VB statements:
K = y ^ (x * z) + 2 and K = y ^ (x * z + 2) / y (Assume that x = 3, y = 2 and z = 2).
What will be the output of the following VB code, assuming that a = 10, b = 20
and c = 30?
If a >= 10 And b > 20 Then
Print “Hello”
ElseIf a >= 10 And c > 30 Then
Print “Hi”
Else
Print “Bye”
End If
Rewrite the If statement using Select Case statement. Write steps to create a
breakpoint at Else. How does it affect the execution of the VB program?
Q. 4) Write steps to design a VB form that takes inputs: principal amount (P), rate of
interest (R) and number of years (N). The form contains the Command Button
cmd1 that calculates and displays compound interest as per the given formula
I = P * (1 + R/100)N
The form also contains Command Button cmd2 that clears the input fields. Write
VB code to implement Command Button cmd1 and cmd2. Write VB statement to:
Append “OBE” to the content of a Text Box txt1; Centrally align the content of a
Label lb1.
Q. 5) Write the output of the following VB statements:
FormatDateTime(“1/1/2001”, vbGeneralDate)
FormatNumber(2356.789, 2)
FormatPercent(.123, 2)
Printer.Print 45, 71, 34, 12, 58, 4
Printer.Print 45; 71; 34; 12; 58; 4
Write VB procedure to print a table showing the temperature in centigrade from
0° to 100° and the corresponding values in Fahrenheit using the relation
C / 5 = F - 32 / 9
Write steps required to convert a project prj1 into an .exe file.
Q. 6) Write VB code to calculate and display the Gross Salary and Net Salary of an
employee based on the given criteria:
Gross Salary = Basic Salary + Allowances
Net Salary = Gross Salary – Deductions
Draw the user interface (form) for the above scenario and label the controls.
Declare an array of size 30 for a user defined datatype Bank in VB for the
following customer data: Cust_ID, ACC_Number, Cust_Name, Age, Amount,
Address and Phone_No. Write VB code to display the list of customers having age
greater than 60.