CS计算机代考程序代写 17

17
(a) §
(b) §
(c) §
(d) §
(e) §
(f) §
(g) §
(h) §
Formalize each of the following statements as a binary expression. Start by staying as close as possible to the English, then simplify as much as possible (sometimes no simplification is possible). You will have to introduce new basic binary expressions like (the door can be opened) for the parts that cannot make use of binary operators, but for words like “only if” you should use binary operators. You translate meanings from words to binary symbols; the meaning of the words may depend on their context and even on facts not explicitly stated. Formalization is not a simple substitution of symbols for words.
The door can only be opened if the elevator is stopped.
The probable meaning is that the elevator has to be stopped in order for the door to be opened. That can be formalized as
(the door can be opened) ⇒ (the elevator is stopped)
This is already as simple as possible. Another less probable meaning is that when the elevator is stopped, the only possible action is to open the door. Maybe that can be partially formalized as
(the elevator is stopped) ⇒ (the door must be opened)
but that misses saying that nothing else can happen. This meaning seems less reasonable.
Neither the elevator door nor the floor door will open unless both of them do. ¬((the elevator door will open) ∨ (the floor door will open))
∨ ((the elevator door will open) ∧ (the floor door will open)) This simplifies to
(the elevator door will open) = (the floor door will open)
Either the motor is jammed or the control is broken. (the motor is jammed) ∨ (the control is broken)
This is already as simple as possible.
Either the light is on or it is off.
(the light is on) ⧧ (the light is off)
This is already as simple as possible.
If you press the button, the elevator will come.
(you press the button) ⇒ (the elevator will come)
This is already as simple as possible.
If the power switch is on, the system is operating.
(the power switch is on) = (the system is operating)
or (the power switch is on) ⇒ (the system is operating) This is already as simple as possible.
Where there’s smoke, there’s fire; and there’s no smoke; so there’s no fire. (smoke ⇒ fire) ∧ ¬smoke ⇒ ¬fire
This simplifies to
smoke⇐fire
Where there’s smoke, there’s fire; and there’s no fire; so there’s no smoke. (smoke ⇒ fire) ∧ ¬fire ⇒ ¬smoke
This simplifies to

(i) §
(j) §
(k) §
(l) §
(m) §
You can’t score if you don’t shoot.
¬score ⇐ ¬shoot This simplifies to
score ⇒ shoot
If you have a key, only then can you open the door. (you have a key) = (you can open the door)
This is already as simple as possible.
No pain, no gain.
¬pain ⇒ ¬gain This simplifies to
pain ⇐ gain
No shirt? No shoes? No service!
¬shirt ∨ ¬shoes ⇒ ¬service This simplifies to
shirt ∧ shoes ⇐ service
If it happens, it happens.
(it happens) ⇒ (it happens)
This simplifies to