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
Create one program using these three programs: 1. Payroll Calculator Need to include state tax amount and SS amount Net pay need to reflect those amount Need to make all the amounts with 2 decimal points. Hint See line #31 - Use the programming outline/format discussed in the lecture, with proper documentation, data declaration, etc. - When asking a user for data, provide user-friendly and clear direction - Same thing for the output. - Include code and screenshot of the...
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...
Assignment 2 In this assignment, you will write two short programs to solve problems using recursion. 1. Initial Setup Log in to Unix. Run the setup script for Assignment 2 by typing: setup 2 2. Towers of Hanoi Legend has it that in a temple in the Far East, priests are attempting to move a stack of disks from one peg to another. The initial stack had 64 disks threaded onto one peg and arranged from bottom to top by...
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)!),...