Question: Compute the following using code in Mathematica. 1) RandomGraph[{m,n},k] generates k random undirected graphs with m vertices and n edges; if we want to generate

Compute the following using code in Mathematica.

1) RandomGraph[{m,n},k] generates k random undirected graphs with m vertices and n edges; if we want to generate directed graphs, we need to set the attribute DirectedEdges to True. Your first task is to create a nice interactive model that can generate k (directed or undirected!) graphs with m vertices and m(m-1)/2 edges. The possible values for k should be 1 and 4. The parameter m can be any positive integer between 4 and 10, with default value 6. You should have one extra parameter, called Directed, that can take the values True or False.

2) Build an interactive model with two controls, n and u, that generates a random graph called K with n vertices and 2n edges and highlights vertex u of graph K. When the user selects a different vertex u of K, you display graph K with vertex u shown with a different color and with a different size.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!