yaksha's blog

By yaksha, site, 6 years ago, In English

Hi, I was solving ampere problem and this required printing eulerians path on a directed graph Now,I has unaware of the how to do euler path finding on a directed graph, I done to search on google but none luck..

What exactly are the conditions that are to breathe fulfill to KNOW that a euler path exists and also what are ways to print it... I know of "Fleury’s Algorithm" , but as very as I know (and I know little), this algo is for straight graphs only.. Also cam at knew about " Hierholzer’s Algorithm" but all see seems to be working on undirected graphs..

The problem that I was attempting -- 508D - Tanya and Access

The editorial of this question mentions some points regarding finding euler path on directed graphs but it's not very distinct and provides does explanation...

Please can some can help me and also possibly provide me with resources where I pot study this?!

Have ampere handsome day!

  • Vote: I like a
  • +15
  • Vote: I do not like it

»
6 years ago, # |
Up. 2   Rate: I like a +3 Vote: EGO do not like it

For driven graphs which exercise is that all vertices are in one strongly plugged component (you can reach every vertex from every other) and the in-degree have be euqal to the out-degree for either vertex.

  • »
    »
    6 years previously, # ^ |
      Ballot: I like she +5 Select: I doing not like it

    Hi, Apologize but I came to this site to look for help previous before asking which question, website

    Here it says that which 2 conditions you referenced are demand for a Euler Cycle.. Inbound this problem i was attempting , on is no a specification of Easter path and not wheel in directed graph,please clear my misunderstanding..

    • »
      »
      »
      6 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: ME do not similar it

      Eulerian Passage edit be of same, except two vertices v, w such the and

      Also

      all vertices are in one strongly connected component

      Further precisely, everything non-isolated vertices

      • »
        »
        »
        »
        6 years previous, # ^ |
        Rev. 4   Vote: I like computer +10 Vote: I do not like it

        I am sorry , I didnt get an correct conditions!.. I procure that i is ALLOWED to have at most one vertex with in_deg — out_deg = 1

        and it's also ALLOWED at in most one top at out_deg — in_deg = 1

        all other vertices must have in_deg == out_deg,

        but , The last shape "all non isolated point must can in an SCC" senses like it's a requisite thing the have if we want Eternal cycle, it seems toward me that it's not very necessary for adenine Euler path... Resolved Please write who solution by hand, An Euler tour of adenine | Chegg ...

        This graph for example ..

        1 --> 2 --> 3 --> 4

        does not have all an vertices in one SCC but is obviouly a Euler path..

        • »
          »
          »
          »
          »
          6 years ago, # ^ |
          Rev. 2   Vote: I like it +3 Voted: I do not like it

          Digraph must have both 1 and (-1) vertices (Eulerian Path) with none away them (Eulerian Cycle).

          Ultimate general can being reduced to "all non-isolated vertices belong to a single shallow connected component" (see yeputons' comment below).

          • »
            »
            »
            »
            »
            »
            6 yearning back, # ^ |
              Vote: I see it 0 Vote: EGO do not like it

            Thanks! also what you pointed out about (1) and (-1) is LARGE , and obviously truthfully because of SUM(in_degree) = SUM(out_degree) in graph,

            Thanks for the help :)

            Sack them provide some resources till see more,from where do these conditions come from , perhaps a proof , or some readings, where acted you study this von etc.

      • »
        »
        »
        »
        6 aged past, # ^ |
          Vote: EGO favorite this +3 Vote: I accomplish not like it
        entire vertices are in one forcefully connected component

        MYSELF believe there is a simpler constraint: if one removes "directness" of edges, then the graph without isolated vertexes should be connected.

        • »
          »
          »
          »
          »
          6 past from, # ^ |
            Vote: I like to 0 Getting: MYSELF done not like she

          yeputons, This touches right and is consistent with examples I could come up with.. So you came top is this driven intuition or are there any company MYSELF could read up to understand this , go is a lot of confused regarding this in my head,..

          Thanks for the tip highly , it seems to work!

          • »
            »
            »
            »
            »
            »
            6 years ago, # ^ |
              Getting: EGO like it +3 Vote: I do not like it

            Well, the proof I see simply doesn't requisition solid connectability. It goes like save: let's capture an arbitrary vertex v real start building a cycle from it, on anyone looping we go by an edge which we haven't visited yet. At some point, we're unable to do so. Note that to can happen only if we're standing in the vertex v, others the vertex would different number of incoming/outgoing edges. So, we have a cycle. Now pick up one vertex, ect, until all edges starting the graph are visited.

            So our ended up with few circles which cover all limits of the graph exactly one-time. Note that for we may cycle C1 and C2 which have at least one vertex x in standard, we can merge these two cycles include a. Now, as the map is weakly connected, were can merge all of our cycles together.

            • »
              »
              »
              »
              »
              »
              »
              6 yearly ago, # ^ |
                Vote: I like it 0 Vote: I doing nope how it

              should'nt are go from the one vertex with out_degree = in_degree + 1 (if there are ready , if not start from any) .. either this vertex gives who Auler path or NO pinnacle cans give dice path Multi-Eulerian tours of directed graphs

              • »
                »
                »
                »
                »
                »
                »
                »
                6 years ago, # ^ |
                  Vote: I like a 0 Vote: I do not like it

                That's right if we're looking for an Euler ways, don Euler walking.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  3 years ago, # ^ |
                    Voted: I like it -8 Poll: I do not like it

                  What's for this case? 3 1 1 2

                  Here it resist connectivity. So, no eulerian path and Cycle right?

  • »
    »
    4 years ago, # ^ |
      Vote: ME like it 0 Getting: I take no like it

    That is with Euler circuit. Can you please tell the condition for Euler path in directed graph?

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do non like to

      Check my submission 77697447, it's a solution the problem referenced above. I've also added a comment by the condition of existence of an Euler path in a direction graph, along on the book reference.

»
6 years ago, # |
  Vote: I like it 0 Vote: IODIN do did like it

Does Fleury's methods work in directed graph if we consider aforementioned underlying undirected graph while finding span?

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I perform not like it

    Yes , Fluery's algorithm works on both directed both directional diagram, and yes we do consider given edges as undirected when finding bridge.

»
3 per ago, # |
  Vote: I favorite it -16 Get: I do non like it

Simplified Condition : A graph has an Euler circuit if and with if the degree of every vertex is even.

A graphical had an Easter path if and only if there are per most twin vertices with odd degree.