Professional Documents
Culture Documents
REPORT
Submitted by
BACHELOR OF TECHNOLOGY
in
MAY - 2024
i
Register No : 20TD0310
Name : A.S.ARAVINTAKSHAN
Year/Semester/Section : IV/VIII/B
Branch : COMPUTER SCIENCE & ENGINEERING
Subject : COMPREHENSIVE VIVA VOCE
CERTIFICATE
Certified that this is the bonafide record of work done by the above
student in the COMPREHENSIVE VIVA VOCE Laboratory during the year
2023-24
ii
INDEX
2. Data Structures 09
7. Operating Systems 41
8. Computer Networks 46
iii
OBJECT ORIENTED PROGRAMMING AND DESIGN
C++ has a number of stream classes that are used to work with console and file operations.
These classes are known as stream classes. All these classes are declared in the header file
iostream.h. The file iostream.h must be included in the program if we are using functions of these
classes.
Below figure indicates the stream classes.
All operators in C are also used in C++. In addition to insertion operator << and extraction
operator >>, the other new operators in C++ are:
: : Scope resolution operator
: : * Pointer-to-member declarator
->* Pointer-to-member operator
.* Pointer-to-member operator
endl Line feed operator
new Memory allocation operator
setw Field width operators
2
7. What is constructor?
A constructor (having the same name as that of the class) is a special member function
which is automatically used to initialize the objects of the class type with legal initial values.
C++ has the ability to provide the operators with a special meaning for a data type.
This mechanism of giving such special meanings to an operator is known as Operator overloading.
Itprovides a flexible option for the creation of new definitions for C++ operators.
Default Constructor is also called as Empty Constructor which has no arguments and It is
automatically called when we creates the object of class but remember name of constructor is same
as name of class and constructor never declared with the help of return type. Means we cannot
declare a constructor with the help of void return type. , if we never pass or declare any arguments
then this called as the Copy Constructors.
This is also another type of Constructor. In this constructor we pass the object of lass into
another object of same class. As name suggests you copy, means copy the values of one object into
the another object of class .This is used for copying the values of class object into an another object
of class So we call them as Copy Constructor and for copying the values we have to pass the name
of object whose values we wants to copying and when we are using or passing an object to a
constructor then we must have to use the &ersand or address operator.
3
friend member function
friend class member function
Pointer variable stores the memory address of any type of variable. The pointer variable and
normal variable should be of the same type. The pointer is denoted by (*) asterisk symbol. Pointer
variables can be declared as below:
Example
int *x;
float *f;
char *y;
The heap is used to allocate memory during program execution i.e., run-time. In assembly
language, there is no such thing as a heap. In various ways, C/C++ has a better programming
environment than assembly language. However, a cost has to be paid to use either C or C++.
Virtual function or virtual method is a function or method whose behavior can be overridden
within an inheriting class by a function with the same signature.
4
17. What is array of pointers?
Polymorphism refers to late or dynamic binding i.e., selection of an entity is decidedat run-
time.
In class hierarchy, same method names can be defined that perform different tasks, and then
the selection of appropriate method is done using dynamic binding.
Dynamic binding is associated with object pointers.
Thus, address of different objects can be stored in an array to invoke function dynamically.
A file is a collection of inter related data stored in a particular area on the disk.
Most of the applications will have their own features to save some data to the local disk and
read data from the disk again.
C++ file I/O classes simplify such file to read/write operations for the programmer by
providing easier way to use classes.
The streambuf class does not organize streams for input or output operations. The derived
classes of streambuf perform these operations. It also arranges a space for keeping input data and
for sending output.
5
21. What is ifstream?
The ifstream provides input operations contains open() with default input mode.
Inherits the functions get(), getline(), read(), seekg(), tellg() functions from istream.
Sequential access
This type of file is to be accessed sequentially that is to access a particular data all the
preceding data items have to be read and discarded.
Random access
This type of file allows access to the specific data directly without accessing its preceding
data items.
6
25. Define UML.
Unified modeling language is a visual language used for specifying, constructing and
documenting a system. It is a standard diagrammatic notation used for drawing, presenting pictures
related to software engineering.
1) User’s view: User‘s view defines the functionalities (facilities) made available by the system
to its users.
2) Structural view: The structural view defines the kinds of objects (classes) important to the
understanding of the working of a system and to its implementation.
3) Behavioral view: The behavioral view captures how objects interact with each other to
realize the system behavior. The system behavior captures the time-dependent (dynamic)
behavior of the system.
4) Implementation view: The implementation view captures the important components of the
system and their dependencies.
5) Environmental view: The models of different components are implemented on different
pieces of hardware in environmental view.
1) Class diagram
2) Object diagram
3) Use case diagram
4) Sequence diagram
5) Collaboration diagram
6) Activity diagram
7) State chart diagram
8) Deployment diagram
9) Component diagram
The utility of the use cases are represented by ellipses and the text description serves a
type of requirements specification of the system and form the core model to which all
7
other models must conform.
Users (actors) is in identifying and implementing a security mechanism through a login
system, so that each actor can involve only those functionalities to which he is entitled
to.
Aggregation is a special type of association where the involved classes represent a whole-
part relationship. The aggregate takes the responsibility of forwarding messages to the appropriate
parts. Thus, the aggregate takes the responsibility of delegation and leadership.
Realization can be defined as a relationship in which two elements are connected. One
element describes some responsibility which is not implemented and the other one implements
them. This relationship exists in case of interfaces.
8
DATA STRUCTURES
Data structure refers to the way data is organized and manipulated. It seeks to find ways to
make data access more efficient. When dealing with the data structure, we not only focus on one
piece of data but the different set of data and how they can relate to one another in an organized
manner.
A binary search is an algorithm that is best applied to search a list when the elements are
already in order or sorted. The list is searched starting in the middle, such that if that middle value is
not the target search key, it will check to see if it will continue the search on the lower half of the
list or the higher half. The split and search will then continue in the same manner.
A linked list is a sequence of nodes in which each node is connected to the node following it.
This forms a chain-like link for data storage.
Data structures are essential in almost every aspect where data is involved. In general,
algorithms that involve efficient data structure is applied in the following areas: numerical analysis,
operating system, A.I., compiler design, database management, graphics, and statistical analysis, to
name a few.
5. What is LIFO?
LIFO is a short form of Last In First Out. It refers how data is accessed, stored and retrieved.
Using this scheme, data that was stored last should be the one to be extracted first. This also means
that in order to gain access to the first data, all the other data that was stored before this first data
must first be retrieved and extracted.
9
6. What is a queue?
A queue is a data structure that can simulate a list or stream of data. In this structure, new
elements are inserted at one end, and existing elements are removed from the other end.
A binary tree is one type of data structure that has two nodes, a left node, and a right node.
Inprogramming, binary trees are an extension of the linked list structures.
8. Which data structures are applied when dealing with a recursive function?
Recursion is a function that calls itself based on a terminating condition, makes use of the
stack. Using LIFO, a call to a recursive function saves the return address so that it knows how to
return to the calling function after the call terminates.
9. What is a stack?
A stack is a data structure in which only the top element can be accessed. As data is stored
inthe stack, each data is pushed downward, leaving the most recently added data on top.
A binary search tree stores data in such a way that they can be retrieved very efficiently. The
left sub tree contains nodes whose keys are less than the node‘s key value, while the right sub tree
contains nodes whose keys are greater than or equal to the node‘s key value. Moreover, both sub
trees are also binary search trees.
Multidimensional arrays make use of multiple indexes to store data. It is useful whenstoring
data that cannot be represented using single dimensional indexing, such as data representation in a
board game, tables with data stored in more than one column.
10
12. What is FIFO?
FIFO stands for First-in, First-out, and is used to represent how data is accessed in a queue.
Data has been inserted into the queue list the longest is the one that is removed first.
Merge sort, is a divide-and-conquer approach for sorting the data. In a sequence of data,
adjacent ones are merged and sorted to create bigger sorted lists. These sorted lists are then merged
again to form an even bigger sorted list, which continues until you have one single sorted list.
A linked list is an ideal data structure because it can be modified easily. This means that
editing a linked list works regardless of how many elements are in the list.
Pushing and popping applies to the way data is stored and retrieved in a stack. A push
denotes data being added to it, meaning data is being ―pushed‖ into the stack. On the other hand, a
pop denotes data retrieval, and in particular, refers to the topmost data being accessed.
A linear search refers to the way a target key is being searched in a sequential data structure.
In this method, each element in the list is checked and compared against the target key. The process
is repeated until found or if the end of the file has been reached.
The heap is more flexible than the stack. That‘s because memory space for the heap can be
dynamically allocated and de-allocated as needed. However, the memory of the heap can at times be
slower when compared to that stack.
11
The advantage of this form is that there is no need to group sub-expressions in parentheses
orto considers operator precedence.
The selection sort is a fairly intuitive sorting algorithm, though not necessarily efficient. In
this process, the smallest element is first located and switched with the element at subscript zero,
thereby placing the smallest element in the first position. The smallest element remaining in the
subarray is then located next to subscripts 1 through n-1 and switched with the element at subscript
1, thereby placing the second smallest element in the second position. The steps are repeated in the
same manner till the last element.
Dynamic data structures are structures that expand and contract as a program runs. It
provides a flexible means of manipulating data because it can adjust according to the size of the
data.
When dealing with arrays, data is stored and retrieved using an index that refers to the
element number in the data sequence. This means that data can be accessed in any order. In
programming, an array is declared as a variable having a number of indexed elements.
Stack follows a LIFO pattern. It means that data access follows a sequence wherein the last
data to be stored when the first one to be extracted. Arrays, on the other hand, does not follow a
particular order and instead can be accessed by referring to the indexed element within the array.
1. if the tree is empty, then the target is not in the tree, end search
2. if the tree is not empty, the target is in the tree
12
3. check if the target is in the root item
4. if a target is not in the root item, check if a target is smaller than the root‘s value
5. if a target is smaller than the root‘s value, search the left subtree
6. else, search the right subtree
A bubble sort is one sorting technique that can be applied to data structures such as anarray.
It works by comparing adjacent elements and exchanges their values if they are out of order. This
method lets the smaller values ―bubble‖ to the top of the list, while the larger value sinks to the
bottom.
Selection sort works by picking the smallest number from the list and placing it at the front.
This process is repeated for the second position towards the end of the list. It is the simplest sort
algorithm.
A graph is one type of data structure that contains a set of ordered pairs. These ordered pairs
are also referred to as edges or arcs and are used to connect nodes where data can be stored and
retrieved.
The linear data structure is a structure wherein data elements are adjacent to each other.
Examples of linear data structure include arrays, linked lists, stacks, and queues. On the other
hand, a non-linear data structure is a structure wherein each data element can connect to more than
two adjacent data elements. Examples of nonlinear data structure include trees and graphs.
13
29. What is an AVL tree?
An AVL tree is a type of binary search tree that is always in a state of partially balanced.
The balance is measured as a difference between the heights of the subtrees from the root. This self-
balancing tree was known to be the first data structure to be designed as such.
Doubly linked lists are a special type of linked list wherein traversal across the data
elements can be done in both directions. This is made possible by having two links in every node,
one that links to the next node and another one that connects to the previous node.
Fibonacci search is a search algorithm that applies to a sorted array. It makes use of a
divide- and-conquer approach that can significantly reduce the time needed in order to reach the
target element.
14
COMPUTER ORGANIZATION AND ARCHITECTURE
1. What is big–endian?
Big-endian and little-endian are terms that describe the order in which a sequence of bytes
are stored in computer memory. The name big-endian is used when lower byte addresses are used
for the more significant bytes (the leftmost bytes) of the word.
The name little endian is used for the opposite ordering, where the lower byte addresses are used
for the less significant bytes (the rightmost bytes)of the word. The words ―more significant‖
and ―less significant‖ are used in relation to the weights (powers of 2) assigned to bits when the
word represents a number.
The difference in speed between processor and I/O devices creates the need for mechanisms
to synchronize the transfer of data between them. There will be several I/O devices connected to the
processor; the processor checks the ``status'' input port periodically, under program control by the
I/O handling procedure. If an I/O device requires service, it will signal this need by altering its input
to the ``status'' port. When the I/O control program detects that this has occurred (by reading the
status port) then the appropriate operation will be performed on the I/O device which requested the
service.
Data register: Data register holds the operand read from memory.
Address Register: Address register holds register for holding a memory address.
Effective Address: The effective address can be defined as address of the operand in a
computation type instruction or the target address in a branch -type instruction.
Instruction Register: The instruction read from memory is placed in the instruction
register (IR).
1. Fetch instruction
15
2. Decode
3. Fetch operand
4. Execute
Isolates memory and I/O addresses so that memory address values are not affected by
interface address assignment since each has its own address space.
This is the case in computers that employ only one set of read and write signals and do
not distinguish between memory and I/O addresses.
The assigned addresses for interface registers cannot be used for memory words, which
reduce the memory address (range available).
Uses the same address space for both memory and I/O.
The computer treats an interface register as being part of the memory system
In memory mapped I/O organization, there are no specific inputs or output instructions. The
CPU can manipulate I/O data residing in interface registers with the same instructions that
are used to manipulate memory words.
The IA-32 architecture also has two block transfer I/O instructions REPINS and REPOUTS
.They transfer a block lf data serially, one item at a time, between the memory and an I/O device.
The S suffix in the OP codes stands for string, and the REP prefix stands for ―repeat the item by item
transfer until the complex block has been transferred‖.
Opcode:
In computing, an opcode (abbreviated from operation code) is the portion of assembly
language instruction that specifies the operation to be performed.
Eg: MOV,ADD,LOAD
16
Interrupt latency:
The delay between the time an interrupt request is received and the start of execution of the
interrupt service routine is called interrupt latency.
Time slicing is a common OS technique that makes multitasking possible. With this
technique, each program runs for a short time period called as a time slice, then another program
runs for its time slice and so on. The period is determined by continuously running hardware clock,
which generates an interrupt every second.
1. Running,
2. Runnable,
3. Blocked.
A special control unit that may be provided to allow transfer of a block of data directly
between an external device and the main memory without continuous intervention by the
processor. This approach is called direct memory access.
Computer system performance is improved by direct transfer of data between memory and
I/O devices, bypassing the CPU. CPU is free to perform operations that do not use system buses.
DMA controller: The DMA controller performs the functions that would normally be carried out by
the processor when accessing the main memory.
17
13. Define full handshake. List the two advantages of a full handshake.
14. What is the difference between serial port and parallel port?
Serial Port:
It transmits and receive data one bit at a time.
Serial format is much more convenient and cost-effective where longer cables are
needed.
Parallel Port:
It transfers data in the form of a number of bits typically 8 or 16simultaneously to or
from the device.
Parallel format is suitable for devices that are physically close to the computer.
15. Name and give purpose of widely used bus standards? Or What is standard I/O
interface? List their types? Or What are the standards used for connection?
I/O devices fitted with an interface circuit suitable for one computer may not be usable with
other computers. So a different interface may have to be designed for every combination of I/O
device and computer, resulting many different interfaces.
To overcome this standard I/O interfaces were introduced.
PCI- Peripheral Component Interconnect Bus
SCSI-Small Computer System Interface
USB- Universal Serial Bus
a. With Memory mapped I/O, any machine instruction that can access memory can be used for
transfer data to or from an I/O device.
b. In program controlled I/O, the processor repeatedly checks a status flag to achieve the required
synchronization between the processor and an input and output device.
18
17. List the factors affecting performance of a storage device?
Division of storage
Wasted storage
Distribution of disk I⁄O
Lack of available storage
When the main memory of a computer is structured as a collection of separate modules, each block
of data can be place in separate modules. Now, memory access operations may proceed in more
thanone module at the same time parallel.
19
21. Difference between cache and virtual memory?
1. HIT RATIO:
2. MISS RATIO:
3. MISS PENALTY: Processor loads data from Main memory and copies into cache, this
results in extra delay, called miss penalty.
Seek Time: The time required to move the read/write head to the proper track.
20
Rotational Delay or Latency Time: The amount of time taken, after the head is placed on
the correct track till the desired address sector passes under the read write head.
The usage of wide bus is expensive. An alternative technology was use with narrow bus,
called rambus. It used fast signaling method to transfer information between chips. Rambus allow
foe a clock frequency of 400 MHz, which can be transmitted on both edges of the clock with
800MHz.
Circular buffer are used to limit the size of the queue. In the queue, the tail end is connected
to front end in a circular manner, so that when tail end is full, the free space after popping the
elements from the front end can be reused.
Stall- If any of the operation such as fetch, decode, execute or write is paused for one or
more clock cycle, it is called as stall or stalling. These stalls are called hazards.
21
There are three types of hazards
1. Instruction hazard: The pipeline may be stalled because of a delay in the availability of an
instruction which results in cache miss. These hazards are called control hazards or
instruction hazards.
2. Data hazard: A data hazard is any condition in which either the source or destination
operands of an instruction are not available at the time expected in the pipeline.
Eg: A<--3+A
B<--4*A
3. Structural hazard: Structural hazard arises in a situation when two instructions require use
ofa given hardware resource at the same time.
A deadlock is a situation that can arise when two units, A and B, use a shared resource.
Suppose that unit B cannot complete its task until unit A completes its task. At the same time, unit
Bhas been assigned a resource that unit A needs. If this happens, neither unit can complete its task.
o Fetch the contents of the memory location pointed by the PC and store that content into
instruction registers. IR [[PC]]
o Increment the PC value by 4 to point out the next instruction in the program.
22
AUTOMATA LANGUAGES AND COMPUTATIONS
Finite automaton is a mathematical model of a system with discrete inputs and outputs. The
system can be in any one of the finite number of states. The state of the system summaries the
information concerning past inputs that is needed to determine the behavior of the systems on
subsequent inputs. A finite automaton consists of a finite set of states and set of transitions from
state to state that occur on input symbols chosen from an alphabet ∑.
FA consists of a finite set of states and a set of transitions from state to state that occur on
input symbols chosen from an alphabet ∑. Finite automaton is denoted by a 5-tuple (Q, ∑, δ, q 0 ,
F), where
In complier construction.
In switching theory and design of digital circuits.
To verify the correctness of a program.
Design and analysis of complex software and hardware systems.
To design finite state machines such as Moore and Mealy machine.
23
5. Define the rules for transition diagram?
There are main operations that are closed under regular expression,
i. Union.
ii. Concatenation.
iii. Kleene Closure.
Union :
Let r 1 and r 2 be the regular expressions and the union of these two regular expressions are
denoted as r 1
U r 2 or r 1 +r 2 the general form of representation of union operation is given by, M==(Q 1
UQ 2 U{q 0 ,f 0 },∑ 1 U∑ 2 ,∂,q 0 ,{f 0 }).
Concatenation:
Let r 1 and r 2 be the regular expressions and the union of these two regular expressions are
denoted as r 1 . r 2 or r 1 r 2 the general form of representation of concatenation operation is
given by, M==(Q 1 UQ 2 ,∑ 1 U∑ 2 ,∂,q 0 ,{f 0 })
Kleene Closure :
Let r 1 be the regular expressions and the union of these two regular expressions are
denoted as r 1 * or the general form of representation of kleene closure is given by,
M==(Q 1 U{q 0 ,f 0 },∑,∂,q 0 ,{f 0 })
Let L be a regular set. Then there is a constant n such that if Z is any word in L, and
|z|≥n. we may write Z=uvw in such a way that |uv| ≤ n, |v| ≥ 1and for all L ≥0 then uv i w is in L.
24
8. What are the application of pumping lemma for regular set?
There are four components present in CFG, or just grammar. We shall represent a CFG G
by its four components, that is,
G=(V,T,P,S), where V is the set of variables, T the terminals, P the set of productions, and S
the start symbol.
The parse tree is a tree that shows the essentials of a derivation. Interior nodes are labeled by
variables, and leaves are labeled by terminals or Є. For each internal node, there must be a
production such that the head of the production is the label of the node, and the labels of its
children, read from right to left, from the body of that production.
12. What are the three ways to simplify a context free grammar?
25
13. What is Push down automata?
Push down automata is mainly used to recognize the CFL. It is named as Push down
automata because it makes use of stack as Push down list. Here stack acts as Cache memory and
Auxiliary memory.
In PDA stack acts as Cash memory and Auxiliary memory. Cash memory is used to store
the frequently accessing data and the data can be retrieved as fast as possible. If there is no enough
space in input tape then the data can be stored in external memory.
Shift: Shifting action is that we shift the symbol from input tape to the stack.
Reduce: If handle is present at the top of the stack then it is replace by the left hand side of the
derivation. This action is known as reduce.
Accept: When the $ symbol encounter then the input string is accepted. Error: If $ symbol does not
encounter then it leads to error.
Let G be the context free grammar indicated by G= {V, T, P, S} then S => α ifonly if
there is a derivation tree in G.
26
18. What are the different types of language acceptances by a PDA.
A control unit
Read unit
Input tape
Memory unit
finite control
an input tape
a tape head
This is a kind of Turing machines that have one finite control, one read-write head and one
two dimensional tape. The tape has the top end and the left end but extends indefinitely to the right
and down. It is divided into rows of small squares.
A multiple turing machine consists of a finite control with k tape heads and k tapes; each
tape is infinite in both directions. On a single move, depending on the state of the finite control and
the symbol scanned by each of the tape heads, the machine can:
27
1. Change state
2. Prints a new symbol on each of the cells scanned by its tape heads;
3. Move each of its tape heads, independently, one cell to the left, or right, or keep it
stationary. Initially the input appears on the first tape, and the other tapes are blank.
In case of a Turing machine one side of the input tape is infinite hence it is called as the
semi infinite tape.
A computational complexity is based on the amount of time, space, or other resource needed
to recognize a language on some universal computing device such a Turing Machine.
28
28. Define Hamiltonian Cycle or Hamiltonian Circuit and give an example.
A Hamiltonian cycle (or Hamiltonian circuit) is a cycle in an undirected graph which visits
each vertex exactly once and also returns to the starting vertex. Example: A complete graph with
more than two vertices is Hamiltonain Every cycle graph is Hamiltonian.
The universal language consists of a set of binary strings in the form of pairs (M,w) here M
is TM encoded in binary and w is the binary input string. Lu = { < M,w> | M accepts w }.
L=Φ
L = £ *.
L is recursive
L is not recursive.
L is singleton.
L is a regular set.
L - Lu ≠ Φ
29
DESIGN AND ANALYSIS ALGORITHMS
Performance measurement is concerned with obtaining the space and the time requirements of
a particular algorithm.
2. What is an algorithm?
An algorithm is said to be recursive if the same algorithm is invoked in the body. An algorithm
that calls itself is direct recursive.
The space complexity of an algorithm is the amount of memory it needs to run to completion.
The time complexity of an algorithm is the amount of computer time it needs to run to
completion.
The function f(n)=0(g(n)). If there exist positive constant C and no such that f(n)< C * g(n) for
all n, n>n0.
30
7. Define the divide and conquer method?
Given a function to compute on ‗n‘ inputs the divide-and-conquer strategy suggests splitting
the inputs in to ‗k‘ distinct suggests. The sub problems must be solved, and their method must be
found to combine sub solutions into a solution it the whole.
A control abstraction we mean a procedure whose flow of control is clear but whose primary
operations are by procedures whose precise meanings are left undefined.
One of the methods for solving any such recurrence relation is called the substitution method.
If ‗q‘ is always chosen such that ‗aq‘ is the middle element(that is, q=[(n+1)/2), then the
resulting search algorithm is known as binary search.
The external path length E, is defines analogously as sum of the distance of all external nodes
from the root.
The internal path length ‗I‘ is the sum of the distance of all internal nodes from the root.
N quick sort, the division into sub arrays is made so that the sorted sub arrays do not need to be
merged later.
A feasible solution either maximizes or minimizes the given objectives function is called as
optimal solution.
31
15. Define dynamic programming?
Dynamic programming is an algorithm design method that can be used when a solution to the
problem is viewed as the result of sequence of decisions.
The solution to the knapsack problem can be viewed as a result of sequence of decisions. We
have to decide the value of xi. xi is restricted to have the value 0 or 1 and by using the function
knap(l, j, y) we can represent the problem as maximum pi xi subject to wi xi < y where l - iteration,
j - number of objects, y – capacity.
Let g = (V, E) be a directed. The tour of G is a directed simple cycle that includes every vertex
in V. The cost of a tour is the sum of the cost of the edges on the tour. The traveling
salesperson problem to find a tour of minimum cost.
A non pre emptive schedule is a schedule in which the processing of a task on any
processor is not terminated until the task is complete.
The term Branch-and-Bound refers to all the state space methods in which all children of
the E-node are generated before any other live node can become the E- node.
21. What are the searching techniques that are commonly used in Branch-and- Bound
Method?
The searching techniques that are commonly used in Branch-and-Bound method are:
32
FIFO
LIFO
Heuristic search
LC
The problem is to place eight queens on a 8 x 8 chessboard so that no two queen ―attack‖ that
is, so that no two of them are on the same row, column or on the diagonal.
Given n distinct positive numbers usually called as weights, the problem calls for finding all the
combinations of these numbers whose sums are m.
Let G be a graph and m be a given positive integer. We want to discover whether the nodes
of G can be colored in such a way that no two adjacent nodes have the same color yet only m
colors are used.
The problems whose solutions have computing times are bounded by polynomials of small
degree.
A maxclique problem is the optimization problem that has to determine thesize of a largest
clique in Graph G where clique is the maximal subgraph of a graph.
Routing a postal van to pick up mail from boxes located at n different sites.
Using a robot arm to tighten the nuts on some piece of machinery on an assembly line.
33
Production environment in which several commodities are manufactured on the same set of
machines.
28. Give the time complexity and space complexity of traveling salesperson problem.
The processing of jobs requires the performance of several distinct job. In flow shop we have n
jobs each requiring n tasks i.e. T1i, T2i, ......................... Tmi, 1<i<n.
Let Tji denote jth task of the ith job. Task Tij is to be performed on Pj number of
processors where 1<j<m i.e. number of processors will be equal to number of task
Any task Tji must be assigned to the processor Pj.
No processor can have more than one task assigned to it at any time. For any job I processing
the task for j>1 cannot be started until T(j-i),i has been completed.
34
GRAPHICS AND IMAGE PROCESSING
Computer graphics remains one of the most existing and rapidly growing computer fields.
Computer graphics may be defined as a pictorial representation or graphical representation of
objects in a computer.
When a key is pressed on the keyboard, the keyboard controller places a code carry to the
key pressed into a part of the memory called as the keyboard buffer. This code is called asthe scan
code.
Some method is needed for maintaining the picture on the screen. Refreshing of screen is
done by keeping the phosphorus glowing to redraw the picture repeatedly. (i.e) By quickly directing
the electronic beam back to the same points.
Random scan is a method in which the display is made by the electronic beam which is
directed only to the points or part of the screen where the picture is to be drawn.
The Raster scan system is a scanning technique in which the electrons sweep from top to
bottom and from left to right. The intensity is turned on or off to light and unlight the pixel.
35
6. Define Ellipse?
An ellipse can use the same parameters xc, yc ,r as a circle, in addition to the eccentricity e.
the eqn of an ellipse is:(x-xc)2/a2 + (y-yc)2/b2 = 1
7. Define polygon?
A polygon is any closed continues sequence of line segments ie, a polyline whose last node
point is same as that of its first node point. The line segments form the sides of the polygon and
their intersecting points form the vertices of the polygon.
If the line joining any two points in the polygon lies completely inside the polygon then,
they are known as convex polygons. If the line joining any two points in the polygon lies outside
the polygon then, they are known as concave polygons.
One way to fill a polygon is to start from a given point (seed) known to be inside the
polygon and highlight outward from this point i.e neighboring pixels until encounter the boundary
pixels, this approach is called seed fill.
One way to fill the polygon is to apply the inside test. i.e to check whether the pixel is inside
the polygon or outside the polygon and then highlight the pixel which lie inside the polygon. This
approach is known as scan-line algorithm.
The effect caused by the use of an insufficient number of intensity levels in smooth areas of
a digital image is called false contouring. So called because the ridges resemble topographic
contours in a map. False contouring generally is quite visible in images displayed using 16 or less
intensity levels.
36
12. What is recognition and Interpretation?
Recognition means is a process that assigns a label to an object based on the information
provided by its descriptors. Interpretation means assigning meaning to a recognized object.
Image Acquisition
Storage
Processing
Display
Image enhancement at any Point in an image depends only on the gray level at That point
is often referred to as Point processing
The negative of an image with gray levels in the range [0, L-1] is obtained using the
negative transformation which is given by
37
18. Define Derivative filter?
For a function f (x, y), the gradient f at co-ordinate (x, y) is defined as the vector
f=∂f/∂x
∂f/∂y
Spatial filtering is the process of moving the filter mask from point to point in an image. For
linear spatial filter, the response is given by a sum of products of the filter coefficients, and the
corresponding image pixels in the area spanned by the filter mask.
The median filter replaces the value of a pixel by the median of the gray levels in the
neighborhood of that pixel.
The 100th percentile is maximum filter is used in finding brightest points in an image.
The 0th percentile filter is minimum filter used for finding darkest points in an image.
1. A lossy baseline coding system, which is based on the DCT and is adequate for most
compression application.
2. An extended coding system for greater compression, higher precision or progressive
reconstruction applications.
3. A lossless independent coding system for reversible compression.
38
DPCM on DC component
RLE on AC Components
Entropy Coding
List all the source symbols along with its probabilities in descending order. Divide the total
number of symbol l in to block of equal size. Sum the probabilities of all the source symbols
outside the reference block. Now apply the procedure for reference block, including the prefix
source symbol.
The code words for the remaining symbols can be constructed by means of one or more
prefix code followed by the reference block as in the case of binary shift code.
In arithmetic coding one to one corresponds between source symbols and code word
doesn‘t exist whereas the single arithmetic code word assigned for a sequence of source symbols. A
code word defines an interval of number between 0 and 1.
26. What are the three methods of estimating the degradation function?
1. Observation
2. Experimentation
3. Mathematical modeling.
Guassian noise
Rayleigh noise
39
Erlang noise
Exponential noise
Uniform noise
Impulse noise
29. Write any two basic area filling approaches on raster systems.
boundary filling
flood filling
To complete the data we need for classifying the groups, we need one more concept to add
tothe lattice L, the point group P, and the action of P on L.
This is to allow for the fact that some reflections in P act as glides rather than as reflections
in G.
Let AP be a reflection with Tv A G. Then the vector a = v + A (v) is called a shift vector
of A.
40
OPERATING SYSTEMS
Operating systems exist for two main purposes. One is that it is designed to make sure a
computer system performs well by managing its computational activities. Another is that it provides
an environment for the development and execution of programs.
Demand paging is referred when not all of a process‘s pages are in the RAM, then the OS
brings the missing (and required) pages from the disk into the RAM.
4) What is kernel?
A kernel is the core of every operating system. It connects applications to the actual
processing of data. It also manages all communications between software and hardware components
to ensure usability and reliability.
Real-time systems are used when rigid time requirements have been placed on the operation
of a processor. It has well defined and fixed time constraints.
Virtual memory is a memory management technique for letting processes execute outside of
memory. This is very useful especially is an executing program cannot fit in the physical memory.
41
7) Describe the objective of multiprogramming.
The main objective of multiprogramming is to have a process running at all times. With this
design, CPU utilization is said to be maximized.
In a Time-sharing system, the CPU executes multiple jobs by switching among them, also
known as multitasking. This process happens so fast that users can interact with each program while
it is running.
9) What is SMP?
Server systems can be classified as either computer-server systems or file server systems. In
the first case, an interface is made available for clients to send requests to perform an action. In the
second case, provisions are available for clients to create, access and update files.
In asymmetric clustering, a machine is in a state known as hot standby mode where it does
nothing but to monitor the active server. That machine takes the active server‘s role should the
server fails.
A thread is a basic unit of CPU utilization. In general, a thread is composed of a thread ID,
program counter, register set, and the stack.
FCFS stands for First-come, first-served. It is one type of scheduling algorithm. In this
scheme, the process that requests the CPU first is allocated the CPU first. Implementation is
managed by a FIFO queue.
16) What are necessary conditions which can lead to a deadlock situation in a system?
Deadlock situations occur when four conditions occur simultaneously in a system: Mutual
exclusion; Hold and Wait; No preemption; and Circular wait.
Banker‘s algorithm is one form of deadlock-avoidance in a system. It gets its name from a
banking system wherein the bank never allocates available cash in such a way that it can no longer
satisfy the needs of all of its customers.
43
19) What factors determine whether a detection-algorithm must be utilized in a deadlock
avoidance system?
One is that it depends on how often a deadlock is likely to occur under the implementation
of this algorithm. The other has to do with how many processes will be affected by deadlock when
this algorithm is applied.
20) State the main difference between logical from physical address space.
Logical address refers to the address that is generated by the CPU. On the other hand,
physical address refers to the address that is seen by the memory unit.
21) How does dynamic loading aid in better memory space utilization?
With dynamic loading, a routine is not loaded until it is called. This method is especially
useful when large amounts of code are needed in order to handle infrequently occurring cases such
as error routines.
Overlays are used to enable a process to be larger than the amount of memory allocated to it.
The basic idea of this is that only instructions and data that are needed at any given time are kept in
memory.
Paging is a memory management scheme that permits the physical address space of a
process to be noncontiguous. It avoids the considerable problem of having to fit varied sized
memory chunksonto the backing store.
Fragmentation is memory wasted. It can be internal if we are dealing with systems that have
fixed-sized allocation units, or external if we are dealing with systems that have variable-sized
allocation units.
44
25) How does swapping result in better memory management?
During regular intervals that are set by the operating system, processes can be copied from
main memory to a backing store, and then copied back later. Swapping allows more operations to
be run that can fit into memory at one time.
Direct Access method is based on a disk model of a file, such that it is viewed as a
numbered sequence of blocks or records. It allows arbitrary blocks to be read or written. Direct
access is advantageous when accessing large amounts of information.
Thrashing refers to an instance of high paging activity. This happens when it is spending
more time paging instead of executing.
30) What is the best page size when designing an operating system?
The best paging size varies from system to system, so there is no single best when it comes
to page size. There are different factors to consider in order to come up with a suitable page size,
such as page table, paging time, and its effect on the overall efficiency of the operating system.
45
COMPUTER NETWORKS
1. Define Piggybacking?
In data transmission if the sender sends any data frame to the receiver then the receiver
should send the acknowledgment to the sender. The receiver will temporarily delay (waits for the
network layer to send the next data packet) the acknowledgment and hooks it to the next outgoing
data frame, this process is called as Piggybacking
2. Explain DNS?
DNS stands for Domain Naming Server. DNS acts as a translator between domain names
and IP address. As humans remember names, the computer understands only numbers. Generally,
we assign names to websites and computers like gmail.com, Hotmail etc. When we type such names
the DNS translates it into numbers and execute our requests.
Translating the names into numbers or IP address is named as a Forward lookup. Translating the IP
address to names is named as a Reverse lookup.
Baseband Transmission: A single signal consumes the whole bandwidth of the cable
Broadband Transmission: Multiple signals of multiple frequencies are sent simultaneously.
Networks are classified into two categories based on their connection types. They are
mentioned below,
Peer-to-peer networks (P2P): When two or more computers are connected together to
share resources without the use of a central server is termed as a peer-to-peer network.
Computers in this type of network act as both server and client. Generally used in small
companies as they are not expensive.
Server-based networks: In this type of network, a central server is located to store the data,
applications etc of the clients. The server computer provides the security and network
administration to the network
46
5. What is the difference between Hub, Switch, and Router?
The router is
Hub is least expensive, Switches work
similarly like Hubs but in smartest and most
least intelligent and least
a more efficient manner. complicated out of these
complicated of the three.
three. It comes in all
It broadcast all data to It creates
shapes and sizes.
every port which may cause connections dynamically
Routers are similar
serious security and reliability and provides information
like little computers
concern. only to the requesting
dedicated for routing
In a Network, Hub is a port.
network traffic.
common connection point for Switch is a device in
Routers are located
devices connected to the a network which forwards
at gateway and forwards
network. Hub contains multiple packets in a network.
data packets.
ports and is used to connect
segments of LAN.
6. What is a Firewall?
Firewall is a network security system that is used to protect computer networks from
unauthorized access. It prevents malicious access from outside to the computer network. A firewall
can also be built to grant limited access to the outside users.
7. What is DNS?
Domain Name Server (DNS), in a non-professional language and we can call it as Internet‘s
phone book. All the public IP addresses and their hostnames are stored in the DNS and later it
translates into a corresponding IP address.
8. What is Routers?
A router is a device which is responsible for sending data from source to destination over the
computer network.
47
9. Describe Hub, Switch and Router?
Hub: Hub will broadcast all data to every port. It has a common connection point for all
devices.
Switch: Switch will create the dynamic connection and provide information to the requesting
port.
Router: Router is the devices which will be responsible for forwarding data packets.
TCP stands for Transfer control protocol and UDP stands for User Datagrams protocol and
TCP is a connection-oriented protocol and UDP is a Connectionless protocol.
Ping is a utility program that allows you to check connectivity between network devices on
the network. You can ping a device by using its IP address or device name, such as a computer
name.
Peer to peer are networks that does not reply on a server. All PCs on this network act as
individual workstations.
IPv6, or Internet Protocol version 6, was developed to replace IPv4. At present, IPv4 is
being used to control internet traffic, but is expected to get saturated in the near future. IPv6 was
designed to overcome this limitation.
RSA is short for Rivest-Shamir-Adleman algorithm. It is the most commonly used public
key encryption algorithm in use today.
48
15. Explain the importance of authentication.
Authentication is the process of verifying a user's credentials before he can log into the
network. It is normally performed using a username and password. This provides a secure means of
limiting the access from unwanted intruders on the network.
The Transport layer is the fourth layer of the OSI reference model. In computer networking,
a transport layer provides end-to-end or host-to-host communication services for applications within
a layered architecture of network components and protocols. The transport layer provides services
such as connection-oriented data stream support, reliability, flow control, and multiplexing.
seconds
where
is the transmission delay in seconds N is the number of bits, and R is the rate of transmission
(say in bits per second)
In telecommunications, the round-trip delay time (RTD) or round-trip time (RTT) is the
length of time it takes for a signal to be sent plus the length of time it takes for an acknowledgment
of that signal to be received.
49
19. What are the different types of Multiplexing?
UDP (User Datagram Protocol) is a communications protocol that offers a limited amount of
service when messages are exchanged between computers in a network that uses the Internet
Protocol (IP). UDP is an alternative to the Transmission Control Protocol (TCP) and, together with
IP, is sometimes referred to as UDP/IP.
It is commonly known as TCP/IP, because its most important protocols, the Transmission
Control Protocol (TCP) and the Internet Protocol (IP), were the first networking protocols defined
in this standard.
50
22. Define Error detection and correction.
Error Detection: Data can be corrupted during transmission. It is called as an error. For
reliable communication, the receiver must find out the errors occurred in the data which is called as
error detection. Error Correction: It is the mechanism to correct the errors and it can be handled in 2
ways.
a. When an error is discovered, the receiver can have the sender retransmit the entire data
unit.
b. A receiver can use an error correcting coder, which automatically corrects certain error.
It is the error detecting mechanism, which means a shorter group of bits or extra bits may be
appended at the destination of each unit.
A hamming code can be designed to correct burst errors of certain lengths. So the simple
strategy used by the hamming code to correct single bit errors must be redesigned to be applicable
for multiple bit correction.
A network layer device that connects networks with different physical media and translates
between different network architecture.
1. Connecting networks
51
2. Filtering information so that network traffic for one portion of the network does not
congest the rest of the network.
TCP provides a connection oriented, reliable byte stream service. The connection oriented
means the two applications using TCP must establish a TCP connection with each other before they
can exchange data.
When too many packets rushing to a node or a part of network, the network performance
degrades. This situation is called as congestion.
The job of gathering data chunks at the sources host from different sockets, encapsulating
each data chunks with header information to create segments, and passing the segments to the
network layer is called multiplexing.
52
DATABASE MANAGEMENT SYSTEMS
1. What is database?
A database is a logically coherent collection of data with some inherent meaning, representing
some aspect of real world and which is designed, built and populated with data for a specific
purpose.
2. What is DBMS
It is a collection of programs that enables user to create and maintain a database. In other
words it is general purpose software that provides the users with the processes of defining,
constructing and manipulating the database for various applications.
Hiding the complexity from the users is called data abstraction. Three levels of abstraction are:
1. Physical level: The lowest level of abstraction describes how data are stored.
2. Logical level: The next higher level of abstraction, describes what data are stored in
databaseand what relationship among those data.
3. View level: The highest level of abstraction describes only part of entire database.
Data independence means that "the application is independent of the storage structure and
access strategy of data". In other words, The ability to modify the schema definition in one level
should not affect the schema definition in the next higher level.
1. Physical Data Independence: Modification in physical level should not affect the logical
level.
2. Logical Data Independence: Modification in logical level should affect the view level.
53
5. What is Data Model
A collection of conceptual tools for describing data, data relationships data semantics and
constraints.
It uses a collection of tables to represent both data and relationship among those data.
It describes the data at logical and view level abstracting the data storage.
Redundant Array of Independent Disks is a way of storing same data in different places on
multiple hard disks.
Capacity of array = Number of drives * Capacity of disk Storing data redundantly increases Fault
tolerance
54
11. What is meant by Hashing
Hashing is the transformation of a string of characters into a usually shorter fixed- length
value or key that represents the original string.
It is used to index and retrieve items in a database because it is faster to find the item
using the shorter hashed key than to find it using the original value.
A relational-database system needs to maintain data about the relations, such as the schema
of the relations. Such data about data is called metadata. The relation schemas and metadata about
the relations is stored in Data dictionary or System catalog.
Primary index: It is the index whose search key specifies the sequential order of the file.
Also called clustering index .The search key of a primary index is usually but not
necessarily the primary key.
Secondary index: an index whose search key specifies an order different from the sequential
order of the file. Also called non- clustering index.
Functional dependency is a relationship that exists when one attribute uniquely determines
another attribute. If X and Y are the attributes of relation, then Functional dependency F: X Y
X uniquely determines Y(i.e.,) Y functionally depends on X
BCNF – Boyce - Codd Normal Form . It is one of the most desirable Normal Form
55
.It eliminates almost all redundancy that can be discovered using FDs . A relation r is in
BCNF with respect to set of FDs, if all FDs are of form α β, where α(alpha) is a subset of r
and β(beta) is a subset of r.
All the attribute values must be atomic (indivisible) and should not contain multiple values.
It should not contain repeating groups of data. If so decompose it.
A relation schema R is in 2nd Normal Form, if it is in 1st Normal Form and should not
contain partial functional dependency.
When removing one of key attribute, if we can‘t able to identify the other attributes of
relation, then Full Functional dependency must exist in a relation.
A relation schema R is in 3rd Normal Form, if it is in 2nd Normal form and it should not
contain transitive dependency.
20. What is meant by 4th Normal Form and 5th Normal Form
Transaction is a collection of operations that form a single logical unit of work. Each
transaction must support ACID property.
56
22. Define ACID property
Atomicity (Indivisible)
Either all operation or none of the operation is performed.
Failed transaction must not change any values in the database.
Consistency:
After the execution of transaction (Transfer Rs.50 from Account A to Account B), total
amount of money in Account A and B is preserved (i.e.) A + B.
Isolation:
If transaction is isolated, execution of one transaction will not affect the other.
Durability:
After successful transaction, the updated value must persist even after the system crash or
failure.
Query optimization is a process of choosing Query evaluation plan with lowest cost. Costis
generally measured as total elapsed time for answering query.
A lock is a mechanism to control concurrent access to a data item. Data items can be
locked in two modes: Shared mode, Exclusive mode.
Shared lock : If the transaction Ti has obtained the shared mode lock(denoted by S)on data
item Q then Ti can read but cannot write Q .
Exclusive lock : If the transaction Ti has obtained the exclusive mode lock( denoted by
X)on data item Q then Ti can both read and write Q.
57
26. What is meant by locking protocol
Each transaction in the system follows the set of rules called locking protocol, indicating
when a transaction may lock and unlock each of the data item.
Concurrency control manager is responsible for granting of locks.
To avoid long interruption of normal processing during check pointing, fuzzy check
pointing allow updates to happen during check pointing
SQL is a Structured Query Language. It can define structure of data, perform manipulation
of data in database and also specify security constraints.
Several parts of SQL are DDL(Data Definition Language), DML(Data Manipulation
Language), Integrity, Authorization, Embedded SQL, Dynamic SQL, View definition,
Transaction control.
Integrity constraints:
Unique => attribute value should not repeat
Primary key => attribute value must not null and unique
58
LANGUAGE TRANSLATORS
It consists of variety of programs that supports the operation of the computer. This software
makes it possible for the user to focus on the other problems to be solved without needing to know
how the machine works internally. Eg: operating system, assembler, loader.
2. Define compiler.
Compiler is a set of program which converts the whole high level language program to
machine language program.
3. Define Interpreter.
4. Define loader.
Loader is a set of program that loads the machine language translated by the translator into
the main memory and makes it ready for execution.
An Operating system is a system software that manages both hardware and software and
provides services through computer.
6. What is the difference between the instructions LDA # 3 and LDA THREE?
In the first instruction immediate addressing is used. Here the value 3 is directly loaded into
the accumulator register. In the second instruction the memory reference is used. Here the address
(address assigned for the symbol THREE) is loaded into the accumulator register.
Supervisor Call Instruction generates an Interrupt that can be used for communication with the
operating system.
59
8. Define loader.
Loader is a set of program that loads the machine language translated by the translator into
the main memory and makes it ready for execution.
Relocation – modifies the object program so that it can be loaded at an address different
from the location originally specified
Linking – combines two or more separate object programs and also supplies the information
needed to reference them.
An absolute loader is the simplest type of loading scheme that loads the file into memoryat
the location specified by the beginning portion (header) of the file, then it passes control to the
program. The loader, which is used only for loading, is known as absolute loader. e.g. Bootstrap
loader
When the system is started or turned on, a special kind of program called Bootstrap Loader
will automatically run. It tests the available computer system resources like peripherals, hardware,
external memory devices are connected.
This is a special type of absolute loader which loads the first program to be run by the computer.
(usually an operating system)
Program Relocation-the program move from one area to another in memory Program
Linking-connecting two or more separate subprograms
60
modification to be performed.
If the relocation bit corresponding to a word of object code is set to 1, the program‘s
starting address is to be added to this word when the program is relocated. Bit value 0 indicates no
modification is required.
The relocation bits are gathered together following the length indicator in each text record
and which is called as bit mask. For e.g. the bit mask FFC (111111111100) specifies that the first 10
words of object code are to be modified during relocation.
It is used to store the name and address of the each external symbol. It also indicates in
whichcontrol section the symbol is defined.
Recognizers are machines. These are the machines which accept the strings belonging to
certain language. If the valid strings of such language are accepted by the machine then it is said
thatthe corresponding language is accepted by that machine, otherwise it is rejected.
18. What is the need for separating the analysis phase into lexical analysis and parsing?(Or)
Simpler design is perhaps the most important consideration. The separation of lexical
analysis from syntax analysis often allows us to simplify one or the other of these phases.
Compiler efficiency is improved.
61
19. What is a Symbol table?
A Symbol table is a data structure containing a record for each identifier, with fields for the
attributes of the identifier. The data structure allows us to find the record for each identifier quickly
and to store or retrieve data from that record quickly.
Link editing:
This allows us to make a single program from several files of relocatable machine code.
These files may have been the result of several compilations, and one or more may be
library files of routines provided by the system and available to any program that needs them.
A Sentinel is a special character that cannot be part of the source program. Normally we use
„eof‟ as the sentinel. This is used for speeding-up the lexical analyzer.
The code generator should produce the correct and high quality code. In other words, the
code generated should be such that it should make effective use of the resources of the target
machine.
Code generator should run efficiently.
Define and use – the three address statement a:=b+c is said to define a and to use b and c.
Live and dead – the name in the basic block is said to be live at a given point if its value is
usedafter that point in the program. And the name in the basic block is said to be dead at a
given point if its value is never used after that point in the program.
A sequence of consecutive statements which may be entered only at the beginning and when
entered are executed in sequence without halt or possibility of branch , are called basic blocks.
62
25. Mention the applications of DAGs.
A flow graph is a directed graph in which the flow control information is added to the basic blocks.
Back-end
Intermediate to binary translation is usually done by a separate compilation pass called back
end.
Front end
There are several back ends for different target machines, all of which use the same parser
andcode generator called front end.
During register allocation we select the set of variables that will reside in registers at a point
in the program.
During a subsequent register assignment phase, we pick the specific register that a variable
will reside in.
63
30. How would you calculate the cost of an instruction?
The cost of an instruction to be one plus the costs associated with the source and destination
address modes. This cost corresponds to the length of the instruction.
Address modes involving registers have cost zero, while those with a memory location or
literal in them have cost one.
64
SOFTWARE ENGINEERING
Software engineering is a discipline in which theories, methods and tools are applied to
develop professional software.
System software
Application software
Engineering/Scientific software
Embedded software
Specification
Design and implementation
Validation
Evolution
65
6. What are the umbrella activities of a software process?
The incremental model can be adopted when there is less number of people involved in
the project
Technical risks can be managed with each increment
For a very small time span, at least core product can be delivered to the customer
Association is a common type of relation among classes. When two classes are associated, they can
take each others help (i.e. invoke each others methods) to serve user requests.
More technically, we can say that if one class is associated with another bidirectionally, then the
corresponding objects of the two classes know each others ids (identities).
66
As a result, it becomes possible for the object of one class to invoke the methods of the
corresponding object of the other class.
Persistence
Objects usually get destroyed once a program completes its execution. Persistent objects are
stored permanently. That is, they live across different executions. An object can be made persistent
by maintaining copies of the object in a secondary storage or in a database.
Agents
A passive object is one that performs some action only when requested through invocation
of some of its methods. An agent (also called an active object), on the other hand, monitors events
occurring in the application and takes actions autonomously. Agents are used in applications such as
monitoring exceptions.
Unit testing - The individual components are tested in this type of testing.
Module testing – Related collection of independent components are tested
Sub-system testing –Various modules are integrated into a subsystem and the whole
subsystem is tested.
System testing – The whole system is tested in this system.
Acceptance testing – This type of testing involves testing of the system with customer
data.
67
13. What is the use of CMM?
Incremental model
Spiral model
WIN-WIN spiral model
Concurrent Development
The development strategy that encompasses the process, methods and tools and generic
phases is often referred to as a process model or software engineering paradigm.
68
Development efforts may get reduced.
System usability can be improved.
Evolutionary prototyping – the initial prototype is prepared and it is then refined through
number of stages to final stage.
Throw-away prototyping – a rough practical implementation of the system is produced.
The requirement problems can be identified from this implementation.
This prototyping is used to pre-specify the look and feel of user interface in an effective
way.
Correctness – The SRS should be made up to date when appropriate requirements are
identified
Unambiguous – When the requirements are correctly understood then only it is possible to
write unambiguous software.
69
wants to create software.
Consistent – It should be consistent with reference to the functionalities identified.
Specific – The requirements should be mentioned specifically.
Traceable – What is the need for mentioned requirement?
Design process is a sequence of steps carried through which the requirements are translated
into a system or software model.
A cohesive module performs only ―one task‖ in software procedure with little interaction
with other modules. In other words cohesive module performs only one thing.
70
30. What are data acquisition systems?
Systems that collect data from sensors for subsequent processing and analysis are termed as
data acquisition systems. Data collection processes and processing processes may have different
periods and deadlines.
71
WEB TECHNOLOGY
A website is a set of related web pages that are addressed with a common domain name or
IP address. A website is hosted on a machine called web server, which should be accessible via a
network.
The web pages of a web site are accessed using URLs (Uniform Resource Locator). The
web pages are organized into a hierarchy. They contain hyperlinks that guide the visitors navigating
the website.
2. What is protocol?
Proxy servers are related to firewalls prevents hosts on a network from making direct
connections to the outside world; a proxy server can act as a go-between. Thus a machine that is
prevented from connecting to the external network by a firewall would make a request for a web
page from the local proxy server instead of requesting the web page directly from the remote web
server.
72
HTML documents are described by HTML tags.
Each HTML tag describes different document content.
7. What is a Servlet?
Java Servlets are server side components that provides a powerful mechanism for
developing server side of web application. Earlier CGI was developed to provide server side
capabilities to the web applications. In CGI played a major role in the explosion of the Internet, its
performance, scalability and reusability issues make it less than optimal solutions.
73
9. Define JSP?
Java Server Pages (JSP) is a Java technology that allows software developers to dynamically
generate HTML, XML or other types of documents in response to a Web client request. The
technology allows Java code and certain pre-defined actions to be embedded into static content.
J2EE is the Java-centric enterprise platform specification. J2EE is used to built web sites and
application around Enterprise Java Bean (EJB). Recently it has been extended to include support for
XML and Web Services.
A session is basically a conversation between a browser and a server. All the above
technologies can save information for the current session for a particular user visiting a site. The
session is important, as HTTP is a stateless protocol. This means that the connection between web
server and a web browser is not automatically maintained, and that the state of a web session is not
saved.
A cookie is a small amount of information sent by the web server which is stored on a user
system for lateral retrieval. The major use of cookies is to store user identification details such as
name and password.
The purpose of a DTD(Document Type Definition) is to define the legal building blocks of
an XML document.
A DTD defines the document structure with a list of legal elements and attributes.
It is useful standard for validating the xml document.
These standards are useful to creating a quality xml document.
75
XSLT uses XPath to navigate in XML documents
A search tool that allows a user to enter queries. The program responds with a list of
matches from its database. A relevancy score for each match and click able URL is usually returned.
Scalable Vector Graphics (SVG) is an XML-based vector image format for two-
dimensional graphics with support for interactivity and animation. SVG images and their behaviors
are defined in XML text files. This means that they can be searched, indexed, scripted, and
compressed. As XML files, SVG images can be created and edited with any text editor, but are
more often created with drawing software.
Programs called Spiders; robots etc. collect pages of the Web for indexing.
Start processing with a certain number of starting point URLs and follow other links.
Visited pages or portions of pages are saved for analysis.
The multimedia revolution occurred first on the desktop computer, with the widespread
76
availability of CD-ROMs. This platform is rapidly evolving towards DVD technology, but our
focus in this chapter is on the explosion of sound and video technology that appears on the World
Wide Web.
78
ENTERPRISE SOLUTIONS
1. Define ERP.
The ERP system is a set of software applications that organize, define and standardize the
business processes necessary to effectively plan and control an organization, integrated business
applications, or modules which carry out common business functions such as general ledger,
accounting, or order management.
Enterprise resource planning (ERP) is the planning of how business resources (materials,
employees, customers etc.) are acquired and moved from one state to another.
An ERP system is based on a common database and a modular software design.
The common database can allow every department of a business to store and retrieve
information in real-time.
The information should be reliable, accessible, and easily shared.
1. Financial Management
2. Business Intelligence
3. Supply Chain Management
4. Human Resource Management
5. Manufacturing Operations
6. Integration.
4. Define SAP.
SAP ensures efficient and synchronous communication among different business modules,
such as sales and distribution, production planning, and material management, within an
organization.
These modules communicate with each other so that any change made in one module is
communicated instantly to the. other modules, thereby ensuring effective transfer of
information.
79
5. SAP R/2
The SAP R/2 system was introduced in 1980. SAP R/2 was a packaged software application
on a mainframe computer, which used the time-sharing feature to integrate the functions or business
areas of an enterprise, such as accounting, manufacturing processes, supply chain logistics, and
human resources.
6. SAP R/3
SAP R/3, based on a client-server model, was officially launched on July 6, 1992.
This version is compatible with multiple platforms and operating systems, such as UNIX
and Microsoft Windows.
ABAP is one of the first programming languages to include the concept of logical databases,
which provides a high level of abstraction from the centralized database of the SAP system.
Apart from the concept of logical databases, you can also use Structured Query Language
(SQL)statements to retrieve and manipulate data from the centralized database.
80
9. Data sharing
Enables you to store data in memory at a central location. Different users and programs can
then access the data without copying it.
Helps define a special control flow for a specific error situation and provide information
about the error.
Enables you to store data permanently in relational database tables of the SAP R/3 system.
Enables you to enhance the functionality of programs, function modules, and global classes,
without modifying or replacing the existing code.
The DATA file system contains the data (.dbf) files of the Oracle database.
Rapid Install installs the system, data, and index files in directories below several mount
points on the database server.
You can specify the directory names of the mount points on the database server during
installation.
81
15. ORACLE EDI GATEWAY
Oracle Applications provides users with the ability to conduct business electronically
between trading(deal-buy and sell) partners based on the Electronic Commerce standards
and methodology. One form of Electronic Commerce is Electronic Data Interchange (EDI).
EDI is an electronic exchange of information between trading partners.
Data files are exchanged in a standard format to minimize manual effort, speed data
processing, and ensure accuracy
Enterprise Resource Planning (ERP) covers the techniques and concepts employed for the
integrated management of businesses as a whole, from the viewpoint of the effective of
management resources, to improve the efficiency of an enterprise.
An enterprise is a group of people with a common goal, which has certain resources at its
disposal to achieve that goal.
ERP packages are integrated (covering all business functions) software packages that
support the ERP concepts. ERP software is designed to model and automate many of the basic
processes of a company, from finance to the shop floor, with the goal of integrating information
across the company and eliminating complex, expensive links between computer systems that were
never meant to each other.
SAP AG, PeopleSoft, Oracle, Baan, JD Edwards, QAD, Ramco, IFS, DataWorks etc.
82
21. When do the ERP system’s set of generic processes produce dramatic improvements?
ERP software is a mirror image of the major business processes of an organization, such as
customer order fulfillment and manufacturing. Its success depends upon reach – a circumscribed
ERP system isn‘t much better than the legacy system it replaces. ERP system‘s set of generic
processes produce the dramatic improvements they are capable of, only when used to connect parts
of an organization and integrate its various processes seamlessly.
22. What are the reasons for the explosive growth of the ERP market?
Business Integration
Flexibility
Better analysis and planning capabilities
Use of latest technology
Different languages, accounting standards can be covered in one system, and functions that
comprehensively manage multiple locations of a company can be packaged and can be
implemented automatically.
Cycle time is the time between receipt of the order and delivery of the product.
83
26. What is Business Integration and how do the ERP systems achieve it?
The reason why ERP packages are referred as being integrated is the automatic data
updation (automatic data exchange among applications) that takes place between related business
components.
27. What are the factors that are critical for the success of the ERP implementation?
First, ERP packages cannot have only individual business functions such as accounts and
inventory, but also the entire range of main business functions necessary for the company‘s
operations
Second, ERP packages are targeted at everything from small businesses to the largest
organizations, and that they can be composed of a highly flexible decentralized database and
an information system cluster linked by a network
Third, is global adaptation, represented by ERP packages’ multilingual and multi- currency
capacity.
Managers cannot generate custom reports or queries without help from a programmer and
this inhibits then from obtaining information quickly, so that they can act on it for
competitive advantage
ERP systems provide current status only, such as open orders. Managers often need to look
84
past the current status, to find trends and patterns that aid better decision-making.
The data in the ERP application is not integrated with other enterprise or division
systems and does not include external intelligence.
85
ARTIFICIAL INTELLIGENCE
The theory and development of computer systems able to perform tasks normally requiring
human intelligence, such as visual perception, speech recognition, decision-making, and translation
between languages.
Uninformed or blind search strategies use only the information available in the problem definition.
Strategies that know whether one non-goal state is ―more promising‖ than another are called informed
search or heuristic search strategies.
An agent is anything that can be viewed as perceiving its environment through sensors and acting
upon that environment through actuators. E.g.: vacuum cleaner.
86
Goal-based agents
Utility-based agents
If there are a limited number of distinct, clearly defined percepts and actions we say that
the environment is discrete. Chess is discrete—there are a fixed number of possible moves on each
turn. Taxi driving is continuous—the speed and location of the taxi and the other vehicles sweep
through a range of continuous values.
1. The syntax
2. The semantics
8. What is Unification?
Unification: The job of the unification routine, UNIFY, is to take two atomic sentences p
and q and return a substitution that would make p and q look the same. (If there is no such
substitution, then UNIFY should return fail.) Formally,
UNIFY (p,q) = 6 where SuBST (p) = SuBST(q) is called the unifier of the two sentences.
,
In logic and proof theory, natural deduction is a kind of proof calculus in which logical
reasoning is expressed by inference rules closely related to the "natural" way of reasoning. This
contrasts with the axiomatic systems which instead use axioms as much as possible to express the
logical laws of deductive reasoning.
Lexical part
87
Structural part
Procedural part
Semantic part
Start with the sentences in the knowledge base and generate new conclusions that in
turn can allow more inferences to be made. This is called forward chaining. Forward chaining is
usually used when a new fact is added to the database and we want to generate its consequences.
Start with something we want to prove, find implication sentences that would allow us to
conclude it, and then attempt to establish their premises in turn. This is called backward chaining,
because it uses Modus Ponens backwards. Backward chaining is normally used when there is a goal
to be proved.
Bayesian network is used to represent the dependencies among variables and to give a
concise specification of any full joint probability distribution.
Non – monotonic reasoning is one in which axioms and / or rules of inference are extended
to make it possible to reason with incomplete information. These systems preserve the property that
at any given moment, a statement is either believed to be true, believed to be false, or not believed
to be either.
ATMS
An ATMS simply labels all the states that has been considered at the same time.
An ATMS keeps track for each sentence of which assumptions would cause the sentence to
be true.
88
JTMS:
JTMS simply labels each sentence of being in and out.
The maintenance of justifications allows us to move quickly from one state to another by
making a few retractions and assertions, but only one state is represented at a time.
Fuzzy logic is a form of many-valued logic in which the truth values of variables may be
any real number between 0 and 1, considered to be "fuzzy".
By contrast, in Boolean logic, the truth values of variables may only be 0 or 1, often
called "crisp" values.
89
18. Write about Dempster.
A fully instantiated plan is formally defined as a data structure consisting of the following4
components
A set of plan steps
A set of step monitoring constraints
A set of variable binding constraints
A set of casual links
Conditional planning
i. Supervised learning
ii. Unsupervised learning
iii. Reinforcement learning
90
23. How could you differentiate normal and decision tree?
Decision Tree is a flow-chart with only if then else statements, drawn using insights from
data.The process of making a decision tree involves extracting out if- else divisions (and
their order) greedily such that the total entropy(or some other measure) of the leaves is
lesser than the root.
Whereas Normal Tree nodes have many useful properties. The depth of a node is the length
of the path (or the number of edges) from the root to that node. The height of a node is the
longest path from that node to its leaves. ... Binary: Each node has zero, one, or two
children.
Inductive learning is a kind of learning in which, given a set of examples an agent tries to
estimate or create an evaluation function. Most inductive learning is supervised learning, in which
examples provided with classifications. (The alternative is clustering.)
More formally, an example is a pair (x, f(x)), where x is the input and f(x) is the output of the
function applied to x. The task of pure inductive inference (or induction) is, given a set of examples of f, to
find a hypothesis h that approximates f.
An expert system is a computer program that simulates the thought process of a human
expert to solve complex decision problems in a specific domain.
SSAn expert system is an interactive computer-based decision tool that uses both facts and
heuristics to solve difficult decision problems based on knowledge acquired from an expert.
91
27. What is robotics?
Given a game tree, the optimal strategy can be determined by examining the minimax value
of each node, which we write as MINIMAX-VALUE (n). The minimax value of a node is the utility
of being in the corresponding state, assuming that both players play optimally from there to the end
of the game.
A rule-based, expert system maintains a separation between its Knowledge-base and that
part of the system that executes rules, often referred to as the expert system shell. The system shell
is indifferent to the rules it executes.
92
PLATFORM TECHNOLOGY
CLR is the .NET runtime environment responsible for program execution management
and for providing container services—debugging, exception management, memory management,
profiling, and security. The CLR is a major subsystem in the .NET Framework which
implementsthe Common Type System. Also this is called as Virtual Execution System (VES).
Code that is executed by the Common Language Runtime (CLR) is called managed code.
Managed code provides metadata to enable the CLR to handle exceptions, locate methods encoded
in assembly modules, and manage security information. Managed code can access both managed
data and unmanaged data.
It is, also called unsafe code, code that executes outside of the control of the Common
Language Runtime (CLR). Unmanaged code may perform unsafe operations such as pointer
arithmetic. Unmanaged code is used for accessing unmanaged memory, calling Windows APIs,
interfacing to COM components, and coding performance‐critical methods which avoid the
overhead of the CLR.
a) Documentation Section
b) Using Directive Section
c) Interfaces Section
d) Classes Section
e) Main Method Section
a) Keywords
b) Identifiers
c) Literals
d) Operators
e) Punctuators
Keywords are an essential part of a language definition. They implement specific features of
the language. They are reserved, and cannot be used as identifiers except when they are prefaced by
94
the @ character. There are 79 keywords in C#. Ex: public, private, if, while etc..
Arithmetic operators
Relational operators
Logical operators
Assignment operators
Increment and decrement operators
Conditional operators
Bitwise operators
Special operators
An interface can contain one or more methods, properties, indexers, and events but
none of them are implemented in the interface itself. It is the responsibility of the class that
implements the interface to define the code for implementation of these members.
Syntax:
interface InterfaceName
{
Member declarations;
}
This is used in conjunction with Microsoft .NET platform and is a successor to visual basic
sixth version. Visual basic is used in conjunction with.NET Framework. This tool has a serious
95
defect it is not compatible with Microsoft visual basic sixth version. It has a huge library which
assists programmers.
A class is simply an abstract model used to define new data types. A class may contain any
combination of encapsulated data (fields or member variables), operations that can be performed on
the data (methods) and accessors to data (properties).
Namespace Animals
End Function
End Class
End Namespace
VB.Net uses the Inherits keyword to indicate inheritance. Suppose we have a class named
Student with the following fields; mRegistrationNumber, mName and mDateOfBirth along with the
corresponding properties. The class also has a function called GetAge() which calculates and
returns the age of a Student.
Operator overloading is the ability for you to define procedures for a set of operators on a
given type. This allows you to write more intuitive and more readable code.
96
17. Write about FOR NEXT Loop
The FOR NEXT Loop , execute the loop body (the source code within For Next code
block) to a fixed number of times.
A Method is a procedure built into the class. They are a series of statements that are
executed when called. Methods allow us to handle code in a simple and organized fashion. There
are two types of methods in VB .NET: those that return a value (Functions) and those that do not
return a value (Sub Procedures).
An event is a message sent by an object to signal the occurrence of an action. The action
could be caused by user interaction, such as a mouse click, or it could be triggered by some other
program logic. The object that raises the event is called the event sender. The object that captures
the event and responds to it is called the event receiver.
A delegate is a class that can hold a reference to a method. Unlike other classes, a
delegate class has a signature, and it can hold references only to methods that match its signature. A
delegate is thus equivalent to a type-safe function pointer or a callback.
ADO.NET is a set of classes that expose data access services to the .NET programmer.
ADO.NET provides a rich set of components for creating distributed, data-sharing applications. It
is an integral part of the .NET Framework, providing access to relational data, XML, and
97
application data. ADO.NET supports a variety of development needs, including the creation of
front-end database clients and middle-tier business objects used by applications, tools, languages, or
Internet browsers.
J2EE is an environment for developing and deploying enterprise applications. The J2EE
platform consists of a set of services, application programming interfaces (APIs), and protocols that
provide the functionality for developing multitiered, web-based applications.
98
Client tier: In the client tier, Web components, such as Servlets and JavaServer Pages
(JSPs), or standalone Java applications provide a dynamic interface to the middle tier.
Middle tier: In the server tier, or middle tier, enterprise beans and Web Services
encapsulate reusable, distributable business logic for the application. These server-tier
components are contained on a J2EE Application Server, which provides the platform for
these components to perform actions and store data.
Enterprise data tier: In the data tier, the enterprise's data is stored and persisted, typically
ina relational database.
Containers are the interface between a component and the low-level platform specific
functionality that supports the component. Before a Web, enterprise bean, or application client
component can be executed, it must be assembled into a J2EE application and deployed into its
container.
Applets
Application clients
Java Web Start-enabled rich clients, powered by Java Web Start technology.
Wireless clients, based on Mobile Information Device Profile (MIDP) technology.
Client machines
The J2EE server machine
The database or legacy machines at the back end
99
29. Explain diagrammatically the J2EE Server and Containers?
30. What are the best practices to be carried out in development phase?
100