Reference no: EM132101191
Scope: Propositions, Quantifiers, Proofs
1. Prove the logical equivalence of conditional statement and contrapositive of two propositional variables using truth table.
2. Which of the following five statements are propositions? If they are propositions, write the truth value of them.
i) 2 + 3 = 10
ii) Fire!!!
iii) p = 5
iv) If n = 10, then 2n = 1024.
v) Will you get A+ in discrete math?
3. Translate the following English sentences using predicates and quantifiers. Then, negate the following statements.
a. "There is a good football player in the class", where domain consists of all students in the class.
b. "All men must die", where domain consists of all male characters of the TV series "Game of Thrones".
4. Consider the following program segment.
x = 10;
if (x > 5)
y = 10;
if(y == 10)
z = 20;
Which rule of inference is used here?
5. Prove by contrapositive. "If n2 is odd, then n is odd."
Write a program to calculate how many squares are required
: There is an old story that the emperor wanted to thank the inventor of the game of chess and asked the inventor to name his reward.
|
Write a program that initially prompts the user for a file
: Write a program that initially prompts the user for a file name. If the file is not found, an error message is output, and the program terminates.
|
Write a program calendar c that takes two inputs
: Write a program calendar.c that takes two inputs: the start day of a month [Sunday is 0, Monday is 1,....., Saturday is 6] and the number of days in a month.
|
Create an array that holds random integers
: Create an array that holds 1000 random integers between 1-1000. Please write a short paragraph, bullet points.
|
Prove the logical equivalence of conditional statement
: Prove the logical equivalence of conditional statement and contrapositive of two propositional variables using truth table.
|
Define and integer variable named employeescount
: Defines a structure called Employee that contains a character member called id that can hold an id that is up to 9 characters long and a float member.
|
Create a class with the name student
: Create a constructor that initializes all int to 0, float to 0.0, char to ' ', name = "NoName".
|
Show total distance traveled and total gas consumed
: Allow the user to keep entering data in 5 minute increments until the user has no more data to enter. Show total distance traveled, total gas consumed.
|
Create a class line which consists of start -end coordinates
: Create a class Line which consists of start and end coordinates, and line type.The default value for line type should be vertical.
|