Docstoc

Sample of Quiz Exam for Algorithm

Document Sample
Sample of Quiz Exam for Algorithm Powered By Docstoc
					SAMPLE QUESTIONS Logic and completion
1.Given the statement "It is not true that he's learning but not learning algorithm
Mathematics ".
(A) Express the above statement in symbolic notation (logic expression)
(B) Give the statement is logically equivalent to the statement
(Hint: use the De Morgan law)



Completion:
Suppose
p: He's learning algorithm
q: He studied Mathematics
hence,
(A) ~ (p   ~ q)
(B) ~ (p   ~ q)     p ~ q (De Morgan's Law)
in other words: "He did not study or learn Mathematical Algorithm"

2. To explain the quality of a hotel, suppose p: The service is good, and q: cheap room rate, r:
The hotel three-star.
Translate the following propositions in symbolic notation (using p, q, r):
(A) cheap room rate, but bad service.
(B) expensive room rate good or service, but not both.
(C) False means that the three-star hotel cheap room rates and service
bad.

Completion:
(A) q ~ p  
(B) p ~ q  
(C) ~ q    r ~ p    



3. Determine ingkaran and contraposition of the following statements: "He did not go to college
or to the library when the rain today. "


Completion:
Suppose
p: He went to college
q: He went to the library
r: Today rain

So the above sentence can be written in the form:
r~p~q
To determine ingkarannya, apply the laws of logic as follows:
r~~p~q~~r~p~q
R~p~~q
Rpq
So ingkarannya is
"Today is raining, and he went to college or to the library"

To determine kontraposisinya, apply the laws of logic as follows:
~~p~q~rpq~r
So kontraposisinya is
"If he goes to college or to the library, it does not rain today"



4. Most people believe that long-extinct Java tiger. However, in a
Amir days making controversial statements as follows:
(A) I see the tiger in the forest.
(B) If I see the tiger in the jungle, then I also saw the wolf.
Suppose we are told that Amir sometimes like to lie and sometimes
honest. Use truth table to check whether Amir really see
tigers in the forest?

Completion:
Suppose
p: Amir saw the tiger in the jungle
q: Amir saw wolf
Statement to question (a) is p while the statement for (b) is p   q. Table
truth for p and q p   shown in Table below:

Table truth of p and p ® q
pqpq
TTT
TFF
FTT
FFT

				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:22
posted:1/15/2013
language:
pages:2