Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Some Important Ques

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Some Important Questions

Define RDBMS.

Answer: Relational Database Management System(RDBMS) is based on a relational model of data


that is stored in databases in separate tables and they are related to the use of a common column. Data
can be accessed easily from the relational database using Structured Query Language (SQL).

Enlist the advantages of DBMS.

Answer: The advantages of DBMS includes:

 Data is stored in a structured way and hence redundancy is controlled.


 Validates the data entered and provide restrictions on unauthorized access to the database.
 Provides backup and recovery of the data when required.
 It provides multiple user interfaces.

What is a view? How it is related to data independence?


 A view may be thought of as a virtual table, that is, a table that does not really exist in its own
right but is instead derived from one or more underlying base table. In other words, there is no
stored file that direct represents the view instead a definition of view is stored in data dictionary.
 Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users
from the effects of restructuring and growth in the database. Hence accounts for logical data
independence.

What is Data Model?


 A collection of conceptual tools for describing data, data relationships data semantics and
constraints.
What is Object Oriented model?
 This model is based on collection of objects. An object contains values stored in instance variables
with in the object. An object also contains bodies of code that operate on the object. These bodies
of code are called methods. Objects that contain the same types of values and the same methods
are grouped together into classes.
What is an Entity?
 It is a 'thing' in the real world with an independent existence.
What is an Entity type?
 It is a collection (set) of entities that have the same attributes.
What is an Entity set?
 It is a collection of all entities of particular entity type in the database.

How many SQL statements are used? Define them.

Answer: SQL statements are basically divided into three categories, DDL, DML, and DCL.

They can be defined as:

 Data Definition Language (DDL) commands are used to define the structure that holds the
data. These commands are auto-committed i.e. changes done by the DDL commands on the
database are saved permanently.
 Data Manipulation Language (DML) commands are used to manipulate the data of the
database. These commands are not auto-committed and can be rolled back.
 Data Control Language (DCL) commands are used to control the visibility of the data in the
database like revoke access permission for using data in the database.

What is Weak Entity set?


 An entity set may not have sufficient attributes to form a primary key, and its primary key
compromises of its partial key and primary key of its parent entity, then it is said to be Weak
Entity set.

What is Relationship?
 It is an association among two or more entities.

Explain Normalization and De-Normalization.

Normalization is the process of removing redundant data from the database by splitting the table in a
well-defined manner in order to maintain data integrity. This process saves much of the storage space.

De-normalization is the process of adding up redundant data on the table in order to speed up the
complex queries and thus achieve better performance.

What is Functional Dependency?


 A Functional dependency is denoted by X Y between two sets of attributes X and Y that are
subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The
constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This
means the value of X component of a tuple uniquely determines the value of component Y.

 The attributes of a table is said to be dependent on each other when an attribute of a table uniquely
identifies another attribute of the same table.For example: Suppose we have a student table with
attributes: Stu_Id, Stu_Name, Stu_Age. Here Stu_Id attribute uniquely identifies the Stu_Name
attribute of student table because if we know the student id we can tell the student name associated
with it. This is known as functional dependency and can be written as Stu_Id->Stu_Name or in
words we can say Stu_Name is functionally dependent on Stu_Id.

 Formally: If column A of a table uniquely identifies the column B of same table then it can
represented as A->B (Attribute B is functionally dependent on attribute A)

What is BCNF (Boyce-Codd Normal Form)?


 A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every
FD X A, X must be a candidate key.
What are partial, alternate,, artificial, compound and natural key?
1. Partial Key: It is a set of attributes that can uniquely identify weak entities and that are related to
same owner entity. It is sometime called as Discriminator.
2. Alternate Key: All Candidate Keys excluding the Primary Key are known as Alternate Keys.
3. Artificial Key: If no obvious key, either stand alone or compound is available, then the last
resort is to simply create a key, by assigning a unique number to each record or occurrence.
Then this is known as developing an artificial key.
4. Compound Key: If no single data element uniquely identifies occurrences within a construct,
then combining multiple elements to create a unique identifier for the construct is known as
creating a compound key.
5. Natural Key: When one of the data elements stored within a construct is utilized as the primary
key, and then it is called the natural key.

