graphs – Minimal Spanning Tree vs Minimum Spanning Tree

I got confused about minimal and minimum in context of graph theory.
Although, I have understanding that minimal means more than one minimum i.e. none qualifies as actual minimum so we say them minimal.

What exactly does minimal spanning tree mean? Also, what exactly does ‘minimal edge’ mean?

How do they differ from minimum spanning tree?
How are ‘minimal edge’ different from minimum edge?

This doubt arose due to the statement:

S: There exists a minimum weight edge in G, which exists in every minimum spanning tree of G.

Can we say on using word ‘minimum’ it’s implied that there is only one minimum weight edge. Besides, statement used “exists” which is singular.

graphs – Power of adjacency matrix

Let $G$ be a weighted graph with a weight function $w longrightarrow mathbb{R}^{+}$. Let $G’$ denotes the weighted matrix with adjacency matrix

$$A_{G’} = sum_{i=0}^{k} (xA)^{i}$$

where $k$ is integer and $x$ is a variable.

I am not getting what is $A_{G’}$ matrix? Is it contains all walks of length $k$ or is it something else?

pr.probability – How to define probability over graphs?

How can one formally define a random graph variable?

If G is a random graph variable, then any finite graph is a realization of G. Formally a r.v maps the set of outcomes to a measurable space (may be Real or not). So, what does this set of possible outcomes look like if the r.v is a graph structure and what does the r.v map it to ?

Further, how do we assign probability to elements of the set of all finite graphs ?

I am not able to find resources that talk about these points and their properties.

I am aware that a whole field “Random Graphs” exists but, it only talks about graphs with size n and probability is defined over occurrence of edges.

graphs – Having 2 sets of distances in undirected weighted tree, get all of the edges

At the entry you are given the info, for example:

|x |1 | 2 | 3 | 4 | 5 | 6 | 7 |
|:-|:-|:- |:- |:- |:- |:- |:- |
Input may be much larger, up to 500 000 x 500 000 square of data. My job is to write a program, that will determine if the tree exists, and if it does, the program will have to print out all the edges as well.

To be honest, I am not sure where to start. I was thinking about some sort of backtracking, but the size of data may be to big for that.

I am quite new to graphs, so the question may be very easy 🙂

My first idea was to get the shortest distance from one of the border points (1 and 7 in example) and since the shortest path must be connected directly, connect it. I did not know what do do next, so any advice would be nice.

Use of v_ in SetProperty for. graphs

I found the following code (I forgot to mark the link–it was on the topic of displaying two values at a graph vertex):

graph4 = Graph({1 -> 2, 3 -> 2}, VertexWeight -> {102, 103, 104}, 
   VertexLabels -> "Name");

SetProperty(graph4, {VertexLabels -> {v_ :> Placed({"Name", 
  AnnotationValue({graph4, v}, VertexWeight)}, {Above, Below})}, 
  ImagePadding -> 20})

The question regards the meaning of v_ in the SetProperty part of the code. I understand the use of v_ in a function definition, say Sum(x_,y_) := x + y. I chased up SetProperty in Wolfram online documentation, but did not encounter this use of v_

graphs – Can one reconstruct a sequence of given pieces

You can chose the vertices of the graph to be the sequences, and if a vertex is a sequence $alpha u$ (where $alpha$ is a letter and $u$ a word), then there is an edge from $alpha u$ to any vertex $ubeta$ (where $beta$ is a letter). It is convenient to label such edge with the letter $beta$.

In your exemple, the vertex $AGA$ would have an edge to $GAT$ (and, if they exist, $GAA$, $GAC$ and $GAG$).

If you know the sequence $s = s_1s_2…s_k$ in advance, you want to know if there exists a path from $s_1s_2s_3$ to $s_{k-2}s_{k-1}s_k$ reading the sequence $s_4…s_k$ on the edges.

Walks on Directed graphs – Computer Science Stack Exchange

Let G = (V,E) be a directed graph, where V is a finite set of nodes, and E ⊆ V × V be the set of (directed) edges (arcs). In particular, we identify a node as the initial node, and a node as the final node. Let x and B be two non-negative integer variables. Further, we decorate each edge with one of the following four instructions:

x := x + 1;

x := x − 1;

x == 0?;

x == B?;

The result is called a decorated graph (we still use G to denote it). The semantics of a decorated graph is straightforward. It executes from the initial node with some non-negative values of B and x (satisfying 0 ≤ x ≤ B), then walks along the graph. G can walk an edge (v,v0) if all of the following conditions are satisfied:

• if the edge is decorated with instruction x := x+1, the new value of x must satisfy 0 ≤ x ≤ B.

• if the edge is decorated with instruction x := x−1, the new value of x must satisfy 0 ≤ x ≤ B.

• if the edge is decorated with instruction x == 0?, the value of x must be 0.

• if the edge is decorated with instruction x == B?, the value of x must equal the value of B.

If at a node, G has more than one edge that can be walked, then G non deterministically chooses one. If at a node G has no edge that can be walked, then G crashes (i.e., do not walk any further). It is noticed that B can not be changed during any walk. However, its initial value can be any non-negative integer. We say that a decorated graph G is terminating if there are nonnegative initial values for B and x (satisfying 0 ≤ x ≤ B) such that G can walk from an initial node to a final node. Design an algorithm that answers (yes/no) whether G is terminating or not.

graphs – How to simulate online matching algorithms (implementation)

I was reading about online algorithms and bipartite matching.

I found an implementation that works fine on several websites (like geeksforgeeks).
For the online version, I found this paper

But there’s one part that I don’t understand.

In this paper, they refer to U (boys) as “on-line” which means data arrive sequentially (in real-time?) not all at once

While I can see how such case if frequent in real life, I fail to understand what kind of implementation could be used to demonstrate this…

I thought of the following

  • Create a graph with girls
  • add boys and define manually the girls they like via some sort of user input (input py/cin c++)
  • solve(match) for the newly added boy according to rank(priority) and return to user input till no more girls are left or till user decides to stop?

In the online version do we assume a predefined limited number for both U and V(boys and girls)? or just for girls?

Is my suggestion correct? or did I misunderstand something?

Thanks in advance

graphs – Concrete example of an admissible A* heuristic compared to Djisktra

As I understand it, A* is a general form of Djikstra where the selection of the next node to visit can be based on something other than the actual distance. For example, with Djikstra, you’d use a priority queue ordered ascending by distance and shift off the head of the queue to decide where to visit next. But with A*, the order of the priority queue can be based off of the actual distance and/or another factor (the heuristic). The heuristic is considered admissible if the value it returns is guaranteed to be equal to or less than the actual distance. In other words, Djikstra is a form of A* where the heuristic always returns the actual distance.

So, what is a concrete example of an admissible A* heuristic?

It seems like writing a heuristic function that always returns an equal to or lesser value than the actual distance would require some magical insight about the graph obtained if I already knew the shortest distances.