Generating random planar graphs where nodes have fixed coordinates

7 ビュー (過去 30 日間)
Hari
Hari 2021 年 3 月 10 日
回答済み: Jaynik 2024 年 9 月 27 日
Is there a matlab code to generate random planar graphs where the position of nodes is fixed and only link connections change?

回答 (1 件)

Jaynik
Jaynik 2024 年 9 月 27 日
Hi Hari,
There is no direct function to generate random planar graphs with fixed nodes and changing edge connections. This task is a bit challenging and a basic approach to this problem would be as follows:
  1. Start by defining the nodes in 2D space to create a planar graph.
  2. We can use a known planar graph as a starting point.
  3. Once we have a basic graph with us, we can rewire the edges randomly while checking for planarity.
  4. The above step is just a naive way of changing the edges, if the graph is still planar, we move to some other edge, else we keep it as is and rewire some another edge.
This approach is quite basic and may not cover all scenarios effectively. A better approach can be given if you can share the problem in detail.
Hope this helps!

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by