What is indexing and what are the different kinds of indexing?


 Indexing is a technique for determining how quickly specific data can be found.
 Types:
 Binary search style indexing
 B-Tree indexing
 Inverted list indexing
 Memory resident table
 Table indexing

What is meant by query optimization?


 The phase that identifies an efficient execution plan for evaluating a query that has the least
estimated cost is referred to as query optimization.

What is durability in DBMS?


 Once the DBMS informs the user that a transaction has successfully completed, its effects should
persist even if the system crashes before all its changes are reflected on disk. This property is
called durability.

What are the different phases of transaction?


 Different phases are
1.) Analysis phase,
2.) Redo Phase,
3.) Undo phase.

What are the ways in which an Oracle database can be created?


 There are three (3) ways to create an Oracle database. You can create a database using the
Database Configuration Assistant, using the Oracle-supplied database creation procedures or
using the SQL CREATE DATABASE command.

Some M.C.Q Questions:


 BIOS is a – Software
 The IP Address 125.111.5.4 belongs to which of the following class – Class B
 A CD-ROM drive is labeled with 52X. Here52X is a measurement of –Data Transfer Rate
 Data transfer rate of a Dial-up Modem is measured in – Kbps
 The most distinctive difference between in LAN and a WAN is – Distance Covered
 Which of the following components (Hard Disk, Compact disk, Magnetic Tape, RAM) has the
highest failure risk? – RAM
 Which kind of mathematics does the computer use in operations? – Binary
 The command ‘Shift + Delete’ will send the file to the? – this command will delete the file
permanently
 The ‘add or remove programs’ utility can be found in – Control Panel
 One Megabyte is equal to – 106 bytes
 Which menu includes the command ‘find’ ? – Edit
 The base 16 number system is – Hexadecimal
 What kind of secondary storage is provided by magnetic disks? – Slow Speed, High Capacity
 Valid Ending for a MS-Word File is – .doc
 The computer stores its program and data in its – Memory
 HTML indicates – Hyper Text Markup Language
 HTTP stands for – Hyper Text Transfer Protocol
 SMTP stands for – Simple Mail Transfer Protocol

List the Coffman's conditions that lead to a deadlock.


1. Mutual Exclusion: Only one process may use a critical resource at a time.
2. Hold & Wait: A process may be allocated some resources while waiting for others.
3. No Pre-emption: No resource can be forcible removed from a process holding it.
4. Circular Wait: A closed chain of processes exist such that each process holds at least one
resource needed by another process in the chain.

What is short, long and medium-term scheduling?


1. Long term scheduler determines which programs are admitted to the system for processing. It
controls the degree of multiprogramming. Once admitted, a job becomes a process.
2. Medium term scheduling is part of the swapping function. This relates to processes that are in a
blocked or suspended state. They are swapped out of real-memory until they are ready to execute.
The swapping-in decision is based on memory-management criteria.
3. Short term scheduler, also know as a dispatcher executes most frequently, and makes the finest-
grained decision of which process should execute next. This scheduler is invoked whenever an
event occurs. It may lead to interruption of one process by preemption.

What are turnaround time and response time?


 Turnaround time is the interval between the submission of a job and its completion. Response
time is the interval between submission of a request, and the first response to that request.

When is a system in safe state?


 The set of dispatchable processes is in a safe state if there exists at least one temporal order in
which all processes can be run to completion without resulting in a deadlock.

In the context of memory management, what are placement and replacement algorithms?
 Placement algorithms determine where in available real-memory to load a program. Common
methods are first-fit, next-fit, best-fit. Replacement algorithms are used when memory is full, and
one process (or part of a process) needs to be swapped out to accommodate a new program. The
replacement algorithm determines which are the partitions to be swapped out.

