Sunteți pe pagina 1din 8

PAPER-VII

ALGORITHMS

What is time and space complexity?

Ans:- Time complexity a function which describes the amount of time an algorithm takes in terms of the amount of
i/p to the algorithm.

Space complexity a function which describes the amount of memory (space) an algorithm takes in terms of the
amount of input to the algorithm.

Dijkstra's Algorithm:-The time required by Dijkstra's algorithm is O(|V| 2). It will be reduced to O(|E|log|V|) if heap
is used to keep {v in V\Si : L(v) < infinity}.

Prim's Algorithm:-The time required by Prim's algorithm is O(|V| 2). It will be reduced to O(|E|log|V|) if heap is used
to keep {v in V\Si : L(v) < infinity}.

Kruskal algorithm:- The time required by Kruskal's algorithm is O(|E|log|V|).

Travelling Salesman Problem.:-It is a traditional issue that has to do with making the most efficient use of resources
while at the same time expending the least amount of energy in that utilization. The designation for this type of
problem hails back to the days of the travelingsalesman, who often wished to arrange travel in a manner that allowed
for visiting the most towns without having to double back and cross into any given town more than once.

Poission process:-It is a collection {N(t) : t ≥ 0} of random variables, where N(t) is the number of events that have
occurred up to time t (starting from time 0). The number of events between time a and time b is given as N(b) − N(a)
and has aPoisson distribution. Each realization of the process {N(t)} is a non-negative integer-valued step function
that is non-decreasing, but for intuitive purposes it is usually easier to think of it as a point pattern on [0,∞) (the points
in time where an event occurs). The Poisson process is a continuous-time process. A Poisson process is a pure-birth
process, the simplest example of a birth-death process.

Inclusion Principal:- The principle that, if A and B are finite sets, the number of elements in the union of A and B can
be obtained by adding the number of elements in A to the number of elements in B, and then subtracting from this sum
is the number of elements in the intersection of A and B.  

 
Propositional Satisfiability Problem:- A propositional satisfiability problem, briefly called SAT, consists of a
formula F 2 L(R), and is the problem to decide whether F is satisfiable.
I SAT is a combinatorial decision problem.
1. Decision variant yes/no answer .
2. Search variant find a model if F is satisfiable

BFS AND DFS

Breadth-first Search:-The general idea behind a breadth-first search beginning at a starting vertex A is as


follows. First we process the starting vertex A.Then we process all the neighbors of A.Then we process all
the neighbors of neighbors of AAnd so on. Naturally we need to keep track of the neighbors of a vertex, andwe need
toguarantee that no vertex is processed twice. This is accomplished by using a QUEUE to hold vertices that arc
waiting to he processed, and by a field STATUS which tells us the current status of a vertex.The algorithm follows.
 
Algorithm (Breadth-first Search):
This algorithm executes a breadth-first search on a graph G beginning with a starling vertex A
 
Step 1.  Initialize all vertices to the ready state (STATUS = 1)
 
Step 2.  Put the starting vertex A in QUEUE and change the status of A to the waiting state (STATUS =2).
 
Step3.  Repeat Steps 4 and 5 until QUEUE is empty.
 
Step 4. Remove the front vertex No of QUEUE. Process N, and set STATUS (N) = 3, the processed state.
 
Step 5.  Examine each neighbor J of N
 
(a) If STATUS (J)= 1 (ready state), add J to the rear of QUEUE and reset
     STATUS (J) - 2 (waiting state).
 
(b) If STATUS (J) = 2 (waiting state) or STATUS (J) = 3 (processed state), ignore the vertex J.
     [End of Step 3 loop.]
 
Step 6. Exit.
 
Again, the above algorithm will process only those vertices which are connected to the starting vertex A.that is,
the connected component including A. Suppose one wants to process all the vertices in the graph G. Then the
algorithm must be modified so that it begins again with another vertex (which we callB) that is still in the ready state
(STATUS = 1). This vertex Bain be obtained by traversing through thelist of vertices.
 
EXAMPLE
Suppose the BFS Algorithm 8.1? B is applied to the graph in Fig. 8-28. The vertices are processed in the following
order:
 A,   D,   C,   B,    F,   E,   G, H
 Specifically, Figure (a)shows the sequence of waiting lists in QUEUE and the vertices being processedAgain,
each vertex, excluding A,comes from an adjacency list and hence correspond-; to an edge of thegraph. These
edges form a spanning tree of G which is pictured in Figure (b).
 
Again,the numbersindicate theorder the edges are added to the tree. Observe that this spanning tree is different
than the one in Figure (b) which came from a depth-first search
 
