1 / 17

Cracking the Code of Truth: Insight into Computer Science & Logic

Explore the concept of truth, logic, and problem-solving in computer science. Understand quantifiers, implications, and universal gates. Discover how computers interpret commands through precision and error correction processes. Dive into Boolean functions, circuits, and the power of NAND gates. Uncover the truth through the lens of computational thinking.

antoniar
Download Presentation

Cracking the Code of Truth: Insight into Computer Science & Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Truthand How to See It CS-113 Gene Itkis

  2. The Truth • Do you solemnly swear to tell the truth, the whole truth and nothing but the truth, so help you G*d?

  3. Truth • Truth - αλήθεια (alethia) • Un-hiddenness, un-concealness • Proof: “uncovering the truth”, “making truth self-evident” ?

  4. Hmm… Creation (almost) ex nihilo 11 11 10 10 1 10/11 1 1 1 10 10

  5. Tiger On What You See When on lion’s cage you see a sign “Tiger” – Trust not thine eyes!

  6. As long as it is done right !

  7. CS as problem solving • What is the most famous/grand question answered by a computer: • The Great Question of Life, the Universe and Everything

  8. Universal algorithm (ISO) • Input the PROBLEM • Solve the PROBLEM • Output the ANSWER

  9. The Universe • U={ “objects” } • Popular (Sub-)Universes: • Integers: I={0,1,-1,2,…}; • Natural numbers: N={1,2,…}; • Rationals:Q={a/b : aI, bN}; • Reals: R

  10. Computers are dumb! • People are nice: • Understanding • will try to understand what you really meant • fill in some gaps • identify and correct some of your mistakes • Forgiving • provide some error-correction • Computers are not: • “do what I mean not what I say” never works • your mistake is its command

  11. Conclusion • Must be extra precise in what you say • Must prove that what you say is correct • Must build in your own error-detection and error-correction(if/when things do go wrong – e.g., when assumptions turn out to be false)

  12. Everything • Quantifiers: • Universal:  = “for every”, “for all” • a,bN. a+bN • Existential:  = “for some”, “there exists” • aNbN. a·b=1 • FALSE • a≠0Q bQ . a·b=1 • TRUE

  13. AND (2b2b) •  : or , e.g. x,S . (xS) (xS) •  : and, e.g. aNbN. a·b=b b/a=b •  : negation, e.g. claim C . C  C • : set union, e.g. {1,2,3}{2,4}={1,2,3,4} • AB={x: xA  xB} •  : set intersection, e.g. {1,2,3}{2,4}={2} • A B={x: xA xB} •  : (proper) subset, e.g. {2}{2,4}  : subset or equal, e.g. set S . (S  S)  (  S)

  14. Implications •  : implies, A  B • (“A implies B” or “if A then B”) • “A  B” = “A  B” • E.g. if pigs can fly then …

  15. Circuits Output Input 0 0 1  0  1  1      

  16. NAND   Universal Gate: NAND • a = a NAND 1 • a b = ( a NAND b ) = 1 NAND (a NAND b) • a b = … homework • Any Boolean function (truth table) can be expressed in terms of a circuit of AND (), OR () and NOT () gates it can also be expressed using only NAND gates

  17. XOR : Exclusive OR • : Exclusive OR (a or b but not both) also a  b= (a+b mod 2) • 0  0 = 1  1 = 0 • 1  0 = 0  1 = 1 a = a 1 a b = …homework a b = … homework

More Related