What are the sub-components of I/O manager in Windows NT?


 Network redirector/ Server
 Cache manager.
 File systems
 Network driver
 Device driver

Difference between Varchar and Varchar2


Varchar
 varchar can store upto 2000 bytes.
 varchar occupies space for the NULL values.
 varchar is an ANSI standard
Varchar2 :
 varchar2 can store upto 4000 bytes.
 varchar2 is not occupying space for the NULL values.
 varchar2 is an oracle standard.

Difference between trigger and store procedure


Trigger
Triggers provide a way of executing PL/SQL code on the occurrence of specific database events. For
example, you can maintain an audit log by setting triggers to fire when insert or update operations are
carried out on a table. The insert and update triggers add an entry to an audit table whenever the table
is altered.
The actions that Informix Dynamic Server triggers perform are constrained to multiple insert, update,
delete, and execute procedure clauses; whereas, Oracle allows triggers to execute arbitrary PL/SQL
code. Oracle triggers are similar to stored procedures in that they can contain declarative, execution,
and exception handling code blocks.
Stored procedure
Stored procedures provide a powerful way to code application logic that can be stored on the server.
Informix Dynamic Server and Oracle both use stored procedures. Oracle also uses an additional type
of subprogram called a function.
The language used to code stored procedures is a database-specific procedural extension of SQL. In
Oracle it is PL/SQL and in Informix Dynamic Server it is Informix Dynamic Server Stored Procedure
Language (SPL). These languages differ considerably. However, most of the individual SQL
statements and the procedural constructs, such as if-then-else, are similar in both languages.
Summery: A stored procedure is a user defined piece of code written in the local version of PL/SQL,
which may return a value (making it a function) that is invoked by calling it explicitly.
A trigger is a stored procedure that runs automatically when various events happen (eg update, insert,
delete).

Whar are the advantage of trigger


 Generating some derived column values automatically
 Enforcing referential integrity
 Event logging and storing information on table access
 Auditing
 Synchronous replication of tables
 Imposing security authorizations
 Preventing invalid transactions

How to create an index


CREATE INDEX index_name ON table_name(column1,column2,...);

Different between SQL and PL/SQL


 SQL is a Structured Query Language used to issue a single query or execute a single
insert/update/delete.
 PL-SQL is a programming language SQL, used to write full programs using variables,
loops,operators etc. to carry out multiple selects/inserts/updates/deletes.
 SQL is a data oriented language used to select and manipulate sets of data.
 PL/SQL is a procedural language used to create applications.
 SQL you can execute only one query at a time, where in PL/SQL you can execute an number of
queries in one block and get executed all there queues at one command .
 SQL is used to code queries, DML and DDL statements. PL/SQL is used to code program blocks,
triggers, functions, procedures and packages.
 We can embed SQL in a PL/SQL program, but we cannot embed PL/SQL within a SQL statement
.

SQL Query to find students taking more than one class


SELECT Student.sid
FROM Student S
INNER JOIN Class C ON S.sid = C.cid
GROUP BY S.sid,
HAVING COUNT(*) > 1

What is indexing in DBMS? Types of indexing?


Indexing is a data structure technique used to find data more quickly and efficiently in a table.
An index is a small table having only two columns. The first column contains a copy of the primary or
candidate key of a table and the second column contains a set of pointers holding the address of the
disk block where that particular key value can be found. The users cannot see the indexes, they are just
used to speed up searches/queries.
Indexes are of 3 types:
1. Primary indexes : In primary index, there is a one-to-one relationship between the entries in the
index table and the records in the main table. Primary index is defined on an ordered data file. The
data file is ordered on a key field. The key field is generally the primary key of the relation.
2. Secondary indexes : Secondary index may be generated from a field which is a candidate key and
has a unique value in every record, or a non-key with duplicate values .While creating the index,
generally the index table is kept in the primary memory (RAM) and the main table, because of its size
is kept in the secondary memory (Hard Disk).
3. Clustering indexes : Clustering index is defined on an ordered data file. The data file is ordered on a
non-key field e.g. if we are asked to create an index on a non-unique key, such as Dept-id. There could
be several employees in each department. Here we use a clustering index, where all employees
belonging to the same Dept-id are considered to be within a single cluster, and the index pointers point
to the cluster as a whole.
Summery: We know that data is stored in the form of records. Every record ord has
h a key field,
which helps it to be recognized
ized u
uniquely. Indexing is a data structure technique
nique to efficiently
retrieve records from the databas
tabase files based on some attributes on which thee indexing
inde has been
done

