Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE CS 2011 | Question 30

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Which one of the following options is CORRECT given three positive integers x, y and z, and a predicate? 
 

        
      P(x) = ¬(x=1)∧∀y(∃z(x=y*z)⇒(y=x)∨(y=1))

 

(A)

P(x) being true means that x has exactly two factors other than 1 and x 
 

(B)

P(x) is always true irrespective of the value of x
 

(C)

P(x) being true means that x is a number other than 1
 

(D)

P(x) being true means that x is a prime number
 


Answer: (D)

Explanation:\"\"

 So the predicate is evaluated as
    P(x) = (¬(x=1))∧(∀y(∃z(x=y*z)⇒((y=x)∨(y=1))))
 P(x) being true means x ≠ 1 and
 For all y if there exists a z such that x = y*z then
 y must be x (i.e. z=1) or y must be 1 (i.e. z=x)
 
 It means that x have only two factors first is 1 
 and second is x itself.
 
This predicate defines the prime number.


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 14 Feb, 2018
Like Article
Save Article
Similar Reads