|
896 | 896 | \end{ex}
|
897 | 897 |
|
898 | 898 | \begin{defn}
|
899 |
| - The \textbf{golden ratio} is a pair of integers $a$ and $b$ such that $\frac{a + b}{a} = {a}{b}$. It's a ratio that comes up in nature a lot, and is aesthetically pleasing. |
| 899 | + The \textbf{golden ratio} is a pair of integers $a$ and $b$ such that $\frac{a + b}{a} = \frac{a}{b}$. It's a ratio that comes up in nature a lot, and is aesthetically pleasing. |
900 | 900 | \end{defn}
|
901 | 901 |
|
902 | 902 | You can approximate the golden ratio with the Fibonacci numbers. $\frac{a_n}{a_{n - 1}}$ approaches the golden ratio as $n \to \infty$.
|
|
1132 | 1132 | \subsubsection{Recursive String Definitions}
|
1133 | 1133 | There's another way of constructing binary strings: recursive definitions.
|
1134 | 1134 | \begin{ex} \lecture{February 1, 2013}
|
1135 |
| - Let $S$ be the set of all binary strings. We can define $S$ recursively as $S = \set{\epsilon } \cup \set{0, 1}$. Whenever you write an expression like this, you should take great care to ensure that both sides are actually equal. |
| 1135 | + Let $S$ be the set of all binary strings. We can define $S$ recursively as $S = \set{\epsilon } \cup \set{0, 1} S$. Whenever you write an expression like this, you should take great care to ensure that both sides are actually equal. |
1136 | 1136 | \\ \\
|
1137 | 1137 | One might attempt to describe $S$ as $\set{\epsilon, 0, 1 }S$, however that is ambiguous. $S = \set{\epsilon } \cup \set{0, 1 } S$ is unambiguous. Since there are two terms of length 1, applying the sum \& product lemmas, we get:
|
1138 | 1138 | \begin{align*}
|
|
1450 | 1450 | \\ \\
|
1451 | 1451 | We have:
|
1452 | 1452 | \begin{align*}
|
1453 |
| - p(x) &= x^2 + 3x^2 - 4 \\ |
| 1453 | + p(x) &= x^3 + 3x^2 - 4 \\ |
1454 | 1454 | &= (x + 2)^2 (x - 1)
|
1455 | 1455 | \end{align*}
|
1456 | 1456 |
|
|
1513 | 1513 |
|
1514 | 1514 | \subsection{Non-homogeneous Recurrences}
|
1515 | 1515 | \begin{ex}
|
1516 |
| - Suppose we have the recurrence relation $(\star_1) = a_n + 3a_{n - 1} + 4a_{n - 3} = 6 \times 2^n$ for $n \ge 3$. The initial conditions are $a_0 = 5, a_1 = 3$, and $a_3 = 25$. |
| 1516 | + Suppose we have the recurrence relation $(\star_1) = a_n + 3a_{n - 1} - 4a_{n - 3} = 6 \times 2^n$ for $n \ge 3$. The initial conditions are $a_0 = 5, a_1 = 3$, and $a_3 = 25$. |
1517 | 1517 | \\ \\
|
1518 | 1518 | Let's ignore the initial conditions for now. Let's take a guess and pick $a_n = \alpha 2^n$, where $\alpha$ is some constant that we'll decide on later.
|
1519 | 1519 | \begin{align*}
|
|
1537 | 1537 |
|
1538 | 1538 | Therefore, the general form for $(\star_1)$ is:
|
1539 | 1539 | \begin{align*}
|
1540 |
| - a_n + b_n = (A + B_n) - 2^n + C + 3 \times 2^n |
| 1540 | + a_n + b_n = (A + B_n) (-2)^n + C + 3 \times 2^n |
1541 | 1541 | \end{align*}
|
1542 | 1542 |
|
1543 | 1543 | Using the initial conditions, we can solve to get $A = 1, B = 1$, and $C = 1$. \\
|
|
0 commit comments