1

For an assignment, I have to do the following:

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.

At the moment, my code is as follows:

```
K = RandomGraph[{n}, {2 n}];
Manipulate[HighlightGraph[K, {u}], {n, 1, 10, 1}, {u, 1, n, 1}]
```

I think I need to state that `u`

is a vertex, but unsure how to fix. Any help is appreciated.

Hi Alessia, try to not use single capital letters as variables because there are already some build ones. FYI: related topics: Adding Dynamic functionality to a Graph, 128347, 116648, 104718

– Kuba – 2017-02-21T06:29:09.950