Many mutual exclusion algorithms are verified using computer programs. Briefly outline how these programs manage to verify that a certain algorithm is correct.
In theoretical computer science, correctness of an algorithm is asserted when it is said that the algorithm is correct with respect to a specification. Functional correctness refers to the input-output behaviour of the algorithm (i.e., for each input it produces the expected output).
A distinction is made between total correctness, which additionally requires that the algorithm terminates, and partial correctness, which simply requires that if an answer is returned it will be correct. Since there is no general solution to the halting problem, a total correctness assertion may lie much deeper. A termination proof is a type ofmathematical proof that plays a critical role in formal verification because total correctness of an algorithm depends on termination.
For example, successively searching through integers 1, 2, 3, … to see if we can find an example of some phenomenon — say an odd perfect number — it is quite easy to write a partially correct program (using long division by two to check n as perfect or not). But to say this program is totally correct would be to assert something currently not known innumber theory.
A proof would have to be a mathematical proof, assuming both the algorithm and specification are given formally. In particular it is not expected to be a correctness assertion for a given program implementing the algorithm on a given machine. That would involve such considerations as limitations on computer memory.
A deep result in proof theory, the Curry-Howard correspondence, states that a proof of functional correctness in constructive logic corresponds to a certain program in the lambda calculus. Converting a proof in this way is called program extraction.
Hoare logic is a specific formal system for reasoning rigorously about the correctness of computer programs.It uses axiomatic techniques to define programming language semantics and argue about the correctness of programs through assertions known as Hoare triples.
Many mutual exclusion algorithms are verified using computer programs. Briefly outline how these programs manage to...
The diagram below indicates four steps. Briefly outline using these four numbers how non-steroidal anti-inflammatory drugs can cause asthma is some individuals 000000000000 1999 Membrane al phospholipid 8888dddd Arachidonic acid 0 Prostaglandins q Leukotrienes (LTC, LTD)
1. Using a new drug developed by a pharmaceutical firm briefly outline, from the public and private perspectives, the costs and benefits of patent protection. 2.Show how there can be excessive investment undertaken if a number of pharmaceutical companies are researching and trying to develop the same innovation. How can the negative impact of patent races be reduced?
How many six-symbol computer passwords can be formed using the letters A to J and the digits 2 to 5? passwords Find the number of combinations. 8C4
program in python Randomness can be used to improve the performance of deterministic algorithms which need to make many choices. Rather than repeatedly making fixed, hard-coded choices, a pseudorandom number generator can be used to make dynamic, unbiased choices. If the benefits of "good" choices outweigh the costs of "bad" choices, a random selection of good and bad choices can improve the performance of an algorithm Let us explore this with the QUICKSELECT algorithm. Discovered by the influential computer science...
Hello, please keep the solutions simple and understandable, I am not a computer scientist. Thank you! 1.1. How many bits are necessary to represent the alphabet using a binary code if we only allow uppercase characters? How about if we allow both uppercase and lowercase characters? 1.2. Describe how you can create an OR gate using NOT gates and AND gates. 1.3. A kilobyte is 1024 bytes. How many messages can it store? 1.4. What is the entropy associated with...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
I have to use java programs using netbeans. this course is introduction to java programming so i have to write it in a simple way using till chapter 6 (arrays) you can use (loops , methods , arrays) You will implement a menu-based system for Hangman Game. Hangman is a popular game that allows one player to choose a word and another player to guess it one letter at a time. Implement your system to perform the following tasks: Design...
As you know, a numeric type in C is only an approximation to the mathematical entity due to bit-size limitations. The goal of this lab is to deal with real problems caused by such differences. Along the way, you will also get more practice using loops. Recall that n! (read n factorial) is defined to be (1)(2)(3)(4)...(n-1)(n). Many useful computer science problems require the computation of C(n,k) (read n choose k) which is defined as: n! / (k! * (n-k)!),...
If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but minor discrepancies may require you to adjust. If you are attempting this assignment using another version of Visual Studio, you can expect differences in the look, feel, and/or step-by-step instructions below and you’ll have to determine the equivalent actions or operations for your version on your own. INTRODUCTION: In this assignment, you will develop some of the logic for, and then work with, the...
One example of computer-aided design (CAD) is building geometric structures inter- actively. In Chapter 4, we will look at ways in which we can model geometric objects comprised of polygons. Here, we want to examine the interactive part. Let’s start by writing an application that will let the user specify a series of axis- aligned rectangles interactively. Each rectangle can be defined by two mouse positions at diagonally opposite corners. Consider the event listener canvas.addEventListener("mousedown", function() { gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer); if...