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)
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...
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
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.
Find as many programming languages as possible which fit the following categories. When you find a...
Find as many programming languages as possible which fit the following categories. When you find a language which fits the category, indicate the following information: The name of the language The year the language was released A sample bit of code to prove that the language belongs to the given category. For full marks, you must find at least two languages for each category. To make the assignment more interesting, extra points will be awarded to the person who finds...
The Trabb Pardo-Knuth algorithm is often used to illustrate the basic syntax of programming languages. ask...
The Trabb Pardo-Knuth algorithm is often used to illustrate the basic syntax of programming languages. ask for 11 numbers to be read into a sequence S for each item e in the reversed sequence of S compute the value sqrt(abs(e))+5*e if result is greater than 500 alert user else print result Implement the algorithm in at least two programming languages.
suggests on how to save the web portfolio Programming languages Chosen: HTML, CSS, and JavaScript. Project...
suggests on how to save the web portfolio Programming languages Chosen: HTML, CSS, and JavaScript. Project Name: Auto Portfolio Project Goal: Create a website that will generate a web portfolio using information inputted by the user. Product Backlog using user stories: As a user, I want to be able to save my web portfolio in a format which I can save so I can use the website later for my own needs. Example: http://www-personal.umich.edu/~hamatilo/
suggests on how to save the web portfolio Programming languages Chosen: HTML, CSS, and JavaScript. Project...
suggests on how to save the web portfolio Programming languages Chosen: HTML, CSS, and JavaScript. Project Name: Auto Portfolio Project Goal: Create a website that will generate a web portfolio using information inputted by the user. Product Backlog using user stories: As a user, I want to be able to save my web portfolio in a format which I can save so I can use the website later for my own needs.
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