Detecting Negative Cost Cycles in Zero Space - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Detecting Negative Cost Cycles in Zero Space

Description:

Correctness. Differences between Stressing and Relaxing ... Correctness. Observation: The Stressing Algorithm is precisely the ... Correctness (contd. ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 31
Provided by: ksubr
Category:

less

Transcript and Presenter's Notes

Title: Detecting Negative Cost Cycles in Zero Space


1
Detecting Negative Cost Cycles in Zero Space
  • K. Subramani
  • West Virginia University

2
Topics to be covered
  • Statement of Problem
  • Motivation
  • Related Work
  • The Difference Constraint Approach
  • The Stressing Algorithm
  • Analysis (Space and Time)
  • Visualizing the algorithm
  • Correctness
  • Differences between Stressing and Relaxing
  • Producing the cycle
  • Open Issues

3
Statement of Problem
NCCD Given a network GltV,E,cgt, is there a
directed, simple cycle with cumulative edge cost
negative?
4
Motivation (for studying NCCD)
  • Shortest Paths
  • Max Flows
  • Image Segmentation
  • Real-Time Scheduling
  • System Verification

5
Motivation (for our work)
  • New Design Paradigms
  • ? NCCD and Shortest Paths
  • Space Savings
  • Connectivity issues

6
Related Work
  • Relaxation-based approaches
  • Contraction-based approaches
  • Algebraic Methods

7
The Difference Constraint Approach
  • Def A constraint of the form
  • Def A conjunction of difference constraints is
    called a
  • difference constraint system
  • Farkas Lemma.
  • Main observation

8
DCA (contd.)
Adding the non-positivity constraints makes the
constraint polyhedron pointed indeed there is a
unique optimal solution to the system
System (1)
(Proof in paper)
9
DCA (contd.)
  • If the RHS is positive, suffices.
  • Pick the constraint , with
  • Replace xi by xicij,
  • throughout the constraint system.
  • 4. oioicij

Analysis At most steps and the
algorithm can terminate.
10
DCA (contd.)
The above algorithm terminates with the unique
solution to System (1), if the constraint system
is feasible.
11
The Stressing Algorithm
  • Repeat (n-1) times
  • (a) for each vertex v in G
  • if (v has an incoming negative edge)
  • Stress(v)
  • 2. If there still exists a negative cost arc in
    the graph
  • declare G has a negative cost cycle
  • else
  • declare G does not have a negative cost
    cycle.

12
Stressing Algorithm (contd.)
The Stress Function
  • 1. Find the most negative edge into v
  • 2. Subtract this cost from all the edges into v.
  • 3. Add this cost to all the edges out of v

13
Analysis (Space)
Clearly, only register space is needed to
determine the minimum and for loop indexing.
14
Analysis (Time)
  • O(m.n) on a network with m arcs and n vertices.

15
Visualization
B
1
H
-3
C
-2
G
A
-3
3
3
-1
5
-4
D
F
-7
I
-4
5
J
E
16
Visualization (contd.)
G is stressed
A is stressed
B
1
H
0
C
-3
G
A
-3
3
3
0
5
-7
D
F
-7
I
-4
5
J
E
17
Visualization (contd.)
B is stressed
J is stressed
B
H
-2
0
C
0
G
A
-6
3
3
0
5
0
D
F
-7
I
-4
-2
J
E
18
Visualization (contd.)
C is stressed
I is stressed
B
H
0
0
C
0
G
A
-6
1
5
0
3
0
D
F
-7
I
-4
0
J
E
19
Visualization (contd.)
D is stressed
B
H
0
0
C
0
G
A
1
1
-2
0
3
0
D
F
0
I
-4
0
J
E
20
Visualization (contd.)
E is stressed, F cannot be stressed first round
is over
B
H
0
0
C
0
G
A
1
1
-2
0
3
0
D
F
-4
I
0
0
J
E
21
Visualization (contd.)
Round 2 begin by stressing C
B
H
2
0
C
0
G
A
1
1
0
0
1
0
D
F
-4
I
0
0
J
E
22
Visualization (contd.)
Finally the negative cycle is isolated as a
negative edge
B
H
2
0
C
0
G
A
1
1
0
0
1
0
D
F
-4
I
0
0
J
E
23
Correctness
  • Observation The Stressing Algorithm is precisely
    the
  • Difference Constraint Approach with two
    differences
  • The Stressing Algorithm terminates after exactly
  • (n-1) rounds.
  • (b) When a vertex is stressed, we use the most
    negative
  • incoming edge as the pivot.

24
Correctness (contd.)
Theorem Stressing preserves costs around a cycle.
H
-1
G
1
0
I
0
J
25
Correctness (contd.)
  • .

Corollary Stressing does not create negative
cost cycles, if none existed in the first place.
Theorem If the graph does have a negative cost
cycle, the Stressing Algorithm declares that the
input graph has a negative cost cycle.
26
Correctness (contd.)
  • Theorem If the graph does not have a negative
    cost cycle, there will not be any negative cost
    edges in the input graph after (n-1) rounds.

Proof (sketch) Focus on the unique BFS of the
Difference Constraint system, which is a spanning
tree. Key Observation There is at least one
vertex which is never stressed at all. After each
round of stressing, one additional vertex is
never stressed again. (By induction)
27
Differences between Bellman-Ford and Stressing
  • Sourced versus sourceless
  • Dynamic Programming versus Greedy
  • Zero labeling space

28
Producing the cycle
  • Maintain a variable at each vertex.
  • When a vertex is stressed store the
  • label of the pivot edge!
  • Total space used is O(n), which is
  • strongly polynomial, unlike Bellman-Ford.

29
Open Issues
  • Implementation study
  • Planar digraphs
  • Parallelization

30
The Beginning
Write a Comment
User Comments (0)
About PowerShow.com