0% found this document useful (0 votes)
13 views

Logic Questions'

Uploaded by

Annaya Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Logic Questions'

Uploaded by

Annaya Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Propositional Logic:

1. "If I go to the beach today, I will get a sunburn." "It is either sunny or cloudy
today." "I am not going to the beach today."
2. "If it rains today, I will take an umbrella." "I did not take an umbrella to work
today." "It is either raining or not raining today." "I am at work today."
3. "If I have a fever, I will take medicine." "I did not take medicine yesterday."
"I have a headache or a fever today." "I do not have a headache today."
4. "I drink tea when it's cold or when I have a sore throat." "If it's cold, I will
wear my cozy sweater." "I will wear my cozy sweater today."
5. "I only go shopping if there's a sale or if I have a coupon." "There's a sale at
the department store." "If there's a sale, I will buy a new pair of shoes." "I
will buy a new pair of shoes today."
6. "If it's a weekday, I either go to work or work from home." "I went to work
on Monday." "If I go to work, I always take my lunch with me." "I took my
lunch with me on Monday."
7. Holmes owns two suits: one black and one tweed. He always wears either a
tweed suit or sandals. Whenever he wears his tweed suit and a purple shirt,
he chooses to not wear a tie. He never wears the tweed suit unless he is also
wearing either a purple shirt or sandals. Whenever he wears sandals, he also
wears a purple shirt. Yesterday, Holmes wore a bow tie.
8. If it didn’t rain, Harry visited Hagrid today. Harry visited Hagrid or
Dumbledore today, but not both. Harry visited Dumbledore today.
9. If I go to the park, I will see squirrels. I did not see squirrels. I either went to
the park or stayed at home.
10.If I study for the exam, I will pass. I did not pass the exam. I either studied for
the exam or did not study. I either went to the library or stayed at home to
study.
11.If it is sunny, I will go for a walk. I did not go for a walk. It is either sunny or
cloudy. I either stayed at home or went to the park.
12.If I am a citizen of the country, I can vote. I am not a citizen of the country. I
am either eligible to vote or not eligible to vote. I am either 18 years old or
not 18 years old. If I am 18 years old and a citizen of the country, I can vote.
13.If I am a student at this university, I have a student ID. I have a student ID. I
am either a student at this university or a visitor. I am either enrolled in at
least one class or not enrolled in any classes. If I am enrolled in at least one
class, I have a class schedule. I do not have a class schedule.
14.“If I take the day off, it either rains or snows.” “I took Tuesday off or I took
Thursday off.” “It was sunny on Tuesday.” “It did not snow on Thursday.”
15.If I play hockey, then I am sore the next day. I use the whirlpool if I am sore.
I did not use the whirlpool.
16.”If it does not rain or if it is not foggy, then the sailing race will be held and
the lifesaving demonstration will go on,”, ”If the sailing race is held, then the
trophy will be awarded,” and ”The trophy was not awarded”.
17.I will not pass this class unless I go to class every day and do all of the
homework exercises.
18.I lock the doors and close the windows whenever I leave to go to work.
19.Getting up on time and getting ready quickly is sufficient for arriving at work
on time.
20.Practicing an hour a day and getting private lessons twice a week is necessary
for playing in the wind ensemble.
21.Your roommate is wet. If your roommate is wet, it is because of rain,
sprinklers, or both. If your roommate is wet because of sprinklers, the
sprinklers must be on. If your roommate is wet because of rain, your
roommate must not be carrying the umbrella. The umbrella is not in the
umbrella holder. If the umbrella is not in the umbrella holder, either you must
be carrying the umbrella, or your roommate must be carrying the umbrella.
You are not carrying the umbrella.

First Order logic


