![]() |
| | #1 |
| .... Join Date: Aug 2001 Location: Groningen (NL)
Posts: 2,386
| Minimize crossing edges in undirected graph It is impossible to avoid crossing edges, but I guess there is some algorithm which is able to minimize the number of crossing edges. Can anyone help me? Perhaps an "easier" question is: how can I determine whether two edges will be crossing? In graphs coordinates are not used, so there must be a different way than geometric to determine this. For your information, the graph is implemented as a table: struct graph { int nr_of_vertices; bool adjacency_table [MAX_VERTICES][MAX_VERTICES]; } So assume a graph has 4 vertices and the following relations exist (1,2), (1,4) and (2,3). Then the table would look like this: 1 2 3 4 1 T T F T 2 T T T F 3 F T T F 4 T F F T |
| Shiro is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Undirected graph and Binary Tree problem | arafat21 | C Programming | 3 | 05-02-2008 05:52 AM |
| error help making no sense | tunerfreak | C++ Programming | 5 | 04-17-2007 07:55 PM |
| How to use C++ graphs? | eur0dad | C++ Programming | 4 | 10-14-2006 11:37 AM |
| Help w/ graph as adjacency matrix | ac251404 | C++ Programming | 4 | 05-09-2006 10:25 PM |