E-R diagram for online shopping


ping cart.

Week entity :
The entity sets which do not have
ave su
sufficient attributes to form a primary key are known
nown as weak entity
sets and the entity sets which have a primary key are known as strong entity sets.
As the weak entities do not have aany primary key, they cannot be identified on n their
thei own, so they
depend on some other entity ntity (known as owner entity). The weak entities entitie have total
participationconstraint (existence
nce de
dependency) in its identifying relationship with owner identity.
Weak entity types have partiall keys. Partial Keys are set of attributes with the help
p of which
w the tuples
of the weak entities can be distingui
tinguished and identified.
Weak entities are representedd with double rectangular box in the ER Diagram and the identifying
relationships are represented with ddouble diamond. Partial Key attributes are represent
resented with dotted
lines.

What all issues should be taken


ken ininto consideration during the database design ?
Semantics of Attributes : Thee relat
relation schema should be designed in such a way that iti should have a
clear meaning. Combining attributes
tributes from various entity types and relation types into a single relation
should be avoided.
Redundancy : Information should
hould bbe stored only once to minimize the wastage of storage
stor space else
the database size would keep on incincreasing. Redundancy might arise if two or more
ore relations
rel are kept
in a single Database Relation.
NULL values: Attributes which ich ha
have frequent NULL values should be avoided in base ba relations as
NULL values might cause following
lowing problems :
 Multiple interpretations mightight ccorrupt the semantics of relation
 The might cause issues in aggregate operations like SUM, COUNT, etc.
Non Additive join(lossless) property : While joining relations on the basis of the equality conditions
on attributes which might be either primary keys or foreign keys , it is guaranteed that no spurious
tuples would be generated.

How can redundancy be eliminated from a relation?


Redundancy can be eliminated by splitting the relation into two or more sub relations.
For example we have a table of students and their enrolled courses. This table has issues of
redundancy as there are duplicates of same data.
Figure : Database design Anomalies
The redundancy can be eliminated by splitting this relation into sub relations : student, course and a
table showing relationship between course and student :
Redundancy can be removed by using Normalization concept.
Normalization has types :
 1NF
 2NF
 3NF
 BCNF
 4NF ;etc
Difference between 64-bit and 32-bit OS
Generally there are 2 types of processors, 32-bit and 64-bit.
This actually tells us how much memory a processor can have access from a CPU register.
A 32-bit system can reach around 2^32 memory addresses, i.e 4 GB of RAM or physical memory.
A 64-bit system can reach around 2^64 memory addresses, i.e actually 18-Billion GB of RAM. In
short, any amount of memory greater than 4 GB can be easily handled by it.

 To install 64 bit version, you need a processor that supports 64 bit version of OS.
 If you have a large amount of RAM in your machine (like 4 GB or more), only then you can
really see the difference between working of 32-bit and 64-bit versions of Windows.
 64-bit can take care of large amounts of RAM or physical memory more effectively than 32-
bit.
 Using 64-bit can help you a lot in multi-tasking. you can easily switch between various
applications without any problems or your windows hanging.
 If you’re a gamer who only plays High graphical games like Modern Warfare, GTA V, or use