Depth-first Search:The general idea behind a depth-first search beginning at a starting vertex A is as fellows First we
process the starting vertex A. Then we process each vertex N along with a path P which begins at A;that is, we process
a neighbor of A, then a neighbor of a neighbor of A, and so on. After coming to a "dead end", that is, to a vertex with
no unprocessed neighbor, we backtrack on the path P until we can continue along another path P’. And so on. The
backtracking is accomplished by using a STACK to hold the initial vertices of future possible paths. We also need a
field STATUS which tells us the current status of any vertex so that no vertex is processed more than once. The
algorithm follows.
 
Algorithm 1.12A   (Depth-first Search): 
This algorithm executes a depth-first search on a graph G beginning with a starting vertex A.
 
Step 1.         Initialize all vertices to the ready state (STATUS = I)
  
Step 2.         Push the starting vertex A onto STACK and change the status of A to the waiting state (STATUS = 2). 
 
Step 3.         Repeat Steps 4 and 5 until STACK is empty.
 
Step 4.         Pop the top vertex N of STACK. Process N, and set STATUS (N) = 3; the processed state
 
Step 5.          Examine each neighbor J of N.
 
(a) If STATUS (J)= 1 (ready slate), push Jonto STACK and reset STATUS (J) = 2 (waiting state).
 
(b) If STATUS (J)= 2 (waiting state), delete the previous J from the STACK and push the current J onto STACK
 
(c) If STATUS (J)= 3 (processed state), ignore the vertex J.
     [End of Step 3 loop.]
 
Step 6. Exit.
 
The above algorithm will process only those vertices which are connected tothe starting vertex A, thatis. the connected
component including A. Suppose one wants to process all the vertices in the graph G.Then the algorithm must be
modified so that it begins again withanother vertex (which we call B) that isstill in the ready state (STATE - 1). This
vertex B can be obtained by traversing through the list of vertices.
  
EXAMPLE
Suppose the DFS Algorithm 1.12A isapplied to the graph in fig 1-28. The vertices are processed in the following
order:
  A, B, E, F, C, G, H, D 
Specifically, Fig. (a) shows thesequence of waiting lists in STACK and the vertices being processed. We have used
the slash to indicate that a vertex is deleted from the waiting list. Each vertex, excludingA, comes from an adjacency
list and hence corresponds to an edge of thegraph. Theseedges formaspanning tree of G which is pictured in Fig. (A).
The numbers indicate the order that the edges arcadded to the tree, and the dashed lines indicate backtracking.
 

SATELLITE COMMUNICATION
A Geosynchronous Earth Orbit (GEO):- This satellite has an orbital period that synchronizes with the Earth’s
speed of rotation. So, for an observer at a fixed location on Earth, a GEO satellite will always return to the same place
in the sky at exactly the same time each day.

It is also used in the Geo-Stationary Earth Orbit (GSO) satellite, it is a special type of GEO, in which the satellite is
placed in orbit directly above the Earth’s equator at a precise height, so that it maintains the same position relative to
the Earth’s surface.

Middle Earth Orbit (MEO):-This satellites have orbits ranging from a few hundred miles to a few thousand miles
above the earth's surface, with orbital periods ranging from around two to 12 hours. MEO is used mainly for satellite
navigation systems such as GPS, Galileo, Glonass and Beidu.

LOW EARTH ORBIT(LEO):-LEO systems fly about 500 to 1,500 kilometers above the Earth. A
typical LEO satellite takes less than two hours to orbit the Earth,
and are only visible for 15 to 20 minutes each pass.Low earth orbiting satellites are less expensive to launch into orbit
as distance from the earth is less, don't require as high signal strength and give less time delay.

Meaning of DPCM – “Differential Pulse Code Modulation- It is a modulation technique invented by the British
Alec Reeves in 1937. It is a digital representation of an analog signal where the magnitude of the signal is sampled
regularly at uniform intervals. Every sample is quantized to a series of symbols in a digital code, which is usually a
binary code. PCM is used in digital telephone systems. It is also the standard form for digital audio in computers and
various compact disc formats. DPCM allows this to be achieved by describing only the changes between the samples.

ADVANTAGES AND DISADVANTAGES OF OSI MODEL

Advantages:-1) It provides a standard to design networking devices by different vendors.

2) The protocols in OSI are much hidden than TCP/IP and can be replaced relatively easily as the technology changes.

3) OSI supports both connectionless and connection-oriented communication in the network layer

Disadvantages:-1) Due to the complexity of the system poor performance is obtained, especially in some real time
applications.

2) Direct substitution of layers is not always possible e.g. if a LAN with broadcast capability is inserted below a
network protocol that did not support this facility, then this service would be lost to the upper layers.