1. Some student in this class has visited Mexico.
For all x : (Student(x) → (there exist y : (Visited(y, Mexico) ^ (x==y))))
2. “Every student in this class has visited either Canada or Mexico”
For all x : (Student(x) → ((Visited(x, Mexico) V (Visited(x, Canada)))
3. “Every mail message larger than one megabyte will be compressed”
For all x : (( Mail(x) ^ LargerThan(x, 1MB)) → Compress(x))
4. “If a user is active, at least one network link will be available”
For all x : (User(x) → (there exist y: (Active(y, User(x)) → (there exist z :
(Network (1, available))))))
5. “All lions are fierce.”
For all x : ( Lion(x, Fierce) )
For all x : ( Lion(x) → Fierce(x))
6. “Some lions do not drink coffee.”
There exist x : (Lion(x) ^ Not(DrinkCoffee(x)))
7. “Some fierce creatures do not drink coffee.”
There exist x : (Creature(x, Fierce) ^ Not(DrinkCoffee(x)))
8. “All hummingbirds are richly colored.”
For all x : (hummingbird(x) → RichColored(x))
9. “No large birds live on honey.”
Not (There Exist x : ((LargeBird(x) ∧ LiveOnHoney(x))))
10.“Birds that do not live on honey are dull in color.”
For all x : ( Bird(x) → (there exist y : Not (LiveOnHoney(y)) ^ DullColor(y) ^
(x==y)))
11.“Hummingbirds are small.”
For all x : (hummingbird(x) → Small(x))
12.There is a student at your school who can speak Russian and who knows
C++.
There exist x : (Student(x) ^ Speak(x, Russian) ^ Know(x, C++))
13.There is a student at your school who can speak Russian but who doesn’t
know C++.
There exist x : (Student(x) ^ Speak(x, Russian) ^ Not(Know(x, C++)))
14.Every student at your school either can speak Russian or knows C++.
For all x : (Student(x) → (Speak(x, Russian) v Know(x, C++)))
15.No student at your school can speak Russian or knows C++.
For all x : (Student(x) → Not((Speak(x, Russian) v Know(x, C++))))
16.A student in your class has a cat, a dog, and a ferret.
There exist x : (Student(x) ^ (Has(x, Cat) v Has(x, Dog) v Has(x, Ferret)))
17.All students in your class have a cat, a dog, or a ferret.
For all x : (Student(x) → (Has(x, Cat) v Has(x, Dog) v Has(x, Ferret)))
18.Some student in your class has a cat and a ferret, but not a dog.
There exist x : (Student(x) ^ (Has(x, Cat) v Has(x, Ferret)) ^ Not(Has(x, Dog))))
19.No student in your class has a cat, a dog, and a ferret.
For all x : (Student(x) → Not((Has(x, Cat) ^ Has(x, Dog) ^ Has(x, Ferret))))
20.For each of the three animals, cats, dogs, and ferrets, there is a student in
your class who has this animal as a pet.
There Exist x : (Student(x) ^ (there exist a: (Cat(a) ^ HasPet(x, a)) ∨ there exist
b: (Dog(b) ^ HasPet(x, b)) ∨ there exist c: (Ferret(c) ^ HasPet(x, c))))
21.Everyone loves everyone except himself.
For all x : (Person (x) → (For all y : (Love(x,y) → Not(x=y))))
22.Every boy who loves Mary hates every boy who Mary loves.
For all x : ((boy(x) → love (x, Mary)) → For all y : ((boy(y) → love(Mary, y))→
hate (x,y)))
23.Anyone who thinks 173 is fun is either crazy or an instructor.
For all x : (ThinkFun(x, 173) → (Is(x, crazy) v Is(x, instructor)))
24.No prime number except 3 is divisible by 3.
For all x : (PrimeNum(x) ^ NOT(x=3) → NOT(Divisible(x, 3)))
25.Every CS 173 student has to solve a homework and at least one CS 173
student must shovel snow.
For all x : {[Student (x, CS173) → SolveHW(x)] ^ There exist y : [Student(y,
CS173) ^ ShovelSnow(y) ^ (x==y)]}
26.One of your tools is not in the correct place, but is in excellent condition.
For all x : [Tool(x) → (There exist y : InCorrectPlace(y) ^ ExcellentCondition(y)
^ (x=y))]
27.For every real number x except zero, x has a multiplicative inverse.
For all x : [(RealNumber(x) ^ Not(x=0)) → Has(x, MultiplicativeInverse)]
28.“Every real number except zero has a multiplicative inverse.”
For all x : [(RealNumber(x) ^ Not(x=0)) → {There Exist y : (RealNumber(y) ^
MultiplicativeInverse (x, y))}]
29.“If a person is female and is a parent, then this person is someone’s
mother”
For all x : [Person(x, Female) ^ Person(x, Parent) → {there exist y : Person (y)
^ (IsMother(x, y))}]
30.“Everyone has exactly one best friend”
For all x : [Person(x) → {there exist y : (BestFriend(x, y) ^ NOT(x=y)) ^ (for all
z : (Not((BestFriend(x, y)) ^ Not(z=x) )))}]
31.“There is a woman who has taken a flight on every airline in the world.”
There exist x : [Woman(x) ^ {for all y : Airline(y) → (there exist z : Flight(z) ^
BelongsToAirline(z, y) ^ TakenFlight(x, z)))}]
32.If you do every problem in this book, then you will learn discrete
mathematics. You learned discrete mathematics.
For all x : {Student(x) → [for all y : (SolveProblem(x, y))] →
LearnDiscreteMaths(x)}
33.Mammals typically have fur or hair, and humans are mammals, but they
don't have fur.
For all x: {Mammal(x) → [Has (x, fur) OR Has (x, hairs)] ^ IsHuman(x) ^
NOT(Has(x, fur))]}
34.There is a restaurant that serves better than any other restaurant in the
city.
there exist x : {restaurant (x) ^ [for all y : (restaurant(y) → ServeBetterThan(x,
y) ^ NOT(x=y))]}

You might also like