Requirements To Determine If A Graph Is Bipartite, K-Partite or Non-Partite

You might also like

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

Requirements to determine if a graph is

bipartite,k-partite or non-partite
Namitha.R.H.
19 Sep 2009

1
1 Introduction
This software is to specify the type of graph input is a K-partite,bipartite or a
non-partite.

2 General Description
A graph G(V,E) is such that V is a non empty set of n vertices and E is an edge
set such that having its end vertices in vertex set V.
A graph is said to be bipartite if V is union of k mutually disjoint nonempty
subsets v1 ,v1 ,v1 ,· · · , v k and E is an edge set such that each edge has its end
vertices in different vertex subsets.
If k is equal to 2,its a bipartite graph else its said to be non partite.

Figure 1: Bipartite Graph

Figure 2: Tripartite graph

3 Functionality
As the users specifies the software uses a function to take a random graph input
from a file else uses a function to generate a random graph of n vertices.
Another function takes the random graph as input and audits for any disjoint
subsets.
In case number of subsets is K,its K-partite graph.
In case of 2 subsets its bipartite else considered to be a non-partite.

2
4 Performance Requirement
When an adjacency matrix is considered the whole row is scanned and hence
the time taken is O(n).
The whole adjacency matrix occupies n2 /8 bytes of memory in contiguous man-
ner.
The efficiency of adjacency matrix does not depend of number of edges in a
graph and will be θ(n2 ).

5 External Interface
In some cases the random graph input is taken from a file.
No requirement of any kind of external hardware.
The result about the type of partite graph is displayed on the command line.

6 Design Constraint
The software code should be in C-language.
It should be compatible to be compiled in gcc of linux and turbo-c of windows.

You might also like