3) Although protecting equipment from becoming obsolete it simultaneously hinders technological advancement.

DATA TRANSMISSION

The transmission mode refers to the number of elementary units of information (bits) that can be simultaneously
translated by the communications channel

PARALLEL CONNECTION:- Parallel connection means simultaneous transmission


of N bits. These bits are sent simultaneously overN different channels.

SERIAL CONNECTION: -In a serial connection, the data are sent one bit at a time over
the transmission channel. However, since most processors process data in parallel, the
transmitter needs to transform incoming parallel data into serial data and the receiver needs to
do the opposite.

Asynchronous data transmission mode:- In this mode, each character is sent at irregular intervals in time. So, for
example, imagine that a single bit is transmitted during a long period of silence... the receiver will not be able to know
if this is 00010000,10000000,00000100… . To remedy this problem, each character is preceded by some information
indicating the start of character transmission (the transmission start information is called a START bit) and ends by
sending end-of-transmission information (called STOP bit, there may even be several STOP bits).

ADVANTAGES: - 1) It is faster means of connecting 2) It is Simple. 3) Doesn't require synchronization of both


communication sides. 4) H/W cost is very cheap.

DISADVANTAGES:-1) It is less reliable 2) Large relative overhead. 3)  a high proportion of the transmitted bits are
uniquely for control purposes and thus carry no useful information.

Synchronous data transmission mode:-In this mode, the transmitter and receiver are paced by the same clock. The
receiver continuously receives (even when no bits are transmitted) the information at the same rate the transmitter
send it. This is why the transmitter and receiver are paced at the same speed

ADVANTAGES:- 1) supplementary information is inserted to guarantee that there are no errors during transmission.

2)  It is highly efficient. 3) Lower overhead and thus, greater throughput 4) It is more reliable. 

5) It is possible to have both sides try to synchronize the connection at the same time.

DISDVANTAGES:- 1)The main disadvantage of synchronous transmission is recognising the data at the receiver.

2)It is slower than asynchronous transmission mode. 3) Hardware is more expensive 4) Slightly more complex.

ALOHA

ALOHA is a medium access protocol that was originally designed for ground based radio broadcasting however it is
applicable to any system in which uncoordinated users are competing for the use of a shared channel.  Pure ALOHA
and slotted ALOHA are the two versions of ALOHA.

Pure ALOHA:- Pure ALOHA uses a very simple idea that is to let users transmit whenever they have data to send.
Pure ALOHA is featured with the feedback property that enables it to listen to the channel and finds out whether the
frame was destroyed. Feedback is immediate in LANs but there is a delay of 270 milli sec in the satellite transmission.
It requires acknowledgment if listening to the channel is not possible due to some reason. It can provide a channel
utilization of 18 percent that is not appealing but it gives the advantage of transmitting any time.

SLOTTED ALOHA:- It divides time into discrete intervals and each interval corresponds to a frame of data. It
requires users to agree on slot boundaries. It does not allow a system to transmit any time. Instead the system has to
wait for the beginning if the next slot

Differnce b/w narrowband and broadband communication channel:- Narrowband is associated with dial up
accounts with your ISP usually up to speeds of 54kps but can be faster if you use ISDN connections.

Broadband on the other hand is faster connections up to 8mb ps and is always online ie connected to the Internet even
when your PC is switched off
PAPER –IX

OPERATING SYSTEM

Internal fragmentation:- It occurs when storage is allocated without intention to use it. This space is wasted.
While this seems foolish, it is often accepted in return for increased efficiency or simplicity. The term "internal"
refers to the fact that the unusable storage is inside the allocated region but is not being used. It is difficult to
reclaim; usually the best way to remove it is with a design change.

External fragmentation:- It is the phenomenon in which free storage becomes divided into many small pieces
over time. It is a weakness of certain storage allocation algorithms, occurring when an application allocates and
deallocates regions of storage of varying sizes, the allocation algorithm responds by leaving the allocated and
deallocated regions interspersed.. The term "external" refers to the fact that the unusable storage is outside the
allocated regions.

Effects:-1)The most common side effect of fragmentation is slowdown. Fragmentation causes slowdown. 2) A
rather more serious side effect is what file fragmentation is. File fragmentation is a direct result of external
fragmentation,occurs during the process of data removal and expansion, another program. 3) Another effect of
fragmentation is the program to malfunction, i.e function slowly or do not function at all.

Solution:- The only viable solution to fragmentation is defragmentation. Defragmentation runs a comprehensive
scan on the hard drive and all the files inside of it, and determines the optimal way to store your data. Although
defragmentation cannot solve internal fragmentation, it will completely solve external fragmentation.

 Defragmentation is a process that reduces the amount of fragmentation in file systems. It does this by physically
