About

Syllabus

In discrete mathematics, several mathematical functions are used to solve problems and analyze structures. Here are some other useful functions:

1. Modulus Function:

The modulus function, denoted as \(f(x) = |x|\), returns the absolute value of \(x\). It’s useful in number theory and analyzing distances.

2. Greatest Common Divisor (GCD):

The GCD of two integers is the largest integer that divides both numbers without leaving a remainder. It’s fundamental in number theory.

3. Least Common Multiple (LCM):

The LCM of two integers is the smallest positive integer that is divisible by both numbers. It’s commonly used in problems involving synchronization.

4. Factorial Function:

Denoted as \(n!\), the factorial of \(n\) is the product of all positive integers up to \(n\). It’s essential in combinatorics and permutations.

5. Combination Function:

Denoted as \(C(n, k)\) or \(\binom{n}{k}\), it represents the number of ways to choose \(k\) elements from a set of \(n\) elements without regard to order.

6. Permutation Function:

Denoted as \(P(n, k)\), it represents the number of ways to arrange \(k\) elements from a set of \(n\) elements in a specific order.

7. Logarithm Function:

Logarithms, especially base 2 (\(\log_2\)), are used in analyzing algorithms, particularly for their time complexity.

8. Exponentiation Function:

Exponentiation involves raising a number to a power, which is critical in calculating growth rates, especially in recursive algorithms.

9. Signum Function:

The signum function, denoted as \(\text{sgn}(x)\), extracts the sign of a real number. It’s useful in various mathematical proofs.

10. Prime Indicator Function:

A function that determines whether a number is prime or composite, which is fundamental in number theory.

11. Step Function (Heaviside Function):

A discontinuous function that is zero for negative inputs and one for positive inputs. It’s used in discrete event simulation and signal processing.

12. Summation Function:

Denoted as \(\sum\), it represents the sum of a sequence of numbers, essential in combinatorial analysis and series.

13. Product Function:

Denoted as \(\prod\), it represents the product of a sequence of numbers, useful in various mathematical and combinatorial contexts.

These functions are integral to discrete mathematics, providing tools to analyze, solve, and understand complex problems. Let me know if you need further details or examples for any of these functions!

#### {Powers}
#### {Exponentials Functions}
\[ e^a \times e^b = e^{a+b}\]
\[ (e^a )^b = e^{ab}\]
%\[ \lfloorx\rfloor\]
:
State the range and domain of the following function \[ F(x) = \lfloor x-1 \rfloor \]
#### Special Cases
Anything to the power of zero is always 1
\[ X^ 0 = 1 \mbox{ for all values of X} \]
Mathematical Functions{data-navmenu=“Functions”} =====================================
Column {.tabset}

logarithms

% http://www.purplemath.com/modules/logs2.htm

The Relationship: “_b(x) = y” means the same thing as “b y = x”. logarithms are really exponents (powers); they’re just written differently.

  • (b) = 1, for any base b, because b1 = b.

  • (1) = 0, for any base b, because b0 = 1.

  • (a) is undefined if a is negative.

  • (0) is undefined for any base b.

  • (bn) = n, for any base b.

  • \(a^x = y\) \(\log_a(y) = x\)

  • \(e^x = y\) \(ln(y)=x\)

  • \(\log_a(x\times y) = \log_a(x) + \log_a(y)\)

  • \(\log_a(\frac{x}{y}) = \log_a(x) - \log_a(y)\)

  • \(\log_a(\frac{1}{x}) = - \log_a(x)\)

  • \(\log_a(a) = 1\)

  • \(\log_a(1) = 0\)

Expressing logarithms

Convert \(6^3 = 216\) to the equivalent logarithmic expression.

To convert, the base (that is, the 6)remains the same, but the 3 and the 216 switch sides. This gives me:

\[\log_6(216) = 3 \]

Convert \(\log_4(1024) = 5\) to the equivalent exponential expression.

To convert, the base (that is, the 4) remains the same, but the 1024 and the 5 switch sides. This gives me:

\[4^5 = 1024\]

Rules of logarithms

Laws of logarithms

  • Law 1 : Multiplcation of logarithms \[ \log(a) \times \log(b) = \log(a+b) \]
  • Law 2 : Division of logarithms \[ \frac{\log(a)}{\log(b)} = \log(a-b) \]
  • Law 3 : Powers of logarithms \[ \log(a^b) = b \times \log(a) \]

Laws for logarithms

The following laws are very useful for working with logarithms.

  • \(\mbox{\log}_b(X)\) + \(\mbox{\log}_b(Y)\) = \(\mbox{\log}_b(X\times Y)\)
  • \(\mbox{\log}_b(X)\) - \(\mbox{\log}_b(Y)\) = \(\mbox{\log}_b(X / Y)\)
  • \(\mbox{\log}_b(X^Y)\)= \(Y \mbox{\log}_b(X)\)

Using the Laws

  1. Multiplication inside the can be turned into addition outside the , and vice versa. \[\mbox{\log}_b(mn) = \mbox{\log}_b(m) + \mbox{\log}_b(n)\]

  2. Division inside the can be turned into subtraction outside the , and vice versa. \[\mbox{\log}_b(m/n) = \mbox{\log}_b(m) – \mbox{\log}_b(n)\]

  3. An exponent on everything inside a can be moved out front as a multiplier, and vice versa. \[mbox{\log}_b(m^n) = n \times \mbox{\log}_b(m)\]

Change of Base

\[ \log_b(x) = \frac{1}{\log_x(b)} \]

\[ \log_b(x) = \frac{\log_a(b)}{\log_a(b)} \]

Worked Example

\[ \log_3(x) + 3 \log_x(3) = 4 \]

\[ \left(\log_3(x)\right)^2 + 3 = 4 \log_3(x) \]

\[ \log_3(x) + 3 \log_x(3) = 4 \]

\[ \left(\log_3(x)\right)^2 - 4 \log_3(x) + 3 = 0 \]

Exponents

\[ e^a \times e^b = e^{a+b}\]

\[ (e^a )^b = e^{ab}\]

Absolute Value & Sign Functions

Special Mathematical Functions

Mathematical Operators

  • Root Functions (i.e. the Square Root function)
  • The Floor and Ceiling functions
  • The Absolute Value functions

Notation

  • Absolute Value Function \(| x |\)
  • Ceiling Function \(\lceil x \rceil\)
  • Floor Function $x $

Absolute Value Function

  • The absolute value of some real number \(x\) is denoted \(|x|\).
  • If the number is positive, the asbolute value is the same number.
  • If the number is negative, the asbolute value is the number without the minus sign.
  • \(|2|=2\)
  • \(|-2| = 2\)

Tutorials

Exercise 2

\[ \frac{\mbox{ln}(2) + \mbox{ln}(2^2) + \mbox{ln}(2^3) + \mbox{ln}(2^4) + \mbox{ln}(2^5) } {\mbox{ln}(4)} \] Useful Rule of Logarithms \[ \mbox{ln}(a^b) = b\cdot \mbox{ln}(a) \] \[ \frac{\mbox{ln}(2) + 2 \cdot \mbox{ln}(2) + 3 \cdot\mbox{ln}(2) + 4 \cdot \mbox{ln}(2) + 5 \cdot \mbox{ln}(2) } {\mbox{ln}(4)} \] ——————–

Special Functions

Column

Absolute Value & Sign Functions

Special Mathematical Functions

Mathematical Operators

  • Root Functions (i.e. the Square Root function)
  • The Floor and Ceiling functions
  • The Absolute Value functions

Absolute Value Function

  • The absolute value of some real number \(x\) is denoted \(|x|\).
  • If the number is positive, the absolute value is the same number.
  • If the number is negative, the absolute value is the number without the minus sign.
  • \(|2|=2\)
  • \(|-2| = 2\)

Tutorials

Precision Functions

Column

Precision Functions

Precision Functions

{Precision Functions}

  • Absolute Value Function \(| x |\)
  • Ceiling Function \(\lceil x \rceil\)
  • Floor Function $x $

Floor and ceiling functions

Floor function and Ceiling function

  • In mathematics and computer science, the floor function is the function that takes as input a real number x, and gives as output the greatest integer less than or equal to x, denoted floor(x) or ⌊x⌋.

  • Similarly, the ceiling function maps x to the least integer greater than or equal to x, denoted ceil(x) or ⌈x⌉

  • For example, ⌊2.4⌋ = 2, ⌊−2.4⌋ = −3, ⌈2.4⌉ = 3, and ⌈−2.4⌉ = −2.

  • The integral part or integer part of x, often denoted \([x]\) is usually defined as the ⌊x⌋ if x is nonnegative, and ⌈x⌉ otherwise

  • For example, [2.4] = 2 and [−2.4] = −2.

  • The operation of truncation generalizes this to a specified number of digits: truncation to zero significant digits is the same as the integer part.

  • Some authors define the integer part as the floor regardless of the sign of x, using a variety of notations for this.

  • For n an integer, \(⌊n⌋ = ⌈n⌉ = [n] n =\) n.


Examples

x Floor ⌊x⌋ Ceiling ⌈x⌉ Fractional part {x} 2 2 2 0 2.4 2 3 0.4 2.9 2 3 0.9 −2.7 −3 −2 0.3 −2 −2 −2 0

Notation

  • Absolute Value Function \(| x |\)
  • Ceiling Function \(\lceil x \rceil\)
  • Floor Function $x $

Exercises: Functions

Column

Work Sheet 1

Exercise 1

http://www.analyzemath.com/college_algebra/problems_5.html Let X = {1, 2, 3, 4} and Y={A,B,C,D}. Determine whether each relation is a function, with \(X -> Y\).

  1. f = {(2, C), (1, D), (2, A), (3,B), (4, D)}

No: Two different ordered pairs (2, C) and (2, A) in f have the same number 2 as their first coordinate

Let X = {1, 2, 3, 4}. Determine whether the following relation on X is a function.

  1. g = {(3, A), (4, B), (1, C)}

No The element 2 does not appear as the first coordinate in any ordered pair in g.

Exercise 2

Complete the following table for the functions

  • \(g(x) = \mbox{log}_3x\),
  • \(h(x) =\sqrt[3]{x}\).

\[ \begin{array}{|c||c|c|c|c|c|c|} \hline x & \phantom{p}1\phantom{p}& & & & 81 & \\ \hline \phantom{p} $g(x)$ \phantom{p}& & \phantom{p}1\phantom{p} & \phantom{p}2\phantom{p} & & & \phantom{p}5\phantom{p} \\ \hline \phantom{p}$h(x)$ \phantom{p}& & & & 3.00 & \phantom{p}\phantom{p}\phantom{p} & \\ \hline \end{array} \]

Express your answers to 2 decimal places only.


\[ \begin{array}{|c||c|c|c|c|c|c|} \hline x & 1 & 3 & 9 & 27 & 81 & 243 \\ \hline \phantom{p} g(x) \phantom{p}&0 & 1 & 2 & 3 & 4 & 5 \\ \hline \phantom{p} h(x) \phantom{p}& 1.00 & 1.44 & 2.08 & 3.00 & 4.33 & 6.24 \\ \hline \end{array} \]

Exercise 3

The function \(f : \mathbb{Z} \rightarrow \mathbb{Z}\) is defined by the rule: \[f(x) = |x + 1| \] What is the range of this function?

Is this function ``onto” ?

Is this function ``one-to-one” ?

Is this function invertible ?

Exercise 4

Compute the Logarithm of the following

  1. \(\mbox{log}_2(8)\)
  2. \(\mbox{log}_2(\sqrt{128})\)
  3. \(\mbox{log}_2(64)\)
  4. \(\mbox{log}_5(125)\) + \(\mbox{log}_3(729)\)
  5. \(\mbox{log}_2(64/4)\)

Exercise 5

Evaluate the following expression. \[ \mbox{Log}_4 64 + \mbox{Log}_5 625 + \mbox{Log}_9 3 \]

Exercise 6

State the range and domain of the following function \[ F(x) = \lfloor x-1 \rfloor \]

Work Sheet 2

Let \(S\) be the set of all 4 bit binary strings.

The function \(f : S \rightarrow \mathbb{Z}\) is defined by the rule: \[f(x) = \mbox{the number of zeros in x}\] for each binary string \(x \in S\). Find:

  1. the number of elements in the domain
  2. \(f(1000)\)
  3. the set of pre-images of 1
  4. the range of \(f\).

Worksheet 2


{Functions}

Evaluate \(f(6)\)

\[ f(x) = \lfloor \frac{x+1}{2} \rfloor \]

\[ f(6) = \lfloor \frac{\boldsymbol{6}+1}{2}\rfloor = \lfloor \frac{7}{2}\rfloor\]

\[ \lfloor 3.5 \rfloor = 3 \]


{Functions}

Evaluate \(f(-6)\)

\[ f(x) = \lfloor \frac{x+1}{2} \rfloor \]

\[ f(6) = \lfloor \frac{\boldsymbol{-6}+1}{2}\rfloor = \lfloor \frac{-5}{2}\rfloor\]

\[ \lfloor -2.5 \rfloor = -3 \]

### Combined Questions
% Section 4 Functions % http://doc.gold.ac.uk/~maa01km/solutions/tut4sol.pdf
[(b)] Let \(S\) be the set of all 4 bit binary strings.
The function \(f : S \rightarrow \mathbb{Z}\) is defined by the rule: \[f(x) = \mbox{the number of zeros in x}\] for each binary string \(x \in S\).\ Find:
a. the number of elements in the domain b. \(f(1000)\) c. the set of pre-images of 1 d. the range of \(f\).

[(c)]