# Help with logic problem

• Feb 10th 2010, 04:28 AM
Monika1987
Help with logic problem
I need to solve the following problem:

Formalize the follwing sentences as logical sentences.

If its not raining I walk to work but if itīs raining i drive to work.
I dont drive to work if itīs not raining.
If dirve to work itīs raining but i walk to work if itīs not raining.

The following designations are to be used.
p= itīs raining
q= I walk to work
r= I drive to work

• Feb 10th 2010, 04:46 AM
kjchauhan
Quote:

Originally Posted by Monika1987
I need to solve the following problem:

Formalize the follwing sentences as logical sentences.

If its not raining I walk to work but if itīs raining i drive to work.
I dont drive to work if itīs not raining.
If dirve to work itīs raining but i walk to work if itīs not raining.

The following designations are to be used.
p= itīs raining
q= I walk to work
r= I drive to work

$(\sim P \Rightarrow Q) \cup (P \Rightarrow R)$

$\sim R \Rightarrow \sim P$

$(R \Leftarrow P) \cup (Q \Leftarrow \sim P)$

Now simplify..
• Feb 10th 2010, 04:37 PM
xalk
Quote:

Originally Posted by Monika1987
I need to solve the following problem:

Formalize the follwing sentences as logical sentences.

If its not raining I walk to work but if itīs raining i drive to work.
I dont drive to work if itīs not raining.
If dirve to work itīs raining but i walk to work if itīs not raining.

The following designations are to be used.
p= itīs raining
q= I walk to work
r= I drive to work

The formalization is as follows :

1) if it is not raining i walk to work : $\neg p\rightarrow q$

2) if it is raining i drive to work : $p\rightarrow r$

3) i do not drive to work if it is not raining : $\neg p\rightarrow\neg r$

4) if i drive to work it is not raining : $r\rightarrow\neg p$

5) I walk to work if it is not raining : $\neg p\rightarrow q$

(1) and (5) are the same