Questions tagged [transitivity]
34 questions
2
votes
1 answer
Using coq, trying to prove a simple lemma on trees
Trying to prove correctness of a insertion function of elements into a bst I got stuck trying to prove a seemingly trivial lemma.
My attempt so far:
Inductive tree : Set :=
| leaf : tree
| node : tree -> nat -> tree -> tree.
Fixpoint In (n :…

David Miller
- 23
- 2
1
vote
1 answer
how to calculate weighted transitivity with networkx in Python
As far as I know, the function in networkx for graph's transitivity is unweighted (shown as follow).
networkx.transitivity(G)
I have tried it on a weighted graph, but in the results, only edges are considered. Is there any other way in networkx…

Jing
- 89
- 1
- 4
1
vote
1 answer
Replication of Erdos-Renyi graph
I'm really new to R and I have got an assignment for my classes. I have to create 1000 networks of Erdos-Renyi model. The thing is, I actually can create one model, check it parameters like degree distribution, plot it etc.. Also I can check its…

segway
- 21
- 3
1
vote
1 answer
SQL Server Query to find min date in a transitive relationship w/ possible cyclic loops
Running into a bit of a headache with this one query and some hints/suggestions would be greatly appreciated. I couldn't find anything really related to my problem -I found some stuff on transitive closures which isn't quite what I need since my…

Wilsonia
- 37
- 5
1
vote
1 answer
Prolog: check transitivity for simple facts
My intention was to implement a simple example (just for myself) of transitivity in Prolog.
These are my facts:
trust_direct(p1, p2).
trust_direct(p1, p3).
trust_direct(p2, p4).
trust_direct(p2, p5).
trust_direct(p5, p6).
trust_direct(p6,…

daniel451
- 10,626
- 19
- 67
- 125
1
vote
1 answer
Get rows by transitivity in mysql
Suppose i have the following table:
Images
|id | similarTo|
|---|----------|
|1 | 2 |
|2 | 3 |
|--------------|
Where similarTo is a foriegn key to id. What i want is a query that can fetch the transitive closure of an id down to…

Daniel Valland
- 1,057
- 4
- 21
- 45
1
vote
1 answer
Is this CTL formula equivalent and what makes it hold?
I'm wondering if the CTL formulas below are equivalent and if so, can you help me persuade myself that they are?
A(p U ( A(q U r) )) = A(A(p U q) U r)
I can't come up with any models that contradicts it and my guts tells me the formulas are…

ondrus
- 13
- 3
1
vote
1 answer
Transitive template instantiation
I have a conversion template, that should convert between pointers to types if the conversion is safe. That is something like static_cast but allows user defined types.
Example: 2 representations of complex types, one as a struct with 2 members for…

Flamefire
- 5,313
- 3
- 35
- 70
1
vote
1 answer
Transitive dependencies in maven plugins
Are dependencies in Maven plugins supposed to resolve their transitive dependencies or do they have to be manually added to the plugin dependencies?

Michael Rutherfurd
- 13,815
- 5
- 29
- 40
1
vote
2 answers
transitive rails associations and magical count
In Rails, to automatically count associations, you do:
class Script
has_many :chapters
end
class Chapter
belongs_to :script
end
and you add a chapters_count column into the Script model.
Now, what if you want to count the number of paragraphs…

MickaelFM
- 897
- 1
- 8
- 19
0
votes
0 answers
how to model a transitive relation through two properties?
My question is similar to the question
https://stackoverflow.com/questions/69979542/how-can-i-model-a-transitive-relationship-spanning-multiple-classes-in-protégé ,
but I think different and interesting enough to warrant its own question.
The common…

Anderson Wiese
- 123
- 2
- 7
0
votes
1 answer
Transitive joins in postgresql
What is the best way to achieve a transitive join in postgresql? Currently, I want to do a full outer join for tables, a, b, and c. My query currently looks like this:
SELECT *
FROM a
FULL OUTER JOIN b
ON a."ID" = b."ID"
FULL OUTER JOIN c
ON a."ID"…

ekeckeisen
- 75
- 8
0
votes
1 answer
What is transitivity property of digraph?
I'm studying discrete structures following the MIT lecture (Mathematics for Computer Science). In the book, the definition of transitivity is as follow:
Then the book says the graph in Figure 7.8 below does not satisfy the transitivity…

Stone
- 1
- 1
0
votes
1 answer
Calculate transitivity for all networks in a list
I have 500 random networks stored in a list
for (x in seq_len(500L)) {
+ gs[[x]] <- erdos.renyi.game(361, 695, type = "gnm")
I am able to calculate the transitivity for each network individually using
transitivity(gs[[1]])
How do I calculate…

The Last Word
- 203
- 1
- 7
- 24
0
votes
0 answers
Why must use general barrier to guarantees transitivity of cpu?
I recently read transitivity of cpu in memory-barriers and the author emphasize only general barrier can guarantee transitivity.
But, I can't understand it very well.For example:
CPU 1 CPU 2 CPU…

user1310866
- 13
- 1
- 3