high-end softwares like Photoshop or CAD which takes a lot of memory, then you should go
for 64-bit Operating Systems. Since it makes multi-tasking with big softwares easy and
efficient for users.
You cannot change your OS from 32 bit to 64 bit because they're built on different architecture. You
need to re-install a 64 bit version of the OS. 32 bit is also known as x86 or x32. To download 64 bit
version look for x64.

Difference between Operating System and Kernel


Operating System is a software package that communicates between hardware and our installed
applications. It will be helpful to execute what we command to computer.
Kernel is a part of an OS, which is responsible to translate the given command into computer machine
language.
What is meant by 3.3GHz processor?
This means the CPU can execute 3.3e+9 instructions per second on each core.
CPU clock speed (measured in Hz, KHz, MHz, and GHz) is a handy way to tell the speed of a
processor.

Difference between Process and thread.


Process:
 Process is basically a program in execution. It is an active entity.
 Some operating systems use the term ‘task‘ to refer to a program that is being executed.
 A process is always stored in the main memory also termed as the primary memory or random
access memory.
 Therefore, a process is termed as an active entity. It disappears if the machine is rebooted.
 Several process may be associated with a same program.
 On a multiprocessor system, multiple processes can be executed in parallel.
 On a uni-processor system, though true parallelism is not achieved, a process scheduling
algorithm is applied and the processor is scheduled to execute each process one at a time
yielding an illusion of concurrency.
 Example: Executing multiple instances of the ‘Calculator’ program. Each of the instances are
termed as a process.
Thread:
 A thread is a subset of the process.
 It is termed as a ‘lightweight process’, since it is similar to a real process but executes within
the context of a process and shares the same resources allotted to the process by the kernel.
 Usually, a process has only one thread of control – one set of machine instructions executing
at a time.
 A process may also be made up of multiple threads of execution that execute instructions
concurrently.
 Multiple threads of control can exploit the true parallelism possible on multiprocessor
systems.
 On a uniprocessor system, a thread scheduling algorithm is applied and the processor is
scheduled to run each thread one at a time.
 All the threads running within a process share the same address space, file descriptors, stack
and other process related attributes.
 Since the threads of a process share the same memory, synchronizing the access to the shared
data within the process gains unprecedented importance.

What is Virtual Memory and Paging


 Paging: In case of paging technique, a process is devided into number of pages and similarly
main memory is devided into number of frames. And size of frames is equal to size of pages.
 For example, If i have a process of 100kb to execute then there must be 100 kb free space
contiguously in main memory. But if I am using paging technique and the size of frame is 10
kb then i need free space for 10 frames of 10 kb wherever it is available.
 Advantage By using paging we can avoid compaction.
 Virtual memory
 A computer can address more memory than the amount physically installed on the system.
This extra memory is actually called virtual memory and it is a section of a hard disk that's set
up to emulate the computer's RAM.
 The main visible advantage of this scheme is that programs can be larger than physical
memory. Virtual memory serves two purposes. First, it allows us to extend the use of physical
memory by using disk. Second, it allows us to have memory protection, because each virtual
address is translated to a physical address
 And by using both these concepts the multiprogramming functionality is performed well..
bcoz multiprograaming means more then one program at a time and the objective of paging
and virtually memory is to achieve this.

Name of OS scheduling Algorithms


 FCFS (First Come First Serve)
 SJF(Shortest Job First)
 Round Robin
 Priority
SRTFS can be implemented using min heap.

A disc drive has an average seek time of 10ms, 32 sectors on each track and 512 bytes per sector.
If the average time to read 8KBytes of continuously stored data is 20ms, what is the rotational
speed of the disc drive?
Rotational Speed: Reciprocal of time taken on an average to rotate to a particular data entry.
8192 bytes = 8192 / 512 sectors = 16 sectors
time to make half rotation (16 sectors) = 20 ms.
=> Rotational Speed = 1/(20 * 10 ^ -3) = 50 rps = 3000 rpm
Or
8192 bytes / 512 bytes per sector = 16 sectors
3000 rpm / 60 sec = 50 rps
50 rps * 32 sectors = 1600 sectors / sec
time to read 16 sectors is 16 / 1600 = 0.01 sec
0.01 sec to ms = 10
adding 10 ms for seek = 20 ms
answer: 3000 rpm

