Hi
Please give in your ideas and suggestions on the following problems on approximation algorithms:
1)Give an approximation algorithm that takes an instance of the knapsack problem and a positive integer k and returns a packing with an approximation ratio of no more than 1 + 1/k . Your algorithm ...
Search found 9 matches
- Thu Dec 11, 2008 3:54 am
- Forum: Algorithms
- Topic: Suggestions required on approximation algorithm problems
- Replies: 1
- Views: 1251
- Thu Dec 11, 2008 3:52 am
- Forum: Algorithms
- Topic: Suggestions required on NP Complete Problem
- Replies: 3
- Views: 3100
Suggestions required on NP Complete Problem
Hello everyone,
Please give in your ideas and suggestions to this problem:
Given a directed graph G = (V,E) and a positive integer
k, we wish to determine whether there is a subset V ? ? V of size k such that
every cycle in G contains at least one vertex in V ?. Show that this problem
is NP ...
Please give in your ideas and suggestions to this problem:
Given a directed graph G = (V,E) and a positive integer
k, we wish to determine whether there is a subset V ? ? V of size k such that
every cycle in G contains at least one vertex in V ?. Show that this problem
is NP ...
- Thu Dec 11, 2008 3:51 am
- Forum: Algorithms
- Topic: Clarity required on graph related concepts
- Replies: 2
- Views: 1417
Re: Clarity required on graph related concepts
thanks for the replies
- Sun Nov 30, 2008 6:23 pm
- Forum: Algorithms
- Topic: Clarity required on graph related concepts
- Replies: 2
- Views: 1417
Clarity required on graph related concepts
hi all
when talking in term of trees/graphs:
1)what is meant by pre-processing an edge and pre-processing a vertex?(The context in which this is mentioned is Depth First Search)
2)What is the definition of a depth first spanning forest?
3)What are the requirements for a vertex to be an articulation ...
when talking in term of trees/graphs:
1)what is meant by pre-processing an edge and pre-processing a vertex?(The context in which this is mentioned is Depth First Search)
2)What is the definition of a depth first spanning forest?
3)What are the requirements for a vertex to be an articulation ...
- Tue Nov 25, 2008 7:13 am
- Forum: Algorithms
- Topic: Doubt in the following algorithm
- Replies: 4
- Views: 1632
Doubt in the following algorithm
Hello all,
Problem :
We are given two arrays of integers, R[1..m] and C[1..n]
such that R[1]+R[2]+...+R[m]=C[1]+C[2]+..+C[n]=k.
Give an O(kmn) algorithm that returns an m× n matrix of 0s and 1s such
that row i contains exactly R 1s and column j contains exactly C[j] 1s,
for all 1 ? i ? m and 1 ? j ...
Problem :
We are given two arrays of integers, R[1..m] and C[1..n]
such that R[1]+R[2]+...+R[m]=C[1]+C[2]+..+C[n]=k.
Give an O(kmn) algorithm that returns an m× n matrix of 0s and 1s such
that row i contains exactly R 1s and column j contains exactly C[j] 1s,
for all 1 ? i ? m and 1 ? j ...
- Tue Nov 25, 2008 6:58 am
- Forum: Algorithms
- Topic: help reqd on the problem on network flow
- Replies: 2
- Views: 1256
Re: help reqd on the problem on network flow
thanks for the reply
i am sorry for the spellings.
Can you please suggest something for this problem:
A path cover of a directed graph is a set of paths such
that every vertex is included in exactly one path. The size of a path cover is
the number of paths in the set. Show how to reduce the ...
i am sorry for the spellings.
Can you please suggest something for this problem:
A path cover of a directed graph is a set of paths such
that every vertex is included in exactly one path. The size of a path cover is
the number of paths in the set. Show how to reduce the ...
- Tue Nov 25, 2008 2:26 am
- Forum: Algorithms
- Topic: help reqd on the problem on network flow
- Replies: 2
- Views: 1256
help reqd on the problem on network flow
Hello all
Plz give ur ideas n suggestions:
We define an n × n grid to be an undirected graph (V,E)
where V = {(i, j) | 1 ? i ? n, 1 ? j ? n}, and two vertices (i, j) and (i?, j?)
are adjacent iff either i = i? and j = j?±1 or j = j? and i = i?±1. Thus, each
vertex in a grid has at most 4 neighbors ...
Plz give ur ideas n suggestions:
We define an n × n grid to be an undirected graph (V,E)
where V = {(i, j) | 1 ? i ? n, 1 ? j ? n}, and two vertices (i, j) and (i?, j?)
are adjacent iff either i = i? and j = j?±1 or j = j? and i = i?±1. Thus, each
vertex in a grid has at most 4 neighbors ...
- Tue Nov 18, 2008 3:14 am
- Forum: Algorithms
- Topic: Minimum set of nodes through which the eah path goes
- Replies: 9
- Views: 3811
Re: Minimum set of nodes through which the eah path goes
thx for the reply
yes i have to read that chapter
yes i have to read that chapter
- Mon Nov 17, 2008 6:14 am
- Forum: Algorithms
- Topic: Minimum set of nodes through which the eah path goes
- Replies: 9
- Views: 3811
Re: Minimum set of nodes through which the eah path goes
I just wanted to seek an explanation to the following code to find the number of bridges in an undirected,connected graph:
What is the use of the low array here?
int low[MAXN], seen[MAXN], counter;
void dfs(int x, int parent)
{
low[x] = seen[x] = ++counter;
for each edge x->y
{
if (y ...
What is the use of the low array here?
int low[MAXN], seen[MAXN], counter;
void dfs(int x, int parent)
{
low[x] = seen[x] = ++counter;
for each edge x->y
{
if (y ...