organizing the contents of themass storage device to store files in a contiguous region if possible, or in the smallest
possible number of regions (fragments) if not. It also attempts to create larger regions of free space using
compaction to impede the return of fragmentation.

Q) Why paging is used?

Ans:- Paging is used for faster access to data. When a program needs a page, it is available in the main memory
as the OS copies a certain number of pages from your storage device to main memory. Paging allows the
physical address space of a process to be noncontiguous.

Advantages of Paging:-1) Easy to allocate physical memory 2) Easy to allocate a frame, just remove it from its
free list 3) complication for kernel contiguous physical memory allocation 4) Easy to “page out” chunks of
programs

Disadvantages of paging:- 1) Wastage of memory space.  2) Memory reference overhead 3) Memory required
to hold page tables that can be large

Complete Cocomo Model:- The main shortcoming of basic and intermediate COCOMO model is that they consider
a software product as a single homogeneous entity. The system is made up of sub-systems which have their own
characteristics. Sub-systems may have different inherent development complexity, reliability requirements may be
high, development team experience.
The complete COCOMO model considers these differences in characteristics of the subsystems and estimates the
effort and development time as the sum of the estimates for the individual subsystems.

Q) What do you mean by S/W quality assurance?


Ans:- Software Quality Assurance involves the entire software development PROCESS - monitoring and improving
the process, making sure that any agreed-upon standards and procedures are followed, and ensuring that problems are
found and dealt with. It is oriented to 'prevention'.
TESTING

I) Bottom-up Testing Strategy


1) The subsystem in the lowest layer of the call hierarchy are tested individually 2) Then the next subsystems are
tested that call the previously tested subsystems 3)This is done repeatedly until all subsystems are included in the
testing Special program needed to do the testing,

II) Top-down Testing Strategy

1) Test the top layer or the controlling subsystem first 2) Then combine all the subsystems that are called by the
tested subsystems and test the resulting collection of subsystems 3) Do this until all subsystems are marked into the
test 4) Special program is needed to do the testing,

Test stub : A program or a method that simulates the activity of a missing subsystem by answering to the calling
sequence of the calling subsystem and returning back fake data.

III) Sandwich Testing Strategy

1) It Combines top-down strategy with bottom-up strategy 2) The system is view as having three layers A target layer
in the middle 3) A layer above the target 4) A layer below the target 5) Testing converges at the target layer

IV) Modified Sandwich Testing Strategy

1) Middle layer with drivers and stubs 2) Top layer with stubs 3) Bottom layer with drivers 4) Top layer accessing
middle layer (top layer replaces drivers) 5) Bottom accessed by middle layer
V) Big-Bang Strategy:-
Big-Bang approach is very simple in its philosophy where basically all the modules or builds are constructed and
tested independently of each other and when they are finished, they are all put together at the same time.  
Advantage of this approach is that it is very quick as no drivers or stubs are needed, thus cutting down on the
development time.
Disadvantage:- 1) the least effective. 2) it is very demanding on the resources 3) There is really nothing to
demonstrate until all the modules have been built and integrated.

Cpu Scheduling( round robin)

Process CPU Remainder Remainder


Burst CPU time CPU time
  Quantum = Q =  4
P1 20 16 12
P2 5 1 0
P3 6 2 0

Average waiting time: Waiting Time = (Final Start Time - Previous Time in CPU - Arrival Time)
P1 P2 P3 P1 P2 P3 P1
[(19-8-
0                   8 12 16 17 19 31
4

0)+(16-4)+(17-4)]/3=(11+12+13)/3=12 
Every one gets about the same amount of waiting time.
S/W ENG.

SSADM:- SSADM (Structured Systems Analysis & Design Method) is a widely-used computer application
development method in the UK, where its use is often specified as a requirement for government computing projects.
It is increasingly being adopted by the public sector in Europe.

SSADM's objectives are to:

 Improve project management & control


 Make more effective use of experienced and inexperienced developmentstaff
 Develop better quality systems
 Make projects resilient to the loss of staff
 Enable projects to be supported by computer-based tools such as computer-aided software engineering
systems
 Establish a framework for good communications between participants in a project

SSADM STEPS:-
SSADM sets out a cascade or waterfall view of systems development, in which there are a series of steps, each of
which leads to the next step,
SSADM's steps, or stages, are:
 Feasibility
 Investigation of the current environment
 Business systems options
 Definition of requirements
 Technical system options
 Logical design
 Physical design

S-ar putea să vă placă și