Programming Logic: Finding the smallest equation to a large number

前端 未结 8 1891
广开言路
广开言路 2021-01-03 00:51

I do not know a whole lot about math, so I don\'t know how to begin to google what I am looking for, so I rely on the intelligence of experts to help me understand what I am

8条回答
  •  天命终不由人
    2021-01-03 01:19

    While your question remains unclear, perhaps integer relation finding is what you are after.

    EDIT:

    There is some speculation that finding a "short" form is somehow related to the factoring problem. I don't believe that is true unless your definition requires a product as the answer. Consider the following pseudo-algorithm which is just sketch and for which no optimization is attempted.

    If "shortest" is a well-defined concept, then in general you get "short" expressions by using small integers to large powers. If N is my integer, then I can find an integer nearby that is 0 mod 4. How close? Within +/- 2. I can find an integer within +/- 4 that is 0 mod 8. And so on. Now that's just the powers of 2. I can perform the same exercise with 3, 5, 7, etc. We can, for example, easily find the nearest integer that is simultaneously the product of powers of 2, 3, 5, 7, 11, 13, and 17, call it N_1. Now compute N-N_1, call it d_1. Maybe d_1 is "short". If so, then N_1 (expressed as power of the prime) + d_1 is the answer. If not, recurse to find a "short" expression for d_1.

    We can also pick integers that are maybe farther away than our first choice; even though the difference d_1 is larger, it might have a shorter form.

提交回复
热议问题