Edmund Landau: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Waacstats
Add persondata short description using AWB
 
en>SoSivr
added doctoral student
 
Line 1: Line 1:
The '''McCarthy 91 function''' is a [[Recursion (computer science)|recursive function]], defined by the [[computer scientist]] [[John McCarthy (computer scientist)|John McCarthy]] as a test case for [[formal verification]] within [[computer science]].
How can you ever test drive them all? Just obtain the [https://gracil.dk/blogs/554179/708777/hostgator-email-outlook HostGator 1 cent coupon] and avail all of the services of a regular package at free of price for a month. That's quite an advantage when you're planning to create a huge web application. A reseller package is usually the best thing for a novice to choose because it gives the beginner room to grow. However environmental sustainability is just as critical. Also, you can save huge amount of money by getting the HostGator coupon from this company. I wish I would have done it earlier but was hesitant I wans't up to the technical aspects of self hosting a blog, using Wordpress, etc. The prices of different plans relate to efficiency of space provided, and the underlying monetary value. Most recently the Host Gator went green to support the environment. Here is a agreeable logic why HostGator has won scores of awards also why they are so widely liked by internet marketers as well as entrepreneurs all over the planet.<br><br><br><br>That is the best option in web hosting. Hostgator Is one of the largest and most popular website hosting companies on the Internet. Services Offered by the Company On a purely technical perspective, HostGator has responded quickly and efficiently to the diverse needs of both small scale and corporate organizations. When the [http://www.wordreference.com/definition/mouse+scrolls mouse scrolls] over them the ad [http://mondediplo.com/spip.php?page=recherche&recherche=appears appears]. A provider like GoDaddy or HostGator is good for the novice site builder. Just because a company is a well-known name on the market doesn't mean that they can't give you the best price out there, while on the other hand it also doesn't mean that you should automatically trust their services. With wordpress, learning to create or edit content is generally fairly simple. These software tools do have need of particular investment, however bank on me you will earn your cash in trade tenfold in nix time at all.
 
The McCarthy 91 function is defined as
 
:<math>M(n)=\left\{\begin{matrix} n - 10, & \mbox{if }n > 100\mbox{ } \\ M(M(n+11)), & \mbox{if }n \le 100\mbox{ } \end{matrix}\right.</math>
 
The results of evaluating the function are given by ''M''(''n'')&nbsp;=&nbsp;91 for all integer arguments ''n''&nbsp;≤&nbsp;100, and ''M''(''n'')&nbsp;=&nbsp;''n''&nbsp;&minus;&nbsp;10 for ''n'' ≥ 101.
 
==History==
The 91 function was introduced in papers published by [[Zohar Manna]], [[Amir Pnueli]] and [[John McCarthy (computer scientist)|John McCarthy]] in 1970.  These papers represented early developments towards the application of [[formal methods]] to [[formal verification|program verification]].  The 91 function was chosen for having a complex recursion pattern (contrasted with simple patterns, such as defining <math>f(n)</math> by means of <math>f(n-1)</math>). The example was popularized by Manna's book, ''Mathematical Theory of Computation'' (1974). As the field of Formal Methods advanced, this example appeared repeatedly in the research literature.
In particular, it is viewed as a "challenge problem" for automated program verification.
 
Often, it is easier to reason about non-recursive computation. As one of the examples used to demonstrate such reasoning, Manna's book includes a non-recursive algorithm that simulates the original (recursive) 91 function. Many of the papers that report an "automated verification" (or [[termination proof]]) of the 91 function only handle the non-recursive version.
 
A formal derivation of the non-recursive version from the recursive one was given in a 1980 article by [[Mitchell Wand]], based on the use of [[continuation]]s.
 
==Examples==
Example A:
 
M(99) = M(M(110)) since 99 ≤ 100
      = M(100)    since 110 > 100
      = M(M(111)) since 100 ≤ 100
      = M(101)    since 111 > 100
      = 91        since 101 > 100
 
Example B:
 
M(87) = M(M(98))
      = M(M(M(109)))
      = M(M(99))
      = M(M(M(110)))
      = M(M(100))
      = M(M(M(111)))
      = M(M(101))
      = M(91)
      = M(M(102))
      = M(92)
      = M(M(103))
      = M(93)
    .... Pattern continues
      = M(99)
      (same as example A)
      = 91
 
==Code==
Here is an implementation of the recursive algorithm in [[Lisp programming language|Lisp]]:
 
<source lang="lisp">
(defun mc91 (n)
  (cond ((<= n 100) (mc91 (mc91 (+ n 11))))
        (t (- n 10))))
</source>
 
Here is an implementation of the recursive algorithm in [[Python (programming language)|Python]]:
<source lang="python">
def m91(n):
    if n > 100:
        return n - 10
    else:
        return m91(m91(n + 11))
</source>
 
Here is an implementation of the recursive algorithm in [[C (programming language)|C]]:  
 
<source lang="c">
int mc91(int n)
{
    if (n > 100) {
        return n - 10;
    } else {
        return mc91(mc91(n+11));
    }
}
</source>
 
Here is an implementation of the non-recursive algorithm in [[C (programming language)|C]]:  
 
<source lang="c">
int mccarthy(int n)
{
    int c;
    for (c = 1; c != 0; ) {
        if (n > 100) {
            n = n - 10;
            c--;
        } else {
            n = n + 11;
            c++;
        }
    }
    return n;
}
</source>
 
==Proof==
Here is a proof that the function behaves as expected.
 
For 90 ≤ ''n'' &lt; 101,
 
M(n) = M(M(n + 11))
      = M(n + 11 - 10), where n + 11 >= 101 since n >= 90
      = M(n + 1)
 
So ''M''(''n'') = 91 for 90 ≤ ''n'' &lt; 101.
 
We can use this as a base case for [[Inductive proof|induction]] on blocks of 11 numbers, like so:
 
Assume that ''M''(''n'') = 91 for ''a'' ≤ ''n'' &lt; ''a'' + 11.
 
Then, for any ''n'' such that ''a'' - 11 ≤ ''n'' &lt; ''a'',
 
M(n) = M(M(n + 11))
      = M(91), by hypothesis, since a ≤ n + 11 < a + 11
      = 91, by the base case.
 
Now by induction ''M''(''n'') = 91 for any ''n'' in such a block. There are no holes between the blocks, so ''M''(''n'') = 91 for ''n'' &lt; 101. We can also add ''n'' = 101 as a special case.
 
== Knuth's generalization ==
 
[[Donald Knuth]] generalized the 91 function to include additional parameters. [[John Cowles]] developed a formal proof that Knuth's generalized function was total, using the [[ACL2]] theorem prover.
 
== References ==
* {{cite journal | author=Zohar Manna and Amir Pnueli | title=Formalization of Properties of Functional Programs  | journal=Journal of the ACM | year=1970 | volume=17 | issue=3 | month=July | pages=555–569 | doi=10.1145/321592.321606}}
* {{cite journal | author=Zohar Manna and John McCarthy | title=Properties of programs and partial function logic  | journal=Machine Intelligence | year=1970 | volume=5 }}
* Zohar Manna. ''Mathematical Theory of Computation.'' McGraw-Hill Book Company, New-York, 1974. Reprinted in 2003 by Dover Publications.
* {{cite journal | author=Mitchell Wand | title=Continuation-Based Program Transformation Strategies | journal=Journal of the ACM | year=1980 | volume=27 | issue=1 | month=January | pages=164–180 | doi=10.1145/322169.322183}}
* {{cite journal | author = Donald E. Knuth | title = Textbook Examples of Recursion | year = 1991 | journal = Artificial intelligence and mathematical theory of computation | arxiv = cs/9301113}}
* {{cite book | author = John Cowles | chapter = Knuth's generalization of McCarthy's 91 function
| title = Computer-Aided reasoning: ACL2 case studies | publisher = Kluwer Academic Publishers
| year = 2000 | pages = 283–299 | url = http://www.cs.utexas.edu/users/moore/acl2/workshop-1999/Cowles-abstract.html}}
 
{{John McCarthy navbox}}
[[Category:Formal methods]]
[[Category:Recurrence relations]]

Latest revision as of 00:14, 6 January 2015

How can you ever test drive them all? Just obtain the HostGator 1 cent coupon and avail all of the services of a regular package at free of price for a month. That's quite an advantage when you're planning to create a huge web application. A reseller package is usually the best thing for a novice to choose because it gives the beginner room to grow. However environmental sustainability is just as critical. Also, you can save huge amount of money by getting the HostGator coupon from this company. I wish I would have done it earlier but was hesitant I wans't up to the technical aspects of self hosting a blog, using Wordpress, etc. The prices of different plans relate to efficiency of space provided, and the underlying monetary value. Most recently the Host Gator went green to support the environment. Here is a agreeable logic why HostGator has won scores of awards also why they are so widely liked by internet marketers as well as entrepreneurs all over the planet.



That is the best option in web hosting. Hostgator Is one of the largest and most popular website hosting companies on the Internet. Services Offered by the Company On a purely technical perspective, HostGator has responded quickly and efficiently to the diverse needs of both small scale and corporate organizations. When the mouse scrolls over them the ad appears. A provider like GoDaddy or HostGator is good for the novice site builder. Just because a company is a well-known name on the market doesn't mean that they can't give you the best price out there, while on the other hand it also doesn't mean that you should automatically trust their services. With wordpress, learning to create or edit content is generally fairly simple. These software tools do have need of particular investment, however bank on me you will earn your cash in trade tenfold in nix time at all.