book-MIT.tex 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380
  1. %\documentclass[]{TimesAPriori_MIT}%%6x9
  2. \documentclass[7x10]{TimesAPriori_MIT}%%7x10
  3. %\documentclass[8x10]{TimesAPriori_MIT}%%8x10
  4. \usepackage[T1]{fontenc}
  5. \usepackage[utf8]{inputenc}
  6. %% For multiple indices:
  7. \usepackage{multind}
  8. \makeindex{subject}
  9. \makeindex{authors}
  10. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  11. %%% Any shortcut own defined macros place here
  12. %% sample of author macro:
  13. \def\taupav{\tau_{\mathrm{Pav}}}
  14. \newbox\oiintbox
  15. \setbox\oiintbox=\hbox{$\lower2pt\hbox{\huge$\displaystyle\circ$}
  16. \hskip-13pt\displaystyle\int\hskip-7pt\int_{S}\ $}
  17. \def\oiint{\copy\oiintbox}
  18. \def\boldnabla{\hbox{\boldmath$\displaystyle\nabla$}}
  19. %\usepackage{showframe}
  20. \def\ShowFrameLinethickness{0.125pt}
  21. \addbibresource{book-MIT.bib}
  22. \addbibresource{bibsamp.bib}
  23. \begin{document}
  24. \input{defs}
  25. \frontmatter
  26. \HalfTitle{Essentials of Compilation}
  27. \halftitlepage
  28. %% \begin{seriespage}
  29. %% \seriestitle{Industrial Economics}
  30. %% \serieseditor{Miriam Smith and Simon Rattle, editors}
  31. %% \title{Engineering and Economics}
  32. %% \author{Samuel Endgrove}
  33. %% \title{Structural Economics: From Beginning to End}
  34. %% \author{Guang Xi}
  35. %% \end{seriespage}
  36. \Title{Essentials of Compilation}
  37. \Booksubtitle{The Incremental, Nano-Pass Approach}
  38. \edition{Edition/Reprint Details goes here}
  39. \BookAuthor{Jeremy G. Siek}
  40. \imprint{The MIT Press\\
  41. Cambridge, Massachusetts\\
  42. London, England}
  43. \begin{copyrightpage}
  44. \textcopyright\ [YEAR] Massachusetts Institute of Technology
  45. All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher.
  46. This book was set in --------- by ---------. Printed and bound in the United States of America.
  47. Library of Congress Cataloging-in-Publication Data is available.
  48. ISBN:
  49. 10\quad9\quad8\quad7\quad6\quad5\quad4\quad3\quad2\quad1
  50. \end{copyrightpage}
  51. \dedication{Dedication text goes here}
  52. \begin{epigraphpage}
  53. \epigraph{First Epigraph line goes here}{Mention author name if any,
  54. \textit{Book Name if any}}
  55. \epigraph{Second Epigraph line goes here}{Mention author name if any}
  56. \end{epigraphpage}
  57. \tableofcontents
  58. \listoffigures
  59. \listoftables
  60. \chapter*{Preface}
  61. \addcontentsline{toc}{fmbm}{Preface}
  62. There is a magical moment when a programmer presses the ``run'' button
  63. and the software begins to execute. Somehow a program written in a
  64. high-level language is running on a computer that is only capable of
  65. shuffling bits. Here we reveal the wizardry that makes that moment
  66. possible. Beginning with the groundbreaking work of Backus and
  67. colleagues in the 1950s, computer scientists discovered techniques for
  68. constructing programs, called \emph{compilers}, that automatically
  69. translate high-level programs into machine code.
  70. We take you on a journey by constructing your own compiler for a small
  71. but powerful language. Along the way we explain the essential
  72. concepts, algorithms, and data structures that underlie compilers. We
  73. develop your understanding of how programs are mapped onto computer
  74. hardware, which is helpful when reasoning about properties at the
  75. junction between hardware and software such as execution time,
  76. software errors, and security vulnerabilities. For those interested
  77. in pursuing compiler construction, our goal is to provide a
  78. stepping-stone to advanced topics such as just-in-time compilation,
  79. program analysis, and program optimization. For those interested in
  80. designing and implementing programming languages, we connect
  81. language design choices to their impact on the compiler and the generated
  82. code.
  83. A compiler is typically organized as a sequence of stages that
  84. progressively translates a program to code that runs on hardware. We
  85. take this approach to the extreme by partitioning our compiler into a
  86. large number of \emph{nanopasses}, each of which performs a single
  87. task. This allows us to test the output of each pass in isolation, and
  88. furthermore, allows us to focus our attention making the compiler far
  89. easier to understand.
  90. %% [TODO: easier to understand/debug for those maintaining the compiler,
  91. %% proving correctness]
  92. The most familiar approach to describing compilers is with one pass
  93. per chapter. The problem with that is it obfuscates how language
  94. features motivate design choices in a compiler. We take an
  95. \emph{incremental} approach in which we build a complete compiler in
  96. each chapter, starting with arithmetic and variables and add new
  97. features in subsequent chapters.
  98. Our choice of language features is designed to elicit the fundamental
  99. concepts and algorithms used in compilers.
  100. \begin{itemize}
  101. \item We begin with integer arithmetic and local variables in
  102. Chapters~\ref{ch:trees-recur} and \ref{ch:Rvar}, where we introduce
  103. the fundamental tools of compiler construction: \emph{abstract
  104. syntax trees} and \emph{recursive functions}.
  105. \item In Chapter~\ref{ch:register-allocation-Rvar} we apply
  106. \emph{graph coloring} to assign variables to machine registers.
  107. \item Chapter~\ref{ch:Rif} adds \code{if} expressions, which motivates
  108. an elegant recursive algorithm for mapping expressions to
  109. \emph{control-flow graphs}.
  110. \item Chapter~\ref{ch:Rvec} adds heap-allocated tuples, motivating
  111. \emph{garbage collection}.
  112. \item Chapter~\ref{ch:Rfun} adds functions that are first-class values
  113. but lack lexical scoping, similar to the C programming
  114. language~\citep{Kernighan:1988nx} except that we generate efficient
  115. tail calls. The reader learns about the procedure call stack,
  116. \emph{calling conventions}, and their interaction with register
  117. allocation and garbage collection.
  118. \item Chapter~\ref{ch:Rlam} adds anonymous functions with lexical
  119. scoping, i.e., \emph{lambda abstraction}. The reader learns about
  120. \emph{closure conversion}, in which lambdas are translated into a
  121. combination of functions and tuples.
  122. \item Chapter~\ref{ch:Rdyn} adds \emph{dynamic typing}. Prior to this
  123. point the input languages are statically typed. The reader extends
  124. the statically typed language with an \code{Any} type which serves
  125. as a target for compiling the dynamically typed language.
  126. \item Chapter~\ref{ch:Rwhile} fleshes out support for imperative
  127. programming languages with the addition of loops and mutable
  128. variables. These additions elicit the need for \emph{dataflow
  129. analysis} in the register allocator.
  130. \item Chapter~\ref{ch:Rgrad} uses the \code{Any} type of
  131. Chapter~\ref{ch:Rdyn} to implement a \emph{gradually typed language}
  132. in which different regions of a program may be static or dynamically
  133. typed. The reader implements runtime support for \emph{proxies} that
  134. allow values to safely move between regions.
  135. \item Chapter~\ref{ch:Rpoly} adds \emph{generics} with autoboxing,
  136. leveraging the \code{Any} type and type casts developed in Chapters
  137. \ref{ch:Rdyn} and \ref{ch:Rgrad}.
  138. \end{itemize}
  139. There are many language features that we do not include. Our choices
  140. weigh the incidental complexity of a feature against the fundamental
  141. concepts that it exposes. For example, we include tuples and not
  142. records because they both elicit the study of heap allocation and
  143. garbage collection but records come with more incidental complexity.
  144. Since 2016 this book has served as the textbook for the compiler
  145. course at Indiana University, a 16-week course for upper-level
  146. undergraduates and first-year graduate students.
  147. %
  148. Prior to this course, students learn to program in both imperative and
  149. functional languages, study data structures and algorithms, and take
  150. discrete mathematics.
  151. %
  152. At the beginning of the course, students form groups of 2-4 people.
  153. The groups complete one chapter every two weeks, starting with
  154. Chapter~\ref{ch:Rvar} and finishing with Chapter~\ref{ch:Rdyn}. Many
  155. chapters include a challenge problem that we assign to the graduate
  156. students. The last two weeks of the course involve a final project in
  157. which students design and implement a compiler extension of their
  158. choosing. Chapters~\ref{ch:Rwhile}, \ref{ch:Rgrad}, and
  159. \ref{ch:Rpoly} can be used in support of these projects or they can
  160. replace some of the earlier chapters. For example, a course with an
  161. emphasis on statically-typed imperative languages would skip
  162. Chapter~\ref{ch:Rdyn} in favor of
  163. Chapter~\ref{ch:Rwhile}. Figure~\ref{fig:chapter-dependences} depicts
  164. the dependencies between chapters.
  165. This book has also been used in compiler courses at California
  166. Polytechnic State University, Rose–Hulman Institute of Technology, and
  167. University of Massachusetts Lowell.
  168. \begin{figure}[tp]
  169. \begin{tikzpicture}[baseline=(current bounding box.center)]
  170. \node (C1) at (0,1.5) {\small Ch.~\ref{ch:trees-recur} Preliminaries};
  171. \node (C2) at (4,1.5) {\small Ch.~\ref{ch:Rvar} Variables};
  172. \node (C3) at (8,1.5) {\small Ch.~\ref{ch:register-allocation-Rvar} Registers};
  173. \node (C4) at (0,0) {\small Ch.~\ref{ch:Rif} Control Flow};
  174. \node (C5) at (4,0) {\small Ch.~\ref{ch:Rvec} Tuples};
  175. \node (C6) at (8,0) {\small Ch.~\ref{ch:Rfun} Functions};
  176. \node (C9) at (0,-1.5) {\small Ch.~\ref{ch:Rwhile} Loops};
  177. \node (C8) at (4,-1.5) {\small Ch.~\ref{ch:Rdyn} Dynamic};
  178. \node (C7) at (8,-1.5) {\small Ch.~\ref{ch:Rlam} Lambda};
  179. \node (C10) at (4,-3) {\small Ch.~\ref{ch:Rgrad} Gradual};
  180. \node (C11) at (8,-3) {\small Ch.~\ref{ch:Rpoly} Generics};
  181. \path[->] (C1) edge [above] node {} (C2);
  182. \path[->] (C2) edge [above] node {} (C3);
  183. \path[->] (C3) edge [above] node {} (C4);
  184. \path[->] (C4) edge [above] node {} (C5);
  185. \path[->] (C5) edge [above] node {} (C6);
  186. \path[->] (C6) edge [above] node {} (C7);
  187. \path[->] (C4) edge [above] node {} (C8);
  188. \path[->] (C4) edge [above] node {} (C9);
  189. \path[->] (C8) edge [above] node {} (C10);
  190. \path[->] (C10) edge [above] node {} (C11);
  191. \end{tikzpicture}
  192. \caption{Diagram of chapter dependencies.}
  193. \label{fig:chapter-dependences}
  194. \end{figure}
  195. We use the \href{https://racket-lang.org/}{Racket} language both for
  196. the implementation of the compiler and for the input language, so the
  197. reader should be proficient with Racket or Scheme. There are many
  198. excellent resources for learning Scheme and
  199. Racket~\citep{Dybvig:1987aa,Abelson:1996uq,Friedman:1996aa,Felleisen:2001aa,Felleisen:2013aa,Flatt:2014aa}. The
  200. support code for this book is in the \code{github} repository at the
  201. following URL:
  202. \begin{center}\small
  203. \url{https://github.com/IUCompilerCourse/public-student-support-code}
  204. \end{center}
  205. The compiler targets x86 assembly language~\citep{Intel:2015aa}, so it
  206. is helpful but not necessary for the reader to have taken a computer
  207. systems course~\citep{Bryant:2010aa}. This book introduces the parts
  208. of x86-64 assembly language that are needed.
  209. %
  210. We follow the System V calling
  211. conventions~\citep{Bryant:2005aa,Matz:2013aa}, so the assembly code
  212. that we generate works with the runtime system (written in C) when it
  213. is compiled using the GNU C compiler (\code{gcc}) on Linux and MacOS
  214. operating systems.
  215. %
  216. On the Windows operating system, \code{gcc} uses the Microsoft x64
  217. calling convention~\citep{Microsoft:2018aa,Microsoft:2020aa}. So the
  218. assembly code that we generate does \emph{not} work with the runtime
  219. system on Windows. One workaround is to use a virtual machine with
  220. Linux as the guest operating system.
  221. \section*{Acknowledgments}
  222. The tradition of compiler construction at Indiana University goes back
  223. to research and courses on programming languages by Daniel Friedman in
  224. the 1970's and 1980's. One of his students, Kent Dybvig, implemented
  225. Chez Scheme~\citep{Dybvig:2006aa}, a production-quality, efficient
  226. compiler for Scheme. Throughout the 1990's and 2000's, Dybvig taught
  227. the compiler course and continued the development of Chez Scheme.
  228. %
  229. The compiler course evolved to incorporate novel pedagogical ideas
  230. while also including elements of efficient real-world compilers. One
  231. of Friedman's ideas was to split the compiler into many small
  232. passes. Another idea, called ``the game'', was to test the code
  233. generated by each pass on interpreters.
  234. Dybvig, with help from his students Dipanwita Sarkar and Andrew Keep,
  235. developed infrastructure to support this approach and evolved the
  236. course to use even smaller
  237. nanopasses~\citep{Sarkar:2004fk,Keep:2012aa}. Many of the compiler
  238. design decisions in this book are inspired by the assignment
  239. descriptions of \citet{Dybvig:2010aa}. In the mid 2000's a student of
  240. Dybvig's named Abdulaziz Ghuloum observed that the front-to-back
  241. organization of the course made it difficult for students to
  242. understand the rationale for the compiler design. Ghuloum proposed the
  243. incremental approach~\citep{Ghuloum:2006bh}.
  244. We thank the many graduate students who served as teaching assistants
  245. for the compiler course at IU. In particular, we thank Andre
  246. Kuhlenschmidt for his work on the garbage collector, Michael Vollmer
  247. for his work on efficient tail calls, and Michael Vitousek for his
  248. help running the first offering of the incremental compiler course at
  249. IU.
  250. We thank Bor-Yuh Chang, John Clements, Jay McCarthy, Joseph Near, Nate
  251. Nystrom, and Michael Wollowski for teaching courses based on early
  252. drafts of this book.
  253. We thank Ronald Garcia for being Jeremy's partner when they took the
  254. compiler course in the early 2000's and especially for finding the bug
  255. that sent the garbage collector on a wild goose chase!
  256. \mbox{}\\
  257. \noindent Jeremy G. Siek \\
  258. Bloomington, Indiana
  259. \mainmatter
  260. %% \part{Environmental Policy Analysis:\break Various Models for Material
  261. %% Flows\break in the Economy}
  262. %% %\begin{partintro}
  263. %% %\partintrotitle{This is an introduction to the part}
  264. %% %Policy analysis may be divided into a number of subspecialities\ldots
  265. %% %
  266. %% %\end{partintro}
  267. %% \chapterauthor{Contributor Name/Names goes here}
  268. %% \chapter[Environmental Policy Analysis with STREAM:\protect\\
  269. %% Equilibrium Model for Material Flows in the Economy]
  270. %% {Environmental Policy Analysis with STREAM: A Partial
  271. %% Equilibrium Model for Material Flows in the Economy}
  272. %% \chaptermark{Environmental Policy Analysis with STREAM}
  273. %% \vspace{-8pt}%
  274. %% \epigraph{What star falls unseen?}{William Faulkner}
  275. %% \epigraph{All seats provide equal viewing of the universe.}{Museum
  276. %% guide, Hayden Planetarium}
  277. %% \endchapepigraph
  278. %% \noindent
  279. %% Robotics has achieved its greatest success to date in the world of industrial manufacturing.
  280. %% Robot arms, or Manipulators, comprise a \$2 billion dollar industry.
  281. %% Bolted at its shoulder to a specific position in the assembly line, the robot arm
  282. %% can move with great speed and accuracy to perform repetitive tasks such as spot
  283. %% welding and painting.
  284. %% \section{Introduction}
  285. %% In the electronics industry, manipulators place
  286. %% surface-mounted components with superhuman precision, making the portable
  287. %% telephone and laptop computer possible.
  288. %% test citation \citet{antibayes} \citep{pijnacker2}
  289. %% \subsection{Test Subsection}
  290. %% Yet for all of their successes, these commercial robots suffer from a fundamental
  291. %% disadvantage: lack of mobility.
  292. %% \subsubsection{Test subsubsection}
  293. %% A fixed manipulator has a limited range of motion
  294. %% that depends on where it is bolted down. In contrast, a mobile robot would be
  295. %% able to travel throughout the manufacturing plant, flexibly applying its talents
  296. %% wherever it is most effective.
  297. %% \paragraph{\sansbold{Test paragraph}}
  298. %% For example, AGV (autonomous guided vehicle)
  299. %% robots autono\-mous\-ly deliver parts between various assembly stations
  300. %% by following special electrical guidewires using a custom sensor. The Helpmate
  301. %% service robot transports food and medication throughout hospitals by tracking
  302. %% the position of ceiling lights, which are manually specified to the robot
  303. %% beforehand.\endnote{Several companies have developed autonomous cleaning
  304. %% robots, mainly for large buildings. One such cleaning
  305. %% robot is in use
  306. %% at the Paris Metro.
  307. %% }
  308. %% The Helpmate service robot transports food and medication throughout hospitals
  309. %% by tracking the position of ceiling lights, which are manually specified to
  310. %% the robot beforehand. Several companies have developed autonomous
  311. %% cleaning robots, mainly for large buildings.
  312. %% This book focuses on the technology of mobility: how can a mobile robot move
  313. %% unsupervised through real-world environments to fulfill its tasks? The first
  314. %% challenge is locomotion itself. How should a mobile robot move, and what is it
  315. %% about a particular locomotion mechanism that makes it superior to alternative
  316. %% locomotion mechanisms?
  317. %% \subsection{Key Issues for Locomotion}
  318. %% Locomotion is the complement of manipulation. In manipulation, the robot arm
  319. %% is fixed but moves objects in the workspace by imparting force to them. In
  320. %% locomotion, the environment is fixed and the robot moves by imparting force to
  321. %% the environment. In both cases, the scientific basis is the study of actuators that
  322. %% generate interaction forces, and mechinisms that implement disired kinematic
  323. %% and dynamic properties. Locomotion and manipulation thus share the same core
  324. %% issues of stability, contact characteristics, and environmental type:
  325. %% \begin{itemize}
  326. %% \item
  327. %% stability
  328. %% \item
  329. %% number and geometry of contact points
  330. %% \begin{itemize}
  331. %% \item
  332. %% center of gravity
  333. %% \item
  334. %% static/dynamic stability
  335. %% \begin{itemize}
  336. %% \item
  337. %% inclination of terrain
  338. %% \item
  339. %% characteristics of contact
  340. %% \end{itemize}
  341. %% \item
  342. %% contact point/path size and shape
  343. %% \item
  344. %% angle of contact
  345. %% \end{itemize}
  346. %% \item
  347. %% friction
  348. %% \item
  349. %% type of environment
  350. %% \item
  351. %% structure
  352. %% medium (e.g. water, air. soft or hard ground).
  353. %% \end{itemize}
  354. %% For example, Plustech's walking robot provides automatic leg coordination while
  355. %% the human operator chooses an overall direction of travel. Figure
  356. %% 1.5 depicts an underwater vehicle that controls six propellers to autonomously
  357. %% transports food and medication throughout hospitals by tracking the position
  358. %% of ceiling lights, which are manually specified to the robot
  359. %% beforehand. Several companies have developed autonomous robots.
  360. %% For example, Plustech's walking robot provides automatic leg coordination while
  361. %% the human operator chooses an overall direction of travel. Figure
  362. %% 1.5 depicts an underwater vehicle that controls six propellers to autonomously
  363. %% transports food and medication throughout hospitals by tracking the position
  364. %% of ceiling lights, which are manually specified to the robot
  365. %% beforehand.
  366. %% \begin{figure}[t]
  367. %% %\centerline{\includegraphics[width=200pt]{figsamp}}
  368. %% \caption[Plustech developed the first application-driven walking robot. It is designed to move
  369. %% wood out of the forest. The leg coordination is automated, but navigation is still done
  370. %% by the human operator on the robot.
  371. %% {\tt http://www.plustech.fi/}]
  372. %% {Plustech developed the first application-driven walking robot. It is designed to move
  373. %% wood out of the forest. The leg coordination is automated, but navigation is still done
  374. %% by the human operator on the robot. {\tt http://www.plustech.fi/}}
  375. %% \end{figure}
  376. %% The six different events are
  377. %% \begin{enumerate}[2.]
  378. %% \item
  379. %% lift right leg
  380. %% \item
  381. %% left let leg
  382. %% \begin{enumerate}[ii.]
  383. %% \item
  384. %% release right leg
  385. %% \item
  386. %% release left leg
  387. %% \begin{enumerate}[(ii)]
  388. %% \item
  389. %% lift both legs together
  390. %% \item
  391. %% release both legs together
  392. %% \end{enumerate}
  393. %% \end{enumerate}
  394. %% \end{enumerate}
  395. %% Of course, this quickly grows quite large. For example, a robot with six legs
  396. %% has far more gaits theoretically.
  397. %% \section{Sample Equations}
  398. %% \begin{equation}
  399. %% \label{eq:rhoCHT}
  400. %% \rho^{\pi}= \frac{RI + \mathbb{E}_{\pi([L,\tau_L]|\textrm{post})}
  401. %% \left[C_L(\taupav+\tau_L) \right] +
  402. %% \displaystyle{\int_{0}^{P}}{dw~ \mathbb{E}_{\pi_{w_L}}}
  403. %% \Biggl[\/\sum_{n_{L|[\textrm{pre},w]}}C_L(\tau_L)
  404. %% \Biggr] } {P +
  405. %% \mathbb{E}_{\pi([L,\tau_L] |\textrm{post})}[\tau_{L}] +\taupav +
  406. %% \displaystyle{ \int_{0}^{P}}{dw~ \mathbb{E}_{\pi_{w_L}}}
  407. %% \Biggl[\sum_{n_{L|[\textrm{pre},w]}}\tau_L\Biggr]
  408. %% }
  409. %% \end{equation}
  410. %% As long as
  411. %% $RI - K_LP >
  412. %% \frac{1}{\beta}$
  413. %% \begin{equation}
  414. %% \left.\begin{array}{lrcl}
  415. %% &\rho^{\pi} &=& \displaystyle\frac{\beta ( RI + K_L \taupav )-1} {\beta
  416. %% (P+\taupav )} \\[12pt]
  417. %% \hbox{and}\hbox to .25in{\hfill}&\mathbb{E}[\tau_L | \text{post}]
  418. %% &=&\displaystyle \frac{P+\taupav}{\beta ( RI -
  419. %% K_LP)-1}
  420. %% \label{eq:analytical_linear}
  421. %% \end{array}\right\}
  422. %% \end{equation}
  423. %% \subsection{One Leg}
  424. %% The minimum number of legs a legged robot can have is, of
  425. %% course, one. Minimizing the number of legs is beneficial for several reasons.
  426. %% Body mass is particularly important to walking machines, and the single leg
  427. %% minimizes cumulative leg mass.
  428. %% Omnidirectional locomotion with three spherical wheels The omnidirectional
  429. %% robot depicted in figure 2.23 is based on three spherical wheels, each actuated
  430. %% by one motor. In theis design, the sperical wheels are suspended by three contact
  431. %% points, two given by spherical bearings and one by a wheel connected to
  432. %% the motor axle. This concept provides excellent maneuverability and is simple
  433. %% in design. However, it is limited to flat surfaces and small loads, and it is quite
  434. %% difficult to find round wheels with high friction coefficients.
  435. %% \section{Natbib Citation Mark Up}
  436. %% Citations in the New Math book style are made using the Natbib
  437. %% commands.
  438. %% \paragraph{\sansbold{Single citations}}
  439. %% may be made using the \verb+\citet+ or \verb+\citep+ command
  440. %% \text{argument}.
  441. %% \blankline
  442. %% \noindent\begin{tabular}{@{}ll}
  443. %% \sansbold{Type}&\sansbold{Results}\\
  444. %% \midrule
  445. %% \verb+\citet{jon90}+&Jones et al. (1990)\\
  446. %% \verb+\citet[chap. 2]{jon90}+&Jones et al. (1990, chap. 2)\\
  447. %% \verb+\citep{jon90}+ & (Jones et al., 1990)\\
  448. %% \verb+\citep[chap. 2]{jon90}+ & (Jones et al., 1990, chap. 2)\\
  449. %% \verb+\citep[see][]{jon90}+ & (see Jones et al., 1990)\\
  450. %% \verb+\citep[see][chap. 2]{jon90}+ & (see Jones et al., 1990, chap. 2)\\
  451. %% \verb+\citet*{jon90}+ & Jones, Baker, and Williams (1990)\\
  452. %% \verb+\citep*{jon90}+ & (Jones, Baker, and Williams,
  453. %% 1990) \\
  454. %% \end{tabular}
  455. %% \paragraph{\sansbold{Multiple citations}}
  456. %% may be made by including more than one citation
  457. %% key in the \verb+\citet+ or \verb+\citep+ command argument.
  458. %% \blankline
  459. %% \noindent\begin{tabular}{@{}ll}
  460. %% \sansbold{Type}&\sansbold{Results}\\
  461. %% \midrule
  462. %% \verb+\citet{jon90,jam91}+&Jones et al. (1990); James et al. (1991)\\
  463. %% \verb+\citep{jon90,jam91}+&(Jones et al., 1990; James et al. 1991)\\
  464. %% \verb+\citep{jon90,jon91}+&(Jones et al., 1990, 1991)\\
  465. %% \verb+\citep{jon90a,jon90b}+&(Jones et al., 1990a,b)\\
  466. %% \end{tabular}
  467. %% \blankline
  468. %% See \url{http://merkel.zoneo.net/Latex/natbib.php}
  469. %% for a reference sheet of natbib commands.
  470. %% \section{Sample Table Note}
  471. %% \begin{table}[h!]
  472. %% \begin{threeparttable}
  473. %% \caption[Time of the transition between Phase 1 and Phase 2]{Time of the transition between Phase 1 and Phase 2\tnote{$a$}
  474. %% \label{tab:label}}\tabfont
  475. %% \setlength{\tabcolsep}{45pt}%
  476. %% \begin{tabular}{@{}ll}
  477. %% \toprule
  478. %% Run & Time (min) \\
  479. %% \midrule
  480. %% $l1$ & 260 \\
  481. %% $l2$ & 300 \\
  482. %% $l3$ & 340 \\
  483. %% $h1$ & 270 \\
  484. %% $h2$ & 250 \\
  485. %% $h3$ & 380 \\
  486. %% $r1$ & 370 \\
  487. %% $r2$ & 390 \\
  488. %% \bottomrule
  489. %% \end{tabular}
  490. %% \begin{tablenotes}[flushleft]\footnotesize
  491. %% \item[${a}$]Table note text here.
  492. %% \end{tablenotes}
  493. %% \end{threeparttable}
  494. %% \end{table}
  495. %% \chapter{Gravitational Waves}
  496. %% \section{Mass in Spacetime}
  497. %% As objects with
  498. %% mass move around in spacetime,\endnote{Test for endnote for endnote for endnote for endnote for endnote for endnote for endnote for endnote for endnote for endnote} the curvature changes to reflect the
  499. %% changed locations of those objects. In certain circumstances,
  500. %% accelerating objects generate changes in this curvature, which
  501. %% propagate outwards at the speed of light in a wave-like manner. These
  502. %% propagating phenomena are known as gravitational waves.\endnote{Prof. Gabriela Gonz\'alez, from Louisiana State University,
  503. %% said: ``We have discovered gravitational waves from the merger of black
  504. %% holes. It's been a very long road, but this is just the beginning.
  505. %% }
  506. %% \subsection{Gauss's Law for Gravity}
  507. %% In physics, \sfbfit{Gauss's law for gravity}, also known
  508. %% as \sfbfit{Gauss's flux
  509. %% theorem for}\break \sfbfit{gravity}, is a law of physics that is essentially
  510. %% equivalent to Newton's law of universal gravitation. It is named after
  511. %% Carl Friedrich Gauss.\index{authors}{Gauss, Carl Friedrich}
  512. %% The gravitational field \boldmath$g$\unboldmath (also called gravitational acceleration) is
  513. %% a vector field---a vector at each point of space (and time). It is
  514. %% defined so that the gravitational force experienced by a particle is
  515. %% equal to the mass of the particle multiplied by the gravitational
  516. %% field at that point.
  517. %% Gravitational flux is a surface integral of the gravitational field
  518. %% over a closed surface, analogous to how magnetic flux is a surface
  519. %% integral of the magnetic field.
  520. %% As a result of the divergence theorem, a host of physical laws can be
  521. %% written in both a differential form (where one quantity is the
  522. %% divergence of another) and an integral form (where the flux of one
  523. %% quantity through a closed surface is equal to another quantity).
  524. %% Three examples are Gauss's law (in electrostatics), Gauss's law for
  525. %% magnetism, and Gauss's law for gravity.
  526. %% Gauss's law for gravity states:
  527. %% \begin{theorem}
  528. %% The gravitational flux through any closed surface is proportional
  529. %% to the enclosed mass. \end{theorem}
  530. %% \begin{proof}
  531. %% The integral form of Gauss's law is:
  532. %% \[ \oiint
  533. %% \mathbf {E} \cdot \mathrm {d} \mathbf {A} =
  534. %% {\frac {Q}{\varepsilon _{0}}} \]
  535. %% for any closed surface $S$ containing charge $Q$. By the divergence
  536. %% theorem, this equation is equivalent to:
  537. %% \[
  538. %% \iiint\limits_{V}
  539. %% \boldnabla \cdot \mathbf{E} \,\, \mathrm{d} V={\frac
  540. %% {Q}{\varepsilon _{0}}}
  541. %% \]
  542. %% for any volume $V$ containing charge $Q$. By the relation between charge
  543. %% and charge density, this equation is equivalent to:
  544. %% \[\iiint\limits_{V} \boldnabla \cdot\mathbf{E}\,\,\mathrm{d} V =
  545. %% \iiint
  546. %% \limits _{V}{\frac {\rho }{\varepsilon _{0}}}\ \mathrm {d} V\]
  547. %% for any volume $V$. In order for this equation to be simultaneously
  548. %% true for every possible volume $V$,
  549. %% it is necessary (and sufficient) for the integrands to be equal
  550. %% everywhere. Therefore, this equation is equivalent to:
  551. %% \[ \boldnabla \cdot\mathbf{E} = \frac{\rho }{\varepsilon _{0}}. \]
  552. %% Thus the integral and differential forms are equivalent.
  553. %% \end{proof}
  554. %% \subsection{Gravitational Waves}
  555. %% Gravitational waves are `ripples' in the fabric of space-time caused
  556. %% by some of the most violent and energetic processes in the Universe.
  557. %% Albert Einstein predicted the existence of gravitational waves in 1916
  558. %% in his general theory of relativity. Einstein's mathematics showed
  559. %% that massive accelerating objects (such as neutron stars or black
  560. %% holes orbiting each other) would disrupt space-time in such a way that
  561. %% `waves' of distorted space would radiate from the source (like the
  562. %% movement of waves away from a stone thrown into a pond). Furthermore,
  563. %% these ripples would travel at the speed of light through the Universe,
  564. %% carrying with them information about their cataclysmic origins, as
  565. %% well as invaluable clues to the nature of gravity itself.
  566. %% %\begin{notation}
  567. %% %$g_{\mu\nu}(x^\lambda)=g_{\nu\mu}(x^\lambda)$&symmetric tensor\\
  568. %% %$g_{\mu\nu}\equiv\eta_{\mu\nu}=\mathrm{diag}(−1,1,1,1)$&Minkowski
  569. %% %spacetime\\
  570. %% %\end{notation}
  571. %% The strongest gravitational waves are produced by catastrophic events
  572. %% such as colliding black holes, the collapse of stellar cores
  573. %% (supernovae), coalescing neutron stars or white dwarf stars, the
  574. %% slightly wobbly rotation of neutron stars that are not perfect
  575. %% spheres, and the remnants of gravitational radiation created by the
  576. %% birth of the Universe itself.\endnote{``Gravitational waves go through everything. They are hardly affected
  577. %% by what they pass through, and that means that they are perfect
  578. %% messengers,'' said Prof Bernard Schutz, from Cardiff University, UK.
  579. %% \index{authors}{Schutz, Bernard}
  580. %% \begin{quote}
  581. %% The information carried on the gravitational wave is exactly the same
  582. %% as when the system sent it out; and that is unusual in astronomy. We
  583. %% can't see light from whole regions of our own galaxy because of the
  584. %% dust that is in the way, and we can't see the early part of the Big
  585. %% Bang because the Universe was opaque to light earlier than a certain
  586. %% time.
  587. %% With gravitational waves, we do expect eventually to see the Big Bang
  588. %% itself, he told the BBC.
  589. %% \end{quote}
  590. %% In addition, the study of gravitational waves may ultimately help
  591. %% scientists in their quest to solve some of the biggest problems in
  592. %% physics, such as the unification of forces, linking quantum theory
  593. %% with gravity.}
  594. %% \begin{extract}
  595. %% (Kostas D. Kokkotas, Article for the Encyclopedia of Physical Science
  596. %% and Technology, 3rd Edition, Volume 7, Academic Press, (2002))\\
  597. %% The distance $ds$ between two neighboring events, one with coordinates
  598. %% $x^\mu$ and the other with coordinates $x^\mu + \mathrm
  599. %% {dx}^\mu+ \mathrm{dx}^\mu$, can be expressed as a function of the coordinates via a
  600. %% symmetric tensor $g_{\mu\nu}(x^\lambda)=g_{\nu\mu}(x^\lambda)$, i.e.,
  601. %% %% \begin{equation}
  602. %% %% \mathrm{ds}^2=g_{\mu\nu}\,\mathrm{dx}^μ\,\mathrm{dx}^\nu
  603. %% %% \end{equation}
  604. %% This is a generalization of the standard measure of distance between two points in
  605. %% Euclidian space. For the Minkowski spacetime (the spacetime of special relativity),
  606. %% %$g_{\mu\nu}\equiv\eta_{\mu\nu}=\mathrm{diag}(−1,1,1,1)$.
  607. %% \end{extract}
  608. %% Though\index{authors}{Kokkotas, Kostas} gravitational waves were predicted to exist in 1916, actual
  609. %% proof of their existence wouldn't arrive until 1974, 20 years after
  610. %% Einstein's death.
  611. %% Since then, many astronomers have studied the timing of pulsar radio
  612. %% emissions and found similar effects, further confirming the existence
  613. %% of gravitational waves. But these confirmations had always come
  614. %% indirectly or mathematically and not through actual `physical'
  615. %% contact.
  616. %% That was the case up until September 14, 2015, when LIGO, for the
  617. %% first time, physically sensed distortions in spacetime itself caused
  618. %% by passing gravitational waves generated by two colliding black holes
  619. %% nearly 1.3 billion light years away! LIGO and its discovery will go
  620. %% down in history as one of the greatest human scientific achievements.
  621. %% \section*{A Dialogue}
  622. %% From the NY Times article of February 11, 2016,
  623. %% {\it Gravitational Waves Detected, Confirming Einstein's Theory}\/:
  624. %% \begin{dialogue}
  625. %% \speaker{Francis C\'ordova}
  626. %% It’s been decades, through a lot of different technological
  627. %% innovations,
  628. %% [and the foundation’s advisory board had] really scratched their heads on this one.
  629. %% \speaker{Janna Levin}I was freaking out!
  630. %% \speaker{Robert Garisto} [the editor of Physical Review Letters]
  631. %% I got goose bumps while reading the LIGO paper.
  632. %% \end{dialogue}
  633. %% \noindent The discovery is a great triumph for three physicists---Kip Thorne of
  634. %% the California Institute of Technology, Rainer Weiss of the
  635. %% Massachusetts Institute of Technology and Ronald Drever, formerly of
  636. %% Caltech and now retired in Scotland---who bet their careers on the
  637. %% dream of measuring the most ineffable of Einstein’s notions.
  638. %% \index{authors}{C\'ordova, Francis}
  639. %% \index{authors}{Levin, Janna}
  640. %% \index{authors}{Garisto, Robert}
  641. %% \index{authors}{Thorne, Kip}
  642. %% \index{authors}{Weiss, Rainer}
  643. %% \index{authors}{Drever, Ronald}
  644. %% \begin{extract}
  645. %% Gravitational waves are not sound waves, and the
  646. %% general public easily could have been led to that conclusion. Sound
  647. %% waves travel only through a medium such as air; ripples in spacetime
  648. %% don’t need any medium to support them. Sound waves propagate at the
  649. %% speed of sound; gravitational waves move at the speed of light. Even
  650. %% someone with superhuman hearing could never listen in on a black hole
  651. %% collision.
  652. %% So why the connection between sound and gravitational waves?
  653. %% \begin{itemize}
  654. %% \item LIGO detects gravitational waves with frequencies
  655. %% between several hertz and several kilohertz, the sweet spot for human
  656. %% hearing.
  657. %% \item When two stellar-mass black holes collide, they happen to
  658. %% jiggle spacetime at the same frequency as that of pressure waves in
  659. %% the air that our ears pick up as sound.
  660. %% \end{itemize}
  661. %% The LIGO discovery proves that black hole binaries exist, and that
  662. %% those binaries can merge within the age of the universe.
  663. %% \end{extract}
  664. %% While the origins of gravitational waves
  665. %% can be extremely violent, by the time the waves reach the Earth they
  666. %% are millions of times smaller and less disruptive. In fact, by the
  667. %% time gravitational waves from the first detection reached LIGO, the
  668. %% amount of space-time wobbling they generated was thousands of times
  669. %% smaller than the nucleus of an atom! Such inconceivably small
  670. %% measurements are what LIGO was designed to make.
  671. %% \begin{description}
  672. %% \item[Wave passes]
  673. %% As a gravitational wave passes an observer, that observer will find
  674. %% spacetime distorted by the effects of strain.
  675. %% \item[Distances]
  676. %% Distances between
  677. %% objects increase and decrease rhythmically as the wave passes, at a
  678. %% frequency corresponding to that of the wave.
  679. %% \end{description}
  680. %% This occurs despite such
  681. %% free objects never being subjected to an unbalanced force. The
  682. %% magnitude of this effect decreases proportional to the inverse
  683. %% distance from the source.
  684. %% Such systems cannot be observed with more
  685. %% traditional means such as optical telescopes or radio telescopes, and
  686. %% so gravitational-wave astronomy gives new insights into the working of
  687. %% the Universe. In particular, gravitational waves could be of interest
  688. %% to cosmologists as they offer a possible way of observing the very
  689. %% early Universe. This is not possible with conventional astronomy,
  690. %% since before recombination the Universe was opaque to electromagnetic
  691. %% radiation.
  692. %% Precise measurements of gravitational waves will also
  693. %% allow scientists to more thoroughly test the general theory of
  694. %% relativity.
  695. %% \begin{boxedtext}{Frank Wilczek on Einstein and Gravitation}
  696. %% Einstein's general relativity, as a theory of gravitation, is so tight
  697. %% conceptually that it allows only two free parameters: Newton’s
  698. %% constant and the cosmological term. It has passed every test that
  699. %% physicists and astronomers have devised. Yet there are reasons to
  700. %% remain dissatisfied.
  701. %% \section{First}
  702. %% First, the strength of gravity is grossly disproportionate to the
  703. %% strength of other forces. If we believe in the unity of nature’s
  704. %% operating system, how can that be?
  705. %% \subsection{Second}
  706. %% Second, the measured value of the
  707. %% mass density of space devoid of matter---the cosmological term, often
  708. %% called dark energy---is incommensurate with reasonable expectations. Why
  709. %% is it much smaller than theory suggests, yet not zero?
  710. %% \subsubsection{Third}
  711. %% Third, the
  712. %% equations that follow from straightforward quantization of general
  713. %% relativity break down in extreme conditions. What are the
  714. %% consequences? Those issues are important agenda items for the next 100
  715. %% years of physics. In the boxes, I've indicated a promising way to
  716. %% approach the question of the weakness of gravity. Here I'll offer a
  717. %% few comments on the other issues.
  718. %% \begin{extract}
  719. %% Theorists have estimated several contributions to the cosmological
  720. %% term-positive and negative---whose individual absolute values far exceed
  721. %% the observed total value. Thus the term’s observed smallness indicates
  722. %% delicate cancellations that our core theories do not explain. Perhaps,
  723. %% as suggested by Steven Weinberg, the explanation is anthropic. Too
  724. %% large a cosmological term would lead the universe to expand so rapidly
  725. %% that formation of structure in the universe would be inhibited.
  726. %% Neither galaxies nor stars nor planets would form, and thus observers
  727. %% could not emerge. Is that anthropic argument the best physics can
  728. %% do---is resistance futile? Or is some deeper principle at work?
  729. %% \end{extract}
  730. %% \section*{Conceptual difficulty}
  731. %% The conceptual difficulty of reconciling our theory of gravity,
  732. %% general relativity, with the principles of quantum mechanics has been
  733. %% the subject of much hyperbole. I think it is important, therefore,
  734. %% first to bring it down to earth.
  735. %% (Frank Wilczek, Physics Today, April 2016,
  736. %% \url{scitation.aip.org/content/aip/magazine/physicstoday/article/69/4/10.1063/PT.3.3137})
  737. %% \end{boxedtext}
  738. %% \index{authors}{Wilczek, Frank}
  739. %% In principle, gravitational waves could exist at any frequency.
  740. %% However, very low frequency waves would be impossible to detect and
  741. %% there is no credible source for detectable waves of very high
  742. %% frequency. Stephen Hawking and Werner Israel list different frequency
  743. %% bands for gravitational waves that could plausibly be detected,
  744. %% ranging from 10--7 Hz up to 1011 Hz.
  745. %% In theory, the loss of energy through gravitational radiation could
  746. %% eventually drop the Earth into the Sun. However, the total energy of
  747. %% the Earth orbiting the Sun (kinetic energy + gravitational potential
  748. %% energy) is about 1.14$\times$1036 joules of which only 200 joules per second
  749. %% is lost through gravitational radiation, leading to a decay in the
  750. %% orbit by about $1\times10$--15 meters per day or roughly the diameter of a
  751. %% proton. At this rate, it would take the Earth approximately $1\times 1013$
  752. %% times more than the current age of the Universe to spiral onto the
  753. %% Sun. This estimate overlooks the decrease in r over time, but the
  754. %% majority of the time the bodies are far apart and only radiating
  755. %% slowly, so the difference is unimportant in this example.
  756. %% \begin{table}
  757. %% \caption{A table of acceleration equations.}\tabfont
  758. %% \begin{tabular}{@{}l|l}
  759. %% \toprule
  760. %% \it With initial velocity&\it Starting from rest\\
  761. %% \midrule
  762. %% $v_f=v_i+ a \Delta\, t$&$v_f=a\Delta\, t$\\
  763. %% $\Delta\, d=v_i \Delta\, t + 1/2 a \Delta\, t^2$&
  764. %% $\Delta\, d= 1/2 a \Delta\, t^2$\\
  765. %% $v_f=\sqrt{v_i^2+2a\Delta\, d}$&
  766. %% $v_f=\sqrt{2a\Delta\, d}$\\
  767. %% \bottomrule
  768. %% \end{tabular}
  769. %% \end{table}
  770. %% More generally, the rate of orbital decay can be approximated by [32].
  771. %% \[
  772. %% \frac{\mathrm{d}r}{\mathrm{d}t} = - \frac{64}{5}\,
  773. %% \frac{G^3}{c^5}\, \frac{(m_1m_2)(m_1+m_2)}{r^3}\ ,
  774. %% \]
  775. %% where $r$ is the separation between the bodies, $t$ time, G Newton's
  776. %% constant, $c$ the speed of light, and $m1$ and $m2$ the masses of the
  777. %% bodies. This leads to an expected time to merger of
  778. %% \begin{equation}
  779. %% t= \frac{5}{256}\, \frac{c^5}{G^3}\,
  780. %% \frac{r^4}{(m_1m_2)(m_1+m_2)}.
  781. %% \end{equation}
  782. %% For example a pair of solar mass neutron stars in a circular orbit at
  783. %% a separation of $1.89\times108$ $m$ (189,000 km) has an orbital
  784. %% period of 1,000
  785. %% \begin{boxedtext}{Two Theorems and a Corollary}
  786. %% \begin{theorem}[Birkhoff's Theorem]
  787. %% The metric of the Schwarzschild black hole is the unique spherically
  788. %% symmetric solution of the vacuum {\it Einstein field equations}.
  789. %% \[G^{\mu\nu}=0.\]
  790. %% Stated another way, a spherically symmetric gravitational field in
  791. %% empty space must be static, with a metric given by the Schwarzschild
  792. %% black hole\index{authors}{Swarzchild, Karl}
  793. %% \index{authors}{Birkhoff, George David}
  794. %% metric.
  795. %% \end{theorem}
  796. %% \begin{corollary}
  797. %% A corollary states that the metric inside a spherical cavity inside a
  798. %% spherical mass distribution is the Minkowski metric.
  799. %% \end{corollary}
  800. %% \begin{theorem}[Schwarzschild Black Hole]
  801. %% A black hole with zero charge $Q = 0$ and no angular momentum $J = 0$.
  802. %% The exterior solution for such a black hole is known as the
  803. %% Schwarzschild solution (or Schwarzschild metric), and is an exact
  804. %% unique solution to the Einstein field equations of general relativity
  805. %% for the general static isotropic metric (i.e., the most general metric
  806. %% tensor that can represent a static isotropic gravitational field),
  807. %% \[
  808. %% d\tau^2=B(r)dt^2 - A(r)dr^2-r^2 \sin^2\theta\, d\phi^2.
  809. %% \]
  810. %% \end{theorem}
  811. %% \vspace{-6pt}
  812. %% \noindent
  813. %% In 1915, when Einstein first proposed them, the
  814. %% Einstein field equations appeared so complicated that he did not
  815. %% believe that a solution would ever be found.
  816. %% He was therefore quite surprised when, only a year later,
  817. %% Karl Schwarzschild (1916) discovered one by making the assumption of
  818. %% spherical symmetry.
  819. %% \end{boxedtext}
  820. %% \section{Samples of Programming Code}
  821. %% \begin{verbatim}
  822. %% procedure bubbleSort( A : list of sortable items )
  823. %% n = length(A)
  824. %% repeat
  825. %% newn = 0
  826. %% for i = 1 to n-1 inclusive do
  827. %% if A[i-1] > A[i] then
  828. %% swap(A[i-1], A[i])
  829. %% newn = i
  830. %% end if
  831. %% end for
  832. %% n = newn
  833. %% until n = 0
  834. %% end procedure
  835. %% \end{verbatim}
  836. %% \newpage
  837. %% \noindent
  838. %% Algorithm environment:
  839. %% %% \begin{algorithm} takes option [p][b][t][h], or some combination, like \begin{figure}
  840. %% \begin{algorithm}[h]
  841. %% \caption{A sample in an algorithm environment.}
  842. %% \begin{algorithmic}
  843. %% \If {$i\geq maxval$}
  844. %% \State $i\gets 0$
  845. %% \Else
  846. %% \If {$i+k\leq maxval$}
  847. %% \State $i\gets i+k$
  848. %% \EndIf
  849. %% \EndIf
  850. %% \end{algorithmic}
  851. %% \end{algorithm}
  852. %% \begin{boxedtext}{Two Examples of Programming Code}
  853. %% \vspace{-1\topsep}
  854. %% \begin{verbatim}
  855. %% procedure bubbleSort( A : list of sortable items )
  856. %% n = length(A)
  857. %% repeat
  858. %% \end{verbatim}
  859. %% \end{boxedtext}
  860. %% \begin{exercises}
  861. %% \exer{For Hooker's data, Exercise 1.2, use the Box and Cox and Atkinson procedures to determine a appropriate transformation of PRES
  862. %% in the regression of PRES on TEMP. find $\hat\lambda$, $\tilde\lambda$,
  863. %% the score test, and the added variable plot for the score.
  864. %% Summarize the results.}
  865. %% \subexer{The following data were collected in a study of the effect of dissolved sulfur
  866. %% on the surface tension of liquid copper (Baes and Killogg, 1953).}
  867. %% \medskip
  868. %% \hspace{3.5pt}\begin{tabular}{r@{}lcc}
  869. %% \toprule
  870. %% &&\multicolumn2c{$Y$= Decrease in Surface Tension}\\
  871. %% \multicolumn2c{$x$ = Weight \% sulfur}
  872. %% &\multicolumn2c{(dynes/cm), two Replicates}\\
  873. %% \midrule
  874. %% 0.&034&301&316\\
  875. %% 0.&093&430&422\\
  876. %% 011.&30&593&586\\
  877. %% \bottomrule
  878. %% \end{tabular}
  879. %% \subexer{Find the transformations of $X$ and $Y$ sot that in the transformed scale
  880. %% the regression is linear.}
  881. %% \subexer{Assuming that $X$ is transformed to $\ln(X)$, which choice of $Y$ gives
  882. %% better results,
  883. %% $Y$ or $\ln(Y)$? (Sclove, 1972).}
  884. %% \sidebysidesubsubexer{In the case of $\Delta_1$?}{In the case of $\Delta_2$?}
  885. %% \exer{Examine the Longley data, Problem 3.3, for applicability of assumptions of the
  886. %% linear model.}
  887. %% \sidebysidesubexer{In the case of $\Gamma_1$?}{In the case of $\Gamma_2$?}
  888. %% \[
  889. %% t= \frac{5}{256}\, \frac{c^5}{G^3}\,
  890. %% \frac{r^4}{(m_1m_2)(m_1+m_2)}.
  891. %% \]
  892. %% \end{exercises}
  893. %% \begin{chapappendix}[Chapter Appendix: Dark Matter Is Not Composed of Black Holes]
  894. %% \section{The Canada France Hawaii Lensing Survey}
  895. %% Did you know that less than 4\% of our Universe is made up of regular
  896. %% matter - the type that makes up the Earth, the planets and the stars?
  897. %% The rest is 'dark' and invisible, but we know that it is there through
  898. %% its effects on the regular matter that we can see. The gravity of Dark
  899. %% Matter causes galaxies to clump together in a giant cosmic web, and
  900. %% Dark Energy is pushing space itself apart at an accelerated rate. With
  901. %% some of the world's best telescopes we can directly witness the
  902. %% ongoing battle between these two strange entities.
  903. %% \subsection{CFHTL}
  904. %% The Canada-France-Hawaii Telescope Lensing Survey uses an innovative
  905. %% technique called gravitational lensing to observe the invisible dark
  906. %% matter in our Universe. Using data accumulated over five years by the
  907. %% CFHT Legacy Survey, the CFHTLenS team have analysed the images of over
  908. %% 10 million galaxies. The light emitted by these galaxies has taken
  909. %% nearly half the age of the Universe to reach us and has been bent and
  910. %% distorted by the massive clumps of dark matter it has passed by.
  911. %% Exploiting this fact that `mass bends light', as predicted by
  912. %% Einstein, we have privileged access to the mysterious components of
  913. %% the Universe that cannot otherwise be observed.
  914. %% \section{Dark Matter and Black Holes}
  915. %% We know that dark matter exists because of our mathematical graphs of
  916. %% how fast the material in a galaxy is rotating in relation to the
  917. %% center of the galaxy (where most of the galactic material is located).
  918. %% And as a result of these graphs, we know that dark matter surrounds
  919. %% galaxies. In the end, the farther out you go, the more mass
  920. %% grows\ldots and
  921. %% it grows by a lot. So in short, we know that dark matter isn’t just
  922. %% some black hole that exists out in the middle of intergalactic space
  923. %% based on the way that galaxies rotate and evolve over time.
  924. %% As Emma Grocutt, from the
  925. %% CFHTL Survey notes:\index{authors}{Grocutt, Emma}
  926. %% \begin{extract}
  927. %% The most interesting thing about dark matter is not simply that we
  928. %% can't see it, it's that we know dark matter is not made of the same
  929. %% stuff as normal baryonic matter. This is actually why we can't see
  930. %% it---baryons interact with each other through gravity, nuclear forces and
  931. %% the electrostatic force. These interactions are what allow baryonic
  932. %% matter (such as stars) to emit light, and what prevent you from
  933. %% putting your hand through a table---the particles of your hand are
  934. %% electrostatically repelled from the particles in the table. Dark
  935. %% matter, however, only interacts through gravity. This is why we see
  936. %% its effects on the motions of galaxies and stars, but why we can't see
  937. %% it directly; it does not emit or absorb light. Dark matter particles
  938. %% can also pass through regular matter almost completely undetected
  939. %% since they don't interact electrostatically, meaning we can't touch it
  940. %% or sense it in any direct way.
  941. %% \end{extract}
  942. %% \end{chapappendix}
  943. %% \setcounter{chapter}{2}
  944. %% \clearpage
  945. \appendix
  946. %% \chapter{Evaluating the Significance of the Proof of Gravity
  947. %% Waves}
  948. %% \section{On a Par with Determination of Structure of DNA}
  949. %% Prof Karsten Danzmann, from the Max Planck Institute for
  950. %% \index{authors}{Danzmann, Karsten}
  951. %% \index{subject}{Max Planck Institute for Gravitational Physics}
  952. %% Gravitational Physics and Leibniz University in Hannover, Germany, is
  953. %% a European leader on the collaboration.\footnote{Text and graphics
  954. %% from
  955. %% \url{http://www.bbc.com/news/science-environment-35524440}}
  956. %% He said the detection was one of the most important developments in
  957. %% science since the discovery of the Higgs particle, and on a par with
  958. %% the determination of the structure of DNA.
  959. %% \index{subject}{Nobel Prize}
  960. %% \begin{figure}[h!]
  961. %% %\centerline{\includegraphics[width=\textwidth]{gravwaves}}
  962. %% \vspace{2pt}
  963. %% \caption{Graphic showing two black holes generating gravity waves.}
  964. %% \end{figure}
  965. %% ``It is the first ever direct detection of gravitational waves; it's
  966. %% the first ever direct detection of black holes and it is a
  967. %% confirmation of General Relativity because the property of these black
  968. %% holes agrees exactly with what Einstein predicted almost exactly 100
  969. %% years ago.''\index{authors}{Einstein, Albert}
  970. %% \index{subject}{Albert Einstein!General Relativity}
  971. %% \begin{equation}
  972. %% d\tau^2=B(r)dt^2 - A(r)dr^2-r^2 \sin^2\theta\, d\phi^2.
  973. %% \end{equation}
  974. %% \begin{sidewaysfigure}
  975. %% %\includegraphics[width=\textheight]{gravwaves}
  976. %% \vspace{-11pt}
  977. %% \caption{Graphic showing two black holes generating gravity waves.
  978. %% (rotated figure)}
  979. %% \end{sidewaysfigure}
  980. %% \begin{sidewaystable}
  981. %% \begin{center}
  982. %% \begin{threeparttable}
  983. %% \caption{More relevant tabular information.\label{tbl-2}}\tabfont
  984. %% \begin{tabular}{@{}lrrrrrrrrrrr}
  985. %% \toprule
  986. %% Star & Height & $d_{x}$ & $d_{y}$ & $n$ & $\chi^2$ & $R_{maj}$ & $R_{min}$ &
  987. %% \multicolumn{1}{c}{$P^a$} & $P R_{maj}$ & $P R_{min}$ &
  988. %% \multicolumn{1}{c}{$\Theta^b$} \\
  989. %% \midrule
  990. %% 1 &33472.5 &-0.1 &0.4 &53 &27.4 &2.065 &1.940 &3.900 &68.3 &116.2 &-27.639\\
  991. %% 2 &27802.4 &-0.3 &-0.2 &60 &3.7 &1.628 &1.510 &2.156 &6.8 &7.5 &-26.764\\
  992. %% 3 &29210.6 &0.9 &0.3 &60 &3.4 &1.622 &1.551 &2.159 &6.7 &7.3 &-40.272\\
  993. %% 4 &32733.8 &-1.2\rlap{\tnote{$c$}} &-0.5 &41 &54.8 &2.282 &2.156 &4.313 &117.4 &78.2 &-35.847\\
  994. %% 5 & 9607.4 &-0.4 &-0.4 &60 &1.4 &1.669\rlap{\tnote{$c$}} &1.574 &2.343 &8.0 &8.9 &-33.417\\
  995. %% 6 &31638.6 &1.6 &0.1 &39 &315.2 & 3.433 &3.075 &7.488 &92.1 &25.3 &-12.052\\
  996. %% \bottomrule
  997. %% \end{tabular}
  998. %% \begin{tablenotes}[flushleft]\footnotesize
  999. %% \item[$a$]Sample footnote for table~\ref{tbl-2} that was
  1000. %% generated with the \LaTeX\ table environment
  1001. %% \item[$b$]Yet another sample footnote for table
  1002. %% \ref{tbl-2}
  1003. %% \item[$c$]Another sample footnote for
  1004. %% table~\ref{tbl-2}
  1005. %% \end{tablenotes}
  1006. %% \end{threeparttable}
  1007. %% \end{center}
  1008. %% \end{sidewaystable}
  1009. %% \section{Ripples in the Fabric of Space-Time}
  1010. %% \begin{itemize}
  1011. %% \item
  1012. %% Gravitational waves are a prediction of the Theory of General
  1013. %% Relativity
  1014. %% \item
  1015. %% Their existence has been inferred by science but only now
  1016. %% directly detected
  1017. %% \item
  1018. %% They are ripples in the fabric of space and time produced by
  1019. %% violent events
  1020. %% \item
  1021. %% Accelerating masses will produce waves that propagate at the
  1022. %% speed of light
  1023. %% \item
  1024. %% Detectable sources ought to include merging black holes and
  1025. %% neutron stars
  1026. %% \item
  1027. %% Ligo fires lasers into long, L-shaped tunnels; the waves disturb
  1028. %% the light
  1029. %% \item
  1030. %% Detecting the waves opens up the Universe to completely new
  1031. %% investigations
  1032. %% \end{itemize}
  1033. %% \subsection{Stephen Hawking Agrees on Importance}
  1034. %% That view was reinforced by Prof Stephen Hawking, who is an expert on
  1035. %% black holes.\footnote{Perhaps somewhat immodestly,
  1036. %% this claim is made
  1037. %% on Hawking's website (\url{www.hawking.org.uk}):
  1038. %% ``Stephen Hawking is regarded as one of the
  1039. %% most brilliant theoretical physicists since Einstein.''
  1040. %% Though, of course, it may well be true!}
  1041. %% Speaking exclusively to BBC News, he said he believed
  1042. %% that the detection marked a key moment in scientific history.\endnote{Stephen Hawking said that the detection of gravity waves
  1043. %% marked a key moment in scientific history.}
  1044. %% \index{authors}{Hawking, Stephen}
  1045. %% ``Gravitational waves provide a completely new way at looking at the
  1046. %% Universe. The ability to detect them has the potential to
  1047. %% revolutionise astronomy. This discovery is the first detection of a
  1048. %% black hole binary system and the first observation of black holes
  1049. %% merging,'' he said.
  1050. %% ``Apart from testing (Albert Einstein's theory of) General Relativity,
  1051. %% we could hope to see black holes through the history of the Universe.
  1052. %% We may even see relics of the very early Universe during the Big Bang
  1053. %% at some of the most extreme energies possible.''
  1054. %% \index{authors}{Albert Einstein}
  1055. %% \subsection{Too Beautiful to Be True?}
  1056. %% We found a beautiful signature of the merger of two black holes and
  1057. %% it agrees exactly - fantastically\nobreak - with the numerical solutions to
  1058. %% Einstein equations\ldots it looked too beautiful to be true," said Prof
  1059. %% Danzmann.\index{subject}{beauty}\index{subject}{truth}\index{subject}{truth and
  1060. %% beauty!truth}\index{subject}{beauty and truth!beauty}
  1061. \backmatter
  1062. %% \addtocontents{toc}{\vspace{11pt}}
  1063. %% \begin{glossary}
  1064. %% \term{Absolute Zero}{
  1065. %% The lowest temperature possible, equivalent to -273.15$^{\deg}$C (or
  1066. %% 0$^{\deg}$ on the
  1067. %% absolute Kelvin scale), at which point atoms cease to move altogether
  1068. %% and molecular energy is minimal. The idea that it is impossible,
  1069. %% through any physical process, to lower the temperature of a system to
  1070. %% zero is known as the Third Law of Thermodynamics.}
  1071. %% \index{subject}{Absolute zero}
  1072. %% \index{subject}{Third Law of Thermodynamics}
  1073. %% \term{Alpha Particle (Alpha Decay)}{A particle of 2 protons and 2 neutrons (essentially a helium nucleus)
  1074. %% that is emitted by an unstable radioactive nucleus during radioactive
  1075. %% decay. It is a relatively low-penetration particle due its
  1076. %% comparatively low energy and high mass.}
  1077. %% \index{subject}{Alpha Particle}
  1078. %% \term{Angular Momentum}{A measure of the momentum of a body in rotational
  1079. %% motion about its centre of mass. Technically, the angular momentum of
  1080. %% a body is equal to the mass of the body multiplied by the cross
  1081. %% product of the position vector of the particle with its velocity
  1082. %% vector. The angular momentum of a system is the sum of the angular
  1083. %% momenta of its constituent particles, and this total is conserved
  1084. %% unless acted on by an outside force.}
  1085. %% \term{Anthropic Principle}
  1086. %% {The idea that the fundamental constants of physics and chemistry are
  1087. %% just right (or ``fine-tuned'') to allow the universe and life as we know
  1088. %% it to exist, and indeed that the universe is only as it is because we
  1089. %% are here to observe it. Thus, we find ourselves in the kind of
  1090. %% universe, and on the kind of planet, where conditions are ripe for our
  1091. %% form of life.}
  1092. %% \term{Antimatter}{Pair production and pair annihilation
  1093. %% of hydrogen and antihydrogen particles.
  1094. %% A large
  1095. %% accumulation of antiparticles---antiprotons, antineutrons and
  1096. %% positrons (antielectrons)---which have opposite properties to normal
  1097. %% particles (e.g. electrical charge), and which can come together to
  1098. %% make antiatoms. When matter and antimatter meet, they self-destruct in
  1099. %% a burst of high-energy photons or gamma rays. The laws of physics seem
  1100. %% to predict a pretty much 50/50 mix of matter and antimatter, despite
  1101. %% the observable universe apparently consisting almost entirely of
  1102. %% matter, known as the ``baryon asymmetry problem.''}
  1103. %% \index{subject}{antimatter}
  1104. %% \index{subject}{antimatter, definition of}
  1105. %% \index{subject}{baryon asymmetry problem}
  1106. %% \end{glossary}
  1107. %% \begin{endbookexercises}
  1108. %% \exer{For Hooker's data, Exercise 1.2, use the Box and Cox and Atkinson procedures to determine a appropriate transformation of PRES
  1109. %% in the regression of PRES on TEMP. find $\hat\lambda$, $\tilde\lambda$,
  1110. %% the score test, and the added variable plot for the score.
  1111. %% Summarize the results.}
  1112. %% \subexer{The following data were collected in a study of the effect of dissolved sulfur
  1113. %% on the surface tension of liquid copper (Baes and Killogg, 1953).}
  1114. %% \hspace{3.5pt}\begin{tabular}{rlcc}
  1115. %% \toprule
  1116. %% &&\multicolumn2c{$Y$= Decrease in Surface Tension}\\
  1117. %% \multicolumn2c{$x$ = Weight \% sulfur}
  1118. %% &\multicolumn2c{(dynes/cm), two Replicates}\\
  1119. %% \midrule
  1120. %% 0.&034&301&316\\
  1121. %% 0.&093&430&422\\
  1122. %% 0.&30&593&586\\
  1123. %% \bottomrule
  1124. %% \end{tabular}
  1125. %% \subexer{Find the transformations of $X$ and $Y$ sot that in the transformed scale
  1126. %% the regression is linear.}
  1127. %% \subexer{Assuming that $X$ is transformed to $\ln(X)$, which choice of $Y$ gives
  1128. %% better results,
  1129. %% $Y$ or $\ln(Y)$? (Sclove, 1972).}
  1130. %% \sidebysidesubsubexer{In the case of $\Delta_1$?}{In the case of $\Delta_2$?}
  1131. %% \exer{Examine the Longley data, Problem 3.3, for applicability of assumptions of the
  1132. %% linear model.}
  1133. %% \sidebysidesubexer{In the case of $\Gamma_1$?}{In the case of $\Gamma_2$?}
  1134. %% \[
  1135. %% t= \frac{5}{256}\, \frac{c^5}{G^3}\,
  1136. %% \frac{r^4}{(m_1m_2)(m_1+m_2)}.
  1137. %% \]
  1138. %% \end{endbookexercises}
  1139. %% \theendnotes
  1140. %% \nocite{*} is a way to get all the entries in the .bib file to print in the bibliography:
  1141. \nocite{*}\let\bibname\refname
  1142. \addcontentsline{toc}{fmbm}{\refname}
  1143. \printbibliography
  1144. %% \begin{contributors}[twocolumn]
  1145. %% \contrib
  1146. %% Professor Alan Guth\\
  1147. %% Center for Theoretical Physics\\
  1148. %% Massachusetts Institute of Technology\\
  1149. %% Cambridge, Massachusetts, USA
  1150. %% \contrib
  1151. %% Professor Andrei Linde\\
  1152. %% Department of Physics\\
  1153. %% Stanford University\\
  1154. %% Stanford, CA, USA
  1155. %% \end{contributors}
  1156. \printindex{authors}{Author Index}
  1157. \printindex{subject}{Subject Index}
  1158. \end{document}