You are not logged in. Please login at www.codechef.com to post your questions!

×

Euler path

Hi, i am trying to solve http://www.spoj.com/problems/WORDS1/ on spoj,i came to know the problem is about checking the graph has euler path or not.
Any one please tell me how to check if a graph has euler path?

asked 18 Jul '15, 09:18

pallesai's gravatar image

4★pallesai
176830
accept rate: 17%

edited 18 Jul '15, 09:20


Check the following conditions for Euler path to exist:

  1. Graph should be connected
  2. There should be exactly one vertex with outdegree-indegree=1 (starting vertex)
  3. There should be exactly one vertex with indegree-outdegree=1 (final vertex)

To actually determine the euler path refer to this excellent tutorial.

Here is another excellent problem on Euler path to try.

link

answered 18 Jul '15, 10:07

ironmandhruv's gravatar image

4★ironmandhruv
333239
accept rate: 20%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×29
×23

question asked: 18 Jul '15, 09:18

question was seen: 1,682 times

last updated: 18 Jul '15, 10:07