Skip to content

Instantly share code, notes, and snippets.

@dtinth
Created October 17, 2012 03:05
Show Gist options
  • Save dtinth/3903488 to your computer and use it in GitHub Desktop.
Save dtinth/3903488 to your computer and use it in GitHub Desktop.
Discrete Mathematics 2012 Midterm
<script type="text/x-mathjax-config">MathJax.Hub.Config({ TeX: { Macros: {
'NOT': '{\\sim}'
, 'AND': '\\wedge'
, 'OR': '\\vee'
, 'IMPL': '\\rightarrow'
, 'IMPLL': '\\Rightarrow'
, 'IFF': '\\leftrightarrow'
, 'IFFF': '\\Leftrightarrow'
, 'EQUIV': '\\equiv'
, 'taut': '\\textbf{t}'
, 'cont': '\\textbf{c}'
, 'ARG': ['\\begin{array} \\ #1 \\end{array}', 1]
, 'PREM': ['& #1 \\\\ ', 1]
, 'THAT': '\\text{ such that }'
, 'SR': [ '\\left\\{ #1 \\right\\}', 1 ]
, 'SB': [ '\\left\\{ #1 \\mid #2 \\right\\}', 2 ]
, 'SUMM': ['\\sum _{#1=#2} ^{#3}', 3]
, 'PRODD': ['\\prod _{#1=#2} ^{#3}', 3]
, 'CONC': ['\\therefore & #1', 1]
, 'S': ['\\frac{2^{#1}-1}{2^{#1-1}}', 1]
, 'DS': ['\\scriptsize \\text{(#1)}', 1]
, 'PS': '\\mathscr{P}'
}}})
</script>

Discrete Maths 2012 Midterm

$(function() {
$('.container > blockquote').each(function() {
var $this = $(this)
$this.hide().before($('<a class="btn btn-large" href="javascript://">Show Solution</a>').click(function() {
$(this).hide()
$this.show()
}))
})
})

1

Is this argument valid?

$$ \ARG{ \PREM{\neg p \OR q \IMPL r} \PREM{s \OR \neg q} \PREM{\neg w} \PREM{p \IMPL w} \PREM{\neg p \AND r \IMPL \neg s} \CONC{\neg q} } $$

Valid Argument.

Actually, this problem is in Discrete Mathematics with Applications by Susanna S. Epp, Problem 41 of Section 2.3, with (\NOT) replaced with (\neg) and (t) becomes (w).

You can find the solution at the back of that book.

2

Given an equation (2x - y = 7), are the following statements true?

  1. For all real number (x), there exists a real number (y) that makes the equation true.

  2. There exists a real number (x) such that for all real number (y), the equation is true.

  3. Yes.

  4. No.

3

Prove or disprove that if (a) does not divide (bc), then (a) does not divide (b) too.

Valid Statement.

Proof (by contraposition)

The contrapositive is: if (a) divides (b), then (a) also divides (bc).

So suppose that (a) divides (b), that is, (b = ak) for some integer (k),
we must show that (a) divide (bc) too, that is, (bc = al) for some integer (l).

But since we suppose that (b = ak), we can substitute it in to get:

$$ akc = al $$

Since we suppose that (a) divides (b), then (a) cannot be (0). Divide both sides by (a):

$$ kc = l $$

(\therefore bc = al) for (l = kc), and since (k) and (c) are integers, (kc) and therefore (l) are also integer, because the product of integers is an integer.

(\therefore bc) is divisble by (a). Quod erat demonstrandum.

4

Given a summation: (1

  • \cfrac{1}{2}
  • \cfrac{1}{2^2}
  • \cfrac{1}{2^3}
  • \cfrac{1}{2^4}
  • \dotsb
  • \cfrac{1}{2^n} ) for integer (n \ge 1), find:
  1. Closed formula for the summation.

  2. Recursive formula for the summation.

  3. ( \begin{array}{l} S_1 = 1 \ S_n = S_{n - 1} + \frac{1}{2^{n - 1}} \end{array} )

  4. ( S_n = \S{n} )

Recursive Formula

The summation is from this sequence:

$$1 , \frac{1}{2} , \frac{1}{2^2} , \frac{1}{2^3} , \frac{1}{2^4} , \dotsc , \frac{1}{2^n} , \dotsc $$

We can find its closed form:

