Unit 1: Sets
2024-07-12
any declarative sentence which is either TRUE or FALSE.
Atomic
cannot be divided into smaller statements
Molecular
can be divided into smaller statements
It is enough to assume P, and from it, deduce Q
Negation:
\[\begin{array}{r|c|} \neg P& Outcome\\ \hline P=T & F \\ P=F & T \\ \hline \end{array}\]
Conjunction:
\[\begin{array}{r|c|c} P\land Q& Q=T & Q = F \\ \hline P=T & T & F \\ P=F & F & F \\ \hline \end{array}\]
Disjunction:
\[\begin{array}{r|c|c} P\lor Q& Q=T & Q = F \\ \hline P=T & T & T \\ P=F & T & F \\ \hline \end{array}\]
Implication or Conditional:
\[\begin{array}{r|c|c} P\rightarrow Q& Q=T & Q = F \\ \hline P=T & T & F \\ P=F & T & T \\ \hline \end{array}\]
Biconditional:
\[\begin{array}{r|c|c} P\leftrightarrow Q& Q=T & Q = F \\ \hline P=T & T & F \\ P=F & F & T \\ \hline \end{array}\]
Given the implication \(P \rightarrow Q\) :
\(Q \rightarrow P\) (can be false)
For \(numbers > 2\) :
\(Prime \rightarrow Odd\ number\) (True)
$Odd number Prime$ (Often False)
Given the implication \(P\rightarrow Q\) :
\(\neg Q \rightarrow \neg P\) (always True)
For \(numbers > 2\) :
\(Prime \rightarrow Odd\ number\) (True)
$Odd number Prime$ (True)
Existential quantifier means “there exists” or “there is.”
\[\exists x (x < 0)\]
There exists at least one number < 0
Universal quantifier means “for all” or “every.””
\[\forall x (x > 0)\]
Asserts that every number > 0
\[\forall x \exists y ( y < x)\]
\[\exists x \forall y (y < x)\]
Assuming \(P(x)\) means x is a prime number
\[\neg \forall x P(x) \equiv \exists x \neg P(x)\]
\[\neg\exists x P(x) \equiv \forall x \neg P(x)\]
Given: * P: Jack passed math * Q: Jill passed math
Statements
The statement P \(\implies\) Q implies that whenever P is True, Q will be True
However, Q can still be true even if P is false.
The implication P \(\rightarrow\) Q is false only when P is true and ( Q ) is false. In all other cases, it is true
If it is raining P, then the ground is wet Q. If it is not raining, the ground could still be wet for other reasons (e.g., someone watered the garden), so the implication holds true.
\[P \implies Q\]
If the truth of (P) guarantees the truth of (Q)
then (P) is a sufficient condition for (Q)
\[P \implies Q; \quad Q \implies P\]
\[(P \implies Q) \land (Q \implies P) \implies (P \iff Q)\]
\[\small\begin{matrix} \bf Condition & \bf Math & \bf LaTeX & \bf Program\\ \hline \bf Conjunction & \land & \verb '\land' & \verb '&&' \\ \bf Disjunction & \lor & \verb '\lor' & \verb'||' \\ \bf Implication & \implies & \verb '\implies' & \verb'->'\\ \bf Biconditional & \iff & \verb '\iff' & \verb'<-->' \\ \bf Negation & \neg & \verb '\neg' & \verb'!' \\ \bf Exists & \exists &\verb '\exists' & \verb'if'\\ \bf Forall & \forall & \verb '\forall' & \verb'foreach'\\ \end{matrix} \]
\tag
\begin{..} ... \end{..}
{...}
$$d = \sqrt{a_0^2 + a_1^2}$$
\vfil \hfil \bigskip \smallskip
\tiny \small \normalsize \large \huge
\bf \tt \sl \it
\section \subsection \subsubsection
\includegraphics{width=\columnwidth}{pic.png}
\begin{tabular}{lr} aa & 3.5\\ b & 17.2\\ \end{tabular}
\footnote{This is a note}
\cite{Knuth:1970}
\label{id} .. As seen in \ref{id}
Namecards
Namecards
\documentclass[a4paper,11pt]{memoir}
\usepackage{xcolor}
\usepackage[newdimens]{labels}
\usepackage{paratype}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage[newdimens]{labels}
\LabelCols=2 \LabelRows=5 \numberoflabels=10%
\LabelGridtrue%
\predisplaysize=0pt
\begin{document}
%%%
\addresslabel[\fboxsep=2mm]{....}%
%%%
\end{document}
\addresslabel[\fboxsep=2mm]{\vbox to 50mm{%
\hsize=90mm\kern 4mm
\hbox to \hsize{\hss
\includegraphics[height=10mm]{pyulogo.png}\
\vbox to 9mm {\small
\hbox{International College, Rm 314}\vss
\hbox{Information Technology Dept}%
}\hss
}%
\kern -2mm
\hbox to \hsize{\hss\scriptsize
Amphur Muang Chiang Mai 50000,
Thailand 50000\hss}%
\vss
\vbox{\color{pyublue}{%
\hbox to \hsize{\hss\Large
\textbf{Dr.~Robert Batzinger}\hss}%
\hbox to \hsize{\hss
\textit{Emeritus Instructor}\hss}}}%
\vss
\hbox to \hsize{\hss\scriptsize
\begin{tabular}{rlrl}
Phone: & (053) 241-255 ext. 7221 &
Facebook: & robert.batzinger\\
WWW: & https://rbatzing.github.io &
LinkedIn: & robert-batzinger\\
Email: & robert\_b@payap.ac.th &
Twitter: & @rbatz\\
\end{tabular}\hss}}}%
Namecards
A set is a collection of objects, which are called elements. The order of the elements does not matter, and each element may occur no more than once. An element may be atomic or molecular.
Notation | \(\LaTeX\) | Explanation |
---|---|---|
\(X = \{a,b,c\}\) | X = \{a,b,c\} |
\(X\) is a set that contains \(a,b,c\) |
\(Y = \{b,c,d\}\) | Y = \{b,c,d\} |
\(Y\) is a set that contains \(b,c,d\) |
\(Z = \{X, Y\}\) | Z = \{X, Y\} |
\(Z\) is a set of Sets \(X\) and \(Y\) |
\(A \subset X\) | A \subset X |
Set \(A\) is a subset of \(X\) |
\(B \subseteq X\) | B \subseteq X |
Set \(B\) is a subset or equals to Set \(X\) |
\(a \in X\) | a \in X |
\(a\) is an element of Set \(X\) |
\(d \not\in X\) | d \not\in X |
\(d\) is not an element of Set \(X\) |
\(\LaTeX\) | Definition | Explanation |
---|---|---|
\emptyset |
\(\emptyset\) | \(\emptyset\) is a set with no elements |
\mathbb{P} |
\(\mathbb{P} = \{2,3,5,7,11,...\}\) | \(\mathbb{P}\) is a set of Prime Numbers |
\mathbb{W} |
\(\mathbb{W} = \{1,2,3,4,...\}\) | \(\mathbb{W}\) is a set of Whole Numbers |
\mathbb{N} |
\(\mathbb{N} = \{0,1,2,3,4,...\}\) | \(\mathbb{N}\) is a set of Natural Numbers |
\mathbb{Z} |
\(\mathbb{Z} = \{...,-3,-2,-1,\) \(0,1,2,3,...\}\) |
\(\mathbb{Z}\) is a set of all Integers |
\mathbb{Q} |
\(\mathbb{Q} = \{x \in \mathbb{R} : x = n/m :\) $ n,m }$ |
\(\mathbb{Q}\) is a set of all Rational Numbers |
\mathbb{R} |
\(-\infty < \mathbb{R} < \infty\) | \(\mathbb{R}\) is a set of all Real Numbers |
\cal U |
\(\cal U\) | Set of all elements in the domain |
\(\LaTeX\) | Notation | Description |
---|---|---|
\{ ,\} |
\(\{ ,\}\) | The elements of a set. \(\{1, 2, 3\}\) is the set containing 1, 2, and 3. |
: |
\(:\) | \(\{x : x > 2\}\) is the set of all \(x\) where \(x > 2\) |
\in |
\(\in\) | \(2 \in \{1, 2, 3\}\) asserts that \(2\) is an element of the set |
\not\in |
\(\not\in\) | \(4 \not\in \{1,2,3\}\) asserts that \(4\) is not an element of the set |
{\cal P}(A) |
\({\cal P}(A)\) | \({\cal P}(A)\) is a power set of \(A\) containing all the subsets of \(A\) |
Please note which of these is true
Given \(A=\{1,2,3\}, X = {\cal P}(A):\)
\(\qquad\exists y \in X: y \subseteq A, y = A\)
Hint (What is the value of \(y\) ?)
Given \(A = \emptyset, X = {\cal P}(A):X = A\)
Hint: (What is the value of \(X\) ?)
Given \(A = \emptyset, X = ?\)
Which are true, false, or meaningless?
Given \(A=\{1,2,3,4,5,6\},\) \(B=\{2,4,6\},\) \(C=\{1,2,3\},\) and \(D=\{7,8,9\}\)
\[\begin{array}{ll|ll} * & A \subset B \\ * & B \subset A \\ * & B \in C \\ * & A > D \\ * & \emptyset \in A \\ * & \emptyset \subset A \\ * & 3 \in C \\ * & 3 \subset C \\ * & \{3\} \subset C \\ * & \{3,3,2,1,1\} = C \\ \end{array}\]
Definition
Cardinality of a set equals the number of unique elements of a set.
\[A = \{1,2,3\} \implies |A| = 3\]
Find the cardinality of the following sets
\[\tiny\begin{array}{|c|c|c|c|c|} \hline A & |A| & {\cal P}(A) & count({\cal P}(A)) & |{\cal P}(A)| \\ \hline \emptyset & 0 & \{\emptyset\} & (1) & 1 \\ \hline \{1\} & 1 & \{\{\emptyset\},\{1\}\} & (1+1) & 2 \\ \hline \{1,2\} & 2 & \{\{\emptyset\}, \{1\}, \{2\}, \{1,2\}\} & (1+2+1) & 4 \\ \hline \{1,2,3\} & 3 & \{\{\emptyset\}, \{1\}, \{2\}, \{3\}, \{1,2\}, \{1,3\}, \{2,3\}, \{1,2,3\}\} & (1+3+3+1) & 8 \\ \hline \{1,2,3,4\} & 4 & \{\{\emptyset\}, \{1\}, \{2\}, \{3\}, \{4\}, \{1,2\}, \{1,3\}, \{1,4\}, \{2,3\}, & (1+4+6+4+1) & 16 \\ & & \{2,4\}, \{3,4\}, \{1,2,3\}, \{1,2,4\}, \{1,3,4\}, \{2,3,4\},\{1,2,3,4\}\}&&\\ \hline \{1,2,3,4,5\} & 5 & \{\{\emptyset\}, \{1\}, \{2\}, \{3\}, \{4\}, \{5\}, \{1,2\}, \{1,3\}, \{1,4\}, \{1,5\}, &(1+5+10+10+5+1) & 32 \\ & & \{2,3\}, \{2,4\}, \{2,5\}, \{3,4\}, \{3,5\}, \{4,5\}, \{1,2,3\}, & & \\ & &\{1,2,4\}, \{1,2,5\}, \{1,3,4\}, \{1,3,5\}, \{1,4,5\}, \{2,3,4\}, & & \\ & & \{2,3,5\}, \{2,4,5\}, \{3,4,5\}, \{1,2,3,4\}, \{1,3,4,5\}, & & \\ & &\{1,2,4,5\}, \{1,2,3,5\}, \{2,3,4,5\}, \{1,2,3,4,5\}\}& & \\ \hline \end{array}\]
\[\displaystyle P(n) = \underbrace {n\cdot (n-1)\cdot (n-2)\cdot (n-3) \cdots (1)}_{n\ \mathrm {factors}} = n!\]
\[\displaystyle P(n,k) = \underbrace {n\cdot (n-1)\cdot (n-2)\cdots (n-k+1)} _{k\ \mathrm {factors}} = \frac{n!}{(n-k)!}\]
\[\displaystyle\eqalign{C(n,k) &=& \underbrace {n\cdot (n-1)\cdot (n-2)\cdots (n-k+1)} _{k\ \mathrm {factors}}\\ &=& \frac{n!}{k!(n-k)!}={n \choose k}\\}\]
Determine set expressions required to fill each of the colored areas
\[\tiny\begin{array}{ll} Red & A | (B \cup C) \\ Yellow & (A \cup B) |C \\ Green &\\ Cyan &\\ Blue &\\ Purple &\\ White &\\ Grey & \\ \end{array}\]
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{venndiagram}
\usepackage{xcolor}
\begin{document}\Large
\begin{venndiagram3sets}[labelOnlyA={1},
labelOnlyB={2},labelOnlyC={3},
labelOnlyAB={4},labelOnlyAC={5},
labelOnlyBC={6},labelABC={7},
labelNotABC={8},shade=orange]
\fillACapB \fillBCapC \fillACapC
\end{venndiagram3sets}
\end{document}
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{VennDiagram}
\author{rbatzing }
\date{November 2018}
\usepackage{venndiagram}
\usepackage{xcolor}
\begin{document}\small
\begin{venndiagram3sets}[labelOnlyA={1138},
labelOnlyB={1183},labelOnlyC={1159},
labelOnlyAB={529},labelOnlyAC={532},
labelOnlyBC={532},labelABC={196},
labelNotABC={5269},shade=orange]
\fillACapB \fillBCapC \fillACapC
\end{venndiagram3sets}
\end{document}
Use the Venn.tex to create a PDF that displays the following
Upload the diagram to the Google Classroom
Results of a survey:
How many people were surveyed?
puts <<endmsg
A:#{setA.inspect} B:#{setB.inspect}
C:#{setC.inspect}
B subset A: #{setB.subset?(setA)}
A superset B: #{setA.superset?(setB)}
A union B: #{setA.union(setC).inspect}
A intersect C: #{setA.intersection(setC).inspect}
A intersect C: #{(setA & setC).inspect}
A intersect C?:#{setA.intersect?(setC)}
A subtract C: #{setA.difference(setC)}
Complement(B): #{setU.subtract(setB).inspect}
Cardinality(A):#{setA.size}
4 member of C?:#{setC.include?(4)
endmsg
A:#<Set: {1, 2, 3}> B:#<Set: {2, 3}>
C:#<Set: {2, 3, 4}>
B subset A: true
A superset B: true
A union B: #<Set: {1, 2, 3, 4}>
A intersect C: #<Set: {2, 3}>
A intersect C: #<Set: {2, 3}>
A intersect C?: true
A subtract C: #<Set: {1}>
Complement(B): #<Set: {1, 4}>
Cardinality(A): 3
4 member of C?: true
Create a Venn Diagram in yEd to represent the relationships between these standard sets:
\[\mathbb{N}, \mathbb{P}, \mathbb{Q}, \mathbb{R}, \mathbb{W}, \mathbb{Z}\]
Amy finds a present on her doorstep. She suspects it was left by either Rachel, Tess, or Nicol. She confronts each one.
Assume that the present-giver is lying and the other two individuals are telling the truth.
Who left Amy the present?
English Statement | Equivalent Statement |
---|---|
Not [All ducks like cookies] | There exists a duck who does not like cookies. |
\(\lnot \Big(\forall d: \heartsuit(d,c) \Big)\) | \(\exists d: \lnot \heartsuit(d,c)\) |
Not [some duck likes cookies]) | All ducks do not like cookies |
\(\lnot \Big(\exists d: \heartsuit(d,c) \Big)\) | \(\forall d: \lnot \heartsuit(d,c)\) |
All ducks and All geese do not love cookies | There does not exist any duck or geese that love cookies |
\(\forall d,g: \lnot \heartsuit(d,c) \land \lnot \heartsuit(g,c)\) | \(\lnot \exists g \lor \lnot\exists d: \heartsuit(d,c) \lor \heartsuit(g,c)\) |
Some ducks and some geese do not like cookies | Not all ducks and geese like cookies. |
\(\exists d \lor \exists g: \lnot \heartsuit(d,c) \lor \lnot \heartsuit(g,c)\) | \(\lnot\forall d \land \lnot \forall g: \heartsuit(d,c) \land \heartsuit(g,c)\) |
Using Sets to Create Venn Diagrams Efficiently
* Title: Choose an appropriate title that uses less than 250 characters * Author: Add names and student id numbers of both students * Abstract: summarizes the research project in less than 2,500 characters. * Keywords: 3 best words to index this report. * Introduction: Define and describe the research question you are trying to answer
::: :::{.column width=“50%”}
* Methodology: Describe the methods and technology did you use to do this research * Results: Provide tables and graphs of your results and describe the key findings * Conclusion: Summarize your findings and recommend the best answer for your research questions * Bibliography: State works and methods of others that is relevant to this research
Introduction to counting collections of things
In a group of 10 people, if everyone shakes hands with everyone else exactly once, how many handshakes took place?
If there are 10 people and 3 chairs, how many groups of 3 are possible?
How many ways can you distribute 10 cookies to 7 students?
The additive principle states that if event \(A\) can occur in \(m\) ways, and event \(B\) can occur in \(n\) disjoint ways, then the event \(A \cup B\) can occur in \(m + n\) ways.
For 2 sets: \(|A \cup B| = |A| + |B| - |A \cap B|\)
For 3 sets: \(\small|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| +|A \cap B \cap C|\)
For given sets \(A\) and \(B\), the set of all ordered pairs \(\{x,y\}\) where \(x \in A\) and \(y \in B\)
\[\hbox{For}\ A = \{1,2,3\}\ \hbox{and}\ B = \{A,B,C,D\}\]
\[A \times B= \left\{ \begin{array}{ccc} \{1,A\} & \{2,A\} & \{3,A\}\\ \{1,B\} & \{2,B\} & \{3,B\}\\ \{1,C\} & \{2,C\} & \{3,C\}\\ \{1,D\} & \{2,D\} & \{3,D\}\\ \end{array} \right\}\]
If event \(A\) can occur in \(m\) ways, and each possibility for \(A\) allows for exactly \(n\) ways for event \(B\), then the event \(A \cup B\) can occur in \(m \times n\) ways
For sets: \(|A \times B| = |A| \cdot |B|\)
If \(N\) objects are placed in \(K\) boxes, then there is at least one box containing at least \(\lceil N/K \rceil\) objects.
Example:
Among 100 people, there are at least \(\lceil 100 / 12 \rceil = 9\) who were born in the same month.
Given a restaurant offers 8 appetizers and 14 entrées.
How many choices do you have if:
A palindrome is a string that is identical to the string in reverse order. How many bit strings of length \(n\) are palindromes?
How many licence plates can be made using either two letters followed by 4 digits or four letters followed by 2 digit is?
How many books can be identified using the 12 digit ISBN?
\[|{\cal P}(A)| = 2^5 = 32\]
\[\left({|A|\over n!\ (|A| - n)!}\right)\]
\[\tiny\begin{array}{|c|c|c|c|c|} \hline n=0 & n=1 & n=2 & n=3 & n=4 & n=5 \\ \hline \left({5\atop 0}\right) & \left({5\atop 1}\right) & \left({5\atop 2}\right) & \left({5\atop 3}\right) & \left({5\atop 4}\right) & \left({5\atop 5}\right) \\ \hline \left({5!\over 0!\ 5!}\right) & \left({5!\over 1!\ 4!}\right) & \left({5!\over 2!\ 3!}\right) & \left({5!\over 3!\ 2!}\right) & \left({5!\over 4!\ 1!}\right) & \left({5!\over 5!\ 0!}\right) \\ \hline {5\cdot4\cdot3\cdot2\cdot1\over (5\cdot4\cdot3\cdot2\cdot1)} & {5\cdot4\cdot3\cdot2\cdot1\over (1)(4\cdot3\cdot2\cdot1)} & {5\cdot4\cdot3\cdot2\cdot1\over (2\cdot1)(3\cdot2\cdot1)} & {5\cdot4\cdot3\cdot2\cdot1\over (3\cdot2\cdot1)(2\cdot1)} & {5\cdot4\cdot3\cdot2\cdot1\over (4\cdot3\cdot2\cdot1)(1)} & {5\cdot4\cdot3\cdot2\cdot1\over (5\cdot4\cdot3\cdot2\cdot1)} \\ \hline {1 \over 1} & {5 \over 1} & {5\cdot4 \over 2\cdot1} = {5\cdot2\over 1} & {5\cdot4\cdot3 \over 3\cdot2\cdot1} = {5\cdot 2\over 1} & {5 \over 1} & {1 \over 1}\\ \hline 1 & 5 & 10 & 10 & 5 & 1 \\ \hline \emptyset & \{1\}, & \{1,2\}, \{2,3\}, &\{1,2,3\}, \{2,3,4\}, & \{1,2,3,4\}, & \{1,2,3,4,5\}\\ & \{2\}, &\{3,4\}, \{4,5\},& \{3,4,5\}, \{1,2,4\}, & \{1,2,3,5\}, & \\ &\{3\}, & \{1,3\}, \{1,4\}, &\{2,3,5\}, \{1,2,5\}, & \{1,2,4,5\}, & \\ &\{4\}, &\{1,5\}, \{1,4\}, &\{1,3,4\}, \{1,3,5\},&\{1,3,4,5\},&\\ &\{5\} &\{2,5\}, \{1,5\} & \{1,4,5\}, \{2,4,5\} & \{2,3,4,5\} & \\ \hline 00000 & 10000, & 11000,01100, & 11100, 01110, & 11110, & 11111 \\ & 01000, & 00110, 00011, & 00111, 11010, & 11101, & \\ & 00100, & 10100, 10010, & 01101, 11001, & 11011, & \\ & 00010, & 10001, 10010, & 10110, 10101, & 10111, &\\ & 00001 & 01001, 10001 & 10011, 01011 & 01111 & \\ \hline \end{array}\]
\[\small\begin{array}{|l|c|c|c|c|c|} \hline weight: & k=0 & k=1 & k=2 & k=3 & k=4 & k=5 \\ \hline B^5_k & 00000 & 10000, & 11000, 01100, & 11100, 01110, & 11110,& 11111 \\ & & 01000, & 00110, 00011, & 00111, 10110, & 11101, & \\ & & 00100, & 10100, 01010, & 01011, 10011, & 11011, & \\ & & 00010, & 00101, 10010, & 10101, 11001, & 10111, & \\ & & 00001 & 01001, 10001 & 11010, 01101 & 01111 & \\ \hline B^5_k& 1 & 5 & 10 & 10 & 5 & 1 \\ \hline \end{array}\]
\[\{?????\}_{k=3} = 0\{????\}_{k=3} + 1\{????\}_{k=2}\]
\[\begin{array}{rcccccl} |B^5_3| & = & |B^4_3| + |B^4_2| &=& 4 + 6 & = & 10 \\ |B^4_3| & = & |B^3_3| + |B^3_2| &=& 1 + 3 & = & 4 \\ |B^4_2| & = & |B^3_2| + |B^3_1| &=& 3 + 3 & = & 6 \\ \end{array}\]
::: :::{.column width=“50%”}
lattice
\[\begin{array}{c} (x + y)^1 = x + y\\ (x + y)^2 = x^2 + 2xy + y^2\\ (x + y)^3 = x^3 + 3x^2y + 3xy^2 + y^3\\ (x + y)^4 = x^4 + +4x^3y + 6x^2y^2 + 4xy^3 + y^4\\ (x + y)^5 = x^5 + 5x^4y + 10x^3y^2 + 10x^2y^3 + 5xy^4 + y^5\\ \end{array}\]
\[\begin{array}{c} \exists n,k: n \ge 0, 0 \le k \le n \Rightarrow\\ \left({n \atop k}\right)\\ \end{array}\]
n choose k
.\[\left({n \atop k}\right) =\left({n-1 \atop k-1}\right) + \left({n-1 \atop k}\right)\]
Define these terms:
::: :::{.column width=“50%”}
::: ::::
A function is a rule that assigns each input exactly one output.
Domain is the set of all possible inputs.
Range is the set of all possible outputs.
Given the following mappings, which would qualify as functions?
Surjection where the elements of the domain cover the full range of value in the range.
\[ f : \{1, 2, 3, 4, 5, 6\} \Rightarrow \{a,b,c\}\]
\[\begin{array}{|c|c|c|c|c|c|c|} \hline Original\ domain & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline Outcomes\ value & a & a & b & b & b & c \\ \hline \end{array}\]
Injection where the elements of the domain map to unique values in the range (No duplicates).
\[ f : \{1, 2, 3, 4, 5\} \Rightarrow \{a,b,c, d, e, f\}\]
\[\begin{array}{|c|c|c|c|c|c|c|} \hline Original\ domain & 1 & 2 & 3 & 4 & 5 \\ \hline Outcomes\ value & e & c & b & d & a \\ \hline \end{array}\]
Bijection where the all elements of the domain map to unique values which cover the entire range.
\[ f : \{1, 2, 3, 4, 5, 6\} \Rightarrow \{a,b,c, d, e, f\}\]
\[\begin{array}{|c|c|c|c|c|c|c|} \hline Original\ domain & 1 & 2 & 3 & 4 & 5 & 6\\ \hline Outcomes\ value & f & c & b & d & a & e\\ \hline \end{array}\]
inverse
\[ f : \{1, 2, 3, 4, 5, 6\} \Rightarrow \{a,b,c, d, e, f\}\]
\[ f : \{a,b,c, d, e, f\} \Rightarrow \{1, 2, 3, 4, 5, 6\}\]
This version cannot be drawn on a single plane without the edges intersecting
1000
::: :::{.column width=“50%”}
# ADDITIVE
x = 0
for i in 1..10
x = x + 1
end
for j in 1..10
x = x + 1
end
for k in 1..10
x = x + 1
end
puts x
30
::: :::{.column width=“50%”}
n | x | \(\sum_{x=1}^n\ x\) |
---|---|---|
1 | 1 | 1 |
2 | 4 | 3 |
3 | 10 | 6 |
4 | 20 | 10 |
5 | 35 | 15 |
6 | 56 | 21 |
7 | 84 | 28 |
8 | 120 | 36 |
9 | 165 | 45 |
10 | 220 | 55 |
\[\small\begin{array}{cccc} \textbf{n} & \textbf{Sequence} &\textbf{Sum} &\textbf{Equiv}\\ \hline 1 & \small 1 & 1 & 1{(1+1)\over 2} \\ 2 & \small 1+2 & 3 & 2{(1+2)\over 2} \\ 3 & \small 1+2+3 & 6 & 3{(1+3)\over 2} \\ 4 & \small 1+2+3+4 & 10 & 4{(1+4)\over 2} \\ 5 & \small 1+2+3+4+5 & 15 & 5{(1+5)\over 2} \\ 6 & \small 1+2+3+4+5+6 & 21 & 6{(1+6)\over 2} \\ 7 & \small 1+2+3+4+5+6+7 & 28 & 7{(1+7)\over 2} \\ 8 & \small 1+2+3+4+5+6+7+8 & 36 & 8{(1+8)\over 2} \\ \hline \end{array}\]
\[\begin{array}{rcc} count & = & \sum{\{1 .. n\}} + \sum{\{1 .. (n-1)\}} + ... + \{1\} \\ & = & {x(x+1)\over 2} + {(x-1)((x-1)+1)\over 2} + ... + 1 \\ & = & {x_n + x_n^2\over 2} + {x_{n-1} + x_{n-1}^2\over 2} + ... + {x_{1} + x_{1}^2\over 2}\\ & = & {\sum_{i=1}^{n}\ x_i + \sum_{i=1}^{n}\ x_i^2\over 2} \\ \end{array}\]
::: :::{.column width=“50%”}
\[(A \land B) \lor (A \land \neg B)\]
\[(A \lor B) \land (A \lor \neg B)\]
\[(A\land(B\lor C))\lor (A\land(B\lor\neg C))\]
\[\neg(A\lor B) \land (A\lor B)\]
\[(A\land B) \lor (\neg A \land B)\]
IT221 Discrete Math