Fundamentals of Computer Science - Week 1 (Essential reading) - Part 2 out of 2

Language of logic makes statements in mathematics and the sciences and in natural language precise. It is used in the specification of software and hardware.

Translating English Sentences

English is ambiguous. Translating sentences into compound statements (and other types of logical expressions) removes the ambiguity.

“You can access the Internet from campus only if you are a computer science major or you are not a freshman.”

a → (c ∨ ¬f)

“You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.”

(r ∧ ¬s) → ¬q

System Specifications

Translating sentences in natural language into logical expressions is an essential part of specifying both hardware and osftware systems.

Boolean searches

Logical connectives are used extensively in searches of large collections of information such as indexes of web pages. Because these searches employ techniques from propositional logic, they are called Boolean searches.

Logic Puzzles

Puzzles that can be solved using logical reasoning are known as logic puzzles. Raymond Smullyan has published more than a dozen books containing callenging puzzles that involve logical reasoning.

An island has two kinds of inhabitants: nights, who always tell the truth, and their opposites, knaves, who always lie. You encounter two people A and B. What are A and B if A says "B is a knight" and B says "The two of us are opposite types"?

Logic Circuits

Propositional logic can be applied to the design of computer hardware. A logic circuit (or digital circuit) receives input signals p1, p2, . . . , pn, each a bit [either 0 (off) or 1 (on)], and produces output signals s1, s2, . . . , sn, each a bit. In this section we will restrict our attention to logic circuits with a single output signal; in general, digital circuits may have multiple outputs.


Comments

Popular posts from this blog

syllabus: Algorithms and Data Structures 1 [CM1035]

syllabus: Fundamentals of Computer Science [CM1025]

Introduction to Programming - Week 1 and 2 Summary