Thread: Euler Cycle

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    1

    Question Euler Cycle

    Please can anyone help me write a program that finds an Euler cycle in a connected graph in which all vertices have even edges

  2. #2
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Erm, either read a book on graphics programming or do a google for it

  3. #3
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    Graphics programming? What do Euler cycles have to do with graphics programming?

    Generally speaking Nick, the human algorithm for finding Euler cyles is the following:

    1. Find a cycle from node X.
    2. From any node on your cycle (any node that has free edges), find a cycle from that node that only uses edges that are not yet part of your cycle. Then connect the two cycles into one.
    3. Go to step 1, unless there are no edges left.

    So now you still need to find an algorithm for finding a cycle in a graph.

    This algorithm should work for undirected graphs; I don't know about the directed kind. Finding a cycle in a graph can be done with a variation of depth-first search.
    Last edited by Rashakil Fol; 07-20-2005 at 09:57 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multigrid V cycle for PDE solver
    By lagnajita in forum C Programming
    Replies: 0
    Last Post: 03-06-2009, 03:40 AM
  2. Project Euler Solved but want help improving the code Newbie
    By whiterebbit in forum C++ Programming
    Replies: 4
    Last Post: 12-09-2008, 07:00 AM
  3. life cycle of exception object
    By George2 in forum C++ Programming
    Replies: 43
    Last Post: 02-13-2008, 07:50 AM
  4. Fidning a cycle in a directed graph.
    By apacz in forum C++ Programming
    Replies: 9
    Last Post: 10-31-2005, 04:22 PM
  5. Understanding the Window WinMain Cycle
    By BillBoeBaggins in forum Windows Programming
    Replies: 4
    Last Post: 12-06-2003, 12:49 PM