$$ a_n = \left{ \begin{array}{ll} 1 & n = 0 \\ \frac{1}{2^n} & n > 0 \end{array} \right. $$

We can be sure that it's correct that by substituting (n) for 1, 2, 3, 4, and n, because that's what was given in the example.

Then, create a summation from sequence:

$$ S_n = \left{ \begin{array}{ll} a_0 & n = 1 \\ S_{n - 1} + a_{n - 1} & n > 1 \end{array} \right. $$

Therefore, the recursive formula is:

$$ \begin{array}{lll} S_1 & = & 1 \\ S_n & = & S_{n - 1} + \frac{1}{2^{n - 1}} \end{array} $$

Closed Formula

By writing the first few terms from the recursive formula, we see that

$$ \begin{array} \ S_1 & = & 1 & = & \frac{1}{1} & = & \S{1} \ S_2 & = & 1 + \frac{1}{2} & = & \frac{3}{2} & = & \S{2} \ S_3 & = & \frac{3}{2} + \frac{1}{4} & = & \frac{7}{4} & = & \S{3} \ S_4 & = & \frac{7}{4} + \frac{1}{8} & = & \frac{15}{8} & = & \S{4} \ & \vdots \end{array} $$

Guess: The closed formula could be:

$$ S_n = \S{n} $$

Proof (by Induction)

Let (P(n) : S_n = \S{n})

Base Case: Show that P(2) is true:

$$ S_2 = 1 + \frac{1}{2} = \frac{3}{2} = \S{2} $$

Inductive Hypothesis: Suppose (P(n)), that is, suppose that this is true:

$$ S_n = \S{n} $$

Inductive Steps: We have to show that (P(n+1)) follows, that is:

$$ S_{n+1} = \S{n+1} $$

The right-hand side of this equation is:

$$ \S{n+1} = \frac{2^{n+1}-1}{2^n} $$

The left-hand side of this equation is:

$$ \begin{array} \ S_{n+1} & = & S_n + \frac{1}{2^n} & \DS{by the recursive definition} \ & = & \frac{2^n - 1}{2^{n-1}} + \frac{1}{2^n} & \DS{by inductive hypothesis} \ & = & \frac{2}{2} \cdot \frac{2^n - 1}{2^{n-1}} + \frac{1}{2^n} \ & = & \frac{2 \cdot 2^n - 2}{2^n} + \frac{1}{2^n} \ & = & \frac{2^{n+1} - 2 + 1}{2^n} \ & = & \frac{2^{n+1} - 1}{2^n} \end{array} $$

Since the left-hand side and the right-hand side has the same value, the equation is true.

Since we have proved the closed formula to be correct, the closed formula is:

$$ S_n = \S{n} $$

5

Prove or disprove that ( 2 + 4 + 6 + 8 + \dotsb + 2n = n^2 + n ), for (n \ge 1)

Valid Statement.

6

Prove or disprove that ( 5^n - 1 ) is divisible by (4), for (n \ge 0).

Valid Statement.

Proof (by induction)

Let (P(n) : 4 \mid 5^n - 1 )

Base Case: Show (P(0)):

$$ 5^0 - 1 = 0 = 4 \cdot 0 . \ \therefore 4 \mid 5^0 - 1 $$

Inductive Hypothesis: Suppose that (P(n)) is true, that is (4 \mid 5^n - 1), that is, (5^n - 1 = 4k) for some integer (k).

Inductive Steps: We must show that (P(n+1)) follows, that is, (4 \mid 5^{n+1} - 1), that is (5^{n + 1} - 1 = 4l) for some integer (l).

From the inductive hypothesis, (5^n - 1 = 4k) and thus (5^n = 4k + 1).

$$ \begin{array} \ 5^{n + 1} - 1 & = & 5 \cdot 5^n - 1 \ & = & 5 \cdot (4k + 1) - 1 & \DS{by inductive hypothesis} \ & = & 20k + 5 - 1 \ & = & 20k + 4 \ & = & 4(5k + 1) \end{array} $$

(\therefore 5^{n+1} - 1 = 4l ) for (l = 5k + 1), and since (k) is an integer, (5k + 1) and therefore (l) are also integer, because the product and sum of integers are integers.

(\therefore 4 \mid 5^{n+1}).

7

Prove or disprove that for all real numbers (a) and (b), if (a < b), then (a^2 < b^2).

Invalid Statement: disprove with (a = -2, b = 1.)

8

Prove or disprove (\PS(A \cup B) \subseteq \PS(A) \cup \PS(B))

Invalid Statement: disprove with (A = \left{ 1 \right}, B = \left{ 2 \right}.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment