Finding an algorithm - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Finding an algorithm

Posts: 2Member
Right, first off I am not an advanced programmer and am self taught in what I do know so please keep that in mind.

is it possible to reverse engineer an algorithm, if I had an output code based on multiple events and had all of these events logged and also had multiple instances of this code and the events. Would it be possible to:

a) Write a program that takes all of the data I have collected (output code and input data) and work out the algorithm used to create that code.

b) Use the algorithm with my own input data to create my own codes.

And how would I go about writing a program to do this?

• Posts: 254Member ✭✭
: Right, first off I am not an advanced programmer and am self taught
: in what I do know so please keep that in mind.
:
: is it possible to reverse engineer an algorithm, if I had an output
: code based on multiple events and had all of these events logged and
: also had multiple instances of this code and the events. Would it be
: possible to:
:
: a) Write a program that takes all of the data I have collected
: (output code and input data) and work out the algorithm used to
: create that code.
:
: b) Use the algorithm with my own input data to create my own codes.
:
: And how would I go about writing a program to do this?
:

It's harder than you might imagine.

Say input is 2, 3 then 5, 4 then 3, 3 and output is 5, 9, 6. Any human will instnatly twig that the operation must be addition. However it is almost impossible to get a computer to think in a flexible way.

• Posts: 2Member

: Say input is 2, 3 then 5, 4 then 3, 3 and output is 5, 9, 6. Any
: human will instnatly twig that the operation must be addition.
: However it is almost impossible to get a computer to think in a
: flexible way.
:
:
:
Basically as a struggling student I was going go have a go at putting free electricity into the meter. I have all the slips for the last few years and in each there is a code you put in to the machine. I imagine the code is an algorithm based on the amount, time, date, card no. and maybe the shop. I have religiously purchased electricity from my local shop and saved all these receipts.

I know that this is morally wrong but when I have finished studying and am actually earning money I will happily pay my way. Until then its shoestring budget and a short course in electricianing