# Backing into a problem

Is it possible to back your way into a problem?

I want to supply an integer and then produce an equation for that.

694 = 26^2 + 4^2 + 2

I would like to reduce the equation size to the most efficient possible.

edit retag close merge delete

2

I think you would need to make the problem much more specific before it could become tractable. What kinds of ingredients and operations are allowed on the right side? How do you measure efficiency? And even once you specify this, unless your rules are pretty restrictive, I'm afraid that it's the kind of problem for which there won't be a neat, clean answer. Sorry.

( 2012-03-22 09:53:23 -0600 )edit

On the right side only integer math(powers, addition, subtraction). Efficiency is the fewest number of characters(operations) in the equation. 2^2+2^2+2^2+2^2 is not as efficient as 4^2

( 2012-03-22 10:14:35 -0600 )edit
1

n=n looks pretty efficient to me.

( 2012-03-22 13:44:17 -0600 )edit

I will need to produce an equation for a super large integer (1000+), so n=n is not so efficient.

( 2012-03-23 10:38:26 -0600 )edit

So give us an example of exactly what you want to do, so we have some idea what "efficient" means. Or perhaps define "efficient" in this context. Why is 1025=1025 any less efficient than 1025=2^10 + 1?

( 2012-03-23 15:18:30 -0600 )edit