Closed Thread
Results 1 to 2 of 2

Thread: Finding non-standard sorting order via graph theory

  1. #1
    elle is offline Newbie
    Join Date
    May 2007
    Posts
    10
    Rep Power
    0

    Finding non-standard sorting order via graph theory

    Hi,

    i'd like to ask you for some help with my problem. I need to find non-standard sorting order within some words. What do I mean non-standard order ? Standard sorting order is A..Z or Z..A. Non-standard is for example C,H,K,L,..Z. The solution of the problem should lie under theory of graphs.

    For example some input/output:

    Input: deer,deerp,ee,ers,rrp,sz

    So in the case of input above the output (found non-standard order) will be
    DERPSZ. Input is sorted with "unknown" non-standard sorting order.

    My rough solution is something like that: First enumerate all unique char in each word and next look for ancestor/descendant inside graph.

    deer : DER
    deerp : DERP
    ee : E
    ers : ERS
    rrp : RP
    sz : SZ

    Any idea ? Or just tip for algorithm ? Thanks in advance

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Intermediate New Sorting - with order arrays
    By fayyazlodhi in forum C Tutorials
    Replies: 2
    Last Post: 11-10-2011, 12:44 AM
  2. Graph in reverse order
    By vasil_9x in forum C and C++
    Replies: 1
    Last Post: 05-26-2011, 04:19 PM
  3. Datalog Queries for Transitive Closure (Graph Theory)
    By kzahid in forum Programming Theory
    Replies: 4
    Last Post: 10-12-2010, 10:55 PM
  4. Algorithms and Graph theory help
    By Stor in forum General Programming
    Replies: 0
    Last Post: 05-08-2010, 02:46 PM
  5. Graph theory: finding all paths
    By Squeezy in forum General Programming
    Replies: 3
    Last Post: 01-05-2009, 08:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts