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

Sheet _1 Propositional-logic

The document covers various topics in logic and proofs, including bitwise operations, propositions, and logical connectives. It discusses the contributions of John Wilder Tukey to statistics and the coining of the term 'bit.' Additionally, it includes exercises on logical expressions and truth tables.

Uploaded by

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

Sheet _1 Propositional-logic

The document covers various topics in logic and proofs, including bitwise operations, propositions, and logical connectives. It discusses the contributions of John Wilder Tukey to statistics and the coining of the term 'bit.' Additionally, it includes exercises on logical expressions and truth tables.

Uploaded by

mahmoudyusuf2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
16 _1/ The Foundations: Logie and Proofs 116 Solution: The bitwise OR, bitwise AND, and bitwise XOR of these strings are obtained by taking the OR, AND, and XOR of the corresponding bits, respectively. This gives us 01 1011 0110 11 0001 1101 11 1011 1111 bitwise OR 01 0001 0100 bitwise AND 10 1010 1011 bitwise OR Exercises 4, Which of these sentences are propositions? What are the ‘ruth values of those that are propositions? 4) Boston is the capital of Massachusetts. ) Miami isthe capital of Florida 9 24355. 4) 54+7=10. o) x42=11 1) Answer this question. Which ofthese are propositions? Whatare the truth values of those that are propositions? 4) Donot pass go. b) What time is it? ©) There are no black flies in Maine @) 44x25. ) The moon is made of green cheese. 2" > 100 ‘3. What is the negation of each of these propositions? 8) Today is Thursday. 2 nes OD ) There is no pollution in New Jersey. 9 2+1=3. 4) The summer in Maine is hot and sunny. |. Let p and q be the propositions p : Ibought a lottery ticket this week. 4: I won the million dollar jackpot on Friday. Express each of these propositions as an English sentence. *) -p ») pve pq @) pag opog 9 -p>~4 gpa b) spv (pa q) Let p and q be the propositions “Swimming at the New Jersey shore is allowed” and “Sharks have been spotted near the shore,” respectively. Express each of these com- pound propositions as an English sentence. alg b) pag ©) —pya ® p+ Op png gpe-g b) sp A(py -9) JOHN WILDER TUKEY (1915-2000) Tukey, born in New Bedford, Massachusetts, was an only child. His parents, both teachers, decided home schooling would best develop his potential. His formal education began at Brown University, where he studied mathematics and chemistry. He received a master's degree in chemistry from Brown and continued his studies at Princeton University, changing his field of study from chemistry to ‘mathematics. He received his Ph.D. from Princeton in 1939 for work in topology, when he was appointed an instructor in mathematics at Princeton. With the start of World War II, he joined the Fire Control Research Office, where he began working in statistics. Tukey found statistical research to his iking andimpressed several leading statisticians with his skills. In 1945, atthe conclusion ofthe war, Tukey returned to the mathematics department at Princeton as a professor of statistics, and he also took a position at AT&T Bell Laboratories. Tukey founded the Statistics Department at Princeton in 1966 and was its first chairman. Tukey made significant contributions to many areas of statistics, including the analysis of variance, the estimation of spectra of time series, inferences about the values of asetof parameters from a single experiment, and the philosophy of statistics. However, he is best known for his invention, with J. W. Cooley, of the fast Fourier transform. In addition to his cont the terms bit and software, tions to statistics, Tukey was noted as a skilled wordsmith; he is credited with coining ‘Tukey contributed his insight and expertise by serving on the President's Science Advisory Committee. He chaired several important committees dealing with the environment, education, and chemicals and health. He also served on committees working ‘on nuclear disarmament. Tukey received many awards, including the National Medal of Science. HISTORICAL NOTE There were several other suggested words fora binary digit, including binit and bigit,thatnever were widely accepted. The adoption of the word bit may be due to its meaning as a common English word. For an account of Tukey’ coining of the word bit, see the April 1984 issue of Annals of the History of Computing. Lr 6. Let p and q be the propositions “The election is de- cided” and “The votes have been counted,” respectively. Express each of these compound propositions as an English sentence. ap >) pva ©) —pAq dap oye Dp mw apeg h) ~gv (PA 4) 7. Let p and q be the propositions p tis below freezing 4 :Itis snowing Write these propositions using p and q and logical connectives 4) Itis below freezing and snowing. b) Itis below freezing but not snowing ©) tis not below freezing and its not snowing 4) Itis either snowing or below freezing (or both). ¢) Ifit is below freezing itis also snowing 9) Itis either below freezing or itis snowing, but itis not snowing if itis below freezing. 8) That itis below freezing is necessary and sufficient for itto be snowing 8. Let p, q, and r be the propositions You have the fu 4@ : You miss the final examination +r: You pass the course. Express cach ofthese propositions as an English sentence. ) pq b) ger oq>-7 @ pvqyr 9 (p> -Vq> 7) 9 (pagyqar) 9. Let p and q be the propositions p: You drive over 65 miles per hour 7: You get a speeding ticket. Write these propositions using p and q and logical connectives. 18) You do not drive over 65 miles per hou. ') You drive over 65 miles per hour, but you do not get a speeding ticket. ©) You will get a speeding ticket if you drive over 65 miles per hour. 4) Ifyou do not drive over 65 miles per hour, then you will not get a speeding ticket ©) Driving over 65 miles per hour is sufficient for getting a speeding ticket. 1) Yougeta speeding ticket, but you do not drive over 65 miles per hour. 2 Whenever you get a speeding ticket, you are driving cover 65 miles per hour. 10. Let p, g, and r be the propositions p: You get an A on the final exam. @ : You do every exercise in this book. 7: You get an A in this clas. u. 12. 13. 4. Write these propositions using p, q, and r and logical connectives. ) You get an A in this class, but you do not do every exercise in this book. b) You get an A onthe final, you do every exercise inthis, book, and you get an A in this class. ©) Togetan A inthis clas, it is necessary for youto get an A on the final. 4) You get an A on the final, but you don't do every ex- ercise in this book; nevertheless, you get an A in this class. €) Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class. 1) You will get an A in this class if and only if you either do every exercise in this book or you get an A on the final Let p,q, and be the propositions ’P : Grizaly bears have been seen in the area. 4 : Hiking is safe on the trail, 1: Berries are ripe along the trail. Write these propositions using p, q, and r and logical connectives. a) Berries are ripe along the trail, but grizzly bears have rot been seen in the area, ) Grizzly bears have not been seen in the area and hiking on the trail is safe, but berries are ripe along the tral ©) If berries are ripe along the trail, hiking is safe if and only if grizaly bears have not been seen in the area. 4) Itis not safe to hike on the trail, but grizzly bears have not been seen in the area and the berries along the trail are ripe. * ) For hiking on the trail to be safe, it is necessary but not sufficient that berries not be ripe along the tral and for grizzly bears not to have been seen in the 1) Hiking is not safe on the trail whenever grizzly bears have been seen in the area and berries are ripe along the trai Determine whether these biconditionals are true or false. a) 2+2=4 ifandonlyif1 +1 b) 1+1=2ifandonly if2 +3 = 4. ©) 1+1 = 3 ifand only if monkeys can fly. ) 0 > 1 if and only if2 > 1. Determine whether each of these conditional statements is true or false. a) If1+1=2,then2+2=5. b) If1+1=3,then2+2=4, ) 1 +1=3,then2+2=5. ) If monkeys can fly, then 1 +1 = 3. Determine whether each of these conditional statements is true or false a) Ifl+ 3, then unicorns exists b) If1 +1 = 3, then dogs can fy. ©) F141 = 2, then dogs can fly. 4) 12424 then 1+2=3, 18 1/ The Foundations: Logic and Proofs 15, For each of these sentences, determine whether an inclu- sive ororan exclusive ori intended. Explain your answer. a) Coffee or tea comes with dinner. b) A password must have at last three digits orbe at least eight characters long. ©) The prerequisite for the course is a course in number theory ora course in cryptography. 4) You can pay using US. dollars or euros. 16. For each ofthese sentences, determine whether an inclu- sive or oran exclusive ors intended. Explain your answer. 4) Experience with C++ or Java is required. ') Lunch includes soup or salad. ©) To enter the country you need a passport or a voter registration card 4) Publish or perish, 17, Foreach of these sentences, statewhatthe sentencemeans if the or is an inclusive or (that is, a disjunction) versus an exclusive or. Which of these meanings of or do you think is intended? a) To take discrete mathematics, you must have taken calculus ora course in computer science. ) When you buy a new car from Acme Motor Company, you get $2000 back in eash ora 2% car loan ©) Dinner fortwo includes two items from column A or three items from column B. 4) School is closed if more than 2 feet of snow falls ori the wind chill is below —100, 18. Write each ofthese statements in the form “if p, then q” in English. (Hin: Refer to the list of common ways to express conditional statements provided in ths section a) Itis necessary to wash the boss's car to get promoted 1b) Winds from the south imply a spring thaw. ©) A sufficient condition for the warranty t0 be good is that you bought the computer less than a year ago. 4) Willy gets caught whenever he cheats. ©) You can access the website only if you pay asubscrip- tion fee. ) Getting elected follows from knowing the right people. 2) Carol gets seasick whenever she is on boat 19, Write cach ofthese statements in the form “if p, then q" in English. (Hint: Refer to the list of common ways to ‘express conditional statements.) a) Itsnows whenever the wind blows from the northeast. ) The apple tees will loom ifit stays warm fora week. «) That the Pistons win the championship implies that they beat the Lakers. 4) It is necessary to walk 8 miles to get to the top of Long's Peak ©) To get tenure as a professor, itis sufficient to be world-famous 1) Ifyoudrivemore than 400 miles, you will need to buy gasoline Your guarantee is good only if you bought your CD player less than 90 days ago by Jan will go swimming unless the water is too cold. 20, Write each of these statements inthe form “if p, then q” in English. (Hint: Refer to the list of common ways to express conditional statements provided in this section.) 4) I will remember to send you the address only if you send me an e-mail message. ) Tobe a citizen of this country, itis sufficient that you were born in the United States. ©) Ifyou keep yourtextbook, it will be a useful reference in your future courses. 4) The Red Wings will win the Stanley Cupif their goalie plays well. ©) That you get the job implies that you had the best credentials. ) Thebeach erodes whenever there isa storm. 8) Itis necessary to have a valid password to log on to the server. hh) Youwill reach the summit unless you begin your climb too late. 21, Write each of these propositions in the form “p if and only ifq” in English 4) If itis hot outside you buy an ice cream cone, and if ‘you buy an ice cream cone itis hot outside. 1b) Foryouto win the contest it is necessary and sufficient ‘that you have the only winning ticket. ©) You get promoted only if you have connections, and ‘you have connections only if you get promoted. 4) If you watch television your mind will decay, and conversely. ©) The trains run late on exactly those days when I take it. 22, Write each of these propositions in the form “pif and only if ¢” in English. 8) Foryouto get an A in this course, itis necessary and sufficient that you learn how to solve discrete mathe- ‘matics problems. ») If you read the newspaper every day, you will be in- formed, and conversely ©) Itrains if itis a weekend day, and itis a weekend day ifitrains. 4) You can see the wizard only if the wizard is not in, and the wizard is notin only if you can see him. 23, State the converse, contrapositive, and inverse of each of these conditional statements. 2) If it snows today, I will ski tomorrow. 1b) I come to class whenever there is going to be a quiz. ©) A positive integer is a prime only if it has no divisors other than | and itself. 24, State the converse, contrapositive, and inverse of each of these conditional statements. a) [fit snows tonight, then I will stay at home. ) [go to the beach whenever it is a sunny summer day. ©) When I stay up late, itis necessary that I sleep until 25. How many rows appear in a truth table for each of these ‘compound propositions? 9) p>—p >) (py—r)A@y—s) 9) gv pyasVarvatve @) (DATAD & GAD 26, How many rows appear in a truth table for each of these ‘compound propositions? a) @ > -p)V(-p > 79) b) (pY-NA(PY-s) 0) (Pa Nv(-s + av (suv) 4) (PAT AS)VGANV(FAWH 27. Construct a truth table for each of these compound propositions. 8) pan 9 py-~a—g ©) (p> 9) +4 > ~p) 9 p>) >G>P) 28. Construct a truth table for cach of these compound propositions. a) p>>p © pe(pva) 9q> Powe D (pg) @(p-+-9) 29, Construct a truth table for each of these compound propositions. 2) (pv 4) > (pq) 2) PY) a(—A9) ©) (po 9) Op +) 9 (p09) + (P94) 30. Construct a truth table for each of these compound propositions 8) pop b) py-p 4) (pvg)> (pq) » pomp @ (Ag+ va) b) (p@q)> (PA) @) (po gerps 4) b) p@-p © pay & ~po~g 9) @OYV(PO~4) 9 PEDAWO-9 31. Construct a truth table for each of these compound propositions ) p>-9 ») peg 9) > DVCP> 4) & (P+ a)A~P> 4) ©) (pave) D Cpenao (pea) 32. Construct truth table for each of these compound propositions. a) (pvg)yr b) (pyg)ar ©) (Pagyr 9) (pag)ar ©) (PyQarr (paqv—r 33, Construct a truth table for each of these compound propositions a) p> ave) ») p+ qr) ©) (p> avr) 8) (p> gap r) 2) @eavey er DopewaeGen 34. Construct a truth table for(p + g) + r) + s. *42. Is the assertion “This statement is fals "43, The nth statement in a list of 100 statements is “Exactly 1.1 Propositional Logic 19 35. Construct a truth table for (p «+ q) «» (r «+ 5), 36, What is the value of x after each of these statements is encountered in a computer program, if x = 1 before the statement is reached? a) if1+2=3 then = d) if( +1 ©) £243 @) (+1 ©) ifx <2thenx = x41 37. Find the bitwise OR, bitwise AND, and bitwise XOR of each of these pairs of bit strings. a) 101 1110, 010 0001 b) 1111 0000, 1010 1010 ©) 000111 0001, 100100 1000 4) 111111 1111, 00 0000 0000 38, Evaluate each of these expressions. a) 11000 a (0 1011 v 1 1011) b) (01111 4 10101) v 0 1000 ©) (01010 6 1 1011) 0 1000 4d) (1 1011 v0 1010) A (1 0001 v 1 1011) Fuzzy logic is used in artificial intelligence. In fuzzy logic, a proposition has a truth value that is a number between O and 1, inclusive. A proposition with a truth value of 0 is false and one with atruth value of 1 is true. Truth values that are between 0 and | indicate varying degrees of truth. For instance, the truth value 0.8 can be assigned to the statement “Fred is happy,” because Fred is happy most of the time, and the truth value (04 can be assigned to the statement “John is happy,” because John is happy slightly less than half the time. 39. The truth value of the negation of a proposition in fuzzy logic is 1 minus the truth value of the proposition. What are the truth values of the statements “Fred is not happy” and “John is not happy”? 440, The truth value of the conjunction of two propositions in fuzzy logic is the minimum of the truth values of the two propositions. What are the truth values of the statements “Fred and John are happy” and “Neither Fred nor John is happy"? 41, The truth value of the disjunction of two propositions in fuzzy logic is the maximum of the truth values of the two propositions. What are the truth values of the statements “Fred is happy, or John is happy” and “Fred is not happy, or John is not happy”? ” a proposition? 1 of the statements in this list are false.” a) What conclusions can you draw from these statements? b) Answer part (a) if the nth statement is “At least n of the statements in this list are false.” ©) Answer part (b) assuming that the list contains 99 statements, 44, An ancient Sicilian legend says that the barber in a re- ‘mote town who can be reached only by traveling a dan- gerous mountain road shaves those people, and only those

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy