Number of steps for the best answer to the push box level

Source: Internet
Author: User
Definition of S (n, m)

For the push box, we define the function S (n, m) to indicate the size of (n + 2) x (m + 2) the number of steps to solve the most complicated is the number of steps for the best answer to the level of a box. The most complex here is to maximize the number of steps for the best answer.

S (x, 2)

 

    1. S (1, 2) = 0
    2. S (2, 2) = 0

There is no doubt about this.

S (x, 3)

    1. S (1, 3) = 1: d
    2. S (2, 3) = 5: ruwould
    3. S (3, 3) = 10: drruuldrdl

This is easy to prove.

S (x, 4)

    1. S (1, 4) = 2: dd
    2. S (2, 4) = 7: uruuldd
    3. S (3, 4) ≥ 13: drruuldrdlcould
    4. S (4, 4) ≥ 19: uuurrdrddlurulluldd

A little complicated.

S (x, 5)

    1. S (1, 5) = 3: ddd
    2. S (2, 5) = 10: luuruulddd
    3. S (3, 5) ≥ 15: ulluuurddrdlcould
    4. S (4, 5) ≥ 35: rddddrruuulrdddlluuluurddduurrdddll
    5. S (5, 5) ≥ 41: rddddrrruuullrrdddllluuluurddduurrrdddlll

This is already quite complicated.

S (x, 6)

    1. S (1, 6) = 4: dddd
    2. S (2, 6) = 12: luuuruuldddd
    3. S (3, 6) ≥ 25: lluuuuurdlddddrruuululddd
    4. S (4, 6) ≥ 44: rddddrruuulrdddlluuluurddduurrddddlllurrdruu
    5. S (5, 6) ≥ 58: lddddllluurlldddrrruuruulddduullldddrrdrrulllrruuulllddd
    6. S (6, 6) ≥ 77: Average

This is even more complicated and full of uncertainty.

B (n, m) Definition

We define a function B (n, m) as follows:

    • B (1, m) = m-2, when m> 0
    • B (n, m) = B (m, n), when m> 0, N> m
    • B (n, m) = B (n-1, m-1) + B (n-1, m), when m> 1, n> 1, n ≤ m

So we have the following table:

B (n, m)
N \ m 1 2 3 4 5 6
1 -1 0 1 2 3 4
2   -1 1 3 5 7
3     0 4 8 12
4       4 12 20
5         16 32
6           48
 
S (n, m)
N \ m 1 2 3 4 5 6
1 X 0 1 2 3 4
2   0 5 7 10 12
3     10 ≥13 ≥15 ≥ 25
4       ≥19 ≥35 ≥ 44
5         ≥41 ≥58
6           ≥77
SB Conjecture

Looking at the two tables in the previous section, we have a conjecture: S (n, m)≥B (n, m), which is also called Sb conjecture.

Calculate C # of B (n, m #Program

The following is the calculation of B (n,M) C # program computeb. CS:

 1   Using  System;  2   3   Sealed   Class  Computeb  4   {  5     Static   Void Main (String  [] ARGs)  6   {  7       VaR N = (ARGs. length> 0 )? Int . Parse (ARGs [ 0 ]): 6  ;  8       VaR M = (ARGs. length> 1 )? Int . Parse (ARGs [1  ]): N;  9 Console. writeline ( "  B ({0}, {1}) = {2: N0}  "  , N, m, B (n, m ));  10   }  11     12     Static   Long B ( Int N, Int  M) 13   {  14       If (N> m) Swap ( Ref N, Ref  M );  15       VaR B = New   Long [N + 1 , M + 1  ];  16       For (VaR M = 1 ; M <= m; m ++) B [ 1 , M] = m- 2  ;  17       For ( VaR N = 2 ; N <= N; n ++ )  18         For ( VaR M = N; m <= m; m ++ )  19 B [n, m] = B [n- 1 , M- 1 ] + B [n- 1  , M];  20       Return  B [n, m];  21   }  22     23     Static   Void Swap <t> ( Ref T x, Ref T y)  24   {  25       VaR T = X;  26 X = Y;  27 Y = T;  28   }  29 }

The running result is as follows:

E: \ work>Computeb 4 5B (4, 5) = 12e: \ work>ComputebB (6, 6) = 48e: \ work>Computeb 23B (23, 23) = 41,943,040

It can be seen that function B (n, m) is growing very fast.

A reward for a box pushing problem

In the box-pushing Forum, "a reward for a box-pushing question" says:

 
Under the classic push box game rule, the levels that meet the following three conditions have not yet been found: (1) within 50x50, including the wall as the boundary (2) there is exactly one box (of course there is also one goal) (3) the best answer is greater than or equal to step 100000 (100,000 ).BestThe answer is the answer with the least number of steps. Q: Does the push box level meet the preceding three conditions?
 
3. The answer will be sent directly via email to the yangchao0710@gmail.com. If you give a positive answer, you only need to provide the level file in xsb format. If a negative answer is provided, a strict proof is required.

If the above Sb conjecture is true, the answer is yes. If someone can prove Sb conjecture, it is likely that the level file in xsb format cannot be provided, and thus the reward cannot be obtained. :(

Further topics

In fact, the B (n, m) function is growing too fast, so the SB conjecture is not very reliable. A better way is to find a C (n, m) function that is not growing so fast, and then propose a more reliable SC conjecture: S (n, m) ≥c (n, m ).

S (n, m) Values exist objectively, but we only know a few S (n, m) values. For the vast majority (n, m ), we can only give the minimum value of S (n, m), and we can continuously improve this minimum value.

If we define a function T (n) = S (n, n), if a rich man gives a reward:

 
Individuals and organizations who have obtained the T (123456789) value before 2099-12-31 and proved the value is correct will be rewarded with a billion RMB.

Then, this bonus is very likely not to be paid out.

Definitions of P (n, m, k), Q (n, m, K), and R (n, m)

Further, we define the following functions:

    • P (n, m, k) indicates the number of steps for the best answers to the most complex levels with a size of (n + 2) x (m + 2.
    • Q (n, m, k) indicates the number of steps for the best answer to the most complex level of exactly K boxes whose size is (n + 2) x (m + 2.
    • R (n, m) = P (n, m, n * m), indicating the size of (n + 2) x (m + 2) number of steps for the optimal answer to the most complex level that can be solved.
    • S (n, m) = Q (n, m, 1), indicating the size of (n + 2) x (m + 2) the number of steps to solve the most complicated is the number of steps for the best answer to the level of a box.

Obviously, R (n, m) ≥s (n, m) is also worth studying.

References
    1. A reward for a box pushing problem
    2. HTML5 sokoban
    3. Introduction to xsb and LURD formats
    4. Ben's home | skyiv Studio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.