Question

In: Advanced Math

It is standard in some programming languages for the number zero to represent one of the...

It is standard in some programming languages for the number zero to represent one of the truth values (either true or false) and for positive numbers to represent the other truth value. If assigned correctly, the operations of addition and multiplication will then correspond to conjunction and disjunction, in some order. Figure out how to make this all work out neatly.

Solutions

Expert Solution

Without loss of generality, suppose that 0 represents the truth value FALSE and 1 represents the truth value TRUE.

Claim 1 : + corresponds to Disjunction (OR)

Proof : Observe that, 0 + 0 = 0. In case of disjunction, it is known that if a and b are both false, then so is a OR b.

Observe that, 0 + 1 = 1 + 0 = 1 + 1 = 1. In case of disjunction, it is known that if atleast one of a or b is true, then a OR b is true.

Thus, + corresponds to conjunction.

Claim 2 : . corresponds to Conjunction ( AND )

Observe that, 0.1 = 1.0 = 0.0 = 0. In case of conjunction, it is known that if atleast one of a or b is False, then a AND b is false.

Observe that, 1.1 = 1. In case of conjunction, it is known that P AND Q is true if both P and Q are true.

This proves the required claim.


Related Solutions

Some languages support many modes of parameter passing. Provide 2 examples using two different programming languages...
Some languages support many modes of parameter passing. Provide 2 examples using two different programming languages which support the user of the programming language deciding which to use when creating their method. (Programming Languages)
Why are statistical programming languages important to data scientists? What are some advantages and disadvantages the...
Why are statistical programming languages important to data scientists? What are some advantages and disadvantages the R programming language has over the other main statistical programming languages (i.e. SAS, SQL, Python)?
In many programming languages you can generate a random number between 1 and a limiting value...
In many programming languages you can generate a random number between 1 and a limiting value named LIMIT by using a statement similar to randomNumber = random(LIMIT). Create the logic for a guessing game in which the application generates a random number and the player tries to guess it. Display a message indicating whether the player’s guess was correct, too high, or too low. (After you finish Chapter 4, you will be able to modify the application so that the...
Programming languages Explain orthogonality and its importance.
Programming languages Explain orthogonality and its importance.
What are the differences between the programming languages of VHDL and Verilog? Why use one over...
What are the differences between the programming languages of VHDL and Verilog? Why use one over the other?
Looking into the future, describe one future technology and how you believe programming languages will have...
Looking into the future, describe one future technology and how you believe programming languages will have to adapt to make that technology successful
Research two computer programming languages (python can be one of them) and explain what tasks the...
Research two computer programming languages (python can be one of them) and explain what tasks the languages are best suited for and the industry in which they are typically used. Include a code snippet. How has mobile computing changed your life? Describe the impact of mobile computing on programming. What are some commonly used mobile programming languages? How will computer information systems fit into your professional life?
Write an essay about the primary use of the Programming Languages
Write an essay about the primary use of the Programming Languages
Java, Python, and C++ are three of the most useful programming languages to learn. Compare the...
Java, Python, and C++ are three of the most useful programming languages to learn. Compare the functionalities of all three programming languages. Why would you choose one language over another? Provide code examples demonstrating their usefulness in a real-world scenario.
a) suppose that a spinner returns a real number between zero and one. What would the...
a) suppose that a spinner returns a real number between zero and one. What would the height of the PDF function be for this random variable X. Sketch its graph and make sure the total area under the graph is 1. b) Now suppose that the random variable of interest is a number between 1 and 3. We will obtain this number by creating a new random variable Y=2X + 1 . Explain how you know Y will give a...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT