\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{ajhalling} \pdfinfo{ /Title (cis-206.pdf) /Creator (Cheatography) /Author (ajhalling) /Subject (CIS 206 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{63835A} \definecolor{LightBackground}{HTML}{F5F7F4} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{CIS 206 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{ajhalling} via \textcolor{DarkBackground}{\uline{cheatography.com/97552/cs/20906/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}ajhalling \\ \uline{cheatography.com/ajhalling} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 25th October, 2019.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vocabulary}} \tn % Row 0 \SetRowColor{LightBackground} Modus Ponens & {\bf{If P, then Q. P. Therefore, Q. }}If the cake is made with sugar, then the cake is sweet. The cake is made with sugar. Therefore, the cake is sweet. \tn % Row Count 8 (+ 8) % Row 1 \SetRowColor{white} Modus Tollens & {\bf{If P, then Q. Not Q. Therefore, not P.}} If the cake is made with sugar, then the cake is sweet. The cake is not sweet. Therefore, the cake is not made with sugar. \tn % Row Count 17 (+ 9) % Row 2 \SetRowColor{LightBackground} Onto Function & For every element Y in the codomain Y of F there is at least one element X in the domain X of X. Horizontal Line Test. \tn % Row Count 23 (+ 6) % Row 3 \SetRowColor{white} One-To-One Function & A function for which every element of the range of the function corresponds to exactly one element of the domain. \tn % Row Count 29 (+ 6) % Row 4 \SetRowColor{LightBackground} Bijection & Each element of one set is paired with exactly one element of the other set, and each element of the other set is paired with exactly one element of the first set. \tn % Row Count 38 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vocabulary (cont)}} \tn % Row 5 \SetRowColor{LightBackground} Domain & The set of all possible input x-values which will make the function "work", and output y-values. \tn % Row Count 5 (+ 5) % Row 6 \SetRowColor{white} Codomain & The set of all possible output values of a function. \tn % Row Count 8 (+ 3) % Row 7 \SetRowColor{LightBackground} Range & The set of {\bf{actual}} output values of a function. \tn % Row Count 11 (+ 3) % Row 8 \SetRowColor{white} Preimage & Another word for {\bf{Domain}} \tn % Row Count 13 (+ 2) % Row 9 \SetRowColor{LightBackground} Image & Another word for {\bf{Codomain}} \tn % Row Count 15 (+ 2) % Row 10 \SetRowColor{white} Fibonacci Sequence & F(n) = F(n-1) + F(n-2) \tn % Row Count 17 (+ 2) % Row 11 \SetRowColor{LightBackground} Universal Quantifier & {\bf{∀}} Expresses that the statements within its scope are true for everything, or every instance of a specific thing. \tn % Row Count 23 (+ 6) % Row 12 \SetRowColor{white} Existential Quantifier & {\bf{∃}} Expresses that the statements within its scope are true for at least one instance of something. \tn % Row Count 29 (+ 6) % Row 13 \SetRowColor{LightBackground} Scope & Denoted by symbols such as parenthesis and brackets to identify the section of the wff to which the quantifier applies. (∀x){[}P(x)-\textgreater{}Q(x){]} - the scope of ∀x is found within the brackets. \tn % Row Count 39 (+ 10) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vocabulary (cont)}} \tn % Row 14 \SetRowColor{LightBackground} Universal Instantiation & Lets you remove {\bf{∀}} from a predicate. \tn % Row Count 3 (+ 3) % Row 15 \SetRowColor{white} Existential Instantiation & Lets you remove {\bf{∃}} from a predicate. - Must be used before Universal Instantiation \tn % Row Count 8 (+ 5) % Row 16 \SetRowColor{LightBackground} Method/Subroutine & A subroutine (such as a function) returns a a value. A method is a subroutine or function that you can call on an object in an OO language. \tn % Row Count 15 (+ 7) % Row 17 \SetRowColor{white} Principle of Well-Ordering & Every collection of positive integers that contains any members at all has a smallest number \tn % Row Count 20 (+ 5) % Row 18 \SetRowColor{LightBackground} 1st Principle of Mathematical Induction & Two assertions: 1. You can reach the first rung 2. Once you get to a rung, you can always climb to the next one up. (Implication). 1. P(1) 2. For any positive integer {\emph{k}}, P(k)-\textgreater{}P(k+1) \tn % Row Count 30 (+ 10) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vocabulary (cont)}} \tn % Row 19 \SetRowColor{LightBackground} 2nd Principle of Mathematical Induction & Show that it's true for P(1), assume it's true for some value "k", use that assumption to show that it's true for K+1 \tn % Row Count 6 (+ 6) % Row 20 \SetRowColor{white} Binomial Theorem & Expands binomials. (a+b)\textasciicircum{}2 = a\textasciicircum{}2 + 2ab + b\textasciicircum{}2 \tn % Row Count 9 (+ 3) % Row 21 \SetRowColor{LightBackground} Pascal's Triangle & a triangular array of numbers in which those at the ends of the rows are 1 and each of the others is the sum of the nearest two numbers in the row above (the apex, 1, being at the top). \tn % Row Count 19 (+ 10) % Row 22 \SetRowColor{white} 1st Order Recurrence Relation & No need to find the two that precede it. Does it fit the pattern? S(n) = cS(n-1) + g(n) Step 1. Find C. Find g(n). Step 3. Plug n Chug. \tn % Row Count 26 (+ 7) % Row 23 \SetRowColor{LightBackground} 2nd Order Recurrence Relation & Requires the values from the previous two solutions. Fibonacci sequence is an example of 2nd Order RR. \tn % Row Count 32 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vocabulary (cont)}} \tn % Row 24 \SetRowColor{LightBackground} Closed-Form Solution & a mathematical expression that can be evaluated in a finite number of operations. No recurrence. \tn % Row Count 5 (+ 5) % Row 25 \SetRowColor{white} Binary Predicate & Tests the truth value of a predicate which takes two arguments. \tn % Row Count 9 (+ 4) % Row 26 \SetRowColor{LightBackground} Domain of Interpretation & Explains what is objects the predicate has meaning over. If P(x) x lives in the water, domain could be sea turtles. \tn % Row Count 15 (+ 6) % Row 27 \SetRowColor{white} Big-O & Explains where the "bulk" of the work is happening in a function. Drops coefficients. \tn % Row Count 20 (+ 5) % Row 28 \SetRowColor{LightBackground} Computational Complexity & The amount of resources required for running an algorithm \tn % Row Count 23 (+ 3) % Row 29 \SetRowColor{white} Permutation & An ordered arrangement of objects. Multiply the factorial of the P(n,r) values to find the values. n!/n-r! \tn % Row Count 29 (+ 6) % Row 30 \SetRowColor{LightBackground} Factorial & A value multiplied by the value before it subsequently to 1. 5! = 5 {\emph{ 4 }} 3 {\emph{ 2 }} 1 \tn % Row Count 34 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vocabulary (cont)}} \tn % Row 31 \SetRowColor{LightBackground} Combination & An unordered arrangement of objects C(n,r). n!/(r!(n-r)!) \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Proofs Using Predicate Logic}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Identify the Scope of a Variable in a Predicate}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Identify the Scope of a Variable in a Program}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Identify the Correct Negation of a Predicate}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Big-O Value for the Complexity of an Algorithm}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Do a Proof Using Mathematical Induction}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Determine Whether a Relation is a Function or Not}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Identify the Domain and Codomain of a Function}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Classify a Function as Onto, 1-to-1, or Bijection }} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Convert English Statements to Predicate Statements}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Expand a Binomial Using Binomial Theorem}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Write the First Few Rows of Pascal's Triangle}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Derive Closed Form Solution for 1st \& 2nd Order RR}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Behavior of Java AND/OR Operators \&\&, \&, |, ||}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}