📜  门| GATE CS 2011 |问题30

📅  最后修改于: 2021-06-29 01:21:47             🧑  作者: Mango

给定三个正整数x,y和z以及谓词,CORRRECT可以使用以下哪个选项?

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

(A) P(x)为真意味着x是素数
(B) P(x)为真意味着x是除1以外的数字
(C) P(x)始终为真,与x的值无关
(D) P(x)为真意味着x具有正好除1和x之外的两个因子答案: (A)
解释:

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.

资料来源:http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html
这个问题的测验