In practice, a couple of (example_input_stream, example_output_stream)
pairs can locate a particular program (or algorithm). For example, the
example I/O pair ("3 2 7 4 1", "1 2 3 4 7") may locate integer sorting
algorithms.

So, generally speaking, if we have a fixed random byte sequence (FRBS),
and feed this FRBS as the input data to all the algorithms in our
collection, we can expect each algorithm A_i have its respective output
O_i. So, a user who wants to retrieve a desired algorithm can use FRBS
as an input and tell the computer his desired output O* (or some
fragments of O*). The computer then searches the output collection
{O_i} to find out the O_k that matches O*, and retrieve the
corresponding A_k, which may be the user's desired algorithm.

But to make this algorithm retrieval system really work, we may have to
first roughly classify all the algorithms into categories based on
their input formats. We will have categories like these:

{Algorithms that accept an integer sequence}
{Algorithms that accept a character string}
{Algorithms that accept an adjacency matrix (or simply matrix)}
...

Each category is associated with a preset example input stream in the
input format specified by this category, and all algorithms are pre-run
with this example input stream to generate their respective output
streams. So the user will first select an appropriate algorithm
category, and then see the preset example input for that category, and
then manually work out his desired output, and submit that desired
output to retrieve the algorithm(s) which have such output. A query can
also include additional criteria such as within how long time the
desired algorithm should run.

For example, a query is like this:

Select your algorithm category: [algorithms that accept an integer
sequence]
The standard example input for your selected category is: 3 2 7 4 1
Now enter your desired output for the above example input: [1 2 3 4 7]
Searching in progress...
1 result(s) found.
Result #1: Quicksort, 0.00 sec  <click here to view full code>



Could anyone imagine other potential applications of this idea?

Regards,
Yao Ziyuan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to