## Generating all connected graphs from a set of n-valent vertices?

I would like to have a function generateConnected[list_] that, given a set of vertices with pre-defined valence (number of outgoing edges) generates all possible connected diagrams.

For example, let us choose the following names for vertices of valence 1 through 6:

vertexNames = { x , u , y , z , q , w }; 

which means, a vertex of label x can have only one edge attached to it, u can have only 2 edges, y can have only three edges etc.

Then a set of vertices might be chosen e.g. as follows, so that the output is

set = Flatten[{Array[x, 5], y , z }] generateConnected[set,vertexNames] 

{ x[1] , x[2] , x[3] , x[4] , x[5] , y , z }

Is there an efficient way to do this in Mathematica?

## Intersection of sphere with triangle containing moving vertices

First off, apologies if I cannot properly articulate my question in the most formal way. However, I believe my question should be simple enough to grasp anyhow.

In $$\mathbb{R}^3$$, I would like to determine the time of contact, if any, between:

• An unmoving unit sphere, whose center is at the origin
• A triangle, each of whose vertices follow independent, linear motion from $$t = 0$$ to $$t = 1$$. In other words, each triangle vertex has a start and end position, which are linearly interpolated by $$t$$.

The sphere may touch the triangle on a vertex, an edge, or on the triangle’s surface. Vertex testing is simple enough as it’s analogous to static line segment-sphere intersection.

For edge testing, parameterizing a line-sphere intersection test by $$t$$ appaers to lead to solving a degree 4-polynomial, which isn’t ideal. I believe that doing the same for triangle surface testing (parameterizing a sphere-plane intersection with $$t$$) would lead to solving a 6-degree polynomial.

Would there be any applicable non-analytical methods to approximate the intersection (other than directly approximating the polynomial roots)? Or maybe there is an analytical method that I’m not thinking of. In addition, would further constraining the motion of the triangle potentially simplify a solution?

## A vertex transitive graph has a near perfect/ matching missing an independent set of vertices

Consider a power of cycle graph $$C_n^k$$, represented as a Cayley graph with generating set $$\{1,2,\ldots, k,n-k,\ldots,n-1\}$$ on the Group $$\mathbb{Z}_n$$. Supposing I remove an independent set of vertices of the form $$\{i,i+k+1,\ldots,\lfloor\frac{n}{k+1}\rfloor+i\}$$ or a single vertex. Then, is it possible to obtain a perfect/ near perfect matching when I remove the independent set of vertices always? If not, then is it possible in case the graph is an even power of cycle?

I hope yes, as we can pair the vertices between any two independent sets of the above form or between the indpendent set and the single vertex to get a maximal matching which is near perfect(in case the order of induced subgraph is odd) or perfect(in case the order of the induced subgraph is even). Any counterexamples? Also, can we generalize this, if true, to any vertex transitive graph, that is, does there exist an indpendent set(non-singleton) of vertices, such that removing that set induces a perfect/near-perfect matching? Thanks beforehand.

## Tooltip pointing for 3D polyhedron vertices

How is possible to use Tooltip to point out vertices of a polyhedron? Would like coordinate display while mousing over the vertex. Thanks for the help.

Rohn = PolyhedronData["Icosidodecahedron", "VertexCoordinates"]; DelaunayMesh[Rohn] Show[ListPlot3D[Rohn, AxesStyle -> Thickness[0.005],    AxesLabel -> {"X", "Y", "Corr(X,Y)"},    AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}}],   ListPointPlot3D@   Tooltip@Flatten[MapIndexed[Flatten@{#2, #1} &, Rohn, {2}], 1]] 

## Show that a graph has vertices of all even degrees iff its biconnnected components have all even degree vertices

The biconnected components here are all maximal biconnected components.

When I tried solving the problem in the first direction (if the degrees of all the vertices in the biconnected component were even then the degrees of all the vertices in the graph were even), I ran into the problem of that if the degree of every vertex is even, I wouldn’t be able to connect components to them since then the degree of that vertex that connects the component would be odd.

When I went the other direction ( proving that if the degrees of all the vertices in a graph were even, then the degrees of all the vertices in the maximal biconnected subgraphs are all even), I had a similar issue, that if I find a cut edge and remove it from the biconnected components, then the degrees of those vertices incident to the cut edge now become odd if they were originally even.

I’m not sure what to really do at this point, am I missing something?

## Discrete math – graph theory questions: vertices, cliques, degrees

I have a few questions for a practice quiz I’m struggling with about graph theory, and I’d appreciate some clarification on my answers.

1. What vertices are adjacent to vertex 2?

I’m guessing this means anything that’s connected to 2. In this case, it’d be 0, 1, and 4, but I just wanted to make sure.

1. What is ∑(v∈V)deg⁡(v)?

The v∈V should be a lower exponent under the sigma symbol but I couldn’t figure out how to do that. I’m not really sure what this question means, so I’d appreciate some help or a push in the right direction.

1. A clique is a subgraph G’ = (V’, E’) that is complete (i.e., every vertex in the clique is connected to every other vertex in the clique). What is the largest clique contained in this graph? Note both the size and the vertices in V’.

I know a clique means that every vertex is connected to every other vertex. I know the triangle connecting 0, 1, and 2 is an obvious one but I’m not sure if that’s the largest. I get confused with the definition of a clique when I look at larger sets. If I had to answer this question I would choose the graph formed by 0, 1, 2 and 4, but again, I’m not sure if that’s the largest clique in the graph.

## Discrete math – make wheel graph with 5 vertices from original graph

From the original graph, consider the smallest set of edges E”’ that needs to be added to the graph above such that the graph (V, E ∪ E”’) contains W5 (a wheel graph with 5 vertices).

I was thinking of connecting (3, 4), (6, 7), and (6, 10) to make a graph between vertices 3, 4, 6, 7, and 10 but I wasn’t sure if that would work?

## How can I find matchings in a Bipartite graph beginning with specific vertices?

Context: I’m modelling kidney exchanges through directed acyclic graphs. I convert these to Bipartite graphs (by splitting each node into a donor and receiver, and the edge from the original graph exist between corresponding donors and receivers). I want a way to find maximum number of edges through disjoint chains and I’ve been trying to do so through maximum wtd matching.

I know I can use ford-fulkerson to find a maximum wtd perfect matching, however, the main problem I’m facing is that the matchings can only exist for chains beginning with specific vertices. For example, if this is my directed acyclic graph:

Turning this into a Bipartite graph and using the maximum wtd matching way, I get the chain 0->1->3->5->6 but I also get 2->4. However, I can only have chains beginning with 0 so 2->4 should not come up.

I wanted to know if there were any ways to work around this problem? Someone suggested making this a minimum cost perfect matching problem but I’m confused how.

I realise this is a weird question but any help would be appreciated!

## How do I move an object in opengles using vertices?

I am wondering if there is a way to update and move a triangle in OpenGL using the vertices. These are the vertices of my triangle: static float triangleCoords[] = { // in counterclockwise order: 0.0f, 0.622008459f, 0.0f, // top -0.5f, -0.311004243f, 0.0f, // bottom left 0.5f, -0.311004243f, 0.0f // bottom right };

I wanted to know if it was possible to move the triangle without the matrices.

Thank you!

## Sorting vertices by MST in a forest of MSTs

Consider a number of vertices. They are separated into a number of MSTs (so there’s a forest of MSTs) using Kruskal’s algorithm. For each vertex I need to know in which MST they are located. Each MST will be assigned a unique ID.

When completed I will know, for example, that Vertex #12 is in MST #2.

This is my best attempt at this. As you can see the algorithm failed because it falsely tagged one MST as two separate MSTs (Blue Group 0 and Blue Group 1):

I’m looking for an algorithm that can do this. Thanks in advance. I’m a programmer not a mathematician.