Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need help with a programming algorithm
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
darklord1337




PostPosted: Mon Nov 16, 2009 10:22 am   Post subject: Need help with a programming algorithm

I'm currently searching for an algorithm that is commonly found within programming contests such as the CCC, ECOO, DWITE, etc.

To be specific, it is a searching algorithm used in programming contests to search a grid for the existance of certain elements.

Your help would be appreciated
Thanks
Sponsor
Sponsor
Sponsor
sponsor
jbking




PostPosted: Mon Nov 16, 2009 12:47 pm   Post subject: Re: Need help with a programming algorithm

I'm sorry but that isn't specific at all, at least to my mind. All I know of what you've given is that there exists a set of elements that can be arranged in a grid formation. How many dimensions is the grid? What is an element of the grid? What are "certain elements"?

Some ideas given so little information though:

A classic approach would be a brute force, examine each element assuming the grid can be organized in some countable fashion. Divide and conquer would be another suggestion for forming an algorithm but you may have to give more details as otherwise what you have isn't any different from finding the minimum value in a set to my mind. Dynamic programming may work in some cases for yet another possibility.
darklord1337




PostPosted: Tue Nov 17, 2009 7:32 pm   Post subject: Re: Need help with a programming algorithm

Essencially, I need an algorithm programs such as : (number 3 on the CCC) follow.

In specific, I need a general algorithm that works when searching for something specific (in this case being characters) , that is used to determine what to do next.

The solution for the proglem is located here:

If anyone could help - it would be wonderful
(I personally suck at explaining things like this, so .. *dont kill me*)
jbking




PostPosted: Wed Nov 18, 2009 10:22 am   Post subject: Re: Need help with a programming algorithm

Graph Traversal is a well-studied topic with a variety of different ideas taken to try to solve it, including breadth-first search and depth-first search to name a couple of different ideas. There are other approaches like Dynamic Programming or types of games like Search Games that could also be useful for studying these topics.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: