Re: topological sort with bidirected graphs





Martin wrote:
Boris wrote:

Hi,

I need to consider matrices of adjacence with an equality relation

(or

bidirected relation)
0 coding for equality, 1 coding for "superior to", -1 coding for
"inferior to"
for exemple
A=[. 0 1 1
   . . 0 0
   . . . 0
   . . . .]
codes for (line to column)
1) x1=x2
2) x1>x3
3) x1>x4
4) x2=x3
5) x2=x4
6) x3=x4

transitivity would give x1=x2=x3=x4=x5 but it does not agree with 2)

and 3)

if we want to get the maximum of true relations, we must write
x1>x2=x3=x4 that agrees with 2), 3), 4), 5) and 6)
how to get an algorithm that would give this relation ?
--
Boris
http://www.pi314.net


How it is possible, that you have: x1=x2=x3 and x1>x3?

we have x1=x2 and x2=x3 but not x1=x3
think about statistical tests for example, we can show that x1=x2, x2=x3 and x1>x3 significantly

Do you mean '>=' by '>'?

no, I must consider ">" and "=" because of the same reason (statistical tests)

The most simple algorithm I can think about is this (I think it should work):

First we find out which elements are equal. This is the same as to find
2-connected components of a digraph - there are some known algorithms
for this.

Then we identify all vertices which are in the same component to one
point. We can use the usal topological sort on the modified graph.

yes, so we must emphasize the equality case and consider x1=x3 in your opinion
but this would not work with my example because this would lead to forget a lot of "true relations". This becomes so a combinatorics optimization and I don't know how to do.
Thanks for your interest in my question by the way :-)
I supposed it was a usual problem and I discover it is not the case....



Martin


-- Boris http://www.pi314.net

.



Relevant Pages

  • Algorithm for license codes
    ... I know that posting here the details of a new algorithm would irk most of us, but this is the only place I know where I can ask for a reliable advice. ... I'm studying the feasibility of an algorithm based on public key cryptography that is suited for generating strong license codes for product activation. ... The public key part are the polynomials, the private part are an equivalent representation of the polynomials such that it's easy, given Y, to compute the reverse X = F^-1. ...
    (sci.crypt)
  • Re: A Revolutionary Breakthrough in Data Compression!
    ... What I have got is a minor improvement of the classic Huffman ... This is usually addressed by modifying the algorithm to arrange the ... even require rearrangement of the codes: ...
    (comp.compression)
  • Re: Generating a large sequence of unique, random numbers
    ... > Generate n unique codes of length l so that they are non-predictable. ... > whatsoever which algorithm to use or how to start in general. ... Luby-Rackoff construct, using F1..F4, producing L' and R'. ... Use that to encrypt the ...
    (sci.crypt)
  • Re: Adaptive Huffman algorithm with syllable compression?
    ... I had now a closer look at LZW algorithm and no it isn't LZW. ... 12 Bit long codes, and so on. ... I don't understand which element make you thinking about Adaptive Huffman. ... don't understand how the syllable compression is integrated in this. ...
    (comp.compression)
  • Re: sparse polynomial arithmetic
    ... Remaining within the boundaries of this representation (which are ... do arithmetics directly on codes ... perfect hash values in a hash set ... The algorithm first checks if the exponents of the polynomials to be ...
    (sci.math.symbolic)