-
-
Notifications
You must be signed in to change notification settings - Fork 360
removing principles of code chapter, updating book #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
june128
merged 5 commits into
algorithm-archivists:master
from
leios:update_in_principle
Jul 17, 2018
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
26ececd
removing principles of code chapter.
leios e259cff
modifying content again and removing mathematical background section.
leios d6d44f7
adding redirects to this structure.
leios f5d8f54
changed title sizes, removed unused files from SUMMARY, and removed t…
leios 3224fc4
fixing redirect for taylor series
leios File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Data Structures | ||
|
||
This is a book about algorithms. | ||
The fundamental building blocks of algorithms are data structures, and thus as more algorithms are added to the Archive, more data structures will be added to this section. |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
13 changes: 13 additions & 0 deletions
13
chapters/general/mathematical_background/mathematical_background.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Mathematical Background | ||
|
||
No matter who you ask, programming requires at least a little math. | ||
That said, for most programmers, it doesn't require *too* much. | ||
For the most part, depending on your specialty, you will probably not see too much calculus or differential equations. | ||
Honestly, you could probably get away with what you learned in high school. | ||
|
||
However, this is a book about algorithms, and algorithms sometimes require a deeper understanding of mathematics. | ||
This section attemps to provide the mathematical foundations that you will need to understand certain algorithms. | ||
As we add new algorithms and need new mathematical tools, we will add them to this section. | ||
|
||
A notable exception to this rule will be in the case of classes of algorithms that require domain-specific knowledge, like quantum simulations or bioinformatics. | ||
In those cases, we will place the mathematical methods in more relevant sections. |
File renamed without changes.
File renamed without changes.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
NOTE: Incomplete! | ||
|
||
# Taylor Series Expansion | ||
|
||
I have been formally trained as a physicist. In my mind, there are several mathematical topics that blur the boundary between mathematics and physics. Taylor Series Expansions are one of those topics. | ||
|
||
On the one hand, I can see how the expansion could be considered purely mathematical. I mean, here is the definition: | ||
$$ | ||
f(x) \simeq \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n | ||
$$ | ||
|
||
where $$f(x)$$ is some function along real or complex space, $$a$$ is the point that we are expanding from, and $$f^{(n)}(x)$$ denotes the $$n^{\text{th}}$$ derivative of $$f(x)$$. | ||
From this perspective, the expansion just looks like a bunch of derivatives strung together! Where's the physics? Well, let's expand this series for the first few derivatives: | ||
|
||
$$ | ||
f(x) \simeq f(a) + \frac{df(a)}{dx}(x-a) | ||
+ \frac{1}{2}\frac{d^2f(a)}{dx^2}(x-a)^2 | ||
$$ | ||
|
||
If we substitute the derivatives for their physical quantities with $$f(x) \rightarrow x(t)$$, expanding from 0, and set | ||
|
||
$$ | ||
\begin{align} | ||
\frac{dx(t)}{dt} &= \text{velocity} = v(t) \\ | ||
\frac{d^2x(t)}{dt^2} &= \text{acceleration} = a \\ | ||
\end{align} | ||
$$ | ||
|
||
The Taylor series expansion turns into one of the most common formulas in classical physics, the *kinematic equation*! | ||
|
||
$$ | ||
x(t) \simeq x_0 + v_0t | ||
+ \frac{1}{2}at^2 | ||
$$ | ||
|
||
Note that here, we assume the acceleration to be constant, but it could technically have higher order terms. | ||
|
||
Truth be told, the Taylor Series Expansion can be found in the most unusual places and is used as the foundation of many different algorithms throughout this book. At first, it might not seem obvious why, but we can approximate almost any smooth function with a Taylor Series Expansion, and the more terms we include, the better our approximation becomes! For example, take Figure 1. Any function can be approximated as a sum of all the derivatives for that function. If we evaluate these derivatives at any point, we closely approximate the actual function. | ||
|
||
<p> | ||
<img class="center" src="res/function_sum.png" /> | ||
</p> | ||
|
||
This shows the true power of the Taylor Series Expansion. It allows us to more easily tackle complicated functions by approximating them as functions we can actually use and imagine! | ||
|
||
<script> | ||
MathJax.Hub.Queue(["Typeset",MathJax.Hub]); | ||
</script> | ||
$$ | ||
\newcommand{\d}{\mathrm{d}} | ||
\newcommand{\bff}{\boldsymbol{f}} | ||
\newcommand{\bfg}{\boldsymbol{g}} | ||
\newcommand{\bfp}{\boldsymbol{p}} | ||
\newcommand{\bfq}{\boldsymbol{q}} | ||
\newcommand{\bfx}{\boldsymbol{x}} | ||
\newcommand{\bfu}{\boldsymbol{u}} | ||
\newcommand{\bfv}{\boldsymbol{v}} | ||
\newcommand{\bfA}{\boldsymbol{A}} | ||
\newcommand{\bfB}{\boldsymbol{B}} | ||
\newcommand{\bfC}{\boldsymbol{C}} | ||
\newcommand{\bfM}{\boldsymbol{M}} | ||
\newcommand{\bfJ}{\boldsymbol{J}} | ||
\newcommand{\bfR}{\boldsymbol{R}} | ||
\newcommand{\bfT}{\boldsymbol{T}} | ||
\newcommand{\bfomega}{\boldsymbol{\omega}} | ||
\newcommand{\bftau}{\boldsymbol{\tau}} | ||
$$ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions
9
chapters/principles_of_code/building_blocks/building_blocks.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
102 changes: 0 additions & 102 deletions
102
chapters/principles_of_code/building_blocks/conditions.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file
taylor_series.md
and the enclosing folder shouldn't exist, since there's already thetaylor_series_expansion.md
with its enclosing folder.If this file is an updated version of the
taylor_series_expansion.md
however, you should delete the old one and rename thetaylor_series.md
, so it doesn't violate the naming guidelines.