Languages and terminology
About 609 wordsAbout 2 min
2025-07-29
Languages
- Alphabet (Σ): A finite, non-empty set of symbols.
- Example: Σ={a,b}
- Word: A finite string of symbols from an alphabet.
- Empty Word (ϵ): The unique word with zero symbols.
- Empty Set (∅): The set with no elements.
- Σ∗: The set of all possible words that can be formed from the alphabet Σ, including the empty word ϵ.
Key Language Examples
- EVEN-EVEN: The language where each string has an even number of 'a's and an even number of 'b's.
- Note: Since 0 is an even number, the empty word ϵ is in EVEN-EVEN.
- DOUBLEWORD: The language of words formed by concatenating some word w with itself.
- Formally: {ww∣w∈Σ∗}.
- Note: ϵ=ϵϵ, so ϵ is a doubleword.
- PALINDROMES: The language of words that read the same forwards and backwards.
- Formally: {w∣w=wR}, where wR is the reverse of w.
- ODD-ODD: The language where each string has an odd number of 'a's and an odd number of 'b's.
- Example: The word
"a"
is not in ODD-ODD. It has 1 'a' (odd) but 0 'b's (even). The word"abb"
is also not in ODD-ODD (1 'a', 2 'b's). The word"ab"
is in ODD-ODD.
- Example: The word
Definitions, theorems, and proofs
Theorem: DOUBLEWORD ⊆ EVEN-EVEN
(Every doubleword is also an even-even word).
Proof: Let w be any word in Σ∗. Let the number of 'a's in w be na and the number of 'b's be nb. The corresponding word in DOUBLEWORD
is ww. The number of 'a's in ww is 2na and the number of 'b's is 2nb. By definition, 2na and 2nb are always even numbers. Therefore, any word in DOUBLEWORD
is also in EVEN-EVEN
.
Normal Forms
- Literal: A propositional variable or its negation (e.g., A or ¬A).
- Disjunctive Normal Form (DNF): A disjunction (OR) of one or more clauses, where each clause is a conjunction (AND) of literals.
- Structure: (A∧¬B)∨(C∧D)∨…
- Conjunctive Normal Form (CNF): A conjunction (AND) of one or more clauses, where each clause is a disjunction (OR) of literals.
- Structure: (A∨¬B)∧(C∨D)∧…
Statements with variables
The variables in the statement are free, which means they have not been assign any values.
Predicates definitions and terminology
- Predicate: A statement with variables that becomes a proposition once the variables are given specific values from a domain. A predicate is called l-ary if it has k arguments.
- Example: P(x)="x>10". P(12) is True, P(5) is False.
- Universal Quantifier (∀): Means "for all". ∀x,P(x) asserts that P(x) is true for every x in the domain.
- Existential Quantifier (∃): Means "there exists". ∃x,P(x) asserts that there is at least one x in the domain for which P(x) is true.
Propositions and logical operations
- Proposition: A declarative sentence that is definitively True or False, but not both.
- Paradox: "This statement is false" is a paradox, not a proposition, because its truth value cannot be determined without contradiction.
- Tautology: A statement that is always true, no matter the truth values of its variables (e.g., p∨¬p).
- Logical Equivalence (≡): Two statements are logically equivalent if they always have the same truth value.
- Example: De Morgan's Law states ¬(p∧q)≡(¬p∨¬q).
Changelog
8/4/25, 11:40 AM
View All Changelog
2b7ff
-web-deploy(Auto): Update base URL for web-pages branchon
Copyright
Copyright Ownership:WARREN Y.F. LONG
License under:Attribution-NonCommercial-NoDerivatives 4.0 International (CC-BY-NC-ND-4.0)