请输入您要查询的百科知识:

 

词条 Four fours
释义

  1. Rules

  2. Solutions

  3. Algorithmics of the problem

  4. Excerpt from the solution to the five fives problem

  5. Excerpt from the solution to the six sixes problem

  6. See also

  7. References

  8. External links

Four fours is a mathematical puzzle. The goal of four fours is to find the simplest mathematical expression for every whole number from 0 to some maximum, using only common mathematical symbols and the digit four (no other digit is allowed). Most versions of four fours require that each expression have exactly four fours, but some variations require that each expression have the minimum number of fours.

The first printed occurrence of the specific problem of four fours is in An Illustrated Magazine of Science in 1881.[1]

W. W. Rouse Ball described it in the 6th edition (1914) of his Mathematical Recreations and Essays. In this book it is described as a "traditional recreation".[2]

Rules

There are many variations of four fours; their primary difference is which mathematical symbols are allowed. Essentially all variations at least allow addition ("+"), subtraction ("−"), multiplication ("×"), division ("÷"), and parentheses, as well as concatenation (e.g., "44" is allowed). Most also allow the factorial ("!"), exponentiation (e.g. "444"), the decimal point (".") and the square root ("√") operation. Other operations allowed by some variations include the reciprocal function ("1/x"), subfactorial ("!" before the number: !4 equals 9), overline (an infinitely repeated digit), an arbitrary root, the square function ("sqr"), the cube function ("cube"), the cube root, the gamma function (Γ(), where Γ(x) = (x − 1)!), and percent ("%"). Thus

etc.

A common use of the overline in this problem is for this value:

Typically the "log" operators or the successor function are not allowed, since there is a way to trivially create any number using them. Paul Bourke credits Ben Rudiak-Gould with this description of how natural logarithms (ln(n)) can be used to represent any positive integer n as:

Additional variants (usually no longer called "four fours") replace the set of digits ("4, 4, 4, 4") with some other set of digits, say of the birthyear of someone. For example, a variant using "1975" would require each expression to use one 1, one 9, one 7, and one 5.

Solutions

