Having problem with prediate logic

102 Views Asked by At

Suppose that the UoD (Universe of Discourse) is {A, B, C, D, E, F, G} which are softwares and I want to make the statement that "At least four softwares have a bug".

Let P(x) be the predicate that " x has a bug" then, I know that:

∃ x : P(x)

would meant that at least one of the elements of the UoD satisfy P(x), that is, only one software out of all in the UoD has bug.

But for the statement, "At least four softwares have a bug", I can not solve it. Please help. Anyone.

And what about "At most four softwares have a bug"?

3

There are 3 best solutions below

10
On BEST ANSWER

I'll develop my hint a bit more.

Suppose you knew that four softwares have a bug, say $A$, $B$, $C$, and $D$. Let $P(x)$ mean "x has a bug". You could then symbolize the situation with the following formula:

$P(A) \wedge P(B) \wedge P(C) \wedge P(D)$

But that's not quite you want, since this formula mentions specific individuals, and you need something that does not mention specific individuals. So one natural attempt would be to quantify into that formula, resulting in:

$\exists x \exists y \exists z \exists w (P(x) \wedge P(y) \wedge P(z) \wedge P(w)$

But this would not solve your problem, because this formula would still be true if only one software had a bug (just check the satisfaction clause for the existential quantifier). In the formula using constants, that was not a problem, because we're assuming that each constant refers to a different object. That does not happen here, as the variables could all refer to the same object. So you need to say that the $x$, $y$, $z$, and $w$ that satisfy this formula are all different. How do you say that?

1
On

Four softwares with a bug: $\exists w \exists x \exists y \exists z (P(w) \wedge P(x) \wedge P(y) \wedge P(z) \wedge (\neg((w = x) \lor (w = y) \lor (w = z) \lor (x = y) \lor (x = z) \lor (y = z)))$

0
On

Don't know about Michael's string of $\ne$'s. May I suggest:

$\exists w,x,y,z:[P(w) \wedge P(x) \wedge P(y) \wedge P(z) \wedge w \ne x \land w\ne y \land w\ne z \land x\ne y \land x\ne z \land y\ne z]$

Hint for at most 4:

For exactly 2 softwares with a bug:

$\exists a,b:[a\ne b \land \forall c:[P(c)\iff c=a\lor c=b]]$