Discrete-math 20

Discrete-math 20

Pigeonhole principle variations #theorem

There is m pigeons and k pigeonholesThen there is a pigeonhole with at least mk pigeonsProof:Let ci be the number of pigeons in each pigeonholeLet i[1,n]:ci<mkcimk1Then m=i=1kcii=1kmk1<i=1k(mk+11)=m Contradiction!
In any group of 6 peoplethere is a group of 3 people who are all friends of each otheror there is a group of 3 people who are all not friends of each otherProof:Let A be one of the 6 peopleLet’s consider two groups:1. Friends of A2. Not friend of ABy the pigeonhole principle, at least one of the groups has 52=3 peopleCase 1. There are at least 3 friends of ACase 1.1 There are two people in this group that are friendsThen A and these 2 people make a group of 3 people who are all friends of each otherCase 1.2 There are no two people in this group that are friendsThen this group is a group of at least 3 people that are all not friends of each otherCase 2. There are at least 3 people who are not friends of ACase 2.1 There are two people who are not friends in this groupThen A and these two people make a group where all are not friends of each otherCase 2.2 There are no such pairThen this group is at least 3 people who are all friends of each other

Normal forms of propositions #definition

DNF and CNF

Literal: logical variable or it’s negation(AND) clause/term:  of literals(OR) clause/term:  of literalsProposition P is a disjuncitve normal form (DNF)if it is  of AND clausesDNF is complete if in any AND clause, any variable appears exactly onceFor example: x1,x2,x3:(x1x2x3)(¬x1¬x2¬x3)Proposition P is a conjunctive normal form (CNF)if it is  of OR clausesCNF is complete if in any OR clause, any variable appears exactly onceFor example: x1,x2,x3:(x1x2x3)(¬x1¬x2¬x3)

DNF existence #theorem

For any proposition P which is not a contradictionThere is an equivalent proposition in complete DNFProof:Process of building the DNF:1.Compute the truth table2.Choose all substitutions that yield True. Each substitution will be an AND clause3.Each variable will appear in the clause as is if it’s value is True4.Each variable will appear in the clause as a negation if it’s value is False5.Connect all chosen clauses with For example:(pqpq000011101110){¬pqp¬q(¬pq)(p¬q)

CNF existence #theorem

For any proposition P which is not a tautologyThere is an equivalent proposition in complete CNFProof:P is not a tautology¬P is not a contradiction a complete DNF of ¬P¬(complete DNF of ¬P) is a complete CNF of P a complete CNF of P

Complete set of logical connectives #definition

Set of logical connectives is complete if we can express any propositionusing only this set
Connective NAND()pq=¬(pq)Connective NOR()pq=¬(pq)

Completeness #theorem

The following sets are complete:1.{,,¬}2.{,¬}3.{,¬}4.{,¬}5.{}6.{}Proof for 1{,,¬} is complete because any proposition has an equivalent in DNFProof for 2pq=¬(¬p¬q) By 1: {,¬} is completeProof for 3pq=¬(¬p¬q) By 2: {,¬} is completeProof for 4pq=¬pq By 2: {,¬} is completeProof for 5¬p=pppq=¬(pq)=(pq)(pq) By 3: {} is completeProof for 6¬p=pppq=¬(pq)=(pq)(pq) By 2: {} is complete