i101 - lecture 12 - Indiana University Bloomington

22
Luis M.Rocha and Santiago Schnell Sound Sound Waves Rapidly varying waves of air pressure caused by a vibrating object E.g. guitar string pushing air molecules Repeating cycles of higher and lower pressure Frequency (pitch) is number of times per second cycles occur Measured in Hertz (Hz) Amplitude (intensity) is the size of variations The Mp3 and Internet Audio Handbook, Bruce Fries http://www.teamcombooks.com/mp3handbook/

Transcript of i101 - lecture 12 - Indiana University Bloomington

Microsoft PowerPoint - i101 - lecture 12.pptSound Sound Waves
Rapidly varying waves of air pressure caused by a vibrating object
E.g. guitar string pushing air molecules Repeating cycles of higher and lower pressure
Frequency (pitch) is number of times per second cycles occur Measured in Hertz (Hz)
Amplitude (intensity) is the size of variations
The Mp3 and Internet Audio Handbook, Bruce Fries
http://www.teamcombooks.com/mp3handbook/
Analog Sound Sound Waves
Analogous to pressure variations of sound Vynil
Variations in the width of the groove correspond to voltage variations which in turn correspond to air pressure variations (sound)
Amps Amplify voltage variations to sound waves in loudspeakers
Luis M.Rocha and Santiago Schnell
Sampling
frequency
ν
amplitude
α
Sampling via an analog-to-digital converter (ADC)
Converted to voltage via digital-to-analog converter (ADC)
Luis M.Rocha and Santiago Schnell
Compressing Audio Lossless data compression
Eliminates redundancy E.g. Zip archives, FLAC
Up to ~ 50%
Lossy Data Compression The restored data is degraded, but “close enough” Up to ~ 95% or more Mp3: MPEG-1/2 Audio Layer 3
Developed in Europe (Fraunhofer Society) Uses a hybrid transform from a time to a frequency domain 112...128 kbit/s, compression 10:1...12:1 excellent at 224...320 kbit/s, very good at 192...224 kbit/s, good at 128...192 kbit/s
Luis M.Rocha and Santiago Schnell
Video
Video
Data is the same as image and audio, but in huge amounts!
Resolution 640 x 480 pixel in RGB true color (16 million colors) at a frame rate of 30 frames per second
640 x 480 x 3 bytes x 30 fmps = 27.56 Mbytes per second!
MPEG-2 is a compression algorithm 30-40 Mbytes per minute Used in DVDs with some modification and in HDTV
Real Video, Quicktime, WMF, Indeo
Luis M.Rocha and Santiago Schnell
Introduction to Informatics Lecture 12: Classical Logic
Luis M.Rocha and Santiago Schnell
Readings until now Lecture notes
Posted online http://informatics.indiana.edu/rocha/i101
@ infoport http://infoport.blogspot.com
From course package Von Baeyer, H.C. [2004]. Information: The New Language of Science. Harvard University Press.
Chapters 1, 4 (pages 1-12) From Andy Clark’s book "Natural-Born Cyborgs“
Chapters 2 and 6 (pages 19 - 67) From Irv Englander’s book “The Architecture of Computer Hardware and Systems Software“
Chapter 3: Data Formats (pp. 70-86) Klir, J.G., U. St. Clair, and B.Yuan [1997]. Fuzzy Set Theory: foundations and Applications. Prentice Hall
Chapter 2: Classical Logic (pp. 87-98)
Luis M.Rocha and Santiago Schnell
NO LAB THIS WEEK !!!
NO LAB THIS WEEK !!!
Assignment Situation Labs
Closed (Friday, January 19): Grades Posted Lab 2: Basic HTML
Closed (Wednesday, January 31): Grades Posted Lab 3: Advanced HTML: Cascading Style Sheets
Closed (Friday, February 2): Grades Posted Lab 4: More HTML and CSS
Closed (Friday, February 9): Grades Posted Lab 5: Introduction to Operating Systems: Unix
Closed (Friday, February 16): Being graded Lab 6: More Unix and FTP
Due Friday, February 23
March 1 and 2, due Friday, March 9
Assignments Individual
Second Installment Due: March: 2nd
Group Project First installment
Midterm Exam March 1st (Thursday)
Luis M.Rocha and Santiago Schnell
Individual assignment
Due: February 9th
Due: March: 2nd
Due: March 30th
Due: April 20th
The Modeling Relation
Luis M.Rocha and Santiago Schnell
What is Logic?What is Logic? From Greek Logos (λγος)
word, speech, discourse, reason (OED)
Classical logic is the study of the forms of correct reasoning, also called formal logic. Its focus is on abstract, basic patterns of reasoning.
“Correct reasoning”: ensures that true conclusions follow from true premises under perfect evidence.
We can trust our conclusions when they are based on true premises
Luis M.Rocha and Santiago Schnell
Logical Conclusions?
Luis M.Rocha and Santiago Schnell
Monty Python: Holy Grail Villagers: (enter yelling) A witch! A witch! We've found a witch! Burn her! Burn her! Bedimere: there are ways of telling if she's a witch. What do you do with witches? Villagers: Burn them! Bedimere: And what do you burn, apart from witches? Villagers: Wood? Bedimere: Right! So why do witches burn? Villagers: Because they're made of wood? Bedimere: Right! . Now, what else do you do with wood? Villagers: Build bridges with it! Bedimere: But do we not also build bridges from stone; does wood float in water? Villagers: Yes. Bedimere: And what else floats in water? King Arthur: (after more confused suggestions from the villagers) A duck! Bedimere: Right! So, if she weighs the same as a duck, she'd float in water, and she must be made of wood, so. Villagers: A witch! Burn her! (They weigh the woman on a large scale with a duck in the other balancing basket, but inexplicably the scales do not tilt one way or the other. As the villagers drag the woman away, the witch looks at the camera and says with resignation "it was a fair court".) Bedimere: (to King Arthur) Who are you who are so wise in the ways of science?
Luis M.Rocha and Santiago Schnell
Western Logic Aristotle (384-322 BC)
Provided the first systematic account of correct forms of reasoning Syllogistic Logic
Four kinds of quantified sentences, each of which contain a subject and a predicate:
Universal affirmative: Every S is a P. Universal negative: No S is a P. Particular affirmative: Some S is a P. Particular negative: Not every S is a P.
Syllogisms (The Greek "sullogismos" means "deduction”) Combinations of sentences: one proposition (the conclusion) follows of necessity from two others (known as premises) Can be valid
All humans (B) are mortal (A) (major premise) All Greeks (C) are humans (B) (minor premise) then all Greeks (C) are mortal (A). (conclusion)
And invalid (e.g. logical fallacy which is a metaphor) Wood (B) burns (A) Witches (C) burn (A) Witches (C) are Wood (B)
Raphael’s “Plato and Aristotle”
Luis M.Rocha and Santiago Schnell
Symbolic Logic Logic uses a set of symbols and rules to represent the structure of reasoning with precision. This kind of logic is known as symbolic logic and divides in propositional and predicate logic.
A formal system for representing knowledge in terms of sentences that represent propositions
Proposition is the meaning of the sentence, rather than the sentence itself
Luis M.Rocha and Santiago Schnell
Propositional Logic
Examples: I101 is Marc’s favorite class. 2 + 2 = 4 2 + 2 = 7 The Earth is flat as a pancake. The Earth is a sphere.
A proposition is a statement that is either TRUE or FALSE (not both)
Proposition is the meaning of the sentence, rather than the sentence itself Different sentences, even in different languages, express the same proposition when they have the same meaning
Luis M.Rocha and Santiago Schnell
Deduction vs. Induction Propositional Logic is used to study inferences
How conclusions can be reached from premises Deductive Inference
If the premises are true, we have absolute certainty of the conclusion
February has 29 days only in leap years Today is February 29th
This year is a leap year
Inductive Inference Conclusion supported by good evidence (significant number of examples/observations) but not full certainty -- likelihood
Ran BlackBox for 1000 cycles, “dead box” observed Ran BlackBox for 1000 cycles, “dead box” observed Ran BlackBox for 1000 cycles, “dead box” observed ……………………………………………. Ran BlackBox for 1000 cycles, “dead box” observed “Dead Box” always appears after 1000 cycles
Logic
Form of Inference
An inference is used to convey the idea that if both premises are true, then the conclusion must also be true
If ‘ then ‘
Therefore
Any inference with this structure produces a true conclusion from true premises
Valid inference
Simple propositions are represented by single, lower case letters
Bloomington is a town – p Indiana is a state - q
Complex propositions are constructed by applying logical operations to simple propositions
Bloomington is a town and Indiana is a state – p and q Logic Operations
Conjunction [and] ∧ Disjunction [or] ∨ Negation [not] ¬ Conditional [implies] ⇒ (if, then) Biconditional [equivalent] ⇔ (if and only if)
Luis M.Rocha and Santiago Schnell
Next Class! Topics
Classical Set Theory
Readings for Next week @ infoport From course package
Klir, J.G., U. St. Clair, and B.Yuan [1997]. Fuzzy Set Theory: foundations and Applications. Prentice Hall