Lost Password?


Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-17-2007, 06:40 PM
elle elle is offline
Newbie
 
Join Date: May 2007
Posts: 10
Rep Power: 0
elle is on a distinguished road
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 05-17-2007, 10:36 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,433
Last Blog:
Google Web Toolkit
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default

How about a Trie? Trie - Wikipedia, the free encyclopedia
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 07:00 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads