Backing into a problem

asked 13 years ago

Shirley99 gravatar image

updated 13 years ago

Is it possible to back your way into a problem?

Task:

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.

Preview: (hide)

Comments

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.

jdc gravatar imagejdc ( 13 years ago )

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

Shirley99 gravatar imageShirley99 ( 13 years ago )
1

`n=n` looks pretty efficient to me.

John Palmieri gravatar imageJohn Palmieri ( 13 years ago )

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

Shirley99 gravatar imageShirley99 ( 13 years ago )

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`?

John Palmieri gravatar imageJohn Palmieri ( 13 years ago )