What are different scheduling criterias?


Different scheduling criteria are:
 CPU utilization. We want to keep the CPU as busy as possible. Conceptually, CPU utilization
can range from 0 to 100 percent. In a real system, it should range from 40 percent (for a lightly
loaded system) to 90 percent (for a heavily used system).
 Throughput. If the CPU is busy executing processes, then work is being done. One measure of
work is the number of processes that are completed per time unit, called throughput.
 Turnaround time. From the point of view of a particular process, the important criterion is how
long it takes to execute that process. The interval from the time of submission of a process to the
time of completion is the turnaround time. Turnaround time is the sum of the periods spent
waiting to get into memory, waiting in the ready queue, executing on the CPU, and doing I/0.
 Waiting time. The CPU-scheduling algorithm does not affect the amount of time during which a
process executes or does I/0, it affects only the amount of time that a process spends waiting in
the ready queue. Waiting time is the sum of the periods spent waiting in the ready queue.
 Response time. Time from the submission of a request until the first response is produced. This
measure, called response time, is the since it takes to start responding, not the time it takes to
output the response.

What are the differences among short-term, medium-term, and long-term scheduling?
Long-Term Scheduler
A long-term scheduler determines which programs are admitted to the system for processing. It selects
processes from the queue and loads them into memory for execution. Process loads into the memory
for CPU scheduling.The primary objective of the job scheduler is to provide a balanced mix of jobs,
such as I/O bound and processor bound. It also controls the degree of multiprogramming.It is also
called a job scheduler
Short-Term Scheduler
Its main objective is to increase system performance in accordance with the chosen set of criteria. It is
the change of ready state to running state of the process. CPU scheduler selects a process among the
processes that are ready to execute and allocates CPU to one of them.Short-term schedulers, also
known as dispatchers, make the decision of which process to execute next. Short-term schedulers are
faster than long-term schedulers.It is also called as CPU scheduler.
Medium-Term Scheduler
It removes the processes from the memory. It reduces the degree of multiprogramming. The medium-
term scheduler is in-charge of handling the swapped out-processes.Medium-term scheduling is a part
of swapping

What is the Real-Time System?


A real-time system is one in which the correctness of the computations not only depends on their
logical correctness, but also on the time at which the result is produced. That is, a late answer is a
wrong answer. For example, many embedded systems are referred to as real-time systems. Cruise
control, telecommunications, flight control and electronic engines are some of the popular real-time
system applications where as computer simulation, user interface and Internet video are categorized as
non-real time applications.

What is SCSI?
SCSI - Small computer systems interface is a type of interface used for computer components such as
hard drives, optical drives, scanners and tape drives. It is a competing technology to standard IDE
(Integrated Drive Electronics).

Direct Memory Access


 DMA also known as Direct Memory access.
 It is a method that allows an input/output (I/O) device to send or receive data directly to or from
the main memory, bypassing the CPU to speed up memory operations. The process is managed
by a chip known as a DMA controller (DMAC).
 It is a method of transferring data from the cmputer's RAM to another part of the computer
without processing it using the CPU. While most data that is input or output from your computer
is processed by the CPU, some data does not require processing, or can be processed by another
device.
 Example a sound card may need to access data stored in the computer's RAM, but since it can
process the data itself, it may use DMA to bypass the CPU.

What is Mutual Exclusion?


Mutual Exclusion also known as Mutex was first identified by Dijkstra. When a process is accessing
shared variable is known as in critical section. When no two processes can be in Critical Section at the
same time, this state is known as Mutual Exclusion.
It is property of concurrency control which is used to prevent race conditions.
Mutual Exclusion Devices:-
Locks, Reader's Writer's Problem, recursive locks, semaphores, monitor, message passing etc.
Requirements:
 No more than one thread can be in its critical section at any one time.
 A thread which dies in its critical non-critical section will not affect the others' ability to