Here is a set of four fours solutions for the numbers 0 through 25, using typical rules. Some alternate solutions are listed here, although there are actually many more correct solutions. The entries in blue are those that use four integers 4 (rather than four digits 4) and the basic arithmetic operations. Numbers without blue entries have no solution under these constraints. Additionally, solutions that repeat operators are marked in italics.

  0  {{red|{{=}}}}  {{blue|4 ÷ 4 × 4 − 4}}  {{red|{{=}}}}   44 − 44  1  {{red|{{=}}}}  {{blue|4 ÷ 4 + 4 − 4}}  {{red|{{=}}}}   44 ÷ 44  2  {{red|{{=}}}}  {{blue|4 −(4 + 4)÷ 4}}  {{red|{{=}}}}  (44 + 4) ÷ 4!  3  {{red|{{=}}}} {{blue|(4 × 4 − 4)÷ 4}}  {{red|{{=}}}}  {{blue|(4 + 4 + 4) ÷ 4}}  4  {{red|{{=}}}}  {{blue|4 + 4 ×(4 − 4)}} {{red|{{=}}}}  −44 + 4! + 4!  5  {{red|{{=}}}} {{blue|(4 × 4 + 4)÷ 4}}  {{red|{{=}}}}  (44 − 4!) ÷ 4  6  {{red|{{=}}}} ''{{blue|(4 + 4)÷ 4 + 4}}''  {{red|{{=}}}}   4.4 + 4  ×.4  7  {{red|{{=}}}}  {{blue|4 + 4 − 4 ÷ 4}}  {{red|{{=}}}}   44 ÷ 4  − 4  8  {{red|{{=}}}}  {{blue|4 ÷ 4 × 4 + 4}}  {{red|{{=}}}}   4.4 − .4  + 4  9  {{red|{{=}}}}  ''{{blue|4 ÷ 4 + 4 + 4}}''  {{red|{{=}}}}   44 ÷ 4  − √4 10  {{red|{{=}}}}  4 ÷√4 + 4 ×√4  {{red|{{=}}}}  (44 − 4) ÷ 4 11  {{red|{{=}}}} (4!×√4 - 4)÷ 4  {{red|{{=}}}}  √4 × (4! - √4) ÷ 4 12  {{red|{{=}}}}  {{blue|4 ×(4 − 4 ÷ 4)}} {{red|{{=}}}}  (44 + 4) ÷ 4 13  {{red|{{=}}}} (4!×√4 + 4)÷ 4  {{red|{{=}}}}  (4 − .4) ÷ .4 + 4 14  {{red|{{=}}}}  4 × 4 - 4 ÷√4  {{red|{{=}}}}   4 × (√4 + √4) - √4 15  {{red|{{=}}}}  {{blue|4 × 4 − 4 ÷ 4}}  {{red|{{=}}}}   44 ÷ 4  + 4 16  {{red|{{=}}}}  {{blue|4 × 4 + 4 − 4}}  {{red|{{=}}}}  (44 − 4) ×.4 17  {{red|{{=}}}}  {{blue|4 × 4 + 4 ÷ 4}}  {{red|{{=}}}}  (44 + 4!)÷ 4 18  {{red|{{=}}}}  4 × 4 + 4 −√4  {{red|{{=}}}}  (44 ÷ √4) − 4 19  {{red|{{=}}}}  4!−(4 + 4 ÷ 4) {{red|{{=}}}}  (4 + 4 − .4) ÷ .4  20  {{red|{{=}}}}  {{blue|4 ×(4 ÷ 4 + 4)}} {{red|{{=}}}}  (44 − 4) ÷ √4 21  {{red|{{=}}}}  4!- 4 + 4 ÷ 4  {{red|{{=}}}}  (44 − √4) ÷ √4 22  {{red|{{=}}}}  4!÷ 4 + 4 × 4  {{red|{{=}}}}   44 ÷ (4 − √4) 23  {{red|{{=}}}}  4!+ 4 ÷ 4 −√4  {{red|{{=}}}}  (44 + √4) ÷ √4 24  {{red|{{=}}}}  ''{{blue|4 × 4 + 4 + 4}}''  {{red|{{=}}}}  (44 + 4) ÷ √4 25  {{red|{{=}}}}  4!- 4 ÷ 4 +√4  {{red|{{=}}}}  (4 + 4 + √4) ÷ .4

There are also many other ways to find the answer for all of these.

Note that numbers with values less than one are not usually written with a leading zero. For example, "0.4" is usually written as ".4". This is because "0" is a digit, and in this puzzle only the digit "4" can be used.

A given number will generally have a few possible solutions; any solution that meets the rules is acceptable. Some variations prefer the "fewest" number of operations, or prefer some operations to others. Others simply prefer "interesting" solutions, i.e., a surprising way to reach the goal.

Certain numbers, such as 113, are particularly difficult to solve under typical rules. For 113, Wheeler suggests .[3] A non-standard solution is , where 4' is the multiplicative inverse of 4. (i.e. )

The use of percent ("%") admits solutions for a much greater proportion of numbers; for example, 113 = ({{radic|4}} + ({{radic|4}} + 4!)%) ÷ ({{radic|4}})%.

Algorithmics of the problem

This problem and its generalizations (like the five fives and the six sixes problem, both shown below) may be solved by a simple algorithm. The basic ingredients are hash tables that map rationals to strings. In these tables, the keys are the numbers being represented by some admissible combination of operators and the chosen digit d, e.g. four, and the values are strings that contain the actual formula. There is one table for each number n of occurrences of d. For example, when d=4, the hash table for two occurrences of d would contain the key-value pair 8 and 4+4, and the one for three occurrences, the key-value pair 2 and (4+4)/4 (strings shown in bold).

