how to draw a graph

4 visualizzazioni (ultimi 30 giorni)
Kajal Agrawal
Kajal Agrawal il 3 Giu 2023
Commentato: Dyuman Joshi il 4 Giu 2023
i have 12 vertices and 36 edges, how to draw a regular graph (all vertices having same degree).
  3 Commenti
Kajal Agrawal
Kajal Agrawal il 3 Giu 2023
degree= 2 edges/ vertices
and all the vertices should be same degree. (6-regular graph).
Dyuman Joshi
Dyuman Joshi il 4 Giu 2023
My solution which is currently the accepted answer, is incorrect.
Please accept the other answer, which provides a correct and concise solution to your problem. I shall be deleting my answer shortly.

Accedi per commentare.

Risposte (1)

Diwakar Diwakar
Diwakar Diwakar il 3 Giu 2023
To draw a regular graph with 12 vertices and 36 edges, we need to find the degree of each vertex. In a regular graph, all vertices have the same degree.
To find the degree, we can use the formula:
2 * number of edges = sum of degrees of all vertices
In this case, the number of edges is 36, so:
2 * 36 = sum of degrees of all vertices
72 = sum of degrees of all vertices
Since the graph is regular, all vertices will have the same degree, which we can denote as 'd'. Therefore, we have:
12 * d = 72
Dividing both sides of the equation by 12, we find:
d = 72 / 12
d = 6
So, each vertex in the graph will have a degree of 6.
Now, let's draw the graph. Since it is a regular graph, we can use a symmetric pattern to make it easier to visualize. Here's one possible way to draw the graph:
1 -- 2 -- 3 -- 4 -- 5 -- 6 -- 7 -- 8 -- 9 -- 10 -- 11 -- 12 -- 1
In this representation, the vertices are numbered from 1 to 12, and each vertex is connected to the next vertex in a circular manner. Each vertex is connected to its two neighboring vertices, and the degree of each vertex is 6.
Note that there can be multiple valid drawings of a regular graph with the same specifications. The example above is just one possible representation.
  3 Commenti
Kajal Agrawal
Kajal Agrawal il 4 Giu 2023
thank you so much
John D'Errico
John D'Errico il 4 Giu 2023
As I think about it, this can lead into greater mathematical depths. For example the concept of a derangement.
A derangement is a permutation of a set, such that no element resides in its original position. For even 12 elements, the number of possible derangements is pretty large.
As well, The OEIS tells us there are 176,214,841 possible derenagements of 12 elements.
There we would also learn the subfactorial is useful to enumerate that number.
But you should also note that at least SOME of the derangements of the numbers 1:12 can lead to a regular graph with degree 2. And then we can use that idea to build a graph where each node has degree 6.

Accedi per commentare.

Tag

Prodotti


Release

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by