continue.
 No deadlock: if a thread wants to enter its critical section then it will eventually be allowed to do
so.
 No starvation.
 Threads are not forced into lock-step execution of their critical sections.

Graph Theory Basics


A graph is a data structure that is defined by two components :
 A node or a vertex.
 An edge E or ordered pair is a connection between two nodes u,v that is identified by unique
pair(u,v). The pair (u,v) is ordered because (u,v) is not same as (v,u) in case of directed
graph.The edge may have a weight or is set to one in case of unweighted graph.

Applications:
Graph is a data structure which is used extensively in our real-life.
 Social Network: Each user is represented as a node and all their activities, suggestion and
friend list are represented as an edge between the nodes.
 Google Maps: Various locations are represented as vertices or nodes and the roads are
represented as edges and graph theory is used to find shortest path between two nodes.
 Recommendations on e-commerce websites: The “Recommendations for you” section on
various e-commerce websites uses graph theory to recommend items of similar type to user’s
choice.
 Graph theory is also used to study molecules in chemistry and physics
More on graphs:
Characteristics of graphs:
 Adjacent node: A node ‘v’ is said to be adjacent node of node ‘u’ if and only if there exists an
edge between ‘u’ and ‘v’.
 Degree of a node: In an undirected graph the number of nodes incident on a node is the degree
of the node.
In case of directed graph ,Indegree of the node is the number of arriving edges to a node.
Outdegree of the node is the number of departing edges to a node.
 Path: A path of length ‘n’ from node ‘u’ to node ‘v’ is defined as sequence of n+1 nodes.
P(u,v)=(v0,v1,v2,v3…….vn)
 A path is simple if all the nodes are distinct,exception is source and destination are same.
 Isolated node: A node with degree 0 is known as isolated node.Isolated node can be found by
Breadth first search (BFS). It finds its application in LAN network in finding whether a
system is connected or not.

 Directed graph:
A graph in which the direction of the edge is defined to a particular node is a directed graph.
 Directed Acyclic graph: It is a directed graph with no cycle.For a vertex ‘v’ in DAG there is
no directed edge starting and ending with vertex ‘v’.
a) Application: Critical game analysis, expression tree evaluation,game evaluation.
 Tree: A tree is just a restricted form of graph.That is, it is a DAG with a restriction that a
child can have only one parent.
 Undirected graph:
A graph in which the direction of the edge is not defined.So if an edge exists between node ‘u’
and ‘v’,then there is a path from node ‘u’ to ‘v’ and vice versa.
 Connected graph: A graph is connected when there is a path between every pair of vertices.In a
connected graph there is no unreachable node.
 Complete graph: A graph in which each pair of graph vertices is connected by an edge.In other
words,every node ‘u’ is adjacent to every other node ‘v’ in graph ‘G’.A complete graph would
have n(n-1)/2 edges.See below for proof.
 Biconnected graph: A connected graph which cannot be broken down into any further pieces by
deletion of any vertex.It is a graph with no articulation point.

Proof for complete graph:


1. Consider a complete graph with n nodes. Each node is connected to other n-1 nodes.
Thus it becomes n * (n-1) edges. But this counts each edge twice because this is a
undirected graph so divide it by 2.
2. Thus it becomes n(n-1)/2.

Consider the given graph,


Edges on node A = (A,B),(A,C),(A,E),(A,C).
Edges on node B = (B,C),(B,D),(B,E).
Edges on node C = (C,D),(C,E).
Edges on node D = (D,E).
Edges on node E = EMPTY.https://en.wikipedia.org/wiki/Graph_theory
Total edges = 4+3+2+1+0=10 edges.
Number of node = 5.
Thus n(n-1)/2=10 edges.
Thus proven.

You might also like