The task is then reduced to recursively computing these hash tables for increasing n, starting from n=1 and continuing up to e.g. n=4. The tables for n=1 and n=2 are special, because they contain primitive entries that are not the combination of other, smaller formulas, and hence they must be initialized properly, like so (for n=1)

          T[4]    := "4";        T[4/10] := ".4";        T[4/9]  := ".4...";

and

(for n=2). Now there are two ways in which new entries may arise, either as a combination of existing ones through a binary operator, or by applying the factorial or square root operators (which does not use additional instances of d). The first case is treated by iterating over all pairs of subexpressions that use a total of n instances of d. For example, when n=4, we would check pairs (a,b) with a containing one instance of d and b three, and with a containing two instances of d and b two as well. We would then enter a+b, a-b, b-a, a*b, a/b, b/a) into the hash table, including parenthesis, for n=4. Here the sets A and B that contain a and b are calculated recursively, with n=1 and n=2 being the base case. Memoization is used to ensure that every hash table is only computed once.

The second case (factorials and roots) is treated with the help of an auxiliary function, which is invoked every time a value v is recorded. This function computes nested factorials and roots of v up to some maximum depth, restricted to rationals.

The last phase of the algorithm consists in iterating over the keys of the table for the desired value of n and extracting and sorting those keys that are integers. This algorithm was used to calculate the five fives and six sixes examples shown below. The more compact formula (in the sense of number of characters in the corresponding value) was chosen every time a key occurred more than once.

Excerpt from the solution to the five fives problem

 139 = (((5+(5/5))!/5)-5) 140 = (.5*(5+(5*55))) 141 = ((5)!+((5+(5+.5))/.5)) 142 = ((5)!+((55/.5)/5)) 143 = ((((5+(5/5)))!-5)/5) 144 = ((((55/5)-5))!/5) 145 = ((5*(5+(5*5)))-5) 146 = ((5)!+((5/5)+(5*5))) 147 = ((5)!+((.5*55)-.5)) 148 = ((5)!+(.5+(.5*55))) 149 = (5+(((5+(5/5)))!+5))

Excerpt from the solution to the six sixes problem

In the table below, the notation .6... represents the value 6/9 or 2/3 (recurring decimal 6).

 241 = ((.6+((6+6)*(6+6)))/.6) 242 = ((6*(6+(6*6)))-(6/.6)) 243 = (6+((6*(.6*66))-.6)) 244 = (.6...*(6+(6*(66-6)))) 245 = ((((6)!+((6)!+66))/6)-6) 246 = (66+(6*((6*6)-6))) 247 = (66+((6+((6)!/.6...))/6)) 248 = (6*(6+(6*(6-(.6.../6))))) 249 = (.6+(6*(6+((6*6)-.6)))) 250 = (((6*(6*6))-66)/.6) 251 = ((6*(6+(6*6)))-(6/6))

See also

  • Krypto (game)

References

1. ^Pat Ballew, [https://pballew.blogspot.com/2018/12/before-there-were-four-fours-there-were.html Before there were Four-Fours, there were four threes, and several others], Pat'sBlog, 30 December 2018.
2. ^{{cite book|last1=Ball|first1=Walter William Rouse|title=Mathematical Recreations and Essays, page 14|edition=6th|url=https://archive.org/stream/mathematicalrecr00ball#page/14/mode/2up}}
3. ^ 

External links

  • {{cite web|first1=Paul | last1=Bourke|url=http://paulbourke.net/fun/4444/

|title=Four Fours Problem}}
  • {{cite web|url=http://mathforum.org/ruth/four4s.puzzle.html |last1=Carver | first1=Ruth

|title=Four Fours Puzzle}} at MathForum.org
  • {{cite web|url=http://www.eyegate.com/showgal.php?id=7 |title= 4444 (Four Fours)}} Eyegate Gallery.
  • {{GitHub|saibaba/four4s}}
  • {{cite web|url=http://www.p2sis.com/educationgames/four-fours/maths-four-fours-game.html

|title=Online Implementation of the Four Fours Game}}{{DEFAULTSORT:Four Fours}}

1 : Mathematical games

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/17 21:09:21