text,source "ELECTROMAGNETICS STEVEN W. ELLINGSON VOLUME 2",Electromagnetics_Vol2.pdf "ELECTROMAGNETICS VOLUME 2",Electromagnetics_Vol2.pdf "Publication of this book was made possible in part by the Virginia Tech University Libraries’ Open Education Initiative Faculty Grant program: http://guides.lib.vt.edu/oer/grants Books in this series Electromagnetics, V olume 1, https://doi.org/10.21061/electromagnetics-vol-1 Electromagnetics, V olume 2, https://doi.org/10.21061/electromagnetics-vol-2 /T_he Open Electromagnetics Project, https://www.faculty.ece.vt.edu/swe/oem",Electromagnetics_Vol2.pdf "ELECTROMAGNETICS STEVEN W. ELLINGSON VOLUME 2",Electromagnetics_Vol2.pdf "Copyright © 2020 Steven W. Ellingson iv This work is published by Virginia Tech Publishing, a division of the University Libraries at Virginia Tech, 560 Drillfield Drive, Blacksburg, V A 24061, USA (publishing@vt.edu). Suggested citation: Ellingson, Steven W. (2020) Electromagnetics, V ol. 2. Blacksburg, V A: Virginia Tech Publishing. https://doi.org/10.21061/electromagnetics-vol-2. Licensed with CC BY-SA 4.0. https://creativecommons.org/licenses/by- sa/4.0. Peer Review: This book has undergone single-blind peer review by a minimum of three external subject matter experts. Accessibility Statement: Virginia Tech Publishing is committed to making its publications accessible in accordance with the Americans with Disabilities Act of 1990. The screen reader–friendly PDF version of this book is tagged structurally and includes alternative text which allows for machine-readability. The LaTeX source files also include alternative text for all images and figures.",Electromagnetics_Vol2.pdf "and includes alternative text which allows for machine-readability. The LaTeX source files also include alternative text for all images and figures. Publication Cataloging Information Ellingson, Steven W., author Electromagnetics (V olume 2) / Steven W. Ellingson Pages cm ISBN 978-1-949373-91-2 (print) ISBN 978-1-949373-92-9 (ebook) DOI: https://doi.org/10.21061/electromagnetics-vol-2 1. Electromagnetism. 2. Electromagnetic theory. I. Title QC760.E445 2020 621.3 The print version of this book is printed in the United States of America. Cover Design: Robert Browder Cover Image: © Michelle Yost. Total Internal Reflection (https://flic.kr/p/dWAhx5) is licensed with a Creative Commons Attribution-ShareAlike 2.0 license: https://creativecommons.org/licenses/by-sa/2.0/ (cropped by Robert Browder) This textbook is licensed with a Creative Commons Attribution Share-Alike 4.0 license:",Electromagnetics_Vol2.pdf "This textbook is licensed with a Creative Commons Attribution Share-Alike 4.0 license: https://creativecommons.org/licenses/by-sa/4.0. You are free to copy, share, adapt, remix, transform, and build upon the material for any purpose, even commercially, as long as you follow the terms of the license: https://creativecommons.org/licenses/by-sa/4.0/legalcode.",Electromagnetics_Vol2.pdf "v Features of This Open Textbook Additional Resources The following resources are freely available at http://hdl.handle.net/10919/93253 Downloadable PDF of the book LaTeX source files Slides of figures used in the book Problem sets and solution manual Review / Adopt /Adapt / Build upon If you are an instructor reviewing, adopting, or adapting this textbook, please help us understand your use by completing this form: http://bit-ly/vtpublishing-update. You are free to copy, share, adapt, remix, transform, and build upon the material for any purpose, even commercially, as long as you follow the terms of the license: https://creativecommons.org/licenses/by-sa/4.0/legalcode. Print edition ordering details Links to collaborator portal and listserv Links to other books in the series Errata You must: Attribute — You must give appropriate credit, provide a link to the license, and indicate if changes",Electromagnetics_Vol2.pdf "Errata You must: Attribute — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. Suggested citation: Adapted by _[your name]_ from (c) Steven W. Ellingson, Electromagnetics, V ol 2, https://doi .org/10.21061/electromagnetics-vol-2, CC BY SA 4.0, https://creativecommons.org/licenses/by-sa/4.0. ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. You may not: Add any additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. If adapting or building upon, you are encouraged to: Incorporate only your own work or works with a CC BY or CC BY-SA license. Attribute all added content. Have",Electromagnetics_Vol2.pdf "Incorporate only your own work or works with a CC BY or CC BY-SA license. Attribute all added content. Have your work peer reviewed. Include a transformation statement that describes changes, additions, accessibility features, and any subsequent peer review. If incorporating text or figures under an informed fair use analysis, mark them as such and cite them. Share your contributions in the collaborator portal or on the listserv. Contact the author to explore contributing your additions to the project. Suggestions for creating and adapting Create and share learning tools and study aids. Translate. Modify the sequence or structure. Add or modify problems and examples. Transform or build upon in other formats. Submit suggestions and comments Submit suggestions (anonymous): http://bit.ly/electromagnetics-suggestion Email: publishing@vt.edu Annotate using Hypothes.is http://web.hypothes.is For more information see the User Feedback Guide: http://bit.ly/userfeedbackguide",Electromagnetics_Vol2.pdf "Annotate using Hypothes.is http://web.hypothes.is For more information see the User Feedback Guide: http://bit.ly/userfeedbackguide Adaptation resources LaTeX source files are available. Adapt on your own at https://libretexts.org. Guide: Modifying an Open Textbook https://press.rebus.community/otnmodify.",Electromagnetics_Vol2.pdf "Contents Pr eface ix 1 Preliminary Concepts 1 1.1 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Electromagnetic Field Theory: A Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Magnetostatics Redux 11 2.1 Lorentz Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 Magnetic Force on a Current-Carrying Wire . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3 T orque Induced by a Magnetic Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4 The Biot-Savart Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18",Electromagnetics_Vol2.pdf "2.4 The Biot-Savart Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.5 Force, Energy , and Potential Difference in a Magnetic Field . . . . . . . . . . . . . . . . . . . 20 3 W ave Propagation in General Media 25 3.1 Poynting’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2 Poynting V ector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.3 W ave Equations for Lossy Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.4 Complex Permittivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.5 Loss T angent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.6 Plane W aves in Lossy Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.7 W ave Power in a Lossy Medium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37",Electromagnetics_Vol2.pdf "3.7 W ave Power in a Lossy Medium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.8 Decibel Scale for Power Ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.9 Attenuation Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.10 Poor Conductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.11 Good Conductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.12 Skin Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4 Current Flow in Imperfect Conductors 48 4.1 AC Current Flow in a Good Conductor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.2 Impedance of a Wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.3 Surface Impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54",Electromagnetics_Vol2.pdf "4.3 Surface Impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5 W ave Reflection and T ransmission 56 5.1 Plane W aves at Normal Incidence on a Planar Boundary . . . . . . . . . . . . . . . . . . . . . 56 5.2 Plane W aves at Normal Incidence on a Material Slab . . . . . . . . . . . . . . . . . . . . . . 60 5.3 T otal Transmission Through a Slab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 5.4 Propagation of a Uniform Plane W ave in an Arbitrary Direction . . . . . . . . . . . . . . . . . 67 vi",Electromagnetics_Vol2.pdf "CONTENTS vii 5.5 Decomposition of a W ave into TE and TM Components . . . . . . . . . . . . . . . . . . . . . 70 5.6 Plane W aves at Oblique Incidence on a Planar Boundary: TE Case . . . . . . . . . . . . . . . 72 5.7 Plane W aves at Oblique Incidence on a Planar Boundary: TM Case . . . . . . . . . . . . . . . 76 5.8 Angles of Reflection and Refraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 5.9 TE Reflection in Non-magnetic Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.10 TM Reflection in Non-magnetic Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.11 T otal Internal Reflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.12 Evanescent W aves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 6 W aveguides 95 6.1 Phase and Group V elocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95",Electromagnetics_Vol2.pdf "6 W aveguides 95 6.1 Phase and Group V elocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6.2 Parallel Plate W aveguide: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6.3 Parallel Plate W aveguide: TE Case, Electric Field . . . . . . . . . . . . . . . . . . . . . . . . 99 6.4 Parallel Plate W aveguide: TE Case, Magnetic Field . . . . . . . . . . . . . . . . . . . . . . . 102 6.5 Parallel Plate W aveguide: TM Case, Electric Field . . . . . . . . . . . . . . . . . . . . . . . . 104 6.6 Parallel Plate W aveguide: The TM 0 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6.7 General Relationships for Unidirectional W aves . . . . . . . . . . . . . . . . . . . . . . . . . 108 6.8 Rectangular W aveguide: TM Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 6.9 Rectangular W aveguide: TE Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113",Electromagnetics_Vol2.pdf "6.9 Rectangular W aveguide: TE Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 6.10 Rectangular W aveguide: Propagation Characteristics . . . . . . . . . . . . . . . . . . . . . . 117 7 T ransmission Lines Redux 121 7.1 Parallel Wire Transmission Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7.2 Microstrip Line Redux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 7.3 Attenuation in Coaxial Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 7.4 Power Handling Capability of Coaxial Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 7.5 Why 50 Ohms? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 8 Optical Fiber 138 8.1 Optical Fiber: Method of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138",Electromagnetics_Vol2.pdf "8 Optical Fiber 138 8.1 Optical Fiber: Method of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 8.2 Acceptance Angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 8.3 Dispersion in Optical Fiber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 9 Radiation 145 9.1 Radiation from a Current Moment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 9.2 Magnetic V ector Potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.3 Solution of the W ave Equation for Magnetic V ector Potential . . . . . . . . . . . . . . . . . . 150 9.4 Radiation from a Hertzian Dipole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 9.5 Radiation from an Electrically-Short Dipole . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 9.6 Far-Field Radiation from a Thin Straight Filament of Current . . . . . . . . . . . . . . . . . . 159",Electromagnetics_Vol2.pdf "9.6 Far-Field Radiation from a Thin Straight Filament of Current . . . . . . . . . . . . . . . . . . 159 9.7 Far-Field Radiation from a Half-W ave Dipole . . . . . . . . . . . . . . . . . . . . . . . . . . 161 9.8 Radiation from Surface and V olume Distributions of Current . . . . . . . . . . . . . . . . . . 162 10 Antennas 166 10.1 How Antennas Radiate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 10.2 Power Radiated by an Electrically-Short Dipole . . . . . . . . . . . . . . . . . . . . . . . . . 168 10.3 Power Dissipated by an Electrically-Short Dipole . . . . . . . . . . . . . . . . . . . . . . . . 169 10.4 Reactance of the Electrically-Short Dipole . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 10.5 Equivalent Circuit Model for Transmission; Radiation Efficiency . . . . . . . . . . . . . . . . 173 10.6 Impedance of the Electrically-Short Dipole . . . . . . . . . . . . . . . . . . . . . . . . . . . 175",Electromagnetics_Vol2.pdf "viii CONTENTS 10.7 Directivity and Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 10.8 Radiation Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 10.9 Equivalent Circuit Model for Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 10.10 Reciprocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 10.11 Potential Induced in a Dipole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 10.12 Equivalent Circuit Model for Reception, Redux . . . . . . . . . . . . . . . . . . . . . . . . . 194 10.13 Effective Aperture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 10.14 Friis Transmission Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 A Constitutive Parameters of Some Common Materials 205",Electromagnetics_Vol2.pdf "A Constitutive Parameters of Some Common Materials 205 A.1 Permittivity of Some Common Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 A.2 Permeability of Some Common Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 A.3 Conductivity of Some Common Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 B Mathematical Formulas 209 B.1 Trigonometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 B.2 V ector Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 B.3 V ector Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 C Physical Constants 212 Index 213",Electromagnetics_Vol2.pdf "Preface About This Book [m0213] Goals for this book. This book is intended to serve as a primary textbook for the second semester of a two-semester course in undergraduate engineering electromagnetics. The presumed textbook for the first semester is Electromagnetics V ol. 1, 1 which addresses the following topics: electric and magnetic fields; electromagnetic properties of materials; electromagnetic waves; and devices that operate according to associated electromagnetic principles including resistors, capacitors, inductors, transformers, generators, and transmission lines. The book you are now reading – Electromagnetics V ol. 2 – addresses the following topics: • Chapter 1 (“Preliminary Concepts”) provides a brief summary of conventions for units, notation, and coordinate systems, and a synopsis of electromagnetic field theory from V ol. 1. • Chapter 2 (“Magnetostatics Redux”) extends the coverage of magnetostatics in V ol. 1 to include magnetic forces, rudimentary motors, and the",Electromagnetics_Vol2.pdf "• Chapter 2 (“Magnetostatics Redux”) extends the coverage of magnetostatics in V ol. 1 to include magnetic forces, rudimentary motors, and the Biot-Savart law . • Chapter 3 (“W ave Propagation in General Media”) addresses Poynting’s theorem, theory of wave propagation in lossy media, and properties of imperfect conductors. • Chapter 4 (“Current Flow in Imperfect Conductors”) addresses the frequency-dependent distribution of current in wire conductors and subsequently the AC impedance of wires. 1 S.W . Ellingson, Electromagnetics V ol. 1, VT Publishing, 2018. CC BY -SA 4.0. ISBN 9780997920185. https://doi.org/10.21061/electromagnetics- vol- 1 • Chapter 5 (“W ave Reflection and Transmission”) addresses scattering of plane waves from planar interfaces. • Chapter 6 (“W aveguides”) provides an introduction to waveguide theory via the parallel plate and rectangular waveguides. • Chapter 7 (“Transmission Lines Redux”) extends the coverage of transmission lines in V ol. 1 to",Electromagnetics_Vol2.pdf "plate and rectangular waveguides. • Chapter 7 (“Transmission Lines Redux”) extends the coverage of transmission lines in V ol. 1 to include parallel wire lines, the theory of microstrip lines, attenuation, and power-handling capabilities. The inevitable but hard-to-answer question “What’s so special about 50 Ω?” is addressed at the end of this chapter. • Chapter 8 (“Optical Fiber”) provides an introduction to multimode fiber optics, including the concepts of acceptance angle and modal dispersion. • Chapter 9 (“Radiation”) provides a derivation of the electromagnetic fields radiated by a current distribution, emphasizing the analysis of line distributions using the Hertzian dipole as a differential element. • Chapter 10 (“ Antennas”) provides an introduction to antennas, emphasizing equivalent circuit models for transmission and reception and characterization in terms of directivity and pattern. This chapter concludes with the Friis transmission equation.",Electromagnetics_Vol2.pdf "and characterization in terms of directivity and pattern. This chapter concludes with the Friis transmission equation. Appendices covering material properties, mathematical formulas, and physical constants are repeated from V ol. 1, with a few additional items. T arget audience. This book is intended for electrical engineering students in the third year of a bachelor of science degree program. It is assumed that students have successfully completed one semester of Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "x PREF ACE engineering electromagnetics, nominally using V ol. 1. However, the particular topics and sequence of topics in V ol. 1 are not an essential prerequisite, and in any event this book may be useful as a supplementary reference when a different textbook is used. It is assumed that readers are familiar with the fundamentals of electric circuits and linear systems, which are normally taught in the second year of the degree program. It is also assumed that readers are proficient in basic engineering mathematics, including complex numbers, trigonometry , vectors, partial differential equations, and multivariate calculus. Notation, examples, and highlights. Section 1.2 summarizes the mathematical notation used in this book. Examples are set apart from the main text as follows: Example 0.1. This is an example. “Highlight boxes” are used to identify key ideas as follows: This is a key idea. What are those little numbers in square brackets? This book is a product of the",Electromagnetics_Vol2.pdf "follows: This is a key idea. What are those little numbers in square brackets? This book is a product of the Open Electromagnetics Project . This project provides a large number of sections (“modules”) which are assembled (“remixed”) to create new and different versions of the book. The text “ [m0213]” that you see at the beginning of this section uniquely identifies the module within the larger set of modules provided by the project. This identification is provided because different remixes of this book may exist, each consisting of a different subset and arrangement of these modules. Prospective authors can use this identification as an aid in creating their own remixes. Why do some sections of this book seem to repeat material presented in previous sections? In some remixes of this book, authors might choose to eliminate or reorder modules. For this reason, the modules are written to “stand alone” as much as possible. As a result, there may be some redundancy",Electromagnetics_Vol2.pdf "modules are written to “stand alone” as much as possible. As a result, there may be some redundancy between sections that would not be present in a traditional (non-remixable) textbook. While this may seem awkward to some at first, there are clear benefits: In particular, it never hurts to review relevant past material before tackling a new concept. And, since the electronic version of this book is being offered at no cost, there is not much gained by eliminating this useful redundancy . Why cite Wikipedia pages as additional reading? Many modules cite Wikipedia entries as sources of additional information. Wikipedia represents both the best and worst that the Internet has to offer. Most educators would agree that citing Wikipedia pages as primary sources is a bad idea, since quality is variable and content is subject to change over time. On the other hand, many Wikipedia pages are excellent, and serve as useful sources of relevant information that is",Electromagnetics_Vol2.pdf "other hand, many Wikipedia pages are excellent, and serve as useful sources of relevant information that is not strictly within the scope of the curriculum. Furthermore, students benefit from seeing the same material presented differently , in a broader context, and with the additional references available as links from Wikipedia pages. W e trust instructors and students to realize the potential pitfalls of this type of resource and to be alert for problems. Acknowledgments. Here’s a list of talented and helpful people who contributed to this book: The staff of V irginia T ech Publishing, University Libraries, V irginia T ech: Acquisitions/Developmental Editor & Project Manager: Anita W alz Advisors: Peter Potter, Corinne Guimont Cover, Print Production: Robert Browder Other V irginia T ech contributors: Accessibility: Christa Miller, Corinne Guimont, Sarah Mease Assessment: Anita W alz V irginia T ech Students: Alt text writer: Michel Comer",Electromagnetics_Vol2.pdf "Accessibility: Christa Miller, Corinne Guimont, Sarah Mease Assessment: Anita W alz V irginia T ech Students: Alt text writer: Michel Comer Figure designers: Kruthika Kikkeri, Sam Lally , Chenhao W ang Copyediting: Longleaf Press External reviewers: Randy Haupt, Colorado School of Mines Karl W arnick, Brigham Y oung University Anonymous faculty member, research university",Electromagnetics_Vol2.pdf "xi Also, thanks are due to the students of the Fall 2019 section of ECE3106 at V irginia T ech who used the beta version of this book and provided useful feedback. Finally , we acknowledge all those who have contributed their art to Wikimedia Commons (https://commons.wikimedia.org/) under open licenses, allowing their work to appear as figures in this book. These contributors are acknowledged in figures and in the “Image Credits” section at the end of each chapter. Thanks to each of you for your selfless effort. About the Open Electromagnetics Project [m0148] The Open Electromagnetics Project (https://www .faculty .ece.vt.edu/swe/oem/) was established at V irginia T ech in 2017 with the goal of creating no-cost openly-licensed textbooks for courses in undergraduate engineering electromagnetics. While a number of very fine traditional textbooks are available on this topic, we feel that it has become unreasonable to insist that students pay hundreds of dollars per book when",Electromagnetics_Vol2.pdf "feel that it has become unreasonable to insist that students pay hundreds of dollars per book when effective alternatives can be provided using modern media at little or no cost to the student. This project is equally motivated by the desire for the freedom to adopt, modify , and improve educational resources. This work is distributed under a Creative Commons BY SA license which allows – and we hope encourages – others to adopt, modify , improve, and expand the scope of our work.",Electromagnetics_Vol2.pdf "xii PREF ACE About the Author [m0153] Steven W . Ellingson (ellingson@vt.edu) is an Associate Professor at V irginia T ech in Blacksburg, V irginia, in the United States. He received PhD and MS degrees in Electrical Engineering from the Ohio State University and a BS in Electrical and Computer Engineering from Clarkson University . He was employed by the U.S. Army , Booz-Allen & Hamilton, Raytheon, and the Ohio State University ElectroScience Laboratory before joining the faculty of V irginia T ech, where he teaches courses in electromagnetics, radio frequency electronics, wireless communications, and signal processing. His research includes topics in wireless communications, radio science, and radio frequency instrumentation. Professor Ellingson serves as a consultant to industry and government and is the author of Radio Systems Engineering (Cambridge University Press, 2016) and Electromagnetics V ol. 1 (VT Publishing, 2018).",Electromagnetics_Vol2.pdf "Chapter 1 Pr eliminary Concepts 1.1 Units [m0072] The term “unit” refers to the measure used to express a ph ysical quantity . For example, the mean radius of the Earth is about 6,371,000 meters; in this case, the unit is the meter. A number like “6,371,000” becomes a bit cumbersome to write, so it is common to use a prefix to modify the unit. For example, the radius of the Earth is more commonly said to be 6371 kilometers, where one kilometer is understood to mean 1000 meters. It is common practice to use prefixes, such as “kilo-, ” that yield values in the range of 0.001 to 10,000. A list of standard prefixes appears in T able 1.1. Prefix Abbreviation Multiply by: exa E 1018 peta P 1015 tera T 1012 giga G 109 mega M 106 kilo k 103 milli m 10−3 micro µ 10−6 nano n 10−9 pico p 10−12 femto f 10−15 atto a 10−18 T able 1.1: Prefixes used to modify units. Unit Abbreviation Quantifies: ampere A electric current coulomb C electric charge farad F capacitance henry H inductance hertz Hz frequency",Electromagnetics_Vol2.pdf "Unit Abbreviation Quantifies: ampere A electric current coulomb C electric charge farad F capacitance henry H inductance hertz Hz frequency joule J energy meter m distance newton N force ohm Ω resistance second s time tesla T magnetic flux density volt V electric potential watt W power weber Wb magnetic flux T able 1.2: Some units that are commonly used in elec- tromagnetics. Writing out the names of units can also become tedious. For this reason, it is common to use standard abbreviations; e.g., “6731 km” as opposed to “6371 kilometers, ” where “k” is the standard abbreviation for the prefix “kilo” and “m” is the standard abbreviation for “meter. ” A list of commonly-used base units and their abbreviations are shown in T able 1.2. T o avoid ambiguity , it is important to always indicate the units of a quantity; e.g., writing “6371 km” as opposed to “6371. ” Failure to do so is a common source of error and misunderstandings. An example is the expression: l= 3t",Electromagnetics_Vol2.pdf "opposed to “6371. ” Failure to do so is a common source of error and misunderstandings. An example is the expression: l= 3t where lis length and tis time. It could be that lis in Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "2 CHAPTER 1. PRELIMINAR Y CONCEPTS meters and tis in seconds, in which case “3” really means “3 m/s. ” However, if it is intended that lis in kilometers and tis in hours, then “3” really means “3 km/h, ” and the equation is literally different. T o patch this up, one might write “l = 3t m/s”; however, note that this does not resolve the ambiguity we just identified – i.e., we still don’t know the units of the constant “3. ” Alternatively , one might write “l = 3t where lis in meters and tis in seconds, ” which is unambiguous but becomes quite awkward for more complicated expressions. A better solution is to write instead: l= (3 m/s) t or even better: l= at where a= 3 m/s since this separates the issue of units from the perhaps more-important fact that lis proportional to tand the constant of proportionality (a) is known. The meter is the fundamental unit of length in the International System of Units, known by its French acronym “SI” and sometimes informally referred to",Electromagnetics_Vol2.pdf "International System of Units, known by its French acronym “SI” and sometimes informally referred to as the “metric system. ” In this work, we will use SI units exclusively . Although SI is probably the most popular for engineering use overall, other systems remain in common use. For example, the English system, where the radius of the Earth might alternatively be said to be about 3959 miles, continues to be used in various applications and to a lesser or greater extent in various regions of the world. An alternative system in common use in physics and material science applications is the CGS (“centimeter-gram-second”) system. The CGS system is similar to SI, but with some significant differences. For example, the base unit of energy in the CGS system is not the “joule” but rather the “erg, ” and the values of some physical constants become unitless. Therefore – once again – it is very important to include units whenever values are stated.",Electromagnetics_Vol2.pdf "constants become unitless. Therefore – once again – it is very important to include units whenever values are stated. SI defines seven fundamental units from which all other units can be derived. These fundamental units are distance in meters (m), time in seconds (s), current in amperes (A), mass in kilograms (kg), temperature in kelvin (K), particle count in moles (mol), and luminosity in candela (cd). SI units for electromagnetic quantities such as coulombs (C) for charge and volts (V) for electric potential are derived from these fundamental units. A frequently-overlooked feature of units is their ability to assist in error-checking mathematical expressions. For example, the electric field intensity may be specified in volts per meter (V/m), so an expression for the electric field intensity that yields units of V/m is said to be “dimensionally correct” (but not necessarily correct), whereas an expression that cannot be reduced to units of V/m cannot be correct. Additional Reading:",Electromagnetics_Vol2.pdf "not necessarily correct), whereas an expression that cannot be reduced to units of V/m cannot be correct. Additional Reading: • “International System of Units” on Wikipedia. • “Centimetre-gram-second system of units” on Wikipedia.",Electromagnetics_Vol2.pdf "1.2. NOT A TION 3 1.2 Notation [m0005] The list below describes notation used in this book. • V ector s: Boldface is used to indicate a vector; e.g., the electric field intensity vector will typically appear as E. Quantities not in boldface are scalars. When writing by hand, it is common to write “ E” or “ − →E” in lieu of “E. ” • Unit vectors: A circumflex is used to indicate a unit vector; i.e., a vector having magnitude equal to one. For example, the unit vector pointing in the +xdirection will be indicated as ˆx. In discussion, the quantity “ ˆx” is typically spoken “x hat. ” • Time: The symbol tis used to indicate time. • P osition: The symbols (x,y,z ), (ρ,φ,z ), and (r,θ,φ ) indicate positions using the Cartesian, cylindrical, and spherical coordinate systems, respectively . It is sometimes convenient to express position in a manner which is independent of a coordinate system; in this case, we typically use the symbol r. For example, r = ˆxx+ ˆyy+ ˆzzin the Cartesian coordinate",Electromagnetics_Vol2.pdf "independent of a coordinate system; in this case, we typically use the symbol r. For example, r = ˆxx+ ˆyy+ ˆzzin the Cartesian coordinate system. • Phasors: A tilde is used to indicate a phasor quantity; e.g., a voltage phasor might be indicated as ˜V, and the phasor representation of E will be indicated as ˜E. • Curves, surfaces, and volumes: These geometrical entities will usually be indicated in script; e.g., an open surface might be indicated as S and the curve bounding this surface might be indicated as C. Similarly , the volume enclosed by a closed surface S may be indicated as V. • Integrations over curves, surfaces, and volumes will usually be indicated using a single integral sign with the appropriate subscript. For example: ∫ C · · · dl is an integral over the curve C ∫ S · · · ds is an integral over the surface S ∫ V · · · dv is an integral over the volume V. • Integrations over closed curves and surfaces will be indicated using a circle superimposed on the",Electromagnetics_Vol2.pdf "∫ V · · · dv is an integral over the volume V. • Integrations over closed curves and surfaces will be indicated using a circle superimposed on the integral sign. For example: ∮ C · · · dl is an integral over the closed curve C ∮ S ··· ds is an integral over the closed surface S A “closed curve” is one which forms an unbroken loop; e.g., a circle. A “closed surface” is one which encloses a volume with no openings; e.g., a sphere. • The symbol “ ∼=” means “approximately equal to. ” This symbol is used when equality exists, but is not being expressed with exact numerical precision. For example, the ratio of the circumference of a circle to its diameter is π, where π∼= 3.14. • The symbol “≈ ” also indicates “approximately equal to, ” but in this case the two quantities are unequal even if expressed with exact numerical precision. For example, ex = 1 + x+ x2/2 + ... as an infinite series, but ex ≈ 1 + xfor x≪ 1. Using this approximation, e0.1 ≈ 1.1, which is",Electromagnetics_Vol2.pdf "precision. For example, ex = 1 + x+ x2/2 + ... as an infinite series, but ex ≈ 1 + xfor x≪ 1. Using this approximation, e0.1 ≈ 1.1, which is in good agreement with the actual value e0.1 ∼= 1.1052. • The symbol “∼ ” indicates “on the order of, ” which is a relatively weak statement of equality indicating that the indicated quantity is within a factor of 10 or so of the indicated value. For example, µ∼ 105 for a class of iron alloys, with exact values being larger or smaller by a factor of 5 or so. • The symbol “≜ ” means “is defined as” or “is equal as the result of a definition. ” • Complex numbers: j ≜ √ −1. • See Appendix C for notation used to identify commonly-used physical constants.",Electromagnetics_Vol2.pdf "4 CHAPTER 1. PRELIMINAR Y CONCEPTS 1.3 Coordinate Systems [m0180] The coordinate systems most commonly used in engineering analysis are the Cartesian, cylindrical, and spherical systems. These systems are illustrated in Figures 1.1, 1.2, and 1.3, respectively . Note that the use of variables is not universal; in particular, it is common to encounter the use of rin lieu of ρfor the radial coordinate in the cylindrical system, and the use of Rin lieu of rfor the radial coordinate in the spherical system. Additional Reading: • “Cylindrical coordinate system” on Wikipedia. • “Spherical coordinate system” on Wikipedia. y x z y x z c⃝ K. Kikkeri CC BY SA 4.0 Figure 1.1: Cartesian coordinate system. y x ϕ z ρ ϕ z ρ z c⃝ K. Kikkeri CC BY SA 4.0 Figure 1.2: Cylindrical coordinate system. y x ϕz r θθ ϕ r c⃝ K. Kikkeri CC BY SA 4.0 Figure 1.3: Spherical coordinate system.",Electromagnetics_Vol2.pdf "1.4. ELECTROMAGNETIC FIELD THEOR Y : A REVIEW 5 1.4 Electromagnetic Field Theory: A Review [m0179] This book is the second in a series of textbooks on electromagnetics. This section presents a summary of electromagnetic field theory concepts presented in the previous volume. Electric charge and current. Charge is the ultimate source of the electric field and has SI base units of coulomb (C). An important source of charge is the electron, whose charge is defined to be negative. However, the term “charge” generally refers to a large number of charge carriers of various types, and whose relative net charge may be either positive or negative. Distributions of charge may alternatively be expressed in terms of line charge density ρl (C/m), surface charge density ρs (C/m2), or volume charge density ρv (C/m3). Electric current describes the net motion of charge. Current is expressed in SI base units of amperes (A) and may alternatively be quantified in terms of surface current density Js",Electromagnetics_Vol2.pdf "motion of charge. Current is expressed in SI base units of amperes (A) and may alternatively be quantified in terms of surface current density Js (A/m) or volume current density J (A/m2). Electrostatics. Electrostatics is the theory of the electric field subject to the constraint that charge does not accelerate. That is, charges may be motionless (“static”) or move without acceleration (“steady current”). The electric field may be interpreted in terms of energy or flux. The energy interpretation of the electric field is referred to as electric field intensity E (SI base units of N/C or V/m), and is related to the energy associated with charge and forces between charges. One finds that the electric potential (SI base units of V) over a path C is given by V = − ∫ C E · dl (1.1) The principle of independence of path means that only the endpoints of C in Equation 1.1, and no other details of C, matter. This leads to the finding that the electrostatic field is conservative; i.e., ∮ C",Electromagnetics_Vol2.pdf "details of C, matter. This leads to the finding that the electrostatic field is conservative; i.e., ∮ C E · dl = 0 (1.2) This is referred to as Kirchoff ’s voltage law for electrostatics. The inverse of Equation 1.1 is E = −∇V (1.3) That is, the electric field intensity points in the direction in which the potential is most rapidly decreasing, and the magnitude is equal to the rate of change in that direction. The flux interpretation of the electric field is referred to as electric flux density D (SI base units of C/m 2), and quantifies the effect of charge as a flow emanating from the charge. Gauss’ law for electric fields states that the electric flux through a closed surface is equal to the enclosed charge Qencl; i.e., ∮ S D · ds = Qencl (1.4) Within a material region, we find D = ǫE (1.5) where ǫis the permittivity (SI base units of F/m) of the material. In free space, ǫis equal to ǫ0 ≜ 8.854 × 10−12 F/m (1.6) It is often convenient to quantify the permittivity of",Electromagnetics_Vol2.pdf "the material. In free space, ǫis equal to ǫ0 ≜ 8.854 × 10−12 F/m (1.6) It is often convenient to quantify the permittivity of material in terms of the unitless relative permittivity ǫr ≜ ǫ/ǫ0. Both E and D are useful as they lead to distinct and independent boundary conditions at the boundary between dissimilar material regions. Let us refer to these regions as Regions 1 and 2, having fields (E1,D1) and (E2,D2), respectively . Given a vector ˆn perpendicular to the boundary and pointing into Region 1, we find ˆn × [E1 − E2] = 0 (1.7) i.e., the tangential component of the electric field is continuous across a boundary , and ˆn · [D1 − D2] = ρs (1.8) i.e., any discontinuity in the normal component of the electric field must be supported by a surface charge distribution on the boundary .",Electromagnetics_Vol2.pdf "6 CHAPTER 1. PRELIMINAR Y CONCEPTS Magnetostatics. Magnetostatics is the theory of the magnetic field in response to steady current or the intrinsic magnetization of materials. Intrinsic magnetization is a property of some materials, including permanent magnets and magnetizable materials. Like the electric field, the magnetic field may be quantified in terms of energy or flux. The flux interpretation of the magnetic field is referred to as magnetic flux density B (SI base units of Wb/m 2), and quantifies the field as a flow associated with, but not emanating from, the source of the field. The magnetic flux Φ (SI base units of Wb) is this flow measured through a specified surface. Gauss’ law for magnetic fields states that ∮ S B · ds = 0 (1.9) i.e., the magnetic flux through a closed surface is zero. Comparison to Equation 1.4 leads to the conclusion that the source of the magnetic field cannot be localized; i.e., there is no “magnetic charge” analogous to electric charge. Equation 1.9",Electromagnetics_Vol2.pdf "conclusion that the source of the magnetic field cannot be localized; i.e., there is no “magnetic charge” analogous to electric charge. Equation 1.9 also leads to the conclusion that magnetic field lines form closed loops. The energy interpretation of the magnetic field is referred to as magnetic field intensity H (SI base units of A/m), and is related to the energy associated with sources of the magnetic field. Ampere’s law for magnetostatics states that ∮ C H · dl = Iencl (1.10) where Iencl is the current flowing past any open surface bounded by C. Within a homogeneous material region, we find B = µH (1.11) where µis the permeability (SI base units of H/m) of the material. In free space, µis equal to µ0 ≜ 4π× 10−7 H/m. (1.12) It is often convenient to quantify the permeability of material in terms of the unitless relative permeability µr ≜ µ/µ0. Both B and H are useful as they lead to distinct and independent boundary conditions at the boundaries",Electromagnetics_Vol2.pdf "µr ≜ µ/µ0. Both B and H are useful as they lead to distinct and independent boundary conditions at the boundaries between dissimilar material regions. Let us refer to these regions as Regions 1 and 2, having fields (B1,H1) and (B2,H2), respectively . Given a vector ˆn perpendicular to the boundary and pointing into Region 1, we find ˆn · [B1 − B2] = 0 (1.13) i.e., the normal component of the magnetic field is continuous across a boundary , and ˆn × [H1 − H2] = Js (1.14) i.e., any discontinuity in the tangential component of the magnetic field must be supported by current on the boundary . Maxwell’s equations. Equations 1.2, 1.4, 1.9, and 1.10 are Maxwell’s equations for static fields in integral form. As indicated in T able 1.3, these equations may alternatively be expressed in differential form. The principal advantage of the differential forms is that they apply at each point in space (as opposed to regions defined by C or S), and subsequently can be combined with the boundary",Electromagnetics_Vol2.pdf "space (as opposed to regions defined by C or S), and subsequently can be combined with the boundary conditions to solve complex problems using standard methods from the theory of differential equations. Conductivity . Some materials consist of an abundance of electrons which are loosely-bound to the atoms and molecules comprising the material. The force exerted on these electrons by an electric field may be sufficient to overcome the binding force, resulting in motion of the associated charges and subsequently current. This effect is quantified by Ohm’s law for electromagnetics: J = σE (1.15) where J in this case is the conduction current determined by the conductivity σ(SI base units of S/m). Conductivity is a property of a material that ranges from negligible (i.e., for “insulators”) to very large for good conductors, which includes most metals. A perfect conductor is a material within which E is essentially zero regardless of J. For such material,",Electromagnetics_Vol2.pdf "metals. A perfect conductor is a material within which E is essentially zero regardless of J. For such material, σ→ ∞. Perfect conductors are said to be equipotential regions; that is, the potential difference",Electromagnetics_Vol2.pdf "1.4. ELECTROMAGNETIC FIELD THEOR Y : A REVIEW 7 Electrostatics / Time-V arying Magnetostatics (Dynamic) Electric & magnetic independent possibly coupled fields are... Maxwell’s eqns. ∮ S D · ds = Qenc l ∮ S D · ds = Qencl (integral) ∮ C E · dl = 0 ∮ C E · dl = − ∂ ∂t ∫ S B · ds∮ S B · ds = 0 ∮ S B · d s = 0∮ C H · dl = Iencl ∮ C H · dl = Iencl+ ∫ S ∂ ∂tD · ds Maxwell’s eqns. ∇ · D = ρv ∇ · D = ρv (differential) ∇ × E = 0 ∇ × E = − ∂ ∂tB ∇ · B = 0 ∇ · B = 0 ∇ × H = J ∇ × H = J+ ∂ ∂tD T able 1.3: Comparison of Maxwell’s equations for static and time-v arying electromagnetic fields. Differences in the time-varying case relative to the static case are highlighted in blue. between any two points within a perfect conductor is zero, as can be readily verified using Equation 1.1. Time-varying fields. F araday’s law states that a time-varying magnetic flux induces an electric potential in a closed loop as follows: V = − ∂ ∂tΦ (1.16) Setting this equal to the left side of Equation 1.2 leads",Electromagnetics_Vol2.pdf "potential in a closed loop as follows: V = − ∂ ∂tΦ (1.16) Setting this equal to the left side of Equation 1.2 leads to the Maxwell-F araday equation in integral form: ∮ C E · dl = − ∂ ∂t ∫ S B · ds (1.17) where C is the closed path defined by the edge of the open surface S. Thus, we see that a time-varying magnetic flux is able to generate an electric field. W e also observe that electric and magnetic fields become coupled when the magnetic flux is time-varying. An analogous finding leads to the general form of Ampere’s law: ∮ C H · dl = Iencl + ∫ S ∂ ∂tD · ds (1.18) where the new term is referred to as displacement current. Through the displacement current, a time-varying electric flux may be a source of the magnetic field. In other words, we see that the electric and magnetic fields are coupled when the electric flux is time-varying. Gauss’ law for electric and magnetic fields, boundary conditions, and constitutive relationships (Equations 1.5, 1.11, and 1.15) are the same in the",Electromagnetics_Vol2.pdf "Gauss’ law for electric and magnetic fields, boundary conditions, and constitutive relationships (Equations 1.5, 1.11, and 1.15) are the same in the time-varying case. As indicated in T able 1.3, the time-varying version of Maxwell’s equations may also be expressed in differential form. The differential forms make clear that variations in the electric field with respect to position are associated with variations in the magnetic field with respect to time (the Maxwell-Faraday equation), and vice-versa (Ampere’s law). Time-harmonic waves in source-free and lossless media. The coupling between electric and magnetic fields in the time-varying case leads to wave phenomena. This is most easily analyzed for fields which vary sinusoidally , and may thereby be expressed as phasors. 1 Phasors, indicated in this book by the tilde (“ ˜”), are complex-valued quantities representing the magnitude and phase of the associated sinusoidal waveform. Maxwell’s equations in differential phasor form are:",Electromagnetics_Vol2.pdf "quantities representing the magnitude and phase of the associated sinusoidal waveform. Maxwell’s equations in differential phasor form are: ∇ · ˜D = ˜ρv (1.19) ∇ × ˜E = −jω˜B (1.20) ∇ · ˜B = 0 (1.21) ∇ × ˜H = ˜J + jω˜D (1.22) where ω≜ 2πf, and where f is frequency (SI base 1 Sinus oidally-varying fields are sometimes also said to be time- harmonic.",Electromagnetics_Vol2.pdf "8 CHAPTER 1. PRELIMINAR Y CONCEPTS units of Hz). In regions which are free of sources (i.e., charges and currents) and consisting of loss-free media (i.e., σ= 0), these equations reduce to the following: ∇ · ˜E = 0 (1.23) ∇ × ˜E = −jωµ˜H (1.24) ∇ · ˜H = 0 (1.25) ∇ × ˜H = + jωǫ˜E (1.26) where we have used the relationships D = ǫE and B = µH to eliminate the flux densities D and B, which are now redundant. Solving Equations 1.23–1.26 for E and H, we obtain the vector wave equations: ∇2 ˜E + β2 ˜E = 0 (1.27) ∇2 ˜H + β2 ˜H = 0 (1.28) where β ≜ ω√ µǫ (1.29) W aves in source-free and lossless media are solutions to the vector wave equations. Uniform plane waves in source-free and lossless media. An important subset of solutions to the vector wave equations are uniform plane waves. Uniform plane waves result when solutions are constrained to exhibit constant magnitude and phase in a plane. For example, if this plane is specified to be perpendicular",Electromagnetics_Vol2.pdf "exhibit constant magnitude and phase in a plane. For example, if this plane is specified to be perpendicular to z(i.e., ∂/∂x = ∂/∂y = 0) then solutions for ˜E have the form: ˜E = ˆx ˜Ex + ˆy ˜Ey (1.30) where ˜Ex = E+ x0e−jβz + E− x0e+jβz (1.31) ˜Ey = E+ y0e−jβz + E− y0e+jβz (1.32) and where E+ x0, E− x0, E+ y0, and E− y0 are constant complex-valued coefficients which depend on sources and boundary conditions. The first term and second terms of Equations 1.31 and 1.32 correspond to waves traveling in the +ˆz and −ˆz directions, respectively . Because ˜H is a solution to the same vector wave equation, the solution for H is identical except with different coefficients. The scalar components of the plane waves described in Equations 1.31 and 1.32 exhibit the same characteristics as other types of waves, including sound waves and voltage and current waves in transmission lines. In particular, the phase velocity of waves propagating in the +ˆz and −ˆz direction is vp = ω β = 1√µǫ (1.33) and",Electromagnetics_Vol2.pdf "transmission lines. In particular, the phase velocity of waves propagating in the +ˆz and −ˆz direction is vp = ω β = 1√µǫ (1.33) and the wavelength is λ= 2π β (1.34) By requiring solutions for ˜E and ˜H to satisfy the Maxwell curl equations (i.e., the Maxwell-Faraday equation and Ampere’s law), we find that ˜E, ˜H, and the direction of propagation ˆk are mutually perpendicular. In particular, we obtain the plane wave relationships: ˜E = −ηˆk × ˜H (1.35) ˜H = 1 η ˆk × ˜E (1.36) where η≜ √ µ ǫ (1.37) is the wave impedance, also known as the intrinsic impedance of the medium, and ˆk is in the same direction as ˜E × ˜H. The power density associated with a plane wave is S = ⏐⏐ ⏐˜E ⏐ ⏐ ⏐ 2 2η (1.38) where Shas SI base units of W/m 2, and here it is assumed that ˜E is in peak (as opposed to rms) units. Commonly-assumed properties of materials. Finally , a reminder about commonly-assumed properties of the material constitutive parameters ǫ, µ,",Electromagnetics_Vol2.pdf "Commonly-assumed properties of materials. Finally , a reminder about commonly-assumed properties of the material constitutive parameters ǫ, µ, and σ. W e often assume these parameters exhibit the following properties: • Homogeneity. A material that is homogeneous is uniform over the space it occupies; that is, the values of its constitutive parameters are constant at all locations within the material.",Electromagnetics_Vol2.pdf "1.4. ELECTROMAGNETIC FIELD THEOR Y : A REVIEW 9 • Isotropy. A material that is isotropic behaves in precisely the same way regardless of how it is oriented with respect to sources, fields, and other materials. • Linearity. A material is said to be linear if its properties do not depend on the sources and fields applied to the material. Linear media exhibit superposition; that is, the response to multiple sources is equal to the sum of the responses to the sources individually . • Time-invariance. A material is said to be time-invariant if its properties do not vary as a function of time. Additional Reading: • “Maxwell’s Equations” on Wikipedia. • “W ave Equation” on Wikipedia. • “Electromagnetic W ave Equation” on Wikipedia. • “Electromagnetic radiation” on Wikipedia. [m0181]",Electromagnetics_Vol2.pdf "10 CHAPTER 1. PRELIMINAR Y CONCEPTS Image Credits Fig. 1.1: c⃝ K. Kikkeri, https://commons.wikimedia.org/wiki/File:M0006 fCartesianBasis.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 1.2: c⃝ K. Kikkeri, https://commons.wikimedia.org/wiki/File:M0096 fCylindricalCoordinates.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 1.3: c⃝ K. Kikkeri, https://commons.wikimedia.org/wiki/File:Spherical Coordinate System.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "Chapter 2 Magnetostatics Redux 2.1 Lorentz Force [m0015] The Lorentz force is the force experienced by charge in the presence of electric and magnetic fields. Consider a particle having charge q. The force Fe experienced by the particle in the presence of electric field intensity E is Fe = qE The force Fm experienced by the particle in the presence of magnetic flux density B is Fm = qv × B where v is the velocity of the particle. The Lorentz force experienced by the particle is simply the sum of these forces; i.e., F = Fe + Fm = q(E + v × B) (2.1) The term “Lorentz force” is simply a concise way to refer to the combined contributions of the electric and magnetic fields. A common application of the Lorentz force concept is in analysis of the motions of charged particles in electromagnetic fields. The Lorentz force causes charged particles to exhibit distinct rotational (“cyclotron”) and translational (“drift”) motions. This is illustrated in Figures 2.1 and 2.2. Additional Reading:",Electromagnetics_Vol2.pdf "(“cyclotron”) and translational (“drift”) motions. This is illustrated in Figures 2.1 and 2.2. Additional Reading: • “Lorentz force” on Wikipedia. c⃝ St annered CC BY 2.5. Figure 2.1: Motion of a particle bearing (left ) posi- tive charge and (right ) negative charge. T op: Magnetic field directed toward the viewer; no electric field. Bot- tom: Magnetic field directed toward the viewer; elec- tric field oriented as shown. Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "12 CHAPTER 2. MAGNETOST A TICS REDUX c⃝ M. Biaek CC BY -SA 4.0. Figure 2.2: Electrons moving in a circle in a magnetic field (cyclotron motion). The electrons are produced by an electron gun at bottom, consisting of a hot cath- ode, a metal plate heated by a filament so it emits elec- trons, and a metal anode at a high voltage with a hole which accelerates the electrons into a beam. The elec- trons are normally invisible, but enough air has been left in the tube so that the air molecules glow pink when struck by the fast-moving electrons. 2.2 Magnetic Force on a Current-Carrying Wire [m0017] Consider an infinitesimally-thin and perfectly-conducting wire bearing a current I (SI base units of A) in free space. Let B (r) be the impressed magnetic flux density at each point r in the region of space occupied by the wire. By impressed, we mean that the field exists in the absence of the current-carrying wire, as opposed to the field that is induced by this current. Since current consists of",Electromagnetics_Vol2.pdf "that the field exists in the absence of the current-carrying wire, as opposed to the field that is induced by this current. Since current consists of charged particles in motion, we expect that B(r) will exert a force on the current. Since the current is constrained to flow on the wire, we expect this force will also be experienced by the wire. Let us now consider this force. T o begin, recall that the force exerted on a particle bearing charge qhaving velocity v is Fm(r) = qv (r) × B (r) (2.2) Thus, the force exerted on a differential amount of charge dqis dFm(r) = dqv (r) × B (r) (2.3) Let dl (r) represent a differential-length segment of the wire at r, pointing in the direction of current flow . Then dqv (r) = Idl (r) (2.4) (If this is not clear, it might help to consider the units: On the left, C·m/s = (C/s)·m = A·m, as on the right.) Subsequently , dFm(r) = Idl (r) × B (r) (2.5) There are three important cases of practical interest.",Electromagnetics_Vol2.pdf "Subsequently , dFm(r) = Idl (r) × B (r) (2.5) There are three important cases of practical interest. First, consider a straight segment l forming part of a closed loop of current in a spatially-uniform impressed magnetic flux density B (r) = B0. In this case, the force exerted by the magnetic field on such a segment is given by Equation 2.5 with dl replaced by l; i.e.: Fm = Il × B0 (2.6) Summarizing, The force experienced by a straight segment of current-carrying wire in a spatially-uniform mag- netic field is given by Equation 2.6. The second case of practical interest is a rigid closed loop of current in a spatially-uniform magnetic flux density B0. If the loop consists of straight sides – e.g., a rectangular loop – then the force applied to the loop is the sum of the forces applied to each side separately , as determined by Equation 2.6. However, we wish to consider loops of arbitrary shape. T o accommodate arbitrarily-shaped loops, let C be the",Electromagnetics_Vol2.pdf "we wish to consider loops of arbitrary shape. T o accommodate arbitrarily-shaped loops, let C be the path through space occupied by the loop. Then the force experienced by the loop is F = ∫ C dFm(r) = ∫ C Idl (r) × B0 (2.7) Since I and B0 are constants, they may be extracted from the integral: F = I [ ∫ C dl (r) ] × B0 (2.8) Note the quantity in square brackets is zero. Therefore:",Electromagnetics_Vol2.pdf "2.2. MAGNETIC FORCE ON A CURRENT -CARR YING WIRE 13 The net force on a current-carrying loop of wire in a uniform magnetic field is zero. Note that this does not preclude the possibility that the rigid loop rotates; for example, the force on opposite sides of the loop may be equal and opposite. What we have found is merely that the force will not lead to a translational net force on the loop; e.g., force that would propel the loop away from its current position in space. The possibility of rotation without translation leads to the most rudimentary concept for an electric motor. Practical electric motors use variations on essentially this same idea; see “ Additional Reading” for more information. The third case of practical interest is the force experienced by two parallel infinitesimally-thin wires in free space, as shown in Figure 2.3. Here the wires are infinite in length (we’ll return to that in a moment), lie in the x= 0 plane, are separated by",Electromagnetics_Vol2.pdf "are infinite in length (we’ll return to that in a moment), lie in the x= 0 plane, are separated by distance d, and carry currents I1 and I2, respectively . The current in wire 1 gives rise to a magnetic flux density B1. The force exerted on wire 2 by B1 is: F2 = ∫ C [I2dl (r) × B1 (r)] (2.9) where C is the path followed by I2, and dl (r) = ˆzdz. A simple way to determine B1 in this situation is as follows. First, if wire 1 had been aligned along the x= y= 0 line, then the magnetic flux density everywhere would be ˆφµ0I1 2πρ In the present problem, wire 1 is displaced by d/2 in the −ˆy direction. Although this would seem to make the new expression more complicated, note that the only positions where values of B1 (r) are required are those corresponding to C; i.e., points on wire 2. For these points, B1 (r) = −ˆxµ0I1 2πd along C (2.10) That is, the relevant distance is d(not ρ), and the direction of B1 (r) for points along C is −ˆx (not ˆφ). Returning to Equation 2.9, we obtain: F2 = ∫ C [",Electromagnetics_Vol2.pdf "direction of B1 (r) for points along C is −ˆx (not ˆφ). Returning to Equation 2.9, we obtain: F2 = ∫ C [ I2 ˆzdz× ( −ˆxµ0I1 2πd )] = −ˆy µ0I1I2 2πd ∫ C dz (2.11) The remaining integral is simply the length of wire 2 that we wish to consider. Infinitely-long wires will therefore result in infinite force. This is not a very interesting or useful result. However, the force per unit length of wire is finite, and is obtained simply by dropping the integral in the previous equation. W e obtain: F2 ∆l = −ˆy µ0I1I2 2πd (2.12) where ∆ lis the length of the section of wire 2 being considered. Note that when the currents I1 and I2 flow in the same direction (i.e., have the same sign), the magnetic force exerted by the current on wire 1 pulls wire 2 toward wire 1. The same process can be used to determine the magnetic force F1 exerted by the current in wire 1 on wire 2. The result is F1 ∆l = + ˆy µ0I1I2 2πd (2.13) c⃝ Y. Zhao CC BY -SA 4.0 Figure 2.3: Parallel current-carrying wires.",Electromagnetics_Vol2.pdf "14 CHAPTER 2. MAGNETOST A TICS REDUX When the currents I1 and I2 flow in the same direction (i.e., when the product I1I2 is positive), then the magnetic force exerted by the current on wire 2 pulls wire 1 toward wire 2. W e are now able to summarize the results as follows: If currents in parallel wires flow in the same di- rection, then the wires attract; whereas if the cur- rents flow in opposite directions, then the wires repel. Also: The magnitude of the associated force is µ0I1I2/2πdfor wires separated by distance din non-magnetic media. If the wires are fixed in position and not able to move, these forces represent stored (potential) energy . It is worth noting that this is precisely the energy which is stored by an inductor – for example, the two wire segments here might be interpreted as segments in adjacent windings of a coil-shaped inductor. Example 2.1. DC power cable. A power cable connects a 12 V battery to a load exhibiting an impedance of 10 Ω. The",Electromagnetics_Vol2.pdf "Example 2.1. DC power cable. A power cable connects a 12 V battery to a load exhibiting an impedance of 10 Ω. The conductors are separated by 3 mm by a plastic insulating jacket. Estimate the force between the conductors. Solution. The current flowing in each conductor is 12 V divided by 10 Ω, which is 1.2 A. In terms of the theory developed in this section, a current I1 = +1.2 A flows from the positive terminal of the battery to the load on one conductor, and a current I2 = −1.2 A returns to the battery on the other conductor. The change in sign indicates that the currents at any given distance from the battery are flowing in opposite directions. Also from the problem statement, d= 3 mm and the insulator is presumably non-magnetic. Assuming the conductors are approximately straight, the force between conductors is ≈ µ0I1I2 2πd ∼= −96 .0 µN with the negative sign indicating that the wires repel. Note in the above example that this force is quite",Electromagnetics_Vol2.pdf "≈ µ0I1I2 2πd ∼= −96 .0 µN with the negative sign indicating that the wires repel. Note in the above example that this force is quite small, which explains why it is not always observed. However, this force becomes significant when the current is large or when many sets of conductors are mechanically bound together (amounting to a larger net current), as in a motor. Additional Reading: • “Electric motor” on Wikipedia.",Electromagnetics_Vol2.pdf "2.3. TORQUE INDUCED BY A MAGNETIC FIELD 15 2.3 T orque Induced by a Magnetic Field [m0024] A magnetic field exerts a force on current. This force is exerted in a direction perpendicular to the direction of current flow . For this reason, current-carrying structures in a magnetic field tend to rotate. A convenient description of force associated with rotational motion is torque. In this section, we define torque and apply this concept to a closed loop of current. These concepts apply to a wide range of practical devices, including electric motors. Figure 2.4 illustrates the concept of torque. T orque depends on the following: • A local origin r0, • A point r which is connected to r0 by a perfectly-rigid mechanical structure, and • The force F applied at r. In terms of these parameters, the torque T is: T ≜ d × F (2.14) where the lever arm d ≜ r − r0 gives the location of r relative to r0. Note that T is a position-free vector c⃝ C. W ang CC BY -SA 4.0",Electromagnetics_Vol2.pdf "where the lever arm d ≜ r − r0 gives the location of r relative to r0. Note that T is a position-free vector c⃝ C. W ang CC BY -SA 4.0 Figure 2.4: T orque associated with a single lever arm. which points in a direction perpendicular to both d and F. Note that T does not point in the direction of rotation. Nevertheless, T indicates the direction of rotation through a “right hand rule”: If you point the thumb of your right hand in the direction of T, then the curled fingers of your right hand will point in the direction of torque-induced rotation. Whether rotation actually occurs depends on the geometry of the structure. For example, if T aligns with the axis of a perfectly-rigid mechanical shaft, then all of the work done by F will be applied to rotation of the shaft on this axis. Otherwise, torque will tend to rotate the shaft in other directions as well. If the shaft is not free to rotate in these other directions, then the effective torque – that is, the",Electromagnetics_Vol2.pdf "If the shaft is not free to rotate in these other directions, then the effective torque – that is, the torque that contributes to rotation of the shaft – is reduced. The magnitude of T has SI base units of N·m and quantifies the energy associated with the rotational force. As you might expect, the magnitude of the torque increases with increasing lever arm magnitude |d|. In other words, the torque resulting from a constant applied force increases with the length of the lever arm. T orque, like the translational force F, satisfies superposition. That is, the torque resulting from forces applied to multiple rigidly-connected lever arms is the sum of the torques applied to the lever arms individually . Now consider the current loop shown in Figure 2.5. The loop is perfectly rigid and is rigidly attached to a non-conducting shaft. The assembly consisting of the loop and the shaft may rotate without friction around the axis of the shaft. The loop consists of four straight",Electromagnetics_Vol2.pdf "loop and the shaft may rotate without friction around the axis of the shaft. The loop consists of four straight segments that are perfectly-conducting and infinitesimally-thin. A spatially-uniform and static impressed magnetic flux density B0 = ˆxB0 exists throughout the domain of the problem. (Recall that an impressed field is one that exists in the absence of any other structure in the problem.) What motion, if any , is expected? Recall that the net translational force on a current loop in a spatially-uniform and static magnetic field is",Electromagnetics_Vol2.pdf "16 CHAPTER 2. MAGNETOST A TICS REDUX zero (Section 2.2). However, this does not preclude the possibility of different translational forces acting on each of the loop segments resulting in a rotation of the shaft. Let us first calculate these forces. The force FA on segment A is FA = IlA × B0 (2.15) where lA is a vector whose magnitude is equal to the length of the segment and which points in the direction of the current. Thus, FA = I(ˆzL) × (ˆxB0) = ˆyILB0 (2.16) Similarly , the force FC on segment C is FC = I(−ˆzL) × (ˆxB0) = −ˆyILB0 (2.17) The forces FB and FD on segments B and D, respectively , are: FB = I(−ˆxL) × (ˆxB0) = 0 (2.18) and FD = I(+ˆxL) × (ˆxB0) = 0 (2.19) Thus, the force exerted on the current loop by the impressed magnetic field will lead to rotation in the + ˆφdirection. z x A B C D L W I B0= x̂B0 current source wir e loop non-conducting shaft c⃝ C. W ang CC BY -SA 4.0 Figure 2.5: A rudimentary electric motor consisting of a single current loop.",Electromagnetics_Vol2.pdf "source wir e loop non-conducting shaft c⃝ C. W ang CC BY -SA 4.0 Figure 2.5: A rudimentary electric motor consisting of a single current loop. W e calculate the associated torque T as T = TA + TB + TC + TD (2.20) where TA, TB, TC, and TD are the torques associated with segments A, B, C, and D, respectively . For example, the torque associated with segment A is TA = W 2 ˆx × FA = ˆzLW 2 IB0 (2.21) Similarly , TB = 0 since FB = 0 (2.22) TC = ˆzLW 2 IB0 (2.23) TD = 0 since FD = 0 (2.24) Summing these contributions, we find T = ˆzLWIB0 (2.25) Note that T points in the +ˆz direction, indicating rotational force exerted in the + ˆφdirection, as expected. Also note that the torque is proportional to the area LW of the loop, is proportional to the current I, and is proportional to the magnetic field magnitude B0. The analysis that we just completed was static; that is, it applies only at the instant depicted in Figure 2.5. If the shaft is allowed to turn without friction, then the",Electromagnetics_Vol2.pdf "it applies only at the instant depicted in Figure 2.5. If the shaft is allowed to turn without friction, then the loop will rotate in the + ˆφdirection. So, what will happen to the forces and torque? First, note that FA and FC are always in the +ˆy and −ˆy directions, respectively , regardless of the rotation of the loop. Once the loop rotates away from the position shown in Figure 2.5, the forces FB and FD become non-zero; however, they are always equal and opposite, and so do not affect the rotation. Thus, the loop will rotate one-quarter turn and then come to rest, perhaps with some damped oscillation around the rest position depending on the momentum of the loop. At the rest position, the lever arms for segments A and C are pointing in the same directions as FA and FC, respectively . Therefore, the cross product of the lever arm and translational force for each segment is zero and subsequently TA = TC = 0. Once stopped in this position, both",Electromagnetics_Vol2.pdf "product of the lever arm and translational force for each segment is zero and subsequently TA = TC = 0. Once stopped in this position, both the net translational force and the net torque are zero.",Electromagnetics_Vol2.pdf "2.3. TORQUE INDUCED BY A MAGNETIC FIELD 17 c⃝ Ab normaal CC BY -SA 3.0 Figure 2.6: This DC electric motor uses brushes (here, the motionless leads labeled “+ ” and “− ”) combined with the motion of the shaft to periodically alternate the direction of current between two coils, thereby cre- ating nearly constant torque. If such a device is to be used as a motor, it is necessary to find a way to sustain the rotation. There are several ways in which this might be accomplished. First, one might make I variable in time. For example, the direction of I could be reversed as the loop passes the quarter-turn position. This reverses FA and FC, propelling the loop toward the half-turn position. The direction of I can be changed again as the loop passes half-turn position, propelling the loop toward the three-quarter-turn position. Continuing this periodic reversal of the current sustains the rotation. Alternatively , one may periodically reverse the direction of the impressed magnetic field to the",Electromagnetics_Vol2.pdf "rotation. Alternatively , one may periodically reverse the direction of the impressed magnetic field to the same effect. These methods can be combined or augmented using multiple current loops or multiple sets of time-varying impressed magnetic fields. Using an appropriate combination of current loops, magnetic fields, and waveforms for each, it is possible to achieve sustained torque throughout the rotation. An example is shown in Figure 2.6. Additional Reading: • “T orque” on Wikipedia. • “Electric motor” on Wikipedia.",Electromagnetics_Vol2.pdf "18 CHAPTER 2. MAGNETOST A TICS REDUX 2.4 The Biot-Savart Law [m0066] The Biot-Savart law (BSL) provides a method to calculate the magnetic field due to any distribution of steady (DC) current. In magnetostatics, the general solution to this problem employs Ampere’s law; i.e., ∫ C H · dl = Iencl (2.26) in integral form or ∇ × H = J (2.27) in differential form. The integral form is relatively simple when the problem exhibits a high degree of symmetry , facilitating a simple description in a particular coordinate system. An example is the magnetic field due to a straight and infinitely-long current filament, which is easily determined by solving the integral equation in cylindrical coordinates. However, many problems of practical interest do not exhibit the necessary symmetry . A commonly-encountered example is the magnetic field due to a single loop of current, which will be addressed in Example 2.2. For such problems, the differential form of Ampere’s law is needed.",Electromagnetics_Vol2.pdf "due to a single loop of current, which will be addressed in Example 2.2. For such problems, the differential form of Ampere’s law is needed. BSL is the solution to the differential form of Ampere’s law for a differential-length current element, illustrated in Figure 2.7. The current element is I dl, where I is the magnitude of the current (SI base units of A) and dl is a differential-length vector indicating the direction of the current at the “source point” r′. The resulting contribution to the magnetic field intensity at the “field point” r is dH(r) = I dl 1 4πR2 × ˆR (2.28) where R = ˆRR≜ r − r′ (2.29) In other words, R is the vector pointing from the source point to the field point, and dH at the field point is given by Equation 2.28. The magnetic field due to a current-carrying wire of any shape may be obtained by integrating over the length of the wire: H(r) = ∫ C dH(r) = I 4π ∫ C dl × ˆR R2 (2.30) In addition to obviating the need to solve a differential",Electromagnetics_Vol2.pdf "H(r) = ∫ C dH(r) = I 4π ∫ C dl × ˆR R2 (2.30) In addition to obviating the need to solve a differential equation, BSL provides some useful insight into the behavior of magnetic fields. In particular, Equation 2.28 indicates that magnetic fields follow the inverse square law – that is, the magnitude of the magnetic field due to a differential current element decreases in proportion to the inverse square of distance (R−2). Also, Equation 2.28 indicates that the direction of the magnetic field due to a differential current element is perpendicular to both the direction of current flow ˆl and the vector ˆR pointing from the source point to field point. This observation is quite useful in anticipating the direction of magnetic field vectors in complex problems. It may be helpful to note that BSL is analogous to Coulomb’s law for electric fields, which is a solution to the differential form of Gauss’ law , ∇ · D = ρv. However, BSL applies only under magnetostatic",Electromagnetics_Vol2.pdf "to the differential form of Gauss’ law , ∇ · D = ρv. However, BSL applies only under magnetostatic conditions. If the variation in currents or magnetic fields over time is significant, then the problem becomes significantly more complicated. See “Jefimenko’s Equations” in “ Additional Reading” for more information. Example 2.2. Magnetic field along the axis of a circular loop of current. Consider a ring of radius ain the z= 0 plane, centered on the origin, as shown in Figure 2.8. As indicated in the figure, the current I flows in R R d H(r) dl @r' I c⃝ C. W ang CC BY -SA 4.0 Figure 2.7: Use of the Biot-Savart law to calculate the magnetic field due to a line current.",Electromagnetics_Vol2.pdf "2.4. THE BIOT -SA V AR T LA W 19 the ˆφdirection. Find the magnetic field intensity along the zaxis. Solution. The source current position is given in cylindrical coordinates as r′ = ˆρa (2.31) The position of a field point along the zaxis is r = ˆzz (2.32) Thus, ˆRR≜ r − r′ = −ˆρa+ ˆzz (2.33) and R≜ |r − r′| = √ a2 + z2 (2.34) Equation 2.28 becomes: dH(ˆzz) = I ˆφadφ 4π[a2 + z2] × ˆzz− ˆρa√ a2 + z2 = Ia 4π ˆza− ˆρz [a2 + z2]3/ 2 dφ (2.35) No w integrating over the current: H(ˆzz) = ∫ 2π 0 Ia 4π ˆza− ˆρz [a2 + z2]3/ 2 dφ (2.36) = I a 4π[a2 + z2]3/ 2 ∫ 2π 0 (ˆza− ˆρz) dφ (2.37) = I a 4π[a2 + z2]3/ 2 ( ˆza ∫ 2π 0 dφ− z ∫ 2 π 0 ˆρdφ ) (2.38) The second integral is equal to zero. T o see this, note that the integral is simply summing values of ˆρfor all possible values of φ. Since ˆρ(φ+ π) = −ˆρ(φ), the integrand for any given value of φis equal and opposite the integrand π radians later. (This is one example of a symmetry argument.) c⃝ K. Kikkeri CC BY SA 4.0 (modified)",Electromagnetics_Vol2.pdf "value of φis equal and opposite the integrand π radians later. (This is one example of a symmetry argument.) c⃝ K. Kikkeri CC BY SA 4.0 (modified) Figure 2.8: Calculation of the magnetic field along the zaxis due to a circular loop of current centered in the z= 0 plane. The first integral in the previous equation is equal to 2π. Thus, we obtain H(ˆzz) = ˆz Ia2 2 [a2 + z2]3/ 2 (2.39) Note that the result is consistent with the associated “right hand rule” of magnetostatics: That is, the direction of the magnetic field is in the direction of the curled fingers of the right hand when the thumb of the right hand is aligned with the location and direction of current. It is a good exercise to confirm that this result is also dimensionally correct. Equation 2.28 extends straightforwardly to other distributions of current. For example, the magnetic field due to surface current Js (SI base units of A/m) can be calculated using Equation 2.28 with I dl replaced by Js ds",Electromagnetics_Vol2.pdf "field due to surface current Js (SI base units of A/m) can be calculated using Equation 2.28 with I dl replaced by Js ds where dsis the differential element of surface area. This can be confirmed by dimensional analysis: I dl has SI base units of A·m, as does JS ds. Similarly , the magnetic field due to volume current J (SI base units of A/m 2) can be calculated using Equation 2.28 with I dlreplaced by J dv where dvis the differential element of volume. For a single particle with charge q(SI base units of C) and",Electromagnetics_Vol2.pdf "20 CHAPTER 2. MAGNETOST A TICS REDUX velocity v (SI base units of m/s), the relevant quantity is qv since C·m/s = (C/s)·m = A·m. In all of these cases, Equation 2.28 applies with the appropriate replacement for I dl. Note that the quantities qv, I dl, JS ds, and J dv, all having the same units of A·m, seem to be referring to the same physical quantity . This physical quantity is known as current moment. Thus, the “input” to BSL can be interpreted as current moment, regardless of whether the current of interest is distributed as a line current, a surface current, a volumetric current, or simply as moving charged particles. See “ Additional Reading” at the end of this section for additional information on the concept of “moment” in classical physics. Additional Reading: • “Biot-Savart Law” on Wikipedia. • “Jefimenko’s Equations” on Wikipedia. • “Moment (physics)” on Wikipedia. 2.5 Force, Energy, and Potential Difference in a Magnetic Field [m0059] The force Fm experienced",Electromagnetics_Vol2.pdf "• “Moment (physics)” on Wikipedia. 2.5 Force, Energy, and Potential Difference in a Magnetic Field [m0059] The force Fm experienced by a particle at location r bearing charge qdue to a magnetic field is Fm = qv × B(r) (2.40) where v is the velocity (magnitude and direction) of the particle, and B(r) is the magnetic flux density at r. Now we must be careful: In this description, the motion of the particle is not due to Fm. In fact the cross product in Equation 2.40 clearly indicates that Fm and v must be in perpendicular directions. Instead, the reverse is true: i.e., it is the motion of the particle that is giving rise to the force. The motion described by v may be due to the presence of an electric field, or it may simply be that that charge is contained within a structure that is itself in motion. Nevertheless, the force Fm has an associated potential energy . Furthermore, this potential energy may change as the particle moves. This change in",Electromagnetics_Vol2.pdf "Nevertheless, the force Fm has an associated potential energy . Furthermore, this potential energy may change as the particle moves. This change in potential energy may give rise to an electrical potential difference (i.e., a “voltage”), as we shall now demonstrate. The change in potential energy can be quantified using the concept of work, W. The incremental work ∆W done by moving the particle a short distance ∆l , over which we assume the change in Fm is negligible, is ∆W ≈ Fm · ˆl∆l (2.41) where in this case ˆl is the unit vector in the direction of the motion; i.e., the direction of v. Note that the purpose of the dot product in Equation 2.41 is to ensure that only the component of Fm parallel to the direction of motion is included in the energy tally . Any component of v which is due to Fm (i.e., ultimately due to B) must be perpendicular to Fm, so ∆W for such a contribution must be, from Equation 2.41, equal to zero. In other words: In the",Electromagnetics_Vol2.pdf "ultimately due to B) must be perpendicular to Fm, so ∆W for such a contribution must be, from Equation 2.41, equal to zero. In other words: In the absence of a mechanical force or an electric field, the potential energy of a charged particle remains constant regardless of how it is moved by Fm. This surprising result may be summarized as follows:",Electromagnetics_Vol2.pdf "2.5. FORCE, ENERGY , AND POTENTIAL DIFFERENCE IN A MAGNETIC FIELD 21 The magnetic field does no work. Instead, the change of potential energy associated with the magnetic field must be completely due to a change in position resulting from other forces, such as a mechanical force or the Coulomb force. The presence of a magnetic field merely increases or decreases this potential difference once the particle has moved, and it is this change in the potential difference that we wish to determine. W e can make the relationship between potential difference and the magnetic field explicit by substituting the right side of Equation 2.40 into Equation 2.41, yielding ∆W ≈ q[v × B(r)] · ˆl∆l (2.42) Equation 2.42 gives the work only for a short distance around r. Now let us try to generalize this result. If we wish to know the work done over a larger distance, then we must account for the possibility that v × B varies along the path taken. T o do this, we may",Electromagnetics_Vol2.pdf "distance, then we must account for the possibility that v × B varies along the path taken. T o do this, we may sum contributions from points along the path traced out by the particle, i.e., W ≈ N∑ n=1 ∆W (rn) (2.43) where rn are positions defining the path. Substituting the right side of Equation 2.42, we have W ≈ q N∑ n=1 [v × B(rn)] · ˆl(rn)∆l (2.44) T aking the limit as ∆l → 0, we obtain W = q ∫ C [v × B(r)] · ˆl(r)dl (2.45) where C is the path (previously , the sequence of rn’s) followed by the particle. Now omitting the explicit dependence on r in the integrand for clarity: W = q ∫ C [v × B] · dl (2.46) where dl = ˆldlas usual. Now , we are able to determine the change in potential energy for a charged particle moving along any path in space, given the magnetic field. At this point, it is convenient to introduce the electric potential difference V21 between the start point (1) and end point (2) of C. V21 is defined as the work done by traversing C, per unit of charge; i.e., V21 ≜ W",Electromagnetics_Vol2.pdf "and end point (2) of C. V21 is defined as the work done by traversing C, per unit of charge; i.e., V21 ≜ W q (2.47) This has units of J/C, which is volts (V). Substituting Equation 2.46, we obtain: V21 = ∫ C [v × B] · dl (2.48) Equation 2.48 is electrical potential induced by char ge traversing a magnetic field. Figure 2.9 shows a simple scenario that illustrates this concept. Here, a straight perfectly-conducting wire of length lis parallel to the yaxis and moves at speed v in the +zdirection through a magnetic field B = ˆxB. Thus, v × B = ˆzv× ˆxB = ˆyBv (2.49) T aking endpoints 1 and 2 of the wire to be at y= y0 (2) (1) B v z y x l c⃝ C. W ang CC BY 4.0 Figure 2.9: A straight wire moving through a mag- netic field.",Electromagnetics_Vol2.pdf "22 CHAPTER 2. MAGNETOST A TICS REDUX and y= y0 + l, respectively , we obtain V21 = ∫ y0+l y0 [ˆyBv] · ˆydy = Bvl (2.50) Thus, we see that endpoint 2 is at an electrical potential of Bvl greater than that of endpoint 1. This “voltage” exists even though the wire is perfectly-conducting, and therefore cannot be attributed to the electric field. This voltage exists even though the force required for movement must be the same on both endpoints, or could even be zero, and therefore cannot be attributed to mechanical forces. Instead, this change in potential is due entirely to the magnetic field. Because the wire does not form a closed loop, no current flows in the wire. Therefore, this scenario has limited application in practice. T o accomplish something useful with this concept we must at least form a closed loop, so that current may flow . For a closed loop, Equation 2.48 becomes: V = ∮ C [v × B] · dl (2.51) Examination of this equation indicates one additional",Electromagnetics_Vol2.pdf "closed loop, Equation 2.48 becomes: V = ∮ C [v × B] · dl (2.51) Examination of this equation indicates one additional requirement: v × B must somehow vary over C. This is because if v × B does not vary over C, the result will be [v × B] · ∮ C dl which is zero because the integral is zero. The following example demonstrates a practical application of this idea. Example 2.3. Potential induced in a time-varying loop. Figure 2.10 shows a modification to the problem originally considered in Figure 2.9. Now , we have created a closed loop using perfectly-conducting and motionless wire to form three sides of a rectangle, and assigned the origin to the lower left corner. An infinitesimally-small gap has been inserted in the left (z = 0) side of the loop and closed with an ideal resistor of value R. As before, B = ˆxB (spatially uniform and time invariant) and vB zx y VT + - R c⃝ C. W ang CC BY -SA 4.0 Figure 2.10: A time-varying loop created by moving",Electromagnetics_Vol2.pdf "(spatially uniform and time invariant) and vB zx y VT + - R c⃝ C. W ang CC BY -SA 4.0 Figure 2.10: A time-varying loop created by moving a “shorting bar” along rails comprising two adjacent sides of the loop. v = ˆzv(constant). What is the voltage VT across the resistor and what is the current in the loop? Solution. Since the gap containing the resistor is infinitesimally small, VT = ∮ C [v × B] · dl (2.52) where C is the perimeter formed by the loop, beginning at the “− ” terminal of VT and returning to the “+” terminal of VT. Only the shorting bar is in motion, so v = 0 for the other three sides of the loop. Therefore, only the portion of C traversing the shorting bar contributes to VT. Thus, we find VT = ∫ l y=0 [ˆzv× ˆxB] · ˆydy= Bvl (2.53) This potential gives rise to a current Bvl/R, which flows in the counter-clockwise direction. Note in the previous example that the magnetic field has induced VT, not the current. The current is simply",Electromagnetics_Vol2.pdf "Note in the previous example that the magnetic field has induced VT, not the current. The current is simply a response to the existence of the potential, regardless of the source. In other words, the same potential VT would exist even if the gap was not closed by a resistor.",Electromagnetics_Vol2.pdf "2.5. FORCE, ENERGY , AND POTENTIAL DIFFERENCE IN A MAGNETIC FIELD 23 Astute readers will notice that this analysis seems to have a lot in common with Faraday’s law , V = − ∂ ∂tΦ (2.54) which says the potential induced in a single closed loop is proportional to the time rate of change of magnetic flux Φ, where Φ = ∫ S B · ds (2.55) and where S is the surface through which the flux is calculated. From this perspective, we see that Equation 2.51 is simply a special case of Faraday’s law , pertaining specifically to “motional emf. ” Thus, the preceding example can also be solved by Faraday’s law , taking S to be the time-varying surface bounded by C. [m0182]",Electromagnetics_Vol2.pdf "24 CHAPTER 2. MAGNETOST A TICS REDUX Image Credits Fig. 2.1: c⃝ Stannered, https://en.wikipedia.org/wiki/File:Charged-particle-drifts.svg, CC BY 2.5 (https://creativecommons.org/licenses/by/2.5/deed.en). Modified by Maschen, author. Fig. 2.2: c⃝ M. Biaek, https://en.wikipedia.org/wiki/File:Cyclotron motion.jpg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 2.3: c⃝ Y ahuiZ (Y . Zhao), https://commons.wikimedia.org/wiki/File:Figure2.3Y ahui.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Modified by author. Fig. 2.4: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:T orque associated with a single lever arm.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 2.5: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Rudimentary electric motor.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 2.6: c⃝ Abnormaal, https://en.wikipedia.org/wiki/File:Electric motor.gif, CC",Electromagnetics_Vol2.pdf "CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 2.6: c⃝ Abnormaal, https://en.wikipedia.org/wiki/File:Electric motor.gif, CC BY SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Fig. 2.7: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Magnetic field due to a line current.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 2.8: c⃝ K. Kikkeri, https://commons.wikimedia.org/wiki/File:M0104 fRing.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Modified by author. Fig. 2.9: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Straight wire moving in a magnetic field.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 2.10: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Moving shorting bar of a circuit in mag field.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "Chapter 3 W a ve Propagation in General Media 3.1 Poynting’s Theorem [m0073] Despite the apparent complexity of electromagnetic theory , there are in fact merely four ways that electromagnetic energy can be manipulated. Electromagnetic energy can be: • Transferred; i.e., conveyed by transmission lines or in waves; • Stored in an electric field (capacitance); • Stored in a magnetic field (inductance); or • Dissipated (converted to heat; i.e., resistance). Poynting’s theorem is an expression of conservation of energy that elegantly relates these various possibilities. Once recognized, the theorem has important applications in the analysis and design of electromagnetic systems. Some of these emerge from the derivation of the theorem, as opposed to the unsurprising result. So, let us now derive the theorem. W e begin with a statement of the theorem. Consider a volume V that may contain materials and structures in any combination. This is crudely depicted in",Electromagnetics_Vol2.pdf "volume V that may contain materials and structures in any combination. This is crudely depicted in Figure 3.1. Also recall that power is the time rate of change of energy . Then: Pnet,in = PE + PM + PΩ (3.1) where Pnet,in is the net power flow into V, PE is the power associated with energy storage in electric fields within V, PM is the power associated with energy storage in magnetic fields within V, and PΩ is the power dissipated (converted to heat) in V. Some preliminary mathematical results. W e now derive two mathematical relationships that will be useful later. Let E be the electric field intensity (SI base units of V/m) and let D be the electric flux density (SI base units of C/m 2). W e require that the constituents of V be linear and time-invariant; therefore, D = ǫE where the permittivity ǫis constant with respect to time, but not necessarily with respect to position. Under these conditions, we find ∂ ∂t (E · D) = 1 ǫ ∂ ∂t (D · D) (3.2) Note",Electromagnetics_Vol2.pdf "respect to position. Under these conditions, we find ∂ ∂t (E · D) = 1 ǫ ∂ ∂t (D · D) (3.2) Note that E and D point in the same direction. Let ˆe be the unit vector describing this direction. Then, E = ˆeEand D = ˆeDwhere Eand Dare the scalar c⃝ C. W ang CC BY -SA 4.0 Figure 3.1: Poynting’s theorem describes the fate of power entering a region V consisting of materials and structures capable of storing and dissipating energy . Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "26 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA components of E and D, respectively . Subsequently , 1 ǫ ∂ ∂t (D · D) = 1 ǫ ∂ ∂tD2 = 1 ǫ2D ∂ ∂tD = 2 E · ∂ ∂tD (3.3) Summarizing: ∂ ∂t (E · D) = 2E · ∂ ∂tD (3.4) which is the expression we seek. It is worth noting that the expressions on both sides of the equation have the same units, namely , those of power. Using the same reasoning, we find: ∂ ∂t (H · B) = 2H · ∂ ∂tB (3.5) where H is the magnetic field intensity (SI base units of A/m) and B is the magnetic flux density (SI base units of T). Derivation of the theorem. W e begin with the differential form of Ampere’s law: ∇ × H = J + ∂ ∂tD (3.6) T aking the dot product with E on both sides: E · (∇ × H) = E · J + E · ∂ ∂tD (3.7) Let’ s deal with the left side of this equation first. For this, we will employ a vector identity (Equation B.27, Appendix B.3). This identity states that for any two vector fields F and G, ∇ · (F × G) = G · (∇ × F) − F · (∇ × G) (3.8)",Electromagnetics_Vol2.pdf "Appendix B.3). This identity states that for any two vector fields F and G, ∇ · (F × G) = G · (∇ × F) − F · (∇ × G) (3.8) Substituting E for F and H for G and rearranging terms, we find E · (∇ × H) = H · (∇ × E) − ∇ · (E × H) (3.9) Next, we invoke the Maxwell-Faraday equation: ∇ × E = − ∂ ∂tB (3.10) Using this equation to replace the factor in the parentheses in the second term of Equation 3.9, we obtain: E · (∇ × H) = H · ( − ∂ ∂tB ) − ∇ · (E × H) (3.11) Substituting this expression for the left side of Equation 3.7, we have − H · ∂ ∂tB − ∇ · (E × H) = E · J + E · ∂ ∂tD (3.12) Ne xt we invoke the identities of Equations 3.4 and 3.5 to replace the first and last terms: −1 2 ∂ ∂t (H · B) − ∇ · (E × H) = E · J + 1 2 ∂ ∂t (E · D) (3.13) No w we move the first term to the right-hand side and integrate both sides over the volume V: − ∫ V ∇ · (E × H) dv = ∫ V E · J dv + ∫ V 1 2 ∂ ∂t (E · D) dv + ∫ V 1 2 ∂ ∂t (H · B) dv (3.14) The left side may be transformed into a surface",Electromagnetics_Vol2.pdf "− ∫ V ∇ · (E × H) dv = ∫ V E · J dv + ∫ V 1 2 ∂ ∂t (E · D) dv + ∫ V 1 2 ∂ ∂t (H · B) dv (3.14) The left side may be transformed into a surface integral using the divergence theorem: ∫ V ∇ · (E × H) dv= ∮ S (E × H) · ds (3.15) where S is the closed surface that bounds V and ds is the outward-facing normal to this surface, as indicated in Figure 3.1. Finally , we exchange the order of time differentiation and volume integration in the last two terms: − ∮ S (E × H) · ds = ∫ V E · J dv + 1 2 ∂ ∂t ∫ V E · D dv + 1 2 ∂ ∂t ∫ V H · B dv (3.16)",Electromagnetics_Vol2.pdf "3.1. POYNTING’S THEOREM 27 Equation 3.16 is Poynting’s theorem. Each of the four terms has the particular physical interpretation identified in Equation 3.1, as we will now demonstrate. Power dissipated by ohmic loss. The first term of the right side of Equation 3.16 is PΩ ≜ ∫ V E · J dv (3.17) Equation 3.17 is Joule’s law. Joule’s law gives the power dissipated due to finite conductivity of material. The role of conductivity (σ , SI base units of S/m) can be made explicit using the relationship J = σE (Ohm’s law) in Equation 3.17, which yields: PΩ = ∫ V E · σE dv= ∫ V σ|E|2 dv (3.18) PΩ is due to the conversion of the electric field into conduction current, and subsequently into heat. This mechanism is commonly known as ohmic loss or joule heating. It is worth noting that this expression has the expected units. For example, in Equation 3.17, E (SI base units of V/m) times J (SI base units of A/m 2) yields a quantity with units of W/m3; i.e., power per unit volume, which is power",Electromagnetics_Vol2.pdf "base units of A/m 2) yields a quantity with units of W/m3; i.e., power per unit volume, which is power density . Then integration over volume yields units of W; hence, power. Energy storage in electric and magnetic fields. The second term on the right side of Equation 3.16 is: PE ≜ 1 2 ∂ ∂t ∫ V E · D dv (3.19) Recall D = ǫE , where ǫis the permittivity (SI base units of F/m) of the material. Thus, we may rewrite the previous equation as follows: PE = 1 2 ∂ ∂t ∫ V E · ǫE dv = 1 2 ∂ ∂t ∫ V ǫ|E|2 dv = ∂ ∂t (1 2 ∫ V ǫ|E|2 dv ) (3.20) The quantity in parentheses is We, the energy stored in the electric field within V. The third term on the right side of Equation 3.16 is: PM ≜ 1 2 ∂ ∂t ∫ V H · B dv (3.21) Recall B = µH , where µis the permeability (SI base units of H/m) of the material. Thus, we may rewrite the previous equation as follows: PM = 1 2 ∂ ∂t ∫ V H · µH dv = 1 2 ∂ ∂t ∫ V µ|H|2 dv = ∂ ∂t (1 2 ∫ V µ|H|2 dv ) (3.22) The quantity in parentheses is Wm, the energy stored",Electromagnetics_Vol2.pdf "PM = 1 2 ∂ ∂t ∫ V H · µH dv = 1 2 ∂ ∂t ∫ V µ|H|2 dv = ∂ ∂t (1 2 ∫ V µ|H|2 dv ) (3.22) The quantity in parentheses is Wm, the energy stored in the magnetic field within V. Power flux through S. The left side of Equation 3.16 is Pnet,in ≜ − ∮ S (E × H) · ds (3.23) The quantity E × H is the P oynting vector, which quantifies the spatial power density (SI base units of W/m2) of an electromagnetic wave and the direction in which it propagates. The reader has likely already encountered this concept. Regardless, we’ll confirm this interpretation of the quantity E × H in Section 3.2. For now , observe that integration of the Poynting vector over S as indicated in Equation 3.23 yields the total power flowing out of V through S. The negative sign in Equation 3.23 indicates that the combined quantity represents power flow in to V through S. Finally , note the use of a single quantity Pnet,in does not imply that power is entirely inward-directed or outward-directed. Rather, Pnet,in",Electromagnetics_Vol2.pdf "Pnet,in does not imply that power is entirely inward-directed or outward-directed. Rather, Pnet,in represents the net flux; i.e., the sum of the inward- and outward-flowing power. Summary . Equation 3.16 may now be stated concisely as follows: Pnet,in = PΩ + ∂ ∂tWe + ∂ ∂tWm (3.24)",Electromagnetics_Vol2.pdf "28 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA Poynting’s theorem (Equation 3.24, with Equa- tions 3.23, 3.17, 3.19, and 3.21) states that the net electromagnetic power flowing into a region of space may be either dissipated, or used to change the energy stored in electric and magnetic fields within that region. Since we derived this result directly from the general form of Maxwell’s equations, these three possibilities are all the possibilities allowed by classical physics, so this is a statement of conservation of power. Finally , note the theorem also works in reverse; i.e., the net electromagnetic power flowing out of a region of space must have originated from some active source (i.e., the reverse of power dissipation) or released from energy stored in electric or magnetic fields. Additional Reading: • “Poynting vector” on Wikipedia. 3.2 Poynting V ector [m0122] In this section, we use Poynting’s theorem (Section 3.1) to confirm the interpretation of the Poynting vector",Electromagnetics_Vol2.pdf "3.2 Poynting V ector [m0122] In this section, we use Poynting’s theorem (Section 3.1) to confirm the interpretation of the Poynting vector S ≜ E × H (3.25) as the spatial power density (SI base units of W/m 2) and the direction of power flow . Figure 3.2 shows a uniform plane wave incident on a homogeneous and lossless region V defined by the closed right cylinder S. The axis of the cylinder is aligned along the direction of propagation ˆk of the plane wave. The ends of the cylinder are planar and perpendicular to ˆk. Now let us apply Poynting’s theorem: Pnet,in = PΩ + ∂ ∂tWe + ∂ ∂tWm (3.26) Since the region is lossless, PΩ = 0. Presuming no other electric or magnetic fields, We and Wm must also be zero. Consequently , Pnet,in = 0. However, this does not mean that there is no power flowing into V. Instead, Pnet,in = 0 merely indicates that the net power flowing into V is zero. Thus, we might instead express the result for the present scenario as follows: Pnet,in = Pin − Pout = 0 (3.27)",Electromagnetics_Vol2.pdf "power flowing into V is zero. Thus, we might instead express the result for the present scenario as follows: Pnet,in = Pin − Pout = 0 (3.27) c⃝ C. W ang CC BY -SA 4.0 Figure 3.2: A uniform plane wave incident on a region bounded by the cylindrical surface S.",Electromagnetics_Vol2.pdf "3.2. POYNTING VECTOR 29 where Pin and Pout indicate power flow explicitly into and explicitly out of V as separate quantities. Proceeding, let’s ignore what we know about power flow in plane waves, and instead see where Poynting’s theorem takes us. Here, Pnet,in ≜ − ∮ S (E × H) · ds = 0 (3.28) The surface S consists of three sides: The two flat ends, and the curved surface that connects them. Let us refer to these sides as S1, S2, and S3, from left to right as shown in Figure 3.2. Then, − ∫ S1 (E × H) · ds (3.29) − ∫ S2 (E × H) · ds − ∫ S3 (E × H) · ds = 0 On the curved surface S2, ds is everywhere perpendicular to E × H (i.e., perpendicular to ˆk). Therefore, the second integral is equal to zero. On the left end S1, the outward-facing differential surface element ds = −ˆkds. On the right end S3, ds = + ˆkds. W e are left with: ∫ S1 (E × H) · ˆkds (3.30) − ∫ S3 (E × H) · ˆkds= 0 Compare this to Equation 3.27. Since ˆk is, by definition, the direction in which E × H points, the",Electromagnetics_Vol2.pdf "S1 (E × H) · ˆkds (3.30) − ∫ S3 (E × H) · ˆkds= 0 Compare this to Equation 3.27. Since ˆk is, by definition, the direction in which E × H points, the first integral must be Pin and the second integral must be Pout. Thus, Pin = ∫ S1 (E × H) · ˆkds (3.31) and it follows that the magnitude and direction of E × H, which we recognize as the Poynting vector, are spatial power density and direction of power flow , respectively . The Poynting vector is named after English physicist J.H. Poynting, one of the co-discoverers of the concept. The fact that this vector points in the direction of power flow , and is therefore also a “pointing vector, ” is simply a remarkable coincidence. Additional Reading: • “Poynting vector” on Wikipedia.",Electromagnetics_Vol2.pdf "30 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA 3.3 W ave Equations for Lossy Regions [m0128] The wave equations for electromagnetic propagation in lossless and source-free media, in differential phasor form, are: ∇2 ˜E + ω2µǫ˜E = 0 (3.32) ∇2 ˜H + ω2µǫ˜H = 0 (3.33) The constant ω2µǫis labeled β2, and βturns out to be the phase propagation constant. Now , we wish to upgrade these equations to account for the possibility of loss. First, let’s be clear on what we mean by “loss. ” Specifically , we mean the possibility of conversion of energy from the propagating wave into current, and subsequently to heat. This mechanism is described by Ohm’s law: ˜J = σ˜E (3.34) where σis conductivity and ˜J is conduction current density (SI base units of A/m 2). In the lossless case, σ is presumed to be zero (or at least negligible), so J is presumed to be zero. T o obtain wave equations for media exhibiting significant loss, we cannot assume J = 0.",Electromagnetics_Vol2.pdf "presumed to be zero. T o obtain wave equations for media exhibiting significant loss, we cannot assume J = 0. T o obtain equations that account for the possibility of significant conduction current, hence loss, we return to the phasor forms of Maxwell’s equations: ∇ · ˜E = ˜ρv ǫ (3.35) ∇ × ˜E = −jωµ˜H (3.36) ∇ · ˜H = 0 (3.37) ∇ × ˜H = ˜J + jωǫ˜E (3.38) where ˜ρv is the charge density . If the region of interest is source-free, then ˜ρv = 0. However, we may not similarly suppress ˜J since σmay be non-zero. T o make progress, let us identify the possible contributions to ˜J as follows: ˜J = ˜Jimp + ˜Jind (3.39) where ˜Jimp represents impressed sources of current and ˜Jind represents current which is induced by loss. An impressed current is one whose behavior is independent of other features, analogous to an independent current source in elementary circuit theory . In the absence of such sources, Equation 3.39 becomes: ˜J = 0 + σ˜E (3.40) Equation 3.38 may now be rewritten as:",Electromagnetics_Vol2.pdf "theory . In the absence of such sources, Equation 3.39 becomes: ˜J = 0 + σ˜E (3.40) Equation 3.38 may now be rewritten as: ∇ × ˜H = σ˜E + jωǫ˜E (3.41) = (σ + jωǫ) ˜E (3.42) = jωǫc˜E (3.43) where we defined the new constant ǫc as follows: ǫc ≜ ǫ− jσ ω (3.44) This constant is known as complex permittivity. In the lossless case, ǫc = ǫ; i.e., the imaginary part of ǫc → 0 so there is no difference between the physical permittivity ǫand ǫc. The effect of the material’s loss is represented as a non-zero imaginary component of the permittivity . It is also common to express ǫc as follows: ǫc = ǫ′ − jǫ′′ (3.45) where the real-valued constants ǫ′ and ǫ′′ are in this case: ǫ′ = ǫ (3.46) ǫ′′ = σ ω (3.47) This alternative notation is useful for three reasons. First, some authors use the symbol ǫto refer to both physical permittivity and complex permittivity . In this case, the “ǫ ′ − jǫ′′” notation is helpful in mitigating confusion. Second, it is often more convenient to",Electromagnetics_Vol2.pdf "case, the “ǫ ′ − jǫ′′” notation is helpful in mitigating confusion. Second, it is often more convenient to specify ǫ′′ at a frequency than it is to specify σ, which may also be a function of frequency . In fact, in some applications the loss of a material is most conveniently specified using the ratio ǫ′′/ǫ′ (known as loss tangent, for reasons explained elsewhere). Finally , it turns out that nonlinearity of permittivity can also be accommodated as an imaginary",Electromagnetics_Vol2.pdf "3.3. W A VE EQUA TIONS FOR LOSSY REGIONS 31 component of the permittivity . The “ǫ ′′” notation allows us to accommodate both effects – nonlinearity and conductivity – using common notation. In this section, however, we remain focused exclusively on conductivity . Complex permittivity ǫc (SI base units of F/m) describes the combined effects of permittivity and conductivity . Conductivity is represented as an imaginary-valued component of the permittiv- ity . Returning to Equations 3.35–3.38, we obtain: ∇ · ˜E = 0 (3.48) ∇ × ˜E = −jωµ˜H (3.49) ∇ · ˜H = 0 (3.50) ∇ × ˜H = jωǫc˜E (3.51) These equations are identical to the corresponding equations for the lossless case, with the exception that ǫhas been replaced by ǫc. Similarly , we may replace the factor ω2µǫin Equations 3.32 and 3.33, yielding: ∇2 ˜E + ω2µǫc˜E = 0 (3.52) ∇2 ˜H + ω2µǫc˜H = 0 (3.53) In the lossless case, ω2µǫc → ω2µǫ, which is β2 as expected. For the general (i.e., possibly lossy) case, we shall make an analogous definition",Electromagnetics_Vol2.pdf "In the lossless case, ω2µǫc → ω2µǫ, which is β2 as expected. For the general (i.e., possibly lossy) case, we shall make an analogous definition γ2 ≜ −ω2µǫc (3.54) such that the wave equations may now be written as follows: ∇2 ˜E − γ2 ˜E = 0 (3.55) ∇2 ˜H − γ2 ˜H = 0 (3.56) Note the minus sign in Equation 3.54, and the associated changes of signs in Equations 3.55 and 3.56. For the moment, this choice of sign may be viewed as arbitrary – we would have been equally justified in choosing the opposite sign for the definition of γ2. However, the choice we have made is customary , and yields some notational convenience that will become apparent later. In the lossless case, βis the phase propagation constant, which determines the rate at which the phase of a wave progresses with increasing distance along the direction of propagation. Given the similarity of Equations 3.55 and 3.56 to Equations 3.32 and 3.33, respectively , the constant γ must play a similar role. So, we are motivated to find",Electromagnetics_Vol2.pdf "similarity of Equations 3.55 and 3.56 to Equations 3.32 and 3.33, respectively , the constant γ must play a similar role. So, we are motivated to find an expression for γ. At first glance, this is simple: γ = √ γ2. However, recall that every number has two square roots. When one declares β = √ β2 = ω√µǫ, there is no concern since βis, by definition, positive; therefore, one knows to take the positive-valued square root. In contrast, γ2 is complex-valued, and so the two possible values of √ γ2 are both potentially comple x-valued. W e are left without clear guidance on which of these values is appropriate and physically-relevant. So we proceed with caution. First, consider the special case that γis purely imaginary; e.g., γ = jγ′′ where γ′′ is a real-valued constant. In this case, γ2 = − (γ′′)2 and the wave equations become ∇2 ˜E + (γ′′)2 ˜E = 0 (3.57) ∇2 ˜H + (γ′′)2 ˜H = 0 (3.58) Comparing to Equations 3.32 and 3.33, we see γ′′ plays the exact same role as β; i.e., γ′′ is the phase",Electromagnetics_Vol2.pdf "∇2 ˜H + (γ′′)2 ˜H = 0 (3.58) Comparing to Equations 3.32 and 3.33, we see γ′′ plays the exact same role as β; i.e., γ′′ is the phase propagation constant for whatever wave we obtain as the solution to the above equations. Therefore, let us make that definition formally: β ≜ Im {γ} (3.59) Be careful: Note that we are not claiming that γ′′ in the possibly-lossy case is equal to ω2µǫ. Instead, we are asserting exactly the opposite; i.e., that there is a phase propagation constant in the general (possibly lossy) case, and we should find that this constant simplifies to ω2µǫin the lossless case. Now we make the following definition for the real component of γ: α≜ Re {γ} (3.60) Such that γ = α+ jβ (3.61) where αand βare real-valued constants. Now , it is possible to determine γexplicitly in terms of ωand the constitutive properties of the material.",Electromagnetics_Vol2.pdf "32 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA First, note: γ2 = ( α+ jβ)2 = α2 − β2 + j2αβ (3.62) Expanding Equation 3.54 using Equations 3.45–3.47, we obtain: γ2 = −ω2µ ( ǫ− jσ ω ) = −ω2µǫ+ j ωµσ (3.63) The real and imaginary parts of Equations 3.62 and 3.63 must be equal. Enforcing this equality yields the following equations: α2 − β2 = −ω2µǫ (3.64) 2αβ = ωµσ (3.65) Equations 3.64 and 3.65 are independent simultaneous equations that may be solved for αand β. Sparing the reader the remaining steps, which are purely mathematical, we find: α= ω    µǫ′ 2   √ 1 + (ǫ′′ ǫ′ )2 − 1      1/ 2 (3.66) β = ω    µǫ′ 2   √ 1 + (ǫ′′ ǫ′ )2 + 1      1 / 2 (3.67) Equations 3.66 and 3.67 can be verified by confirming that Equations 3.64 and 3.65 are satisfied. It is also useful to confirm that the expected results are obtained in the lossless case. In the lossless case, σ= 0, so ǫ′′ = 0. Subsequently , Equation 3.66 yields α= 0 and Equation 3.67 yields β = ω√ µǫ, as e xpected.",Electromagnetics_Vol2.pdf "σ= 0, so ǫ′′ = 0. Subsequently , Equation 3.66 yields α= 0 and Equation 3.67 yields β = ω√ µǫ, as e xpected. The electromagnetic wave equations account- ing for the possibility of lossy media are Equa- tions 3.55 and 3.56 with γ = α+ jβ, where α and βare the positive real-valued constants deter- mined by Equations 3.66 and 3.67, respectively . W e conclude this section by pointing out a very useful analogy to transmission line theory . In the section “W ave Propagation on a TEM Transmission Line, ” 1 we found that the potential and current along a transverse electromagnetic (TEM) transmission line satisfy the same wave equations that we have developed in this section, having a complex-valued propagation constant γ = α+ jβ, and the same physical interpretation of βas the phase propagation constant. As is explained in another section, αtoo has the same interpretation in both applications – that is, as the attenuation constant. Additional Reading:",Electromagnetics_Vol2.pdf "the same interpretation in both applications – that is, as the attenuation constant. Additional Reading: • “Electromagnetic W ave Equation” on Wikipedia. 1 This section may appear in a different volume, depending on the version of this book.",Electromagnetics_Vol2.pdf "3.4. COMPLEX PERMITTIVITY 33 3.4 Complex Permittivity [m0134] The relationship between electric field intensity E (SI base units of V/m) and electric flux density D (SI base units of C/m 2) is: D = ǫE (3.68) where ǫis the permittivity (SI base units of F/m). In simple media, ǫis a real positive value which does not depend on the time variation of E. That is, the response (D) to a change in E is observed instantaneously and without delay . In practical materials, however, the change in D in response to a change in E may depend on the manner in which E changes. The response may not be instantaneous, but rather might take some time to fully manifest. This behavior can be modeled using the following generalization of Equation 3.68: D = a0E+a1 ∂ ∂tE+a2 ∂2 ∂t2 E+a3 ∂3 ∂t3 E+... (3.69) where a0, a1, a2, and so on are real-valued constants, and the number of terms is infinite. In practical materials, the importance of the terms tends to diminish with increasing order. Thus, it is common",Electromagnetics_Vol2.pdf "and the number of terms is infinite. In practical materials, the importance of the terms tends to diminish with increasing order. Thus, it is common that only the first few terms are significant. In many applications involving common materials, only the first term is significant; i.e., a0 ≈ ǫand an ≈ 0 for n≥ 1. As we shall see in a moment, this distinction commonly depends on frequency . In the phasor domain, differentiation with respect to time becomes multiplication by jω. Thus, Equation 3.69 becomes ˜D = a0 ˜E + a1 (jω) ˜E + a2 (jω)2 ˜E + a3 (jω)3 ˜E + ... = a0 ˜E + jωa1 ˜E − ω2a2 ˜E − jω3a3 ˜E + ... = ( a0 + jωa1 − ω2a2 − jω3a3 + ... )˜E (3.70) Note that the factor in parentheses is a complex-valued number which depends on frequency ωand materials parameters a0, a1, ... W e may summarize this as follows: ˜D = ǫc˜E (3.71) where ǫc is a complex-valued constant that depends on frequency . The notation “ǫ c” is used elsewhere in this book (e.g.,",Electromagnetics_Vol2.pdf "˜D = ǫc˜E (3.71) where ǫc is a complex-valued constant that depends on frequency . The notation “ǫ c” is used elsewhere in this book (e.g., Section 3.3) to represent a generalization of simple permittivity that accommodates loss associated with non-zero conductivity σ. In Section 3.3, we defined ǫc ≜ ǫ′ − jǫ′′ (3.72) where ǫ′ ≜ ǫ(i.e., real-valued, simple permittivity) and ǫ′′ ≜ σ/ω(i.e., the effect of non-zero conductivity). Similarly , ǫc in Equation 3.71 can be expressed as ǫc ≜ ǫ′ − jǫ′′ (3.73) but in this case ǫ′ ≜ a0 − ω2a2 + ... (3.74) and ǫ′′ ≜ −ωa1 + ω3a3 − ... (3.75) When expressed as phasors, the temporal rela- tionship between electric flux density and elec- tric field intensity can be expressed as a complex- valued permittivity . Thus, we now see two possible applications for the concept of complex permittivity: Modeling the delayed response of D to changing E, as described above; and modeling loss associated with non-zero",Electromagnetics_Vol2.pdf "concept of complex permittivity: Modeling the delayed response of D to changing E, as described above; and modeling loss associated with non-zero conductivity . In practical work, it may not always be clear precisely what combination of effects the complex permittivity ǫc = ǫ′ − jǫ′′ is taking into account. For example, if ǫc is obtained by measurement, both delayed response and conduction loss may be represented. Therefore, it is not reasonable to assume a value of ǫ′′ obtained by measurement represents only conduction loss (i.e., is equal to σ/ω); in fact, the measurement also may include a significant frequency-dependent contribution associated with the delayed response behavior identified in this section. An example of the complex permittivity of a typical dielectric material is shown in Figure 3.3. Note the frequency dependence is quite simple and slowly-varying at frequencies below 1 GHz or so, but becomes relatively complex at higher frequencies.",Electromagnetics_Vol2.pdf "34 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA c⃝ K.A . Mauritz (modified) Figure 3.3: The relative contributions of the real and imaginary components of permittivity for a typical di- electric material (in this case, a polymer). Additional Reading: • “Permittivity” on Wikipedia. 3.5 Loss T angent [m0132] In Section 3.3, we found that the effect of loss due to non-zero conductivity σcould be concisely quantified using the ratio ǫ′′ ǫ′ = σ ωǫ (3.76) where ǫ′ and ǫ′′ are the real and imaginary components of the complex permittivity ǫc, and ǫ′ ≜ ǫ. In this section, we explore this relationship in greater detail. Recall Ampere’s law in differential (but otherwise general) form: ∇ × H = J + ∂ ∂tD (3.77) The first term on the right is conduction current, whereas the second term on the right is displacement current. In the phasor domain, differentiation with respect to time (∂/∂t) becomes multiplication by jω. Therefore, the phasor form of Equation 3.77 is ∇ × ˜H = ˜J + jω˜D (3.78)",Electromagnetics_Vol2.pdf "respect to time (∂/∂t) becomes multiplication by jω. Therefore, the phasor form of Equation 3.77 is ∇ × ˜H = ˜J + jω˜D (3.78) Also recall that ˜J = σ˜E and that ˜D = ǫ˜E. Thus, ∇ × ˜H = σ˜E + jωǫ˜E (3.79) Interestingly , the total current is the sum of a real-valued conduction current and an imaginary-valued displacement current. This is shown graphically in Figure 3.4. Note that the angle δindicated in Figure 3.4 is given by tan δ≜ σ ωǫ (3.80) The quantity tan δis referred to as the loss tangent. Note that loss tangent is zero for a lossless (σ ≡ 0) material, and increases with increasing loss. Thus, loss tangent provides an alternative way to quantify the effect of loss on the electromagnetic field within a material. Loss tangent presuming only ohmic (conduction) loss is given by Equation 3.80.",Electromagnetics_Vol2.pdf "3.5. LOSS T ANGENT 35 Comparing Equation 3.80 to Equation 3.76, we see loss tangent can equivalently be calculated as tan δ= ǫ′′ ǫ (3.81) and subsequently interpreted as shown in Figure 3.5. The discussion in this section has assumed that ǫc is complex-valued solely due to ohmic loss. However, it is explained in Section 3.4 that permittivity may also be complex-valued as a way to model delay in the response of D to changing E. Does the concept of loss tangent apply also in this case? Since the math does not distinguish between permittivity which is complex due to loss and permittivity which is complex due to delay , subsequent mathematically-derived results apply in either case. On the other hand, there may be potentially significant differences in the physical manifestation of these effects. For example, a material having large loss tangent due to ohmic loss might become hot when a large electric field is applied, whereas a material having large loss tangent due to delayed",Electromagnetics_Vol2.pdf "loss tangent due to ohmic loss might become hot when a large electric field is applied, whereas a material having large loss tangent due to delayed response might not. Summarizing: The expression for loss tangent given by Equa- tion 3.81 and Figure 3.5 does not distinguish be- tween ohmic loss and delayed response. c⃝ C. W ang CC BY -SA 4.0 Figure 3.4: In the phasor domain, the total current is the sum of a real-valued conduction current and an imaginary-valued displacement current. c⃝ C. W ang CC BY -SA 4.0 Figure 3.5: Loss tangent defined in terms of the real and imaginary components of the complex permittiv- ity ǫc. Additional Reading: • “Dielectric loss” on Wikipedia.",Electromagnetics_Vol2.pdf "36 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA 3.6 Plane W aves in Lossy Regions [m0130] The electromagnetic wave equations for source-free re gions consisting of possibly-lossy material are (see Section 3.3): ∇2 ˜E − γ2 ˜E = 0 (3.82) ∇2 ˜H − γ2 ˜H = 0 (3.83) where γ2 ≜ −ω2µǫc (3.84) W e now turn our attention to the question, what are the characteristics of waves that propagate in these conditions? As in the lossless case, these equations permit waves having a variety of geometries including plane waves, cylindrical waves, and spherical waves. In this section, we will consider the important special case of uniform plane waves. T o obtain the general expression for the uniform plane wave solution, we follow precisely the same procedure described in the section “Uniform Plane W aves: Derivation. ” 2 Although that section presumed lossless media, the only difference in the present situation is that the real-valued constant +β2 is replaced with the complex-valued constant −γ2.",Electromagnetics_Vol2.pdf "lossless media, the only difference in the present situation is that the real-valued constant +β2 is replaced with the complex-valued constant −γ2. Thus, we obtain the desired solution through a simple modification of the solution for the lossless case. For a wave exhibiting uniform magnitude and phase in planes of constant z, we find that the electric field is: ˜E = ˆx ˜Ex + ˆy ˜Ey (3.85) where ˜Ex = E+ x0e−γz + E− x0e+γz (3.86) ˜Ey = E+ y0e−γz + E− y0e+γz (3.87) where the complex-valued coefficients E+ x0, E− x0, E+ y0, and E− y0 are determined by boundary conditions (possibly including sources) outside the region of interest. This result can be confirmed by verifying that Equations 3.86 and 3.87 each satisfy Equation 3.82. Also, it may be helpful to note that these expressions are identical to those obtained for 2 Depending on the version of this book, this section may appear in a different volume. the voltage and current in lossy transmission lines, as",Electromagnetics_Vol2.pdf "2 Depending on the version of this book, this section may appear in a different volume. the voltage and current in lossy transmission lines, as described in the section “W ave Equation for a TEM Transmission Line. ” 3 Let’s consider the special case of an ˆx-polarized plane wave propagating in the +ˆz direction: ˜E = ˆxE+ x0e−γz (3.88) W e established in Section 3.3 that γmay be written explicitly in terms of its real and imaginary components as follows: γ = α+ jβ (3.89) where αand βare positive real-valued constants depending on frequency (ω ) and constitutive properties of the medium; i.e., permittivity , permeability , and conductivity . Thus: ˜E = ˆxE+ x0e−(α+ jβ)z = ˆxE+ x0e−αze−jβz (3.90) Observe that the variation of phase with distance is determined by βthrough the factor e−jβz; thus, βis the phase propagation constant and plays precisely the same role as in the lossless case. Observe also that the variation in magnitude is determined by αthrough",Electromagnetics_Vol2.pdf "the same role as in the lossless case. Observe also that the variation in magnitude is determined by αthrough the real-valued factor e−αz. Specifically , magnitude is reduced inverse-exponentially with increasing distance along the direction of propagation. Thus, α is the attenuation constant and plays precisely the same role as the attenuation constant for a lossy transmission line. The presence of loss in material gives rise to a real-v alued factor e−αz which describes the at- tenuation of the wave with propagation (in this case, along z) in the material. W e may continue to exploit the similarity of the potentially-lossy and lossless plane wave results to quickly ascertain the characteristics of the magnetic field. In particular, the plane wave relationships apply exactly as they do in the lossless case. These relationships are: ˜H = 1 η ˆk × ˜E (3.91) 3 Depending on the version of this book, this section may appear in a different volume.",Electromagnetics_Vol2.pdf "3.7. W A VE POWER IN A LOSSY MEDIUM 37 ˜E = −ηˆk × ˜H (3.92) where ˆk is the direction of propagation and ηis the wave impedance. In the lossless case, η= √ µ/ǫ; ho wever, in the possibly-lossy case we must replace ǫ= ǫ′ with ǫc = ǫ′ − jǫ′′. Thus: η→ ηc = √ µ ǫc = √ µ ǫ′ − jǫ′′ = √ µ ǫ′ √ 1 1 − j(ǫ′′/ǫ′) (3.93) Thus: ηc = √ µ ǫ′ · [ 1 − jǫ′′ ǫ′ ] −1/ 2 (3.94) Remarkably , we find that the wave impedance for a lossy material is equal to √ µ/ǫ– the wave impedance we would calculate if we neglected loss (i.e., assumed σ= 0) – times a correction factor that accounts for the loss. This correction factor is complex-valued; therefore, E and H are not in phase when propagating through lossy material. W e now see that in the phasor domain: ˜H = 1 ηc ˆk × ˜E (3.95) ˜E = −ηcˆk × ˜H (3.96) The plane wave relationships in media which are possibly lossy are given by Equations 3.95 and 3.96, with the complex-valued wave impedance given by Equation 3.94. 3.7 W ave Power in a Lossy Medium [m0133]",Electromagnetics_Vol2.pdf "lossy are given by Equations 3.95 and 3.96, with the complex-valued wave impedance given by Equation 3.94. 3.7 W ave Power in a Lossy Medium [m0133] In this section, we consider the power associated with wa ves propagating in materials which are potentially lossy; i.e., having conductivity σsignificantly greater than zero. This topic has previously been considered in the section “W ave Power in a Lossless Medium” for the case in loss is not significant. 4 A review of that section may be useful before reading this section. Recall that the Poynting vector S ≜ E × H (3.97) indicates the power density (i.e., W/m 2) of a wave and the direction of power flow . This is “instantaneous” power, applicable to waves regardless of the way they vary with time. Often we are interested specifically in waves which vary sinusoidally , and which subsequently may be represented as phasors. In this case, the time-average Poynting vector is Save ≜ 1 2Re { ˜E × ˜H∗ } (3.98) Further",Electromagnetics_Vol2.pdf "subsequently may be represented as phasors. In this case, the time-average Poynting vector is Save ≜ 1 2Re { ˜E × ˜H∗ } (3.98) Further , we have already used this expression to find that the time-average power density for a sinusoidally-varying uniform plane wave in a lossless medium is simply Save = |E0|2 2η (lossless case) (3.99) where |E0| is the peak (as opposed to RMS) magnitude of the electric field intensity phasor, and η is the wave impedance. Let us now use Equation 3.98 to determine the expression corresponding to Equation 3.99 in the case of possibly-lossy media. W e may express the electric and magnetic field intensities of a uniform plane wave as ˜E = ˆxE0e−αze−jβz (3.100) and ˜H = ˆy E0 ηc e−αze−jβ z (3.101) 4 Depending on the version of this book, this section may appear in another volume.",Electromagnetics_Vol2.pdf "38 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA where αand βare the attenuation constant and phase propagation constant, respectively , and ηc is the complex-valued wave impedance. As written, these expressions describe a wave which is +ˆx-polarized and propagates in the +ˆz direction. W e make these choices for convenience only – as long as the medium is homogeneous and isotropic, we expect our findings to apply regardless of polarization and direction of propagation. Applying Equation 3.98: Save = 1 2Re { ˜E × ˜H∗ } = 1 2 ˆz Re { | E0|2 η∗c e−2αz } = ˆz|E0|2 2 Re { 1 η∗c } e−2αz (3.102) Because ηc is complex-valued when the material is lossy , we must proceed with caution. First, let us write ηc explicitly in terms of its magnitude |ηc| and phase ψη: η≜ |η| ejψη (3.103) Then: η∗ c = |ηc| e−jψη (3.104) (η∗ c)−1 = |ηc|−1 e+jψη (3.105) Re { (η∗ c)−1 } = |ηc|−1 cos ψη (3.106) Then Equation 3.102 may be written: Save = ˆz|E0|2 2 |ηc| e−2αz cos ψη (3.107)",Electromagnetics_Vol2.pdf "c)−1 = |ηc|−1 e+jψη (3.105) Re { (η∗ c)−1 } = |ηc|−1 cos ψη (3.106) Then Equation 3.102 may be written: Save = ˆz|E0|2 2 |ηc| e−2αz cos ψη (3.107) The time-average power density of the plane wa ve described by Equation 3.100 in a possibly- lossy material is given by Equation 3.107. As a check, note that this expression gives the expected result for lossless media; i.e., α= 0, |ηc| = η, and ψη = 0. W e now see that the effect of loss is that power density is now proportional to (e−αz)2, so, as expected, power density is proportional to the square of either |E| or |H|. The result further indicates a one-time scaling of the power density by a factor of |η| |ηc| cos ψη <1 (3.108) relati ve to a medium without loss. The reduction in power density due to non- zero conductivity is proportional to a distance- dependent factor e−2αz and an additional factor that depends on the magnitude and phase of ηc.",Electromagnetics_Vol2.pdf "3.8. DECIBEL SCALE FOR POWER RA TIO 39 3.8 Decibel Scale for Power Ratio [m0154] In many disciplines within electrical engineering, it is common to evaluate the ratios of powers and power densities that differ by many orders of magnitude. These ratios could be expressed in scientific notation, but it is more common to use the logarithmic decibel (dB) scale in such applications. In the conventional (linear) scale, the ratio of power P1 to power P0 is simply G= P1 P0 (linear units) (3.109) Here, “G” might be interpreted as “power gain. ” Note that G< 1 if P1 1 if P1 >P0. In the decibel scale, the ratio of power P1 to power P0 is G≜ 10 log10 P1 P0 (dB) (3.110) where “dB” denotes a unitless quantity which is expressed in the decibel scale. Note that G< 0 dB (i.e., is “negative in dB”) if P1 0 dB if P1 >P0. The power gain P1/P0 in dB is given by Equa- tion 3.110. Alternatively , one might choose to interpret a power ratio as a loss Lwith L≜ 1/Gin linear units, which",Electromagnetics_Vol2.pdf "tion 3.110. Alternatively , one might choose to interpret a power ratio as a loss Lwith L≜ 1/Gin linear units, which is L= −Gwhen expressed in dB. Most often, but not always, engineers interpret a power ratio as “gain” if the output power is expected to be greater than input power (e.g., as expected for an amplifier) and as “loss” if output power is expected to be less than input power (e.g., as expected for a lossy transmission line). Power loss Lis the reciprocal of power gain G. Therefore, L = −G when these quantities are expressed in dB. Example 3.1. Po wer loss from a long cable. A 2 W signal is injected into a long cable. The power arriving at the other end of the cable is 10 µW . What is the power loss in dB? In linear units: G= 10 µW 2 W = 5 × 10−6 (linear units) In dB: G= 10 log 10 ( 5 × 10−6)∼= −53.0 dB L= −G∼ = +53.0 dBThe decibel scale is used in precisely the same way to relate ratios of spatial power densities for waves. For",Electromagnetics_Vol2.pdf "5 × 10−6)∼= −53.0 dB L= −G∼ = +53.0 dBThe decibel scale is used in precisely the same way to relate ratios of spatial power densities for waves. For example, the loss incurred when the spatial power density is reduced from S0 (SI base units of W/m 2) to S1 is L= 10 log 10 S0 S1 (dB) (3.111) This works because the common units of m −2 in the numerator and denominator cancel, leaving a power ratio. A common point of confusion is the proper use of the decibel scale to represent voltage or current ratios. T o avoid confusion, simply refer to the definition expressed in Equation 3.110. For example, let’s say P1 = V2 1 /R1 where V1 is potential and R1 is the impedance across which V1 is defined. Similarly , let us define P0 = V2 0 /R0 where V0 is potential and R0 is the impedance across which V0 is defined. Applying Equation 3.110: G≜ 10 log10 P1 P0 (dB) = 10 log10 V2 1 /R1 V2 0 /R0 (dB) (3.112) Now , if R1 = R0, then G= 10 log 10 V2 1 V2 0 (dB) = 10 log10 (V1 V0 )2 (dB) = 20 log10 V1 V0",Electromagnetics_Vol2.pdf "P1 P0 (dB) = 10 log10 V2 1 /R1 V2 0 /R0 (dB) (3.112) Now , if R1 = R0, then G= 10 log 10 V2 1 V2 0 (dB) = 10 log10 (V1 V0 )2 (dB) = 20 log10 V1 V0 (dB) (3.113)",Electromagnetics_Vol2.pdf "40 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA However, note that this is not true if R1 ̸=R0. A power ratio in dB is equal to 20 log10 of the voltage ratio only if the associated impedances are equal. Adding to the potential for confusion on this point is the concept of voltage gain Gv: Gv ≜ 20 log10 V1 V0 (dB) (3.114) which applies regardless of the associated impedances. Note that Gv = Gonly if the associated impedances are equal, and that these ratios are different otherwise. Be careful! The decibel scale simplifies common calculations. Here’s an example. Let’s say a signal having power P0 is injected into a transmission line having loss L. Then the output power P1 = P0/Lin linear units. However, in dB, we find: 10 log10 P1 = 10 log 10 P0 L = 10 log10 P0 − 10 log10 L Division has been transformed into subtraction; i.e., P1 = P0 − L (dB) (3.115) This form facilitates easier calculation and visualization, and so is typically preferred. Finally , note that the units of P1 and P0 in",Electromagnetics_Vol2.pdf "This form facilitates easier calculation and visualization, and so is typically preferred. Finally , note that the units of P1 and P0 in Equation 3.115 are not dB per se, but rather dB with respect to the original power units. For example, if P1 is in mW , then taking 10 log10 of this quantity results in a quantity having units of dB relative to 1 mW . A power expressed in dB relative to 1 mW is said to have units of “dBm. ” For example, “0 dBm” means 0 dB relative to 1 mW , which is simply 1 mW . Similarly +10 dBm is 10 mW , −10 dBm is 0.1 mW , and so on. Additional Reading: • “Decibel” on Wikipedia. • “Scientific notation” on Wikipedia. 3.9 Attenuation Rate [m0155] Attenuation rate is a convenient way to quantify loss in general media, including transmission lines, using the decibel scale. Consider a transmission line carrying a wave in the +zdirection. Let P0 be the power at z= 0. Let P1 be the power at z= l. Then the power at z= 0 relative to the power at z= lis: P0 P1 = e−2α·0",Electromagnetics_Vol2.pdf "+zdirection. Let P0 be the power at z= 0. Let P1 be the power at z= l. Then the power at z= 0 relative to the power at z= lis: P0 P1 = e−2α·0 e−2α·l = e2αl (linear units) (3.116) where αis the attenuation constant; that is, the real part of the propagation constant γ = α+ jβ. Expressed in this manner, the power ratio is a loss; that is, a number greater than 1 represents attenuation. In the decibel scale, the loss is 10 log10 P0 P1 = 10 log10 e2αl = 20αl log10 e ∼= 8.69αl dB (3.117) Attenuation rate is defined as this quantity per unit length. Dividing by l, we obtain: attenuation rate ∼= 8.69α (3.118) This has units of dB/length, where the units of length are the same length units in which αis expressed. For example, if αis expressed in units of m −1, then attenuation rate has units of dB/m. Attenuation rate ∼= 8.69 α is the loss in dB, per unit length. The utility of the attenuation rate concept is that it allows us to quickly calculate loss for any distance of",Electromagnetics_Vol2.pdf "unit length. The utility of the attenuation rate concept is that it allows us to quickly calculate loss for any distance of wave travel: This loss is simply attenuation rate (dB/m) times length (m), which yields loss in dB. Example 3.2. Attenuation rate in a long cable. A particular coaxial cable has an attenuation constant α∼= 8.5 × 10−3 m−1. What is the attenuation rate and the loss in dB for 100 m of this cable?",Electromagnetics_Vol2.pdf "3.10. POOR CONDUCTORS 41 The attenuation rate is ∼= 8.69 α∼ = 0.0738 dB/mThe loss in 100 m of this cable is ∼= (0 .0738 dB/m) (100 m) ∼ = 7.4 dBNote that it would be entirely appropriate, and equi valent, to state that the attenuation rate for this cable is 7.4 dB/(100 m). The concept of attenuation rate is used in precisely the same way to relate ratios of spatial power densities for unguided waves. This works because spatial power density has SI base units of W/m 2, so the common units of m −2 in the numerator and denominator cancel in the power density ratio, leaving a simple power ratio. 3.10 Poor Conductors [m0156] A poor conductor is a material for which conductivity is low , yet sufficient to exhibit significant loss. T o be clear, the loss we refer to here is the conversion of the electric field to current through Ohm’s law . The threshold of significance depends on the application. For example, the dielectric spacer separating the conductors in a coaxial cable might be",Electromagnetics_Vol2.pdf "The threshold of significance depends on the application. For example, the dielectric spacer separating the conductors in a coaxial cable might be treated as lossless (σ = 0) for short lengths at low frequencies; whereas the loss of the cable for long lengths and higher frequencies is typically significant, and must be taken into account. In the latter case, the material is said to be a poor conductor because the loss is significant yet the material can still be treated in most other respects as an ideal dielectric. A quantitative but approximate criterion for identification of a poor conductor can be obtained from the concept of complex permittivity ǫc, which has the form: ǫc = ǫ′ − jǫ′′ (3.119) Recall that ǫ′′ quantifies loss, whereas ǫ′ exists independently of loss. In fact, ǫc = ǫ′ = ǫfor a perfectly lossless material. Therefore, we may quantify the lossiness of a material using the ratio ǫ′′/ǫ′, which is sometimes referred to as loss tangent",Electromagnetics_Vol2.pdf "quantify the lossiness of a material using the ratio ǫ′′/ǫ′, which is sometimes referred to as loss tangent (see Section 3.5). Using this quantity , we define a poor conductor as a material for which ǫ′′ is very small relative to ǫ′. Thus, ǫ′′ ǫ′ ≪ 1 (poor conductor) (3.120) A poor conductor is a material having loss tan- gent much less than 1, such that it behaves in most respects as an ideal dielectric except that ohmic loss may not be negligible. An example of a poor conductor commonly encountered in electrical engineering includes the popular printed circuit board substrate material FR4 (fiberglass epoxy), which has ǫ′′/ǫ′ ∼ 0.008 over the frequency range it is most commonly used. Another example, already mentioned, is the dielectric spacer",Electromagnetics_Vol2.pdf "42 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA material (for example, polyethylene) typically used in coaxial cables. The loss of these materials may or may not be significant, depending on the particulars of the application. The imprecise definition of Equation 3.120 is sufficient to derive some characteristics exhibited by all poor conductors. T o do so, first recall that the propagation constant γis given in general as follows: γ2 = −ω2µǫc (3.121) Therefore: γ = √ −ω2µǫc (3.122) In general a number has two square roots, so some caution is required here. In this case, we may proceed as follows: γ = jω√ µ √ ǫ′ − jǫ′′ = j ω √ µǫ′ √ 1 − jǫ′′ ǫ′ (3.123) The requirement that ǫ′′/ǫ′ ≪ 1 for a poor conductor allows this expression to be “linearized. ” For this, we invoke the binomial series representation: (1 + x)n = 1 + nx+ n(n− 1) 2! x2 + ... (3.124) where xand nare, for our purposes, any constants; and “... ” indicates the remaining terms in this infinite",Electromagnetics_Vol2.pdf "2! x2 + ... (3.124) where xand nare, for our purposes, any constants; and “... ” indicates the remaining terms in this infinite series, with each term containing the factor xn with n> 2. If x≪ 1, then all terms containing xn with n≥ 2 will be very small relative to the first two terms of the series. Thus, (1 + x)n ≈ 1 + nx for x≪ 1 (3.125) Applying this to the present problem: ( 1 − jǫ′′ ǫ′ )1/ 2 ≈ 1 − jǫ′′ 2ǫ′ (3.126) where we have used n= 1/2 and x= −jǫ′′/ǫ′. Applying this approximation to Equation 3.123, we obtain: γ ≈ jω √ µǫ′ ( 1 − jǫ′′ 2ǫ′ ) ≈ jω √ µǫ′ + ω √ µǫ′ ǫ′′ 2ǫ′ (3.127) At this point, we are able to identify an expression for the phase propagation constant: β ≜ Im {γ} ≈ ω √ µǫ′ (poor conductor) (3.128) Remarkably , we find that βfor a poor conductor is approximately equal to βfor an ideal dielectric. For the attenuation constant, we find α≜ Re {γ} ≈ ω √ µǫ′ ǫ′′ 2ǫ′ (poor conductor) (3.129) Alternati vely , this expression may be written in the following form: α≈ 1 2βǫ′′",Electromagnetics_Vol2.pdf "α≜ Re {γ} ≈ ω √ µǫ′ ǫ′′ 2ǫ′ (poor conductor) (3.129) Alternati vely , this expression may be written in the following form: α≈ 1 2βǫ′′ ǫ′ (poor conductor) (3.130) Presuming that ǫc is determined entirely by ohmic loss, then ǫ′′ ǫ′ = σ ωǫ (3.131) Under this condition, Equation 3.129 may be rewritten: α≈ ω √ µǫ′ σ 2ωǫ (poor conductor) (3.132) Since ǫ′ = ǫunder these assumptions, the expression simplifies to α≈ σ 2 √ µ ǫ = 1 2ση (poor conductor) (3.133) where η≜ √ µ/ǫ′ is the wave impedance presuming lossless material. This result is remarkable for two reasons: First, factors of ωhave been eliminated, so there is no dependence on frequency separate from the frequency dependence of the constitutive parameters σ, µ, and ǫ. These parameters vary slowly with frequency , so the value of αfor a poor conductor also varies slowly with frequency . Second, we see α is proportional to σand η. This makes it quite easy to anticipate how the attenuation constant is affected by",Electromagnetics_Vol2.pdf "is proportional to σand η. This makes it quite easy to anticipate how the attenuation constant is affected by changes in conductivity and wave impedance in poor conductors. Finally , what is the wave impedance in a poor conductor? In contrast to η, ηc is potentially complex-valued and may depend on σ. First, recall: ηc = √ µ ǫ′ · [ 1 − jǫ′′ ǫ′ ] −1/ 2 (3.134)",Electromagnetics_Vol2.pdf "3.11. GOOD CONDUCTORS 43 Applying the same approximation applied to γearlier, this may be written ηc ≈ √ µ ǫ′ · [ 1 − jǫ′′ 2ǫ′ ] (poor conductor) (3.135) W e see that for a poor conductor, Re{ ηc} ≈ ηand that Im{ηc} ≪ Re {ηc}. The usual approximation in this case is simply ηc ≈ η (poor conductor) (3.136) Additional Reading: • “Binomial series” on Wikipedia. 3.11 Good Conductors [m0157] A good conductor is a material which behaves in most respects as a perfect conductor, yet exhibits significant loss. Now , we have to be very careful: The term “loss” applied to the concept of a “conductor” means something quite different from the term “loss” applied to other types of materials. Let us take a moment to disambiguate this term. Conductors are materials which are intended to efficiently sustain current, which requires high conductivity σ. In contrast, non-conductors are materials which are intended to efficiently sustain the electric field, which requires low σ. “Loss” for a",Electromagnetics_Vol2.pdf "materials which are intended to efficiently sustain the electric field, which requires low σ. “Loss” for a non-conductor (see in particular “poor conductors, ” Section 3.10) means the conversion of energy in the electric field into current. In contrast, “loss” for a conductor refers to energy already associated with current, which is subsequently dissipated in resistance. Summarizing: A good (“low-loss”) conductor is a material with high conductivity , such that power dissipated in the resistance of the material is low . A quantitative criterion for a good conductor can be obtained from the concept of complex permittivity ǫc, which has the form: ǫc = ǫ′ − jǫ′′ (3.137) Recall that ǫ′′ is proportional to conductivity (σ ) and so ǫ′′ is very large for a good conductor. Therefore, we may identify a good conductor using the ratio ǫ′′/ǫ′, which is sometimes referred to as “loss tangent” (see Section 3.5). Using this quantity we define a good conductor as a material for which: ǫ′′",Electromagnetics_Vol2.pdf "tangent” (see Section 3.5). Using this quantity we define a good conductor as a material for which: ǫ′′ ǫ′ ≫ 1 (good conductor) (3.138) This condition is met for most materials classified as “metals, ” and especially for metals exhibiting very high conductivity such as gold, copper, and aluminum. A good conductor is a material having loss tan- gent much greater than 1.",Electromagnetics_Vol2.pdf "44 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA The imprecise definition of Equation 3.138 is sufficient to derive some characteristics that are common to materials over a wide range of conductivity . T o derive these characteristics, first recall that the propagation constant γis given in general as follows: γ2 = −ω2µǫc (3.139) Therefore: γ = √ −ω2µǫc (3.140) In general, a number has two square roots, so some caution is required here. In this case, we may proceed as follows: γ = jω√µ √ ǫ′ − jǫ′′ = j ω √ µǫ′ √ 1 − jǫ′′ ǫ′ (3.141) Since ǫ′′/ǫ′ ≫ 1 for a good conductor, γ ≈ jω √ µǫ′ √ −jǫ′′ ǫ′ ≈ jω √ µǫ′′ √ −j (3.142) T o proceed, we must determine the principal value of√−j. The answer is that √−j = (1 − j) / √ 2.5 Continuing: γ ≈ j ω √ µǫ′′ 2 + ω √ µǫ′′ 2 (3.143) W e are now able to identify expressions for the attenuation and phase propagation constants: α≜ Re {γ} ≈ ω √ µǫ′′ 2 (good conductor) (3.144) β ≜ Im { γ} ≈ α (good conductor) (3.145) Remarkably",Electromagnetics_Vol2.pdf "attenuation and phase propagation constants: α≜ Re {γ} ≈ ω √ µǫ′′ 2 (good conductor) (3.144) β ≜ Im { γ} ≈ α (good conductor) (3.145) Remarkably , we find that α≈ βfor a good conductor, and neither αnor βdepend on ǫ′. In the special case that ǫc is determined entirely by conductivity loss (i.e., σ >0) and is not accounting 5 You can confirm this simply by squaring this result. The easiest way to derive this result is to work in polar form, in which −j is 1 at an angle of −π/2, and the square root operation consists of taking the square root of the magnitude and dividing the phase by 2. for delayed polarization response (as described in Section 3.4), then ǫ′′ = σ ω (3.146) Under this condition, Equation 3.144 may be rewritten: α≈ ω √ µσ 2ω = √ ωµσ 2 (good conductor) (3.147) Since ω= 2πf, another possible form for this expression is α≈ √ πfµσ (good conductor) (3.148) The conductivity of most materials changes very slowly with frequency , so this expression indicates",Electromagnetics_Vol2.pdf "expression is α≈ √ πfµσ (good conductor) (3.148) The conductivity of most materials changes very slowly with frequency , so this expression indicates that α(and β) increases approximately in proportion to the square root of frequency for good conductors. This is commonly observed in electrical engineering applications. For example, the attenuation rate of transmission lines increases approximately as √f. This is so because the principal contribution to the attenuation is resistance in the conductors comprising the line. The attenuation rate for signals conveyed by transmission lines is approximately proportional to the square root of frequency . Let us now consider the wave impedance ηc in a good conductor. Recall: ηc = √ µ ǫ′ · [ 1 − jǫ′′ ǫ′ ] −1/ 2 (3.149) Applying the same approximation applied to γearlier in this section, the previous expression may be written ηc ≈ √ µ ǫ′ · [ −jǫ′′ ǫ′ ] −1/ 2 (good conductor) ≈ √ µ ǫ′′ · 1√−j (3.150) W e’ve already established that √−j = (1 − j) /",Electromagnetics_Vol2.pdf "ηc ≈ √ µ ǫ′ · [ −jǫ′′ ǫ′ ] −1/ 2 (good conductor) ≈ √ µ ǫ′′ · 1√−j (3.150) W e’ve already established that √−j = (1 − j) / √ 2. Applying that result here: ηc ≈ √ µ ǫ′′ · √ 2 1 − j (3.151)",Electromagnetics_Vol2.pdf "3.11. GOOD CONDUCTORS 45 Now multiplying numerator and denominator by 1 + j, we obtain ηc ≈ √ µ 2ǫ′′ · ( 1 + j) (3.152) In the special case that ǫc is determined entirely by conductivity loss and is not accounting for delayed polarization response, then ǫ′′ = σ/ω, and we find: ηc ≈ √ µω 2σ · (1 + j) (3.153) There are at least two other ways in which this expression is commonly written. First, we can use ω= 2πf to obtain: ηc ≈ √ πfµ σ · (1 + j) (3.154) Second, we can use the fact that α≈ √πfµσ for good conductors to obtain: ηc ≈ α σ · (1 + j) (3.155) In any event, we see that the magnitude of the wave impedance bears little resemblance to the wave impedance for a poor conductor. In particular, there is no dependence on the physical permittivity ǫ′ = ǫ, as we saw also for αand β. In this sense, the concept of permittivity does not apply to good conductors, and especially so for perfect conductors. Note also that ψη, the phase of ηc, is always ≈ π/4",Electromagnetics_Vol2.pdf "permittivity does not apply to good conductors, and especially so for perfect conductors. Note also that ψη, the phase of ηc, is always ≈ π/4 for a good conductor, in contrast to ≈ 0 for a poor conductor. This has two implications that are useful to know . First, since ηc is the ratio of the magnitude of the electric field intensity to the magnitude of the magnetic field intensity , the phase of the magnetic field will be shifted by ≈ π/4 relative to the phase of the electric field in a good conductor. Second, recall from Section 3.7 that the power density for a wave is proportional to cos ψη. Therefore, the extent to which a good conductor is able to “extinguish” a wave propagating through it is determined entirely by α, and specifically is proportional to e−αl where lis distance traveled through the material. In other words, only a perfect conductor (σ → ∞) is able to completely suppress wave propagation, whereas waves are always able to penetrate some distance into",Electromagnetics_Vol2.pdf "only a perfect conductor (σ → ∞) is able to completely suppress wave propagation, whereas waves are always able to penetrate some distance into any conductor which is merely “good. ” A measure of this distance is the skin depth of the material. The concept of skin depth is presented in Section 3.12. The dependence of βon conductivity leads to a particularly surprising result for the phase velocity of the beleaguered waves that do manage to propagate within a good conductor. Recall that for both lossless and low-loss (“poor conductor”) materials, the phase velocity vp is either exactly or approximately c/√ ǫr, where ǫr ≜ ǫ′/ǫ0, resulting in typical phase velocities within one order of magnitude of c. For a good conductor, we find instead: vp = ω β ≈ ω√πfµσ (good conductor) (3.156) and since ω= 2πf: vp ≈ √ 4πf µσ (good conductor) (3.157) Note that the phase velocity in a good conductor increases with frequency and decreases with conductivity . In contrast to poor conductors and",Electromagnetics_Vol2.pdf "Note that the phase velocity in a good conductor increases with frequency and decreases with conductivity . In contrast to poor conductors and non-conductors, the phase velocity in good conductors is usually a tiny fraction of c. For example, for a non-magnetic (µ ≈ µ0) good conductor with typical σ∼ 106 S/m, we find vp ∼ 100 km/s at 1 GHz – just ∼ 0.03% of the speed of light in free space. This result also tells us something profound about the nature of signals that are conveyed by transmission lines. Regardless of whether we analyze such signals as voltage and current waves associated with the conductors or in terms of guided waves between the conductors, we find that the phase velocity is within an order of magnitude or so of c. Thus, the information conveyed by signals propagating along transmission lines travels primarily within the space between the conductors, and not within the conductors. Information cannot travel primarily in the",Electromagnetics_Vol2.pdf "between the conductors, and not within the conductors. Information cannot travel primarily in the conductors, as this would then result in apparent phase velocity which is orders of magnitude less than c, as noted previously . Remarkably , classical transmission line theory employing the R′, G′, C′, L′ equivalent circuit model 6 gets this right, even though that approach does not explicitly consider the possibility of guided waves traveling between the conductors. 6 Depending on the version of this book, this topic may appear in another volume.",Electromagnetics_Vol2.pdf "46 CHAPTER 3. W A VE PROP AGA TION IN GENERAL MEDIA 3.12 Skin Depth [m0158] The electric and magnetic fields of a wave are diminished as the wave propagates through lossy media. The magnitude of these fields is proportional to e−αl where α≜ Re {γ} is the attenuation constant (SI base units of m −1), γis the propagation constant, and lis the distance traveled. Although the rate at which magnitude is reduced is completely described by α, particular values of αtypically do not necessarily provide an intuitive sense of this rate. An alternative way to characterize attenuation is in terms of skin depth δs, which is defined as the distance at which the magnitude of the electric and magnetic fields is reduced by a factor of 1/e. In other words: e−αδs = e−1 ∼= 0.368 (3.158) Skin depth δs is the distance over which the mag- nitude of the electric or magnetic field is reduced by a factor of 1/e∼= 0.368. Since power is proportional to the square of the field",Electromagnetics_Vol2.pdf "nitude of the electric or magnetic field is reduced by a factor of 1/e∼= 0.368. Since power is proportional to the square of the field magnitude, δs may also be interpreted as the distance at which the power in the wave is reduced by a factor of (1/e)2 ∼= 0.135. In yet other words: δs is the distance at which ∼ = 86.5% of the power in the wave is lost. This definition for skin depth makes δs easy to compute: From Equation 3.158, it is simply δs = 1 α (3.159) The concept of skin depth is most commonly applied to good conductors. For a good conductor, α≈ √πfµσ (Section 3.11), so δs ≈ 1√πfµσ (good conductors) (3.160) Example 3.3. Skin depth of aluminum. Aluminum, a good conductor, exhibits σ≈ 3.7 × 107 S/m and µ≈ µ0 over a broad range of radio frequencies. Using Equation 3.160, we find δs ∼ 26 µm at 10 MHz. Aluminum sheet which is 1/16-in ( ∼= 1.59 mm) thick can also be said to have a thickness of ∼ 61δs at 10 MHz. The reduction in the power density of an electromagnetic wave after",Electromagnetics_Vol2.pdf "thick can also be said to have a thickness of ∼ 61δs at 10 MHz. The reduction in the power density of an electromagnetic wave after traveling through this sheet will be ∼ ( e−α(61δs) )2 = ( e−α(61/α) )2 = e−122 which is effectively zero from a practical engineering perspective. Therefore, 1/16-in aluminum sheet provides excellent shielding from electromagnetic waves at 10 MHz. At 1 kHz, the situation is significantly different. At this frequency , δs ∼ 2.6 mm, so 1/16-in aluminum is only ∼ 0.6δs thick. In this case the power density is reduced by only ∼ ( e−α(0.6δ s) )2 = ( e−α(0.6/α) )2 = e−1.2 ≈ 0.3 This is a reduction of only ∼ 70% in power density . Therefore, 1/16-in aluminum sheet provides very little shielding at 1 kHz. [m0183]",Electromagnetics_Vol2.pdf "3.12. SKIN DEPTH 47 Image Credits Fig. 3.1: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Poynting%E2%80%99s theorem illustration.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 3.2: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Uniform plane wave incident cylindrical surface.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 3.3: c⃝ K.A. Mauritz, https://commons.wikimedia.org/wiki/File:Dielectric responses.svg, Used with permission (see URL) and modified by author. Fig. 3.4: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:T otal current in phasor domain.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 3.5: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Loss tangent definition.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "Chapter 4 Curr ent Flow in Imperfect Conductors 4.1 AC Current Flow in a Good Conductor [m0069] In this section, we consider the distribution of current in a conductor which is imperfect (i.e., a “good conductor”) and at frequencies greater than DC. T o establish context, consider the simple DC circuit shown in Figure 4.1. In this circuit, the current source provides a steady current which flows through a cylinder-shaped wire. As long as the conductivity σ (SI base units of S/m) of the wire is uniform throughout the wire, the current density J (SI base units of A/m 2) is uniform throughout the wire. Now let us consider the AC case. Whereas the electric field intensity E is constant in the DC case, E exists as a wave in the AC case. In a good conductor, the c⃝ C. W ang CC BY -SA 4.0 Figure 4.1: Current flow in cylinder at DC. magnitude of E decreases in proportion to e−αd where αis the attenuation constant and dis distance traversed by the wave. The attenuation constant",Electromagnetics_Vol2.pdf "magnitude of E decreases in proportion to e−αd where αis the attenuation constant and dis distance traversed by the wave. The attenuation constant increases with increasing σ, so the rate of decrease of the magnitude of E increases with increasing σ. In the limiting case of a perfect conductor, α→ ∞ and so E → 0 everywhere inside the material. Any current within the wire must be the result of either an impressed source or it must be a response to E. Without either of these, we conclude that in the AC case, J → 0 everywhere inside a perfect conductor. 1 But if J = 0 in the material, then how does current pass through the wire? W e are forced to conclude that the current must exist as a surface current ; i.e., entirely outside the wire, yet bound to the surface of the wire. Thus: In the AC case, the current passed by a perfectly- conducting material lies entirely on the surface of the material. The perfectly-conducting case is unobtainable in",Electromagnetics_Vol2.pdf "conducting material lies entirely on the surface of the material. The perfectly-conducting case is unobtainable in practice, but the result gives us a foothold from which we may determine what happens when σis not infinite. If σis merely finite, then αis also finite and subsequently wave magnitude may be non-zero over finite distances. Let us now consider the direction in which this putative wave propagates. The two principal directions in the present problem are parallel to the 1 Y ou might be tempted to invoke Ohm’s law (J = σE) to argue against this conclusion. However, Ohm’s law provides no useful information about the current in this case, since σ → ∞ at the same time E → 0. What Ohm’s law is really saying in this case is that E = J/σ → 0 because J must be finite and σ → ∞ . Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "4.1. AC CURRENT FLOW IN A GOOD CONDUCTOR 49 axis of the wire and perpendicular to the axis of the wire. W aves propagating in any other direction may be expressed as a linear combination of waves traveling in the principal directions, so we need only consider the principal directions to obtain a complete picture. Consider waves propagating in the perpendicular direction first. In this case, we presume a boundary condition in the form of non-zero surface current, which we infer from the perfectly-conducting case considered previously . W e also note that E deep inside the wire must be weaker than E closer to the surface, since a wave deep inside the wire must have traversed a larger quantity of material than a wave measured closer to the surface. Applying Ohm’s law (J = σE), the current deep inside the wire must similarly diminish for a good conductor. W e conclude that a wave traveling in the perpendicular direction exists and propagates toward the center of the wire,",Electromagnetics_Vol2.pdf "that a wave traveling in the perpendicular direction exists and propagates toward the center of the wire, decreasing in magnitude with increasing distance from the surface. W e are unable to infer the presence of a wave traveling in the other principal direction – i.e., along the axis of the wire – since there is no apparent boundary condition to be satisfied on either end of the wire. Furthermore, the presence of such a wave would mean that different cross-sections of the wire exhibit different radial distributions of current. This is not consistent with physical observations. W e conclude that the only relevant wave is one which travels from the surface of the wire inward. Since the current density is proportional to the electric field magnitude, we conclude: In the AC case, the current passed by a wire com- prised of a good conductor is distributed with maximum current density on the surface of the wire, and the current density decays exponen-",Electromagnetics_Vol2.pdf "prised of a good conductor is distributed with maximum current density on the surface of the wire, and the current density decays exponen- tially with increasing distance from the surface. This phenomenon is known as the skin effect, referring to the notion of current forming a skin-like layer below the surface of the wire. The effect is illustrated in Figure 4.2. Since αincreases with increasing frequency , we see that the specific distribution of current within the wire by Biezl (modified) (public domain) Figure 4.2: Distribution of AC current in a wire of cir- cular cross-section. Shading indicates current density . depends on frequency . In particular, the current will be concentrated close to the surface at high frequencies, uniformly distributed throughout the wire at DC, and in an intermediate state for intermediate frequencies. Additional Reading: • “Skin effect” on Wikipedia.",Electromagnetics_Vol2.pdf "50 CHAPTER 4. CURRENT FLOW IN IMPERFECT CONDUCTORS 4.2 Impedance of a Wire [m0159] The goal of this section is to determine the impedance – the ratio of potential to current – of a wire. The answer to this question is relatively simple in the DC (“steady current”) case: The impedance is found to be equal to the resistance of the wire, which is given by R= l σA (DC) (4.1) where lis the length of the wire and Ais the cross-sectional area of the wire. Also, the impedance of a wire comprised of a perfect conductor at any frequency is simply zero, since there is no mechanism in the wire that can dissipate or store energy in this case. However, all practical wires are comprised of good – not perfect – conductors, and of course many practical signals are time-varying, so the two cases above do not address a broad category of practical interest. The more general case of non-steady currents in imperfect conductors is complicated by the fact that the current",Electromagnetics_Vol2.pdf "more general case of non-steady currents in imperfect conductors is complicated by the fact that the current in an imperfect conductor is not uniformly distributed in the wire, but rather is concentrated near the surface and decays exponentially with increasing distance from the surface (this is determined in Section 4.1). W e are now ready to consider the AC case for a wire comprised of a good but imperfect conductor. What is the impedance of the wire if the current source is sinusoidally-varying? Equation 4.1 for the DC case was determined by first obtaining expressions for the potential (V ) and net current (I ) for a length-l section of wire in terms of the electric field intensity E in the wire. T o follow that same approach here, we require an expression for I in terms of E that accounts for the non-uniform distribution of current. This is quite difficult to determine in the case of a cylindrical wire. However, we may develop an approximate solution",Electromagnetics_Vol2.pdf "difficult to determine in the case of a cylindrical wire. However, we may develop an approximate solution by considering a surface which is not cylindrical, but rather planar. Here we go: Consider the experiment described in Figure 4.3. Here, a semi-infinite region filled with a homogeneous good conductor meets a semi-infinite region of free space along a planar interface at z= 0, with increasing zcorresponding to increasing depth into the material. A plane wave propagates in the +ˆz direction, beginning from just inside the structure’s surface. The justification for presuming the existence of this wave was presented in Section 4.1. The electric field intensity is given by ˜E = ˆxE0e−αze−jβz (4.2) where E0 is an arbitrary complex-valued constant. The current density is given by Ohm’s law of electromagnetics:2 ˜J = σ˜E = ˆxσE0e−αze−jβz (4.3) Recall that α= δ−1 s where δs is skin depth (see Section 3.12). Also, for a good conductor, we know that β ≈ α(Section 3.11). Using these relationships,",Electromagnetics_Vol2.pdf "s where δs is skin depth (see Section 3.12). Also, for a good conductor, we know that β ≈ α(Section 3.11). Using these relationships, we may rewrite Equation 4.3 as follows: ˜J ≈ ˆxσE0e−z/δ s e−jz/δ s = ˆxσE0e−(1+j)z/δ s (4.4) The net current ˜I is obtained by integrating ˜J over any cross-section S through which all the current flows; i.e., ˜I = ∫ S ˜J · ds (4.5) Here, the simplest solution is obtained by choosing S to be a rectangular surface that is perpendicular to the direction of ˜J at x= 0. This is shown in Figure 4.4. c⃝ C. W ang CC BY -SA 4.0 Figure 4.3: Experiment used to determine current density and resistance in the AC case.",Electromagnetics_Vol2.pdf "4.2. IMPEDANCE OF A WIRE 51 c⃝ Y . Zhao CC BY -SA 4.0 Figure 4.4: Choice of S for calculating net current I. The dimensions of S are width W in the ydimension and extending to infinity in the zdirection. Then we have ˜I ≈ ∫ W y=0 ∫ ∞ z=0 ( ˆxσE0e−(1+j)z/δ s ) · (ˆx dydz ) = σE0W ∫ ∞ z=0 e−(1+j)z/δ s dz (4.6) For convenience, let us define the constant K ≜ (1 + j)/δs. Since Kis constant with respect to z, the remaining integral is straightforward to evaluate: ∫ ∞ 0 e−Kzdz= − 1 Ke−Kz ⏐⏐⏐ ⏐ ∞ 0 = + 1 K (4.7) Incorporating this result into Equation 4.6, we obtain: ˜I ≈ σE0W δs 1 + j (4.8) W e calculate ˜V for a length lof the wire as follows: ˜V = − ∫ 0 x=l ˜E · dl (4.9) 2 To be clear, this is the “point form” of Ohm’s law , as opposed to the circuit theory form (V = IR). where we have determined that x= 0 corresponds to the “+” terminal and x= lcorresponds to the “− ” terminal.3 The path of integration can be any path that begins and ends at the proscribed terminals. The",Electromagnetics_Vol2.pdf "terminal.3 The path of integration can be any path that begins and ends at the proscribed terminals. The simplest path to use is one along the surface, parallel to the xaxis. Along this path, z= 0 and thus ˜E = ˆxE0. For this path: ˜V = − ∫ 0 x=l (ˆxE0) · (ˆxdx) = E0l (4.10) The impedance Zmeasured across terminals at x= 0 and x= lis now determined to be: Z ≜ ˜V ˜I ≈ 1 + j σδs · l W (4.11) The resistance is simply the real part, so we obtain R≈ l σ(δsW) (A C case) (4.12) The quantity Rin this case is referred to specifically as the ohmic resistance, since it is due entirely to the limited conductivity of the material as quantified by Ohm’s law . 4 Note the resemblance to Equation 4.1 (the solution for the DC case): In the AC case, the product δsW, having units of area, plays the role of the physical cross-section S. Thus, we see an interesting new interpretation of the skin depth δs: It is the depth to which a uniform (DC) current would need to flow in",Electromagnetics_Vol2.pdf "interpretation of the skin depth δs: It is the depth to which a uniform (DC) current would need to flow in order to produce a resistance equal to the observed (AC) resistance. Equations 4.11 and 4.12 were obtained for a good conductor filling an infinite half-space, having a flat surface. How well do these results describe a cylindrical wire? The answer depends on the radius of the wire, a. For δs ≪ a, Equations 4.11 and 4.12 are excellent approximations, since δs ≪ aimplies that most of the current lies in a thin shell close to the surface of the wire. In this case, the model used to develop the equations is a good approximation for any given radial slice through the wire, and we are 3 If this is not clear, recall that the electric field vector must point away from positive charge (thus, the + terminal). 4 This is in contrast to other ways that voltage and current can be related; for example, the non-linear V -I characteristic of a diode, which is not governed by Ohm’s law .",Electromagnetics_Vol2.pdf "52 CHAPTER 4. CURRENT FLOW IN IMPERFECT CONDUCTORS justified in replacing W with the circumference 2πa. Thus, we obtain the following expressions: Z ≈ 1 + j σδs · l 2πa ( δs ≪ a) (4.13) and so R≈ l σ(δs2πa) ( δs ≪ a) (4.14) The impedance of a wire of length l and radius a≫ δs is given by Equation 4.13. The resistance of such a wire is given by Equation 4.14. If, on the other hand, a<δ s or merely ∼ δs, then current density is significant throughout the wire, including along the axis of the wire. In this case, we cannot assume that the current density decays smoothly to zero with increasing distance from the surface, and so the model leading to Equation 4.13 is a poor approximation. The frequency required for validity of Equation 4.13 can be determined by noting that δs ≈ 1/√ πfµσ for a good conductor; therefore, we require 1√πfµσ ≪ a (4.15) for the derived expressions to be valid. Solving for f, we find: f ≫ 1 πµσa2 (4.16) F or commonly-encountered wires comprised of",Electromagnetics_Vol2.pdf "1√πfµσ ≪ a (4.15) for the derived expressions to be valid. Solving for f, we find: f ≫ 1 πµσa2 (4.16) F or commonly-encountered wires comprised of typical good conductors, this condition applies at frequencies in the MHz regime and above. These results lead us to one additional interesting finding about the AC resistance of wires. Since δs ≈ 1/√πfµσ for a good conductor, Equation 4.14 may be rewritten in the following form: R≈ 1 2 √ µf πσ · l a (4.17) W e have found that Ris approximately proportional to √f. For example, increasing frequency by a factor of 4 increases resistance by a factor of 2. This frequency dependence is evident in all kinds of practical wires and transmission lines. Summarizing: The resistance of a wire comprised of a good but imperfect conductor is proportional to the square root of frequency . At this point, we have determined that resistance is given approximately by Equation 4.17 for δs ≪ a, corresponding to frequencies in the MHz regime and",Electromagnetics_Vol2.pdf "given approximately by Equation 4.17 for δs ≪ a, corresponding to frequencies in the MHz regime and above, and by Equation 4.1 for δs ≫ a, typically corresponding to frequencies in the kHz regime and below . W e have also found that resistance changes slowly with frequency; i.e., in proportion to √ f. Thus, it is often possible to roughly estimate resistance at frequencies between these two frequency regimes by comparing the DC resistance from Equation 4.1 to the AC resistance from Equation 4.17. An example follows. Example 4.1. Resistance of the inner conductor of RG-59. Elsewhere we have considered RG-59 coaxial cable (see the section “Coaxial Line, ” which may appear in another volume depending on the version of this book). W e noted that it was not possible to determine the AC resistance per unit length R′ for RG-59 from purely electrostatic and magnetostatic considerations. W e are now able to consider the resistance per unit length of",Electromagnetics_Vol2.pdf "length R′ for RG-59 from purely electrostatic and magnetostatic considerations. W e are now able to consider the resistance per unit length of the inner conductor, which is a solid wire of the type considered in this section. Let us refer to this quantity as R′ ic. Note that R′ = R′ ic + R′ oc (4.18) where R′ oc is the resistance per unit length of the outer conductor. R′ oc remains a bit too complicated to address here. However, R′ ic is typically much greater than R′ oc, so R′ ∼ R′ ic. That is, we get a pretty good idea of R′ for RG-59 by considering the inner conductor alone. The relevant parameters of the inner conductor are µ≈ µ0, σ∼= 2.28 × 107 S/m, and",Electromagnetics_Vol2.pdf "4.2. IMPEDANCE OF A WIRE 53 a∼= 0.292 mm. Using Equation 4.17, we find: R′ ic ≜ Ric l = 1 2 √ µf πσ · 1 a ∼ = ( 227 µΩ · m−1 · Hz−1 / 2 )√ f (4.19) Using Expression 4.16, we find this is valid only for f ≫ 130 kHz. So, for example, we may be confident that R′ ic ≈ 0.82 Ω/m at 13 MHz. At the other extreme (f ≪ 130 kHz), Equation 4.1 (the DC resistance) is a better estimate. In this low frequency case, we estimate that R′ ic ≈ 0.16 Ω/m and is approximately constant with frequency . W e now have a complete picture: As frequency is increased from DC to 13 MHz, we expect that R′ ic will increase monotonically from ≈ 0.16 Ω/m to ≈ 0.82 Ω/m, and will continue to increase in proportion to √ f from that value. Returning to Equation 4.11, we see that resistance is not the whole story here. The impedance Z = R+ jX also has a reactive component X equal to the resistance R; i.e., X ≈ R≈ l σ(δs2πa) (4.20) This is unique to good conductors at AC; that is, we",Electromagnetics_Vol2.pdf "to the resistance R; i.e., X ≈ R≈ l σ(δs2πa) (4.20) This is unique to good conductors at AC; that is, we see no such reactance at DC. Because this reactance is positive, it is often referred to as an inductance. However, this is misleading since inductance refers to the ability of a structure to store energy in a magnetic field, and energy storage is decidedly not what is happening here. The similarity to inductance is simply that this reactance is positive, as is the reactance associated with inductance. As long as we keep this in mind, it is reasonable to model the reactance of the wire as an equivalent inductance: Leq ≈ 1 2πf · l σ(δs2πa) (4.21) No w substituting an expression for skin depth: Leq ≈ 1 2πf · √ πfµ σ · l 2πa = 1 4π3/ 2 √ µ σf · l a (4.22) for a wire having a circular cross-section with δs ≪ a. The utility of this description is that it facilitates the modeling of wire reactance as an inductance in an equivalent circuit. Summarizing:",Electromagnetics_Vol2.pdf "δs ≪ a. The utility of this description is that it facilitates the modeling of wire reactance as an inductance in an equivalent circuit. Summarizing: A practical wire may be modeled using an equiv- alent circuit consisting of an ideal resistor (Equa- tion 4.17) in series with an ideal inductor (Equa- tion 4.22). Whereas resistance increases with the square root of frequency , inductance decreases with the square root of frequency . If the positive reactance of a wire is not due to physical inductance, then to what physical mechanism shall we attribute this effect? A wire has reactance because there is a phase shift between potential and current. This is apparent by comparing Equation 4.6 to Equation 4.10. This is the same phase shift that was found to exist between the electric and magnetic fields propagating in a good conductor, as explained in Section 3.11. Example 4.2. Equi valent inductance of the inner conductor of RG-59. Elsewhere in the book we worked out that the",Electromagnetics_Vol2.pdf "explained in Section 3.11. Example 4.2. Equi valent inductance of the inner conductor of RG-59. Elsewhere in the book we worked out that the inductance per unit length L′ of RG-59 coaxial cable was about 370 nH/m. W e calculated this from magnetostatic considerations, so the reactance associated with skin effect is not included in this estimate. Let’s see how L′ is affected by skin effect for the inner conductor. Using Equation 4.22 with µ= µ0, σ∼= 2.28 × 107 S/m, and a∼ = 0.292 mm, we find Leq ≈ ( 3.61 × 10−5 H·m−1·Hz1/ 2) l √f (4.23) Per unit length: L′ eq ≜ Leq l ≈ 3.61 × 10−5 H ·Hz1/ 2 √f (4.24) This equals the magnetostatic inductance per unit length (≈ 370 nH/m) at f ≈ 9.52 kHz, and decreases with increasing frequency . Summarizing: The equivalent inductance",Electromagnetics_Vol2.pdf "54 CHAPTER 4. CURRENT FLOW IN IMPERFECT CONDUCTORS associated with skin effect is as important as the magnetostatic inductance in the kHz regime, and becomes gradually less important with increasing frequency . Recall that the phase velocity in a low-loss transmission line is approximately 1/ √ L′C′. This means that skin effect causes the phase velocity in such lines to decrease with decreasing frequency . In other words: Skin effect in the conductors comprising com- mon transmission lines leads to a form of disper- sion in which higher frequencies travel faster than lower frequencies. This phenomenon is known as chromatic dispersion, or simply “dispersion, ” and leads to significant distortion for signals having large bandwidths. Additional Reading: • “Skin effect” on Wikipedia. 4.3 Surface Impedance [m0160] In Section 4.2, we derived the following expression for the impedance Zof a good conductor having width W, length l, and which is infinitely deep: Z ≈ 1 + j σδs · l",Electromagnetics_Vol2.pdf "for the impedance Zof a good conductor having width W, length l, and which is infinitely deep: Z ≈ 1 + j σδs · l W (A C case) (4.25) where σis conductivity (SI base units of S/m) and δs is skin depth. Note that δs and σare constitutive parameters of material, and do not depend on geometry; whereas land W describe geometry . With this in mind, we define the surface impedance ZS as follows: ZS ≜ 1 + j σδs (4.26) so that Z ≈ ZS l W (4.27) Unlik e the terminal impedance Z, ZS is strictly a materials property . In this way , it is like the intrinsic or “wave” impedance η, which is also a materials property . Although the units of ZS are those of impedance (i.e., ohms), surface impedance is usually indicated as having units of “Ω/□ ” (“ohms per square”) to prevent confusion with the terminal impedance. Summarizing: Surface impedance ZS (Equation 4.26) is a ma- terials property having units of Ω/□, and which characterizes the AC impedance of a material in-",Electromagnetics_Vol2.pdf "Surface impedance ZS (Equation 4.26) is a ma- terials property having units of Ω/□, and which characterizes the AC impedance of a material in- dependently of the length and width of the mate- rial. Surface impedance is often used to specify sheet materials used in the manufacture of electronic and semiconductor devices, where the real part of the surface impedance is more commonly known as the surface resistance or sheet resistance. Additional Reading: • “Sheet resistance” on Wikipedia. [m0184]",Electromagnetics_Vol2.pdf "4.3. SURF ACE IMPEDANCE 55 Image Credits Fig. 4.1: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Current flow in cylinder new .svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 4.2: Biezl, https://commons.wikimedia.org/wiki/File:Skin depth.svg, public domain. Modified from original. Fig. 4.3: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Experiment for current density and resistance.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 4.4: c⃝ Y ahuiZ (Y . Zhao), https://commons.wikimedia.org/wiki/File:Figure4.4.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Modified by author.",Electromagnetics_Vol2.pdf "Chapter 5 W a ve Reflection and T ransmission 5.1 Plane W aves at Normal Incidence on a Planar Boundary [m0161] When a plane wave encounters a discontinuity in media, reflection from the discontinuity and transmission into the second medium is possible. In this section, we consider the scenario illustrated in Figure 5.1: a uniform plane wave which is normally incident on the planar boundary between two semi-infinite material regions. By “normally-incident” we mean the direction of propagation ˆk is perpendicular to the boundary . W e shall assume that the media are “simple” and lossless (i.e., the imaginary component of permittivity ǫ′′ is equal to zero) and therefore the media are completely defined by a real-valued permittivity and a real-valued permeability . Figure 5.1 shows the wave incident on the boundary , which is located at the z= 0 plane. The electric field intensity ˜Ei of this wave is given by ˜Ei(z) = ˆxEi 0e−jβ1z , z≤ 0 (5.1) where β1 = ω√ µ1ǫ1 is the phase propagation",Electromagnetics_Vol2.pdf "intensity ˜Ei of this wave is given by ˜Ei(z) = ˆxEi 0e−jβ1z , z≤ 0 (5.1) where β1 = ω√ µ1ǫ1 is the phase propagation constant in Region 1 and Ei 0 is a complex-valued constant. ˜Ei serves as the “stimulus” in this problem. That is, all other contributions to the total field may be expressed in terms of ˜Ei. In fact, all other contributions to the total field may be expressed in terms of Ei 0. From the plane wave relationships, we determine that the associated magnetic field intensity is ˜Hi(z) = ˆy Ei 0 η1 e−jβ1z , z≤ 0 (5.2) where η1 = √ µ1/ǫ1 is the wave impedance in Region 1. The possibility of a reflected plane wave propagating in exactly the opposite direction is inferred from two pieces of evidence: The general solution to the wave equation, which includes terms corresponding to waves traveling in both +ˆz or −ˆz; and the geometrical symmetry of the problem, which precludes waves traveling in any other directions. The symmetry of the problem also precludes a change of",Electromagnetics_Vol2.pdf "geometrical symmetry of the problem, which precludes waves traveling in any other directions. The symmetry of the problem also precludes a change of polarization, so the reflected wave should have no ˆy component. Therefore, we may be confident that the reflected electric field has the form ˜Er(z) = ˆxBe+jβ1z , z≤ 0 (5.3) c⃝ C. W ang CC BY -SA 4.0 Figure 5.1: A uniform plane wave normally incident on the planar boundary between two semi-infinite ma- terial regions. Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "5.1. PLANE W A VES A T NORMAL INCIDENCE ON A PLANAR BOUNDAR Y 57 where Bis a complex-valued constant that remains to be determined. Since the direction of propagation for the reflected wave is −ˆz, we have from the plane wave relationships that ˜Hr(z) = −ˆy B η1 e+jβ1z , z≤ 0 (5.4) Similarly , we infer the existence of a “transmitted” plane wave propagating on the z >0 side of the boundary . The symmetry of the problem precludes any direction of propagation other than +z, and with no possibility of a wave traveling in the −ˆz direction for z >0. Therefore, we may be confident that the transmitted electric field has the form: ˜Et(z) = ˆxCe−jβ2z , z≥ 0 (5.5) and an associated magnetic field having the form ˜Ht(z) = ˆy C η2 e−jβ2z , z≥ 0 (5.6) where β2 = ω√µ2ǫ2 and η2 = √ µ2/ǫ2 are the phase propagation constant and wave impedance, respectively , in Region 2. The constant C, like B, is a complex-valued constant that remains to be determined.",Electromagnetics_Vol2.pdf "respectively , in Region 2. The constant C, like B, is a complex-valued constant that remains to be determined. At this point, the only unknowns in this problem are the complex-valued constants Band C. Once these values are known, the problem is completely solved. These values can be determined by the application of boundary conditions at z= 0. First, recall that the tangential component of the total electric field intensity must be continuous across a material boundary . T o apply this boundary condition, let us define ˜E1 and ˜E2 to be the total electric field intensities in Regions 1 and 2, respectively . The total field in Region 1 is the sum of incident and reflected fields, so ˜E1(z) = ˜Ei(z) + ˜Er(z) (5.7) The field in Region 2 is simply ˜E2(z) = ˜Et(z) (5.8) Also, we note that all field components are already tangent to the boundary . Thus, continuity of the tangential component of the electric field across the boundary requires ˜E1(0) = ˜E2(0), and therefore",Electromagnetics_Vol2.pdf "tangential component of the electric field across the boundary requires ˜E1(0) = ˜E2(0), and therefore ˜Ei(0) + ˜Er(0) = ˜Et(0) (5.9) Now employing Equations 5.1, 5.3, and 5.5, we obtain: Ei 0 + B = C (5.10) Clearly a second equation is required to determine both Band C. This equation can be obtained by enforcing the boundary condition on the magnetic field. Recall that any discontinuity in the tangential component of the total magnetic field intensity must be supported by a current flowing on the surface. There is no impressed current in this problem, and there is no reason to suspect a current will arise in response to the fields present in the problem. Therefore, the tangential components of the magnetic field must be continuous across the boundary . This becomes the same boundary condition that we applied to the total electric field intensity , so the remaining steps are the same. W e define ˜H1 and ˜H2 to be the total magnetic field intensities in Regions 1 and 2,",Electromagnetics_Vol2.pdf "steps are the same. W e define ˜H1 and ˜H2 to be the total magnetic field intensities in Regions 1 and 2, respectively . The total field in Region 1 is ˜H1(z) = ˜Hi(z) + ˜Hr(z) (5.11) The field in Region 2 is simply ˜H2(z) = ˜Ht(z) (5.12) The boundary condition requires ˜H1(0) = ˜H2(0), and therefore ˜Hi(0) + ˜Hr(0) = ˜Ht(0) (5.13) Now employing Equations 5.2, 5.4, and 5.6, we obtain: Ei 0 η1 − B η1 = C η2 (5.14) Equations 5.10 and 5.14 constitute a linear system of two simultaneous equations with two unknowns. A straightforward method of solution is to first eliminate Cby substituting the left side of Equation 5.10 into Equation 5.14, and then to solve for B. One obtains: B = Γ 12Ei 0 (5.15) where Γ 12 ≜ η2 − η1 η2 + η1 (5.16) Γ 12 is known as a reflection coefficient. The subscript “12” indicates that this coefficient applies for",Electromagnetics_Vol2.pdf "58 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION incidence from Region 1 toward Region 2. W e may now solve for Cby substituting Equation 5.15 into Equation 5.10. W e find: C = (1 + Γ 12) Ei 0 (5.17) Now summarizing the solution: ˜Er(z) = ˆxΓ 12Ei 0e+jβ1z , z≤ 0 (5.18) ˜Et(z) = ˆx (1 + Γ 12) Ei 0e−jβ2z , z≥ 0 (5.19) Equations 5.18 and 5.19 are the reflected and transmitted fields, respectively , in response to the incident field given in Equation 5.1 in the normal incidence scenario shown in Figure 5.1. Expressions for ˜Hr and ˜Ht may be obtained by applying the plane wave relationships to the preceding expressions. It is useful to check this solution by examining some special cases. First: If the material in Region 2 is identical to the material in Region 1, then there should be no reflection and ˜Et = ˜Ei. In this case, η2 = η1, so Γ 12 = 0, and we obtain the expected result. A second case of practical interest is when Region 2 is a perfect conductor. First, note that this may seem",Electromagnetics_Vol2.pdf "A second case of practical interest is when Region 2 is a perfect conductor. First, note that this may seem at first glance to be a violation of the “lossless” assumption made at the beginning of this section. While it is true that we did not explicitly account for the possibility of a perfect conductor in Region 2, let’s see what the present analysis has to say about this case. If the material in Region 2 is a perfect conductor, then there should be no transmission since the electric field is zero in a perfect conductor. In this case, η2 = 0 since the ratio of electric field intensity to magnetic field intensity is zero in Region 2, and subsequently Γ 12 = −1 and 1 + Γ 12 = 0. As expected, ˜Et is found to be zero, and the reflected electric field experiences a sign change as required to enforce the boundary condition ˜Ei(0) + ˜Er(0) = 0. Thus, we obtained the correct answer because we were able to independently determine that η2 = 0 in a perfect conductor.",Electromagnetics_Vol2.pdf "Thus, we obtained the correct answer because we were able to independently determine that η2 = 0 in a perfect conductor. When Region 2 is a perfect conductor, the reflec- tion coefficient Γ 12 = −1 and the solution de- scribed in Equations 5.18 and 5.19 applies. It may be helpful to note the very strong analogy between reflection of the electric field component of a plane wave from a planar boundary and the reflection of a voltage wave in a transmission line from a terminating impedance. In a transmission line, the voltage reflection coefficient Γ is given by Γ = ZL − Z0 ZL + Z0 (5.20) where ZL is the load impedance and Z0 is the characteristic impedance of the transmission line. Comparing this to Equation 5.16, we see η1 is analogous to Z0 and η2 is analogous to ZL. Furthermore, we see the special case η2 = η1, considered previously , is analogous to a matched load, and the special case η2 = 0, also considered previously , is analogous to a short-circuit load.",Electromagnetics_Vol2.pdf "load, and the special case η2 = 0, also considered previously , is analogous to a short-circuit load. In the case of transmission lines, we were concerned about what fraction of the power was delivered into a load and what fraction of the power was reflected from a load. A similar question applies in the case of plane wave reflection. In this case, we are concerned about what fraction of the power density is transmitted into Region 2 and what fraction of the power density is reflected from the boundary . The time-average power density Si ave associated with the incident wave is: Si ave = |Ei 0|2 2η1 (5.21) presuming that Ei 0 is expressed in peak (as opposed to rms) units. Similarly , the time-average power density Sr ave associated with the reflected wave is: Sr ave = ⏐⏐Γ 12Ei 0 ⏐ ⏐2 2η1 = |Γ 12|2 ⏐⏐Ei 0 ⏐ ⏐2 2η1 = |Γ 12|2 Si av e (5.22) From the principle of conservation of power, the power density St ave transmitted into Region 2 must be",Electromagnetics_Vol2.pdf "5.1. PLANE W A VES A T NORMAL INCIDENCE ON A PLANAR BOUNDAR Y 59 equal to the incident power density minus the reflected power density . Thus: St ave = Si ave − Sr ave = ( 1 − |Γ 12|2) Si ave (5.23) In other words, the ratio of power density transmitted into Region 2 to power density incident from Region 1 is St ave Siav e = 1 − |Γ 12|2 (5.24) Ag ain, the analogy to transmission line theory is evident. The fractions of power density reflected and transmitted relative to power density incident are given in terms of the reflection coefficient Γ 12 by Equations 5.22 and 5.24, respectively . Finally , note that a variety of alternative expressions exist for the reflection coefficient Γ 12. Since the wave impedance η= √ µ/ǫin lossless media, and since most lossless materials are non-magnetic (i.e., exhibit µ≈ µ0), it is possible to express Γ 12 purely in terms of permittivity for these media. Assuming µ= µ0, we find: Γ 12 = η2 − η1 η2 + η1 = √ µ0/ǫ2 − √ µ0/ǫ1√ µ0/ǫ2 + √ µ0/ǫ1 = √ǫ1 − √ǫ2 √ǫ1 + √ǫ2",Electromagnetics_Vol2.pdf "of permittivity for these media. Assuming µ= µ0, we find: Γ 12 = η2 − η1 η2 + η1 = √ µ0/ǫ2 − √ µ0/ǫ1√ µ0/ǫ2 + √ µ0/ǫ1 = √ǫ1 − √ǫ2 √ǫ1 + √ǫ2 (5.25) Moreo ver, recall that permittivity can be expressed in terms of relative permittivity; that is, ǫ= ǫrǫ0. Making the substitution above and eliminating all extraneous factors of ǫ0, we find: Γ 12 = √ǫr1 − √ǫr2 √ǫr1 + √ǫr2 (5.26) where ǫr1 and ǫr2 are the relative permittivities in Regions 1 and 2, respectively . Example 5.1. Radio reflection from the surface of the Moon. At radio frequencies, the Moon can be modeled as a low-loss dielectric with relative permittivity of about 3. Characterize the efficiency of reflection of a radio wave from the Moon. Solution. At radio frequencies, a wavelength is many orders of magnitude less than the diameter of the Moon, so we are justified in treating the Moon’s surface as a planar boundary between free space and a semi-infinite region of lossy dielectric material. The reflection coefficient is",Electromagnetics_Vol2.pdf "Moon’s surface as a planar boundary between free space and a semi-infinite region of lossy dielectric material. The reflection coefficient is given approximately by Equation 5.26 with ǫr1 ≈ 1 and ǫr2 ∼ 3. Thus, Γ 12 ∼ − 0.27. Subsequently , the fraction of power reflected from the Moon relative to power incident is |Γ 12|2 ∼ 0.07; i.e., about 7%. In optics, it is common to make the definition n≜ √ ǫr where nis known as the index of refraction or refractive index. 1 In terms of the indices of refraction n1 and n2 for Regions 1 and 2, respectively: Γ 12 = n1 − n2 n1 + n2 (5.27) Additional Reading: • “Refractive index” on Wikipedia. 1 A bit of a misnomer, since the definition applies even when there is no refraction, as in the scenario considered in this section.",Electromagnetics_Vol2.pdf "60 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION 5.2 Plane W aves at Normal Incidence on a Material Slab [m0162] In Section 5.1, we considered what happens when a uniform plane wave is normally incident on the planar boundary between two semi-infinite media. In this section, we consider the problem shown in Figure 5.2: a uniform plane wave normally incident on a “slab” sandwiched between two semi-infinite media. This scenario arises in many practical engineering problems, including the design and analysis of filters and impedance-matching devices at RF and optical frequencies, the analysis of RF propagation through walls, and the design and analysis of radomes. The findings of Section 5.1 are an important stepping stone to the solution of this problem, so a review of Section 5.1 is recommended before reading this section. For consistency of terminology , let us refer to the problem considered in Section 5.1 as the “single-boundary” problem and the present (slab)",Electromagnetics_Vol2.pdf "For consistency of terminology , let us refer to the problem considered in Section 5.1 as the “single-boundary” problem and the present (slab) problem as the “double-boundary” problem. Whereas there are only two regions (“Region 1” and “Region 2”) in the single-boundary problem, in the double-boundary problem there is a third region that we shall refer to as “Region 3. ” W e assume that the media comprising each slab are “simple” and lossless (i.e., the imaginary component of permittivity ǫ′′ is equal to zero) and therefore the media are completely defined by a real-valued permittivity and a real-valued c⃝ C. W ang CC BY -SA 4.0 Figure 5.2: A uniform plane wave normally incident on a slab. permeability . The boundary between Regions 1 and 2 is at z= −d, and the boundary between Regions 2 and 3 is at z= 0. Thus, the thickness of the slab is d. In both problems, we presume an incident wave in Region 1 incident on the boundary with Region 2 having electric field intensity ˜Ei(z) = ˆxEi",Electromagnetics_Vol2.pdf "In both problems, we presume an incident wave in Region 1 incident on the boundary with Region 2 having electric field intensity ˜Ei(z) = ˆxEi 0e−jβ1z (Region 1) (5.28) where β1 = ω√ µ1ǫ1 is the phase propagation constant in Region 1. ˜Ei serves as the “stimulus” in this problem. That is, all other contributions to the total field may be expressed in terms of ˜Ei. From the plane wave relationships, we determine that the associated magnetic field intensity is ˜Hi(z) = ˆy Ei 0 η1 e−jβ1z (Re gion 1) (5.29) where η1 = √ µ1/ǫ1 is the wave impedance in Region 1. The symmetry arguments of the single-boundary problem apply in precisely the same way to the double-boundary problem. Therefore, we presume that the reflected electric field intensity is: ˜Er(z) = ˆxBe+jβ1z (Region 1) (5.30) where Bis a complex-valued constant that remains to be determined; and subsequently the reflected magnetic field intensity is: ˜Hr(z) = −ˆy B η1 e+jβ1z (Re gion 1) (5.31)",Electromagnetics_Vol2.pdf "be determined; and subsequently the reflected magnetic field intensity is: ˜Hr(z) = −ˆy B η1 e+jβ1z (Re gion 1) (5.31) Similarly , we infer the existence of a transmitted plane wave propagating in the +ˆz direction in Region 2. The electric and magnetic field intensities of this wave are given by: ˜Et2(z) = ˆxCe−jβ2z (Region 2) (5.32) and an associated magnetic field having the form: ˜Ht2(z) = ˆy C η2 e−jβ2z (Re gion 2) (5.33) where β2 = ω√µ2ǫ2 and η2 = √ µ2/ǫ2 are the phase propagation constant and wave impedance, respectively , in Region 2. The constant C, like B, is a",Electromagnetics_Vol2.pdf "5.2. PLANE W A VES A T NORMAL INCIDENCE ON A MA TERIAL SLAB 61 complex-valued constant that remains to be determined. Now let us consider the boundary between Regions 2 and 3. Note that ˜Et2 is incident on this boundary in precisely the same manner as ˜Ei is incident on the boundary between Regions 1 and 2. Therefore, we infer a reflected electric field intensity in Region 2 as follows: ˜Er2(z) = ˆxDe+jβ2z (Region 2) (5.34) where Dis a complex-valued constant that remains to be determined; and an associated magnetic field ˜Hr2(z) = −ˆy D η2 e+jβ2z (Re gion 2) (5.35) Subsequently , we infer a transmitted electric field intensity in Region 3 as follows: ˜Et(z) = ˆxFe−jβ3z (Region 3) (5.36) and an associated magnetic field having the form ˜Ht(z) = ˆy F η3 e−jβ3z (Re gion 3) (5.37) where β3 = ω√µ3ǫ3 and η3 = √ µ3/ǫ3 are the phase propagation constant and wave impedance, respectively , in Region 3. The constant F, like D, is a complex-valued constant that remains to be",Electromagnetics_Vol2.pdf "propagation constant and wave impedance, respectively , in Region 3. The constant F, like D, is a complex-valued constant that remains to be determined. W e infer no wave traveling in the (− ˆz) in Region 3, just as we inferred no such wave in Region 2 of the single-boundary problem. For convenience, T able 5.1 shows a complete summary of the field components we have just identified. Note that the total field intensity in each region is the sum of the field components in that region. For example, the total electric field intensity in Region 2 is ˜Et2 + ˜Er2. Now observe that there are four unknown constants remaining; namely B, C, D, and F. The double-boundary problem is completely solved once we have expressions for these constants in terms of the “given” quantities in the problem statement. Solutions for the unknown constants can be obtained by enforcing boundary conditions on the electric and magnetic fields at each of the two boundaries. As in",Electromagnetics_Vol2.pdf "by enforcing boundary conditions on the electric and magnetic fields at each of the two boundaries. As in the single-boundary case, the relevant boundary condition is that the total field should be continuous across each boundary . Applying this condition to the boundary at z= 0, we obtain: ˜Et2(0) + ˜Er2(0) = ˜Et(0) (5.38) ˜Ht2(0) + ˜Hr2(0) = ˜Ht(0) (5.39) Applying this condition to the boundary at z= −d, we obtain: ˜Ei(−d) + ˜Er(−d) = ˜Et2(−d) + ˜Er2(−d) (5.40) ˜Hi(−d) + ˜Hr(−d) = ˜Et2(−d) + ˜Er2(−d) (5.41) Making substitutions from T able 5.1 and dividing out common factors, Equation 5.38 becomes: C+ D= F (5.42) Equation 5.39 becomes: C η2 − D η2 = F η3 (5.43) Equation 5.40 becomes: Ei 0e+jβ1d+ Be−jβ1d = Ce+jβ2d+ De−jβ2d (5.44) Equation 5.41 becomes: Ei 0 η1 e+jβ1d − B η1 e−jβ1d = C η2 e+jβ2d − D η2 e−jβ2d (5.45) Equations 5.42–5.45 are recognizable as a system of 4 simultaneous linear equations with the number of unknowns equal to the number of equations. W e",Electromagnetics_Vol2.pdf "Equations 5.42–5.45 are recognizable as a system of 4 simultaneous linear equations with the number of unknowns equal to the number of equations. W e could simply leave it at that, however, some very useful insights are gained by solving this system of equations in a particular manner. First, note the resemblance between the situation at the z= 0 boundary in this problem and the situation at z= 0 boundary in the single-boundary problem. In fact, the two are the same problem, with the following transformation of variables (single-boundary → double-boundary): Ei 0 → C i.e., the independent variable (5.46) B → D i.e., reflection (5.47) C → F i.e., transmission (5.48)",Electromagnetics_Vol2.pdf "62 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION Electric Field Intensity Magnetic Field Intensity Region of V alidity Region 1 ˜Ei(z) = ˆxEi 0e−j β1z ˜Hi(z) = + ˆy ( Ei 0/η1 ) e−jβ1z z≤ − d ˜Er(z) = ˆxBe+jβ1z ˜Hr(z) = −ˆy (B/η1) e+jβ1z Region 2 ˜Et2(z) = ˆxC e−jβ2z ˜Ht2(z) = + ˆy (C/η2) e−jβ2z −d≤ z≤ 0 ˜Er2(z) = ˆxDe+jβ2z ˜Hr2(z) = −ˆy (D/η2) e+jβ2z Region 3 ˜Et(z) = ˆx Fe−jβ3z ˜Ht(z) = + ˆy (F/η3) e−jβ3z z≥ 0 T able 5.1: Field components in the double-boundary (slab) problem of Figure 5.2. It immediately follows that D= Γ 23C (5.49) and F = (1 + Γ 23) C (5.50) where Γ 23 ≜ η3 − η2 η3 + η2 (5.51) At this point, we could use the expressions we have just derived to eliminate Dand F in the system of four simultaneous equations identified earlier. This would reduce the problem to that of two equations in two unknowns – a dramatic simplification! However, even this is more work than is necessary , and a little cleverness at this point pays big dividends",Electromagnetics_Vol2.pdf "two unknowns – a dramatic simplification! However, even this is more work than is necessary , and a little cleverness at this point pays big dividends later. The key idea is that we usually have no interest in the fields internal to the slab; in most problems, we are interested merely in reflection into Region 1 from the z= −dboundary and transmission into Region 3 through the z= 0 interface. With this in mind, let us simply replace the two-interface problem in Figure 5.2 with an “equivalent” single-boundary problem shown in Figure 5.3. This problem is “equivalent” in the following sense only: Fields in Region 1 are identical to those in Region 1 of the original problem. The material properties in the region to the right of the z= −dboundary in the equivalent problem seem unlikely to be equal to those in Regions 2 or 3 of the original problem, so we define a new wave impedance ηeq to represent this new condition. If we can find an expression for ηeq,",Electromagnetics_Vol2.pdf "in Regions 2 or 3 of the original problem, so we define a new wave impedance ηeq to represent this new condition. If we can find an expression for ηeq, then we can develop a solution to the original (two-boundary) problem that looks like a solution to the equivalent (simpler, single-boundary) problem. c⃝ C. W ang CC BY -SA 4.0 Figure 5.3: Representing the double-boundary prob- lem as an equivalent single-boundary problem. T o obtain an expression for ηeq, we invoke the definition of wave impedance: It is simply the ratio of electric field intensity to magnetic field intensity in the medium. Thus: ηeq ≜ ˆx · ˜E2(z2) ˆy · ˜H2(z2) = ˆx · [ ˜Et2(z2) + ˜Er2( z2) ] ˆy · [ ˜Ht2(z2) + ˜Hr2( z2) ] (5.52) where z2 is any point in Region 2. For simplicity , let us choose z2 = −d. Making substitutions, we obtain: ηeq = Ce+jβ2d + De−jβ2d (C/η2) e+j β2d − (D/η2) e−jβ2d (5.53) Bringing the factor of η2 to the front and substituting D= Γ 23C: ηeq = η2 Ce+jβ2d + Γ 23Ce−jβ2d Ce+jβ2d − Γ 23C e−jβ2d (5.54)",Electromagnetics_Vol2.pdf "Bringing the factor of η2 to the front and substituting D= Γ 23C: ηeq = η2 Ce+jβ2d + Γ 23Ce−jβ2d Ce+jβ2d − Γ 23C e−jβ2d (5.54) Finally , we divide out the common factor of Cand multiply numerator and denominator by e−jβ2d,",Electromagnetics_Vol2.pdf "5.2. PLANE W A VES A T NORMAL INCIDENCE ON A MA TERIAL SLAB 63 yielding: ηeq = η2 1 + Γ 23e−j2β2d 1 − Γ 23e−j2 β2d (5.55) Equation 5.55 is the wave impedance in the re- gion to the right of the boundary in the equiva- lent scenario shown in Figure 5.3. “Equivalent” in this case means that the incident and reflected fields in Region 1 are identical to those in the original (slab) problem. T wo comments on this expression before proceeding. First: Note that if the materials in Regions 2 and 3 are identical, then η2 = η3, so Γ 23 = 0, and thus ηeq = η2, as expected. Second: Note that ηeq is, in general, complex-valued. This may initially seem troubling, since the imaginary component of the wave impedance is normally associated with general (e.g., possibly lossy) material. W e specifically precluded this possibility in the problem statement, so clearly the complex value of the wave impedance is not indicating loss. Instead, the non-zero phase of ηeq",Electromagnetics_Vol2.pdf "the complex value of the wave impedance is not indicating loss. Instead, the non-zero phase of ηeq represents the ability of the standing wave inside the slab to impart a phase shift between the electric and magnetic fields. This is precisely the same effect that one observes at the input of a transmission line: The input impedance Zin is, in general, complex-valued even if the line is lossless and the characteristic impedance and load impedance are real-valued. 2 In fact, the impedance looking into a transmission line is given by an expression of precisely the same form as Equation 5.55. This striking analogy between plane waves at planar boundaries and voltage and current waves in transmission lines applies broadly . W e can now identify an “equivalent reflection coefficient” Γ 1,eq for the scenario shown in Figure 5.3: Γ 1,eq ≜ ηeq − η1 ηeq + η1 (5.56) The quantity Γ 1,eq may now be used precisely in the same way as Γ 12 was used in the single-boundary",Electromagnetics_Vol2.pdf "Figure 5.3: Γ 1,eq ≜ ηeq − η1 ηeq + η1 (5.56) The quantity Γ 1,eq may now be used precisely in the same way as Γ 12 was used in the single-boundary problem to find the reflected fields and reflected power density in Region 1. 2 See the section “Input Impedance of a T erminated Lossless Transmission Line” for a reminder. This section may appear in a different volume depending on the version of this book. Example 5.2. Reflection of WiFi from a glass pane. A WiFi (wireless LAN) signal at a center frequency of 2.45 GHz is normally incident on a glass pane which is 1 cm thick and is well-characterized in this application as a lossless dielectric with ǫr = 4. The source of the signal is sufficiently distant from the window that the incident signal is well-approximated as a plane wave. Determine the fraction of power reflected from the pane. Solution. In this case, we identify Regions 1 and 3 as approximately free space, and Region 2 as the pane. Thus η1 = η3 = η0 ∼= 376.7 Ω (5.57) and η2 = η0 √ǫr",Electromagnetics_Vol2.pdf "3 as approximately free space, and Region 2 as the pane. Thus η1 = η3 = η0 ∼= 376.7 Ω (5.57) and η2 = η0 √ǫr ∼ = 188 .4 Ω (5.58) The reflection coefficient from Region 2 to Region 3 is Γ 23 = η3 − η2 η3 + η2 = η0 − η2 η0 + η2 ∼= 0.3333 (5.59) Gi ven f = 2.45 GHz, the phase propagation constant in the glass is β2 = 2π λ = 2πf√ǫr c ∼ = 102 .6 rad/m (5.60) Given d= 1 cm, the equivalent wave impedance is ηeq = η2 1 + Γ 23e−j2β2d 1 − Γ 23e−j2 β2d ∼ = 117.9 − j78.4 Ω (5.61) Next we calculate Γ 1,eq = ηeq − η1 ηeq + η1 ∼ = −0.4859 − j0 .2354 (5.62)",Electromagnetics_Vol2.pdf "64 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION The ratio of reflected power density to incident po wer density is simply the squared magnitude of this reflection coefficient, i.e.: Sr ave Siav e = |Γ 1,eq |2 = 0.292 ∼= 29.2% (5.63) where Sr av e and Si ave are the reflected and incident power densities, respectively . Since B = Γ 1,eq Ei 0, we have: ˜Er(z) = ˆxΓ 1,eq Ei 0e+jβ1z , z≤ − d (5.64) and ˜Hr(z) can be obtained from the plane wave relationships. If desired, it is now quite simple to obtain solutions for the electric and magnetic fields in Regions 2 and 3. However, it is the usually the power density transmitted into Region 3 that is of greatest interest. This power density is easily determined from the principle of conservation of power. If the loss in Region 2 is negligible, then no power can be dissipated there. In this case, all power not reflected from the z= −dinterface must be transmitted into Region 3. In other words: St ave Siav e = 1 − |Γ 1,eq |2 (5.65) where St av",Electromagnetics_Vol2.pdf "from the z= −dinterface must be transmitted into Region 3. In other words: St ave Siav e = 1 − |Γ 1,eq |2 (5.65) where St av e is the transmitted power density . Example 5.3. Transmission of WiFi through a glass pane. Continuing Example 5.2: What fraction of incident power passes completely through the glass pane? Solution. St ave Siav e = 1 − |Γ 1,eq |2 ∼= 70.8% (5.66) Additional Reading: • “Radome” on Wikipedia. 5.3 T otal T ransmission Through a Slab [m0163] Section 5.2 details the solution of the “single-slab” problem. This problem is comprised of three material regions: A semi-infinite Region 1, from which a uniform plane wave is normally incident; Region 2, the slab, defined by parallel planar boundaries separated by distance d; and a semi-infinite Region 3, through which the plane wave exits. The solution that was developed assumes simple media with negligible loss, so that the media in each region is characterized entirely by permittivity and permeability .",Electromagnetics_Vol2.pdf "loss, so that the media in each region is characterized entirely by permittivity and permeability . W e now focus on a particular class of applications involving this structure. In this class of applications, we seek total transmission through the slab. By “total transmission” we mean 100% of power incident on the slab is transmitted through the slab into Region 3, and 0% of the power is reflected back into Region 1. There are many applications for such a structure. One application is the radome, a protective covering which partially or completely surrounds an antenna, but nominally does not interfere with waves being received by or transmitted from the antenna. Another application is RF and optical wave filtering; that is, passing or rejecting waves falling within a narrow range of frequencies. In this section, we will first describe the conditions for total transmission, and then shall provide some examples of these applications. W e begin with characterization of the media.",Electromagnetics_Vol2.pdf "then shall provide some examples of these applications. W e begin with characterization of the media. Region 1 is characterized by its permittivity ǫ1 and permeability µ1, such that the wave impedance in Region 1 is η1 = √ µ1/ǫ1. Similarly , Region 2 is characterized by its permittivity ǫ2 and permeability µ2, such that the wave impedance in Region 2 is η2 = √ µ2/ǫ2. Region 3 is characterized by its permittivity ǫ3 and permeability µ3, such that the wave impedance in Region 3 is η3 = √ µ3/ǫ3. The analysis in this section also depends on β2, the phase propagation constant in Region 2, which is given by ω√µ2ǫ2. Recall that reflection from the slab is quantified by",Electromagnetics_Vol2.pdf "5.3. TOT AL TRANSMISSION THROUGH A SLAB 65 the reflection coefficient Γ 1,eq = ηeq − η1 ηeq + η1 (5.67) where ηeq is given by ηeq = η2 1 + Γ 23e−j2β2d 1 − Γ 23e−j2 β2d (5.68) and where Γ 23 is given by Γ 23 = η3 − η2 η3 + η2 (5.69) T otal transmission requires that Γ 1,eq = 0. From Equation 5.67 we see that Γ 1,eq is zero when η1 = ηeq. Now employing Equation 5.68, we see that total transmission requires: η1 = η2 1 + Γ 23e−j2β2d 1 − Γ 23e−j2 β2d (5.70) For convenience and clarity , let us define the quantity P ≜ e−j2β2d (5.71) Using this definition, Equation 5.70 becomes η1 = η2 1 + Γ 23P 1 − Γ 23P (5.72) Also, let us substitute Equation 5.69 for Γ 23, and multiply numerator and denominator by η3 + η2 (the denominator of Equation 5.69). W e obtain: η1 = η2 η3 + η2 + (η3 − η2)P η3 + η2 − (η3 − η2)P (5.73) Rearranging the numerator and denominator, we obtain: η1 = η2 (1 + P)η3 + (1 − P)η2 (1 − P)η3 + (1 + P)η2 (5.74) The parameters η1, η2, η3, β2, and ddefining any",Electromagnetics_Vol2.pdf "the numerator and denominator, we obtain: η1 = η2 (1 + P)η3 + (1 − P)η2 (1 − P)η3 + (1 + P)η2 (5.74) The parameters η1, η2, η3, β2, and ddefining any single-slab structure that exhibits total transmis- sion must satisfy Equation 5.74. Our challenge now is to identify combinations of parameters that satisfy this condition. There are two general categories of solutions. These categories are known as half-wave matching and quarter-wave matching. Half-wave matching applies when we have the same material on either side of the slab; i.e., η1 = η3. Let us refer to this common value of η1 and η3 as ηext. Then the condition for total transmission becomes: ηext = η2 (1 + P)ηext + (1 − P)η2 (1 − P)ηext + (1 + P)η2 (5.75) For the above condition to be satisfied, we need the fraction on the right side of the equation to be equal to ηext/η2. From Equation 5.71, the magnitude of P is always 1, so the first value of P you might think to try is P = +1. In fact, this value satisfies Equation 5.75.",Electromagnetics_Vol2.pdf "always 1, so the first value of P you might think to try is P = +1. In fact, this value satisfies Equation 5.75. Therefore, e−j2β2d = +1. This new condition is satisfied when 2β2d= 2πm, where m= 1,2,3,... (W e do not consider m≤ 0 to be valid solutions since these would represent zero or negative values of d.) Thus, we find d= πm β2 = λ2 2 m, where m= 1,2,3,... (5.76) where λ2 = 2π/β2 is the wavelength inside the slab. Summarizing: T otal transmission through a slab embedded in re gions of material having equal wave impedance (i.e., η1 = η3) may be achieved by setting the thickness of the slab equal to an integer number of half-wavelengths at the frequency of interest. This is known as half-wave matching. A remarkable feature of half-wave matching is that there is no restriction on the permittivity or permeability of the slab, and the only constraint on the media in Regions 1 and 3 is that they have equal wave impedance. Example 5.4. Radome design by half-wave matching.",Electromagnetics_Vol2.pdf "the media in Regions 1 and 3 is that they have equal wave impedance. Example 5.4. Radome design by half-wave matching. The antenna for a 60 GHz radar is to be protected from weather by a radome panel positioned directly in front of the radar. The panel is to be constructed from a low-loss material having µr ≈ 1 and ǫr = 4. T o have sufficient mechanical integrity , the panel must be at least 3 mm thick. What thickness should be",Electromagnetics_Vol2.pdf "66 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION used? Solution . This is a good application for half-wave matching because the material on either side of the slab is the same (presumably free space) whereas the material used for the slab is unspecified. The phase velocity in the slab is vp = c √ǫr ∼= 1.5 × 108 m/s (5.77) so the wavelength in the slab is λ2 = vp f ∼ = 2.5 mm (5.78) Thus, the minimum thickness of the slab that satisfies the half-wave matching condition is d= λ2/2 ∼= 1.25 mm. However, this does not meet the 3 mm minimum-thickness requirement. Neither does the next available thickness, d= λ2 ∼= 2.5 mm. The next-thickest option, d= 3λ2/2 ∼= 3.75 mm, does meet the requirement. Therefore, we select d∼= 3.75 mm. It should be emphasized that designs employing half-wave matching will be narrowband – that is, total only for the design frequency . As frequency increases or decreases from the design frequency , there will be increasing reflection and decreasing transmission.",Electromagnetics_Vol2.pdf "or decreases from the design frequency , there will be increasing reflection and decreasing transmission. Quarter-wave matching requires that the wave impedances in each region are different and related in a particular way . The quarter-wave solution is obtained by requiring P = −1, so that η1 = η2 (1 + P)η3 + (1 − P)η2 (1 − P)η3 + (1 + P)η2 = η2 η2 η3 (5.79) Solving this equation for wave impedance of the slab material, we find η2 = √η1η3 (5.80) Note that P = −1 is obtained when 2β2d= π+ 2πm where m= 0,1,2,.... Thus, we find d= π 2β2 + π β2 m = λ2 4 + λ2 2 m, where m= 0,1,2,... (5.81) Summarizing: T otal transmission is achieved through a slab by selecting η2 = √η1η3 and making the slab one- quarter wavelength at the frequency of interest, or some integer number of half-wavelengths thicker if needed. This is known as quarter-wave match- ing. Example 5.5. Radome design by quarter-wave matching. The antenna for a 60 GHz radar is to be protected from weather by a radome panel",Electromagnetics_Vol2.pdf "ing. Example 5.5. Radome design by quarter-wave matching. The antenna for a 60 GHz radar is to be protected from weather by a radome panel positioned directly in front of the radar. In this case, however, the antenna is embedded in a lossless material having µr ≈ 1 and ǫr = 2, and the radome panel is to be placed between this material and the outside, which we presume is free space. The material in which the antenna is embedded, and against which the radome panel is installed, is quite rigid so there is no minimum thickness requirement. However, the radome panel must be made from a material which is lossless and non-magnetic. Design the radome panel. Solution. The radome panel must be comprised of a material having η2 = √ η1η3 = √ η0√ 2 · η0 ∼= 317 Ω (5.82) Since the radome panel is required to be non-magnetic, the relative permittivity must be given by η2 = η0 √ǫr ⇒ ǫr = (η0 η2 )2 ∼= 1.41 (5.83) The phase velocity in the slab will be vp = c√ǫr ∼= 3 × 108 m/s√ 1.41 ∼ = 2",Electromagnetics_Vol2.pdf "given by η2 = η0 √ǫr ⇒ ǫr = (η0 η2 )2 ∼= 1.41 (5.83) The phase velocity in the slab will be vp = c√ǫr ∼= 3 × 108 m/s√ 1.41 ∼ = 2 .53 × 108 m/s (5.84) so the wavelength in the slab is λ2 = vp f ∼ = 2.53 × 108 m/s 60 × 109 Hz ∼ = 4 .20 mm (5.85)",Electromagnetics_Vol2.pdf "5.4. PROP AGA TION OF A UNIFORM PLANE W A VE IN AN ARBITRAR Y DIRECTION 67 Thus, the minimum possible thickness of the radome panel is d= λ2/4 ∼= 1.05 mm, and the relati ve permittivity of the radome panel must be ǫr ∼= 1.41. Additional Reading: • “Radome” on Wikipedia. 5.4 Propagation of a Uniform Plane W ave in an Arbitrary Direction [m0165] An example of a uniform plane wave propagating in a lossless medium is shown in Figure 5.4. This wave is expressed in the indicated coordinate system as follows: ˜E = ˆxE0e−jβz (5.86) This is a phasor-domain expression for the electric field intensity , so E0 is a complex-valued number representing the magnitude and reference phase of the sinusoidally-varying wave. The term “reference phase” is defined as the phase of ˜E at the origin of the coordinate system. Since the phase propagation constant βis real and positive, this wave is traveling in the +ˆz direction through simple lossless media. Note that electric field intensity vector is linearly",Electromagnetics_Vol2.pdf "in the +ˆz direction through simple lossless media. Note that electric field intensity vector is linearly polarized in a direction parallel to ˆx. Depending on the position in space (and, for the physical time-domain waveform, time), ˜E points either in the +ˆx direction or the −ˆx direction. Let us be a bit more specific about the direction of the vector ˜E. T o do this, let us define the reference polarization to be the direction in which ˜E points when Re { E0e−jβz} ≥ 0; i.e., when the phase of ˜E is between −π/2 and +π/2 radians. Thus, the reference polarization of ˜E in Equation 5.86 is always +ˆx. Note that Equation 5.86 indicates a specific combination of reference polarization and direction of propagation. However, we may obtain any other combination of reference polarization and direction of c⃝ C. W ang CC BY -SA 4.0 Figure 5.4: The plane wave described by Equa- tion 5.86.",Electromagnetics_Vol2.pdf "68 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION c⃝ C. W ang CC BY -SA 4.0 Figure 5.5: The same plane wave described in a ro- tated coordinate system, yielding Equation 5.87. c⃝ C. W ang CC BY -SA 4.0 Figure 5.6: The same plane wave described in yet an- other rotation of the coordinate system, yielding Equa- tion 5.88. propagation by rotation of the Cartesian coordinate system. For example, if we rotate the +xaxis of the coordinate system into the position originally occupied by the +yaxis, then the very same wave is expressed as ˜E = −ˆyE0e−jβz (5.87) This is illustrated in Figure 5.5. At first glance, it appears that the reference polarization has changed; however, this is due entirely to our choice of coordinate system. That is, the reference polarization is precisely the same; it is only the coordinate system used to describe the reference polarization that has changed. Let us now rotate the +zaxis of the coordinate system around the xaxis into the position originally",Electromagnetics_Vol2.pdf "changed. Let us now rotate the +zaxis of the coordinate system around the xaxis into the position originally occupied by the −zaxis. Now the very same wave is expressed as ˜E = + ˆyE0e+jβz (5.88) This is illustrated in Figure 5.6. At first glance, it appears that the direction of propagation has reversed; but, again, it is only the coordinate system that has changed, and not the direction of propagation. Summarizing: Equations 5.86, 5.87, and 5.88 all represent the same wave. They only appear to be c⃝ C. W ang CC BY -SA 4.0 Figure 5.7: A plane wave described in ray-fixed coor- dinates, yielding Equation 5.89. different due to our choice for the orientation of the coordinate system in each case. Now consider the same thought experiment for the infinite number of cases in which the wave does not propagate in one of the three basis directions of the Cartesian coordinate system. One situation in which we face this complication is when the wave is",Electromagnetics_Vol2.pdf "Cartesian coordinate system. One situation in which we face this complication is when the wave is obliquely incident on a surface. In this case, it is impossible to select a single orientation of the coordinate system in which the directions of propagation, reference polarization, and surface normal can all be described in terms of one basis vector each. T o be clear: There is no fundamental limitation imposed by this slipperiness of the coordinate system. However, practical problems such as the oblique-incidence scenario described above are much easier to analyze if we are able to express waves in a system of coordinates which always yields the same expressions. Fortunately , this is easily accomplished using ray-fixed coordinates. Ray-fixed coordinates are a unique set of coordinates that are determined from the characteristics of the wave, as opposed to being determined arbitrarily and separately from the characteristics of the wave. The ray-fixed",Electromagnetics_Vol2.pdf "characteristics of the wave, as opposed to being determined arbitrarily and separately from the characteristics of the wave. The ray-fixed representation of a uniform plane wave is: ˜E(r) = ˆeE0e−jk·r (5.89) This is illustrated in Figure 5.7. In this representation, r is the position at which ˜E is evaluated, ˆe is the reference polarization expressed as a unit vector, and k is the unit vector ˆk in the direction of propagation, times β; i.e.: k ≜ ˆkβ (5.90) Consider Equation 5.86 as an example. In this case, ˆe = ˆx, k = ˆzβ, and (as always) r = ˆxx+ ˆyy+ ˆzz (5.91)",Electromagnetics_Vol2.pdf "5.4. PROP AGA TION OF A UNIFORM PLANE W A VE IN AN ARBITRAR Y DIRECTION 69 Thus, k · r = βz, as expected. In ray-fixed coordinates, a wave can be represented by one – and only one – expression, which is the same expression regardless of the orientation of the “global” coordinate system. Moreover, only two basis directions (namely , ˆk and ˆe) must be defined. Should a third coordinate be required, either ˆk × ˆe or ˆe × ˆk may be selected as the additional basis direction. Note that the first choice has the possibly-useful feature that is the reference polarization of the magnetic field intensity ˜H. A general procedure for recasting the ray-fixed representation into a “coordinate-bound” representation is as follows. First, we represent k in the new fixed coordinate system; e.g.: k = kxˆx + kyˆy + kzˆz (5.92) where kx ≜ βˆk · ˆx (5.93) ky ≜ βˆk · ˆy (5.94) kz ≜ βˆk · ˆz (5.95) Then, k · r = kxx+ kyy+ kzz (5.96) With this expression in hand, Equation 5.89 may be rewritten as:",Electromagnetics_Vol2.pdf "ky ≜ βˆk · ˆy (5.94) kz ≜ βˆk · ˆz (5.95) Then, k · r = kxx+ kyy+ kzz (5.96) With this expression in hand, Equation 5.89 may be rewritten as: ˜E = ˆeE0e−jkxxe−jky ye−jkz z (5.97) If desired, one can similarly decompose ˆe into its Cartesian components as follows: ˆe = ( ˆe · ˆx) ˆx + (ˆe · ˆy) ˆy + (ˆe · ˆz) ˆz (5.98) Thus, we see that the ray-fixed representation of Equation 5.89 accommodates all possible combinations of direction of propagation and reference polarization. Example 5.6. Plane wave propagating away from the z-axis. A uniform plane wave exhibiting a reference polarization of ˆz propagates away from the z-axis. Develop representations of this wave in ray-fixed and global Cartesian coordinates. Solution. As always, the ray-fixed representation is given by Equation 5.89. Since the reference polarization is ˆz, ˆe = ˆz. Propagating away from the z-axis means ˆk = ˆx cos φ+ ˆy sin φ (5.99) where φindicates the specific direction of propagation. For example, φ= 0 yields",Electromagnetics_Vol2.pdf "Propagating away from the z-axis means ˆk = ˆx cos φ+ ˆy sin φ (5.99) where φindicates the specific direction of propagation. For example, φ= 0 yields ˆk = + ˆx, φ= π/2 yields ˆk = + ˆy, and so on. Therefore, k ≜ βˆk = β(ˆx cos φ+ ˆy sin φ) (5.100) For completeness, note that the following factor appears in the phase-determining exponent in Equation 5.89: k · r = β(xcos φ+ ysin φ) (5.101) In this case, we see kx = βcos φ, ky = βsin φ, and kz = 0. Thus, the wave may be expressed in Cartesian coordinates as follows: ˜E = ˆzE0e−jβx cos φe−jβy sin φ (5.102)",Electromagnetics_Vol2.pdf "70 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION 5.5 Decomposition of a W ave into TE and TM Components [m0166] A broad range of problems in electromagnetics in volve scattering of a plane wave by a planar boundary between dissimilar media. Section 5.1 (“Plane W aves at Normal Incidence on a Planar Boundary Between Lossless Media”) addressed the special case in which the wave arrives in a direction which is perpendicular to the boundary (i.e., “normal incidence”). Analysis of the normal incidence case is simplified by the fact that the directions of field vectors associated with the reflected and transmitted are the same (except possibly with a sign change) as those of the incident wave. For the more general case in which the incident wave is obliquely incident (i.e., not necessarily normally-incident), the directions of the field vectors will generally be different. This added complexity is easily handled if we take the effort to represent the incident wave as the sum of two",Electromagnetics_Vol2.pdf "added complexity is easily handled if we take the effort to represent the incident wave as the sum of two waves having particular polarizations. These polarizations are referred to as transverse electric (TE) and transverse magnetic (TM). This section describes these polarizations and the method for decomposition of a plane wave into TE and TM components. W e will then be prepared to address the oblique incidence case in a later section. T o begin, we define the ray-fixed coordinate system shown in Figure 5.8. In this figure, ˆki is a unit vector indicating the direction in which the incident wave propagates. The unit normal ˆn is perpendicular to the boundary , and points into the region from which the wave is incident. W e now make the following definition: The plane of incidence is the plane in which both the normal to the surface ( ˆn) and the direction of propagation ( ˆki) lie. The TE-TM decomposition consists of finding the components of the electric and magnetic fields which",Electromagnetics_Vol2.pdf "propagation ( ˆki) lie. The TE-TM decomposition consists of finding the components of the electric and magnetic fields which are perpendicular (“transverse”) to the plane of incidence. Of the two possible directions that are perpendicular to the plane of incidence, we choose ˆe⊥, defined as shown in Figure 5.8. From the figure, we see that: ˆe⊥ ≜ ˆki × ˆn ⏐⏐ ⏐ˆki × ˆn ⏐ ⏐ ⏐ (5.103) Defined in this manner, ˆe⊥ is a unit vector which is perpendicular to both ˆki, and so may serve as a basis vector of a coordinate system which is attached to the incident ray . The remaining basis vector for this ray-fixed coordinate system is chosen as follows: ˆei ∥ ≜ ˆe⊥ × ˆki (5.104) Defined in this manner, ˆei ∥ is a unit vector which is perpendicular to both ˆe⊥ and ˆki, and parallel to the plane of incidence. Let us now examine an incident uniform plane wave in the new , ray-fixed coordinate system. W e begin with the following phasor representation of the electric field intensity: ˜Ei = ˆeiEi",Electromagnetics_Vol2.pdf "in the new , ray-fixed coordinate system. W e begin with the following phasor representation of the electric field intensity: ˜Ei = ˆeiEi 0e−jki·r (5.105) where ˆei is a unit vector indicating the reference polarization, Ei 0 is a complex-valued scalar, and r is a vector indicating the position at which ˜Ei is evaluated. W e may express ˆei in the ray-fixed coordinate system of Figure 5.8 as follows: ˆei = (ˆei · ˆe⊥ )ˆe⊥ + ( ˆei · ˆei ∥ ) ˆei ∥ + ( ˆei · ˆki ) ˆki (5.106) c⃝ C. W ang CC BY -SA 4.0 Figure 5.8: Coordinate system for TE-TM decompo- sition. Since both ˆki and ˆn lie in the plane of the page, this is also the plane of incidence.",Electromagnetics_Vol2.pdf "5.5. DECOMPOSITION OF A W A VE INTO TE AND TM COMPONENTS 71 The electric field vector is always perpendicular to the direction of propagation, so ˆei · ˆki = 0. This leaves: ˆei = (ˆei · ˆe⊥ )ˆe⊥ + ( ˆei · ˆei ∥ ) ˆei ∥ (5.107) Substituting this expression into Equation 5.105, we obtain: ˜Ei = ˆe⊥Ei TEe−jki·r + ˆei ∥ Ei TMe−jki·r (5.108) where Ei TE ≜ Ei 0 ˆei · ˆe⊥ (5.109) Ei TM ≜ Ei 0 ˆei · ˆei ∥ (5.110) The first term in Equation 5.108 is the transverse electric (TE) component of ˜Ei, so-named because it is the component which is perpendicular to the plane of incidence. The second term in Equation 5.108 is the transverse magnetic (TM) component of ˜Ei. The term “TM” refers to the fact that the magnetic field associated with this component of the electric field is perpendicular to the plane of incidence. This is apparent since the magnetic field vector is perpendicular to both the direction of propagation and the electric field vector. Summarizing:",Electromagnetics_Vol2.pdf "apparent since the magnetic field vector is perpendicular to both the direction of propagation and the electric field vector. Summarizing: The TE component is the component for which ˜Ei is perpendicular to the plane of incidence. The TM component is the component for which ˜Hi is perpendicular to the plane of incidence; i.e., the component for which ˜Ei is parallel to the plane of incidence. Finally , observe that the total wave is the sum of its TE and TM components. Therefore, we may analyze the TE and TM components separately , and know that the result for the combined wave is simply the sum of the results for the TE and TM components. As stated at the beginning of this section, the utility of the TE-TM decomposition is that it simplifies the analysis of wave reflection. This is because the analysis of the TE and TM cases is relatively simple, whereas direct analysis of the scattering of arbitrarily-polarized waves is relatively difficult. Note that the nomenclature “TE” and “TM” is",Electromagnetics_Vol2.pdf "whereas direct analysis of the scattering of arbitrarily-polarized waves is relatively difficult. Note that the nomenclature “TE” and “TM” is commonly but not universally used. Sometimes “TE” is referred to as “perpendicular” polarization, indicated using the subscript “⊥ ” or “s” (short for senkrecht, German for “perpendicular”). Correspondingly , “TM” is sometimes referred to as “parallel” polarization, indicated using the subscript “∥” or “p. ” Also, note that the TE component and TM component are sometimes referred to as the TE mode and TM mode, respectively . While the terms “component” and “mode” are synonymous for the single plane wave scenarios considered in this section, the terms are not synonymous in general. For example, the wave inside a waveguide may consist of multiple unique TE modes which collectively comprise the TE component of the field, and similarly the wave inside a waveguide may consist of multiple unique TM modes which",Electromagnetics_Vol2.pdf "of the field, and similarly the wave inside a waveguide may consist of multiple unique TM modes which collectively comprise the TM component of the field. Finally , consider what happens when a plane wave is normally-incident upon the boundary; i.e., when ˆki = −ˆn. In this case, Equation 5.103 indicates that ˆe⊥ = 0, so the TE-TM decomposition is undefined. The situation is simply that both Ei and Hi are already both perpendicular to the boundary , and there is no single plane that can be uniquely identified as the plane of incidence. W e refer to this case as transverse electromagnetic (TEM). A wave which is normally-incident on a planar surf ace is said to be transverse electromagnetic (TEM) with respect to that boundary . There is no unique TE-TM decomposition in this case. The fact that a unique TE-TM decomposition does not exist in the TEM case is of no consequence, because the TEM case is easily handled as a separate condition (see Section 5.1).",Electromagnetics_Vol2.pdf "72 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION 5.6 Plane W aves at Oblique Incidence on a Planar Boundary: TE Case [m0167] In this section, we consider the problem of reflection and transmission from a planar boundary between semi-infinite media for a transverse electric (TE) uniform plane wave. Before attempting this section, a review of Sections 5.1 (“Plane W aves at Normal Incidence on a Planar Boundary Between Lossless Media”) and 5.5 (“Decomposition of a W ave into TE and TM Components”) is recommended. Also, note that this section has much in common with Section 5.7 (“Plane W aves at Oblique Incidence on a Planar Boundary: TM Case”), although it is recommended to attempt the TE case first. The TE case is illustrated in Figure 5.9. The boundary between the two semi-infinite and lossless regions is located at the z= 0 plane. The wave is incident from Region 1. The electric field intensity ˜Ei TE of this wave is given by ˜Ei TE(r) = ˆyEi TEe−jki·r (5.111)",Electromagnetics_Vol2.pdf "Region 1. The electric field intensity ˜Ei TE of this wave is given by ˜Ei TE(r) = ˆyEi TEe−jki·r (5.111) In this expression, r is the position at which ˜Ei TE is evaluated, and ki = ˆkiβ1 (5.112) c⃝ C. W ang CC BY -SA 4.0 Figure 5.9: A TE uniform plane wave obliquely inci- dent on the planar boundary between two semi-infinite material regions. where ˆki is the unit vector indicating the direction of propagation and β1 = ω√µ1ǫ1 is the phase propagation constant in Region 1. ˜Ei TE serves as the “stimulus” in this problem, so all other contributions to the total field will be expressed in terms of quantities appearing in Equation 5.111. The presence of reflected and transmitted uniform plane waves is inferred from our experience with the normal incidence scenario (Section 5.1). There, as here, the symmetry of the problem indicates that the reflected and transmitted components of the electric field will have the same polarization as that of the",Electromagnetics_Vol2.pdf "reflected and transmitted components of the electric field will have the same polarization as that of the incident electric field. This is because there is nothing present in the problem that could account for a change in polarization. Thus, the reflected and transmitted fields will also be TE. Therefore, we postulate the following expression for the reflected wave: ˜Er(r) = ˆyBe−jkr ·r (5.113) where Bis an unknown, possibly complex-valued constant to be determined and kr = ˆkrβ1 (5.114) indicates the direction of propagation, which is also currently unknown. Similarly , we postulate the following expression for the transmitted wave: ˜Et(r) = ˆyCe−jkt·r (5.115) where Cis an unknown, possibly complex-valued constant to be determined; kt = ˆktβ2 (5.116) where ˆkt is the unit vector indicating the direction of propagation; and β2 = ω√ µ2ǫ2 is the phase propagation constant in Region 2. At this point, the unknowns in this problem are the constants Band C, as well as the directions ˆkr and",Electromagnetics_Vol2.pdf "propagation constant in Region 2. At this point, the unknowns in this problem are the constants Band C, as well as the directions ˆkr and ˆkt. W e may establish a relationship between Ei TE, B, and Cby application of boundary conditions at z= 0. First, recall that the tangential component of the total electric field intensity must be continuous across material boundaries. T o apply this boundary condition, let us define ˜E1 and ˜E2 to be the total electric fields in Regions 1 and 2, respectively . The",Electromagnetics_Vol2.pdf "5.6. PLANE W A VES A T OBLIQUE INCIDENCE ON A PLANAR BOUNDAR Y : TE CASE 73 total field in Region 1 is the sum of incident and reflected fields, so ˜E1(r) = ˜Ei TE(r) + ˜Er(r) (5.117) The total field in Region 2 is simply ˜E2(r) = ˜Et(r) (5.118) Next, note that all electric field components are already tangent to the boundary . Thus, continuity of the tangential component of the electric field across the boundary requires ˜E1(0) = ˜E2(0), and therefore ˜Ei TE(r0) + ˜Er(r0) = ˜Et(r0) (5.119) where r = r0 ≜ ˆxx+ ˆyysince z= 0 on the boundary . Now employing Equations 5.111, 5.113, and 5.115, we obtain: ˆyEi TEe−jki·r0 + ˆyBe−jkr ·r0 = ˆyCe−jkt·r0 (5.120) Dropping the vector ( ˆy) since it is the same in each term, we obtain: Ei TEe−jki·r0 + Be−jkr ·r0 = Ce−jkt·r0 (5.121) For Equation 5.121 to be true at every point r0 on the boundary , it must be true that ki · r0 = kr · r0 = kt · r0 (5.122) Essentially , we are requiring the phases of each field",Electromagnetics_Vol2.pdf "boundary , it must be true that ki · r0 = kr · r0 = kt · r0 (5.122) Essentially , we are requiring the phases of each field in Regions 1 and 2 to be matched at every point along the boundary . Any other choice will result in a violation of boundary conditions at some point along the boundary . This phase matching criterion will determine the directions of propagation of the reflected and transmitted fields, which we shall do later. First, let us use the phase matching criterion to complete the solution for the coefficients Band C. Enforcing Equation 5.122, we observe that Equation 5.121 reduces to: Ei TE + B = C (5.123) A second equation is needed since we currently have only one equation (Equation 5.123) and two unknowns (B and C). The second equation is c⃝ C. W ang CC BY -SA 4.0 Figure 5.10: Incident, reflected, and transmitted mag- netic field components associated with the TE electric field components shown in Figure 5.9. obtained by applying the appropriate boundary",Electromagnetics_Vol2.pdf "netic field components associated with the TE electric field components shown in Figure 5.9. obtained by applying the appropriate boundary conditions to the magnetic field. The magnetic field associated with each of the electric field components is identified in Figure 5.10. Note the orientations of the magnetic field vectors may be confirmed using the plane wave relationships: Specifically , the cross product of the electric and magnetic fields should point in the direction of propagation. Expressions for each of the magnetic field components is determined formally below . From the plane wave relationships, we determine that the incident magnetic field intensity is ˜Hi(r) = 1 η1 ˆki × ˜Ei TE (5.124) where η1 = √ µ1/ǫ1 is the wave impedance in Region 1. T o make progress requires that we express ˆki in the global fixed coordinate system. Here it is: ˆki = ˆx sin ψi + ˆz cos ψi (5.125) Thus: ˜Hi(r) = (ˆz sin ψi − ˆx cos ψi)Ei TE η1 e−jki·r (5.126) Similarly , we determine that the reflected magnetic",Electromagnetics_Vol2.pdf "Thus: ˜Hi(r) = (ˆz sin ψi − ˆx cos ψi)Ei TE η1 e−jki·r (5.126) Similarly , we determine that the reflected magnetic field has the form: ˜Hr(r) = 1 η1 ˆkr × ˜Er (5.127)",Electromagnetics_Vol2.pdf "74 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION In the global coordinate system: ˆkr = ˆx sin ψr − ˆz cos ψr (5.128) Thus: ˜Hr(r) = ( ˆz sin ψr + ˆx cos ψr) B η1 e−jkr ·r (5.129) The transmitted magnetic field has the form: ˜Ht(r) = 1 η2 ˆkt × ˜Et (5.130) In the global coordinate system: ˆkt = ˆx sin ψt + ˆz cos ψt (5.131) Thus: ˜Ht(r) = (ˆz sin ψt − ˆx cos ψt)C η2 e−jkt·r (5.132) The total magnetic field in Region 1 is the sum of incident and reflected fields, so ˜H1(r) = ˜Hi(r) + ˜Hr(r) (5.133) The magnetic field in Region 2 is simply ˜H2(r) = ˜Ht(r) (5.134) Since there is no current on the boundary , the tangential component of the total magnetic field intensity must be continuous across the boundary . Expressed in terms of the quantities already established, this boundary condition requires: ˆx · ˜Hi(r0) + ˆx · ˜Hr(r0) = ˆx · ˜Ht(r0) (5.135) where “ ˆx·” selects the component of the magnetic field that is tangent to the boundary . Evaluating this expression, we obtain: − ( cos ψi)Ei TE",Electromagnetics_Vol2.pdf "where “ ˆx·” selects the component of the magnetic field that is tangent to the boundary . Evaluating this expression, we obtain: − ( cos ψi)Ei TE η1 e−jki·r0 + ( cos ψr) B η1 e−jkr ·r0 = − ( cos ψt)C η2 e−jkt·r0 (5.136) No w employing the phase matching condition expressed in Equation 5.122, we find: − ( cos ψi)Ei TE η1 + ( cos ψr) B η1 = − ( cos ψt)C η2 (5.137) Equations 5.123 and 5.137 comprise a linear system of equations with unknowns Band C. This system of equations is easily solved for Bas follows. First, use Equation 5.123 to eliminate Cin Equation 5.137. The result is: − ( cos ψi)Ei TE η1 + ( cos ψr) B η1 = − ( cos ψt)Ei T E + B η2 (5.138) Solving this equation for B, we obtain: B = η2 cos ψi − η1 cos ψt η2 cos ψr + η1 cos ψt Ei T E (5.139) W e can express this result as a reflection coefficient as follows: B = Γ TEEi TE (5.140) where Γ TE ≜ η2 cos ψi − η1 cos ψt η2 cos ψr + η1 cos ψt (5.141) It is worth noting that Equation 5.141 becomes the",Electromagnetics_Vol2.pdf "follows: B = Γ TEEi TE (5.140) where Γ TE ≜ η2 cos ψi − η1 cos ψt η2 cos ψr + η1 cos ψt (5.141) It is worth noting that Equation 5.141 becomes the reflection coefficient for normal (TEM) incidence when ψi = ψr = ψt = 0, as expected. Returning to Equation 5.123, we now find C = (1 + Γ TE) Ei TE (5.142) Let us now summarize the solution. Given the TE electric field intensity expressed in Equation 5.111, we find: ˜Er(r) = ˆyΓ TEEi TEe−jkr ·r (5.143) ˜Et(r) = ˆy (1 + Γ TE) Ei TEe−jkt·r (5.144) This solution is complete except that we have not yet determined ˆkr, which is now completely determined by ψr via Equation 5.128, and ˆkt, which is now completely determined by ψt via Equation 5.131. In other words, we have not yet determined the directions of propagation ψr for the reflected wave and ψt for the transmitted wave. However, ψr and ψi can be found using Equation 5.122. Here we shall",Electromagnetics_Vol2.pdf "5.6. PLANE W A VES A T OBLIQUE INCIDENCE ON A PLANAR BOUNDAR Y : TE CASE 75 simply state the result, and in Section 5.8 we shall perform this part of the derivation in detail and with greater attention to the implications. One finds: ψr = ψi (5.145) and ψt = arcsin (β1 β2 sin ψi ) (5.146) Equation 5.145 is the unsurprising result that angle of reflection equals angle of incidence. Equation 5.146 – addressing angle of transmission – is a bit more intriguing. Astute readers may notice that there is something fishy about this equation: It seems possible for the argument of arcsin to be greater than one. This oddity is addressed in Section 5.8. Finally , note that Equation 5.145 allows us to eliminate ψr from Equation 5.141, yielding: Γ TE = η2 cos ψi − η1 cos ψt η2 cos ψi + η1 cos ψt (5.147) Thus, we obtain what is perhaps the most important finding of this section: The electric field reflection coefficient for oblique TE incidence, Γ TE, is given by Equation 5.147.",Electromagnetics_Vol2.pdf "finding of this section: The electric field reflection coefficient for oblique TE incidence, Γ TE, is given by Equation 5.147. The following example demonstrates the utility of this result. Example 5.7. Po wer transmission at an air-to-glass interface (TE case). Figure 5.11 illustrates a TE plane wave incident from air onto the planar boundary with glass. The glass exhibits relative permittivity of 2.1. Determine the power reflected and transmitted relative to power incident on the boundary . Solution. The power reflected relative to power incident is |Γ TE|2 whereas the power transmitted relative to power incident is 1 − |Γ TE|2. Γ TE may be calculated using Equation 5.147. Calculating the quantities that enter into this expression: η1 ≈ η0 ∼= 376.7 Ω (air) (5.148) c⃝ C. W ang CC BY -SA 4.0 Figure 5.11: A TE uniform plane wave incident from air to glass. η2 ≈ η0√ 2.1 ∼= 260 .0 Ω (glass) (5.149) ψi = 30 ◦ (5.150) Note β1 β2 ≈ ω√µ0ǫ0 ω√µ0 · 2.1ǫ0 ∼ = 0.690 (5.151) so ψt = arcsin (β1 β2",Electromagnetics_Vol2.pdf "air to glass. η2 ≈ η0√ 2.1 ∼= 260 .0 Ω (glass) (5.149) ψi = 30 ◦ (5.150) Note β1 β2 ≈ ω√µ0ǫ0 ω√µ0 · 2.1ǫ0 ∼ = 0.690 (5.151) so ψt = arcsin (β1 β2 sin ψi ) ∼ = 20 .2◦ (5.152) Now substituting these values into Equation 5.147, we obtain Γ TE ∼= −0.2220 (5.153) Subsequently , the fraction of power reflected relative to power incident is |Γ TE|2 ∼= 0.049; i.e., about 4.9% . 1 − |Γ T E|2 ∼= 95.1% of the po wer is transmitted into the glass.",Electromagnetics_Vol2.pdf "76 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION 5.7 Plane W aves at Oblique Incidence on a Planar Boundary: TM Case [m0164] In this section, we consider the problem of reflection and transmission from a planar boundary between semi-infinite media for a transverse magnetic (TM) uniform plane wave. Before attempting this section, a review of Sections 5.1 (“Plane W aves at Normal Incidence on a Planar Boundary Between Lossless Media”) and 5.5 (“Decomposition of a W ave into TE and TM Components”) is recommended. Also, note that this section has much in common with Section 5.6 (“Plane W aves at Oblique Incidence on a Planar Boundary: TE Case”), and it is recommended to attempt the TE case first. In this section, we consider the scenario illustrated in Figure 5.12. The boundary between the two semi-infinite and lossless regions is located at the z= 0 plane. The wave is incident from Region 1. The magnetic field intensity ˜Hi TM of this wave is given by ˜Hi TM(r) = ˆyHi TMe−jki·r (5.154)",Electromagnetics_Vol2.pdf "z= 0 plane. The wave is incident from Region 1. The magnetic field intensity ˜Hi TM of this wave is given by ˜Hi TM(r) = ˆyHi TMe−jki·r (5.154) In this expression, r is the position at which ˜Hi TM is c⃝ C. W ang CC BY -SA 4.0 Figure 5.12: A TM uniform plane wave obliquely incident on the planar boundary between two semi- infinite material regions. evaluated. Also, ki = ˆkiβ1 (5.155) where ˆki is the unit vector indicating the direction of propagation and β1 = ω√µ1ǫ1 is the phase propagation constant in Region 1. ˜Hi TM serves as the “stimulus” in this problem, and all other contributions to the total field may be expressed in terms of parameters associated with Equation 5.154. The presence of reflected and transmitted uniform plane waves is inferred from our experience with the normal incidence scenario (Section 5.1). There, as here, the symmetry of the problem indicates that the reflected and transmitted components of the magnetic field will have the same polarization as that of the",Electromagnetics_Vol2.pdf "reflected and transmitted components of the magnetic field will have the same polarization as that of the incident electric field. This is because there is nothing present in the problem that could account for a change in polarization. Thus, the reflected and transmitted fields will also be TM. So we postulate the following expression for the reflected wave: ˜Hr(r) = −ˆyBe−jkr ·r (5.156) where Bis an unknown, possibly complex-valued constant to be determined and kr = ˆkrβ1 (5.157) indicates the direction of propagation. The reader may wonder why we have chosen −ˆy, as opposed to +ˆy, as the reference polarization for ˜Hr. In fact, either +ˆy or −ˆy could be used. However, the choice is important because the form of the results we obtain in this section – specifically , the reflection coefficient – will be determined with respect to this specific convention, and will be incorrect with respect to the opposite convention. W e choose −ˆy because it",Electromagnetics_Vol2.pdf "specific convention, and will be incorrect with respect to the opposite convention. W e choose −ˆy because it has a particular advantage which we shall point out at the end of this section. Continuing, we postulate the following expression for the transmitted wave: ˜Ht(r) = ˆyCe−jkt·r (5.158) where Cis an unknown, possibly complex-valued constant to be determined and kt = ˆktβ2 (5.159)",Electromagnetics_Vol2.pdf "5.7. PLANE W A VES A T OBLIQUE INCIDENCE ON A PLANAR BOUNDAR Y : TM CASE 77 where ˆkt is the unit vector indicating the direction of propagation and β2 = ω√µ2ǫ2 is the phase propagation constant in Region 2. At this point, the unknowns in this problem are the constants Band C, as well as the unknown directions ˆkr and ˆkt. W e may establish a relationship between Hi TM, B, and Cby application of boundary conditions at z= 0. First, we presume no impressed current at the boundary . Thus, the tangential component of the total magnetic field intensity must be continuous across the boundary . T o apply this boundary condition, let us define ˜H1 and ˜H2 to be the total magnetic fields in Regions 1 and 2, respectively . The total field in Region 1 is the sum of incident and reflected fields, so ˜H1(r) = ˜Hi TM(r) + ˜Hr(r) (5.160) The field in Region 2 is simply ˜H2(r) = ˜Ht(r) (5.161) Also, we note that all magnetic field components are already tangent to the boundary . Thus, continuity of",Electromagnetics_Vol2.pdf "˜H2(r) = ˜Ht(r) (5.161) Also, we note that all magnetic field components are already tangent to the boundary . Thus, continuity of the tangential component of the magnetic field across the boundary requires ˜H1(r0) = ˜H2(r0), where r0 ≜ ˆxx+ ˆyysince z= 0 on the boundary . Therefore, ˜Hi TM(r0) + ˜Hr(r0) = ˜Ht(r0) (5.162) Now employing Equations 5.154, 5.156, and 5.158, we obtain: ˆyHi TMe−jki·r0 − ˆyBe−jkr ·r0 = ˆyCe−jkt·r0 (5.163) Dropping the vector ( ˆy) since it is the same in each term, we obtain: Hi TMe−jki·r0 − Be−jkr ·r0 = Ce−jkt·r0 (5.164) For this to be true at every point r0 on the boundary , it must be true that ki · r0 = kr · r0 = kt · r0 (5.165) Essentially , we are requiring the phases of each field in Regions 1 and 2 to be matched at every point along the boundary . Any other choice will result in a violation of boundary conditions at some point along the boundary . This expression allows us to solve for the directions of propagation of the reflected and",Electromagnetics_Vol2.pdf "the boundary . This expression allows us to solve for the directions of propagation of the reflected and transmitted fields, which we shall do later. Our priority for now shall be to solve for the coefficients Band C. Enforcing Equation 5.165, we observe that Equation 5.164 reduces to: Hi TM − B = C (5.166) A second equation is needed since we currently have only one equation (Equation 5.166) and two unknowns (B and C). The second equation is obtained by applying the appropriate boundary conditions to the electric field. The electric field associated with each of the magnetic field components is identified in Figure 5.12. Note the orientations of the electric field vectors may be confirmed using the plane wave relationships: Specifically , the cross product of the electric and magnetic fields should point in the direction of propagation. Expressions for each of the electric field components is determined formally below . From the plane wave relationships, we determine that",Electromagnetics_Vol2.pdf "propagation. Expressions for each of the electric field components is determined formally below . From the plane wave relationships, we determine that the incident electric field intensity is ˜Ei(r) = −η1 ˆki × ˜Hi TM (5.167) where η1 = √ µ1/ǫ1 is the wave impedance in Region 1. T o make progress requires that we express ˆki in the global fixed coordinate system. Here it is: ˆki = ˆx sin ψi + ˆz cos ψi (5.168) Thus: ˜Ei(r) = (ˆx cos ψi − ˆz sin ψi) η1Hi TMe−jki·r (5.169) Similarly we determine that the reflected electric field has the form: ˜Er(r) = −η1 ˆkr × ˜Hr (5.170) In the global coordinate system: ˆkr = ˆx sin ψr − ˆz cos ψr (5.171) Thus: ˜Er(r) = ( ˆx cos ψr + ˆz sin ψr) η1Be−jkr ·r (5.172)",Electromagnetics_Vol2.pdf "78 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION The transmitted magnetic field has the form: ˜Et(r) = −η2 ˆkt × ˜Ht (5.173) In the global coordinate system: ˆkt = ˆx sin ψt + ˆz cos ψt (5.174) Thus: ˜Et(r) = (ˆx cos ψt − ˆz sin ψt) η2Ce−jkt·r (5.175) The total electric field in Region 1 is the sum of incident and reflected fields, so ˜E1(r) = ˜Ei(r) + ˜Er(r) (5.176) The electric field in Region 2 is simply ˜E2(r) = ˜Et(r) (5.177) The tangential component of the total electric field intensity must be continuous across the boundary . Expressed in terms of the quantities already established, this boundary condition requires: ˆx · ˜Ei(r0) + ˆx · ˜Er(r0) = ˆx · ˜Et(r0) (5.178) where “ ˆx·” selects the component of the electric field that is tangent to the boundary . Evaluating this expression, we obtain: + ( cos ψi) η1Hi TMe−jki·r0 + (cos ψr) η1Be−jkr ·r0 = + ( cos ψt) η2Ce−jkt·r0 (5.179) Now employing the “phase matching” condition expressed in Equation 5.165, we find: + ( cos ψi) η1Hi TM",Electromagnetics_Vol2.pdf "= + ( cos ψt) η2Ce−jkt·r0 (5.179) Now employing the “phase matching” condition expressed in Equation 5.165, we find: + ( cos ψi) η1Hi TM + (cos ψr) η1B = + ( cos ψt) η2C (5.180) Equations 5.166 and 5.180 comprise a linear system of equations with unknowns Band C. This system of equations is easily solved for Bas follows. First, use Equation 5.166 to eliminate Cin Equation 5.180. The result is: + ( cos ψi) η1Hi TM + (cos ψr) η1B = + ( cos ψt) η2 ( Hi TM − B ) (5.181) Solving this equation for B, we obtain: B = −η1 cos ψi + η2 cos ψt +η1 cos ψr + η2 cos ψt Hi T M (5.182) W e can express this result as follows: B = Γ TMHi TM (5.183) where we have made the definition Γ TM ≜ −η1 cos ψi + η2 cos ψt +η1 cos ψr + η2 cos ψt (5.184) W e are now able to express the complete solution in terms of the electric field intensity . First we make the substitution Ei TM ≜ η1Hi TM in Equation 5.169, yielding: ˜Ei(r) = (ˆx cos ψi − ˆz sin ψi) Ei TMe−jki·r (5.185) The factor η1Bin Equation 5.172 becomes Γ TMEi",Electromagnetics_Vol2.pdf "TM ≜ η1Hi TM in Equation 5.169, yielding: ˜Ei(r) = (ˆx cos ψi − ˆz sin ψi) Ei TMe−jki·r (5.185) The factor η1Bin Equation 5.172 becomes Γ TMEi TM, so we obtain: ˜Er(r) = ( ˆx cos ψr + ˆz sin ψr) · Γ TMEi TMe−jkr ·r (5.186) Thus, we see Γ TM is the reflection coefficient for the electric field intensity . Returning to Equation 5.166, we now find C = Hi TM − B = Hi TM − Γ TMHi TM = (1 − Γ TM) Hi TM = (1 − Γ TM) Ei TM/η1 (5.187) Subsequently , Equation 5.175 becomes ˜Et(r) = (ˆx cos ψt − ˆz sin ψt) · (1 − Γ TM) η2 η1 Ei TMe−jkt· r (5.188) This solution is complete except that we have not yet determined ˆkr, which is now completely determined by ψr via Equation 5.171, and ˆkt, which is now completely determined by ψt via Equation 5.174. In other words, we have not yet determined the directions of propagation ψr for the reflected wave and ψt for the transmitted wave. However, ψr and ψi",Electromagnetics_Vol2.pdf "5.7. PLANE W A VES A T OBLIQUE INCIDENCE ON A PLANAR BOUNDAR Y : TM CASE 79 can be found using Equation 5.165. Here we shall simply state the result, and in Section 5.8 we shall perform this part of the derivation in detail and with greater attention to the implications. One finds: ψr = ψi (5.189) i.e., angle of reflection equals angle of incidence. Also, ψt = arcsin (β1 β2 sin ψi ) (5.190) Astute readers may notice that there is something fishy about Equation 5.190. Namely , it seems possible for the argument of arcsin to be greater than one. This oddity is addressed in Section 5.8. Now let us return to the following question, raised near the beginning of this section: Why choose −ˆy, as opposed to +ˆy, as the reference polarization for Hr, as shown in Figure 5.12? T o answer this question, first note that Γ TM (Equation 5.184) becomes the reflection coefficient for normal (TEM) incidence when ψi = ψt = 0. If we had chosen +ˆy as the reference polarization for Hr, we would have instead",Electromagnetics_Vol2.pdf "reflection coefficient for normal (TEM) incidence when ψi = ψt = 0. If we had chosen +ˆy as the reference polarization for Hr, we would have instead obtained an expression for Γ TM that has the opposite sign for TEM incidence. 3 There is nothing wrong with this answer, but it is awkward to have different values of the reflection coefficient for the same physical scenario. By choosing −ˆy, the reflection coefficient for the oblique incidence case computed for ψi = 0 converges to the reflection coefficient previously computed for the normal-incidence case. It is important to be aware of this issue, as one occasionally encounters work in which the opposite (“+ ˆy”) reference polarization has been employed. Finally , note that Equation 5.189 allows us to eliminate ψr from Equation 5.184, yielding: Γ TM = −η1 cos ψi + η2 cos ψt +η1 cos ψi + η2 cos ψt (5.191) Thus, we obtain what is perhaps the most important finding of this section: The electric field reflection coefficient for oblique TM",Electromagnetics_Vol2.pdf "Thus, we obtain what is perhaps the most important finding of this section: The electric field reflection coefficient for oblique TM incidence, Γ TM, is given by Equation 5.191. 3 Obtaining this result is an excellent way for the student to con- firm their understanding of the derivation presented in this section. The following example demonstrates the utility of this result. Example 5.8. Po wer transmission at an air-to-glass interface (TM case). Figure 5.13 illustrates a TM plane wave incident from air onto the planar boundary with a glass region. The glass exhibits relative permittivity of 2.1. Determine the power reflected and transmitted relative to power incident on the boundary . Solution. The power reflected relative to power incident is |Γ TM|2 whereas the power transmitted relative to power incident is 1 − |Γ TM|2. Γ TM may be calculated using Equation 5.191. Calculating the quantities that enter into this expression: η1 ≈ η0 ∼= 376.7 Ω (air) (5.192) η2 ≈ η0 √ 2.1 ∼ = 260",Electromagnetics_Vol2.pdf "Equation 5.191. Calculating the quantities that enter into this expression: η1 ≈ η0 ∼= 376.7 Ω (air) (5.192) η2 ≈ η0 √ 2.1 ∼ = 260 .0 Ω (glass) (5.193) ψi = 30 ◦ (5.194) Note β1 β2 ≈ ω√µ0ǫ0 ω√µ0 · 2.1ǫ0 ∼ = 0.690 (5.195) so ψt = arcsin (β1 β2 sin ψi ) ∼ = 20 .2◦ (5.196) Now substituting these values into Equation 5.191, we obtain Γ TM ∼= −0.1442 (5.197) (Did you get an answer closer to −0.1323? If so, you probably did not use sufficient precision to represent intermediate results. This is a good example of a problem in which three significant figures for results that are used in subsequent calculations is not sufficient.) The fraction of power reflected relative to power incident is now determined to be",Electromagnetics_Vol2.pdf "80 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION c⃝ C. W ang CC BY -SA 4.0 Figure 5.13: A TM uniform plane wave incident from air to glass. |Γ TM|2 ∼= 0 .021; i.e., about 2.1% . 1 − |Γ T M|2 ∼ = 97.9% of the power is transmitted into the glass. Note that the result obtained in the preceding example is different from the result for a TE wave incident from the same direction (Example 5.7). In other words: The fraction of power reflected and transmitted from the planar boundary between dissimilar me- dia depends on the polarization of the incident wave relative to the boundary , as well as the an- gle of incidence. 5.8 Angles of Reflection and Refraction [m0168] Consider the situation shown in Figure 5.14: A uniform plane wave obliquely incident on the planar boundary between two semi-infinite material regions. Let a point on the boundary be represented as the position vector r0 = ˆxx+ ˆyy (5.198) In both Sections 5.6 (“Plane W aves at Oblique",Electromagnetics_Vol2.pdf "Let a point on the boundary be represented as the position vector r0 = ˆxx+ ˆyy (5.198) In both Sections 5.6 (“Plane W aves at Oblique Incidence on a Planar Boundary: TE Case”) and 5.7 (“Plane W aves at Oblique Incidence on a Planar Boundary: TM Case”), it is found that ki · r0 = kr · r0 = kt · r0 (5.199) In this expression, ki = β1 ˆki (5.200) kr = β1 ˆkr (5.201) kt = β2 ˆkt (5.202) where ˆki, ˆkr, and ˆkt are unit vectors in the direction of incidence, reflection, and transmission, c⃝ C. W ang CC BY -SA 4.0 Figure 5.14: A uniform plane wave obliquely inci- dent on the planar boundary between two semi-infinite material regions.",Electromagnetics_Vol2.pdf "5.8. ANGLES OF REFLECTION AND REFRACTION 81 respectively; and β1 and β2 are the phase propagation constants in Region 1 (from which the wave is incident) and Region 2, respectively . Equation 5.199 is essentially a boundary condition that enforces continuity of the phase of the electric and magnetic fields across the boundary , and is sometimes referred to as the “phase matching” requirement. Since the same requirement emerges independently in the TE and TM cases, and since any plane wave may be decomposed into TE and TM components, the requirement must apply to any incident plane wave regardless of polarization. Equation 5.199 is the key to finding the direction of reflection ψr and direction of transmission ψt. First, observe: ˆki = ˆx sin ψi + ˆz cos ψi (5.203) ˆkr = ˆx sin ψr − ˆz cos ψr (5.204) ˆkt = ˆx sin ψt + ˆz cos ψt (5.205) Therefore, we may express Equation 5.199 in the following form β1 (ˆx sin ψi + ˆz cos ψi) · (ˆxx+ ˆyy) = β1 (ˆx sin ψr − ˆz cos ψr) · (ˆxx+ ˆyy) = β2",Electromagnetics_Vol2.pdf "Therefore, we may express Equation 5.199 in the following form β1 (ˆx sin ψi + ˆz cos ψi) · (ˆxx+ ˆyy) = β1 (ˆx sin ψr − ˆz cos ψr) · (ˆxx+ ˆyy) = β2 (ˆx sin ψt + ˆz cos ψt) · (ˆxx+ ˆyy) (5.206) which reduces to β1 sin ψi = β1 sin ψr = β2 sin ψt (5.207) Examining the first and second terms of Equation 5.207, and noting that ψi and ψr are both limited to the range −π/2 to +π/2, we find that: ψr = ψi (5.208) In plain English: Angle of reflection equals angle of incidence. Examining the first and third terms of Equation 5.207, we find that β1 sin ψi = β2 sin ψt (5.209) Since β1 = ω√µ1ǫ1 and β2 = ω√µ2ǫ2, Equation 5.209 expressed explicitly in terms of the constitutive parameters is: √µ1ǫ1 sin ψi = √µ2ǫ2 sin ψt (5.210) Thus, we see that ψt does not depend on frequency , except to the extent that the constitutive parameters might. W e may also express this relationship in terms of the relative values of constitutive parameters; i.e., µ1 = µr1µ0, ǫ1 = ǫr1ǫ0, µ2 = µr2µ0, and",Electromagnetics_Vol2.pdf "of the relative values of constitutive parameters; i.e., µ1 = µr1µ0, ǫ1 = ǫr1ǫ0, µ2 = µr2µ0, and ǫ2 = ǫr2ǫ0. In terms of the relative parameters: √ µr1ǫr1 sin ψi = √µr2ǫr2 sin ψt (5.211) This is known as Snell’s law or the law of refraction. Refraction is simply transmission with the result that the direction of propagation is changed. Snell’s law (Equation 5.211) determines the an- gle of refraction (transmission). The associated formula for ψt explicitly is: ψt = arcsin (√ µr1ǫr1 µr2ǫr2 sin ψi ) (5.212) F or the common special case of non-magnetic media, one assumes µr1 = µr2 = 1. In this case, Snell’s law simplifies to: √ǫr1 sin ψi = √ǫr2 sin ψt (5.213) In optics, it is common to express permittivities in terms of indices of refraction; e.g., n1 ≜ √ǫr1 and n2 ≜ √ǫr2. Thus, Snell’s law in optics is often expressed as: n1 sin ψi = n2 sin ψt (5.214) When both media are non-magnetic, Equation 5.212 simplifies to ψt = arcsin (√ ǫr1 ǫr2 sin ψi ) (5.215) When ǫr2 >",Electromagnetics_Vol2.pdf "n1 sin ψi = n2 sin ψt (5.214) When both media are non-magnetic, Equation 5.212 simplifies to ψt = arcsin (√ ǫr1 ǫr2 sin ψi ) (5.215) When ǫr2 > ǫr1, we observe that ψt <ψi. In other words, the transmitted wave travels in a direction that is closer to the surface normal than the angle of incidence. This scenario is demonstrated in the following example. Example 5.9. Refraction of light at an air-glass boundary . Figure 5.15 shows a narrow beam of light that is incident from air to glass at an angle ψi = 60 ◦.",Electromagnetics_Vol2.pdf "82 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION c⃝ Z. S´andor CC BY -SA 3.0 Figure 5.15: Angles of reflection and refraction for a light wave incident from air onto glass. As expected, the angle of reflection ψr is observ ed to be equal to ψi. The angle of refraction ψt is observed to be 35◦. What is the relative permittivity of the glass? Solution. Since the permittivity of glass is greater than that of air, we observe the expected result ψt <ψi. Since glass is non-magnetic, the expected relationship between these angles is given by Equation 5.213. Solving that equation for the relative permittivity of the glass, we obtain: ǫr2 = ǫr1 (sin ψi sin ψt )2 ∼= 2.28 (5.216) When a wave travels in the reverse direction – i.e., from a non-magnetic medium of higher permittivity to a medium of lower permittivity – one finds ψt >ψr. In other words, the refraction is away from the surface normal. Figure 5.16 shows an example from common experience. In non-magnetic media, when ǫr1 < ǫr2, ψt <",Electromagnetics_Vol2.pdf "the surface normal. Figure 5.16 shows an example from common experience. In non-magnetic media, when ǫr1 < ǫr2, ψt < ψi (refraction toward the surface normal). When ǫr1 > ǫr2, ψt > ψi (refraction away from the surface normal). c⃝ G. Saini CC BY -SA 4.0 Figure 5.16: Refraction accounts for the apparent dis- placement of an underwater object from the perspec- tive of an observer above the water. Under certain conditions, the ǫr2 <ǫr1 case leads to the following surprising observation: When calculating ψt using, for example, Equation 5.212, one finds that √ ǫr1/ǫr2 s in ψi can be greater than 1. Since the sin function yields values between −1 and +1, the result of the arcsin function is undefined. This odd situation is addressed in Section 5.11. For now , we will simply note that this condition leads to the phenomenon of total internal reflection. For now , all we can say is that when ǫr2 <ǫr1, ψt is able to reach π/2 radians, which corresponds to propagation",Electromagnetics_Vol2.pdf "all we can say is that when ǫr2 <ǫr1, ψt is able to reach π/2 radians, which corresponds to propagation parallel to the boundary . Beyond that threshold, we must account for the unique physical considerations associated with total internal reflection. W e conclude this section with a description of the common waveguiding device known as the prism, shown in Figure 5.17. This particular device uses refraction to change the direction of light waves (similar devices can be used to manipulate radio waves as well). Many readers are familiar with the use of prisms to separate white light into its constituent colors (frequencies), as shown in Figure 5.18. The separation of colors is due to frequency dependence of the material comprising the prism. Specifically , the permittivity of the material is a function of frequency , and therefore the angle of refraction is a function of frequency . Thus, each frequency is refracted by a different amount. Conversely , a prism comprised of a",Electromagnetics_Vol2.pdf "frequency . Thus, each frequency is refracted by a different amount. Conversely , a prism comprised of a material whose permittivity exhibits negligible variation with frequency will not separate incident",Electromagnetics_Vol2.pdf "5.9. TE REFLECTION IN NON-MAGNETIC MEDIA 83 c⃝ D-K uru CC BY -SA 3.0 Figure 5.17: A typical triangular prism. white light into its constituent colors since each color will be refracted by the same amount. Additional Reading: • “Prism” on Wikipedia. • “Refraction” on Wikipedia. • “Refractive index” on Wikipedia. • “Snell’s law” on Wikipedia. • “T otal internal reflection” on Wikipedia. c⃝ Su idroot CC BY -SA 4.0 Figure 5.18: A color-separating prism. 5.9 TE Reflection in Non-magnetic Media [m0171] Figure 5.19 shows a TE uniform plane wave incident on the planar boundary between two semi-infinite material regions. In this case, the reflection coefficient is given by: Γ TE = η2 cos ψi − η1 cos ψt η2 cos ψi + η1 cos ψt (5.217) where ψi and ψt are the angles of incidence and transmission (refraction), respectively; and η1 and η2 are the wave impedances in Regions 1 and 2, respectively . Many materials of practical interest are non-magnetic; that is, they have permeability that is",Electromagnetics_Vol2.pdf "respectively . Many materials of practical interest are non-magnetic; that is, they have permeability that is not significantly different from the permeability of free space. In this section, we consider the behavior of the reflection coefficient for this class of materials. T o begin, recall the general form of Snell’s law: sin ψt = β1 β2 sin ψi (5.218) In non-magnetic media, the permeabilities µ1 and µ2 are assumed equal to µ0. Thus: β1 β2 = ω√µ1ǫ1 ω√µ2ǫ2 = √ ǫ1 ǫ2 (5.219) c⃝ C. W ang CC BY -SA 4.0 Figure 5.19: A TE uniform plane wave obliquely inci- dent on the planar boundary between two semi-infinite regions of lossless non-magnetic material.",Electromagnetics_Vol2.pdf "84 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION Since permittivity ǫcan be expressed as ǫ0 times the relative permittivity ǫr, we may reduce further to: β1 β2 = √ ǫr1 ǫr2 (5.220) No w Equation 5.218 reduces to: sin ψt = √ ǫr1 ǫr2 sin ψi (5.221) Ne xt, note that for any value ψ, one may write cosine in terms of sine as follows: cos ψ= √ 1 − sin2 ψ (5.222) Therefore, cos ψt = √ 1 − ǫr1 ǫr2 sin2 ψi (5.223) Also we note that in non-magnetic media η1 = √ µ1 ǫ1 = √ µ0 ǫr1ǫ0 = η0 √ǫr1 (5.224) η2 = √ µ2 ǫ2 = √ µ0 ǫr2ǫ0 = η0 √ǫr2 (5.225) where η0 is the wave impedance in free space. Making substitutions into Equation 5.217, we obtain: Γ TE = ( η0/√ǫr2 ) cos ψi − ( η0/√ǫr1 ) cos ψt ( η0/√ǫr2 ) cos ψi + ( η0/√ǫr1 ) cos ψt (5.226) Multiplying numerator and denominator by √ǫr2/η0, we obtain: Γ TE = cos ψi − √ ǫr2/ǫr1 cos ψt cos ψi + √ ǫr2/ǫr1 cos ψt (5.227) Finally , by substituting Equation 5.223, we obtain: Γ TE = cos ψi − √ ǫr2/ǫr1 − s in 2 ψi cos ψi + √ ǫr2/ǫr1 − s in 2 ψi (5.228) This",Electromagnetics_Vol2.pdf "Finally , by substituting Equation 5.223, we obtain: Γ TE = cos ψi − √ ǫr2/ǫr1 − s in 2 ψi cos ψi + √ ǫr2/ǫr1 − s in 2 ψi (5.228) This expression has the advantage that it is now entirely in terms of ψi, with no need to first calculate ψt. Using Equation 5.228, we can see how different combinations of material affect the reflection -1 -0.5 0 0.5 1 0 10 20 30 40 50 60 70 80 90 2 10 100 Reflection Coefficient angle of incidence [deg] Figure 5.20: The reflection coefficient Γ TE as a func- tion of angle of incidence ψi for various media combi- nations. Curves are labeled with the ratio ǫr2/ǫr1. coefficient. First, we note that when ǫr1 = ǫr2 (i.e., same media on both sides of the boundary), Γ TE = 0 as expected. When ǫr1 >ǫr2 (e.g., wave traveling in glass toward air), we see that it is possible for ǫr2/ǫr1 − sin2 ψi to be negative, which makes Γ TE complex-valued. This results in total internal reflection, and is addressed elsewhere in another",Electromagnetics_Vol2.pdf "ǫr2/ǫr1 − sin2 ψi to be negative, which makes Γ TE complex-valued. This results in total internal reflection, and is addressed elsewhere in another section. When ǫr1 <ǫr2 (e.g., wave traveling in air toward glass), we see that ǫr2/ǫr1 − sin2 ψi is always positive, so Γ TE is always real-valued. Let us continue with the ǫr1 <ǫr2 condition. Figure 5.20 shows Γ TE plotted for various combinations of media over all possible angles of incidence from 0 (normal incidence) to π/2 (grazing incidence). W e observe: In non-magnetic media with ǫr1 < ǫr2, Γ T E is real-valued, negative, and decreases to −1 as ψi approaches grazing incidence. Also note that at any particular angle of incidence, Γ TE trends toward −1 as ǫr2/ǫr1 increases. Thus, we observe that as ǫr2/ǫr1 → ∞, the result is increasingly similar to the result we would obtain for a perfect conductor in Region 2.",Electromagnetics_Vol2.pdf "5.10. TM REFLECTION IN NON-MAGNETIC MEDIA 85 5.10 TM Reflection in Non-magnetic Media [m0172] Figure 5.21 shows a TM uniform plane wave incident on the planar boundary between two semi-infinite material regions. In this case, the reflection coefficient is given by: Γ TM = −η1 cos ψi + η2 cos ψt +η1 cos ψi + η2 cos ψt (5.229) where ψi and ψt are the angles of incidence and transmission (refraction), respectively; and η1 and η2 are the wave impedances in Regions 1 and 2, respectively . Many materials of practical interest are non-magnetic; that is, they have permeability that is not significantly different from the permeability of free space. In this section, we consider the behavior of the reflection coefficient for this class of materials. T o begin, recall the general form of Snell’s law: sin ψt = β1 β2 sin ψi (5.230) In non-magnetic media, the permeabilities µ1 and µ2 are assumed equal to µ0. Thus: β1 β2 = ω√µ1ǫ1 ω√µ2ǫ2 = √ ǫ1 ǫ2 (5.231) c⃝ C. W ang CC BY -SA 4.0",Electromagnetics_Vol2.pdf "In non-magnetic media, the permeabilities µ1 and µ2 are assumed equal to µ0. Thus: β1 β2 = ω√µ1ǫ1 ω√µ2ǫ2 = √ ǫ1 ǫ2 (5.231) c⃝ C. W ang CC BY -SA 4.0 Figure 5.21: A transverse magnetic uniform plane wave obliquely incident on the planar boundary be- tween two semi-infinite material regions. Since permittivity ǫcan be expressed as ǫ0 times the relative permittivity ǫr, we may reduce further to: β1 β2 = √ ǫr1 ǫr2 (5.232) No w Equation 5.230 reduces to: sin ψt = √ ǫr1 ǫr2 sin ψi (5.233) Ne xt, note that for any value ψ, one may write cosine in terms of sine as follows: cos ψ= √ 1 − sin2 ψ (5.234) Therefore, cos ψt = √ 1 − ǫr1 ǫr2 sin2 ψi (5.235) Also we note that in non-magnetic media η1 = √ µ1 ǫ1 = √ µ0 ǫr1ǫ0 = η0 √ǫr1 (5.236) η2 = √ µ2 ǫ2 = √ µ0 ǫr2ǫ0 = η0 √ǫr2 (5.237) where η0 is the wave impedance in free space. Making substitutions into Equation 5.229, we obtain: Γ TM = − ( η0/√ǫr1 ) cos ψi + ( η0/√ǫr2 ) cos ψt + ( η0/√ǫr1 ) cos ψi + ( η0/√ǫr2 ) cos ψt (5.238) Multiplying",Electromagnetics_Vol2.pdf "Γ TM = − ( η0/√ǫr1 ) cos ψi + ( η0/√ǫr2 ) cos ψt + ( η0/√ǫr1 ) cos ψi + ( η0/√ǫr2 ) cos ψt (5.238) Multiplying numerator and denominator by √ǫr2/η0, we obtain: Γ TM = − √ ǫr2/ǫr1 cos ψi + cos ψt + √ ǫr2/ǫr1 cos ψi + cos ψt (5.239) Substituting Equation 5.235, we obtain: Γ TM = − √ ǫr2/ǫr1 cos ψi + √ 1 − (ǫr1/ǫr2) sin2 ψi + √ ǫr2/ǫr1 cos ψi + √ 1 − (ǫr1/ǫr2) sin2 ψi (5.240) This expression has the advantage that it is now entirely in terms of ψi, with no need to first calculate ψt. Finally , multiplying numerator and denominator by√ ǫr2/ǫr1, we obtain: Γ TM = − (ǫr2/ǫr1) cos ψi + √ ǫr2/ǫr1 − s in 2 ψi + (ǫr2/ǫr1) cos ψi + √ ǫr2/ǫr1 − s in 2 ψi (5.241)",Electromagnetics_Vol2.pdf "86 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION -1 -0.5 0 0.5 1 0 10 20 30 40 50 60 70 80 90 2 10 100 Reflection Coefficient angle of incidence [deg] Figure 5.22: The reflection coefficient Γ TM as a func- tion of angle of incidence ψi for various media combi- nations, parameterized as ǫr2/ǫr1. Using Equation 5.241, we can easily see how different combinations of material affect the reflection coefficient. First, we note that when ǫr1 = ǫr2 (i.e., same media on both sides of the boundary), Γ TM = 0 as expected. When ǫr1 >ǫr2 (e.g., wave traveling in glass toward air), we see that it is possible for ǫr2/ǫr1 − sin2 ψi to be negative, which makes Γ TM complex-valued. This results in total internal reflection, and is addressed in another section. When ǫr1 <ǫr2 (e.g., wave traveling in air toward glass), we see that ǫr2/ǫr1 − sin2 ψi is always positive, so Γ TM is always real-valued. Let us continue with the ǫr1 <ǫr2 condition. Figure 5.22 shows Γ TM plotted for various",Electromagnetics_Vol2.pdf "Γ TM is always real-valued. Let us continue with the ǫr1 <ǫr2 condition. Figure 5.22 shows Γ TM plotted for various combinations of media over all possible angles of incidence from 0 (normal incidence) to π/2 (grazing incidence). W e observe: In non-magnetic media with ǫr1 < ǫr2, Γ T M is real-valued and increases from a negative value for normal incidence to +1 as ψi approaches grazing incidence. Note that at any particular angle of incidence, Γ TM trends toward −1 as ǫr2/ǫr1 → ∞. In this respect, the behavior of the TM component is similar to that of the TE component. In other words: As c⃝ C. W ang CC BY -SA 4.0 Figure 5.23: Reflection of a plane wave with angle of incidence ψi equal to the polarizing angle ψi B. Here the media are non-magnetic with ǫr1 <ǫr2. ǫr2/ǫr1 → ∞, the result for both the TE and TM components are increasingly similar to the result we would obtain for a perfect conductor in Region 2. Also note that when ǫr1 <ǫr2, Γ TM changes sign",Electromagnetics_Vol2.pdf "would obtain for a perfect conductor in Region 2. Also note that when ǫr1 <ǫr2, Γ TM changes sign from negative to positive as angle of incidence increases from 0 to π/2. This behavior is quite different from that of the TE component, which is always negative for ǫr1 <ǫr2. The angle of incidence at which Γ TM = 0 is referred to as Brewster’s angle, which we assign the symbol ψi B. Thus: ψi B ≜ ψi at which Γ TM = 0 (5.242) In the discussion that follows, here is the key point to keep in mind: Brewster’s angle ψi B is the angle of incidence at which Γ TM = 0. Brewster’s angle is also referred to as the polarizing angle. The motivation for the term “polarizing angle” is demonstrated in Figure 5.23. In this figure, a plane wave is incident with ψi = ψi B. The wave may contain TE and TM components in any combination. Applying the principle of superposition, we may consider these components separately . The TE component of the incident wave will scatter as",Electromagnetics_Vol2.pdf "Applying the principle of superposition, we may consider these components separately . The TE component of the incident wave will scatter as reflected and transmitted waves which are also TE. However, Γ TM = 0 when ψi = ψi B, so the TM",Electromagnetics_Vol2.pdf "5.10. TM REFLECTION IN NON-MAGNETIC MEDIA 87 component of the transmitted wave will be TM, but the TM component of the reflected wave will be zero. Thus, the total (TE+ TM) reflected wave will be purely TE, regardless of the TM component of the incident wave. This principle can be exploited to suppress the TM component of a wave having both TE and TM components. This method can be used to isolate the TE and TM components of a wave. Derivation of a formula for Brewster’s angle. Brewster’s angle for any particular combination of non-magnetic media may be determined as follows. Γ TM = 0 when the numerator of Equation 5.241 equals zero, so: − Rcos ψi B + √ R− sin2 ψi B = 0 (5.243) where we have made the substitution R≜ ǫr2/ǫr1 to improve clarity . Moving the second term to the right side of the equation and squaring both sides, we obtain: R2 cos2 ψi B = R− sin2 ψi B (5.244) Now employing a trigonometric identity on the left side of the equation, we obtain: R2 ( 1 − sin2 ψi B ) = R− sin2 ψi",Electromagnetics_Vol2.pdf "B = R− sin2 ψi B (5.244) Now employing a trigonometric identity on the left side of the equation, we obtain: R2 ( 1 − sin2 ψi B ) = R− sin2 ψi B (5.245) R2 − R2 sin2 ψi B = R− sin2 ψi B (5.246) ( 1 − R2) sin2 ψi B = R− R2 (5.247) and finally sin ψi B = √ R− R2 1 − R2 (5.248) Although this equation gets the job done, it is possible to simplify further. Note that Equation 5.248 can be interpreted as a description of the right triangle shown in Figure 5.24. In the figure, we have identified the length hof the vertical side and the length dof the hypotenuse as: h≜ √ R− R2 (5.249) d≜ √ 1 − R2 (5.250) The length bof the horizontal side is therefore b= √ d2 − h2 = √ 1 − R (5.251) Subsequently , we observe tan ψi B = h b = √ R− R2 √ 1 − R = √ R (5.252) c⃝ C. W ang CC BY -SA 4.0 Figure 5.24: Derivation of a simple formula for Brew- ster’s angle for non-magnetic media. Thus, we have found tan ψi B = √ ǫr2 ǫr1 (5.253) Example 5.10. Polarizing angle for an air-to-glass interface.",Electromagnetics_Vol2.pdf "ster’s angle for non-magnetic media. Thus, we have found tan ψi B = √ ǫr2 ǫr1 (5.253) Example 5.10. Polarizing angle for an air-to-glass interface. A plane wave is incident from air onto the planar boundary with a glass region. The glass exhibits relative permittivity of 2.1. The incident wave contains both TE and TM components. At what angle of incidence ψi will the reflected wave be purely TE? Solution. Using Equation 5.253: tan ψi B = √ ǫr2 ǫr1 = √ 2.1 1 ∼= 1.449 (5.254) Therefore, Brewster’s angle is ψi B ∼ = 55.4◦ . This is the angle ψi at which Γ TM = 0. Therefore, when ψi = ψi B, the reflected wave contains no TM component and therefore must be purely TE. Additional Reading: • “Brewster’s angle” on Wikipedia.",Electromagnetics_Vol2.pdf "88 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION 5.11 T otal Internal Reflection [m0169] T otal internal reflection refers to a particular condition resulting in the complete reflection of a wave at the boundary between two media, with no power transmitted into the second region. One way to achieve complete reflection with zero transmission is simply to require the second material to be a perfect conductor. However, total internal reflection is a distinct phenomenon in which neither of the two media are perfect conductors. T otal internal reflection has a number of practical applications; notably , it is the enabling principle of fiber optics. Consider the situation shown in Figure 5.25: A uniform plane wave is obliquely incident on the planar boundary between two semi-infinite material regions. In Section 5.8, it is found that ψr = ψi (5.255) i.e., angle of reflection equals angle of incidence. Also, from Snell’s law: √ µr1ǫr1 sin ψi = √µr2ǫr2 sin ψt (5.256) where",Electromagnetics_Vol2.pdf "ψr = ψi (5.255) i.e., angle of reflection equals angle of incidence. Also, from Snell’s law: √ µr1ǫr1 sin ψi = √µr2ǫr2 sin ψt (5.256) where “r” in the subscripts indicates the relative (unitless) quantities. The associated formula for ψt c⃝ C. W ang CC BY -SA 4.0 (modified) Figure 5.25: A uniform plane wave obliquely inci- dent on the planar boundary between two semi-infinite material regions. Here µr1ǫr1 >µr2ǫr2, so ψt >ψi. explicitly is: ψt = arcsin (√ µr1ǫr1 µr2ǫr2 sin ψi ) (5.257) From Equation 5.257, it is apparent that when µr1ǫr1 >µr2ǫr2, ψt >ψr; i.e., the transmitted wave appears to bend away from the surface normal, as shown in Figure 5.25. In fact, ψt can be as large as π/2 (corresponding to propagation parallel to the boundary) for angles of incidence which are less than π/2. What happens if the angle of incidence is further increased? When calculating ψt using Equation 5.257, one finds that the argument of the arcsine function becomes greater than 1. Since the",Electromagnetics_Vol2.pdf "increased? When calculating ψt using Equation 5.257, one finds that the argument of the arcsine function becomes greater than 1. Since the possible values of the sine function are between −1 and +1, the arcsine function is undefined. Clearly our analysis is inadequate in this situation. T o make sense of this, let us begin by identifying the threshold angle of incidence ψi c at which the trouble begins. From the analysis in the previous paragraph, √ µr1ǫr1 µr2ǫr2 sin ψi c = 1 (5.258) therefore, ψi c = arcsin √ µr2ǫr2 µr1ǫr1 (5.259) This is known as the critical angle. When ψi <ψi c, our existing theory applies. When ψi ≥ ψi c, the situation is, at present, unclear. For non-magnetic materials, Equation 5.259 simplifies to ψi c = arcsin √ ǫr2 ǫr1 (5.260) No w let us examine the behavior of the reflection coefficient. For example, the reflection coefficient for TE component and non-magnetic materials is Γ TE = cos ψi − √ ǫr2/ǫr1 − s in 2 ψi cos ψi + √ ǫr2/ǫr1 − s in 2 ψi (5.261)",Electromagnetics_Vol2.pdf "TE component and non-magnetic materials is Γ TE = cos ψi − √ ǫr2/ǫr1 − s in 2 ψi cos ψi + √ ǫr2/ǫr1 − s in 2 ψi (5.261) From Equation 5.260, we see that sin2 ψi c = ǫr2 ǫr1 (5.262)",Electromagnetics_Vol2.pdf "5.11. TOT AL INTERNAL REFLECTION 89 So, when ψi >ψi c, we see that ǫr2/ǫr1 − sin2 ψi <0 (ψ i >ψi c) (5.263) and therefore√ ǫr2/ǫr1 − s in 2 ψi = jB (ψi >ψi c) (5.264) where Bis a positive real-valued number. Now we may write Equation 5.261 as follows: Γ TE = A− jB A+ jB ( ψi >ψi c) (5.265) where A≜ cos ψi is also a positive real-valued number. Note that the numerator and denominator in Equation 5.265 have equal magnitude. Therefore, the magnitude of |Γ TE| = 1 and Γ TE = ejζ (ψi >ψi c) (5.266) where ζis a real-valued number indicating the phase of Γ TE. In other words, When the angle of incidence ψi exceeds the criti- cal angle ψi c, the magnitude of the reflection coef- ficient is 1. In this case, all power is reflected, and no power is transmitted into the second medium. This is total internal reflection. Although we have obtained this result for TE component, the identical conclusion is obtained for TM component as well. This is left as an exercise for the student.",Electromagnetics_Vol2.pdf "component, the identical conclusion is obtained for TM component as well. This is left as an exercise for the student. Example 5.11. T otal internal reflection in glass. Figure 5.15 (Section 5.8) shows a demonstration of refraction of a beam of light incident from air onto a planar boundary with glass. Analysis of that demonstration revealed that the relative permittivity of the glass was ∼= 2.28. Figure 5.26 shows a modification of the demonstration: In this case, a beam of light incident from glass onto a planar boundary with air. Confirm that total internal reflection is the expected result in this demonstration. Solution. Assuming the glass is non-magnetic, the critical angle is given by Equation 5.260. In the present example, ǫr1 ∼= 2.28 (glass), ǫr2 ∼ = 1 (air). Therefore, the critical angle ψi c ∼= 41.5◦. c⃝ Z. S´andor CC BY -SA 3.0 Figure 5.26: T otal internal reflection of a light wave incident on a planar boundary between glass and air. c⃝ Ti mwether CC BY -SA 3.0",Electromagnetics_Vol2.pdf "Figure 5.26: T otal internal reflection of a light wave incident on a planar boundary between glass and air. c⃝ Ti mwether CC BY -SA 3.0 Figure 5.27: Laser light in a dielectric rod exhibiting the Goos-H ¨anchen effect. The angle of incidence in Figure 5.26 is seen to be about ∼= 50◦, which is greater than the critical angle. Therefore, total internal reflection is expected. Note also that the phase ζof the reflection coefficient is precisely zero unless ψi >ψi c, at which point it is both non-zero and varies with ψi. This is known as the Goos-H ¨anchen effect. This leads to the startling phenomenon shown in Figure 5.27. In this figure, the Goos-H¨anchen phase shift is apparent as a displacement between the point of incidence and the point of reflection.",Electromagnetics_Vol2.pdf "90 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION The presence of an imaginary component in the reflection coefficient is odd for two reasons. First, we are not accustomed to seeing a complex-valued reflection coefficient emerge when the wave impedances of the associated media are real-valued. Second, the total reflection of the incident wave seems to contradict the boundary condition that requires the tangential components of the electric and magnetic fields to be continuous across the boundary . That is, how can these components of the fields be continuous across the boundary if no power is transmitted across the boundary? These considerations suggest that there is a field on the opposite side of the boundary , but – somehow – it must have zero power. This is exactly the case, as is explained in Section 5.12. Additional Reading: • “Goos-H ¨anchen effect” on Wikipedia. • “Snell’s law” on Wikipedia. • “T otal internal reflection” on Wikipedia. 5.12 Evanescent W aves [m0170]",Electromagnetics_Vol2.pdf "• “Goos-H ¨anchen effect” on Wikipedia. • “Snell’s law” on Wikipedia. • “T otal internal reflection” on Wikipedia. 5.12 Evanescent W aves [m0170] Consider the situation shown in Figure 5.28: A uniform plane wave obliquely incident on the planar boundary between two semi-infinite material regions, and total internal reflection occurs because the angle of incidence ψi is greater than the critical angle ψi c = arcsin √ µr2ǫr2 µr1ǫr1 (5.267) Therefore, the reflection coefficient is complex-valued with magnitude equal to 1 and phase that depends on polarization and the constitutive parameters of the media. The total reflection of the incident wave seems to contradict the boundary conditions that require the tangential components of the electric and magnetic fields to be continuous across the boundary . How can these components of the fields be continuous across the boundary if no power is transmitted across the boundary? There must be a field on the opposite side",Electromagnetics_Vol2.pdf "the boundary if no power is transmitted across the boundary? There must be a field on the opposite side of the boundary , but – somehow – it must have zero power. T o make sense of this, let us attempt to find a solution for the transmitted field. c⃝ C. W ang CC BY -SA 4.0 Figure 5.28: A uniform plane wave obliquely inci- dent on the planar boundary between two semi-infinite material regions. Here µr1ǫr1 >µr2ǫr2 and ψi >ψi c.",Electromagnetics_Vol2.pdf "5.12. EV ANESCENT W A VES 91 W e begin by postulating a complex-valued angle of transmission ψtc. Although the concept of a complex-valued angle may seem counterintuitive, there is mathematical support for this concept. For example, consider the well-known trigonometric identities: sin θ= 1 j2 ( ejθ − e−j θ) (5.268) cos θ= 1 2 ( ejθ + e−j θ) (5.269) These identities allow us to compute values for sine and cosine even when θis complex-valued. One may conclude that the sine and cosine of a complex-valued angle exist, although the results may also be complex-valued. Based on the evidence established so far, we presume that ψtc behaves as follows: ψtc ≜ ψt , ψi <ψi c (5.270) ψtc ≜ π/2 , ψi = ψi c (5.271) ψtc ≜ π/2 + jψ′′ , ψi >ψi c (5.272) In other words, ψtc is identical to ψt for ψi ≤ ψi c, but when total internal reflection occurs, we presume the real part of ψtc remains fixed (parallel to the boundary) and that an imaginary component jψ′′ emerges to satisfy the boundary conditions.",Electromagnetics_Vol2.pdf "real part of ψtc remains fixed (parallel to the boundary) and that an imaginary component jψ′′ emerges to satisfy the boundary conditions. For clarity , let us assign the variable ψ′ to represent the real part of ψtc in Equations 5.270–5.272. Then we may refer to all three cases using a single expression as follows: ψtc = ψ′ + jψ′′ (5.273) Now we use a well-known trigonometric identity as follows: sin ψtc = sin ( ψ′ + jψ′′) (5.274) = sin ψ′ cos jψ′′ + cos ψ′ sin jψ′′ (5.275) Using Equation 5.269, we find: cos jψ′′ = 1 2 ( ej(jψ′ ′) + e−j(jψ′′)) (5.276) = 1 2 ( e−ψ′′ + e+ψ′ ′ ) (5.277) = cosh ψ′′ (5.278) In other words, the cosine of jψ′′ is simply the hyperbolic cosine (“cosh ”) of ψ′′. Interestingly , cosh of a real-valued argument is real-valued, so cos jψ′′ is real-valued. Using Equation 5.268, we find: sin jψ′′ = 1 j2 ( ej(jψ′ ′) − e−j(jψ′′)) (5.279) = 1 j2 ( e−ψ′′ − e+ψ′ ′ ) (5.280) = j1 2 ( e+ψ′′ − e−ψ′ ′ ) (5.281) = jsinh ψ′′ (5.282)",Electromagnetics_Vol2.pdf "sin jψ′′ = 1 j2 ( ej(jψ′ ′) − e−j(jψ′′)) (5.279) = 1 j2 ( e−ψ′′ − e+ψ′ ′ ) (5.280) = j1 2 ( e+ψ′′ − e−ψ′ ′ ) (5.281) = jsinh ψ′′ (5.282) In other words, the sine of jψ′′ is jtimes hyperbolic sine (“sinh ”) of ψ′′. Now note that sinh of a real-valued argument is real-valued, so sin jψ′′ is imaginary-valued. Using these results, we find Equation 5.275 may be written as follows: sin ψtc = sin ψ′ cosh ψ′′ + jcos ψ′ sinh ψ′′ (5.283) Using precisely the same approach, we find: cos ψtc = cos ψ′ cosh ψ′′ − jsin ψ′ sinh ψ′′ (5.284) Before proceeding, let’s make sure Equations 5.283 and 5.284 exhibit the expected behavior before the onset of total internal reflection. For ψi <ψi c, ψ′ = ψt and ψ′′ = 0. In this case, sinh ψ′′ = 0, cosh ψ′′ = 1, and Equations 5.283 and 5.284 yield sin ψtc = sin ψt (5.285) cos ψtc = cos ψt (5.286) as expected. When total internal reflection is in effect, ψi >ψi c, so ψ′ = π/2. In this case, Equations 5.283 and 5.284 yield sin ψtc = cosh ψ′′ (5.287)",Electromagnetics_Vol2.pdf "When total internal reflection is in effect, ψi >ψi c, so ψ′ = π/2. In this case, Equations 5.283 and 5.284 yield sin ψtc = cosh ψ′′ (5.287) cos ψtc = −jsinh ψ′′ (5.288) Let us now consider what this means for the field in Region 2. According to the formalism adopted in previous sections, the propagation of wave",Electromagnetics_Vol2.pdf "92 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION components in this region is described by the factor e−jkt·r where kt = β2 ˆkt = β2 (ˆx sin ψtc + ˆz cos ψtc) (5.289) and r = ˆxx+ ˆyy+ ˆzz (5.290) so kt · r = ( β2 sin ψtc) x+ ( β2 cos ψtc) z = ( β2 cosh ψ′′) x+ (−jβ2 sinh ψ′′) z (5.291) Therefore, the wave in Region 2 propagates according to e−jkt·r = e−j(β2 cosh ψ′′)xe−(β2 sinh ψ′′)z (5.292) Note that the constants β2 cosh ψ′′ and β2 sinh ψ′′ are both real-valued and positive. Therefore, Equation 5.292 describes a wave which propagates in the +ˆx direction, but which is not uniform. Specifically , the magnitude of the transmitted field decreases exponentially with increasing z; i.e., maximum at the boundary , asymptotically approaching zero with increasing distance from the boundary . This wave is unlike the incident or reflected waves (both uniform plane waves), and is unlike the transmitted wave in the ψi <ψi c case (also a uniform plane wave). The transmitted wave that we",Electromagnetics_Vol2.pdf "unlike the transmitted wave in the ψi <ψi c case (also a uniform plane wave). The transmitted wave that we have derived in the ψi >ψi c case gives the impression of being somehow attached to the boundary , and so may be described as a surface wave. However, in this case we have a particular kind of surface wave, known as an evanescent wave. Summarizing: When total internal reflection occurs, the trans- mitted field is an evanescent wave; i.e., a surface wave which conveys no power and whose mag- nitude decays exponentially with increasing dis- tance into Region 2. At this point, we could enforce the “phase matching” condition at the boundary , which would lead us to a new version of Snell’s law that would allow us to solve for ψ′′ in terms of ψi and the constitutive properties of the media comprising Regions 1 and 2. W e could subsequently determine values for the phase propagation and attenuation constants for the evanescent wave. It suffices to say that the magnitude",Electromagnetics_Vol2.pdf "propagation and attenuation constants for the evanescent wave. It suffices to say that the magnitude of the evanescent field becomes negligible beyond a few wavelengths of the boundary . Finally , we return to the strangest characteristic of this field: It acts like a wave, but conveys no power. This field exists solely to enforce the electromagnetic boundary conditions at the boundary , and does not exist independently of the incident and reflected field. The following thought experiment may provide some additional insight. In this experiment, a laser illuminates a planar boundary between two material regions, with conditions such that total internal reflection occurs. Thus, all incident power is reflected, and an evanescent wave exists on the opposite side of the boundary . Next, the laser is turned off. All the light incident on the boundary reflects from the boundary and continues to propagate to infinity , even after light is no longer incident on the boundary . In contrast, the",Electromagnetics_Vol2.pdf "and continues to propagate to infinity , even after light is no longer incident on the boundary . In contrast, the evanescent wave vanishes at the moment laser light ceases to illuminate the boundary . In other words, the evanescent field does not continue to propagate along the boundary to infinity . The reason for this is simply that there is no power – hence, no energy – in the evanescent wave. Additional Reading: • “Evanescent field” on Wikipedia. • “Hyperbolic function” on Wikipedia. • “T otal internal reflection” on Wikipedia. [m0185]",Electromagnetics_Vol2.pdf "5.12. EV ANESCENT W A VES 93 Image Credits Fig. 5.1: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Upw incident on planar boundary .svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.2: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Upw incident on a slab.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.3: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Double-boundary problem equivalent.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.4: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Plane wave in basic coord.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.5: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Plane wave in rotated coord.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.6: c⃝ Sevenchw (C. W ang),",Electromagnetics_Vol2.pdf "CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.6: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Plane wave in another rotation coord.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.7: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Plane wave in ray-fixed coord.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.8: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Coord system for TE-TM decomposition.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.9: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TE-polarized upw incident on planar boundary .svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.10: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Incident reflected and transmitted magnetic field components.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.11: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TE-polarized upw incident from air to glass.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.12: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TM-polarized upw incident on planar boundary .svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.13: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TM-polarized upw incident from air to glass.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.14: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Upw incident obliquely on planar boundary .svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "94 CHAPTER 5. W A VE REFLECTION AND TRANSMISSION Fig. 5.15: c⃝ Z. S ´andor, https://commons.wikimedia.org/wiki/File:F%C3%A9nyt%C3%B6r%C3%A9s.jpg, CC BY -SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Fig. 5.16: c⃝ G. Saini, https://kids.kiddle.co/Image:Refractionn.jpg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.17: c⃝ D-Kuru, https://commons.wikimedia.org/wiki/File:Prism-side-fs PNr%C2%B00117.jpg, CC BY -SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Fig. 5.18: c⃝ Suidroot, https://commons.wikimedia.org/wiki/File:Prism-rainbow .svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.19: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TE-polarized upw incident on planar boundary .svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.21: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TM-polarized upw incident on planar boundary .svg, CC",Electromagnetics_Vol2.pdf "Fig. 5.21: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TM-polarized upw incident on planar boundary .svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.23: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Reflection of plane wave incidence angle equals polarizing angle.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.24: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Brewster%E2%80%99s angle for non-magnetic media.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 5.25: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Upw incident on planar boundary angle reflection equals incidence.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/), modified. Fig. 5.26: c⃝ Z. S ´andor, https://en.wikipedia.org/wiki/File:T eljes f%C3%A9nyvisszaver%C5%91d%C3%A9s.jpg, CC BY -SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/).",Electromagnetics_Vol2.pdf "https://en.wikipedia.org/wiki/File:T eljes f%C3%A9nyvisszaver%C5%91d%C3%A9s.jpg, CC BY -SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Fig. 5.27: c⃝ Timwether, https://en.wikipedia.org/wiki/File:Laser in fibre.jpg, CC BY -SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Fig. 5.28: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Upw incident on planar boundary total internal reflection.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "Chapter 6 W a veguides 6.1 Phase and Group V elocity [m0176] Phase velocity is the speed at which a point of constant phase travels as the wave propagates. 1 For a sinusoidally-varying wave, this speed is easy to quantify . T o see this, consider the wave: Acos (ωt− βz+ ψ) (6.1) where ω= 2πf is angular frequency , zis position, and βis the phase propagation constant. At any given time, the distance between points of constant phase is one wavelength λ. Therefore, the phase velocity vp is vp = λf (6.2) Since β = 2π/λ, this may also be written as follows: vp = ω β (6.3) Noting that β = ω√µǫfor simple matter, we may also express vp in terms of the constitutive parameters µand ǫas follows: vp = 1√µǫ (6.4) Since vp in this case depends only on the constitutive properties µand ǫ, it is reasonable to view phase velocity also as a property of matter. 1 Formally , “velocity” is a vector which indicates both the di- rection and rate of motion. It is common practice to use the terms",Electromagnetics_Vol2.pdf "1 Formally , “velocity” is a vector which indicates both the di- rection and rate of motion. It is common practice to use the terms “phase velocity” and “group velocity” even though we are actually referring merely to rate of motion. The direction is, of course, in the direction of propagation. Central to the concept of phase velocity is uniformity over space and time. Equations 6.2–6.4 presume a wave having the form of Equation 6.1, which exhibits precisely the same behavior over all possible time t from −∞ to +∞ and over all possible zfrom −∞ to +∞. This uniformity over all space and time precludes the use of such a wave to send information. T o send information, the source of the wave needs to vary at least one parameter as a function of time; for example A(resulting in amplitude modulation), ω (resulting in frequency modulation), or ψ(resulting in phase modulation). In other words, information can be transmitted only by making the wave non-uniform",Electromagnetics_Vol2.pdf "phase modulation). In other words, information can be transmitted only by making the wave non-uniform in some respect. Furthermore, some materials and structures can cause changes in ψor other combinations of parameters which vary with position or time. Examples include dispersion and propagation within waveguides. Regardless of the cause, varying the parameters ωor ψas a function of time means that the instantaneous distance between points of constant phase may be very different from λ. Thus, the instantaneous frequency of variation as a function of time and position may be very different from f. In this case Equations 6.2–6.4 may not necessarily provide a meaningful value for the speed of propagation. Some other concept is required to describe the speed of propagation of such waves. That concept is group velocity, vg, defined as follows: Group velocity, vg, is the ratio of the apparent change in frequency ωto the associated change in the phase propagation constant β; i.e., ∆ω/∆β .",Electromagnetics_Vol2.pdf "Group velocity, vg, is the ratio of the apparent change in frequency ωto the associated change in the phase propagation constant β; i.e., ∆ω/∆β . Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "96 CHAPTER 6. W A VEGUIDES Letting ∆β become vanishingly small, we obtain vg ≜ ∂ω ∂β (6.5) Note the similarity to the definition of phase velocity in Equation 6.3. Group velocity can be interpreted as the speed at which a disturbance in the wave propagates. Information may be conveyed as meaningful disturbances relative to a steady-state condition, so group velocity is also the speed of information in a wave. Note Equation 6.5 yields the expected result for waves in the form of Equation 6.1: vg = (∂β ∂ω )−1 = (∂ ∂ωω√µǫ )−1 = 1√µǫ = vp (6.6) In other words, the group velocity of a wave in the form of Equation 6.1 is equal to its phase velocity . T o observe a difference between vp and vg, βmust somehow vary as a function of something other than just ωand the constitutive parameters. Again, modulation (introduced by the source of the wave) and dispersion (frequency-dependent constitutive parameters) are examples in which vg is not necessarily equal to vp. Here’s an example involving",Electromagnetics_Vol2.pdf "and dispersion (frequency-dependent constitutive parameters) are examples in which vg is not necessarily equal to vp. Here’s an example involving dispersion: Example 6.1. Phase and group velocity for a material exhibiting square-law dispersion. A broad class of non-magnetic dispersive media exhibit relative permittivity ǫr that varies as the square of frequency over a narrow range of frequencies centered at ω0. For these media we presume ǫr = K (ω ω0 )2 (6.7) where Kis a real-valued positive constant. What is the phase and group velocity for a sinusoidally-varying wave in this material? Solution. First, note β = ω√µ0ǫ= ω√µ0ǫ0 √ǫr = √ K· ω2 ω0 √µ0ǫ0 (6.8) The phase velocity is: vp = ω β = ω0√ K· ω√µ0ǫ0 (6.9) Whereas the group velocity is: vg = ∂ω ∂β = (∂β ∂ω )−1 (6.10) = ( ∂ ∂ω √ K· ω2 ω0 √µ0ǫ0 )−1 (6.11) = ( 2 √ K· ω ω0 √µ0ǫ0 )−1 (6.12) No w simplifying using Equation 6.8: vg = ( 2 β ω )−1 (6.13) = 1 2 ω β (6.14) = 1 2vp (6.15) Thus, we see that in this case the group velocity",Electromagnetics_Vol2.pdf "(6.12) No w simplifying using Equation 6.8: vg = ( 2 β ω )−1 (6.13) = 1 2 ω β (6.14) = 1 2vp (6.15) Thus, we see that in this case the group velocity is always half the phase velocity . Another commonly-encountered example for which vg is not necessarily equal to vp is the propagation of guided waves; e.g., waves within a waveguide. In fact, such waves may exhibit phase velocity greater than the speed of light in a vacuum, c. However, the group velocity remains less than c, which means the speed at which information may propagate in a waveguide is less than c. No physical laws are violated, since the universal “speed limit” capplies to information, and not simply points of constant phase. (See “ Additional Reading” at the end of this section for more on this concept.) Additional Reading: • “Group velocity” on Wikipedia.",Electromagnetics_Vol2.pdf "6.2. P ARALLEL PLA TE W A VEGUIDE: INTRODUCTION 97 • “Phase velocity” on Wikipedia. • “Speed of light” on Wikipedia. 6.2 Parallel Plate W aveguide: Introduction [m0173] A parallel plate waveguide is a device for guiding the propag ation of waves between two perfectly-conducting plates. Our primary interest in this structure is as a rudimentary model applicable to a broad range of engineering problems. Examples of such problems include analysis of the fields within microstrip line and propagation of radio waves in the ionosphere. Figure 6.1 shows the geometry of interest. Here the plates are located at z= 0 and z= a. The plates are assumed to be infinite in extent, and therefore there is no need to consider fields in the regions z <0 or z >a. For this analysis, the region between the plates is assumed to consist of an ideal (lossless) material exhibiting real-valued permeability µand real-valued permittivity ǫ. Let us limit our attention to a region within the",Electromagnetics_Vol2.pdf "exhibiting real-valued permeability µand real-valued permittivity ǫ. Let us limit our attention to a region within the waveguide which is free of sources. Expressed in phasor form, the electric field intensity is governed by the wave equation ∇2 ˜E + β2 ˜E = 0 (6.16) where β = ω√ µǫ (6.17) Equation 6.16 is a partial differential equation. This equation, combined with boundary conditions c⃝ C. W ang CC BY -SA 4.0 (modified) Figure 6.1: Geometry for analysis of fields in a paral- lel plate waveguide.",Electromagnetics_Vol2.pdf "98 CHAPTER 6. W A VEGUIDES imposed by the perfectly-conducting plates, is sufficient to determine a unique solution. This is most easily done in Cartesian coordinates, as we shall now demonstrate. First we express ˜E in Cartesian coordinates: ˜E = ˆx ˜Ex + ˆy ˜Ey + ˆz ˜Ez (6.18) This facilitates the decomposition of Equation 6.16 into separate equations governing the ˆx, ˆy, ˆz components of ˜E: ∇2 ˜Ex + β2 ˜Ex = 0 (6.19) ∇2 ˜Ey + β2 ˜Ey = 0 (6.20) ∇2 ˜Ez + β2 ˜Ez = 0 (6.21) Next we observe that the operator ∇2 may be expressed in Cartesian coordinates as follows: ∇2 = ∂2 ∂x2 + ∂2 ∂y2 + ∂2 ∂z2 (6.22) so the equations governing the Cartesian components of ˜E may be written as follows: ∂2 ∂x2 ˜Ex + ∂2 ∂y2 ˜Ex + ∂2 ∂z2 ˜Ex = −β2 ˜Ex (6.23) ∂2 ∂x2 ˜Ey + ∂2 ∂y2 ˜Ey + ∂2 ∂z2 ˜Ey = −β2 ˜Ey (6.24) ∂2 ∂x2 ˜Ez + ∂2 ∂y2 ˜Ez + ∂2 ∂z2 ˜Ez = −β2 ˜Ez (6.25) Let us restrict our attention to scenarios that can be completely described in two dimensions; namely x",Electromagnetics_Vol2.pdf "∂y2 ˜Ez + ∂2 ∂z2 ˜Ez = −β2 ˜Ez (6.25) Let us restrict our attention to scenarios that can be completely described in two dimensions; namely x and z, and for which there is no variation in y. This is not necessarily required, however, it is representative of a broad class of relevant problems, and allows Equations 6.23–6.25 to be considerably simplified. If there is no variation in y, then partial derivatives with respect to yare zero, yielding: ∂2 ∂x2 ˜Ex + ∂2 ∂z2 ˜Ex = −β2 ˜Ex (6.26) ∂2 ∂x2 ˜Ey + ∂2 ∂z2 ˜Ey = −β2 ˜Ey (6.27) ∂2 ∂x2 ˜Ez + ∂2 ∂z2 ˜Ez = −β2 ˜Ez (6.28) The solution to the parallel plate waveguide problem may now be summarized as follows: The electric field ˜E (Equation 6.18) is the solution to simultaneous Equations 6.26–6.28 subject to the boundary conditions that apply at the PEC surfaces at z= 0 and z= d; namely , that the tangent component of ˜E is zero at these surfaces. At this point, the problem has been reduced to a",Electromagnetics_Vol2.pdf "z= d; namely , that the tangent component of ˜E is zero at these surfaces. At this point, the problem has been reduced to a routine exercise in the solution of partial differential equations. However, a somewhat more useful approach is to first decompose the total electric field into transverse electric (TE) and transverse magnetic (TM) components, 2 and determine the solutions to these components separately . The TE component of the electric field is parallel to the plates, and therefore transverse (perpendicular) to the plane shown in Figure 6.1. Thus, the TE component has ˜Ex = ˜Ez = 0, and only ˜Ey may be non-zero. The TM component of the magnetic field intensity ( ˜H) is parallel to the plates, and therefore transverse to the plane shown in Figure 6.1. Thus, the TM component has ˜Hx = ˜Hz = 0, and only ˜Hy may be non-zero. As always, the total field is the sum of the TE and TM components. The TE and TM solutions are presented in Sections 6.3 (Electric component of the TE solution),",Electromagnetics_Vol2.pdf "components. The TE and TM solutions are presented in Sections 6.3 (Electric component of the TE solution), 6.4 (Magnetic component of the TE solution), and 6.5 (Electric component of the TM solution). The magnetic component of the TM solution can be determined via a straightforward variation of the preceding three cases, and so is not presented here. Presentation of the solution for the fields in a parallel plate waveguide under the conditions described in the section continues in Section 6.3. 2 For a refresher on TE-TM decomposition, see Section 5.5.",Electromagnetics_Vol2.pdf "6.3. P ARALLEL PLA TE W A VEGUIDE: TE CASE, ELECTRIC FIELD 99 6.3 Parallel Plate W aveguide: TE Case, Electric Field [m0174] In Section 6.2, the parallel plate waveguide was introduced. At the end of that section, we described the decomposition of the problem into its TE and TM components. In this section, we find the electric field component of the TE field in the waveguide. Figure 6.2 shows the problem addressed in this section. (Additional details and assumptions are addressed in Section 6.2.) Since ˜Ex = ˜Ez = 0 for the TE component of the electric field, Equations 6.26 and 6.28 are irrelevant, leaving only: ∂2 ∂x2 ˜Ey + ∂2 ∂z2 ˜Ey = −β2 ˜Ey (6.29) The general solution to this partial differential equation is: ˜Ey = e−jkz z[ Ae−jkxx + Be+jkxx] + e+jkz z[ Ce−jkxx + De+jkxx] (6.30) where A, B, C, and Dare complex-valued constants and kx and kz are real-valued constants. W e have assigned variable names to these constants with advance knowledge of their physical interpretation;",Electromagnetics_Vol2.pdf "and kx and kz are real-valued constants. W e have assigned variable names to these constants with advance knowledge of their physical interpretation; however, at this moment they remain simply unknown constants whose values must be determined by enforcement of boundary conditions. c⃝ C. W ang CC BY -SA 4.0 Figure 6.2: TE component of the electric field in a parallel plate waveguide. Note that Equation 6.30 consists of two terms. The first term includes the factor e−jkz z, indicating a wave propagating in the +ˆz direction, and the second term includes the factor e+jkz z, indicating a wave propagating in the −ˆz direction. If we impose the restriction that sources exist only on the left (z < 0) side of Figure 6.2, and that there be no structure capable of wave scattering (in particular, reflection) on the right (z > 0) side of Figure 6.2, then there can be no wave components propagating in the −ˆz direction. In this case, C = D= 0 and Equation 6.30 simplifies to: ˜Ey = e−jkz z[",Electromagnetics_Vol2.pdf "be no wave components propagating in the −ˆz direction. In this case, C = D= 0 and Equation 6.30 simplifies to: ˜Ey = e−jkz z[ Ae−jkxx + Be+jkxx] (6.31) Before proceeding, let’s make sure that Equation 6.31 is actually a solution to Equation 6.29. As we shall see in a moment, performing this check will reveal some additional useful information. First, note: ∂˜Ey ∂x = e−jkz z[ −Ae−j kxx + Be+jkxx] (jkx) (6.32) So: ∂2 ˜Ey ∂x2 = e−jkz z[ Ae−j kxx + Be+jkxx]( −k2 x ) (6.33) Comparing this to Equation 6.31, we observe the remarkable fact that ∂2 ˜Ey ∂x2 = −k2 x˜Ey (6.34) Similarly , note: ∂˜Ey ∂z = e−jkz z[ Ae−j kxx + Be+jkxx] (−jkz) (6.35) So: ∂2 ˜Ey ∂z2 = e−jkz z[ Ae−j kxx + Be+jkxx]( −k2 z ) = −k2 z ˜Ey (6.36) Now summing these results: ∂2 ˜Ey ∂x2 + ∂2 ˜Ey ∂z2 = − ( k2 x + k2 z )˜Ey (6.37) Comparing Equation 6.37 to Equation 6.29, we conclude that Equation 6.31 is indeed a solution to Equation 6.29, but only if: β2 = k2 x + k2 z (6.38)",Electromagnetics_Vol2.pdf "100 CHAPTER 6. W A VEGUIDES This confirms that kx and kz are in fact the components of the propagation vector k ≜ βˆk = ˆxkx + ˆyky + ˆzkz (6.39) where ˆk is the unit vector pointing in the direction of propagation, and ky = 0 in this particular problem. The solution has now been reduced to finding the constants A, B, and either kx or kz. This is accomplished by enforcing the relevant boundary conditions. In general, the component of ˜E that is tangent to a perfectly-conducting surface is zero. Applied to the present problem, this means ˜Ey = 0 at x= 0 and ˜Ey = 0 at x= a. Referring to Equation 6.31, the boundary condition at x= 0 means e−jkz z[A· 1 + B· 1] = 0 (6.40) The factor e−jkz z cannot be zero; therefore, A+ B = 0. Since B = −A, we may rewrite Equation 6.31 as follows: ˜Ey = e−jkz zB [ e+jkxx − e−jkxx] (6.41) This expression is simplified using a trigonometric identity: 1 2j [ e+jkxx − e−j kxx] = sin kxx (6.42) Let us now make the definition Ey0 ≜ j2B. Then:",Electromagnetics_Vol2.pdf "This expression is simplified using a trigonometric identity: 1 2j [ e+jkxx − e−j kxx] = sin kxx (6.42) Let us now make the definition Ey0 ≜ j2B. Then: ˜Ey = Ey0e−jkz zsin kxx (6.43) Now applying the boundary condition at x= a: Ey0e−jkz zsin kxa= 0 (6.44) The factor e−jkz z cannot be zero, and Ey0 = 0 yields only trivial solutions; therefore: sin kxa= 0 (6.45) This in turn requires that kxa= mπ (6.46) where mis an integer. Note that m= 0 is not of interest since this yields kx = 0, which according to Equation 6.43 yields the trivial solution ˜Ey = 0. Also each integer value of mthat is less than zero is excluded because the associated solution is different from the solution for the corresponding positive value of min sign only , which can be absorbed in the arbitrary constant Ey0. At this point we have uncovered a family of solutions given by Equation 6.43 and Equation 6.46 with m= 1,2,.... Each solution associated with a particular value of mis referred to as a mode, which",Electromagnetics_Vol2.pdf "given by Equation 6.43 and Equation 6.46 with m= 1,2,.... Each solution associated with a particular value of mis referred to as a mode, which (via Equation 6.46) has a particular value of kx. The value of kz for mode mis obtained using Equation 6.38 as follows: kz = √ β2 − k2x = √ β2 − (mπ a )2 (6.47) Since kz is specified to be real-valued, we require: β2 − (mπ a )2 >0 (6.48) This constrains β; specifically: β >mπ a (6.49) Recall that β = ω√µǫand ω= 2πf where f is frequency . Solving for f, we find: f > m 2a√µǫ (6.50) Therefore, each mode exists only above a certain frequency , which is different for each mode. This cutoff frequency fc for mode mis given by f(m) c ≜ m 2a√µǫ (6.51) At frequencies below the cutoff frequency for mode m, modes 1 through m− 1 exhibit imaginary-valued kz. The propagation constant must have a real-valued component in order to propagate; therefore, these modes do not propagate and may be ignored. Let us now summarize the solution. For the scenario",Electromagnetics_Vol2.pdf "component in order to propagate; therefore, these modes do not propagate and may be ignored. Let us now summarize the solution. For the scenario depicted in Figure 6.2, the electric field component of the TE solution is given by: ˆy ˜Ey = ˆy ∞∑ m=1 ˜E(m) y (6.52)",Electromagnetics_Vol2.pdf "6.3. P ARALLEL PLA TE W A VEGUIDE: TE CASE, ELECTRIC FIELD 101 where ˜E(m) y ≜ { 0, f 1/2a√µǫ. Also k( 1) x = π/a, so k(1) z = √ β2 − (π a )2 (6.56) Subsequently , ˜E(1) y = E(1) y0 e−jk(1) z zsin πx a (6.57) Note",Electromagnetics_Vol2.pdf "f >1/2a√µǫ. Also k( 1) x = π/a, so k(1) z = √ β2 − (π a )2 (6.56) Subsequently , ˜E(1) y = E(1) y0 e−jk(1) z zsin πx a (6.57) Note that this mode has the form of a plane wave. The plane wave propagates in the +ˆz direction with phase propagation constant k(1) z . Also, we observe that the apparent plane wave is non-uniform, exhibiting magnitude proportional to sin πx/awithin the waveguide. This is shown in Figure 6.3 (left image). In particular, we observe that the magnitude of the wave is zero at the perfectly-conducting surfaces – as is necessary to satisfy the boundary conditions – and is maximum in the center of the waveguide. Now let us examine the m= 2 mode. For this mode, f(2) c = 1/a√µǫ, so this mode can exist if c⃝ C. W ang CC BY -SA 4.0 Figure 6.3: Magnitude of the two lowest-order TE modes in a parallel plate waveguide. Left: m = 1, Right: m= 2. f >1/a√µǫ. This frequency is higher than f( 1) c , so the m= 1 mode can exist at any frequency at which",Electromagnetics_Vol2.pdf "Right: m= 2. f >1/a√µǫ. This frequency is higher than f( 1) c , so the m= 1 mode can exist at any frequency at which the m= 2 mode exists. Also k(2) x = 2π/a, so k(2) z = √ β2 − (2π a )2 (6.58) Subsequently , ˜E(2) y = E(2) y0 e−jk(2) z zsin 2πx a (6.59) In this case, the apparent plane wave propagates in the +ˆz direction with phase propagation constant k(2) z , which is less than k(1) z . For m= 2, we find magnitude is proportional to sin 2πx/a within the waveguide (Figure 6.3, right image). As in the m= 1 case, we observe that the magnitude of the wave is zero at the PEC surfaces; however, for m= 2, there are two maxima with respect to x, and the magnitude in the center of the waveguide is zero. This pattern continues for higher-order modes. In particular, each successive mode exhibits higher cutoff frequency , smaller propagation constant, and increasing integer number of sinusoidal half-periods in magnitude. Example 6.2. Single-mode TE propagation in a parallel plate waveguide.",Electromagnetics_Vol2.pdf "increasing integer number of sinusoidal half-periods in magnitude. Example 6.2. Single-mode TE propagation in a parallel plate waveguide. Consider an air-filled parallel plate waveguide consisting of plates separated by 1 cm. Determine the frequency range for which one",Electromagnetics_Vol2.pdf "102 CHAPTER 6. W A VEGUIDES (and only one) propagating TE mode is assured. Solution. Single-mode TE propagation is assured by limiting frequency f to greater than the cutoff frequency for m= 1, but lower than the cutoff frequency for m= 2. (Any frequency higher than the cutoff frequency for m= 2 allows at least 2 modes to exist.) Calculating the applicable cutoff frequencies, we find: f(1) c = 1 2a√µ0ǫ0 ∼= 15 .0 GHz (6.60) f(2) c = 2 2a√µ0ǫ0 ∼= 30 .0 GHz (6.61) Therefore, 15.0 GHz ≤ f ≤ 30.0 GHz . Finally , let us consider the phase velocity vp within the waveguide. For lowest-order mode m= 1, this is vp = ω k(1) z = ω√ ω2µǫ− (π a )2 (6.62) Recall that the speed of an electromagnetic wave in unbounded space (i.e., not in a waveguide) is 1/√µǫ. For example, the speed of light in free space is 1/√µ0ǫ0 = c. However, the phase velocity indicated by Equation 6.62 is greater than 1/√µǫ; e.g., faster than light would travel in the same material",Electromagnetics_Vol2.pdf "1/√µ0ǫ0 = c. However, the phase velocity indicated by Equation 6.62 is greater than 1/√µǫ; e.g., faster than light would travel in the same material (presuming it were transparent). At first glance, this may seem to be impossible. However, recall that information travels at the group velocity vg, and not necessarily the phase velocity . (See Section 6.1 for a refresher.) Although we shall not demonstrate this here, the group velocity in the parallel plate waveguide is always less than 1/√ µǫ, so no physical la ws are broken, and signals travel somewhat slower than the speed of light, as they do in any other structure used to convey signals. Also remarkable is that the speed of propagation is different for each mode. In fact, we find that the phase velocity increases and the group velocity decreases as mincreases. This phenomenon is known as dispersion, and sometimes specifically as mode dispersion or modal dispersion. 6.4 Parallel Plate W aveguide: TE Case, Magnetic Field [m0175]",Electromagnetics_Vol2.pdf "dispersion, and sometimes specifically as mode dispersion or modal dispersion. 6.4 Parallel Plate W aveguide: TE Case, Magnetic Field [m0175] In Section 6.2, the parallel plate waveguide was introduced. In Section 6.3, we determined the TE component of the electric field. In this section, we determine the TE component of the magnetic field. The reader should be familiar with Section 6.3 before attempting this section. In Section 6.3, the TE component of the electric field was determined to be: ˆy ˜Ey = ˆy ∞∑ m=1 ˜E(m) y (6.63) The TE component of the magnetic field may be obtained from the Maxwell-Faraday equation: ∇ × ˜E = −jωµ˜H (6.64) Thus: ˜H = j ωµ ∇ × ˜E = j ωµ ∇ × ( ˆy ˜Ey ) (6.65) The relevant form of the curl operator is Equation B.16 (Appendix B.2). Although the complete expression consists of 6 terms, all but 2 of these terms are zero because the ˆx and ˆz components of ˜E are zero. The two remaining terms are −ˆx∂˜Ey/∂z and +ˆz∂˜Ey/∂x. Thus: ˜H = j ωµ ( −ˆx∂˜Ey ∂z + ˆz∂˜Ey ∂x )",Electromagnetics_Vol2.pdf "of ˜E are zero. The two remaining terms are −ˆx∂˜Ey/∂z and +ˆz∂˜Ey/∂x. Thus: ˜H = j ωµ ( −ˆx∂˜Ey ∂z + ˆz∂˜Ey ∂x ) (6.66) Recall that ˜Ey is the sum of modes, as indicated in Equation 6.63. Since differentiation (i.e., ∂/∂z and ∂/∂x) is a linear operator, we may evaluate Equation 6.66 for modes one at a time, and then sum the results. Using this approach, we find: ∂˜E(m) y ∂z = ∂ ∂z E(m) y0 e−jk(m) z zs in k(m) x x = ( E(m) y0 e−jk(m) z zsin k(m) x x )( −jk(m) z ) (6.67)",Electromagnetics_Vol2.pdf "6.4. P ARALLEL PLA TE W A VEGUIDE: TE CASE, MAGNETIC FIELD 103 and ∂˜E(m) y ∂x = ∂ ∂x E(m) y0 e−jk(m) z zs in k(m) x x = ( E(m) y0 e−jk(m) z zcos k(m) x x )( +k(m) x ) (6.68) W e may now assemble a solution for the magnetic field as follows: ˆx ˜Hx + ˆz ˜Hz = ˆx ∞∑ m=1 ˜H(m) x + ˆz ∞∑ m=1 ˜H(m) z (6.69) where ˜H(m) x = −k(m) z ωµ E(m) y0 e−jk(m) z zs in k(m) x x (6.70) ˜H(m) z = + jk(m) x ωµ E(m) y0 e−jk(m) z zcos k(m) x x (6.71) and modes may only exist at frequencies greater than the associated cutoff frequencies. Summarizing: The magnetic field component of the TE solu- tion is given by Equation 6.69 with modal com- ponents as indicated by Equations 6.70 and 6.71. Caveats pertaining to the cutoff frequencies and the locations of sources and structures continue to apply . This result is quite complex, yet some additional insight is possible. At the perfectly-conducting (PEC) surface at x= 0, we see ˜H(m) x (x= 0) = 0 ˜H(m) z (x= 0) = +j k(m) x ωµ E(m) y0 e−jk(m) z z (6.72) Similarly",Electromagnetics_Vol2.pdf "surface at x= 0, we see ˜H(m) x (x= 0) = 0 ˜H(m) z (x= 0) = +j k(m) x ωµ E(m) y0 e−jk(m) z z (6.72) Similarly , on the PEC surface at x= a, we see ˜H(m) x (x= a) = 0 ˜H(m) z (x= a) = −jk(m) x ωµ E(m) y0 e−jk(m) z z (6.73) Thus, we see the magnetic field vector at the PEC surfaces is non-zero and parallel to the PEC surfaces. Recall that the magnetic field is identically zero inside a PEC material. Also recall that boundary conditions require that discontinuity in the component of H tangent to a surface must be supported by a surface current. W e conclude that Current flows on the PEC surfaces of the waveg- uide. If this seems surprising, note that essentially the same thing happens in a coaxial transmission line. That is, signals in a coaxial transmission line can be described equally well in terms of either potentials and currents on the inner and outer conductors, or the electromagnetic fields between the conductors. The parallel plate waveguide is only slightly more",Electromagnetics_Vol2.pdf "on the inner and outer conductors, or the electromagnetic fields between the conductors. The parallel plate waveguide is only slightly more complicated because the field in a properly-designed coaxial cable is a single transverse electromagnetic (TEM) mode, whereas the fields in a parallel plate waveguide are combinations of TE and TM modes. Interestingly , we also find that the magnetic field vector points in different directions depending on position relative to the conducting surfaces. W e just determined that the magnetic field is parallel to the conducting surfaces at those surfaces. However, the magnetic field is perpendicular to those surfaces at m locations between x= 0 and x= a. These locations correspond to maxima in the electric field.",Electromagnetics_Vol2.pdf "104 CHAPTER 6. W A VEGUIDES 6.5 Parallel Plate W aveguide: TM Case, Electric Field [m0177] In Section 6.2, the parallel plate waveguide shown in Figure 6.4 was introduced. At the end of that section, we decomposed the problem into its TE and TM components. In this section, we find the TM component of the fields in the waveguide. “Transverse magnetic” means the magnetic field vector is perpendicular to the plane of interest, and is therefore parallel to the conducting surfaces. Thus, ˜H = ˆy ˜Hy, with no component in the ˆx or ˆz directions. Following precisely the same reasoning employed in Section 6.2, we find the governing equation for the magnetic component of TM field is: ∂2 ∂x2 ˜Hy + ∂2 ∂z2 ˜Hy = −β2 ˜Hy (6.74) The general solution to this partial differential equation is: ˜Hy = e−jkz z[ Ae−jkxx + Be+jkxx] + e+jkz z[ Ce−jkxx + De+jkxx] (6.75) where A, B, C, and Dare complex-valued constants; and kx and kz are real-valued constants. W e have",Electromagnetics_Vol2.pdf "+ e+jkz z[ Ce−jkxx + De+jkxx] (6.75) where A, B, C, and Dare complex-valued constants; and kx and kz are real-valued constants. W e have assigned variable names to these constants with advance knowledge of their physical interpretation; however, at this moment they remain simply unknown constants whose values must be determined by enforcement of boundary conditions. c⃝ C. W ang CC BY -SA 4.0 Figure 6.4: TM component of the electric field in a parallel plate waveguide. Note that Equation 6.75 consists of two terms. The first term includes the factor e−jkz z, indicating a wave propagating in the +ˆz direction, and the second term includes the factor e+jkz z, indicating a wave propagating in the −ˆz direction. If we impose the restriction that sources exist only on the left (z < 0) side of Figure 6.4, and that there be no structure capable of wave scattering (in particular, reflection) on the right (z > 0) side of Figure 6.4, then there can be no wave components propagating in the −ˆz",Electromagnetics_Vol2.pdf "on the right (z > 0) side of Figure 6.4, then there can be no wave components propagating in the −ˆz direction. In this case, C = D= 0 and Equation 6.75 simplifies to: ˜Hy = e−jkz z[ Ae−jkxx + Be+jkxx] (6.76) Before proceeding, let’s make sure that Equation 6.76 is actually a solution to Equation 6.74. As in the TE case, this check yields a constraint (in fact, the same constraint) on the as-yet undetermined parameters kx and kz. First, note: ∂˜Hy ∂x = e−jkz z[ −Ae−j kxx + Be+jkxx] (jkx) (6.77) So: ∂2 ˜Hy ∂x2 = e−jkz z[ Ae−j kxx + Be+jkxx]( −k2 x ) = −k2 x ˜Hy (6.78) Next, note: ∂˜Hy ∂z = e−jkz z[ Ae−j kxx + Be+jkxx] (−jkz) (6.79) So: ∂2 ˜Hy ∂z2 = e−jkz z[ Ae−j kxx + Be+jkxx]( −k2 z ) = −k2 z ˜Hy (6.80) Now summing these results: ∂2 ˜Hy ∂x2 + ∂2 ˜Hy ∂z2 = − ( k2 x + k2 z )˜Hy (6.81) Comparing Equation 6.81 to Equation 6.74, we conclude that Equation 6.76 is a solution to Equation 6.74 under the constraint that: β2 = k2 x + k2 z (6.82)",Electromagnetics_Vol2.pdf "6.5. P ARALLEL PLA TE W A VEGUIDE: TM CASE, ELECTRIC FIELD 105 This is precisely the same constraint identified in the TE case, and confirms that kx and ky are in fact the components of the propagation vector k ≜ βˆk = ˆxkx + ˆyky + ˆzkz (6.83) where ˆk is the unit vector pointing in the direction of propagation, and ky = 0 in this particular problem. Our objective in this section is to determine the electric field component of the TM field. The electric field may be obtained from the magnetic field using Ampere’s law: ∇ × ˜H = jωǫ˜E (6.84) Thus: ˜E = 1 jωǫ ∇ × ˜H = 1 jωǫ ∇ × ( ˆy ˜Hy ) (6.85) The relevant form of the curl operator is Equation B.16 (Appendix B.2). Although the complete expression consists of 6 terms, all but 2 of these terms are zero because the ˆx and ˆz components of ˜H are zero. The two remaining terms are −ˆx∂˜Hy/∂z and +ˆz∂˜Hy/∂x. Thus: ˜E = 1 jωǫ ( −ˆx∂˜Hy ∂z + ˆz∂˜Hy ∂x ) (6.86) W e may further develop this expression using",Electromagnetics_Vol2.pdf "−ˆx∂˜Hy/∂z and +ˆz∂˜Hy/∂x. Thus: ˜E = 1 jωǫ ( −ˆx∂˜Hy ∂z + ˆz∂˜Hy ∂x ) (6.86) W e may further develop this expression using Equations 6.77 and 6.79. W e find the ˆx component of ˜E is: ˜Ex = kz ωǫ e−jkz z[ Ae−j kxx + Be+jkxx] (6.87) and the ˆz component of ˜E is: ˜Ez = kx ωǫ e−jkz z[ −Ae−j kxx + Be+jkxx] (6.88) The solution has now been reduced to the problem of finding the constants A, B, and either kx or kz. This is accomplished by enforcing the relevant boundary conditions. In general, the component of the electric field which is tangent to a perfectly-conducting surface is zero. Applied to the present (TM) case, this means ˜Ez(x= 0) = 0 and ˜Ez(x= a) = 0. Referring to Equation 6.88, the boundary condition at x= 0 means kx ωǫ e−jkz z[ −A(1) + B(1)] = 0 (6.89) The factor e−jkz z always has unit magnitude, and so cannot be zero. W e could require kx to be zero, but this is unnecessarily restrictive. Instead, we require A= Band we may rewrite Equation 6.88 as follows: ˜Ez = Bkx",Electromagnetics_Vol2.pdf "this is unnecessarily restrictive. Instead, we require A= Band we may rewrite Equation 6.88 as follows: ˜Ez = Bkx ωǫ e−jkz z[ e+j kxx − e−jkxx] (6.90) This expression is simplified using a trigonometric identity: sin kxa= 1 2j [ e+jkxa − e−j kxa] (6.91) Thus: ˜Ez = j2Bkx ωǫ e−jkz zs in kxx (6.92) Now following up with ˜Ex, beginning from Equation 6.87: ˜Ex = kz ωǫ e−jkz z[ Ae−j kxx + Be+jkxx] = Bkz ωǫ e−jkz z[ e−j kxx + e+jkxx] = 2Bkz ωǫ e−jkz zcos kxx (6.93) F or convenience we define the following complex-valued constant: Ex0 ≜ 2Bkz ωǫ (6.94) This yields the following simpler expression: ˜Ex = Ex0 e−jkz zcos kxx (6.95) Now let us apply the boundary condition at x= ato ˜Ez: j2Bkz ωǫ e−jkz zs in kxa= 0 (6.96) Requiring B = 0 or kz = 0 yields only trivial solutions, therefore, it must be true that sin kxa= 0 (6.97) This in turn requires that kxa= mπ (6.98)",Electromagnetics_Vol2.pdf "106 CHAPTER 6. W A VEGUIDES where mis an integer. Note that this is precisely the same relationship that we identified in the TE case. There is an important difference, however. In the TE case, m= 0 was not of interest because this yields kx = 0, and the associated field turned out to be identically zero. In the present (TM) case, m= 0 also yields kx = 0, but the associated field is not necessarily zero. That is, for m= 0, ˜Ez = 0 but ˜Ex is not necessarily zero. Therefore, m= 0 as well as m= 1, m= 2, and so on are of interest in the TM case. At this point, we have uncovered a family of solutions with m= 0,1,2,.... Each solution is referred to as a mode, and is associated with a particular value of kx. In the discussion that follows, we shall find that the consequences are identical to those identified in the TE case, except that m= 0 is now also allowed. Continuing: The value of kz for mode mis obtained using Equation 6.82 as follows: kz = √ β2 − k2x = √ β2 − (mπ a )2 (6.99) Since kz is",Electromagnetics_Vol2.pdf "Continuing: The value of kz for mode mis obtained using Equation 6.82 as follows: kz = √ β2 − k2x = √ β2 − (mπ a )2 (6.99) Since kz is specified to be real-valued, we require: β2 − (mπ a )2 >0 (6.100) This constrains β; specifically: β >mπ a (6.101) Recall that β = ω√µǫand ω= 2πf where f is frequency . Solving for f, we find: f > m 2a√µǫ (6.102) Thus, each mode exists only above a certain frequency , which is different for each mode. This cutoff frequency fc for mode mis given by f(m) c ≜ m 2a√µǫ (6.103) At frequencies below the cutoff frequency for mode m, modes 0 through m− 1 exhibit imaginary-valued kz and therefore do no propagate. Also, note that the cutoff frequency for m= 0 is zero, and so this mode is always able to propagate. That is, the m= 0 mode may exist for any a> 0 and any f >0. Once again, this is a remarkable difference from the TE case, for which m= 0 is not available. Let us now summarize the solution. With respect to Figure 6.4, we find that the electric field component",Electromagnetics_Vol2.pdf "which m= 0 is not available. Let us now summarize the solution. With respect to Figure 6.4, we find that the electric field component of the TM field is given by: ˜E = ∞∑ m=0 [ ˆx ˜E(m) x + ˆz ˜E(m) z ] (6.104) where ˜E(m) x ≜ { 0 , f (mπ a )2 + (nπ b )2 (6.248) Since ω= 2πf: f > 1 2π√µǫ √ (mπ a )2 + (nπ b )2 (6.249) = 1 2√µǫ √ (m a )2 + (n b )2 (6.250) Note that 1/√µǫis the phase velocity vp for the medium used in the waveguide. With this in mind, let us define: vpu ≜ 1√µǫ (6.251) This is the phase velocity in an unbounded medium having the same permeability and permittivity as the interior of the waveguide. Thus: f >vpu 2 √ (m a )2 + (n b )2 (6.252) In other words, the mode (m,n) avoids being cut off if the frequency is high enough to meet this criterion. Thus, it is useful to make the following definition: fmn ≜ vpu 2 √ (m a )2 + (n b )2 (6.253)",Electromagnetics_Vol2.pdf "if the frequency is high enough to meet this criterion. Thus, it is useful to make the following definition: fmn ≜ vpu 2 √ (m a )2 + (n b )2 (6.253) The cutoff frequency fm n (Equation 6.253) is the lowest frequency for which the mode (m,n) is able to propagate (i.e., not cut off).",Electromagnetics_Vol2.pdf "118 CHAPTER 6. W A VEGUIDES Example 6.4. Cutof f frequencies for WR-90. WR-90 is a popular implementation of rectangular waveguide. WR-90 is air-filled with dimensions a= 22.86 mm and b= 10.16 mm. Determine cutoff frequencies and, in particular, the lowest frequency at which WR-90 can be used. Solution. Since WR-90 is air-filled, µ≈ µ0, ǫ≈ ǫ0, and vpu ≈ 1√ µ0ǫ0 ∼= 3.00 × 108 m/s. Cutof f frequencies are given by Equation 6.253. Recall that there are no non-zero TE or TM modes with m= 0 and n= 0. Since a>b, the lowest non-zero cutoff frequency is achieved when m= 1 and n= 0. In this case, Equation 6.253 yields f10 = 6.557 GHz ; this is the lowest frequency that is able to propagate efficiently in the waveguide. The next lowest cutoff frequency is f20 = 13.114 GHz. The third lowest cutoff frequency is f01 = 14.754 GHz. The lowest-order TM mode that is non-zero and not cut off is TM 11 (f11 = 16.145 GHz). Phase velocity. The phase velocity for a wave",Electromagnetics_Vol2.pdf "The lowest-order TM mode that is non-zero and not cut off is TM 11 (f11 = 16.145 GHz). Phase velocity. The phase velocity for a wave propagating within a rectangular waveguide is greater than that of electromagnetic radiation in unbounded space. For example, the phase velocity of any propagating mode in a vacuum-filled waveguide is greater than c, the speed of light in free space. This is a surprising result. Let us first derive this result and then attempt to make sense of it. Phase velocity vp in the rectangular waveguide is given by vp ≜ ω k(m,n ) z (6.254) = ω√ ω2µǫ− ( mπ/a)2 − (nπ/b)2 (6.255) Immediately we observe that phase velocity seems to be different for different modes. Dividing the numerator and denominator by β = ω√µǫ, we obtain: vp = 1√µǫ 1√ 1 − (ω2µǫ)−1 [ ( mπ/a)2 + (nπ/b)2 ] (6.256) Note that 1/√µǫis vpu, as defined earlier. Employing Equation 6.253 and also noting that ω= 2πf, Equation 6.256 may be rewritten in the following form: vp = vpu√ 1 − (fmn/f)2 (6.257) F",Electromagnetics_Vol2.pdf "Equation 6.253 and also noting that ω= 2πf, Equation 6.256 may be rewritten in the following form: vp = vpu√ 1 − (fmn/f)2 (6.257) F or any propagating mode, f >fmn; subsequently , vp >vpu. In particular, vp >c for a vacuum-filled waveguide. How can this not be a violation of fundamental physics? As noted in Section 6.1, phase velocity is not necessarily the speed at which information travels, but is merely the speed at which a point of constant phase travels. T o send information, we must create a disturbance in the otherwise sinusoidal excitation presumed in the analysis so far. The complex field structure creates points of constant phase that travel faster than the disturbance is able to convey information, so there is no violation of physical principles. Group velocity. As noted in Section 6.1, the speed at which information travels is given by the group velocity vg. In unbounded space, vg = vp, so the speed of information is equal to the phase velocity in",Electromagnetics_Vol2.pdf "velocity vg. In unbounded space, vg = vp, so the speed of information is equal to the phase velocity in that case. In a rectangular waveguide, the situation is different. W e find: vg = ( ∂k(m,n) z ∂ω )−1 (6.258) = vpu √ 1 − (fmn/f)2 (6.259) which is always less than vpu for a propagating mode. Note that group velocity in the waveguide depends on frequency in two ways. First, because fmn takes on different values for different modes, group velocity is different for different modes. Specifically , higher-order modes propagate more slowly than lower-order modes having the same frequency . This is known as modal dispersion. Secondly , note that the group velocity of any given mode depends on frequency . This is known as chromatic dispersion.",Electromagnetics_Vol2.pdf "6.10. RECT ANGULAR W A VEGUIDE: PROP AGA TION CHARACTERISTICS 119 The speed of a signal within a rectangular waveg- uide is given by the group velocity of the as- sociated mode (Equation 6.259). This speed is less than the speed of propagation in unbounded media having the same permittivity and perme- ability . Speed depends on the ratio fmn/f, and generally decreases with increasing frequency for any given mode. Example 6.5. Speed of propagating in WR-90. Revisiting WR-90 waveguide from Example 6.4: What is the speed of propagation for a narrowband signal at 10 GHz? Solution. Let us assume that “narrowband” here means that the bandwidth is negligible relative to the center frequency , so that we need only consider the center frequency . As previously determined, the lowest-order propagating mode is TE 10, for which f10 = 6.557 GHz. The next-lowest cutoff frequency is f20 = 13.114 GHz. Therefore, only the TE 10 mode is available for this signal. The group",Electromagnetics_Vol2.pdf "next-lowest cutoff frequency is f20 = 13.114 GHz. Therefore, only the TE 10 mode is available for this signal. The group velocity for this mode at the frequency of interest is given by Equation 6.259. Using this equation, the speed of propagation is found to be ∼= 2.26 × 108 m/s , which is about 75.5% of c. [m0212]",Electromagnetics_Vol2.pdf "120 CHAPTER 6. W A VEGUIDES Image Credits Fig. 6.1: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Geometry for analysis of fields in parallel plate waveguide.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/), modified. Fig. 6.2: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TE component of electric field in parallel plate waveguide.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 6.3: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Magnitude of the two lowest-order TE modes in parallel plate waveguide.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 6.4: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TM component of electric field in parallel plate waveguide.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 6.5: c⃝ Sevenchw (C. W ang),",Electromagnetics_Vol2.pdf "CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 6.5: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:TM component of electric field in parallel plate waveguide.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/), modified.",Electromagnetics_Vol2.pdf "Chapter 7 T ransmission Lines Redux 7.1 Parallel Wire T ransmission Line [m0188] A parallel wire transmission line consists of wires separated by a dielectric spacer. Figure 7.1 shows a common implementation, commonly known as “twin lead. ” The wires in twin lead line are held in place by a mechanical spacer comprised of the same low-loss dielectric material that forms the jacket of each wire. V ery little of the total energy associated with the electric and magnetic fields lies inside this material, so the jacket and spacer can usually be neglected for the purposes of analysis and electrical design. Parallel wire transmission line is often employed in radio applications up to about 100 MHz as an alternative to coaxial line. Parallel wire line has the advantages of lower cost and lower loss than coaxial line in this frequency range. However, parallel wire line lacks the self-shielding property of coaxial cable; i.e., the electromagnetic fields of coaxial line are",Electromagnetics_Vol2.pdf "line lacks the self-shielding property of coaxial cable; i.e., the electromagnetic fields of coaxial line are isolated by the outer conductor, whereas those of c⃝ Sp inningSpark, Inductiveload CC BY SA 3.0 (modified) Figure 7.1: T win lead, a commonly-encountered form of parallel wire transmission line. c⃝ C. W ang CC BY SA 4.0 Figure 7.2: Parallel wire transmission line structure and design parameters. parallel wire line are exposed and prone to interaction with nearby structures and devices. This prevents the use of parallel wire line in many applications. Another discriminator between parallel wire line and coaxial line is that parallel wire line is differential. 1 The conductor geometry is symmetric and neither conductor is favored as a signal datum (“ground”). Thus, parallel wire line is commonly used in applications where the signal sources and/or loads are also differential; common examples are the dipole antenna and differential amplifiers. 2",Electromagnetics_Vol2.pdf "applications where the signal sources and/or loads are also differential; common examples are the dipole antenna and differential amplifiers. 2 Figure 7.2 shows a cross-section of parallel wire line. Relevant parameters include the wire diameter, d; and the center-to-center spacing, D. 1 The references in “ Additional Reading” at the end of this section may be helpful if you are not familiar with this concept. 2 This is in contrast to “single-ended” line such as coaxial line, which has conductors of different cross-sections and the outer con- ductor is favored as the datum. Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "122 CHAPTER 7. TRANSMISSION LINES REDUX c⃝ S. Lally CC BY SA 4.0 Figure 7.3: Structure of the electric and magnetic fields for a cross-section of parallel wire line. In this case, the wave is propagating away from the viewer. The associated field structure is transverse electromagnetic (TEM) and is therefore completely described by a single cross-section along the line, as shown in Figure 7.3. Expressions for these fields exist, but are complex and not particularly useful except as a means to calculate other parameters of interest. One of these parameters is, of course, the characteristic impedance since this parameter plays an important role in the analysis and design of systems employing transmission lines. The characteristic impedance may be determined using the “lumped element” transmission line model using the following expression: Z0 = √ R′ + jωL′ G′ + jωC′ (7.1) where R′, G′, C′, and L′ are the resistance, conductance, capacitance, and inductance per unit",Electromagnetics_Vol2.pdf "Z0 = √ R′ + jωL′ G′ + jωC′ (7.1) where R′, G′, C′, and L′ are the resistance, conductance, capacitance, and inductance per unit length, respectively . This analysis is considerably simplified by neglecting loss; therefore, let us assume the “low-loss” conditions R′ ≪ ωL′ and G′ ≪ ωC′. Then we find: Z0 ≈ √ L′ C′ (lo w loss) (7.2) and the problem is reduced to determining inductance and capacitance of the transmission line. These are L′ = µ0 π ln [ ( D/d) + √ (D/d)2 − 1 ] (7.3) C′ = π ǫ ln [ (D/d) + √ (D/d)2 − 1 ] (7.4) Because the wire separation Dis typically much greater than the wire diameter d, D/d≫ 1 and so√ (D/d)2 − 1 ≈ D /d. This leads to the simplified expressions L′ ≈ µ0 π ln (2D/d) (D ≫ d) (7.5) C′ ≈ πǫ ln (2D/d) ( D≫ d) (7.6) Now returning to Equation 7.2: Z0 ≈ 1 π √ µ0 ǫ ln (2D/d) (7.7) Noting that ǫ= ǫrǫ0 and √ µ0/ǫ0 ≜ η0, we obtain Z0 ≈ 1 π η0 √ǫr ln (2D/d) (7.8) The characteristic impedance of parallel wire line, assuming low-loss conditions and wire spac-",Electromagnetics_Vol2.pdf "µ0/ǫ0 ≜ η0, we obtain Z0 ≈ 1 π η0 √ǫr ln (2D/d) (7.8) The characteristic impedance of parallel wire line, assuming low-loss conditions and wire spac- ing much greater than wire diameter, is given by Equation 7.8. Observe that the characteristic impedance of parallel wire line increases with increasing D/d. Since this ratio is large, the characteristic impedance of parallel wire line tends to be large relative to common values of other kinds of TEM transmission line, such as coaxial line and microstrip line. An example follows. Example 7.1. 300 Ω twin-lead. A commonly-encountered form of parallel wire transmission line is 300 Ω twin-lead. Although implementations vary , the wire diameter is usually about 1 mm and and the wire spacing is usually about 6 mm. The relative permittivity of the medium ǫr ≈ 1 for the purposes of calculating transmission line parameters, since the jacket and spacer have only a small effect on the fields. For these values, Equation 7.8 gives",Electromagnetics_Vol2.pdf "calculating transmission line parameters, since the jacket and spacer have only a small effect on the fields. For these values, Equation 7.8 gives Z0 ≈ 298 Ω, as expected. Under the assumption that the wire jacket/spacer material has a negligible effect on the electromagnetic",Electromagnetics_Vol2.pdf "7.2. MICROSTRIP LINE REDUX 123 fields, and that the line is suspended in air so that ǫr ≈ 1, the phase velocity vp for a parallel wire line is approximately that of any electromagnetic wave in free space; i.e., c. In practical twin-lead, the effect of a plastic jacket/spacer material is to reduce the phase velocity by a few percent up to about 20%, depending on the materials and details of construction. So in practice vp ≈ 0.8cto 0.9cfor twin-lead line. Additional Reading: • “T win-lead” on Wikipedia. • “Differential signaling” on Wikipedia. • Sec. 8.7 (“Differential Circuits”) in S.W . Ellingson, Radio Systems Engineering, Cambridge Univ . Press, 2016. 7.2 Microstrip Line Redux [m0186] A microstrip transmission line consists of a narrow metallic trace separated from a metallic ground plane by a slab of dielectric material, as shown in Figure 7.4. This is a natural way to implement a transmission line on a printed circuit board, and so accounts for an important and expansive range of",Electromagnetics_Vol2.pdf "transmission line on a printed circuit board, and so accounts for an important and expansive range of applications. The reader should be aware that microstrip is distinct from stripline, which is a distinct type of transmission line; see “ Additional Reading” at the end of this section for disambiguation of these terms. A microstrip line is single-ended 3 in the sense that the conductor geometry is asymmetric and the one conductor – namely , the ground plane – also normally serves as ground for the source and load. The spacer material is typically a low-loss dielectric material having permeability approximately equal to that of free space (µ ≈ µ0) and relative permittivity ǫr in the range of 2 to about 10 or so. The structure of a microstrip line is similar to that of a parallel plate waveguide (Section 6.6), with the obvious difference that one of the “plates” has finite length in the direction perpendicular to the direction of propagation. Despite this difference, the parallel",Electromagnetics_Vol2.pdf "length in the direction perpendicular to the direction of propagation. Despite this difference, the parallel plate waveguide provides some useful insight into the operation of the microstrip line. Microstrip line is nearly always operated below the cutoff frequency of 3 The reference in “ Additional Reading” at the end of this section may be helpful if you are not familiar with this concept. hW l  r t  0 c⃝ 7h ead7metal7 CC BY SA 3.0 (modified) Figure 7.4: Microstrip transmission line structure and design parameters.",Electromagnetics_Vol2.pdf "124 CHAPTER 7. TRANSMISSION LINES REDUX Figure 7.5: Appr oximate structure of the electric and magnetic fields within microstrip line, assuming TM 0 operation. The fields outside the line are possibly sig- nificant, complicated, and not shown. In this case, the wave is propagating away from the viewer. all but the TM 0 mode, whose cutoff frequency is zero. This guarantees that only the TM 0 mode can propagate. The TM 0 mode has the form of a uniform plane wave, as shown in Figure 7.5. The electric field is oriented in the direction perpendicular to the plates, and magnetic field is oriented in the direction parallel to the plates. The direction of propagation E × H for the TM 0 mode always points in the same direction; namely , along the axis of the transmission line. Therefore, microstrip lines nominally exhibit transverse electromagnetic (TEM) field structure. The limited width W of the trace results in a “fringing field” – i.e., significant deviations from TM 0 field",Electromagnetics_Vol2.pdf "The limited width W of the trace results in a “fringing field” – i.e., significant deviations from TM 0 field structure in the dielectric beyond the edges of the trace and above the trace. The fringing fields may play a significant role in determining the characteristic impedance Z0. Since Z0 is an important parameter in the analysis and design of systems using transmission lines, we are motivated to not only determine Z0 for the microstrip line, but also to understand how variation in W affects Z0. Let us address this issue by considering the following three special cases, in order: • W ≫ h, which we shall refer to as the “wide” case. • W ≪ h, which we shall refer to as the “narrow” case. • W ∼ h; i.e., the intermediate case in which h and W equal to within an order of magnitude or so. Wide case. If W ≫ h, most of the energy associated with propagating waves lies directly underneath the trace, and Figure 7.5 provides a relatively accurate impression of the fields in this region. The",Electromagnetics_Vol2.pdf "with propagating waves lies directly underneath the trace, and Figure 7.5 provides a relatively accurate impression of the fields in this region. The characteristic impedance Z0 may be determined using the “lumped element” transmission line model using the following expression: Z0 = √ R′ + jωL′ G′ + jωC′ (7.9) where R′, G′, C′, and L′ are the resistance, conductance, capacitance, and inductance per unit length, respectively . For the present analysis, nothing is lost by assuming loss is negligible; therefore, let us assume R′ ≪ ωL′ and G′ ≪ ωG′, yielding Z0 ≈ √ L′ C′ (7.10) Thus the problem is reduced to determining capacitance and inductance of the transmission line. Wide microstrip line resembles a parallel-plate capacitor whose plate spacing dis very small compared to the plate area A. In this case, fringing fields may be considered negligible and one finds that the capacitance Cis given by C ≈ ǫA d (parallel plate capacitor) (7.11) In terms of wide microstrip line, A= Wl where lis",Electromagnetics_Vol2.pdf "the capacitance Cis given by C ≈ ǫA d (parallel plate capacitor) (7.11) In terms of wide microstrip line, A= Wl where lis length, and d= h. Therefore: C′ ≜ C l ≈ ǫW h (W ≫ h) (7.12) T o determine L′, consider the view of the microstrip line shown in Figure 7.6. Here a current source applies a steady current I on the left, and a resistive load closes the current loop on the right. Ampere’s law for magnetostatics and the associated “right hand rule” require that H is directed into the page and is approximately uniform. The magnetic flux between the trace and the ground plane is Φ = ∫ S B · ds (7.13) where S is the surface bounded by the current loop and B = µ0H. In the present problem, the area of S is hland H is approximately constant over S, so: Φ ≈ µ0Hhl (7.14)",Electromagnetics_Vol2.pdf "7.2. MICROSTRIP LINE REDUX 125 c⃝ C. W ang CC BY SA 4.0 Figure 7.6: V iew from the side of a microstrip line, used to determine L′. where H is the magnitude of H. Next, recall that: L≜ Φ I (7.15) So, we may determine Lif we are able to obtain an expression for I in terms of H. This can be done as follows. First, note that we can express I in terms of the current density on the trace; i.e., I = JsW (7.16) where Js is the current density (SI base units of A/m) on the trace. Next, we note that the boundary condition for H on the trace requires that the discontinuity in the tangent component of H going from the trace (where the magnetic field intensity is H) to beyond the trace (i.e., outside the transmission line, where the magnetic field intensity is approximately zero) be equal to the surface current. Thus, Js ≈ H and I = JsW ≈ HW (7.17) Returning to Equation 7.15, we find: L≜ Φ I ≈ µ0Hhl HW = µ0hl W (7.18) Subsequently , L′ ≜ L l ≈ µ0h W (W ≫ h) (7.19) No",Electromagnetics_Vol2.pdf "I = JsW ≈ HW (7.17) Returning to Equation 7.15, we find: L≜ Φ I ≈ µ0Hhl HW = µ0hl W (7.18) Subsequently , L′ ≜ L l ≈ µ0h W (W ≫ h) (7.19) No w the characteristic impedance is found to be Z0 ≈ √ L′ C′ ≈ √ µ0h/W ǫW/h = √ µ0 ǫ h W (7.20) The factor √ µ0/ǫis recognized as the wave impedance η. It is convenient to express this in terms c⃝ S. Lally CC BY SA 4.0 Figure 7.7: Electric and magnetic fields lines for nar- row (W ≪ h) microstrip line. of the free space wave impedance η0 ≜ √ µ0/ǫ0, leading to the expression we seek: Z0 ≈ η0 √ǫr h W (W ≫ h) (7.21) The characteristic impedance of “wide” (W ≫ h) microstrip line is given approximately by Equation 7.21. It is worth noting that the characteristic impedance of wide transmission line is proportional to h/W. The factor h/W figures prominently in the narrow- and intermediate-width cases as well, as we shall soon see. Narrow case. Figure 7.5 does not accurately depict the fields in the case that W ≪ h. Instead, much of",Electromagnetics_Vol2.pdf "see. Narrow case. Figure 7.5 does not accurately depict the fields in the case that W ≪ h. Instead, much of the energy associated with the electric and magnetic fields lies beyond and above the trace. Although these fields are relatively complex, we can develop a rudimentary model of the field structure by considering the relevant boundary conditions. In particular, the tangential component of E must be zero on the surfaces of the trace and ground plane. Also, we expect magnetic field lines to be perpendicular to the electric field lines so that the direction of propagation is along the axis of the line. These insights lead to Figure 7.7. Note that the field lines shown in Figure 7.7 are quite similar to those for parallel wire line (Section 7.1). If we choose diameter d= W and wire spacing D= 2h, then the fields of the microstrip line in the dielectric spacer must be similar to those of the parallel wire line between the lines. This is shown in",Electromagnetics_Vol2.pdf "126 CHAPTER 7. TRANSMISSION LINES REDUX Figure 7.8: Noting the similarity of the fields in nar- ro w microstrip line to those in a parallel wire line. Figure 7.9: Modeling the fields in narrow microstrip line as those of a parallel wire line, now introducing the ground plane. Figure 7.8. Note that the fields above the dielectric spacer in the microstrip line will typically be somewhat different (since the material above the trace is typically different; e.g., air). However, it remains true that we expect most of the energy to be contained in the dielectric, so we shall assume that this difference has a relatively small effect. Next, we continue to refine the model by introducing the ground plane, as shown in Figure 7.9: The fields in the upper half-space are not perturbed when we do this, since the fields in Figure 7.8 already satisfy the boundary conditions imposed by the new ground plane. Thus, we see that the parallel wire transmission line provides a pretty good guide to the structure of",Electromagnetics_Vol2.pdf "plane. Thus, we see that the parallel wire transmission line provides a pretty good guide to the structure of the fields for the narrow transmission line, at least in the dielectric region of the upper half-space. W e are now ready to estimate the characteristic impedance Z0 ≈ √ L′/C′ of low-loss narrow microstrip line. Neglecting the differences noted above, we estimate that this is roughly equal to the characteristic impedance of the analogous (d = W and D= 2h) parallel wire line. Under this assumption, we obtain from Equation 7.8: Z0 ∼ 1 π η0 √ǫr ln (4h/W) (W ≪ h) (7.22) This estimate will exhibit only “order of magnitude” accuracy (hence the “∼ ” symbol), since the contribution from the fields in half of the relevant space is ignored. However we expect that Equation 7.22 will accurately capture the dependence of Z0 on the parameters ǫr and h/W. These properties can be useful for making fine adjustments to a microstrip design. The characteristic impedance of “narrow” (W ≪",Electromagnetics_Vol2.pdf "properties can be useful for making fine adjustments to a microstrip design. The characteristic impedance of “narrow” (W ≪ h) microstrip line can be roughly approximated by Equation 7.22. Intermediate case. An expression for Z0 in the intermediate case – even a rough estimate – is difficult to derive, and beyond the scope of this book. However, we are not completely in the dark, since we can reasonably anticipate that Z0 in the intermediate case should be intermediate to estimates provided by the wide and narrow cases. This is best demonstrated by example. Figure 7.10 shows estimates of Z0 using",Electromagnetics_Vol2.pdf "7.2. MICROSTRIP LINE REDUX 127 Figure 7.10: Z0 for FR4 as a function of h/W, as determined by the “wide” and “narrow” approxima- tions, along with the Wheeler 1977 formula. Note that the vertical and horizontal axes of this plot are in log scale. the wide and narrow expressions (blue and green curves, respectively) for a particular implementation of microstrip line (see Example 7.2 for details). Since Z0 varies smoothly with h/W, it is reasonable to expect that simply averaging the values generated using the wide and narrow assumptions would give a pretty good estimate when h/W ∼ 1. However, it is also possible to obtain an accurate estimate directly . A widely-accepted and broadly-applicable formula is provided in Wheeler 1977 (cited in “ Additional Reading” at the end of this section). This expression is valid over the full range of h/W, not merely the intermediate case of h/W ∼ 1. Here it is: Z0 ≈ 42.4 Ω √ǫr + 1 × ln [ 1 + 4h W′ ( K+ √ K2 + 1 + 1/ǫr 2 π2 )] (7.23) where K ≜ 14",Electromagnetics_Vol2.pdf "h/W ∼ 1. Here it is: Z0 ≈ 42.4 Ω √ǫr + 1 × ln [ 1 + 4h W′ ( K+ √ K2 + 1 + 1/ǫr 2 π2 )] (7.23) where K ≜ 14 + 8/ǫr 11 (4h W′ ) (7.24) and W′ is W adjusted to account for the thickness t of the microstrip line. T ypically t≪ W and t≪ h, for which W′ ≈ W. Although complicated, this formula should not be completely surprising. For example, note the parameters hand W appear in this formula as the factor 4h/W, which we encountered in the “narrow” approximation. Also, we see that the formula indicates Z0 increases with increasing h/W and decreasing ǫr, as we determined in both the “narrow” and “wide” cases. The following example provides a demonstration for the very common case of microstrip implementation in FR4 circuit board material. Example 7.2. Characteristic impedance of microstrip lines in FR4. FR4 printed circuit boards consist of a substrate having h∼= 1.575 mm and ǫr ≈ 4.5. Figure 7.10 shows Z0 as a function of h/W, as determined by the wide and narrow approximations, along",Electromagnetics_Vol2.pdf "having h∼= 1.575 mm and ǫr ≈ 4.5. Figure 7.10 shows Z0 as a function of h/W, as determined by the wide and narrow approximations, along with the value obtained using the Wheeler 1977 formula. The left side of the plot represents the wide condition, whereas the right side of this plot represents the narrow condition. The Wheeler 1977 formula is an accurate estimate over the entire horizontal span. Note that the wide approximation is accurate only for h/W <0.1 or so, improving with decreasing h/W as expected. The narrow approximation overestimates Z0 by a factor of about 1.4 (i.e., about 40%). This is consistent with our previous observation that this approximation should yield only about “order of magnitude” accuracy . Nevertheless, the narrow approximation exhibits approximately the same rate of increase with h/W as does the Wheeler 1977 formula. Also worth noting from Figure 7.10 is the important and commonly-used result that Z0 ≈ 50 Ω is obtained for h/W ≈ 0.5. Thus, a",Electromagnetics_Vol2.pdf "Also worth noting from Figure 7.10 is the important and commonly-used result that Z0 ≈ 50 Ω is obtained for h/W ≈ 0.5. Thus, a 50 Ω microstrip line in FR4 has a trace width of about 3 mm. A useful “take away” from this example is that the wide and narrow approximations serve as useful guides for understanding how Z0 changes as a function of h/W and ǫr. This is useful especially for making adjustments to a microstrip line design once an accurate value of Z0 is obtained from some other",Electromagnetics_Vol2.pdf "128 CHAPTER 7. TRANSMISSION LINES REDUX method; e.g., using the Wheeler 1977 formula or from measurements. FR4 circuit board construction is so common that the result from the previous example deserves to be highlighted: In FR4 printed circuit board construction (sub- strate thickness 1.575 mm, relative permittivity ≈ 4.5, negligible trace thickness), Z0 ≈ 50 Ω requires a trace width of about 3 mm. Z0 scales roughly in proportion to h/W around this value. Simpler approximations for Z0 are also commonly employed in the design and analysis of microstrip lines. These expressions are limited in the range of h/W for which they are valid, and can usually be shown to be special cases or approximations of Equation 7.23. Nevertheless, they are sometimes useful for quick “back of the envelope” calculations. W avelength in microstrip line. An accurate general formula for wavelength λin microstrip line is similarly difficult to derive. A useful approximate",Electromagnetics_Vol2.pdf "W avelength in microstrip line. An accurate general formula for wavelength λin microstrip line is similarly difficult to derive. A useful approximate technique employs a result from the theory of uniform plane waves in unbounded media. For such waves, the phase propagation constant βis given by β = ω√ µǫ (7.25) It turns out that the electromagnetic field structure for the guided wave in a microstrip line is similar in the sense that it exhibits TEM field structure, as does the uniform plane wave. However, the guided wave is different in that it exists in both the dielectric spacer and the air above the spacer. Thus, we presume that β for the guided wave can be approximated as that of a uniform plane wave in unbounded media having the same permeability µ0 but a different relative permittivity , which we shall assign the symbol ǫr,eff (for “effective relative permittivity”). Then: β ≈ ω√ µ0 ǫr,ef f ǫ0 (low-loss microstrip) = β0 √ǫr,ef f (7.26)",Electromagnetics_Vol2.pdf "(for “effective relative permittivity”). Then: β ≈ ω√ µ0 ǫr,ef f ǫ0 (low-loss microstrip) = β0 √ǫr,ef f (7.26) In other words, the phase propagation constant in a microstrip line can be approximated as the free-space phase propagation β0 ≜ ω√µ0ǫ0 times a correction f actor √ǫr,ef f. Next, ǫr,eff is crudely approximated as the average of the relative permittivity of the dielectric slab and the relative permittivity of free space; i.e.,: ǫr,eff ≈ ǫr + 1 2 (7.27) V arious refinements exist to improve on this approximation; however, in practice, variations in the value of ǫr for the dielectric due to manufacturing processes typically make a more precise estimate irrelevant. Using this concept, we obtain λ= 2π β = 2π β0 √ǫr,ef f = λ0 √ǫr,ef f (7.28) where λ0 is the free-space wavelength c/f. Similarly the phase velocity vp can be estimated using the relationship vp = ω β = c√ǫr,ef f (7.29) i.e., the phase velocity in microstrip is slower than c by a factor of √ǫr,ef f.",Electromagnetics_Vol2.pdf "relationship vp = ω β = c√ǫr,ef f (7.29) i.e., the phase velocity in microstrip is slower than c by a factor of √ǫr,ef f. Example 7.3. W a velength and phase velocity in microstrip in FR4 printed circuit boards. FR4 is a low-loss fiberglass epoxy dielectric that is commonly used to make printed circuit boards (see “ Additional Reading” at the end of this section). For FR4, ǫr ≈ 4.5. The effective relative permittivity is therefore: ǫr,eff ≈ (4.5 + 1)/2 = 2.75 Thus, we estimate the phase velocity for the wave guided by this line to be about c/ √ 2.75; i.e., 60% of c. Similarly , the wavelength of this wave is about 60% of the free space wavelength. In practice, these values are found to be slightly less; typically 50%–55%. The difference is attributable to the crude approximation of Equation 7.27. Additional Reading: • “Microstrip” on Wikipedia.",Electromagnetics_Vol2.pdf "7.3. A TTENUA TION IN COAXIAL CABLE 129 • “Printed circuit board” on Wikipedia. • “Stripline” on Wikipedia. • “Single-ended signaling” on Wikipedia. • Sec. 8.7 (“Differential Circuits”) in S.W . Ellingson, Radio Systems Engineering, Cambridge Univ . Press, 2016. • H.A. Wheeler, “Transmission Line Properties of a Strip on a Dielectric Sheet on a Plane, ” IEEE Trans. Microwave Theory & T echniques, V ol. 25, No. 8, Aug 1977, pp. 631–47. • “FR-4” on Wikipedia. 7.3 Attenuation in Coaxial Cable [m0189] In this section, we consider the issue of attenuation in coaxial transmission line. Recall that attenuation can be interpreted in the context of the “lumped element” equivalent circuit transmission line model as the contributions of the resistance per unit length R′ and conductance per unit length G′. In this model, R′ represents the physical resistance in the inner and outer conductors, whereas G′ represents loss due to current flowing directly between the conductors",Electromagnetics_Vol2.pdf "outer conductors, whereas G′ represents loss due to current flowing directly between the conductors through the spacer material. The parameters used to describe the relevant features of coaxial cable are shown in Figure 7.11. In this figure, aand bare the radii of the inner and outer conductors, respectively . σic and σoc are the conductivities (SI base units of S/m) of the inner and outer conductors, respectively . Conductors are assumed to be non-magnetic; i.e., having permeability µequal to the free space value µ0. The spacer material is assumed to be a lossy dielectric having relative permittivity ǫr and conductivity σs. Resistance per unit length. The resistance per unit length is the sum of the resistances of the inner and outer conductor per unit length. The resistance per unit length of the inner conductor is determined by σic and the effective cross-sectional area through which the current flows. The latter is equal to the circumference 2πatimes the skin depth δic of the ϵr",Electromagnetics_Vol2.pdf "which the current flows. The latter is equal to the circumference 2πatimes the skin depth δic of the ϵr σ sσ ic σ oc b a Figure 7.11: Parameters defining the design of a coax- ial cable.",Electromagnetics_Vol2.pdf "130 CHAPTER 7. TRANSMISSION LINES REDUX inner conductor, so: R′ ic ≈ 1 (2πa· δic) σic for δic ≪ a (7.30) This expression is only valid for δic ≪ abecause otherwise the cross-sectional area through which the current flows is not well-modeled as a thin ring near the surface of the conductor. Similarly , we find the resistance per unit length of the outer conductor is R′ oc ≈ 1 (2πb· δo c) σoc for δoc ≪ t (7.31) where δoc is the skin depth of the outer conductor and tis the thickness of the outer conductor. Therefore, the total resistance per unit length is R′ = R′ ic + R′ oc ≈ 1 (2πa· δic) σic + 1 (2πb· δo c) σoc (7.32) Recall that skin depth depends on conductivity . Specifically: δic = √ 2/ωµσic (7.33) δo c = √ 2/ωµσo c (7.34) Expanding Equation 7.32 to show explicitly the dependence on conductivity , we find: R′ ≈ 1 2π √ 2/ωµ0 [ 1 a√σic + 1 b√σoc ] (7.35) At this point it is convenient to identify two particular cases for the design of the cable. In the first case,",Electromagnetics_Vol2.pdf "√ 2/ωµ0 [ 1 a√σic + 1 b√σoc ] (7.35) At this point it is convenient to identify two particular cases for the design of the cable. In the first case, “Case I, ” we assume σoc ≫ σic. Since b>a, we have in this case R′ ≈ 1 2π √ 2/ωµ0 [ 1 a√σic ] = 1 2πδicσic 1 a (Case I) (7.36) In the second case, “Case II, ” we assume σoc = σic. In this case, we have R′ ≈ 1 2π √ 2/ωµ0 [ 1 a√σic + 1 b√σic ] = 1 2πδicσic [ 1 a + 1 b ] (Case II) (7.37) A simpler way to deal with these two cases is to represent them both using the single expression R′ ≈ 1 2πδicσic [ 1 a + C b ] (7.38) where C = 0 in Case I and C = 1 in Case II. Conductance per unit length. The conductance per unit length of coaxial cable is simply that of the associated coaxial structure at DC; i.e., G′ = 2πσs ln (b/a) (7.39) Unlik e resistance, the conductance is independent of frequency , at least to the extent that σs is independent of frequency . Attenuation. The attenuation of voltage and current",Electromagnetics_Vol2.pdf "frequency , at least to the extent that σs is independent of frequency . Attenuation. The attenuation of voltage and current waves as they propagate along the cable is represented by the factor e−αz, where zis distance traversed along the cable. It is possible to find an expression for αin terms of the material and geometry parameters using: γ ≜ √ (R′ + jωL′) (G′ + jωC′) = α+ jβ (7.40) where L′ and C′ are the inductance per unit length and capacitance per unit length, respectively . These are given by L′ = µ 2πln (b/a) (7.41) and C′ = 2πǫ0ǫr ln (b/a) (7.42) In principle we could solve Equation 7.40 for α. However, this course of action is quite tedious, and a simpler approximate approach facilitates some additional insights. In this approach, we define parameters αR associated with R′ and αG associated with G′ such that e−αRze−αGz = e−(αR+αG)z = e−αz (7.43) which indicates α= αR + αG (7.44) Next we postulate αR ≈ KR R′ Z0 (7.45)",Electromagnetics_Vol2.pdf "7.3. A TTENUA TION IN COAXIAL CABLE 131 where Z0 is the characteristic impedance Z0 ≈ η0 2π 1√ǫr ln b a (lo w loss) (7.46) and where KR is a unitless constant to be determined. The justification for Equation 7.45 is as follows: First, αR must increase monotonically with increasing R′. Second, R′ must be divided by an impedance in order to obtain the correct units of 1/m. Using similar reasoning, we postulate αG ≈ KGG′Z0 (7.47) where KG is a unitless constant to be determined. The following example demonstrates the validity of Equations 7.45 and 7.47, and will reveal the values of KR and KG. Example 7.4. Attenuation constant for RG-59. RG-59 is a popular form of coaxial cable having the parameters a∼= 0.292 mm, b∼ = 1.855 mm, σic ∼= 2.28 × 107 S/m, σs ∼ = 5.9 × 10−5 S/m, and ǫr ∼= 2.25. The conductivity σoc of the outer conductor is difficult to quantify because it consists of a braid of thin metal strands. However, σoc ≫ σic, so we may assume Case I;",Electromagnetics_Vol2.pdf "conductor is difficult to quantify because it consists of a braid of thin metal strands. However, σoc ≫ σic, so we may assume Case I; i.e., σoc ≫ σic, and subsequently C = 0. Figure 7.12 shows the components αG and αR computed for the particular choice KR = KG = 1/2. The figure also shows αG + αR, along with αcomputed using Equation 7.40. W e find that the agreement between these values is very good, which is compelling evidence that the ansatz is valid and KR = KG = 1/2. Note that there is nothing to indicate that the results demonstrated in the example are not generally true. Thus, we come to the following conclusion: The attenuation constant α ≈ αG + αR where αG ≜ R′/ 2Z0 and αR ≜ G′Z0/2. Minimizing attenuation. Let us now consider if there are design choices which minimize the attenuation of coaxial cable. Since α= αR + αG, we Figure 7.12: Comparison of α = Re { γ} to αR, αG, and αR + αG for KR = KG = 1/2. The result for α has been multiplied by 1.01; otherwise the curves",Electromagnetics_Vol2.pdf "Figure 7.12: Comparison of α = Re { γ} to αR, αG, and αR + αG for KR = KG = 1/2. The result for α has been multiplied by 1.01; otherwise the curves would be too close to tell apart. may consider αR and αG independently . Let us first consider αG: αG ≜ 1 2G′Z0 ≈ 1 2 · 2πσs ln (b/a) · 1 2π η0 √ǫr ln (b/a) = η0 2 σs √ǫr (7.48) It is clear from this result that αG is minimized by minimizing σs/√ǫr. Interestingly the physical dimensions aand bha ve no discernible effect on αG. Now we consider αR: αR ≜ R′ 2Z0 = 1 2 (1 /2πδicσic) [1/a+ C/b] (1/2π) ( η0/√ǫr ) ln (b/a ) = √ǫr 2η0δicσic · [1 /a+ C/b] ln (b/a) (7.49) No w making the substitution δic = √ 2/ωµ0σic in order to make the dependences on the constitutive parameters explicit, we find: αR = 1 2 √ 2 · η0 √ ωµ0ǫr σic · [1 /a+ C/b] ln (b/a) (7.50)",Electromagnetics_Vol2.pdf "132 CHAPTER 7. TRANSMISSION LINES REDUX Here we see that αR is minimized by minimizing ǫr/σic. It’s not surprising to see that we should maximize σic. However, it’s a little surprising that we should minimize ǫr. Furthermore, this is in contrast to αG, which is minimized by maximizing ǫr. Clearly there is a tradeoff to be made here. T o determine the parameters of this tradeoff, first note that the result depends on frequency: Since αR dominates over αG at sufficiently high frequency (as demonstrated in Figure 7.12), it seems we should minimize ǫr if the intended frequency of operation is sufficiently high; otherwise the optimum value is frequency-dependent. However, σs may vary as a function of ǫr, so a general conclusion about optimum values of σs and ǫr is not appropriate. However, we also see that αR – unlike αG – depends on aand b. This implies the existence of a generally-optimum geometry . T o find this geometry , we minimize αR by taking the derivative with respect",Electromagnetics_Vol2.pdf "on aand b. This implies the existence of a generally-optimum geometry . T o find this geometry , we minimize αR by taking the derivative with respect to a, setting the result equal to zero, and solving for a and/or b. Here we go: ∂ ∂aαR = 1 2 √ 2 · η0 √ ωµ0ǫr σic · ∂ ∂a [1 /a+ C/b] ln (b/a) (7.51) This derivative is worked out in an addendum at the end of this section. Using the result from the addendum, the right side of Equation 7.51 can be written as follows: 1 2 √ 2 · η0 √ ωµ0ǫr σic · [ −1 a2 ln (b/a ) + 1/a+ C/b aln2 (b/a ) ] (7.52) In order for ∂αR/∂a = 0, the factor in the square brackets above must be equal to zero. After a few steps of algebra, we find: ln (b/a) = 1 + C b/a (7.53) In Case I (σ oc ≫ σic), C = 0 so: b/a= e∼= 2.72 (Case I) (7.54) In Case II (σ oc = σic), C = 1. The resulting equation can be solved by plotting the function, or by a few iterations of trial and error; either way one quickly finds b/a∼= 3.59 (Case II) (7.55)",Electromagnetics_Vol2.pdf "can be solved by plotting the function, or by a few iterations of trial and error; either way one quickly finds b/a∼= 3.59 (Case II) (7.55) Summarizing, we have found that αis minimized by choosing the ratio of the outer and inner radii to be somewhere between 2.72 and 3.59, with the precise value depending on the relative conductivity of the inner and outer conductors. Substituting these values of b/ainto Equation 7.46, we obtain: Z0 ≈ 59.9 Ω√ǫr to 76 .6 Ω√ǫr (7.56) as the range of impedances of coaxial cable corresponding to physical designs that minimize attenuation. Equation 7.56 gives the range of characteristic impedances that minimize attenuation for coaxial transmission lines. The precise value within this range depends on the ratio of the conductivity of the outer conductor to that of the inner conductor. Since ǫr ≥ 1, the impedance that minimizes attenuation is less for dielectric-filled cables than it is for air-filled cables. For example, let us once again",Electromagnetics_Vol2.pdf "attenuation is less for dielectric-filled cables than it is for air-filled cables. For example, let us once again consider the RG-59 from Example 7.4. In that case, ǫr ∼= 2.25 and C = 0, indicating Z0 ≈ 39.9 Ω is optimum for attenuation. The actual characteristic impedance of Z0 is about 75 Ω, so clearly RG-59 is not optimized for attenuation. This is simply because other considerations apply , including power handling capability (addressed in Section 7.4) and the convenience of standard values (addressed in Section 7.5). Addendum: Derivative of a2 ln(b/a). Evaluation of Equation 7.51 requires finding the derivative of a2 ln(b/a) with respect to a. Using the chain rule, we find: ∂ ∂a [ a2 ln (b a )] = [ ∂ ∂aa2 ] ln (b a ) +a2 [ ∂ ∂a ln (b a )] (7.57) Note ∂ ∂aa2 = 2 a (7.58)",Electromagnetics_Vol2.pdf "7.4. POWER HANDLING CAP ABILITY OF COAXIAL CABLE 133 and ∂ ∂a ln (b a ) = ∂ ∂a [ln (b) − ln (a)] = − ∂ ∂a ln (a) = − 1 a (7.59) So: ∂ ∂a [ a2 ln (b a )] = [2a] ln (b a ) + a2 [ − 1 a ] = 2 aln (b a ) − a (7.60) This result is substituted for a2 ln(b/a) in Equation 7.51 to obtain Equation 7.52. 7.4 Power Handling Capability of Coaxial Cable [m0190] The term “power handling” refers to maximum power that can be safely transferred by a transmission line. This power is limited because when the electric field becomes too large, dielectric breakdown and arcing may occur. This may result in damage to the line and connected devices, and so must be avoided. Let Epk be the maximum safe value of the electric field intensity within the line, and let Pmax be the power that is being transferred under this condition. This section addresses the following question: How does one design a coaxial cable to maximize Pmax for a given Epk? W e begin by finding the electric potential V within",Electromagnetics_Vol2.pdf "one design a coaxial cable to maximize Pmax for a given Epk? W e begin by finding the electric potential V within the cable. This can be done using Laplace’s equation: ∇2V = 0 (7.61) Using the cylindrical (ρ,φ,z ) coordinate system with the zaxis along the inner conductor, we have ∂V/∂φ = 0 due to symmetry . Also we set ∂V/∂z = 0 since the result should not depend on z. Thus, we have: 1 ρ ∂ ∂ρ ( ρ∂V ∂ρ ) = 0 (7.62) Solving for V, we have V(ρ) = Aln ρ+ B (7.63) where Aand Bare arbitrary constants, presumably determined by boundary conditions. Let us assume a voltage V0 measured from the inner conductor (serving as the “+ ” terminal) to the outer conductor (serving as the “− ” terminal). For this choice, we have: V(a) = V0 → Aln a+ B = V0 (7.64) V(b) = 0 → Aln b+ B = 0 (7.65) Subtracting the second equation from the first and solving for A, we find A= −V0/ln (b/a). Subsequently , Bis found to be V0 ln (b) /ln (b/a), and so V(ρ) = −V0 ln (b/a) ln ρ+ V0 ln (b) ln (b/a) (7.66)",Electromagnetics_Vol2.pdf "134 CHAPTER 7. TRANSMISSION LINES REDUX The electric field intensity is given by: E = −∇V (7.67) Again we have ∂V/∂φ = ∂V/∂z = 0, so E = −ˆρ ∂ ∂ρV (7.68) = −ˆρ ∂ ∂ρ [ −V0 ln (b/a) ln ρ+ V0 ln (b) ln (b/a) ] (7.69) = +ˆρ V0 ρln (b/a) (7.70) Note that the maximum electric field intensity in the spacer occurs at ρ= a; i.e., at the surface of the inner conductor. Therefore: Epk = V0 aln (b/a ) (7.71) The power transferred by the line is maximized when the impedances of the source and load are matched to Z0. In this case, the power transferred is V2 0 /2Z0. Recall that the characteristic impedance Z0 is given in the “low-loss” case as Z0 ≈ 1 2π η0 √ǫr ln (b a ) (7.72) Therefore, the maximum safe power is Pmax = V2 0 2Z0 (7.73) ≈ E2 pk a2 ln2 ( b/a) 2 · (1/2π) ( η0/√ǫr ) ln (b/a ) (7.74) = πE2 pk η0/√ǫr a2 ln (b/a) (7.75) Now let us consider if there is a value of awhich maximizes Pmax. W e do this by seeing if ∂Pmax/∂a = 0 for some values of aand b. The",Electromagnetics_Vol2.pdf "Now let us consider if there is a value of awhich maximizes Pmax. W e do this by seeing if ∂Pmax/∂a = 0 for some values of aand b. The derivative is worked out in an addendum at the end of this section. Using the result from the addendum, we find: ∂ ∂aPmax = π E2 pk η0/√ǫr [2 aln (b/a) − a] (7.76) For the above expression to be zero, it must be true that 2 ln (b/a) − 1 = 0. Solving for b/a, we obtain: b a = √e∼= 1.65 (7.77) for optimum power handling. In other words, 1.65 is the ratio of the radii of the outer and inner conductors that maximizes the power that can be safely handled by the cable. Equation 7.75 suggests that ǫr should be maximized in order to maximize power handling, and you wouldn’t be wrong for noting that, however, there are some other factors that may indicate otherwise. For example, a material with higher ǫr may also have higher σs, which means more current flowing through the spacer and thus more ohmic heating. This",Electromagnetics_Vol2.pdf "example, a material with higher ǫr may also have higher σs, which means more current flowing through the spacer and thus more ohmic heating. This problem is so severe that cables that handle high RF power often use air as the spacer, even though it has the lowest possible value of ǫr. Also worth noting is that σic and σoc do not matter according to the analysis we’ve just done; however, to the extent that limited conductivity results in significant ohmic heating in the conductors – which we have also not considered – there may be something to consider. Suffice it to say , the actionable finding here concerns the ratio of the radii; the other parameters have not been suitably constrained by this analysis. Substituting √ efor b/ain Equation 7.72, we find: Z0 ≈ 30.0 Ω√ǫr (7.78) This is the characteristic impedance of coaxial line that optimizes power handling, subject to the caveats identified above. For air-filled cables, we obtain 30 Ω. Since ǫr ≥ 1, this optimum impedance is less for",Electromagnetics_Vol2.pdf "identified above. For air-filled cables, we obtain 30 Ω. Since ǫr ≥ 1, this optimum impedance is less for dielectric-filled cables than it is for air-filled cables. Summarizing: The power handling capability of coaxial trans- mission line is optimized when the ratio of radii of the outer to inner conductors b/ais about 1.65. For the air-filled cables typically used in high- power applications, this corresponds to a charac- teristic impedance of about 30 Ω. Addendum: Derivative of (1/a+ C/b) /ln(b/a). Evaluation of Equation 7.75 requires finding the derivative of (1/a+ C/b) /ln(b/a) with respect to a.",Electromagnetics_Vol2.pdf "7.5. WHY 50 OHMS? 135 Using the chain rule, we find: ∂ ∂a [ 1/a+ C /b ln (b/a) ] = [ ∂ ∂a (1 a + C b )] ln−1 (b a ) + (1 a + C b )[ ∂ ∂a ln−1 (b a )] (7.79) Note ∂ ∂a (1 a + C b ) = − 1 a2 (7.80) T o handle the quantity in the second set of square brackets, first define v= ln u, where u= b/a. Then: ∂ ∂av−1 = [ ∂ ∂vv−1 ][ ∂ v ∂u ][ ∂ u ∂a ] = [ −v−2] [ 1 u ] [ −ba−2] = [ − ln−2 (b a )] [ a b ] [ −ba−2] = 1 aln−2 (b a ) (7.81) So: ∂ ∂a [ 1/a+ C /b ln (b/a) ] = [ − 1 a2 ] ln−1 (b a ) + (1 a + C b )[ 1 aln−2 (b a )] (7.82) This result is substituted in Equation 7.75 to obtain Equation 7.76. 7.5 Why 50 Ohms? [m0191] The quantity 50 Ω appears in a broad range of applications across the field of electrical engineering. In particular, it is a very popular value for the characteristic impedance of transmission line, and is commonly specified as the port impedance for signal sources, amplifiers, filters, antennas, and other RF components. So, what’s special about 50 Ω? The",Electromagnetics_Vol2.pdf "commonly specified as the port impedance for signal sources, amplifiers, filters, antennas, and other RF components. So, what’s special about 50 Ω? The short answer is “nothing. ” In fact, other standard impedances are in common use – prominent among these is 75 Ω. It is shown in this section that a broad range of impedances – on the order of 10s of ohms – emerge as useful values based on technical considerations such as minimizing attenuation, maximizing power handling, and compatibility with common types of antennas. Characteristic impedances up to 300 Ω and beyond are useful in particular applications. However, it is not practical or efficient to manufacture and sell products for every possible impedance in this range. Instead, engineers have settled on 50 Ω as a round number that lies near the middle of this range, and have chosen a few other values to accommodate the smaller number of applications where there may be specific compelling considerations.",Electromagnetics_Vol2.pdf "values to accommodate the smaller number of applications where there may be specific compelling considerations. So, the question becomes “what makes characteristic impedances in the range of 10s of ohms particularly useful?” One consideration is attenuation in coaxial cable. Coaxial cable is by far the most popular type of transmission line for connecting devices on separate printed circuit boards or in separate enclosures. The attenuation of coaxial cable is addressed in Section 7.3. In that section, it is shown that attenuation is minimized for characteristic impedances in the range (60 Ω) /√ ǫr to ( 77 Ω) /√ǫr, where ǫr is the relative permittivity of the spacer material. So, we find that Z0 in the range 60 Ω to 77 Ω is optimum for air-filled cable, but more like 40 Ω to 50 Ω for cables using a plastic spacer material having typical ǫr ≈ 2.25. Thus, 50 Ω is clearly a reasonable choice if a single standard value is to be established for all such cable.",Electromagnetics_Vol2.pdf "having typical ǫr ≈ 2.25. Thus, 50 Ω is clearly a reasonable choice if a single standard value is to be established for all such cable. Coaxial cables are often required to carry high power signals. In such applications, power handling",Electromagnetics_Vol2.pdf "136 CHAPTER 7. TRANSMISSION LINES REDUX capability is also important, and is addressed in Section 7.4. In that section, we find the power handling capability of coaxial cable is optimized when the ratio of radii of the outer to inner conductors b/ais about 1.65. For the air-filled cables typically used in high-power applications, this corresponds to a characteristic impedance of about 30 Ω. This is significantly less than the 60 Ω to 77 Ω that minimizes attenuation in air-filled cables. So, 50 Ω can be viewed as a compromise between minimizing attenuation and maximizing power handling in air-filled coaxial cables. Although the preceding arguments justify 50 Ω as a standard value, one can also see how one might make a case for 75 Ω as a secondary standard value, especially for applications where attenuation is the primary consideration. V alues of 50 Ω and 75 Ω also offer some convenience when connecting RF devices to antennas. For example, 75 Ω is very close to the impedance of the",Electromagnetics_Vol2.pdf "V alues of 50 Ω and 75 Ω also offer some convenience when connecting RF devices to antennas. For example, 75 Ω is very close to the impedance of the commonly-encountered half-wave dipole antenna (about 73 + j42 Ω), which may make impedance matching to that antenna easier. Another commonly-encountered antenna is the quarter-wave monopole, which exhibits an impedance of about 36 + j21 Ω, which is close to 50 Ω. In fact, we see that if we desire a single characteristic impedance that is equally convenient for applications involving either type of antenna, then 50 Ω is a reasonable choice. A third commonly-encountered antenna is the folded half-wave dipole. This type of antenna is similar to a half-wave dipole but has better bandwidth, and is commonly used in FM and TV systems and land mobile radio (LMR) base stations. A folded half-wave dipole has an impedance of about 300 Ω and is balanced (not single-ended); thus, there is a market for balanced transmission line having",Electromagnetics_Vol2.pdf "half-wave dipole has an impedance of about 300 Ω and is balanced (not single-ended); thus, there is a market for balanced transmission line having Z0 = 300 Ω. However, it is very easy and inexpensive to implement a balun (a device which converts the dipole output from balanced to unbalanced) while simultaneously stepping down impedance by a factor of 4; i.e., to 75 Ω. Thus, we have an additional application for 75 Ω coaxial line. Finally , note that it is quite simple to implement microstrip transmission line having characteristic impedance in the range 30 Ω to 75 Ω. For example, 50 Ω on commonly-used 1.575 mm FR4 requires a width-to-height ratio of about 2, so the trace is about 3 mm wide. This is a very manageable size and easily implemented in printed circuit board designs. Additional Reading: • “Dipole antenna” on Wikipedia. • “Monopole antenna” on Wikipedia. • “Balun” on Wikipedia. [m0187]",Electromagnetics_Vol2.pdf "7.5. WHY 50 OHMS? 137 Image Credits Fig. 7.1: c⃝ SpinningSpark, Inductiveload, https://commons.wikimedia.org/wiki/File:T win-lead cable dimension.svg, CC BY -SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Minor modifications. Fig. 7.2: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Parallel wire transmission line structure and design parameters.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 7.3: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Electric and Magnetic Field of Wire Cross-Section.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 7.4: c⃝ 7head7metal7, https://commons.wikimedia.org/wiki/File:Microstrip scheme.svg, CC BY -SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/). Minor modifications from the original. Fig. 7.6: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:V iew from the side of a microstrip line.svg, CC",Electromagnetics_Vol2.pdf "Fig. 7.6: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:V iew from the side of a microstrip line.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 7.7: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Electric and Magnetic Fields for Microstrip.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "Chapter 8 Optical Fiber 8.1 Optical Fiber: Method of Operation [m0178] In its simplest form, optical fiber consists of concentric regions of dielectric material as shown in Figure 8.1. A cross-section through the fiber reveals a circular region of transparent dielectric material through which light propagates. This is surrounded by a jacket of dielectric material commonly referred to as cladding. A characteristic of the design of any optical fiber is that the permittivity of the fiber is greater than the permittivity of the cladding. As explained in Section 5.11, this creates conditions necessary for total internal reflection. The mechanism of total internal reflection contains the light within the fiber. In the discipline of optics, the permittivity of a c⃝ S. Lally CC BY -SA 4.0 Figure 8.1: Construction of the simplest form of opti- cal fiber. material is commonly quantified in terms of its index of refraction. Index of refraction is the square root of",Electromagnetics_Vol2.pdf "cal fiber. material is commonly quantified in terms of its index of refraction. Index of refraction is the square root of relative permittivity , and is usually assigned the symbol n. Thus, if we define the relative permittivities ǫr,f ≜ ǫf/ǫ0 for the fiber and ǫr,c ≜ ǫc/ǫ0 for the cladding, then nf ≜ √ ǫr,f (8.1) nc ≜ √ǫr,c (8.2) and nf > nc (8.3) Figure 8.2 illustrates total internal reflection in an optical fiber. In this case, a ray of light in the fiber is incident on the boundary with the cladding. W e may treat the light ray as a uniform plane wave. T o see why , consider that optical wavelengths range from 120 nm to 700 nm in free space. W avelength is slightly shorter than this in fiber; specifically , by a factor equal to the square root of the relative permittivity . The fiber is on the order of millimeters in diameter, which is about 4 orders of magnitude greater than the wavelength. Thus, from the perspective of the light ray , the fiber appears to be an",Electromagnetics_Vol2.pdf "greater than the wavelength. Thus, from the perspective of the light ray , the fiber appears to be an unbounded half-space sharing a planar boundary with the cladding, which also appears to be an unbounded half-space. Continuing under this presumption, the criterion for total internal reflection is (from Section 5.11): θi ≥ arcsin √ ǫr,c ǫr,f = arcsin nc nf (8.4) As long as rays of light approach from angles that satisfy this criterion, the associated power remains in Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "8.1. OPTICAL FIBER: METHOD OF OPERA TION 139 c⃝ S. Lally CC BY -SA 4.0 Figure 8.2: T otal internal reflection in optical fiber. the fiber, and is reflected onward. Otherwise, power is lost into the cladding. Example 8.1. Critical angle for optical fiber. T ypical values of nf and nc for an optical fiber are 1.52 and 1.49, respectively . What internal angle of incidence is required to maintain total internal reflection? Solution. Using Equation 8.4, θi must be greater than about 78.8◦. In practice this is quite reasonable since we desire light to be traveling approximately parallel the axis of the fiber (θi ≈ 90◦) anyway . The total internal reflection criterion imposes a limit on the radius of curvature of fiber optic cable. If fiber optic cable is bent such that the radius of curvature is too small, the critical angle will be exceeded at the bend. This will occur even for light rays which are traveling perfectly parallel to the axis of the fiber before they arrive at the bend.",Electromagnetics_Vol2.pdf "bend. This will occur even for light rays which are traveling perfectly parallel to the axis of the fiber before they arrive at the bend. Note that the cladding serves at least two roles. First, it determines the critical angle for total internal reflection, and subsequently determines the minimum radius of curvature for lossless operation of the fiber. Second, it provides a place for the evanescent surface waves associated with total internal reflection (Section 5.12) to exist without interference from objects in contact with the fiber. Additional Reading: • “Optical fiber” on Wikipedia.",Electromagnetics_Vol2.pdf "140 CHAPTER 8. OPTICAL FIBER 8.2 Acceptance Angle [m0192] In this section, we consider the problem of injecting light into a fiber optic cable. The problem is illustrated in Figure 8.3. In this figure, we see light incident from a medium having index of refraction n0, with angle of incidence θi. The light is transmitted with angle of transmission θ2 into the fiber, and is subsequently incident on the surface of the cladding with angle of incidence θ3. For light to propagate without loss within the cable, it is required that sin θ3 ≥ nc nf (8.5) since this criterion must be met in order for total internal reflection to occur. Now consider the constraint that Equation 8.5 imposes on θi. First, we note that θ3 is related to θ2 as follows: θ3 = π 2 − θ2 (8.6) therefore s in θ3 = sin (π 2 − θ2 ) (8.7) = cos θ2 (8.8) so cos θ2 ≥ nc nf (8.9) Squaring both sides, we find: cos2 θ2 ≥ n2 c n2 f (8.10) c⃝ S. Lally CC BY -SA 4.0 Figure 8.3: Injecting light into a fiber optic cable.",Electromagnetics_Vol2.pdf "nf (8.9) Squaring both sides, we find: cos2 θ2 ≥ n2 c n2 f (8.10) c⃝ S. Lally CC BY -SA 4.0 Figure 8.3: Injecting light into a fiber optic cable. Now invoking a trigonometric identity: 1 − sin2 θ2 ≥ n2 c n2 f (8.11) so: s in2 θ2 ≤ 1 − n2 c n2 f (8.12) No w we relate the θ2 to θi using Snell’s law: sin θ2 = n0 nf sin θi (8.13) so Equation 8.12 may be written: n2 0 n2 f sin2 θi ≤ 1 − n2 c n2 f (8.14) No w solving for sin θi, we obtain: sin θi ≤ 1 n0 √ n2 f − n2c (8.15) This result indicates the range of angles of incidence which result in total internal reflection within the fiber. The maximum value of θi which satisfies this condition is known as the acceptance angle θa, so: θa ≜ arcsin (1 n0 √ n2 f − n2c ) (8.16) This leads to the following insight: In order to effectively launch light in the fiber, it is necessary for the light to arrive from within a cone having half-angle θa with respect to the axis of the fiber. The associated cone of acceptance is illustrated in Figure 8.4.",Electromagnetics_Vol2.pdf "cone having half-angle θa with respect to the axis of the fiber. The associated cone of acceptance is illustrated in Figure 8.4. It is also common to define the quantity numerical aperture NA as follows: NA ≜ 1 n0 √ n2 f − n2c (8.17) Note that n0 is typically very close to 1 (corresponding to incidence from air), so it is common to see NA defined as simply √ n2 f − n2c. This parameter is commonly used in lieu of the acceptance angle in datasheets for fiber optic cable.",Electromagnetics_Vol2.pdf "8.3. DISPERSION IN OPTICAL FIBER 141 Example 8.2. Acceptance angle. T ypical values of nf and nc for an optical fiber are 1.52 and 1.49, respectively . What are the numerical aperture and the acceptance angle? Solution. Using Equation 8.17 and presuming n0 = 1, we find NA ∼= 0.30. Since sin θa = N A, we find θa = 17.5 ◦. Light must arrive from within 17 .5◦ from the axis of the fiber in order to ensure total internal reflection within the fiber. Additional Reading: • “Optical fiber” on Wikipedia. • “Numerical aperture” on Wikipedia. c⃝ S. Lally CC BY -SA 4.0 Figure 8.4: Cone of acceptance. 8.3 Dispersion in Optical Fiber [m0193] Light may follow a variety of paths through a fiber optic cable. Each of the paths has a different length, leading to a phenomenon known as dispersion. Dispersion distorts signals and limits the data rate of digital signals sent over fiber optic cable. In this section, we analyze this dispersion and its effect on digital signals.",Electromagnetics_Vol2.pdf "digital signals sent over fiber optic cable. In this section, we analyze this dispersion and its effect on digital signals. Figure 8.5 shows the variety of paths that light may take through a straight fiber optic cable. The nominal path is shown in Figure 8.5(a), which is parallel to the axis of the cable. This path has the shortest associated propagation time. The path with the longest associated propagation time is shown in Figure 8.5(c). In this case, light bounces within the fiber, each time approaching the core-clad interface at the critical angle for total internal reflection. Any ray approaching at a greater angle is not completely reflected, and so would likely not survive to the end of c⃝ S. Lally CC BY -SA 4.0 Figure 8.5: Paths that light may take through a straight fiber optic cable: (a) Along axis, corresponding to minimum path length; (b) Intermediate between (a) and (c); (c) Maximum length, corresponding to thresh- old angle for total internal reflection.",Electromagnetics_Vol2.pdf "142 CHAPTER 8. OPTICAL FIBER c⃝ S. Lally CC BY -SA 4.0 Figure 8.6: A digital signal that might be applied to the input of a fiber optic cable. the cable. Figure 8.5(b) represents the continuum of possibilities between the extreme cases of (a) and (c), with associated propagation times greater than that of case (a) but less than that of case (c). Regardless of how light is inserted into the fiber, all possible paths depicted in Figure 8.5 are likely to exist. This is because fiber is rarely installed in a straight line, but rather follows a multiply-curved path. Each curve results in new angles of incidence upon the core-cladding boundary . The existence of these paths leads to dispersion. T o see this, consider the input signal shown in Figure 8.6. This signal has period T, during which time a pulse of length ton 2τ; therefore, T greater than about 204 ps is required. The modulation scheme allows one bit per period, so the maximum data rate is",Electromagnetics_Vol2.pdf "T >2τ; therefore, T greater than about 204 ps is required. The modulation scheme allows one bit per period, so the maximum data rate is 1/T ∼= 4.9 × 109 bits per second; i.e., ∼ = 4.9 Gb/s . The finding of 4.9 Gb/s may seem like a pretty high data rate; however, consider what happens if the length increases to 1 km. It is apparent from Equation 8.23 that the delay spread will increase by a factor of 1000, so the maximum supportable data rate decreases by a factor of 1000 to a scant 4.9 Mb/s. Again, this is independent of any media loss within the fiber. T o restore the higher data rate over this longer path, the dispersion must be reduced. One way to do this is to divide the link into smaller links separated by repeaters which can receive the dispersed signal, demodulate it, regenerate the original signal, and transmit the restored signal to the next repeater. Alternatively , one may employ “single mode” fiber, which has intrinsically less dispersion",Electromagnetics_Vol2.pdf "next repeater. Alternatively , one may employ “single mode” fiber, which has intrinsically less dispersion than the multimode fiber presumed in our analysis. Additional Reading: • “Optical fiber” on Wikipedia. [m0209]",Electromagnetics_Vol2.pdf "144 CHAPTER 8. OPTICAL FIBER Image Credits Fig. 8.1: c⃝ S. Lally , https://commons.wikimedia.org/wiki/File:Figure 8.1-01.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Modified by author. Fig. 8.2: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Internal Reflection in Optical Fiber.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 8.3: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Injecting Light into Optical Fiber.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 8.4: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Cone of Acceptance.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 8.5: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Paths of Light through Optic Cable.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 8.6: c⃝ Offaperry (S. Lally),",Electromagnetics_Vol2.pdf "CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 8.6: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Digital Signal on Fiber Optic Cable.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 8.7: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Dispersion on Signal Output from Fiber Optic Cable.svg, CC BY SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "Chapter 9 Radiation 9.1 Radiation from a Current Moment [m0194] In this section, we begin to address the following problem: Given a distribution of impressed current density J(r), what is the resulting electric field intensity E(r)? One route to an answer is via Maxwell’s equations. V iewing Maxwell’s equations as a system of differential equations, a rigorous mathematical solution is possible given the appropriate boundary conditions. The rigorous solution following that approach is relatively complicated, and is presented beginning in Section 9.2 of this book. If we instead limit scope to a sufficiently simple current distribution, a simple informal derivation is possible. This section presents such a derivation. The advantage of tackling a simple special case first is that it will allow us to quickly assess the nature of the solution, which will turn out to be useful once we do eventually address the more general problem. Furthermore, the results presented in this section will",Electromagnetics_Vol2.pdf "eventually address the more general problem. Furthermore, the results presented in this section will turn out to be sufficient to tackle many commonly-encountered applications. The simple current distribution considered in this section is known as a current moment. An example of a current moment is shown in Figure 9.1 and in this case is defined as follows: ∆J(r) = ˆz I ∆lδ (r) (9.1) where I ∆l is the scalar component of the current moment, having units of current times length (SI base units of A·m); and δ(r) is the volumetric sampling function1 defined as follows: δ(r) ≜ 0 for r ̸= 0; and (9.2)∫ V δ(r) dv≜ 1 (9.3) where V is any volume which includes the origin (r = 0). It is evident from Equation 9.3 that δ(r) has SI base units of m −3. Subsequently , ∆J(r) has SI base units of A/m 2, confirming that it is a volume current density . However, it is the simplest possible form of volume current density , since – as indicated by Equation 9.2 – it exists only at the origin and nowhere else.",Electromagnetics_Vol2.pdf "form of volume current density , since – as indicated by Equation 9.2 – it exists only at the origin and nowhere else. Although some current distributions approximate the current moment, current distributions encountered in common engineering practice generally do not exist 1 Als o a form of the Dirac delta function; see “ Additional Read- ing” at the end of this section. c⃝ C. W ang CC BY -SA 4.0 Figure 9.1: A +ˆz-directed current moment located at the origin. Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "146 CHAPTER 9. RADIA TION in precisely this form. Nevertheless, the current moment turns out to be generally useful as a “building block” from which practical distributions of current can be constructed, via the principle of superposition. Radiation from current distributions constructed in this manner is calculated simply by summing the radiation from each of the constituent current moments. Now let us consider the electric field intensity ∆E(r) that is created by this current distribution. First, if the current is steady (i.e., “DC”), this problem falls within the domain of magnetostatics; i.e., the outcome is completely described by the magnetic field, and there can be no radiation. Therefore, let us limit our attention to the “ AC” case, for which radiation is possible. It will be convenient to employ phasor representation. In phasor representation, the current density is ∆ ˜J(r) = ˆz ˜I ∆lδ (r) (9.4) where ˜I ∆l is simply the scalar current moment expressed as a phasor.",Electromagnetics_Vol2.pdf "current density is ∆ ˜J(r) = ˆz ˜I ∆lδ (r) (9.4) where ˜I ∆l is simply the scalar current moment expressed as a phasor. Now we are ready to address the question “What is ∆ ˜E(r) due to ∆ ˜J(r)?” Without doing any math, we know quite a bit about ∆ ˜E(r). For example: • Since electric fields are proportional to the currents that give rise to them, we expect ∆ ˜E(r) to be proportional to ⏐⏐ ⏐˜I ∆l ⏐ ⏐ ⏐. • If we are sufficiently far from the origin, we expect ∆ ˜E(r) to be approximately proportional to 1/rwhere r≜ |r| is the distance from the source current. This is because point sources give rise to spherical waves, and the power density in a spherical wave would be proportional to 1/r2. Since time-average power density is proportional to ⏐⏐⏐∆ ˜E(r) ⏐⏐⏐ 2 , ∆ ˜E(r) must be proportional to 1/r. • If we are sufficiently far from the origin, and the loss due to the medium is negligible, then we expect the phase of ∆ ˜E(r) to change approximately at rate βwhere βis the phase",Electromagnetics_Vol2.pdf "loss due to the medium is negligible, then we expect the phase of ∆ ˜E(r) to change approximately at rate βwhere βis the phase propagation constant 2π/λ. Since we expect spherical phasefronts, ∆ ˜E(r) should therefore contain the factor e−jβr. • Ampere’s law indicates that a ˆz-directed current at the origin should give rise to a ˆφ-directed magnetic field in the z= 0 plane.2 At the same time, Poynting’s theorem requires the cross product of the electric and magnetic fields to point in the direction of power flow . In the present problem, this direction is away from the source; i.e., +ˆr. Therefore, ∆ ˜E(z= 0) points in the −ˆz direction. The same principle applies outside of the z= 0 plane, so in general we expect ∆ ˜E(r) to point in the ˆθdirection. • W e expect ∆ ˜E(r) = 0 along the zaxis. Subsequently ⏐⏐ ⏐∆ ˜E(ˆr) ⏐ ⏐ ⏐must increase from zero at θ= 0 and return to zero at θ= π. The symmetry of the problem suggests ⏐ ⏐⏐∆ ˜E(ˆr) ⏐⏐⏐is maximum at θ= π/2. This magnitude must",Electromagnetics_Vol2.pdf "at θ= 0 and return to zero at θ= π. The symmetry of the problem suggests ⏐ ⏐⏐∆ ˜E(ˆr) ⏐⏐⏐is maximum at θ= π/2. This magnitude must vary in the simplest possible way , leading us to conclude that ∆ ˜E(ˆr) is proportional to sin θ. Furthermore, the radial symmetry of the problem means that ∆ ˜E(ˆr) should not depend at all on φ. Putting these ideas together, we conclude that the radiated electric field has the following form: ∆ ˜E(r) ≈ ˆθC ( ˜I ∆l ) (sin θ) e−jβr r (9.5) where Cis a constant which accounts for all of the constants of proportionality identified in the preceding analysis. Since the units of ∆ ˜E(r) are V/m, the units of Cmust be Ω/m. W e have not yet accounted for the wave impedance of the medium η, which has units of Ω, so it would be a good bet based on the units that C is proportional to η. However, here the informal analysis reaches a dead end, so we shall simply state the result from the rigorous solution: C = jηβ/4π. The units are correct, and we finally obtain:",Electromagnetics_Vol2.pdf "analysis reaches a dead end, so we shall simply state the result from the rigorous solution: C = jηβ/4π. The units are correct, and we finally obtain: ∆ ˜E(r) ≈ ˆθjηβ 4π ( ˜I ∆l ) (s in θ) e−jβr r (9.6) Additional evidence that this solution is correct comes from the fact that it satisfies the wave equation ∇2∆ ˜E(r) + β2∆ ˜E(r) = 0. 3 2 This is sometimes described as the “right hand rule” of Am- pere’s law . 3 Confirming this is straightforward (simply substitute and evalu- ate) and is left as an exercise for the student.",Electromagnetics_Vol2.pdf "9.2. MAGNETIC VECTOR POTENTIAL 147 Note that the expression we have obtained for the radiated electric field is approximate (hence the “≈ ”). This is due in part to our presumption of a simple spherical wave, which may only be valid at distances far from the source. But how far? An educated guess would be distances much greater than a wavelength (i.e., r≫ λ). This will do for now; in another section, we shall show rigorously that this guess is essentially correct. W e conclude this section by noting that the current distribution analyzed in this section is sometimes referred to as a Hertzian dipole. A Hertzian dipole is typically defined as a straight infinitesimally-thin filament of current with length which is very small relative to a wavelength, but not precisely zero. This interpretation does not change the solution obtained in this section, thus we may view the current moment and the Hertzian dipole as effectively the same in practical engineering applications. Additional Reading:",Electromagnetics_Vol2.pdf "and the Hertzian dipole as effectively the same in practical engineering applications. Additional Reading: • “Dirac delta function” on Wikipedia. • “Dipole antenna” (section entitled “Hertzian Dipole”) on Wikipedia. 9.2 Magnetic V ector Potential [m0195] A common problem in electromagnetics is to determine the fields radiated by a specified current distribution. This problem can be solved using Maxwell’s equations along with the appropriate electromagnetic boundary conditions. For time-harmonic (sinusoidally-varying) currents, we use phasor representation. 4 Given the specified current distribution ˜J and the desired electromagnetic fields ˜E and ˜H, the appropriate equations are: ∇ · ˜E = ˜ρv/ǫ (9.7) ∇ × ˜E = −jωµ˜H (9.8) ∇ · ˜H = 0 (9.9) ∇ × ˜H = ˜J + jωǫ˜E (9.10) where ˜ρv is the volume charge density . In most engineering problems, one is concerned with propagation through media which are well-modeled as homogeneous media with neutral charge, such as",Electromagnetics_Vol2.pdf "engineering problems, one is concerned with propagation through media which are well-modeled as homogeneous media with neutral charge, such as free space. 5 Therefore, in this section, we shall limit our scope to problems in which ˜ρv = 0. Thus, Equation 9.7 simplifies to: ∇ · ˜E = 0 (9.11) T o solve the linear system of partial differential Equations 9.8–9.11, it is useful to invoke the concept of magnetic vector potential. The magnetic vector potential is a vector field that has the useful property that it is able to represent both the electric and magnetic fields as a single field. This allows the formidable system of equations identified above to be reduced to a single equation which is simpler to solve. Furthermore, this single equation turns out to be the wave equation, with the slight difference that the equation will be mathematically inhomogeneous, with the inhomogeneous part representing the source current. 4 Recall that there is no loss of generality in doing so, since any",Electromagnetics_Vol2.pdf "with the inhomogeneous part representing the source current. 4 Recall that there is no loss of generality in doing so, since any other time-domain variation in the current distribution can be repre- sented using sums of time-harmonic solutions via the Fourier trans- form. 5 A counter-example would be propagation through a plasma, which by definition consists of non-zero net charge.",Electromagnetics_Vol2.pdf "148 CHAPTER 9. RADIA TION The magnetic vector potential ˜A is defined by the following relationship: ˜B ≜ ∇ × ˜A (9.12) where ˜B = µ˜H is the magnetic flux density . The magnetic field appears in three of Maxwell’s equations. For Equation 9.12 to be a reasonable definition, ∇ × ˜A must yield reasonable results when substituted for µ˜H in each of these equations. Let us first check for consistency with Gauss’ law for magnetic fields, Equation 9.9. Making the substitution, we obtain: ∇ · ( ∇ × ˜A ) = 0 (9.13) This turns out to be a mathematical identity that applies to any vector field (see Equation B.24 in Appendix B.3). Therefore, Equation 9.12 is consistent with Gauss’ law for magnetic fields. Next we check for consistency with Equation 9.8. Making the substitution: ∇ × ˜E = −jω ( ∇ × ˜A ) (9.14) Gathering terms on the left, we obtain ∇ × ( ˜E + jω˜A ) = 0 (9.15) Now , for reasons that will become apparent in just a moment, we define a new scalar field ˜V and require it",Electromagnetics_Vol2.pdf "∇ × ( ˜E + jω˜A ) = 0 (9.15) Now , for reasons that will become apparent in just a moment, we define a new scalar field ˜V and require it to satisfy the following relationship: − ∇ ˜V ≜ ˜E + jω˜A (9.16) Using this definition, Equation 9.15 becomes: ∇ × ( −∇ ˜V ) = 0 (9.17) which is simply ∇ × ∇ ˜V = 0 (9.18) Once again we have obtained a mathematical identity that applies to any vector field (see Equation B.25 in Appendix B.3). Therefore, ˜V can be any mathematically-valid scalar field. Subsequently , Equation 9.12 is consistent with Equation 9.8 (Maxwell’s curl equation for the electric field) for any choice of ˜V that we are inclined to make. Astute readers might already realize what we’re up to here. Equation 9.16 is very similar to the relationship E = −∇V from electrostatics, 6 in which V is the scalar electric potential field. Evidently Equation 9.16 is an enhanced version of that relationship that accounts for the coupling with H (here, represented",Electromagnetics_Vol2.pdf "is an enhanced version of that relationship that accounts for the coupling with H (here, represented by A) in the time-varying (decidedly non-static) case. That assessment is correct, but let’s not get too far ahead of ourselves: As demonstrated in the previous paragraph, we are not yet compelled to make any particular choice for ˜V, and this freedom will be exploited later in this section. Next we check for consistency with Equation 9.10. Making the substitution: ∇ × (1 µ∇ × ˜A ) = ˜J + j ωǫ˜E (9.19) Multiplying both sides of the equation by µ: ∇ × ∇ × ˜A = µ˜J + jωµǫ˜E (9.20) Next we use Equation 9.16 to eliminate ˜E, yielding: ∇ × ∇ × ˜A = µ˜J + jωµǫ ( −∇ ˜V − jω˜A ) (9.21) After a bit of algebra, we obtain ∇ × ∇ × ˜A = ω2µǫ˜A − jωµǫ∇˜V + µ˜J (9.22) Now we replace the left side of this equation using vector identity B.29 in Appendix B.3: ∇ × ∇ × ˜A ≡ ∇ ( ∇ · ˜A ) − ∇2 ˜A (9.23) Equation 9.22 becomes: ∇ ( ∇ · ˜A ) − ∇2 ˜A = ω2µǫ˜A − jωµǫ∇˜V + µ˜J (9.24)",Electromagnetics_Vol2.pdf "∇ × ∇ × ˜A ≡ ∇ ( ∇ · ˜A ) − ∇2 ˜A (9.23) Equation 9.22 becomes: ∇ ( ∇ · ˜A ) − ∇2 ˜A = ω2µǫ˜A − jωµǫ∇˜V + µ˜J (9.24) Now multiplying both sides by −1 and rearranging terms: ∇2 ˜A + ω2µǫ˜A = ∇ ( ∇ · ˜A ) + jωµǫ∇˜V − µ˜J (9.25) Combining terms on the right side: ∇2 ˜A+ω2µǫ˜A = ∇ ( ∇ · ˜A + jωµǫ˜V ) −µ˜J (9.26) Now consider the expression ∇ · ˜A + jωµǫ˜V appearing in the parentheses on the right side of the 6 Note: No tilde in this expression.",Electromagnetics_Vol2.pdf "9.2. MAGNETIC VECTOR POTENTIAL 149 equation. W e established earlier that ˜V can be essentially any scalar field – from a mathematical perspective, we are free to choose. Invoking this freedom, we now require ˜V to satisfy the following expression: ∇ · ˜A + jωµǫ˜V = 0 (9.27) Clearly this is advantageous in the sense that Equation 9.26 is now dramatically simplified. This equation becomes: ∇2 ˜A + ω2µǫ˜A = −µ˜J (9.28) Note that this expression is a wave equation. In fact it is the same wave equation that determines ˜E and ˜H in source-free regions, except the right-hand side is not zero. Using mathematical terminology , we have obtained an equation for ˜A in the form of an inhomogeneous partial differential equation, where the inhomogeneous part includes – no surprise here – the source current ˜J. Now we have what we need to find the electromagnetic fields radiated by a current distribution. The procedure is simply as follows: 1. Solve the partial differential Equation 9.28 for ˜A",Electromagnetics_Vol2.pdf "electromagnetic fields radiated by a current distribution. The procedure is simply as follows: 1. Solve the partial differential Equation 9.28 for ˜A along with the appropriate electromagnetic boundary conditions. 2. ˜H = (1/µ)∇ × ˜A 3. ˜E may now be determined from ˜H using Equation 9.10. Summarizing: The magnetic vector potential ˜A is a vector field, defined by Equation 9.12, that is able to represent both the electric and magnetic fields simultane- ously . Also: T o determine the electromagnetic fields radiated by a current distribution ˜J, one may solve Equa- tion 9.28 for ˜A and then use Equation 9.12 to determine ˜H and subsequently ˜E. Specific techniques for performing this procedure – in particular, for solving the differential equation – vary depending on the problem, and are discussed in other sections of this book. W e conclude this section with a few comments about Equation 9.27. This equation is known as the Lorenz gauge condition. This constraint is not quite as",Electromagnetics_Vol2.pdf "Equation 9.27. This equation is known as the Lorenz gauge condition. This constraint is not quite as arbitrary as the preceding derivation implies; rather, there is some deep physics at work here. Specifically , the Lorenz gauge leads to the classical interpretation of ˜V as the familiar scalar electric potential, as noted previously in this section. (For additional information on that idea, recommended starting points are included in “ Additional Reading” at the end of this section.) At this point, it should be clear that the electric and magnetic fields are not merely coupled quantities, but in fact two aspects of the same field; namely , the magnetic vector potential. In fact modern physics (quantum mechanics) yields the magnetic vector potential as a description of the “electromagnetic force, ” a single entity which constitutes one of the four fundamental forces recognized in modern physics; the others being gravity , the strong nuclear force, and the weak nuclear force. For more",Electromagnetics_Vol2.pdf "four fundamental forces recognized in modern physics; the others being gravity , the strong nuclear force, and the weak nuclear force. For more information on that concept, an excellent starting point is the video “Quantum Invariance & The Origin of The Standard Model” referenced at the end of this section. Additional Reading: • “Lorenz gauge condition” on Wikipedia. • “Magnetic potential” on Wikipedia. • PBS Space Time video “Quantum Invariance & The Origin of The Standard Model, ” available on Y ouTube.",Electromagnetics_Vol2.pdf "150 CHAPTER 9. RADIA TION 9.3 Solution of the W ave Equation for Magnetic V ector Potential [m0196] The magnetic vector potential ˜A due to a current density ˜J is given by the following wave equation: ∇2 ˜A − γ2 ˜A = −µ˜J (9.29) where γis the propagation constant, defined in the usual manner 7 γ2 ≜ −ω2µǫ (9.30) Equation 9.29 is a partial differential equation which is inhomogeneous (in the mathematical sense) and can be solved given appropriate boundary conditions. In this section, we present the solution for arbitrary distributions of current in free space. The strategy is to first identify a solution for a distribution of current that exists at a single point. This distribution is the current moment. An example of a current moment is shown in Figure 9.2. A general expression for a current moment located at the origin is: ˜J(r) = ˆl ˜I ∆lδ (r) (9.31) where ˜I has units of current (SI base units of A), ∆l has units of length (SI base units of m), ˆl is the",Electromagnetics_Vol2.pdf "˜J(r) = ˆl ˜I ∆lδ (r) (9.31) where ˜I has units of current (SI base units of A), ∆l has units of length (SI base units of m), ˆl is the 7 Alternati vely , γ2 ≜ −ω2µǫc accounting for the possibility of lossy media. c⃝ C. W ang CC BY -SA 4.0 Figure 9.2: An example of a current moment located at the origin. In this case, ˆl = ˆz. direction of current flow , and δ(r) is the volumetric sampling function 8 defined as follows: δ(r) ≜ 0 for r ̸= 0; and (9.32)∫ V δ(r) dv≜ 1 (9.33) where V is any volume which includes the origin (r = 0). It is evident from Equation 9.33 that δ(r) has SI base units of m −3; i.e., inverse volume. Subsequently J(r) has SI base units of A/m 2, indicating that it is a volume current density . 9 – as indicated by Equation 9.32 – it exists only at the origin and nowhere else. Substituting Equation 9.31 into Equation 9.29, we obtain: ∇2 ˜A − γ2 ˜A = −µˆl ˜I ∆lδ (r) (9.34) The general solution to this equation presuming homogeneous and time-invariant media (i.e., µand ǫ",Electromagnetics_Vol2.pdf "obtain: ∇2 ˜A − γ2 ˜A = −µˆl ˜I ∆lδ (r) (9.34) The general solution to this equation presuming homogeneous and time-invariant media (i.e., µand ǫ constant with respect to space and time) is: ˜A(r) = ˆl µ ˜I ∆l e±γr 4πr (9.35) T o confirm that this is a solution to Equation 9.34, substitute this expression into Equation 9.29 and observe that the equality holds. Note that Equation 9.35 indicates two solutions, corresponding to the signs of the exponent in the factor e±γr. W e can actually be a little more specific by applying some common-sense physics. Recall that γin general may be expressed in terms of real and imaginary components as follows: γ = α+ jβ (9.36) where αis a real-valued positive constant known as the attenuation constant and βis a real-valued positive constant known as the phase propagation constant. Thus, we may rewrite Equation 9.35 as follows: ˜A(r) = ˆl µ ˜I ∆l e±αre±jβr 4πr (9.37) 8 Als o a form of the Dirac delta function; see “ Additional Read-",Electromagnetics_Vol2.pdf "follows: ˜A(r) = ˆl µ ˜I ∆l e±αre±jβr 4πr (9.37) 8 Als o a form of the Dirac delta function; see “ Additional Read- ing” at the end of this section. 9 Remember, the density of a volume current is with respect to the area through which it flows, therefore the units are A/m 2.",Electromagnetics_Vol2.pdf "9.3. SOLUTION OF THE W A VE EQUA TION FOR MAGNETIC VECTOR POTENTIAL 151 Now consider the factor e±αr/r, which determines the dependence of magnitude on distance r. If we choose the negative sign in the exponent, this factor decays exponentially with increasing distance from the origin, ultimately reaching zero at r→ ∞. This is precisely the expected behavior, since we expect the magnitude of a radiated field to diminish with increasing distance from the source. If on the other hand we choose the positive sign in the exponent, this factor increases to infinity as r→ ∞. That outcome can be ruled out on physical grounds, since it implies the introduction of energy independently from the source. The requirement that field magnitude diminishes to zero as distance from the source increases to infinity is known as the radiation condition, and is essentially a boundary condition that applies at r→ ∞. Invoking the radiation condition, Equation 9.35 becomes: ˜A(r) = ˆl µ ˜I ∆l e−γr 4πr (9.38) In",Electromagnetics_Vol2.pdf "applies at r→ ∞. Invoking the radiation condition, Equation 9.35 becomes: ˜A(r) = ˆl µ ˜I ∆l e−γr 4πr (9.38) In the loss-free (α = 0) case, we cannot rely on the radiation condition to constrain the sign of γ. However, in practical engineering work there is always some media loss; i.e., αmight be negligible but is not quite zero. Thus, we normally assume that the solution for lossless (including free space) conditions is given by Equation 9.38 with α= 0: ˜A(r) = ˆl µ ˜I ∆l e−jβr 4πr (9.39) No w consider the factor e−jβr in Equation 9.39. This factor exclusively determines the dependence of the phase of ˜A(r) with increasing distance rfrom the source. In this case, we observe that surfaces of constant phase correspond to spherical shells which are concentric with the source. Thus, ˜A(r) is a spherical wave. Let us now consider a slightly more complicated version of the problem in which the current moment is no longer located at the origin, but rather is located",Electromagnetics_Vol2.pdf "version of the problem in which the current moment is no longer located at the origin, but rather is located at r′. This is illustrated in Figure 9.3. This current distribution can be expressed as follows: ˜J(r) = ˆl ˜I ∆lδ (r − r′) (9.40) The solution in this case amounts to a straightforward modification of the existing solution. T o see this, note c⃝ C. W ang CC BY -SA 4.0 Figure 9.3: Current moment displaced from the ori- gin. that ˜A depends only on r, and not at all on θor φ. In other words, ˜A depends only on the distance between the “field point” r at which we observe ˜A, and the “source point” r′ at which the current moment lies. Thus we replace rwith this distance, which is |r − r′|. The solution becomes: ˜A(r) = ˆl µ ˜I ∆l e−γ|r−r′| 4π|r − r′| (9.41) Continuing to generalize the solution, let us now consider a scenario consisting of a filament of current following a path C through space. This is illustrated in Figure 9.4. Such a filament may be viewed as a",Electromagnetics_Vol2.pdf "following a path C through space. This is illustrated in Figure 9.4. Such a filament may be viewed as a collection of a large number N of discrete current moments distributed along the path. The contribution of the nth current moment, located at rn, to the total magnetic vector potential is: ∆ ˜A(r; rn) = ˆl(rn) µ ˜I(rn) ∆l e−γ|r−rn| 4π|r − rn| (9.42) Note that we are allowing both the current ˜I and current direction ˆl to vary with position along C. Assuming the medium is linear, superposition applies. So we add these contributions to obtain the total",Electromagnetics_Vol2.pdf "152 CHAPTER 9. RADIA TION c⃝ C. W ang CC BY -SA 4.0 Figure 9.4: A filament of current lying along the path C. This current distribution may be interpreted as a collection of current moments lying along C. magnetic vector potential: ˜A(r) ≈ N∑ n=1 ∆ ˜A(r; rn) (9.43) ≈ µ 4π N∑ n=1 ˆl( rn) ˜I(rn) e−γ|r−rn| |r − rn| ∆l (9.44) No w letting ∆l → 0 so that we may replace ∆l with the differential length dl: ˜A(r) = µ 4π ∫ C ˆl(r′) ˜I(r′) e−γ|r−r′| |r − r′| dl (9.45) where we have also replaced rn with the original notation r′ since we once again have a continuum (as opposed to a discrete set) of source locations. The magnetic vector potential corresponding to radiation from a line distribution of current is given by Equation 9.45. Given ˜A(r), the magnetic and electric fields may be determined using the procedure developed in Section 9.2. Additional Reading: • “Magnetic potential” on Wikipedia. • “Dirac delta function” on Wikipedia. 9.4 Radiation from a Hertzian Dipole [m0197]",Electromagnetics_Vol2.pdf "Additional Reading: • “Magnetic potential” on Wikipedia. • “Dirac delta function” on Wikipedia. 9.4 Radiation from a Hertzian Dipole [m0197] Section 9.1 presented an informal derivation of the electromagnetic field radiated by a Hertzian dipole represented by a zero-length current moment. In this section, we provide a rigorous derivation using the concept of magnetic vector potential discussed in Sections 9.2 and 9.3. A review of those sections is recommended before tackling this section. A Hertzian dipole is commonly defined as an electrically-short and infinitesimally-thin straight filament of current, in which the density of the current is uniform over its length. The Hertzian dipole is commonly used as a “building block” for constructing physically-realizable distributions of current as exhibited by devices such as wire antennas. The method is to model these relatively complex distributions of current as the sum of Hertzian dipoles, which reduces the problem to that of summing the",Electromagnetics_Vol2.pdf "method is to model these relatively complex distributions of current as the sum of Hertzian dipoles, which reduces the problem to that of summing the contributions of the individual Hertzian dipoles, with each Hertzian dipole having the appropriate (i.e., different) position, magnitude, and phase. T o facilitate use of the Hertzian dipole as a building block suitable for constructing physically-realizable distributions of current, we choose to represent the Hertzian dipole using an essentially equivalent current distribution which is mathematically more versatile. This description of the Hertzian dipole replaces the notion of constant current over finite length with the notion of a current moment located at a single point. This is shown in Figure 9.5, and is given by: ∆ ˜J(r) = ˆl ˜I ∆lδ (r) (9.46) where the product ˜I∆l (SI base units of A·m) is the current moment, ˆl is the direction of current flow , and δ(r) is the volumetric sampling function defined as follows:",Electromagnetics_Vol2.pdf "current moment, ˆl is the direction of current flow , and δ(r) is the volumetric sampling function defined as follows: δ(r) ≜ 0 for r ̸= 0; and (9.47)∫ V δ(r) dv≜ 1 (9.48) where V is any volume which includes the origin (r = 0). In this description, the Hertzian dipole is located at the origin.",Electromagnetics_Vol2.pdf "9.4. RADIA TION FROM A HER TZIAN DIPOLE 153 The solution for the magnetic vector potential due to a ˆz-directed Hertzian dipole located at the origin was presented in Section 9.3. In the present scenario, it is: ˜A(r) = ˆz µ ˜I ∆l e−γr 4πr (9.49) where the propagation constant γ = α+ jβ as usual. Assuming lossless media (α = 0), we have ˜A(r) = ˆz µ ˜I ∆l e−jβr 4πr (9.50) W e obtain the magnetic field intensity using the definition of magnetic vector potential: ˜H ≜ (1/µ)∇ × ˜A (9.51) = ˜I ∆l 4π ∇ × ˆz e−j βr r (9.52) T o proceed, it is useful to convert ˆz into the spherical coordinate system. T o do this, we find the component of ˆz that is parallel to ˆr, ˆθ, and ˆφ; and then sum the results: ˆz = ˆr (ˆr · ˆz) + ˆθ ( ˆθ· ˆz ) + ˆφ ( ˆφ· ˆz ) (9.53) = ˆr cos θ− ˆθsin θ+ 0 (9.54) Equation 9.52 requires computation of the following quantity: ∇ × ˆze−jβr r = ∇ × [ ˆr (cos θ) e−j βr r −ˆθ(s in θ) e−jβr r ] (9.55) c⃝ C. W ang CC BY -SA 4.0 Figure 9.5: A Hertzian dipole located at the origin,",Electromagnetics_Vol2.pdf "∇ × ˆze−jβr r = ∇ × [ ˆr (cos θ) e−j βr r −ˆθ(s in θ) e−jβr r ] (9.55) c⃝ C. W ang CC BY -SA 4.0 Figure 9.5: A Hertzian dipole located at the origin, represented as a current moment. In this case, ˆl = ˆz. At this point, it is convenient to make the following definitions: Cr ≜ (cos θ) e−jβr r (9.56) Cθ ≜ − ( sin θ) e−jβr r (9.57) These definitions allow Equation 9.55 to be written compactly as follows: ∇ × ˆze−jβr r = ∇ × [ ˆrCr + ˆθ Cθ ] (9.58) The right side of Equation 9.58 is evaluated using Equation B.18 (Appendix B.2). Although the complete expression consists of 6 terms, only 2 terms are non-zero. 10 This leaves: ∇ × ˆze−jβr r = ˆφ1 r [ ∂ ∂r (rCθ) − ∂ ∂θCr ] (9.59) = ˆφ( sin θ) e−jβr r ( jβ + 1 r ) (9.60) Substituting this result into Equation 9.52, we obtain: ˜H = ˆφ ˜I ∆l 4π (s in θ) e−jβr r ( jβ + 1 r ) (9.61) Let us further limit our scope to the field far from the antenna. Specifically , let us assume r≫ λ. Now we use the relationship β = 2π/λ and determine the following:",Electromagnetics_Vol2.pdf "antenna. Specifically , let us assume r≫ λ. Now we use the relationship β = 2π/λ and determine the following: jβ + 1 r = j2π λ + 1 r (9.62) ≈ j2 π λ = jβ (9.63) Equation 9.61 becomes: ˜H ≈ ˆφj ˜I· β∆l 4π (s in θ) e−jβr r (9.64) where the approximation holds for low-loss media and r≫ λ. This expression is known as a far field approximation, since it is valid only for distances “far” (relative to a wavelength) from the source. Now let us take a moment to interpret this result: 10 Specifically , two terms are zero because there is no ˆφ compo- nent in the argument of the curl function; and another two terms are zero because the argument of the curl function is independent of φ, so partial derivatives with respect to φ are zero.",Electromagnetics_Vol2.pdf "154 CHAPTER 9. RADIA TION • Notice the factor β∆l has units of radians; that is, it is electrical length. This tells us that the magnitude of the radiated field depends on the electrical length of the current moment. • The factor e−jβr/rindicates that this is a spherical wave; that is, surfaces of constant phase correspond to concentric spheres centered on the source, and magnitude is inversely proportional to distance. • The direction of the magnetic field vector is always ˆφ, which is precisely what we expect; for example, using the Biot-Savart law . • Finally , note the factor sin θ. This indicates that the field magnitude is zero along the direction in which the source current flows, and is a maximum in the plane perpendicular to this direction. Now let us determine the electric field radiated by the Hertzian dipole. The direct method is to employ Ampere’s law . That is, ˜E = 1 jωǫ∇ × ˜H (9.65) where ˜H is given by Equation 9.64. At field points far",Electromagnetics_Vol2.pdf "Ampere’s law . That is, ˜E = 1 jωǫ∇ × ˜H (9.65) where ˜H is given by Equation 9.64. At field points far from the dipole, the radius of curvature of the spherical phasefronts is very large and so appear to be locally planar. That is, from the perspective of an observer far from the dipole, the arriving wave appears to be a plane wave. In this case, we may employ the plane wave relationships. The appropriate relationship in this case is: ˜E = −ηˆr × ˜H (9.66) where ηis the wave impedance. So we find: ˜E ≈ ˆθjη ˜I· β∆l 4π (s in θ) e−jβr r (9.67) Summarizing: The electric and magnetic fields far (i.e., ≫ λ) from a ˆz-directed Hertzian dipole having con- stant current ˜I over length ∆l , located at the ori- gin, are given by Equations 9.67 and 9.64, respec- tively . Additional Reading: • “Dipole antenna” (section entitled “Hertzian Dipole”) on Wikipedia.",Electromagnetics_Vol2.pdf "9.5. RADIA TION FROM AN ELECTRICALL Y -SHOR T DIPOLE 155 9.5 Radiation from an Electrically-Short Dipole [m0198] The simplest distribution of radiating current that is encountered in common practice is the electrically-short dipole (ESD). This current distribution is shown in Figure 9.6. The two characteristics that define the ESD are (1) the current is aligned along a straight line, and (2) the length Lof the line is much less than one-half of a wavelength; i.e., L≪ λ/2. The latter characteristic is what we mean by “electrically-short. ” 11 The current distribution of an ESD is approximately triangular in magnitude, and approximately constant in phase. How do we know this? First, note that distributions of current cannot change in a complex or rapid way over such distances which are much less than a wavelength. If this is not immediately apparent, recall the behavior of transmission lines: 11 A potential source of confusion is that the Hertzian dipole is",Electromagnetics_Vol2.pdf "apparent, recall the behavior of transmission lines: 11 A potential source of confusion is that the Hertzian dipole is also a “dipole” which is “electrically-short. ” The distinction is that the current comprising a Hertzian dipole is constant over its length. This condition is rarely and only approximately seen in practice, whereas the triangular magnitude distribution is a relatively good ap- proximation to a broad class of commonly-encountered electrically- short wire antennas. Thus, the term “electrically-short dipole, ” as used in this book, refers to the triangular distribution unless noted otherwise. c⃝ C. W ang CC BY -SA 4.0 Figure 9.6: Current distribution of the electrically- short dipole (ESD). c⃝ C. W ang CC BY -SA 4.0 Figure 9.7: Current distribution of the electrically- short dipole (ESD) approximated as a large number of Hertzian dipoles. The current standing wave on a transmission line exhibits a period of λ/2, regardless the source or",Electromagnetics_Vol2.pdf "Hertzian dipoles. The current standing wave on a transmission line exhibits a period of λ/2, regardless the source or termination. For the ESD, L≪ λ/2 and so we expect an even simpler variation. Also, we know that the current at the ends of the dipole must be zero, simply because the dipole ends there. These considerations imply that the current distribution of the ESD is well-approximated as triangular in magnitude. 12 Expressed mathematically: ˜I(z) ≈ I0 ( 1 − 2 L|z| ) (9.68) where I0 (SI base units of A) is a complex-valued constant indicating the maximum current magnitude and phase. There are two approaches that we might consider in order to find the electric field radiated by an ESD. The first approach is to calculate the magnetic vector potential ˜A by integration over the current distribution, calculate ˜H = (1/µ)∇ × ˜A, and finally calculate ˜E from ˜H using Ampere’s law . W e shall employ a simpler approach, shown in Figure 9.7. Imagine the ESD as a collection of many shorter",Electromagnetics_Vol2.pdf "calculate ˜E from ˜H using Ampere’s law . W e shall employ a simpler approach, shown in Figure 9.7. Imagine the ESD as a collection of many shorter segments of current that radiate independently . The total field is then the sum of these short segments. Because these segments are very short relative to the 12 A more rigorous analysis leading to the same conclusion is pos- sible, but is beyond the scope of this book.",Electromagnetics_Vol2.pdf "156 CHAPTER 9. RADIA TION length of the dipole as well as being short relative to a wavelength, we may approximate the current over each segment as approximately constant. In other words, we may interpret each of these segments as being, to a good approximation, a Hertzian dipole. The advantage of this approach is that we already have a solution for each of the segments. In Section 9.4, it is shown that a ˆz-directed Hertzian dipole at the origin radiates the electric field ˜E(r) ≈ ˆθjη ˜I· β∆l 4π (s in θ) e−jβr r (9.69) where ˜I and ∆ lmay be interpreted as the current and length of the dipole, respectively . In this expression, η is the wave impedance of medium in which the dipole radiates (e.g., ≈ 377 Ω for free space), and we have presumed lossless media such that the attenuation constant α≈ 0 and the phase propagation constant β = 2π/λ. This expression also assumes field points far from the dipole; specifically , distances rthat are",Electromagnetics_Vol2.pdf "β = 2π/λ. This expression also assumes field points far from the dipole; specifically , distances rthat are much greater than λ. Repurposing this expression for the present problem, the segment at the origin radiates the electric field: ˜E(r; z′ = 0) ≈ ˆθjηI0 · β∆l 4π (s in θ) e−jβr r (9.70) where the notation z′ = 0 indicates the Hertzian dipole is located at the origin. Letting the length ∆l of this segment shrink to differential length dz′, we may describe the contribution of this segment to the field radiated by the ESD as follows: d˜E(r; z′ = 0) ≈ ˆθjηI0 · βdz′ 4π (s in θ) e−jβr r (9.71) Using this approach, the electric field radiated by any segment can be written: d˜E(r; z′) ≈ ˆθ′jηβ ˜I(z′) 4π (s in θ′) e−jβ|r−ˆzz′| |r − ˆzz′| dz′ (9.72) Note that θis replaced by θ′ since the ray r − ˆzz′ forms a different angle (i.e., θ′) with respect to ˆz. Similarly , ˆθis replaced by ˆθ′, since it also varies with z′. The electric field radiated by the ESD is obtained",Electromagnetics_Vol2.pdf "Similarly , ˆθis replaced by ˆθ′, since it also varies with z′. The electric field radiated by the ESD is obtained by integration over these contributions: ˜E(r) ≈ ∫ +L/ 2 −L/ 2 d˜E(ˆr; z′) (9.73) c⃝ C. W ang CC BY -SA 4.0 Figure 9.8: Parallel ray approximation for an ESD. yielding: ˜E(r) ≈ jηβ 4π ∫ +L/ 2 −L/ 2 ˆθ′ ˜I( z′) (sin θ′) e−jβ|r−ˆzz′| |r − ˆzz′| dz′ (9.74) Gi ven some of the assumptions we have already made, this expression can be further simplified. For example, note that θ′ ≈ θsince L≪ r. For the same reason, ˆθ′ ≈ ˆθ. Since these variables are approximately constant over the length of the dipole, we may move them outside the integral, yielding: ˜E(r) ≈ ˆθjηβ 4π (s in θ) ∫ +L/ 2 −L/ 2 ˜I(z′)e−jβ|r−ˆzz′| |r − ˆzz′| dz′ (9.75) It is also possible to simplify the expression |r − ˆzz′|. Consider Figure 9.8. Since we have already assumed that r≫ L(i.e., the distance to field points is much greater than the length of the dipole), the vector r is",Electromagnetics_Vol2.pdf "that r≫ L(i.e., the distance to field points is much greater than the length of the dipole), the vector r is approximately parallel to the vector r − ˆzz′. Subsequently , it must be true that |r − ˆzz′| ≈ r− ˆr · ˆzz′ (9.76) Note that the magnitude of r− ˆr · ˆzz′ must be approximately equal to r, since r≫ L. So, insofar as |r − ˆzz′| determines the magnitude of ˜E(r), we may use the approximation: |r − ˆzz′| ≈ r (magnitude) (9.77) Insofar as |r − ˆzz′| determines phase, we have to be a bit more careful. The part of the integrand of",Electromagnetics_Vol2.pdf "9.5. RADIA TION FROM AN ELECTRICALL Y -SHOR T DIPOLE 157 Equation 9.75 that exhibits varying phase is e−jβ|r−ˆzz′|. Using Equation 9.76, we find e−jβ|r−ˆzz′| ≈ e−jβre+jβˆr·ˆzz′ (9.78) The worst case in terms of phase variation within the integral is for field points along the zaxis. For these points, ˆr · ˆz = ±1 and subsequently |r − ˆzz′| varies from z− L/2 to z+ L/2 where zis the location of the field point. However, since L≪ λ(i.e., because the dipole is electrically short), this difference in lengths is much less than λ/2. Therefore, the phase βˆr · ˆzz′ varies by much less than πradians, and subsequently e−jβˆr·ˆzz′ ≈ 1. W e conclude that under these conditions, e−jβ|r−ˆzz′| ≈ e−jβr (phase) (9.79) Applying these simplifications for magnitude and phase to Equation 9.75, we obtain: ˜E(r) ≈ ˆθjηβ 4π (s in θ) e−jβr r ∫ +L/ 2 −L/ 2 ˜I( z′)dz′ (9.80) The integral in this equation is very easy to evaluate; in fact, from inspection (Figure 9.6), we determine it",Electromagnetics_Vol2.pdf "r ∫ +L/ 2 −L/ 2 ˜I( z′)dz′ (9.80) The integral in this equation is very easy to evaluate; in fact, from inspection (Figure 9.6), we determine it is equal to I0L/2. Finally , we obtain: ˜E(r) ≈ ˆθjηI0 · βL 8π (s in θ) e−jβr r (9.81) Summarizing: The electric field intensity radiated by an ESD lo- cated at the origin and aligned along the zaxis is given by Equation 9.81. This expression is valid for r≫ λ. It is worth noting that the variation in magnitude, phase, and polarization of the ESD with field point location is identical to that of a single Hertzian dipole having current moment ˆzI0L/2 (Section 9.4). However, the magnitude of the field radiated by the ESD is exactly one-half that of the Hertzian dipole. Why one-half? Simply because the integral over the triangular current distribution assumed for the ESD is one-half the integral over the uniform current distribution that defines the Hertzian dipole. This similarly sometimes causes confusion between",Electromagnetics_Vol2.pdf "one-half the integral over the uniform current distribution that defines the Hertzian dipole. This similarly sometimes causes confusion between Hertzian dipoles and ESDs. Remember that ESDs are physically realizable, whereas Hertzian dipoles are not. It is common to eliminate the factor of βin the magnitude using the relationship β = 2π/λ, yielding: ˜E(r) ≈ ˆθjηI0 4 L λ (s in θ) e−jβr r (9.82) At field points r≫ λ, the wave appears to be locally planar. Therefore, we are justified using the plane wave relationship ˜H = 1 ηˆr × ˜E to calculate ˜H. The result is: ˜H(r) ≈ ˆφjI0 4 L λ (s in θ) e−jβr r (9.83) Finally , let us consider the spatial characteristics of the radiated field. Figures 9.9 and 9.10 show the result in a plane of constant φ. Figures 9.11 and 9.12 show the result in the z= 0 plane. Note that the orientations of the electric and magnetic field vectors indicate a Poynting vector ˜E × ˜H that is always directed radially outward from the location of the",Electromagnetics_Vol2.pdf "indicate a Poynting vector ˜E × ˜H that is always directed radially outward from the location of the dipole. This confirms that power flow is always directed radially outward from the dipole. Due to the symmetry of the problem, Figures 9.9–9.12 provide a complete characterization of the relative magnitudes and orientations of the radiated fields.",Electromagnetics_Vol2.pdf "158 CHAPTER 9. RADIA TION c⃝ S. Lally CC BY -SA 4.0 Figure 9.9: Magnitude of the radiated field in any plane of constant φ. c⃝ S. Lally CC BY -SA 4.0 Figure 9.10: Orientation of the electric and magnetic fields in any plane of constant φ. c⃝ S. Lally CC BY -SA 4.0 Figure 9.11: Magnitude of the radiated field in any plane of constant z. c⃝ S. Lally CC BY -SA 4.0 Figure 9.12: Orientation of the electric and magnetic fields in the z= 0 plane.",Electromagnetics_Vol2.pdf "9.6. F AR-FIELD RADIA TION FROM A THIN STRAIGHT FILAMENT OF CURRENT 159 9.6 Far-Field Radiation from a Thin Straight Filament of Current [m0199] A simple distribution of radiating current that is encountered in common practice is the thin straight current filament, shown in Figure 9.13. The defining characteristic of this distribution is that the current filament is aligned along a straight line, and that the maximum dimension of the cross-section of the filament is much less than a wavelength. The latter characteristic is what we mean by “thin” – i.e., the filament is “electrically thin. ” Physical distributions of current that meet this description include the electrically-short dipole (Section 9.5) and the half-wave dipole (Section 9.7) among others. A gentler introduction to this distribution is via Section 9.5 (“Radiation from an Electrically-Short Dipole”), so students may want to review that section first. This section presents the more general case.",Electromagnetics_Vol2.pdf "Dipole”), so students may want to review that section first. This section presents the more general case. Let the magnitude and phase of current along the filament be given by the phasor quantity ˜I(z) (SI base units of A). In principle, the only constraint on ˜I(z) c⃝ C. W ang CC BY -SA 4.0 Figure 9.13: A thin straight distribution of radiating current. c⃝ C. W ang CC BY -SA 4.0 Figure 9.14: Current distribution approximated as a set of Hertzian dipoles. that applies generally is that it must be zero at the ends of the distribution; i.e., ˜I(z) = 0 for |z| ≥ L/2. Details beyond this constraint depend on Land perhaps other factors. Nevertheless, the characteristics of radiation from members of this class of current distributions have much in common, regardless of L. These become especially apparent if we limit our scope to field points far from the current, as we shall do here. There are two approaches that we might consider in order to find the electric field radiated by this",Electromagnetics_Vol2.pdf "as we shall do here. There are two approaches that we might consider in order to find the electric field radiated by this distribution. The first approach is to calculate the magnetic vector potential ˜A by integration over the current distribution (Section 9.3), calculate ˜H = (1/µ)∇ × ˜A, and finally calculate ˜E from ˜H using the differential form of Ampere’s law . In this section, we shall employ a simpler approach, shown in Figure 9.14. Imagine the filament as a collection of many shorter segments of current that radiate independently . The total field is then the sum of these short segments. Because these segments are very short relative to the length of the filament as well as being short relative to a wavelength, we may approximate the current over each segment as constant. In other words, we may interpret each segment as being, to a good approximation, a Hertzian dipole. The advantage of this approach is that we already have a solution for every segment. In Section 9.4, it is",Electromagnetics_Vol2.pdf "160 CHAPTER 9. RADIA TION shown that a ˆz-directed Hertzian dipole at the origin radiates the electric field ˜E(r) ≈ ˆθjη ˜I(β∆l ) 4π (s in θ) e−jβr r (9.84) where ˜I and ∆ lmay be interpreted as the current and length of the filament, respectively . In this expression, ηis the wave impedance of medium in which the filament radiates (e.g., ≈ 377 Ω for free space), and we have presumed lossless media such that the attenuation constant α≈ 0 and the phase propagation constant β = 2π/λ. This expression also assumes field points far from the filament; specifically , distances rthat are much greater than λ. Repurposing this expression for the present problem, we note that the segment at the origin radiates the electric field: ˜E(r; z′ = 0) ≈ ˆθjη ˜I(0) (β∆l ) 4π (s in θ) e−jβr r(9.85) where the notation z′ = 0 indicates the Hertzian dipole is located at the origin. Letting the length ∆l of this segment shrink to differential length dz′, we may describe the contribution of this segment to the",Electromagnetics_Vol2.pdf "of this segment shrink to differential length dz′, we may describe the contribution of this segment to the field radiated by the ESD as follows: d˜E(r; z′ = 0) ≈ ˆθjη ˜I(0) (βdz′) 4π (s in θ) e−jβr r(9.86) Using this approach, the electric field radiated by any segment can be written: d˜E(r; z′) ≈ ˆθ′jηβ ˜I(z′) 4π (s in θ′) e−jβ|r−ˆzz′| |r − ˆzz′| dz′ (9.87) Note that θis replaced by θ′ since the ray r − ˆzz′ forms a different angle (i.e., θ′) with respect to ˆz. Subsequently , ˆθis replaced by ˆθ′, which varies similarly with z′. The electric field radiated by the filament is obtained by integration over these contributions, yielding: ˜E(r) ≈ ∫ +L/ 2 −L/ 2 d˜E(ˆr; z′) (9.88) Expanding this expression: ˜E(r) ≈ jηβ 4π ∫ +L/ 2 −L/ 2 ˆθ′ ˜I( z′) (sin θ′) e−jβ|r−ˆzz′| |r − ˆzz′| dz′ (9.89) c⃝ C. W ang CC BY -SA 4.0 Figure 9.15: Parallel ray approximation. Given some of the assumptions we have already made, this expression can be further simplified. For",Electromagnetics_Vol2.pdf "Figure 9.15: Parallel ray approximation. Given some of the assumptions we have already made, this expression can be further simplified. For example, note that θ′ ≈ θsince L≪ r. For the same reason, ˆθ′ ≈ ˆθ. Since these variables are approximately constant over the length of the filament, we may move them outside the integral, yielding: ˜E(r) ≈ ˆθjηβ 4π (s in θ) ∫ +L/ 2 −L/ 2 ˜I(z′)e−jβ|r−ˆzz′| |r − ˆzz′| dz′ (9.90) It is also possible to simplify the expression |r − ˆzz′|. Consider Figure 9.15. Since we have already assumed that r≫ L(i.e., the distance to field points is much greater than the length of the filament), the vector r is approximately parallel to the vector r − ˆzz′. Subsequently , it must be true that |r − ˆzz′| ≈ r− ˆr · ˆzz′ (9.91) ≈ r− z′ cos θ (9.92) Note that the magnitude of r− ˆr · ˆzz′ must be approximately equal to r, since r≫ L. So, insofar as |r − ˆzz′| determines the magnitude of ˜E(r), we may use the approximation: |r − ˆzz′| ≈ r (magnitude) (9.93)",Electromagnetics_Vol2.pdf "|r − ˆzz′| determines the magnitude of ˜E(r), we may use the approximation: |r − ˆzz′| ≈ r (magnitude) (9.93) Insofar as |r − ˆzz′| determines phase, we have to be more careful. The part of the integrand of Equation 9.90 that exhibits varying phase is e−jβ|r−ˆzz′|. Using Equation 9.91, we find e−jβ|r−ˆzz′| ≈ e−jβre+jβz′ cos θ (9.94)",Electromagnetics_Vol2.pdf "9.7. F AR-FIELD RADIA TION FROM A HALF-W A VE DIPOLE 161 These simplifications are known collectively as a far field approximation, since they are valid only for distances “far” from the source. Applying these simplifications for magnitude and phase to Equation 9.90, we obtain: ˜E(r) ≈ ˆθjηβ 4π e−jβ r r (s in θ) · ∫ +L/ 2 −L/ 2 ˜I(z′)e+jβz′ cos θdz′ (9.95) Finally , it is common to eliminate the factor of βin the magnitude using the relationship β = 2π/λ, yielding: ˜E(r) ≈ ˆθjη 2 e−jβ r r (s in θ) · [ 1 λ ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] (9.96) The electric field radiated by a thin, straight, ˆz- directed current filament of length L located at the origin and aligned along the z axis is given by Equation 9.96. This expression is valid for r≫ Land r≫ λ. At field points satisfying the conditions r≫ Land r≫ λ, the wave appears to be locally planar. Therefore, we are justified using the plane wave relationship ˜H = (1/η)ˆr × ˜E to calculate ˜H.",Electromagnetics_Vol2.pdf "r≫ λ, the wave appears to be locally planar. Therefore, we are justified using the plane wave relationship ˜H = (1/η)ˆr × ˜E to calculate ˜H. As a check, one may readily verify that Equation 9.96 yields the expected result for the electrically-short dipole (Section 9.5). 9.7 Far-Field Radiation from a Half-W ave Dipole [m0200] A simple and important current distribution is that of the thin half-wave dipole (HWD), shown in Figure 9.16. This is the distribution expected on a thin straight wire having length L= λ/2, where λis wavelength. This distribution is described mathematically as follows: ˜I(z) ≈ I0 cos ( πz L ) for | z| ≤ L 2 (9.97) where I0 (SI base units of A) is a complex-valued constant indicating the maximum magnitude of the current and its phase. Note that the current is zero at the ends of the dipole; i.e., ˜I(z) = 0 for |z| = L/2. Note also that this “cosine pulse” distribution is very similar to the triangular distribution of the ESD, and",Electromagnetics_Vol2.pdf "Note also that this “cosine pulse” distribution is very similar to the triangular distribution of the ESD, and is reminiscent of the sinusoidal variation of current in a standing wave. Since L= λ/2 for the HWD, Equation 9.97 may equivalently be written: ˜I(z) ≈ I0 cos ( 2πz λ ) (9.98) The electromagnetic field radiated by this distribution c⃝ C. W ang CC BY -SA 4.0 Figure 9.16: Current distribution of the half-wave dipole (HWD).",Electromagnetics_Vol2.pdf "162 CHAPTER 9. RADIA TION of current may be calculated using the method described in Section 9.6, in particular: ˜E(r) ≈ ˆθjη 2 e−jβ r r (s in θ) · [ 1 λ ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] (9.99) which is valid for field points r far from the dipole; i.e., for r≫ Land r≫ λ. For the HWD, the quantity in square brackets is I0 λ ∫ +λ/ 4 −λ / 4 cos ( 2πz′ λ ) e+jβ z′ cos θdz′ (9.100) The evaluation of this integral is straightforward, but tedious. The integral reduces to I0 π cos [(π/2) cos θ] sin2 θ (9.101) Substitution into Equation 9.99 yields ˜E(r) ≈ ˆθjηI0 2π cos [(π/2) cos θ] sin θ e−jβ r r (9.102) The magnetic field may be determined from this result using Ampere’s law . However, a simpler method is to use the fact that the electric field, magnetic field, and direction of propagation ˆr are mutually perpendicular and related by: ˜H = 1 ηˆr × ˜E (9.103) This relationship indicates that the magnetic field will be + ˆφ-directed. The magnitude and polarization of the radiated field is",Electromagnetics_Vol2.pdf "ηˆr × ˜E (9.103) This relationship indicates that the magnetic field will be + ˆφ-directed. The magnitude and polarization of the radiated field is similar to that of the electrically-short dipole (ESD; Section 9.5). A comparison of the magnitudes in any radial plane containing the z-axis is shown in Figure 9.17. For either current distribution, the maximum magnitude of the fields occurs in the z= 0 plane. For a given terminal current I0, the maximum magnitude is greater for the HWD than for the ESD. Both current distributions yield zero magnitude along the axis of the dipole. The polarization characteristics of the fields of both current distributions are identical. Additional Reading: • “Dipole antenna” (section entitled “Half-wave dipole”) on Wikipedia. c⃝ C. W ang CC BY -SA 4.0 Figure 9.17: Comparison of the magnitude of the ra- diated field of the HWD to that of an electrically-short dipole also oriented along the z-axis. This result is for any radial plane that includes the z-axis.",Electromagnetics_Vol2.pdf "dipole also oriented along the z-axis. This result is for any radial plane that includes the z-axis. 9.8 Radiation from Surface and V olume Distributions of Current [m0221] In Section 9.3, a solution was developed for radiation from current located at a single point r′. This current distribution was expressed mathematically as a current moment, as follows: ˜J(r) = ˆl ˜I ∆lδ (r − r′) (9.104) where ˆl is the direction of current flow , ˜I has units of current (SI base units of A), ∆l has units of length (SI base units of m), and δ(r) is the volumetric sampling function (Dirac “delta” function; SI base units of m−3). In this formulation, ˜J has SI base units of A/m2. The magnetic vector potential radiated by this current, observed at the field point r, was found to be ˜A(r) = ˆl µ ˜I ∆l e−γ|r−r′| 4π|r − r′| (9.105) This solution was subsequently generalized to obtain the radiation from any distribution of line current; i.e.,",Electromagnetics_Vol2.pdf "9.8. RADIA TION FROM SURF ACE AND VOLUME DISTRIBUTIONS OF CURRENT 163 any distribution of current that is constrained to flow along a single path through space, as along an infinitesimally-thin wire. In this section, we derive an expression for the radiation from current that is constrained to flow along a surface and from current which flows through a volume. The solution in both cases can be obtained by “recycling” the solution for line current as follows. Letting ∆l shrink to the differential length dl, Equation 9.104 becomes: d˜J(r) = ˆl ˜I dlδ(r − r′) (9.106) Subsequently , Equation 9.105 becomes: d˜A(r; r′) = ˆl µ ˜I dle−γ|r−r′| 4π|r − r′| (9.107) where the notation d˜A(r; r′) is used to denote the magnetic vector potential at the field point r due to the differential-length current moment at the source point r′. Next, consider that any distribution of current can be described as a distribution of current moments. By the principle of superposition, the",Electromagnetics_Vol2.pdf "current can be described as a distribution of current moments. By the principle of superposition, the radiation from this distribution of current moments can be calculated as the sum of the radiation from the individual current moments. This is expressed mathematically as follows: ˜A(r) = ∫ d˜A(r; r′) (9.108) where the integral is over r′; i.e., summing over the source current. If we substitute Equation 9.107 into Equation 9.108, we obtain the solution derived in Section 9.3, which is specific to line distributions of current. T o obtain the solution for surface and volume distributions of current, we reinterpret the definition of the differential current moment in Equation 9.106. Note that this current is completely specified by its direction ( ˆl) and the quantity ˜I dl, which has SI base units of A·m. W e may describe the same current distribution alternatively as follows: d˜J(r) = ˆl ˜Js dsδ(r − r′) (9.109) where ˜Js has units of surface current density (SI base",Electromagnetics_Vol2.pdf "alternatively as follows: d˜J(r) = ˆl ˜Js dsδ(r − r′) (9.109) where ˜Js has units of surface current density (SI base units of A/m) and dshas units of area (SI base units of m 2). T o emphasize that this is precisely the same current moment, note that ˜Js ds, like ˜I dl, has units of A·m. Similarly , d˜J(r) = ˆl ˜J dvδ(r − r′) (9.110) where ˜J has units of volume current density (SI base units of A/m 2) and dvhas units of volume (SI base units of m 3). Again, ˜J dvhas units of A·m. Summarizing, we have found that ˜I dl= ˜Js ds= ˜J dv (9.111) all describe the same differential current moment. Thus, we may obtain solutions for surface and volume distributions of current simply by replacing ˜I dlin Equation 9.107, and subsequently in Equation 9.108, with the appropriate quantity from Equation 9.111. For a surface current distribution, we obtain: ˜A(r) = µ 4π ∫ S ˜Js(r′) e−γ|r−r′| |r − r′| ds (9.112) where ˜Js( r′) ≜ ˆl(r′) ˜Js(r′) and where S is the",Electromagnetics_Vol2.pdf "˜A(r) = µ 4π ∫ S ˜Js(r′) e−γ|r−r′| |r − r′| ds (9.112) where ˜Js( r′) ≜ ˆl(r′) ˜Js(r′) and where S is the surface over which the current flows. Similarly for a volume current distribution, we obtain: ˜A(r) = µ 4π ∫ V ˜J(r′) e−γ|r−r′| |r − r′| dv (9.113) where ˜J (r′) ≜ ˆl(r′) ˜J(r′) and where V is the volume in which the current flows. The magnetic vector potential corresponding to radiation from a surface and volume distribution of current is given by Equations 9.112 and 9.113, respectively . Given ˜A(r), the magnetic and electric fields may be determined using the procedure developed in Section 9.2. [m0217]",Electromagnetics_Vol2.pdf "164 CHAPTER 9. RADIA TION Image Credits Fig. 9.1: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:A z-directed current moment located at the origin.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.2: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:A z-directed current moment located at the origin.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.3: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Current moment displaced from the origin.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.4: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:A filament of current lying along the path c.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.5: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:A z-directed current moment located at the origin.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.6: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Current distribution of the esd.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.7: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Esd approximated as a large number of hertzian dipoles.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.8: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Parallel ray approximation for an esd.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.9: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Magnitude of the Radiated Field.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.10: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Electric and Magnetic Fields in Plane of Constant Theta.svg, CC",Electromagnetics_Vol2.pdf "Fig. 9.10: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:Electric and Magnetic Fields in Plane of Constant Theta.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.11: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:FHplaneMag.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.12: c⃝ Offaperry (S. Lally), https://commons.wikimedia.org/wiki/File:FHplanePol.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.13: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:A thin straight distribution of radiating current.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.14: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Esd approximated as a large number of hertzian dipoles.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "9.8. RADIA TION FROM SURF ACE AND VOLUME DISTRIBUTIONS OF CURRENT 165 Fig. 9.15: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Parallel ray approximation for an esd.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.16: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Current distribution of the hwd.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Fig. 9.17: c⃝ Sevenchw (C. W ang), https://commons.wikimedia.org/wiki/File:Comparison radiated field magnitude of hwd to esd.svg, CC BY -SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/).",Electromagnetics_Vol2.pdf "Chapter 10 Antennas 10.1 How Antennas Radiate [m0201] An antenna is a tr ansducer; that is, a device which converts signals in one form into another form. In the case of an antenna, these two forms are (1) conductor-bound voltage and current signals and (2) electromagnetic waves. Traditional passive antennas are capable of this conversion in either direction. In this section, we consider the transmit case, in which a conductor-bound signal is converted into a radiating electromagnetic wave. Radiation from an antenna is due to the time-varying current that is excited by the bound electrical signal applied to the antenna terminals. Why ideal transmission lines don’t radiate. T o describe the process that allows an antenna to transmit, it is useful to first consider the scenario depicted in Figure 10.1. Here a sinusoidal source is c⃝ S. Lally CC BY -SA 4.0 Figure 10.1: T win lead transmission line terminated into an open circuit, giving rise to a standing wave.",Electromagnetics_Vol2.pdf "c⃝ S. Lally CC BY -SA 4.0 Figure 10.1: T win lead transmission line terminated into an open circuit, giving rise to a standing wave. applied to the input of an ideal twin lead transmission line. The spacing between conductors is much less than a wavelength, and the output of the transmission line is terminated into an open circuit. Without any additional information, we already know two things about the current on this transmission line. First, we know the current must be identically zero at the end of the transmission line. Second, we know the current on the two conductors comprising the transmission line must be related as indicated in Figure 10.1. That is, at any given position on the transmission line, the current on each conductor is equal in magnitude and flows in opposite directions. Further note that Figure 10.1 depicts only the situation over an interval of one-half of the period of the sinusoidal source. For the other half-period, the",Electromagnetics_Vol2.pdf "situation over an interval of one-half of the period of the sinusoidal source. For the other half-period, the direction of current will be in the direction opposite that depicted in Figure 10.1. In other words: The source is varying periodically , so the sign of the current is changing every half-period. Generally , time-varying currents give rise to radiation. Therefore, we should expect the currents depicted in Figure 10.1 might radiate. W e can estimate the radiation from the transmission line by interpreting the current as a collection of Hertzian dipoles. For a review of Hertzian dipoles, see Section 9.4; however, all we need to know to address the present problem is that superposition applies. That is, the total radiation is the sum of the radiation from the individual Hertzian dipoles. Once again looking back at Figure 10.1, note that each Hertzian dipole representing current on one conductor has an associated Hertzian dipole representing the current on",Electromagnetics_Vol2.pdf "Figure 10.1, note that each Hertzian dipole representing current on one conductor has an associated Hertzian dipole representing the current on the other conductor, and is only a tiny fraction of a wavelength distant. Furthermore, these pairs of Electromagnetics V ol. 2. c⃝ 2020 S.W . Ellingson CC BY SA 4.0. https://doi.org/10.21061/electromagnetics- vol- 2",Electromagnetics_Vol2.pdf "10.1. HOW ANTENNAS RADIA TE 167 Hertzian dipoles are identical in magnitude but opposite in sign. Therefore, the radiated field from any such pair of Hertzian dipoles is approximately zero at distances sufficiently far from the transmission line. Continuing to sum all such pairs of Hertzian dipoles, the radiated field remains approximately zero at distances sufficiently far from the transmission line. W e come to the following remarkable conclusion: The radiation from an ideal twin lead transmis- sion line with open circuit termination is negligi- ble at distances much greater than the separation between the conductors. Before proceeding, let us be clear about one thing: The situation at distances which are not large relative to separation between the conductors is quite different. This is because the Hertzian dipole pairs do not appear to be quite so precisely collocated at field points close to the transmission line. Subsequently the cancellation of fields from Hertzian dipole pairs is",Electromagnetics_Vol2.pdf "points close to the transmission line. Subsequently the cancellation of fields from Hertzian dipole pairs is less precise. The resulting sum fields are not negligible and depend on the separation between the conductors. For the present discussion, it suffices to restrict our attention to the simpler “far field” case. A simple antenna formed by modifying twin lead transmission line. Let us now consider a modification to the previous scenario, shown in Figure 10.2. In the new scenario, the ends of the twin lead are bent into right angles. This new section has an overall length which is much less than one-half wavelength. T o determine the current distribution on the modified section, we first note that the current must still be precisely zero at the ends of the conductors, but not necessarily at the point at which c⃝ S. Lally CC BY -SA 4.0 Figure 10.2: End of the twin lead transmission line fashioned into an electrically-short dipole (ESD). they are bent. Since the modified section is much",Electromagnetics_Vol2.pdf "fashioned into an electrically-short dipole (ESD). they are bent. Since the modified section is much shorter than one-half wavelength, the current distribution on this section must be very simple. In fact, the current distribution must be that of the electrically-short dipole (ESD), exhibiting magnitude which is maximum at the center and decreasing approximately linearly to zero at the ends. (See Section 9.5 for a review of the ESD.) Finally , we note that the current should be continuous at the junction between the unmodified and modified sections. Having established that the modified section exhibits the current distribution of an ESD, and having previously determined that the unmodified section of transmission line does not radiate, we conclude that this system radiates precisely as an ESD does. Note also that we need not interpret the ESD portion of the transmission line as a modification of the transmission line: Instead, we may view this system",Electromagnetics_Vol2.pdf "also that we need not interpret the ESD portion of the transmission line as a modification of the transmission line: Instead, we may view this system as an unmodified transmission line attached to an antenna, which in this case in an ESD. The general case. Although we developed this insight for the ESD specifically , the principle applies generally . That is, any antenna – not just dipoles – can be viewed as a structure that can support a current distribution that radiates. Elaborating: A transmitting antenna is a device that, when dri ven by an appropriate source, supports a time- varying distribution of current resulting in an electromagnetic wave that radiates away from the device. Although this may seem to be simply a restatement of the definition at the beginning of this section – and it is – we now see how this can happen, and also why transmission lines typically aren’t also antennas.",Electromagnetics_Vol2.pdf "168 CHAPTER 10. ANTENNAS 10.2 Power Radiated by an Electrically-Short Dipole [m0207] In this section, we determine the total power radiated by an electrically-short dipole (ESD) antenna in response to a sinusoidally-varying current applied to the antenna terminals. This result is both useful on its own and necessary as an intermediate result in determining the impedance of the ESD. The ESD is introduced in Section 9.5, and a review of that section is suggested before attempting this section. In Section 9.5, it is shown that the electric field intensity in the far field of a ˆz-oriented ESD located at the origin is ˜E(r) ≈ ˆθjηI0 · βL 8π (s in θ) e−jβr r (10.1) where r is the field point, I0 is a complex number representing the peak magnitude and phase of the sinusoidally-varying terminal current, Lis the length of the ESD, and βis the phase propagation constant 2π/λwhere λis wavelength. Note that L≪ λsince this is an ESD. Also note that Equation 10.1 is valid",Electromagnetics_Vol2.pdf "2π/λwhere λis wavelength. Note that L≪ λsince this is an ESD. Also note that Equation 10.1 is valid only for the far-field conditions r≫ Land r≫ λ, and presumes propagation in simple (linear, homogeneous, time-invariant, isotropic) media with negligible loss. Given that we have already limited scope to the far field, it is reasonable to approximate the electromagnetic field at each field point r as a plane wave propagating radially away from the antenna; i.e., in the ˆr direction. Under this assumption, the time-average power density is S(r) = ˆr ⏐⏐⏐˜E(r) ⏐⏐⏐ 2 2η (10.2) where ηis the wave impedance of the medium. The total power Prad radiated by the antenna is simply S(r) integrated over any closed surface S that encloses the antenna. Thus: Prad = ∮ S S(r) · ds (10.3) where ds is the outward-facing differential element of surface area. In other words, power density (W/m 2) integrated over an area (m 2) gives power (W). Anticipating that this problem will be addressed in",Electromagnetics_Vol2.pdf "integrated over an area (m 2) gives power (W). Anticipating that this problem will be addressed in spherical coordinates, we note that ds = ˆrr2 sin θdθdφ (10.4) and subsequently: Prad = ∫ π θ=0 ∫ 2π φ=0  ˆr ⏐⏐⏐˜E(r) ⏐⏐⏐ 2 2η  · (ˆrr2 sin θ dθdφ ) = 1 2η ∫ π θ=0 ∫ 2 π φ=0 ⏐⏐⏐˜E(r) ⏐⏐⏐ 2 r2 sin θdθdφ (10.5) Returning to Equation 10.1, we note: ⏐ ⏐ ⏐˜E(r) ⏐ ⏐ ⏐ 2 ≈ η2 |I0|2 (βL)2 64π2 (s in θ)2 1 r2 (10.6) Substitution into Equation 10.5 yields: Prad ≈ η|I0|2 (βL)2 128π2 ∫ π θ=0 ∫ 2 π φ=0 sin3 θdθdφ (10.7) Note that this may be factored into separate integrals over θand φ. The integral over φis simply 2π, leaving: Prad ≈ η|I0|2 (βL)2 64π ∫ π θ=0 s in3 θdθ (10.8) The remaining integral is equal to 4/3, leaving: Prad ≈ η|I0|2 (βL)2 48π (10.9) This completes the derivation, but it is useful to check units. Recall that βhas SI base units of rad/m, so βL has units of radians. This leaves η|I0|2, which has SI base units of Ω · A2 = W , as expected.",Electromagnetics_Vol2.pdf "units. Recall that βhas SI base units of rad/m, so βL has units of radians. This leaves η|I0|2, which has SI base units of Ω · A2 = W , as expected. The power radiated by an ESD in response to the current I0 applied at the terminals is given by Equation 10.9. Finally , it is useful to consider how various parameters affect the radiated power. First, note that the radiated power is proportional to the square of the terminal current. Second, note that the product βL = 2πL/λ is the electrical length of the antenna;",Electromagnetics_Vol2.pdf "10.3. POWER DISSIP A TED BY AN ELECTRICALL Y -SHOR T DIPOLE 169 that is, the length of the antenna expressed in radians, where 2πradians is one wavelength. Thus, we see that the power radiated by the antenna increases as the square of electrical length. Example 10.1. Po wer radiated by an ESD. A dipole is 10 cm in length and is surrounded by free space. A sinusoidal current having frequency 30 MHz and peak magnitude 100 mA is applied to the antenna terminals. What is the power radiated by the antenna? Solution. If no power is dissipated within the antenna, then all power is radiated. The wavelength λ= c/f ∼= 10 m, so L∼ = 0.01λ. This certainly qualifies as electrically-short, so we may use Equation 10.9. In the present problem, η∼= 376.7 Ω (the free space wave impedance), I0 = 100 mA, and β = 2π/λ ∼ = 0.628 rad/m. Thus, we find that the radiated power is ≈ 98.6 µW . 10.3 Power Dissipated by an Electrically-Short Dipole [m0208] The power delivered to an antenna by a source connected",Electromagnetics_Vol2.pdf "radiated power is ≈ 98.6 µW . 10.3 Power Dissipated by an Electrically-Short Dipole [m0208] The power delivered to an antenna by a source connected to the terminals is nominally radiated. However, it is possible that some fraction of the power delivered by the source will be dissipated within the antenna. In this section, we consider the dissipation due to the finite conductivity of materials comprising the antenna. Specifically , we determine the total power dissipated by an electrically-short dipole (ESD) antenna in response to a sinusoidally-varying current applied to the antenna terminals. (The ESD is introduced in Section 9.5, and a review of that section is suggested before attempting this section.) The result allows us to determine radiation efficiency and is a step toward determining the impedance of the ESD. Consider an ESD centered at the origin and aligned along the zaxis. In Section 9.5, it is shown that the current distribution is: ˜I(z) ≈ I0 ( 1 − 2 L|z| ) (10.10)",Electromagnetics_Vol2.pdf "along the zaxis. In Section 9.5, it is shown that the current distribution is: ˜I(z) ≈ I0 ( 1 − 2 L|z| ) (10.10) where I0 (SI base units of A) is a complex-valued constant indicating the maximum current magnitude and phase, and Lis the length of the ESD. This current distribution may be interpreted as a set of discrete very-short segments of constant-magnitude current (sometimes referred to as “Hertzian dipoles”). In this interpretation, the nth current segment is located at z= zn and has magnitude ˜I(zn). Now let us assume that the material comprising the ESD is a homogeneous good conductor. Then each segment exhibits the same resistance Rseg. Subsequently , the power dissipated in the nth segment is Pseg(zn) = 1 2 ⏐⏐⏐˜I(zn) ⏐⏐⏐ 2 Rseg (10.11) The segment resistance can be determined as follows. Let us assume that the wire comprising the ESD has circular cross-section of radius a. Since the wire is a good conductor, the segment resistance may be",Electromagnetics_Vol2.pdf "170 CHAPTER 10. ANTENNAS calculated using Equation 4.17 (Section 4.2, “Impedance of a Wire”): Rseg ≈ 1 2 √ µf πσ · ∆l a (10.12) where µis permeability , f is frequency , σis conductivity , and ∆l is the length of the segment. Substitution into Equation 10.11 yields: Pseg(zn) ≈ 1 4a √ µf πσ ⏐⏐ ⏐˜I(zn) ⏐ ⏐ ⏐ 2 ∆l (10.13) No w the total power dissipated in the antenna, Ploss, can be expressed as the sum of the power dissipated in each segment: Ploss ≈ N∑ n=1 [ 1 4a √ µf πσ ⏐⏐ ⏐˜I(zn) ⏐ ⏐ ⏐ 2 ∆l ] (10.14) where N is the number of segments. This may be rewritten as follows: Ploss ≈ 1 4a √ µf πσ N∑ n=1 ⏐ ⏐ ⏐˜I( zn) ⏐ ⏐ ⏐ 2 ∆l (10.15) Reducing ∆l to the differential length dz′, we may write this in the following integral form: Ploss ≈ 1 4a √ µf πσ ∫ +L/ 2 z′=−L/ 2 ⏐ ⏐⏐˜I( z′) ⏐⏐⏐ 2 dz′ (10.16) It is worth noting that the above expression applies to any straight wire antenna of length L. For the ESD specifically , the current distribution is given by Equation 10.10. Making the substitution:",Electromagnetics_Vol2.pdf "any straight wire antenna of length L. For the ESD specifically , the current distribution is given by Equation 10.10. Making the substitution: Ploss ≈ 1 4a √ µf πσ ∫ +L/ 2 z′=−L/ 2 ⏐⏐ ⏐ ⏐I0 ( 1 − 2 L|z′| )⏐ ⏐ ⏐ ⏐ 2 dz′ ≈ 1 4a √ µf πσ |I0|2 ∫ +L/ 2 z′=−L/ 2 ⏐ ⏐⏐⏐1 − 2 L|z′| ⏐ ⏐⏐⏐ 2 dz′ (10.17) The integral is straightforward to solve, albeit a bit tedious. The integral is found to be equal to L/3, so we obtain: Ploss ≈ 1 4a √ µf πσ |I0|2 · L 3 ≈ L 12a √ µf πσ |I0|2 (10.18) No w let us return to interpretation of the ESD as a circuit component. W e have found that applying the current I0 to the terminals results in the dissipated power indicated in Equation 10.18. A current source driving the ESD does not perceive the current distribution of the ESD nor does it perceive the varying power over the length of the ESD. Instead, the current source perceives only a net resistance Rloss such that Ploss = 1 2 |I0|2 Rlo ss (10.19) Comparing Equations 10.18 and 10.19, we find Rloss ≈ L 6a √ µf",Electromagnetics_Vol2.pdf "Rloss such that Ploss = 1 2 |I0|2 Rlo ss (10.19) Comparing Equations 10.18 and 10.19, we find Rloss ≈ L 6a √ µf πσ (10.20) The power dissipated within an ESD in response to a sinusoidal current I0 applied at the terminals is 1 2 |I0|2 Rlo ss where Rloss (Equation 10.20) is the resistance perceived by a source applied to the ESD’s terminals. Note that Rloss is not the impedance of the ESD. Rloss is merely the contribution of internal loss to the impedance of the ESD. The impedance of the ESD must also account for contributions from radiation resistance (an additional real-valued contribution) and energy storage (perceived as a reactance). These quantities are addressed in other sections of this book. Example 10.2. Po wer dissipated within an ESD. A dipole is 10 cm in length, 1 mm in radius, and is surrounded by free space. The antenna is comprised of aluminum having conductivity ≈ 3.7 × 107 S/m and µ≈ µ0. A sinusoidal current having frequency 30 MHz and peak",Electromagnetics_Vol2.pdf "comprised of aluminum having conductivity ≈ 3.7 × 107 S/m and µ≈ µ0. A sinusoidal current having frequency 30 MHz and peak magnitude 100 mA is applied to the antenna terminals. What is the power dissipated within this antenna? Solution. The wavelength λ= c/f ∼= 10 m, so L= 10 cm ∼= 0.01λ. This certainly qualifies as electrically-short, so we may use Equation 10.20. In the present problem, a= 1 mm and σ≈ 3.7 × 107 S/m. Thus, we",Electromagnetics_Vol2.pdf "10.4. REACT ANCE OF THE ELECTRICALL Y -SHOR T DIPOLE 171 find that the loss resistance Rlo ss ≈ 9.49 mΩ. Subsequently , the power dissipated within this antenna is Ploss = 1 2 |I0|2 Rlo ss ≈ 47.5 µW (10.21) W e conclude this section with one additional caveat: Whereas this section focuses on the limited conductivity of wire, other physical mechanisms may contribute to the loss resistance of the ESD. In particular, materials used to coat the antenna or to provide mechanical support near the terminals may potentially absorb and dissipate power that might otherwise be radiated. 10.4 Reactance of the Electrically-Short Dipole [m0210] For any given time-varying voltage appearing across the terminals of an electrically-short antenna, there will be a time-varying current that flows in response. The ratio of voltage to current is impedance. Just as a resistor, capacitor, or inductor may be characterized in terms of an impedance, any antenna may be characterized in terms of this impedance. The",Electromagnetics_Vol2.pdf "resistor, capacitor, or inductor may be characterized in terms of an impedance, any antenna may be characterized in terms of this impedance. The real-valued component of this impedance accounts for power which is radiated away from the antenna (Section 10.2) and dissipated within the antenna (Section 10.3). The imaginary component of this impedance – i.e., the reactance – typically represents energy storage within the antenna, in the same way that the reactance of a capacitor or inductor represents storage of electrical or magnetic energy , respectively . In this section, we determine the reactance of the electrically-short dipole (ESD). Reactance of a zero-length dipole. W e begin with what might seem initially to be an absurd notion: A dipole antenna having zero length. However, such a dipole is certainly electrically-short, and in fact serves as an extreme condition from which we can deduce some useful information. Consider Figure 10.3, which shows a zero-length",Electromagnetics_Vol2.pdf "as an extreme condition from which we can deduce some useful information. Consider Figure 10.3, which shows a zero-length dipole being driven by a source via a transmission line. It is immediately apparent that such a dipole is equivalent to an open circuit. So, the impedance of a zero-length dipole is equal to that of an open circuit. c⃝ S. Lally CC BY -SA 4.0 Figure 10.3: Transmission line terminated into a zero- length dipole, which is equivalent to an open circuit.",Electromagnetics_Vol2.pdf "172 CHAPTER 10. ANTENNAS What is the impedance of an open circuit? One might be tempted to say “infinite, ” since the current is zero independently of the voltage. However, we must now be careful to properly recognize the real and imaginary components of this infinite number, and signs of these components. In fact, the impedance of an open circuit is 0 − j∞. One way to confirm this is via basic transmission line theory; i.e., the input impedance of transmission line stubs. A more direct justification is as follows: The real part of the impedance is zero because there is no transfer of power into the termination. The magnitude of the imaginary part of the impedance must be infinite because the current is zero. The sign of the imaginary component is negative because the reflected current experiences a sign change (required to make the total current zero), whereas the reflected voltage does not experience a sign change (and so is not canceled at the terminals). Thus, the impedance of an open",Electromagnetics_Vol2.pdf "experience a sign change (and so is not canceled at the terminals). Thus, the impedance of an open circuit, and the zero-length dipole, is 0 − j∞. Reactance of a nearly-zero-length dipole. Let us now consider what happens as the length of the dipole increases from zero. Since such a dipole is short compared to a wavelength, the variation with length must be very simple. The reactance remains large and negative, but can only increase (become less negative) monotonically with increasing electrical length. This trend continues until the dipole is no longer electrically short. Thus, we conclude that the reactance of an ESD is always large and negative. The reactance of an ESD is very large and nega- ti ve, approaching the reactance of an open circuit termination as length decreases to zero. Note that this behavior is similar to that of a capacitor, whose impedance is also negative and increases toward zero with increasing frequency . Thus, the",Electromagnetics_Vol2.pdf "whose impedance is also negative and increases toward zero with increasing frequency . Thus, the reactance of an ESD is sometimes represented in circuit diagrams as a capacitor. However, the specific dependence of reactance on frequency is different from that of a capacitor (as we shall see in a moment), so this model is generally valid only for analysis at one frequency at time. An approximate expression for the reactance of an ESD. Sometimes it is useful to be able to estimate the reactance XA of an ESD. Although a derivation is beyond the scope of this text, a suitable expression is (see, e.g., Johnson (1993) in “ Additional References” at the end of this section): XA ≈ − 120 Ω πL/λ [ ln (L 2a ) − 1 ] (10.22) where Lis length and a≪ Lis the radius of the wire comprising the ESD. Note that this expression yields the expected behavior; i.e., XA → −∞ as L→ 0, and increases monotonically as Lincreases from zero. Example 10.3. Reactance of an ESD.",Electromagnetics_Vol2.pdf "the expected behavior; i.e., XA → −∞ as L→ 0, and increases monotonically as Lincreases from zero. Example 10.3. Reactance of an ESD. A dipole is 10 cm in length, 1 mm in radius, and is surrounded by free space. What is the reactance of this antenna at 30 MHz? Solution. The wavelength λ= c/f ∼= 10 m, so L= 10 cm ∼= 0.01λ. This certainly qualifies as electrically-short, so we may use Equation 10.22. Given a= 1 mm, we find the reactance XA ≈ − 11.1 kΩ . For what it’s worth, this antenna exhibits approximately the same reactance as a 0.47 pF capacitor at the same frequency . The reactance of the ESD is typically orders of magnitude larger than the real part of the impedance of the ESD. The reactance of the ESD is also typically very large compared to the characteristic impedance of typical transmission lines (usually 10s to 100s of ohms). This makes ESDs quite difficult to use in practical transmit applications. Additional Reading: • R.C. Johnson (Ed.), Antenna Systems Handbook",Electromagnetics_Vol2.pdf "ohms). This makes ESDs quite difficult to use in practical transmit applications. Additional Reading: • R.C. Johnson (Ed.), Antenna Systems Handbook (Ch. 4), McGraw-Hill, 1993.",Electromagnetics_Vol2.pdf "10.5. EQUIV ALENT CIRCUIT MODEL FOR TRANSMISSION; RADIA TION EFFICIENCY 173 10.5 Equivalent Circuit Model for T ransmission; Radiation Efficiency [m0202] A radio transmitter consists of a source which generates the electrical signal intended for transmission, and an antenna which converts this signal into a propagating electromagnetic wave. Since the transmitter is an electrical system, it is useful to be able to model the antenna as an equivalent circuit. From a circuit analysis point of view , it should be possible to describe the antenna as a passive one-port circuit that presents an impedance to the source. Thus, we have the following question: What is the equivalent circuit for an antenna which is transmitting? W e begin by emphasizing that the antenna is passive. That is, the antenna does not add power. Invoking the principle of conservation of power, there are only three possible things that can happen to power that is delivered to the antenna by the transmitter: 1",Electromagnetics_Vol2.pdf "three possible things that can happen to power that is delivered to the antenna by the transmitter: 1 • Power can be converted to a propagating electromagnetic wave. (The desired outcome.) • Power can be dissipated within the antenna. • Energy can be stored by the antenna, analogous to the storage of energy in a capacitor or inductor. W e also note that these outcomes can occur in any combination. T aking this into account, we model the antenna using the equivalent circuit shown in Figure 10.4. Since the antenna is passive, it is reasonable to describe it as an impedance ZA which is (by definition) the ratio of voltage ˜VA to current ˜IA at the terminals; i.e., ZA ≜ ˜VA ˜IA (10.23) 1 Note that “delivered” power means power accepted by the an- tenna. W e are not yet considering power reflected from the antenna due to impedance mismatch. In the phasor domain, ZA is a complex-valued quantity and therefore has, in general, a real-valued component and an imaginary component. W e may",Electromagnetics_Vol2.pdf "In the phasor domain, ZA is a complex-valued quantity and therefore has, in general, a real-valued component and an imaginary component. W e may identify those components using the power conservation argument made previously: Since the real-valued component must represent power transfer and the imaginary component must represent energy storage, we infer: ZA ≜ RA + jXA (10.24) where RA represents power transferred to the antenna, and XA represents energy stored by the antenna. Note that the energy stored by the antenna is being addressed in precisely the same manner that we address energy storage in a capacitor or an inductor; in all cases, as reactance. Further, we note that RA consists of components Rrad and Rloss as follows: ZA = Rrad + Rloss + jXA (10.25) where Rrad represents power transferred to the antenna and subsequently radiated, and Rloss represents power transferred to the antenna and subsequently dissipated. T o confirm that this model works as expected,",Electromagnetics_Vol2.pdf "represents power transferred to the antenna and subsequently dissipated. T o confirm that this model works as expected, consider what happens when a voltage is applied across the antenna terminals. The current ˜IA flows and the time-average power PA transferred to the c⃝ S. Lally CC BY -SA 4.0 Figure 10.4: Equivalent circuit for an antenna which is transmitting.",Electromagnetics_Vol2.pdf "174 CHAPTER 10. ANTENNAS antenna is PA = 1 2Re { ˜VA˜I∗ A } (10.26) where we have assumed peak (as opposed to root mean squared) units for voltage and current. Since ˜VA = ZA˜IA, we have: PA = 1 2Re { ( Rrad + Rloss + jXA) ˜IA˜I∗ A } (10.27) which reduces to: PA = 1 2 ⏐⏐ ⏐˜IA ⏐ ⏐ ⏐ 2 Rrad + 1 2 ⏐ ⏐ ⏐˜IA ⏐ ⏐ ⏐ 2 Rlo ss (10.28) As expected, the power transferred to the antenna is the sum of Prad ≜ 1 2 ⏐⏐ ⏐˜IA ⏐ ⏐ ⏐ 2 Rrad (10.29) representing power transferred to the radiating electromagnetic field, and Ploss ≜ 1 2 ⏐ ⏐ ⏐˜IA ⏐ ⏐ ⏐ 2 Rlo ss (10.30) representing power dissipated within the antenna. The reactance XA will play a role in determining ˜IA given ˜VA (and vice versa), but does not by itself account for disposition of power. Again, this is exactly analogous to the role played by inductors and capacitors in a circuit. The utility of this equivalent circuit formalism is that it allows us to treat the antenna in the same manner as any other component, and thereby facilitates analysis",Electromagnetics_Vol2.pdf "it allows us to treat the antenna in the same manner as any other component, and thereby facilitates analysis using conventional electric circuit theory and transmission line theory . For example: Given ZA, we know how to specify the output impedance ZS of the transmitter so as to minimize reflection from the antenna: W e would choose ZS = ZA, since in this case the voltage reflection coefficient would be Γ = ZA − ZS ZA + ZS = 0 (10.31) Alternati vely , we might specify ZS so as to maximize power transfer to the antenna: W e would choose ZS = Z∗ A; i.e., conjugate matching. In order to take full advantage of this formalism, we require values for Rrad, Rloss, and XA. These quantities are considered below . Radiation resistance. Rrad is referred to as radiation resistance. Equation 10.29 tells us that Rrad = 2Prad ⏐⏐ ⏐˜IA ⏐ ⏐ ⏐ −2 (10.32) This equation suggests the following procedure: W e apply current ˜IA to the antenna terminals, and then determine the total power Prad radiated from the",Electromagnetics_Vol2.pdf "apply current ˜IA to the antenna terminals, and then determine the total power Prad radiated from the antenna in response. For an example of this procedure, see Section 10.2 (“T otal Power Radiated by an Electrically-Short Dipole”). Given ˜IA and Prad, one may then use Equation 10.32 to determine Rrad. Loss resistance. Loss resistance represents the dissipation of power within the antenna, which is usually attributable to loss intrinsic to materials comprising or surrounding the antenna. In many cases, antennas are made from good conductors – metals, in particular – so that Rloss is very low compared to Rrad. For such antennas, loss is often so low compared to Rrad that Rloss may be neglected. In the case of the electrically-short dipole, Rloss is typically very small but Rrad is also very small, so both must be considered. In many other cases, antennas contain materials with substantially greater loss than metal. For example, a microstrip patch",Electromagnetics_Vol2.pdf "both must be considered. In many other cases, antennas contain materials with substantially greater loss than metal. For example, a microstrip patch antenna implemented on a printed circuit board typically has non-negligible Rloss because the dielectric material comprising the antenna exhibits significant loss. Antenna reactance. The reactance term jXA accounts for energy stored by the antenna. This may be due to reflections internal to the antenna, or due to energy associated with non-propagating electric and magnetic fields surrounding the antenna. The presence of significant reactance (i.e., |XA| comparable to or greater than |RA|) complicates efforts to establish the desired impedance match to the source. For an example, see Section 10.4 (“Reactance of the Electrically-Short Dipole”). Radiation efficiency . When Rloss is non-negligible, it is useful to characterize antennas in terms of their radiation efficiency erad, defined as the fraction of",Electromagnetics_Vol2.pdf "it is useful to characterize antennas in terms of their radiation efficiency erad, defined as the fraction of power which is radiated compared to the total power delivered to the antenna; i.e., erad ≜ Prad PA (10.33)",Electromagnetics_Vol2.pdf "10.6. IMPEDANCE OF THE ELECTRICALL Y -SHOR T DIPOLE 175 Using Equations 10.28–10.30, we see that this efficiency can be expressed as follows: erad = Rrad Rrad + Rl oss (10.34) Once again, the equivalent circuit formalism proves useful. Example 10.4. Impedance of an antenna. The total power radiated by an antenna is 60 mW when 20 mA (rms) is applied to the antenna terminals. The radiation efficiency of the antenna is known to be 70%. It is observed that voltage and current are in-phase at the antenna terminals. Determine (a) the radiation resistance, (b) the loss resistance, and (c) the impedance of the antenna. Solution. From the problem statement, Prad = 60 mW , ⏐⏐ ⏐˜IA ⏐ ⏐ ⏐= 20 mA (rms), and erad = 0.7. Also, the fact that voltage and current are in-phase at the antenna terminals indicates that XA = 0. From Equation 10.32, the radiation resistance is Rrad ≈ 2 · (60 mW) ⏐⏐√ 2 · 20 mA ⏐ ⏐2 = 150 Ω (10.35) Solving Equation 10.34 for the loss resistance, we find: Rloss = 1 − erad erad",Electromagnetics_Vol2.pdf "Rrad ≈ 2 · (60 mW) ⏐⏐√ 2 · 20 mA ⏐ ⏐2 = 150 Ω (10.35) Solving Equation 10.34 for the loss resistance, we find: Rloss = 1 − erad erad Rr ad ∼= 64.3 Ω (10.36) Since ZA = Rr ad + Rloss + jXA, we find ZA ∼ = 214.3 + j0 Ω . This will be the ratio of voltage to current at the antenna terminals regardless of the source current. 10.6 Impedance of the Electrically-Short Dipole [m0204] In this section, we determine the impedance of the electrically-short dipole (ESD) antenna. The physical theory of operation for the ESD is introduced in Section 9.5, and additional relevant aspects of the ESD antenna are addressed in Sections 10.1–10.4. The concept of antenna impedance is addressed in Section 10.5. Review of those sections is suggested before attempting this section. The impedance of any antenna may be expressed as ZA = Rrad + Rloss + jXA (10.37) where the real-valued quantities Rrad, Rloss, and XA represent the radiation resistance, loss resistance, and reactance of the antenna, respectively .",Electromagnetics_Vol2.pdf "represent the radiation resistance, loss resistance, and reactance of the antenna, respectively . Radiation resistance. The radiation resistance of any antenna can be expressed as: Rrad = 2Prad|I0|−2 (10.38) where |I0| is the magnitude of the current at the antenna terminals, and Prad is the resulting total power radiated. For an ESD (Section 10.2): Prad ≈ η|I0|2 (βL)2 48π (10.39) so Rr ad ≈ η(βL)2 24π (10.40) It is useful to have an alternative form of this expression in terms of wavelength λ. This is derived as follows. First, note: βL = 2π λ L= 2 πL λ (10.41) where L/λis the antenna length in units of wavelength. Substituting this expression into Equation 10.40: Rrad ≈ η ( 2πL λ )2 1 24π ≈ ηπ 6 (L λ )2 (10.42)",Electromagnetics_Vol2.pdf "176 CHAPTER 10. ANTENNAS Assuming free-space conditions, η∼= 376.7 Ω, which is ≈ 120πΩ. Subsequently , Rrad ≈ 20π2 (L λ )2 (10.43) This remarkably simple expression indicates that the radiation resistance of an ESD is very small (since L≪ λfor an ESD), but increases as the square of the length. At this point, a warning is in order. The radiation resistance of an “electrically-short dipole” is sometimes said to be 80π2 (L/λ)2; i.e., 4 times the right side of Equation 10.43. This higher value is not for a physically-realizable ESD, but rather for the Hertzian dipole (sometimes also referred to as an “ideal dipole”). The Hertzian dipole is an electrically-short dipole with a current distribution that has uniform magnitude over the length of the dipole.2 The Hertzian dipole is quite difficult to realize in practice, and nearly all practical electrically-short dipoles exhibit a current distribution that is closer to that of the ESD. The ESD has a",Electromagnetics_Vol2.pdf "electrically-short dipoles exhibit a current distribution that is closer to that of the ESD. The ESD has a current distribution which is maximum in the center and goes approximately linearly to zero at the ends. The factor-of-4 difference in the radiation resistance of the Hertzian dipole relative to the (practical) ESD is a straightforward consequence of the difference in the current distributions. Loss resistance. The loss resistance of the ESD is derived in Section 10.3 and is found to be Rloss ≈ L 6a √ µf πσ (10.44) where a , µ, and σare the radius, permeability , and conductivity of the wire comprising the antenna, and f is frequency . Reactance. The reactance of the ESD is addressed in Section 10.4. A suitable expression for this reactance is (see, e.g., Johnson (1993) in “ Additional References” at the end of this section): XA ≈ − 120 Ω πL/λ [ ln (L 2a ) − 1 ] (10.45) 2 See Section 9.4 for additional information about the Hertzian dipole. where a≪ Lis assumed.",Electromagnetics_Vol2.pdf "XA ≈ − 120 Ω πL/λ [ ln (L 2a ) − 1 ] (10.45) 2 See Section 9.4 for additional information about the Hertzian dipole. where a≪ Lis assumed. Example 10.5. Impedance of an ESD. A thin, straight dipole antenna operates at 30 MHz in free space. The length and radius of the dipole are 1 m and 1 mm respectively . The dipole is comprised of aluminum having conductivity ≈ 3.7 × 107 S/m and µ≈ µ0. What is the impedance and radiation efficiency of this antenna? Solution. The free-space wavelength at f = 30 MHz is λ= c/f ∼= 10 m. Therefore, L∼ = 0.1λ, and this is an ESD. Since this is an ESD, we may compute the radiation resistance using Equation 10.43, yielding Rrad ≈ 1.97 Ω. The radius a= 1 mm and σ≈ 3.7 × 107 S/m; thus, we find that the loss resistance Rloss ≈ 94.9 mΩ using Equation 10.44. Using Equation 10.45, the reactance is found to be XA ≈ − 1991.8 Ω. The impedance of this antenna is therefore ZA = Rrad + Rloss + jXA ≈ 2.1 − j1991.8 Ω (10.46) and the radiation efficiency of this antenna is",Electromagnetics_Vol2.pdf "antenna is therefore ZA = Rrad + Rloss + jXA ≈ 2.1 − j1991.8 Ω (10.46) and the radiation efficiency of this antenna is erad = Rrad Rrad + Rl oss ≈ 95.4% (10.47) In the preceding example, the radiation efficiency is a respectable 95.4%. However, the real part of the impedance of the ESD is much less than the characteristic impedance of typical transmission lines (typically 10s to 100s of ohms). Another problem is that the reactance of the ESD is very large. Some form of impedance matching is required to efficiently transfer power from a transmitter or transmission line to this form of antenna. Failure to do so will result in reflection of a large fraction of the power incident on antenna terminals. A common solution is to insert series inductance to reduce – nominally , cancel – the negative reactance of the ESD. In the preceding example, about 10 µH would be needed. The remaining mismatch in the real-valued components of impedance is then relatively easy to mitigate using",Electromagnetics_Vol2.pdf "example, about 10 µH would be needed. The remaining mismatch in the real-valued components of impedance is then relatively easy to mitigate using common “real-to-real” impedance matching",Electromagnetics_Vol2.pdf "10.7. DIRECTIVITY AND GAIN 177 techniques. Additional Reading: • R.C. Johnson (Ed.), Antenna Systems Handbook (Ch. 4), McGraw-Hill, 1993. 10.7 Directivity and Gain [m0203] A transmitting antenna does not radiate power uniformly in all directions. Inevitably more power is radiated in some directions than others. Directivity quantifies this behavior. In this section, we introduce the concept of directivity and the related concepts of maximum directivity and antenna gain. Consider an antenna located at the origin. The power radiated in a single direction (θ,φ) is formally zero. This is because a single direction corresponds to a solid angle of zero, which intercepts an area of zero at any given distance from the antenna. Since the power flowing through any surface having zero area is zero, the power flowing in a single direction is formally zero. Clearly we need a different metric of power in order to develop a sensible description of the spatial distribution of power flow .",Electromagnetics_Vol2.pdf "zero. Clearly we need a different metric of power in order to develop a sensible description of the spatial distribution of power flow . The appropriate metric is spatial power density; that is, power per unit area, having SI base units of W/m 2. Therefore, directivity is defined in terms of spatial power density in a particular direction, as opposed to power in a particular direction. Specifically , directivity in the direction (θ,φ) is: D(θ,φ) ≜ S(r) Sav e(r) (10.48) In this expression, S(r) is the power density at (r,θ,φ ); i.e., at a distance rin the direction (θ,φ). Save(r) is the average power density at that distance; that is, S(r) averaged over all possible directions at distance r. Since directivity is a ratio of power densities, it is unitless. Summarizing: Directivity is ratio of power density in a specified direction to the power density averaged over all directions at the same distance from the antenna. Despite Equation 10.48, directivity does not depend",Electromagnetics_Vol2.pdf "to the power density averaged over all directions at the same distance from the antenna. Despite Equation 10.48, directivity does not depend on the distance from the antenna. T o be specific, directivity is the same at every distance r. Even though the numerator and denominator of Equation 10.48 both vary with r, one finds that the distance dependence always cancels because power density and average power density are both",Electromagnetics_Vol2.pdf "178 CHAPTER 10. ANTENNAS proportional to r−2. This is a key point: Directivity is a convenient way to characterize an antenna because it does not change with distance from the antenna. In general, directivity is a function of direction. However, one is often not concerned about all directions, but rather only the directivity in the direction in which it is maximum. In fact it is quite common to use the term “directivity” informally to refer to the maximum directivity of an antenna. This is usually what is meant when the directivity is indicated to be a single number; in any event, the intended meaning of the term is usually clear from context. Example 10.6. Directi vity of the electrically-short dipole. An electrically-short dipole (ESD) consists of a straight wire having length L≪ λ/2. What is the directivity of the ESD? Solution. The field radiated by an ESD is derived in Section 9.5. In that section, we find that the electric field intensity in the far field of a",Electromagnetics_Vol2.pdf "Solution. The field radiated by an ESD is derived in Section 9.5. In that section, we find that the electric field intensity in the far field of a ˆz-oriented ESD located at the origin is: ˜E(r) ≈ ˆθjηI0 · βL 8π (s in θ) e−jβr r (10.49) where I0 represents the magnitude and phase of the current applied to the terminals, ηis the wave impedance of the medium, and β = 2π/λ. In Section 10.2, we find that the power density of this field is: S(r) ≈ η|I0|2 (βL)2 128π2 (s in θ)2 1 r2 (10.50) and we subsequently find that the total power radiated is: Prad ≈ η|I0|2 (βL)2 48π (10.51) The average power density Save is simply the total power divided by the area of a sphere centered on the ESD. Let us place this sphere at distance r, with r≫ Land r≫ λas required for the validity of Equations 10.49 and 10.50. Then: Sav e = Prad 4πr2 ≈ η| I0|2 (βL)2 192π2r2 (10.52) Finally the directivity is determined by applying the definition: D(θ,φ) ≜ S(r) Sav e(r) (10.53) ≈ 1.5 (sin θ)2 (10.54) The",Electromagnetics_Vol2.pdf "I0|2 (βL)2 192π2r2 (10.52) Finally the directivity is determined by applying the definition: D(θ,φ) ≜ S(r) Sav e(r) (10.53) ≈ 1.5 (sin θ)2 (10.54) The maximum directivity occurs in the θ= π/2 plane. Therefore, the maximum directivity is 1.5 , meaning the maximum power density is 1.5 times greater than the power density averaged over all directions. Since directivity is a unitless ratio, it is common to express it in decibels. For example, the maximum directivity of the ESD in the preceding example is 10 log10 1.5 ∼= 1.76 dB. (Note “10 log 10” here since directivity is the ratio of power-like quantities.) Gain. The gain G(θ,φ) of an antenna is its directivity modified to account for loss within the antenna. Specifically: G(θ,φ) ≜ S(r) for actual antenna Sav e(r) for identical but lossless antenna (10.55) In this equation, the numerator is the actual power density radiated by the antenna, which is less than the nominal power density due to losses within the",Electromagnetics_Vol2.pdf "density radiated by the antenna, which is less than the nominal power density due to losses within the antenna. The denominator is the average power density for an antenna which is identical, but lossless. Since the actual antenna radiates less power than an identical but lossless version of the same antenna, gain in any particular direction is always less than directivity in that direction. Therefore, an equivalent definition of antenna gain is G(θ,φ) ≜ eradD(θ,φ) (10.56) where erad is the radiation efficiency of the antenna (Section 10.5). Gain is directivity times radiation efficiency; that is, directivity modified to account for loss within the antenna.",Electromagnetics_Vol2.pdf "10.8. RADIA TION P A TTERN 179 The receive case. T o conclude this section, we make one additional point about directivity , which applies equally to gain. The preceding discussion has presumed an antenna which is radiating; i.e., transmitting. Directivity can also be defined for the receive case, in which it quantifies the effectiveness of the antenna in converting power in an incident wave to power in a load attached to the antenna. Receive directivity is formally introduced in Section 10.13 (“Effective Aperture”). When receive directivity is defined as specified in Section 10.13, it is equal to transmit directivity as defined in this section. Thus, it is commonly said that the directivity of an antenna is the same for receive and transmit. Additional Reading: • “Directivity” on Wikipedia. 10.8 Radiation Pattern [m0205] The radiation pattern of a transmitting antenna describes the magnitude and polarization of the field radiated by the antenna as a function of angle relative",Electromagnetics_Vol2.pdf "a transmitting antenna describes the magnitude and polarization of the field radiated by the antenna as a function of angle relative to the antenna. A pattern may also be defined for a receiving antenna, however, we defer discussion of the receive case to a later section. The concept of radiation pattern is closely related to the concepts of directivity and gain (Section 10.7). The principal distinction is the explicit consideration of polarization. In many applications, the polarization of the field radiated by a transmit antenna is as important as the power density radiated by the antenna. For example, a radio communication link consists of an antenna which is transmitting separated by some distance from an antenna which is receiving. Directivity determines the power density delivered to the receive antenna, but the receive antenna must be co-polarized with the arriving wave in order to capture all of this power. The radiation pattern concept is perhaps best",Electromagnetics_Vol2.pdf "co-polarized with the arriving wave in order to capture all of this power. The radiation pattern concept is perhaps best explained by example. The simplest antenna encountered in common practice is the electrically-short dipole (ESD), which consists of a straight wire of length Lthat is much less than one-half of a wavelength. In Section 9.5, it is shown that the field radiated by an ESD which is located at the origin and aligned along the z-axis is: ˜E(r) ≈ ˆθjηI0 · βL 8π (s in θ) e−jβr r (10.57) where I0 represents the magnitude and phase of the current applied to the terminals, ηis the wave impedance of the medium, and β = 2π/λ is the phase propagation constant of the medium. Note that the reference direction of the electric field is in the ˆθ direction; therefore, a receiver must be ˆθ-polarized relative to the transmitter’s coordinate system in order to capture all available power. A receiver which is not fully ˆθ-polarized will capture less power. In the",Electromagnetics_Vol2.pdf "to capture all available power. A receiver which is not fully ˆθ-polarized will capture less power. In the extreme, a receiver which is ˆφ-polarized with respect to the transmitter’s coordinate system will capture zero power. Thus, for the ˆz-oriented ESD, we refer to the ˆθ-polarization of the transmitted field as",Electromagnetics_Vol2.pdf "180 CHAPTER 10. ANTENNAS “co-polarized” or simply “co-pol, ” and the ˆφ-polarization of the transmitted field as “cross-pol. ” At this point, the reader may wonder what purpose is served by defining cross polarization, since the definition given above seems to suggest that cross-pol should always be zero. In common engineering practice, cross-pol is non-zero when co-pol is different from the intended or nominal polarization of the field radiated by the antenna. In the case of the ESD, we observe that the electric field is always ˆθ-polarized, and therefore we consider that to be the nominal polarization. Since the actual polarization of the ESD in the example is precisely the same as the nominal polarization of the ESD, the cross-pol of the ideal ESD is zero. If, on the other hand, we arbitrarily define ˆθto be the nominal polarization and apply this definition to a different antenna that does not produce a uniformly ˆθ-polarized electric field, then we observe",Electromagnetics_Vol2.pdf "definition to a different antenna that does not produce a uniformly ˆθ-polarized electric field, then we observe non-zero cross-pol. Cross-pol is similarly used to quantify effects due to errors in position or orientation, or due to undesired modification of the field due to materials (e.g., feed or mounting structures) near the transmit antenna. Summarizing: Co-pol is commonly defined to be the intended or nominal polarization for a particular applica- tion, which is not necessarily the actual polariza- tion radiated by the antenna under consideration. Cross-pol measures polarization in the orthogo- nal plane; i.e., deviation from the presumed co- pol. Returning to the ESD: Since ˜E(r) depends only on θ and not φ, the co-pol pattern is the same in any plane that contains the zaxis. W e refer to any such plane as the E-plane. In general: The E-plane is any plane in which the nominal or intended vector ˜E lies. Since the ESD is ˆθ-polarized, the E-plane pattern of the ESD is simply:",Electromagnetics_Vol2.pdf "The E-plane is any plane in which the nominal or intended vector ˜E lies. Since the ESD is ˆθ-polarized, the E-plane pattern of the ESD is simply: ⏐⏐⏐˜E(r) ⏐⏐⏐≈ ηI0 · βL 8π (s in θ) 1 r (10.58) This pattern is shown in Figure 10.5. Equation 10.58 is referred to as an unnormalized c⃝ S. Lally CC BY -SA 4.0 Figure 10.5: E-plane co-pol pattern for the ˆz-oriented ESD. In the unnormalized pattern scaling, the dashed circle indicates the maximum value of Equation 10.58. pattern. The associated normalized pattern is addressed later in this section. Similarly , we define the H-plane as follows: The H-plane is any plane in which the nominal or intended vector ˜H lies, and so is perpendicular to both the E-plane and the direction of propagation. In the case of the ESD, the one and only H-plane is the z= 0 plane. The H-plane pattern is shown in Figure 10.6. It is often useful to normalize the pattern, meaning that we scale the pattern so that its maximum",Electromagnetics_Vol2.pdf "Figure 10.6. It is often useful to normalize the pattern, meaning that we scale the pattern so that its maximum magnitude corresponds to a convenient value. There are two common scalings. One common scaling sets the maximum value of the pattern equal to 1, and is therefore independent of source magnitude and distance. This is referred to as the normalized pattern. The normalized co-pol pattern can be defined as follows: F(θ,φ) ≜ ⏐⏐ ⏐ˆe · ˜E(r) ⏐ ⏐ ⏐ ⏐⏐⏐ˆe · ˜E(r) ⏐⏐⏐ max (10.59) where ˆe is the co-pol reference direction, and the",Electromagnetics_Vol2.pdf "10.8. RADIA TION P A TTERN 181 c⃝ S. Lally CC BY -SA 4.0 Figure 10.6: H-plane co-pol pattern for the ˆz-oriented ESD. In the unnormalized pattern scaling, the radius of the circle is the maximum value of Equation 10.58. denominator is the maximum value of the electric field at distance r. A normalized pattern is scaled to a maximum magnitude of 1, using the definition expressed in Equation 10.59. Note that the value of ris irrelevant, since numerator and denominator both scale with rin the same way . Thus, the normalized pattern, like directivity , does not change with distance from the antenna. For the ESD, ˆe = ˆθ, so the normalized co-pol pattern is: F(θ,φ) = ⏐⏐ ⏐ˆθ· ˜E(r) ⏐ ⏐ ⏐ ⏐ ⏐⏐ˆθ· ˜E(r) ⏐⏐⏐ max (ESD) (10.60) which yields simply F(θ,φ) ≈ sin θ (ESD) (10.61) Thus, the E-plane normalized co-pol pattern of the ESD is Figure 10.5 where the radius of the maximum value circle is equal to 1, which is 0 dB. Similarly , the H-plane normalized co-pol pattern of the ESD is",Electromagnetics_Vol2.pdf "value circle is equal to 1, which is 0 dB. Similarly , the H-plane normalized co-pol pattern of the ESD is Figure 10.6 where the radius of the circle is equal to 1 (0 dB). c⃝ T . Truckle CC BY -SA 4.0 (modified) Figure 10.7: Co-pol pattern typical of a highly direc- tional antenna, such as a yagi. The other common scaling for patterns sets the maximum value equal to maximum directivity . Directivity is proportional to power density , which is proportional to ⏐⏐ ⏐˜E(r) ⏐ ⏐ ⏐ 2 . Therefore, this “directivity normalized” pattern can be expressed as: Dmax|F(θ,φ)|2 (10.62) where Dmax is the directivity in whichever direction it is maximum. For the ESD considered previously , Dmax = 1.5 (Section 10.7). Therefore, the co-pol pattern of the ESD using this particular scaling is 1.5 sin2 θ (ESD) (10.63) Thus, the E-plane co-pol pattern of the ESD using this scaling is similar to Figure 10.5, except that it is squared in magnitude and the radius of the maximum",Electromagnetics_Vol2.pdf "scaling is similar to Figure 10.5, except that it is squared in magnitude and the radius of the maximum value circle is equal to 1.5, which is 1.76 dB. The H-plane co-pol pattern of the ESD, using this scaling, is Figure 10.6 where the radius of the circle is equal to 1.5 (1.76 dB). Pattern lobes. Nearly all antennas in common use exhibit directivity that is greater than that of the ESD. The patterns of these antennas subsequently exhibit more complex structure. Figure 10.7 shows an example. The region around the direction of maximum directivity is referred to as the main lobe.",Electromagnetics_Vol2.pdf "182 CHAPTER 10. ANTENNAS c⃝ S. Lally CC BY -SA 4.0 Figure 10.8: Half-power beamwidth (HPBW). The main lobe is bounded on each side by a null, where the magnitude reaches a local minimum, perhaps zero. Many antennas also exhibit a lobe in the opposite direction, known as a backlobe. (Many other antennas exhibit a null in this direction.) Lobes between the main lobe and the backlobe are referred to as sidelobes. Other commonly-used pattern metrics include first sidelobe level, which is the ratio of the maximum magnitude of the sidelobe closest to the main lobe to that of the main lobe; and front-to-back ratio, which is the ratio of the maximum magnitude of the backlobe to that of the main lobe. When the main lobe is narrow , it is common to characterize the pattern in terms of half-power beamwidth (HPBW). This is shown in Figure 10.8. HPBW is the width of the main lobe measured between two points at which the directivity is one-half its maximum value. As a pattern metric,",Electromagnetics_Vol2.pdf "HPBW is the width of the main lobe measured between two points at which the directivity is one-half its maximum value. As a pattern metric, HPBW depends on the plane in which it is measured. In particular, HPBW may be different in the E- and H-planes. For example, the E-plane HPBW of the ESD is found to be 90◦, whereas the H-plane HPBW is undefined since the pattern is constant in the H-plane. Omnidirectional and isotropic antennas. The ESD is an example of an omnidirectional antenna. An omnidirectional antenna is an antenna whose pattern magnitude is nominally constant in a plane containing the maximum directivity . For the ESD, this plane is the H-plane, so the ESD is said to be omnidirectional in the H-plane. The term “omnidirectional” does not indicate constant pattern in all directions. (In fact, note that the ESD exhibits pattern nulls in two directions.) An omnidirectional antenna, such as the ESD, ex- hibits constant and nominally maximum directiv- ity in one plane.",Electromagnetics_Vol2.pdf "directions.) An omnidirectional antenna, such as the ESD, ex- hibits constant and nominally maximum directiv- ity in one plane. An antenna whose pattern is uniform in all directions is said to be isotropic. No physically-realizable antenna is isotropic; in fact, the ESD is about as close as one can get. Nevertheless, the “isotropic antenna” concept is useful as a standard against which other antennas can be quantified. Since the pattern of an isotropic antenna is constant with direction, the power density radiated by such an antenna in any direction is equal to the power density averaged over all directions. Thus, the directivity of an isotropic antenna is exactly 1. The directivity of any other antenna may be expressed in units of “dBi, ” which is simply dB relative to that of an isotropic antenna. For example, the maximum directivity of the ESD is 1.5, which is 10 log10 (1.5/1) = 1.76 dBi. Summarizing: An isotropic antenna exhibits constant directiv-",Electromagnetics_Vol2.pdf "which is 10 log10 (1.5/1) = 1.76 dBi. Summarizing: An isotropic antenna exhibits constant directiv- ity in every direction. Such an antenna is not physically-realizable, but is nevertheless useful as a baseline for describing other antennas. Additional Reading: • “Radiation pattern” on Wikipedia.",Electromagnetics_Vol2.pdf "10.9. EQUIV ALENT CIRCUIT MODEL FOR RECEPTION 183 10.9 Equivalent Circuit Model for Reception [m0206] In this section, we begin to address antennas as de vices that convert incident electromagnetic waves into potentials and currents in a circuit. It is convenient to represent this process in the form of a Th´evenin equivalent circuit. The particular circuit addressed in this section is shown in Figure 10.9. The circuit consists of a voltage source ˜VOC and a series impedance ZA. The source potential ˜VOC is the potential at the terminals of the antenna when there is no termination; i.e., when the antenna is open-circuited. The series impedance ZA is the output impedance of the circuit, and so determines the magnitude and phase of the current at the terminals once a load is connected. Given ˜VOC and the current through the equivalent circuit, it is possible to determine the power delivered to the load. Thus, this model is quite useful, but only if we are able to",Electromagnetics_Vol2.pdf "determine the power delivered to the load. Thus, this model is quite useful, but only if we are able to determine ˜VOC and ZA. This section provides an informal derivation of these quantities that is sufficient to productively address the subsequent important topics of effective aperture and impedance matching of receive antennas. 3 V ector effective length. With no derivation required, we can deduce the following about ˜VOC: • ˜VOC must depend on the incident electric field 3 Formal derivations of these quantities are provided in subse- quent sections. The starting point is the section on reciprocity . c⃝ S. Lally, CC BY -SA 4.0 (modified) Figure 10.9: Th ´evenin equivalent circuit for an an- tenna in the presence of an incident electromagnetic wave. intensity ˜Ei. Presumably the relationship is linear, so ˜VOC is proportional to the magnitude of ˜Ei. • Since ˜Ei is a vector whereas ˜VOC is a scalar, there must be some vector le for which ˜VOC = ˜Ei · le (10.64)",Electromagnetics_Vol2.pdf "of ˜Ei. • Since ˜Ei is a vector whereas ˜VOC is a scalar, there must be some vector le for which ˜VOC = ˜Ei · le (10.64) • Since ˜Ei has SI base units of V/m and ˜VOC has SI base units of V , le must have SI base units of m; i.e., length. • W e expect that ˜VOC increases as the size of the antenna increases, so the magnitude of le likely increases with the size of the antenna. • The direction of le must be related to the orientation of the incident electric field relative to that of the antenna, since this is clearly important yet we have not already accounted for this. It may seem at this point that le is unambiguously determined, and we need merely to derive its value. However, this is not the case. There are in fact multiple unique definitions of le that will reduce the vector ˜Ei to the observed scalar ˜VOC via Equation 10.64. In this section, we shall employ the most commonly-used definition, in which le is referred to as vector effective length. Following this",Electromagnetics_Vol2.pdf "most commonly-used definition, in which le is referred to as vector effective length. Following this definition, the scalar part le of le = ˆlle is commonly referred to as any of the following: effective length (the term used in this book), effective height, or antenna factor. In this section, we shall merely define vector effective length, and defer a formal derivation to Section 10.11. In this definition, we arbitrarily set ˆl, the real-valued unit vector indicating the direction of le, equal to the direction in which the electric field transmitted from this antenna would be polarized in the far field. For example, consider a ˆz-oriented electrically-short dipole (ESD) located at the origin. The electric field transmitted from this antenna would have only a ˆθ component, and no ˆφcomponent (and certainly no ˆr component). Thus, ˆl = ˆθin this case. Applying this definition, ˜Ei · ˆl yields the scalar component of ˜Ei that is co-polarized with electric",Electromagnetics_Vol2.pdf "component). Thus, ˆl = ˆθin this case. Applying this definition, ˜Ei · ˆl yields the scalar component of ˜Ei that is co-polarized with electric field radiated by the antenna when transmitting. Now",Electromagnetics_Vol2.pdf "184 CHAPTER 10. ANTENNAS le is uniquely defined to be the factor that converts this component into ˜VOC. Summarizing: The vector effective length le = ˆlle is defined as follows: ˆl is the real-valued unit vector cor- responding to the polarization of the electric field that would be transmitted from the antenna in the far field. Subsequently , the effective length le is le ≜ ˜VOC ˜Ei · ˆl (10.65) where ˜VO C is the open-circuit potential induced at the antenna terminals in response to the inci- dent electric field intensity ˜Ei. While this definition yields an unambiguous value for le, it is not yet clear what that value is. For most antennas, effective length is quite difficult to determine directly , and one must instead determine effective length indirectly from the transmit characteristics via reciprocity . This approach is relatively easy (although still quite a bit of effort) for thin dipoles, and is presented in Section 10.11. T o provide an example of how effective length works",Electromagnetics_Vol2.pdf "thin dipoles, and is presented in Section 10.11. T o provide an example of how effective length works right away , consider the ˆz-oriented ESD described earlier in this section. Let the length of this ESD be L. Let ˜Ei be a ˆθ-polarized plane wave arriving at the ESD. The ESD is open-circuited, so the potential induced in its terminals is ˜VOC. One observes the following: • When ˜Ei arrives from anywhere in the θ= π/2 plane (i.e., broadside to the ESD), ˜Ei points in the −ˆz direction, and we find that le ≈ L/2. It should not be surprising that le is proportional to L; this expectation was noted earlier in this section. • When ˜Ei arrives from the directions θ= 0 or θ= π– i.e., along the axis of the ESD – ˜Ei is perpendicular to the axis of the ESD. In this case, we find that le equals zero. T aken together, these findings suggest that le should contain a factor of sin θ. W e conclude that the vector effective length for a ˆz-directed ESD of length Lis le ≈ ˆθL 2 sin θ (ESD) (10.66)",Electromagnetics_Vol2.pdf "contain a factor of sin θ. W e conclude that the vector effective length for a ˆz-directed ESD of length Lis le ≈ ˆθL 2 sin θ (ESD) (10.66) Example 10.7. Potential induced in an ESD. A thin straight dipole of length 10 cm is located at the origin and aligned with the z-axis. A plane wave is incident on the dipole from the direction (θ= π/4,φ = π/2). The frequency of the wave is 30 MHz. The magnitude of the incident electric field is 10 µV/m (rms). What is the magnitude of the induced open-circuit potential when the electric field is (a) ˆθ-polarized and (b) ˆφ-polarized? Solution. The wavelength in this example is c/f ∼= 10 m, so this dipole is electrically-short. Using Equation 10.66: le ≈ ˆθ10 cm 2 sin π 4 ≈ ˆθ(3 .54 cm) Thus, the effective length le = 3.54 cm. When the electric field is ˆθ-polarized, the magnitude of the induced open-circuit voltage is ⏐⏐⏐˜VOC ⏐⏐⏐= ⏐⏐⏐˜Ei · le ⏐⏐⏐ ≈ (10 µV/m) ˆθ· ˆθ(3.54 cm) ≈ 354 nV rms (a) When the electric field is ˆφ-polarized: ⏐⏐⏐˜VOC",Electromagnetics_Vol2.pdf "⏐⏐⏐˜VOC ⏐⏐⏐= ⏐⏐⏐˜Ei · le ⏐⏐⏐ ≈ (10 µV/m) ˆθ· ˆθ(3.54 cm) ≈ 354 nV rms (a) When the electric field is ˆφ-polarized: ⏐⏐⏐˜VOC ⏐⏐⏐≈ (10 µV/m) ˆφ· ˆθ(3.54 cm) ≈ 0 (b) This is because the polarization of the incident electric field is orthogonal to that of the ESD. In fact, the answer to part (b) is zero for any angle of incidence (θ,φ). Output impedance. The output impedance ZA is somewhat more difficult to determine without a formal derivation, which is presented in Section 10.12. For the purposes of this section, it suffices to jump directly to the result:",Electromagnetics_Vol2.pdf "10.9. EQUIV ALENT CIRCUIT MODEL FOR RECEPTION 185 The output impedance ZA of the equivalent cir- cuit for an antenna in the receive case is equal to the input impedance of the same antenna in the transmit case. This remarkable fact is a consequence of the reciprocity property of antenna systems, and greatly simplifies the analysis of receive antennas. Now a demonstration of how the antenna equivalent circuit can be used to determine the power delivered by an antenna to an attached electrical circuit: Example 10.8. Po wer captured by an ESD. Continuing with part (a) of Example 10.7: If this antenna is terminated into a conjugate-matched load, then what is the power delivered to that load? Assume the antenna is lossless. Solution. First, we determine the impedance ZA of the equivalent circuit of the antenna. This is equal to the input impedance of the antenna in transmission. Let RA and XA be the real and imaginary parts of this impedance; i.e.,",Electromagnetics_Vol2.pdf "equal to the input impedance of the antenna in transmission. Let RA and XA be the real and imaginary parts of this impedance; i.e., ZA = RA + jXA. Further, RA is the sum of the radiation resistance Rrad and the loss resistance. The loss resistance is zero because the antenna is lossless. Since this is an ESD: Rrad ≈ 20π2 (L λ )2 (10.67) Therefore, RA = Rr ad ≈ 4.93 mΩ. W e do not need to calculate XA, as will become apparent in the next step. A conjugate-matched load has impedance Z∗ A, so the potential ˜VL across the load is ˜VL = ˜VOC Z∗ A ZA + Z∗ A = ˜VOC Z∗ A 2RA (10.68) The current ˜IL through the load is ˜IL = ˜VOC ZA + Z∗ A = ˜VOC 2RA (10.69) T aking ˜VOC as an RMS quantity , the power PL delivered to the load is PL = Re { VLI∗ L} = ⏐⏐ ⏐˜VOC ⏐ ⏐ ⏐ 2 4RA (10.70) In part (a) of Example 10.7, ⏐ ⏐ ⏐˜VOC ⏐ ⏐ ⏐is found to be ≈ 354 nV rms, so PL ≈ 6.33 pW . Additional Reading: • “Th ´evenin’s Theorem” on Wikipedia. • W .L. Stutzman & G.A. Thiele, Antenna Theory",Electromagnetics_Vol2.pdf "≈ 354 nV rms, so PL ≈ 6.33 pW . Additional Reading: • “Th ´evenin’s Theorem” on Wikipedia. • W .L. Stutzman & G.A. Thiele, Antenna Theory and Design, 3rd Ed., Wiley , 2012. Sec. 4.2 (“Receiving Properties of Antennas”).",Electromagnetics_Vol2.pdf "186 CHAPTER 10. ANTENNAS 10.10 Reciprocity [m0214] The term “reciprocity” refers to a class of theorems that relate the inputs and outputs of a linear system to those of an identical system in which the inputs and outputs are swapped. The importance of reciprocity in electromagnetics is that it simplifies problems that would otherwise be relatively difficult to solve. An example of this is the derivation of the receiving properties of antennas, which is addressed in other sections using results derived in this section. As an initial and relatively gentle introduction, consider a well-known special case that emerges in basic circuit theory: The two-port device shown in Figure 10.10. The two-port is said to be reciprocal if the voltage v2 appearing at port 2 due to a current applied at port 1 is the same as v1 when the same current is applied instead at port 2. This is normally the case when the two-port consists exclusively of linear passive devices such as ideal resistors,",Electromagnetics_Vol2.pdf "the case when the two-port consists exclusively of linear passive devices such as ideal resistors, capacitors, and inductors. The fundamental underlying requirement is linearity: That is, outputs must be proportional to inputs, and superposition must apply . This result from basic circuit theory is actually a special case of a more general theorem of electromagnetics, which we shall now derive. Figure 10.11 shows a scenario in which a current distribution ˜J1 is completely contained within a volume V. This current is expressed as a volume current density , having SI base units of A/m 2. Also, the current is expressed in phasor form, signaling that we are considering a single frequency . This current distribution gives rise to an electric field intensity ˜E1, Inductiveload, public domain (modified) Figure 10.10: T wo-port device. c⃝ C. W ang CC BY -SA 4.0 Figure 10.11: An electromagnetic system consisting of a current distribution ˜J1 radiating an electric field",Electromagnetics_Vol2.pdf "c⃝ C. W ang CC BY -SA 4.0 Figure 10.11: An electromagnetic system consisting of a current distribution ˜J1 radiating an electric field ˜E1 in the presence of linear matter. c⃝ C. W ang CC BY -SA 4.0 Figure 10.12: The same electromagnetic system as shown in Figure 10.11 (including the same distribution of matter), but now with a different input, ˜J2, resulting in a different output, ˜E2.",Electromagnetics_Vol2.pdf "10.10. RECIPROCITY 187 having SI base units of V/m. The volume may consist of any combination of linear time-invariant matter; i.e., permittivity ǫ, permeability µ, and conductivity σ are constants that may vary arbitrarily with position but not with time. Here’s a key idea: W e may interpret this scenario as a “two-port” system in which ˜J1 is the input, ˜E1 is the output, and the system’s behavior is completely defined by Maxwell’s equations in differential phasor form: ∇ × ˜E1 = −jωµ˜H1 (10.71) ∇ × ˜H1 = ˜J1 + jωǫ˜E1 (10.72) along with the appropriate electromagnetic boundary conditions. (For the purposes of our present analysis, ˜H1 is neither an input nor an output; it is merely a coupled quantity that appears in this particular formulation of the relationship between ˜E1 and ˜J1.) Figure 10.12 shows a scenario in which a different current distribution ˜J2 is completely contained within the same volume V containing the same distribution",Electromagnetics_Vol2.pdf "current distribution ˜J2 is completely contained within the same volume V containing the same distribution of linear matter. This new current distribution gives rise to an electric field intensity ˜E2. The relationship between ˜E2 and ˜J2 is governed by the same equations: ∇ × ˜E2 = −jωµ˜H2 (10.73) ∇ × ˜H2 = ˜J2 + jωǫ˜E2 (10.74) along with the same electromagnetic boundary conditions. Thus, we may interpret this scenario as the same electromagnetic system depicted in Figure 10.11, except now with ˜J2 as the input and ˜E2 is the output. The input current and output field in the second scenario are, in general, completely different from the input current and output field in the first scenario. However, both scenarios involve precisely the same electromagnetic system; i.e., the same governing equations and the same distribution of matter. This leads to the following question: Let’s say you know nothing about the system, aside from the fact that it is",Electromagnetics_Vol2.pdf "leads to the following question: Let’s say you know nothing about the system, aside from the fact that it is linear and time-invariant. However, you are able to observe the first scenario; i.e., you know ˜E1 in response to ˜J1. Given this very limited look into the behavior of the system, what can you infer about ˜E2 given ˜J2, or vice-versa? At first glance, the answer might seem to be nothing, since you lack a description of the system. However, the answer turns out to be that a surprising bit more information is available. This information is provided by reciprocity . T o show this, we must engage in some pure mathematics. Derivation of the Lorentz reciprocity theorem. First, let us take the dot product of ˜H2 with each side of Equation 10.71: ˜H2 · ( ∇ × ˜E1 ) = −jωµ˜H1 · ˜H2 (10.75) Similarly , let us take the dot product of ˜E1 with each side of Equation 10.74: ˜E1 · ( ∇ × ˜H2 ) = ˜E1 · ˜J2 + jωǫ˜E1 · ˜E2 (10.76) Next, let us subtract Equation 10.75 from",Electromagnetics_Vol2.pdf "side of Equation 10.74: ˜E1 · ( ∇ × ˜H2 ) = ˜E1 · ˜J2 + jωǫ˜E1 · ˜E2 (10.76) Next, let us subtract Equation 10.75 from Equation 10.76. The left side of the resulting equation is ˜E1 · ( ∇ × ˜H2 ) − ˜H2 · ( ∇ × ˜E1 ) (10.77) This can be simplified using the vector identity (Appendix B.3): ∇ · (A × B) = B · (∇ × A) − A · (∇ × B) (10.78) Yielding ˜E1 · ( ∇ × ˜H2 ) − ˜H2 · ( ∇ × ˜E1 ) = ∇ · ( ˜H2 × ˜E1 ) (10.79) So, by subtracting Equation 10.75 from Equation 10.76, we have found: ∇· ( ˜H2 × ˜E1 ) = ˜E1 ·˜J2 +jωǫ˜E1 · ˜E2 +jωµ˜H1 · ˜H2 (10.80) Next, we repeat the process represented by Equations 10.75–10.80 above to generate a complementary equation to Equation 10.80. This time we take the dot product of ˜E2 with each side of Equation 10.72: ˜E2 · ( ∇ × ˜H1 ) = ˜E2 · ˜J1 + jωǫ˜E1 · ˜E2 (10.81) Similarly , let us take the dot product of ˜H1 with each side of Equation 10.73: ˜H1 · ( ∇ × ˜E2 ) = −jωµ˜H1 · ˜H2 (10.82)",Electromagnetics_Vol2.pdf "188 CHAPTER 10. ANTENNAS Next, let us subtract Equation 10.82 from Equation 10.81. Again using the vector identity , the left side of the resulting equation is ˜E2 · ( ∇ × ˜H1 ) − ˜H1 · ( ∇ × ˜E2 ) = ∇ · ( ˜H1 × ˜E2 ) (10.83) So we find: ∇· ( ˜H1 × ˜E2 ) = ˜E2 ·˜J1 +jωǫ˜E1 · ˜E2 +jωµ˜H1 · ˜H2 (10.84) Finally , subtracting Equation 10.84 from Equation 10.80, we obtain: ∇ · ( ˜H2 × ˜E1 − ˜H1 × ˜E2 ) = ˜E1 · ˜J2 − ˜E2 · ˜J1 (10.85) This equation is commonly known by the name of the theorem it represents: The Lorentz reciprocity theorem. The theorem is a very general statement about the relationship between fields and currents at each point in space. An associated form of the theorem applies to contiguous regions of space. T o obtain this form, we simply integrate both sides of Equation 10.85 over the volume V: ∫ V ∇ · ( ˜H2 × ˜E1 − ˜H1 × ˜E2 ) dv = ∫ V ( ˜E1 · ˜J2 − ˜E2 · ˜J1 ) dv (10.86) W e now take the additional step of using the divergence theorem (Appendix B.3) to transform the",Electromagnetics_Vol2.pdf ") dv = ∫ V ( ˜E1 · ˜J2 − ˜E2 · ˜J1 ) dv (10.86) W e now take the additional step of using the divergence theorem (Appendix B.3) to transform the left side of the equation into a surface integral: ∮ S ( ˜H2 × ˜E1 − ˜H1 × ˜E2 ) · ds = ∫ V ( ˜E1 · ˜J2 − ˜E2 · ˜J1 ) dv (10.87) where S is the closed mathematical surface which bounds V. This is also the Lorentz reciprocity theorem, but now in integral form. This version of the theorem relates fields on the bounding surface to sources within the volume. The integral form of the theorem has a particularly useful feature. Let us confine the sources to a finite region of space, while allowing V to grow infinitely large, expanding to include all space. In this situation, the closest distance between any point containing non-zero source current and S is infinite. Because field magnitude diminishes with distance from the source, the fields (˜E1, ˜H1) and (˜E2, ˜H2) are all effectively zero on S. In this case, the left side of",Electromagnetics_Vol2.pdf "source, the fields (˜E1, ˜H1) and (˜E2, ˜H2) are all effectively zero on S. In this case, the left side of Equation 10.87 is zero, and we find: ∫ V ( ˜E1 · ˜J2 − ˜E2 · ˜J1 ) dv= 0 (10.88) for any volume V which contains all the current. The Lorentz reciprocity theorem (Equa- tion 10.88) describes a relationship between one distribution of current and the resulting fields, and a second distribution of current and resulting fields, when both scenarios take place in identical regions of space filled with identical distributions of linear matter. Why do we refer to this relationship as reciprocity? Simply because the expression is identical when the subscripts “1” and “2” are swapped. In other words, the relationship does not recognize a distinction between “inputs” and “outputs;” there are only “ports. ” A useful special case pertains to scenarios in which the current distributions ˜J1 and ˜J2 are spatially disjoint. By “spatially disjoint, ” we mean that there is",Electromagnetics_Vol2.pdf "the current distributions ˜J1 and ˜J2 are spatially disjoint. By “spatially disjoint, ” we mean that there is no point in space at which both ˜J1 and ˜J2 are non-zero; in other words, these distributions do not overlap. (Note that the currents shown in Figures 10.11 and 10.12 are depicted as spatially disjoint.) T o see what happens in this case, let us first rewrite Equation 10.88 as follows: ∫ V ˜E1 · ˜J2 dv= ∫ V ˜E2 · ˜J1 dv (10.89) Let V1 be the contiguous volume over which ˜J1 is non-zero, and let V2 be the contiguous volume over which ˜J2 is non-zero. Then Equation 10.89 may be written as follows: ∫ V2 ˜E1 · ˜J2 dv= ∫ V1 ˜E2 · ˜J1 dv (10.90) The utility of this form is that we have reduced the region of integration to just those regions where the current exists.",Electromagnetics_Vol2.pdf "10.10. RECIPROCITY 189 c⃝ C. W ang CC BY -SA 4.0 Figure 10.13: A two-port consisting of two dipole antennas. Reciprocity of two-ports consisting of antennas. Equation 10.90 allows us to establish the reciprocity of two-ports consisting of pairs of antennas. This is most easily demonstrated for pairs of thin dipole antennas, as shown in Figure 10.13. Here, port 1 is defined by the terminal quantities ( ˜V1,˜I1) of the antenna on the left, and port 2 is defined by the terminal quantities ( ˜V2,˜I2) of the antenna on the right. These quantities are defined with respect to a small gap of length ∆l between the perfectly-conducting arms of the dipole. Either antenna may transmit or receive, so ( ˜V1,˜I1) depends on ( ˜V2,˜I2), and vice-versa. The transmit and receive cases for port 1 are illustrated in Figure 10.14(a) and (b), respectively . Note that ˜J1 is the current distribution on this antenna when transmitting (i.e., when driven by the impressed current ˜It",Electromagnetics_Vol2.pdf "Note that ˜J1 is the current distribution on this antenna when transmitting (i.e., when driven by the impressed current ˜It 1) and ˜E2 is the electric field incident on the antenna when the other antenna is transmitting. Let us select V1 to be the cylindrical volume defined by the exterior surface of the dipole, including the gap between the arms of the dipole. W e are now ready to consider the right side of Equation 10.90: ∫ V1 ˜E2 · ˜J1 dv (10.91) The electromagnetic boundary conditions applicable to the perfectly-conducting dipole arms allow this integral to be dramatically simplified. First, recall that all current associated with a perfect conductor must flow on the surface of the material, and therefore c⃝ C. W ang CC BY -SA 4.0 Figure 10.14: The port 1 antenna (a) transmitting and (b) receiving. ˜J1 = 0 everywhere except on the surface. Therefore, the direction of ˜J1 is always tangent to the surface. The tangent component of ˜E2 is zero on the surface",Electromagnetics_Vol2.pdf "the direction of ˜J1 is always tangent to the surface. The tangent component of ˜E2 is zero on the surface of a perfectly-conducting material, as required by the applicable boundary condition. Therefore, ˜E2 · ˜J1 = 0 everywhere ˜J1 is non-zero. There is only one location where the current is non-zero and yet there is no conductor: This location is the gap located precisely at the terminals. Thus, we find: ∫ V1 ˜E2 · ˜J1 dv= ∫ gap ˜E2 · ˜It 1ˆl1 dl (10.92) where the right side is a line integral crossing the gap that defines the terminals of the antenna. W e assume the current ˜It 1 is constant over the gap, and so may be factored out of the integral: ∫ V1 ˜E2 · ˜J1 dv= ˜It 1 ∫ gap ˜E2 · ˆl1 dl (10.93) Recall that potential between two points in space is given by the integral of the electric field over any path between those two points. In particular, we may calculate the open-circuit potential ˜Vr 1 as follows: ˜Vr 1 = − ∫ gap ˜E2 · ˆl1 dl (10.94) Remarkably , we have found: ∫ V1",Electromagnetics_Vol2.pdf "calculate the open-circuit potential ˜Vr 1 as follows: ˜Vr 1 = − ∫ gap ˜E2 · ˆl1 dl (10.94) Remarkably , we have found: ∫ V1 ˜E2 · ˜J1 dv= −˜It 1 ˜Vr 1 (10.95)",Electromagnetics_Vol2.pdf "190 CHAPTER 10. ANTENNAS Applying the exact same procedure for port 2 (or by simply exchanging subscripts), we find: ∫ V2 ˜E1 · ˜J2 dv= −˜It 2 ˜Vr 2 (10.96) Now substituting these results into Equation 10.90, we find: ˜It 1 ˜Vr 1 = ˜It 2 ˜Vr 2 (10.97) At the beginning of this section, we stated that a two-port is reciprocal if ˜V2 appearing at port 2 due to a current applied at port 1 is the same as ˜V1 when the same current is applied instead at port 2. If the present two-dipole problem is reciprocal, then ˜Vr 2 due to ˜It 1 should be the same as ˜Vr 1 when ˜It 2 = ˜It 1. Is it? Let us set ˜It 1 equal to some particular value I0, then the resulting value of ˜Vr 2 will be some particular value V0. If we subsequently set ˜It 2 equal to I0, then the resulting value of ˜Vr 1 will be, according to Equation 10.97: ˜Vr 1 = ˜It 2 ˜Vr 2 ˜It 1 = I0V0 I0 = V0 (10.98) Therefore, Equation 10.97 is simply a mathematical form of the familiar definition of reciprocity from",Electromagnetics_Vol2.pdf "1 = ˜It 2 ˜Vr 2 ˜It 1 = I0V0 I0 = V0 (10.98) Therefore, Equation 10.97 is simply a mathematical form of the familiar definition of reciprocity from basic circuit theory , and we have found that our system of antennas is reciprocal in precisely this same sense. The above analysis presumed pairs of straight, perfectly conducting dipoles of arbitrary length. However, the result is readily generalized – in fact, is the same – for any pair of passive antennas in linear time-invariant media. Summarizing: The potential induced at the terminals of one an- tenna due to a current applied to a second antenna is equal to the potential induced in the second an- tenna by the same current applied to the first an- tenna (Equation 10.97). Additional Reading: • “Reciprocity (electromagnetism)” on Wikipedia. • “T wo-port network” on Wikipedia. 10.11 Potential Induced in a Dipole [m0215] An electromagnetic wave incident on an antenna will induce a potential at the terminals of the antenna. In",Electromagnetics_Vol2.pdf "Dipole [m0215] An electromagnetic wave incident on an antenna will induce a potential at the terminals of the antenna. In this section, we shall derive this potential. T o simplify the derivation, we shall consider the special case of a straight thin dipole of arbitrary length that is illuminated by a plane wave. However, certain aspects of the derivation will apply to antennas generally . In particular, the concepts of effective length (also known as effective height ) and vector effective length emerge naturally from this derivation, so this section also serves as a stepping stone in the development of an equivalent circuit model for a receiving antenna. The derivation relies on the transmit properties of dipoles as well as the principle of reciprocity , so familiarity with those topics is recommended before reading this section. The scenario of interest is shown in Figure 10.15. Here a thin ˆz-aligned straight dipole is located at the",Electromagnetics_Vol2.pdf "reading this section. The scenario of interest is shown in Figure 10.15. Here a thin ˆz-aligned straight dipole is located at the origin. The total length of the dipole is L. The arms of the dipole are perfectly-conducting. The terminals consist of a small gap of length ∆l between the arms. The incident plane wave is described in terms of its electric field intensity ˜Ei. The question is: What is ˜VOC, the potential at the terminals when the terminals are open-circuited? There are multiple approaches to solve this problem. A direct attack is to invoke the principle that potential is equal to the integral of the electric field intensity over a path. In this case, the path begins at the “− ” terminal and ends at the “+ ” terminal, crossing the gap that defines the antenna terminals. Thus: ˜VOC = − ∫ gap ˜Egap · dl (10.99) where ˜Egap is the electric field in the gap. The problem with this approach is that the value of ˜Egap is not readily available. It is not simply ˜Ei, because",Electromagnetics_Vol2.pdf "problem with this approach is that the value of ˜Egap is not readily available. It is not simply ˜Ei, because the antenna structure (in particular, the electromagnetic boundary conditions) modify the electric field in the vicinity of the antenna. 4 4 Als o, if this were true, then the antenna itself would not matter;",Electromagnetics_Vol2.pdf "10.11. POTENTIAL INDUCED IN A DIPOLE 191 Fortunately , we can bypass this obstacle using the principle of reciprocity . In a reciprocity-based strategy , we establish a relationship between two scenarios that take place within the same electromagnetic system. The first scenario is shown in Figure 10.16. In this scenario, we have two dipoles. The first dipole is precisely the dipole of interest (Figure 10.15), except that a current ˜It 1 is applied to the antenna terminals. This gives rise to a current distribution ˜I(z) (SI base units of A) along the dipole, and subsequently the dipole radiates the electric field (Section 9.6): ˜E1(r) ≈ ˆθjη 2 e−jβ r r (s in θ) · [ 1 λ ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] (10.100) The second antenna is a ˆθ-aligned Hertzian dipole in the far field, which receives ˜E1. (For a refresher on the properties of Hertzian dipoles, see Section 9.4. A key point is that Hertzian dipoles are vanishingly small.) Specifically , we measure (conceptually , at",Electromagnetics_Vol2.pdf "key point is that Hertzian dipoles are vanishingly small.) Specifically , we measure (conceptually , at least) the open-circuit potential ˜Vr 2 at the terminals of the Hertzian dipole. W e select a Hertzian dipole for this purpose because – in contrast to essentially all only the relative spacing and orientation of the antenna terminals w ould matter! c⃝ C. W ang CC BY -SA 4.0 Figure 10.15: A potential is induced at the terminals of a thin straight dipole in response to an incident plane wave. c⃝ C. W ang CC BY -SA 4.0 Figure 10.16: The dipole of interest driven by current ˜It 1 radiates electric field ˜E1, resulting in open-circuit potential ˜Vr 2 at the terminals of a Hertzian dipole in the far field. c⃝ C. W ang CC BY -SA 4.0 Figure 10.17: The Hertzian dipole driven by current ˜It 2 radiates electric field ˜E2, resulting in open-circuit potential ˜Vr 1 at the terminals of the dipole of interest.",Electromagnetics_Vol2.pdf "192 CHAPTER 10. ANTENNAS other antennas – it is simple to determine the open circuit potential. As explained earlier: ˜Vr 2 = − ∫ gap ˜Egap · dl (10.101) For the Hertzian dipole, ˜Egap is simply the incident electric field, since there is negligible structure (in particular, a negligible amount of material) present to modify the electric field. Thus, we have simply: ˜Vr 2 = − ∫ gap ˜E1 · dl (10.102) Since the Hertzian dipole is very short and very far away from the transmitting dipole, ˜E1 is essentially constant over the gap. Also recall that we required the Hertzian dipole to be aligned with ˜E1. Choosing to integrate in a straight line across the gap, Equation 10.102 reduces to: ˜Vr 2 = −˜E1(r2) · ˆθ∆l (10.103) where ∆l is the length of the gap and r2 is the location of the Hertzian dipole. Substituting the expression for ˜E1 from Equation 10.100, we obtain: ˜Vr 2 ≈ − jη 2 e−jβ r2 r2 (s in θ) · [ 1 λ ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] ∆l (10.104) where r2 = |r2|.",Electromagnetics_Vol2.pdf "˜Vr 2 ≈ − jη 2 e−jβ r2 r2 (s in θ) · [ 1 λ ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] ∆l (10.104) where r2 = |r2|. The second scenario is shown in Figure 10.17. This scenario is identical to the first scenario, with the exception that the Hertzian dipole transmits and the dipole of interest receives. The field radiated by the Hertzian dipole in response to applied current ˜It 2, evaluated at the origin, is (Section 9.4): ˜E2(r = 0) ≈ ˆθjη ˜It 2 · β∆l 4π (1) e−j βr2 r2 (10.105) The “sin θ” factor in the general expression is equal to 1 in this case, since, as shown in Figure 10.17, the origin is located broadside (i.e., at π/2 rad) relative to the axis of the Hertzian dipole. Also note that because the Hertzian dipole is presumed to be in the far field, E2 may be interpreted as a plane wave in the region of the receiving dipole of interest. Now we ask: What is the induced potential ˜Vr 1 in the dipole of interest? Once again, Equation 10.99 is not",Electromagnetics_Vol2.pdf "of the receiving dipole of interest. Now we ask: What is the induced potential ˜Vr 1 in the dipole of interest? Once again, Equation 10.99 is not much help, because the electric field in the gap is not known. However, we do know that ˜Vr 1 should be proportional to ˜E2(r = 0), since this is presumed to be a linear system. Based on this much information alone, there must be some vector le = ˆlle for which ˜Vr 1 = ˜E2(r = 0) · le (10.106) This does not uniquely define either the unit vector ˆl nor the scalar part le, since a change in the definition of the former can be compensated by a change in the definition of the latter and vice-versa. So at this point we invoke the standard definition of le as the vector effective length, introduced in Section 10.9. Thus, ˆl is defined to be the direction in which an electric field transmitted from the antenna would be polarized. In the present example, ˆl = −ˆθ, where the minus sign reflects the fact that positive terminal potential results",Electromagnetics_Vol2.pdf "the present example, ˆl = −ˆθ, where the minus sign reflects the fact that positive terminal potential results in terminal current which flows in the −ˆz direction. Thus, Equation 10.106 becomes: ˜Vr 1 = −˜E2(r = 0) · ˆθle (10.107) W e may go a bit further and substitute the expression for ˜E2(r = 0) from Equation 10.105: ˜Vr 1 ≈ − jη ˜It 2 · β∆l 4π e−jβ r2 r2 le (10.108) No w we invoke reciprocity . As a two-port linear time-invariant system, it must be true that: ˜It 1 ˜Vr 1 = ˜It 2 ˜Vr 2 (10.109) Thus: ˜Vr 1 = ˜It 2 ˜It 1 ˜Vr 2 (10.110) Substituting the expression for ˜Vr 2 from Equation 10.104: ˜Vr 1 ≈ − ˜It 2 ˜It 1 · jη 2 e−jβ r2 r2 (s in θ) · [ 1 λ ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] ∆l (10.111) Thus, reciprocity has provided a second expression for ˜Vr 1 . W e may solve for le by setting this expression",Electromagnetics_Vol2.pdf "10.11. POTENTIAL INDUCED IN A DIPOLE 193 equal to the expression from Equation 10.108, yielding le ≈ 2π β˜It 1 [ 1 λ ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] sin θ (10.112) Noting that β = 2π/λ, this simplifies to: le ≈ [ 1 ˜It 1 ∫ +L/ 2 −L/ 2 ˜I( z′)e+jβz′ cos θdz′ ] sin θ (10.113) Thus, you can calculate le using the following procedure: 1. Apply a current ˜It 1 to the dipole of interest. 2. Determine the resulting current distribution ˜I(z) along the length of the dipole. (Note that precisely this is done for the electrically-short dipole in Section 9.5 and for the half-wave dipole in Section 9.7.) 3. Integrate ˜I(z) over the length of the dipole as indicated in Equation 10.113. Then divide (“normalize”) by ˜It 1 (which is simply ˜I(0)). Note that the result is independent of the excitation ˜It 1, as expected since this is a linear system. 4. Multiply by sin θ. W e have now determined that the open-circuit terminal potential ˜VOC in response to an incident electric field ˜Ei is",Electromagnetics_Vol2.pdf "4. Multiply by sin θ. W e have now determined that the open-circuit terminal potential ˜VOC in response to an incident electric field ˜Ei is ˜VOC = ˜Ei · le (10.114) where le = ˆlle is the vector effective length defined previously . This result is remarkable. In plain English, we have found that: The potential induced in a dipole is the co- polarized component of the incident electric field times a normalized integral of the transmit cur- rent distribution over the length of the dipole, times sine of the angle between the dipole axis and the direction of incidence. In other words, the reciprocity property of linear systems allows this property of a receiving antenna to be determined relatively easily if the transmit characteristics of the antenna are known. Example 10.9. Ef fective length of a thin electrically-short dipole (ESD). A explained in Section 9.5, the current distribution on a thin ESD is ˜I(z) ≈ I0 ( 1 − 2 L|z| ) (10.115) where Lis the length of the dipole and I0 is the",Electromagnetics_Vol2.pdf "distribution on a thin ESD is ˜I(z) ≈ I0 ( 1 − 2 L|z| ) (10.115) where Lis the length of the dipole and I0 is the terminal current. Applying Equation 10.113, we find: le ≈ [ 1 I0 ∫ +L/ 2 −L/ 2 I0 ( 1 − 2 L|z′| ) e+jβ z′ cos θdz′ ] · sin θ (10.116) Recall β = 2π/λ, so βz′ = 2π (z′/λ). Since this is an electrically-short dipole, z′ ≪ λover the entire integral, and subsequently we may assume e+jβz′ cos θ ≈ 1 over the entire integral. Thus: le ≈ [ ∫ +L/ 2 −L/ 2 ( 1 − 2 L|z′| ) dz′ ] s in θ (10.117) The integral is easily solved using standard methods, or simply recognize that the “area under the curve” in this case is simply one-half “base” (L) times “height” (1). Either way , we find le ≈ L 2 sin θ (10.118) Example 10.7 (Section 10.9) demonstrates how Equation 10.114 with the vector effective length determined in the preceding example is used to obtain the induced potential.",Electromagnetics_Vol2.pdf "194 CHAPTER 10. ANTENNAS 10.12 Equivalent Circuit Model for Reception, Redux [m0216] Section 10.9 provides an informal derivation of an equi valent circuit model for a receiving antenna. This model is shown in Figure 10.18. The derivation of this model was informal and incomplete because the open-circuit potential Ei · le and source impedance ZA were not rigorously derived in that section. While the open-circuit potential was derived in Section 10.11 (“Potential Induced in a Dipole”), the source impedance has not yet been addressed. In this section, the source impedance is derived, which completes the formal derivation of the model. Before reading this section, a review of Section 10.10 (“Reciprocity”) is recommended. The starting point for a formal derivation is the two-port model shown in Figure 10.19. If the two-port is passive, linear, and time-invariant, then the potential v2 is a linear function of potentials and currents present at ports 1 and 2. Furthermore, v1",Electromagnetics_Vol2.pdf "the potential v2 is a linear function of potentials and currents present at ports 1 and 2. Furthermore, v1 must be proportional to i1, and similarly v2 must be proportional to i2, so any pair of “inputs” consisting of either potentials or currents completely determines the two remaining potentials or currents. Thus, we may write: v2 = Z21i1 + Z22i2 (10.119) where Z11 and Z12 are, for the moment, simply constants of proportionality . However, note that Z11 and Z12 have SI base units of Ω, and so we refer to c⃝ S. Lally CC BY -SA 4.0 Figure 10.18: Th ´evenin equivalent circuit model for an antenna in the presence of an incident electric field Ei. Inductiveload, public domain (modified) Figure 10.19: T wo-port system. these quantities as impedances. Similarly we may write: v1 = Z11i1 + Z12i2 (10.120) W e can develop expressions for Z12 and Z21 as follows. First, note that v1 = Z12i2 when i1 = 0. Therefore, we may define Z12 as follows: Z12 ≜ v1 i2 ⏐⏐⏐ ⏐ i1=0 (10.121) The",Electromagnetics_Vol2.pdf "follows. First, note that v1 = Z12i2 when i1 = 0. Therefore, we may define Z12 as follows: Z12 ≜ v1 i2 ⏐⏐⏐ ⏐ i1=0 (10.121) The simplest way to make i1 = 0 (leaving i2 as the sole “input”) is to leave port 1 open-circuited. In previous sections, we invoked special notation for these circumstances. In particular, we defined ˜It 2 as i2 in phasor representation, with the superscript “t” (“transmitter”) indicating that this is the sole “input”; and ˜Vr 1 as v1 in phasor representation, with the superscript “r ” (“receiver”) signaling that port 1 is both open-circuited and the “output. ” Applying this notation, we note: Z12 = ˜Vr 1 ˜It 2 (10.122) Similarly: Z21 = ˜Vr 2 ˜It 1 (10.123) In Section 10.10 (“Reciprocity”), we established that a pair of antennas could be represented as a passive linear time-invariant two-port, with v1 and i1 representing the potential and current at the terminals of one antenna (“antenna 1”), and v2 and i2 representing the potential and current at the terminals",Electromagnetics_Vol2.pdf "of one antenna (“antenna 1”), and v2 and i2 representing the potential and current at the terminals of another antenna (“antenna 2”). Therefore for any pair of antennas, quantities Z11, Z12, Z22, and Z21",Electromagnetics_Vol2.pdf "10.12. EQUIV ALENT CIRCUIT MODEL FOR RECEPTION, REDUX 195 can be identified that completely determine the relationship between the port potentials and currents. W e also established in Section 10.10 that: ˜It 1 ˜Vr 1 = ˜It 2 ˜Vr 2 (10.124) Therefore, ˜Vr 1 ˜It 2 = ˜Vr 2 ˜It 1 (10.125) Referring to Equations 10.122 and 10.123, we see that Equation 10.125 requires that: Z12 = Z21 (10.126) This is a key point. Even though we derived this equality by open-circuiting ports one at a time, the equality must hold generally since Equations 10.119 and 10.120 must apply – with the same values of Z12 and Z21 – regardless of the particular values of the port potentials and currents. W e are now ready to determine the Th ´evenin equivalent circuit for a receiving antenna. Let port 1 correspond to the transmitting antenna; that is, i1 is ˜It 1. Let port 2 correspond to an open-circuited receiving antenna; thus, i2 = 0 and v2 is ˜Vr 2 . Now applying Equation 10.119: v2 = Z21i1 + Z22i2 = ( ˜Vr 2 /˜It 1",Electromagnetics_Vol2.pdf "receiving antenna; thus, i2 = 0 and v2 is ˜Vr 2 . Now applying Equation 10.119: v2 = Z21i1 + Z22i2 = ( ˜Vr 2 /˜It 1 ) ˜It 1 + Z22 · 0 = ˜Vr 2 (10.127) W e previously determined ˜Vr 2 from electromagnetic considerations to be (Section 10.11): ˜Vr 2 = ˜Ei · le (10.128) where ˜Ei is the field incident on the receiving antenna, and le is the vector effective length as defined in Section 10.11. Thus, the voltage source in the Th ´evenin equivalent circuit for the receive antenna is simply ˜Ei · le, as shown in Figure 10.18. The other component in the Th ´evenin equivalent circuit is the series impedance. From basic circuit theory , this impedance is the ratio of v2 when port 2 is open-circuited (i.e., ˜Vr 2 ) to i2 when port 2 is short-circuited. This value of i2 can be obtained using Equation 10.119 with v2 = 0: 0 = Z21 ˜It 1 + Z22i2 (10.129) Therefore: i2 = −Z21 Z22 ˜It 1 (10.130) No w using Equation 10.123 to eliminate ˜It 1, we obtain: i2 = − ˜Vr 2 Z22 (10.131) Note",Electromagnetics_Vol2.pdf "1 + Z22i2 (10.129) Therefore: i2 = −Z21 Z22 ˜It 1 (10.130) No w using Equation 10.123 to eliminate ˜It 1, we obtain: i2 = − ˜Vr 2 Z22 (10.131) Note that the reference direction for i2 as defined in Figure 10.19 is opposite the reference direction for short-circuit current. That is, given the polarity of v2 shown in Figure 10.19, the reference direction of current flow through a passive load attached to this port is from “+” to “−” through the load. Therefore, the source impedance, calculated as the ratio of the open-circuit potential to the short circuit current, is: ˜Vr 2 + ˜Vr 2 /Z22 = Z22 (10.132) W e have found that the series impedance ZA in the Th´evenin equivalent circuit is equal to Z22 in the two-port model. T o determine Z22, let us apply a current i2 = ˜It 2 to port 2 (i.e., antenna 2). Equation 10.119 indicates that we should see: v2 = Z21i1 + Z22 ˜It 2 (10.133) Solving for Z22: Z22 = v2 ˜It 2 − Z21 i1 ˜It 2 (10.134) Note that the first term on the right is precisely the",Electromagnetics_Vol2.pdf "v2 = Z21i1 + Z22 ˜It 2 (10.133) Solving for Z22: Z22 = v2 ˜It 2 − Z21 i1 ˜It 2 (10.134) Note that the first term on the right is precisely the impedance of antenna 2 in transmission. The second term in Equation 10.134 describes a contribution to Z22 from antenna 1. However, our immediate interest is in the equivalent circuit for reception of an electric field ˜Ei in the absence of any other antenna. W e can have it both ways by imagining that ˜Ei is generated by antenna 1, but also that antenna 1 is far enough away to make Z21 – the factor that determines the effect of antenna 1 on antenna 2 – negligible. Then we see from Equation 10.134 that Z22 is the impedance of antenna 2 when transmitting.",Electromagnetics_Vol2.pdf "196 CHAPTER 10. ANTENNAS Summarizing: The Th ´evenin equivalent circuit for an antenna in the presence of an incident electric field ˜Ei is shown in Figure 10.18. The series impedance ZA in this model is equal to the impedance of the an- tenna in transmission. Mutual coupling. This concludes the derivation, but raises a follow-up question: What if antenna 2 is present and not sufficiently far away that Z21 can be assumed to be negligible? In this case, we refer to antenna 1 and antenna 2 as being “coupled, ” and refer to the effect of the presence of antenna 1 on antenna 2 as coupling. Often, this issue is referred to as mutual coupling, since the coupling affects both antennas in a reciprocal fashion. It is rare for coupling to be significant between antennas on opposite ends of a radio link. This is apparent from common experience. For example, changes to a receive antenna are not normally seen to affect the electric field incident at other locations. However, coupling becomes",Electromagnetics_Vol2.pdf "For example, changes to a receive antenna are not normally seen to affect the electric field incident at other locations. However, coupling becomes important when the antenna system is a dense array; i.e., multiple antennas separated by distances less than a few wavelengths. It is common for coupling among the antennas in a dense array to be significant. Such arrays can be analyzed using a generalized version of the theory presented in this section. Additional Reading: • “Th ´evenin’s Theorem” on Wikipedia. 10.13 Effective Aperture [m0218] When working with systems involving receiving antennas, it is convenient to have a single parameter that relates incident power (as opposed to incident electric field) to the power delivered to the receiver electronics. This parameter is commonly known as the effective aperture or antenna aperture. From elementary circuit theory , the power delivered to a load ZL is maximized when the load is conjugate matched to the antenna impedance; i.e., when",Electromagnetics_Vol2.pdf "to a load ZL is maximized when the load is conjugate matched to the antenna impedance; i.e., when ZL = Z∗ A where ZA is the impedance of the antenna. Thus, a convenient definition for effective aperture Ae employs the relationship: PR,max ≜ Si coAe (10.135) where Si co is the incident power density (SI base units of W/m 2) that is co-polarized with the antenna, and PR,max is the power delivered to a load that is conjugate matched to the antenna impedance. Summarizing: Effective aperture (SI base units of m 2) is the ra- tio of power delivered by an antenna to a conju- gate matched load, to the incident co-polarized power density . As defined, a method for calculation of effective aperture is not obvious, except perhaps through direct measurement. In fact, there are at least three ways we can calculate effective aperture: (a) via effective length, (b) via thermodynamics, and (c) via reciprocity . Each of these methods yields some insight and are considered in turn.",Electromagnetics_Vol2.pdf "length, (b) via thermodynamics, and (c) via reciprocity . Each of these methods yields some insight and are considered in turn. Effective aperture via effective length. The potential and current at the load of the receive antenna can be determined using the equivalent circuit model shown in Figure 10.20, using the Th ´evenin equivalent circuit model for the antenna developed in Section 10.9. In this model, the voltage source is determined by the incident electric field intensity ˜Ei and the vector effective length le = ˆlele of the antenna. W e determine the associated effective aperture as follows. Consider a co-polarized",Electromagnetics_Vol2.pdf "10.13. EFFECTIVE APER TURE 197 sinusoidally-varying plane wave ˜Ei co incident on the antenna. Further, let ˜Ei co = Eiˆe (10.136) where ˆe is the reference direction of ˜Ei co. The co-polarized power density incident on the antenna is: Si co = ⏐⏐Ei⏐ ⏐2 2η (10.137) where ηis the wave impedance of the medium (e.g., ∼= 377 Ω for an antenna in free space). In response, the time-average power delivered to the load is PR = 1 2Re { ˜VL˜I∗ L } (10.138) where ˜VL and ˜IL are the potential and current phasors, respectively , at the load. W e may determine ˜VL and ˜IL from the equivalent circuit model of Figure 10.20 using basic circuit theory . First, note that the magnitude and phase of the voltage source is: ˜Ei co · le = Eile ( ˆe · ˆle ) (10.139) and since we have defined ˆle to be equal to ˆe, ˜Ei co · le = Eile (10.140) Next, note that the load impedance creates a voltage divider with the source (antenna) impedance such that ˜VL = ( Eile ) ZL ZA + ZL (10.141)",Electromagnetics_Vol2.pdf "Next, note that the load impedance creates a voltage divider with the source (antenna) impedance such that ˜VL = ( Eile ) ZL ZA + ZL (10.141) c⃝ S. Lally CC BY -SA 4.0 (modified) Figure 10.20: Equivalent circuit model for an antenna in the presence of an incident electric field ˜Ei, termi- nated into a load impedance ZL. Similarly , ˜IL is the voltage source output divided by the total series resistance: ˜IL = Eile ZA + ZL (10.142) Substituting these expressions into Equation 10.138, we obtain: PR = 1 2 ⏐⏐Eile ⏐ ⏐2 RL |ZA + ZL|2 (10.143) Let us identify the real and imaginary components of ZA and ZL explicitly , as follows: ZA = RA + jXA (10.144) ZL = RL + jXL (10.145) Further, let us assume that loss internal to the antenna is negligible, so RA ≈ Rrad. If ZL is conjugate matched for maximum power transfer, then ZL = Z∗ A = Rrad − jXA. Therefore: PR,max = 1 2 ⏐⏐Eile ⏐ ⏐2 Rrad |ZA + Z∗ A|2 = 1 2 ⏐⏐Eile ⏐ ⏐2 Rrad |2Rrad|2 = ⏐⏐Eile ⏐ ⏐2 8Rrad (10.146) No",Electromagnetics_Vol2.pdf "ZL = Z∗ A = Rrad − jXA. Therefore: PR,max = 1 2 ⏐⏐Eile ⏐ ⏐2 Rrad |ZA + Z∗ A|2 = 1 2 ⏐⏐Eile ⏐ ⏐2 Rrad |2Rrad|2 = ⏐⏐Eile ⏐ ⏐2 8Rrad (10.146) No w using Equations 10.135, 10.137, and 10.146, we find: Ae = ⏐⏐Eile ⏐ ⏐2 /8Rrad |Ei|2 /2η (10.147) which reduces to: Ae = η|le|2 4Rrad (10.148) It is not surprising that effective aperture should be proportional to the square of the magnitude of effective length. However, we see that the medium and the radiation resistance of the antenna also play a role. Effective length and radiation resistance are easy to calculate for wire antennas, so it is natural to use Equation 10.148 to calculate the effective apertures of",Electromagnetics_Vol2.pdf "198 CHAPTER 10. ANTENNAS wire antennas. For the electrically-short dipole (ESD) of length L, le ≈ (L/2) sin θand Rrad ≈ 20π2 (L/λ)2. Thus, we find the effective aperture assuming free space (i.e., η= η0) is: Ae ≈ 0.119λ2 |sin θ|2 (lossless ESD) (10.149) Remarkably , the effective aperture of the ESD does not depend on its length. In fact, it depends only on the frequency of operation. Also worth noting is that maximum effective aperture (i.e., the effective aperture in the θ= π/2 direction) is Ae ≈ 0.119λ2 (lossless ESD, max.) (10.150) Dipoles which are not electrically-short exhibit radiation resistance which is proportional to Lp, where p> 2. Therefore, the effective aperture of non-electrically-short dipoles does increase with L, as expected. However, this increase is not dramatic unless Lis significantly greater than λ/2. Here’s an example: Example 10.10. Ef fective aperture of a half-wave dipole. The electrically-thin half-wave dipole exhibits",Electromagnetics_Vol2.pdf "example: Example 10.10. Ef fective aperture of a half-wave dipole. The electrically-thin half-wave dipole exhibits radiation resistance ∼= 73 Ω and effective length λ/π. Assuming the dipole is lossless and in free space, Equation 10.148 yields: Ae ≈ 0.131λ2 (half-wave dipole, max.) (10.151) Again, this is the effective aperture for a wave incident from broadside to the dipole. Effective aperture via thermodynamics. A useful insight into the concept of effective aperture can be deduced by asking the following question: How much power is received by an antenna when waves of equal power density arrive from all directions simultaneously? This question is surprisingly easy to answer using basic principles of thermodynamics. Thermodynamics is a field of physics that addresses heat and its relation to radiation and electrical energy . No previous experience with thermodynamics is assumed in this derivation. Consider the scenario depicted in Figure 10.21. In",Electromagnetics_Vol2.pdf "No previous experience with thermodynamics is assumed in this derivation. Consider the scenario depicted in Figure 10.21. In this scenario, the antenna is completely enclosed in a chamber whose walls do not affect the behavior of the antenna and which have uniform temperature T. The load (still conjugate matched to the antenna) is completely enclosed by a separate but identical chamber, also at temperature T. Consider the load chamber first. Heat causes random acceleration of constituent charge carriers in the load, giving rise to a randomly-varying current at the load terminals. (This is known as Johnson-Nyquist noise.) This current, flowing through the load, gives rise to a potential; therefore, the load – despite being a passive device – is actually a source of power. The power associated with this noise is: Pload = kTB (10.152) where k∼= 1.38 × 10−23 J/K is Boltzmann’s constant and Bis the bandwidth within which Pload is measured. Similarly , the antenna is a source of noise power",Electromagnetics_Vol2.pdf "and Bis the bandwidth within which Pload is measured. Similarly , the antenna is a source of noise power Pant. Pant can also be interpreted as captured thermal radiation – that is, electromagnetic waves stimulated by the random acceleration of charged particles comprising the chamber walls. These waves radiate from the walls and travel to the antenna. The Rayleigh-Jeans law of thermodynamics tells us that this radiation should have power density (i.e., SI base units of W/m 2) equal to 2kT λ2 B (10.153) Chetvorno, public domain (modified) Figure 10.21: Thermodynamic analysis of the power exchanged between an antenna and its load.",Electromagnetics_Vol2.pdf "10.13. EFFECTIVE APER TURE 199 per steradian of solid angle. 5 The total power accessible to the antenna is one-half this amount, since an antenna is sensitive to only one polarization at a time, whereas the thermal radiation is equally distributed among any two orthogonal polarizations. PA is the remaining power, obtained by integrating over all 4πsteradians. Therefore, the antenna captures total power equal to 6 Pant = ∮ Ae(θ′,φ′) (1 2 2kT λ2 B ) sin θ′dθ′dφ′ = (k T λ2 B )∮ Ae(θ′,φ′) sin θ′dθ′dφ′ (10.154) Given the conditions of the experiment, and in particular since the antenna chamber and the load chamber are at the same temperature, the antenna and load are in thermodynamic equilibrium. A consequence of this equilibrium is that power Pant captured by the antenna and delivered to the load must be equal to power Pload generated by the load and delivered to the antenna; i.e., Pant = Pload (10.155) Combining Equations 10.152, 10.154, and 10.155, we obtain: (kT λ2 B )∮",Electromagnetics_Vol2.pdf "and delivered to the antenna; i.e., Pant = Pload (10.155) Combining Equations 10.152, 10.154, and 10.155, we obtain: (kT λ2 B )∮ Ae(θ′,φ′) sin θ′dθ′dφ′ = kTB (10.156) which reduces to: ∮ Ae(θ′,φ′) sin θ′dθ′dφ′ = λ2 (10.157) Let ⟨Ae⟩ be the mean effective aperture of the antenna; i.e., Ae averaged over all possible directions. This average is simply Equation 10.157 divided by the 4πsr of solid angle comprising all possible directions. Thus: ⟨Ae⟩ = λ2 4π (10.158) Recall that a isotropic antenna is one which has the same effective aperture in every direction. Such 5 Full disclosure: This is an approximation to the exact expres- sion, but is very accurate at radio frequencies. See “ Additional Read- ing” at the end of this section for additional details. 6 Recall sin θ′dθ′dφ′ is the differential element of solid angle. antennas do not exist in practice, but the concept of an isotropic antenna is quite useful as we shall soon see. Since the effective aperture of an isotropic antenna",Electromagnetics_Vol2.pdf "isotropic antenna is quite useful as we shall soon see. Since the effective aperture of an isotropic antenna must be the same as its mean effective aperture, we find: Ae = λ2 4π ≈ 0.080 λ2 (isotropic antenna) (10.159) Note further that this must be the minimum possible value of the maximum effective aperture for any antenna. Effective aperture via reciprocity . The fact that all antennas have maximum effective aperture greater than that of an isotropic antenna makes the isotropic antenna a logical benchmark against which to compare the effective aperture of antennas. W e can characterize the effective aperture of any antenna as being some unitless real-valued constant Dtimes the effective aperture of an isotropic antenna; i.e.: Ae ≜ Dλ2 4π (an y antenna) (10.160) where Dmust be greater than or equal to 1. Astute readers might notice that Dseems a lot like directivity. Directivity is defined in Section 10.7 as the factor by which a transmitting antenna increases",Electromagnetics_Vol2.pdf "directivity. Directivity is defined in Section 10.7 as the factor by which a transmitting antenna increases the power density of its radiation over that of an isotropic antenna. Let us once again consider the ESD, for which we previously determined (via the effective length concept) that Ae ∼= 0.119λ2 in the direction in which it is maximum. Applying Equation 10.160 to the ESD, we find: D≜ Ae 4π λ2 ∼= 1.50 (ESD, max.) (10.161) Sure enough, Dis equal to the directivity of the ESD in the transmit case. This result turns out to be generally true; that is: The effective aperture of any antenna is given by Equation 10.160 where Dis the directivity of the antenna when transmitting. A derivation of this result for the general case is possible using analysis similar to the thermodynamics",Electromagnetics_Vol2.pdf "200 CHAPTER 10. ANTENNAS presented earlier, or using the reciprocity theorem developed in Section 10.10. The fact that effective aperture is easily calculated from transmit directivity is an enormously useful tool in antenna engineering. Without this tool, determination of effective aperture is limited to direct measurement or calculation via effective length; and effective length is generally difficult to calculate for antennas which are not well-described as distributions of current along a line. It is usually far easier to calculate the directivity of an antenna when transmitting, and then use Equation 10.160 to obtain effective aperture for receive operation. Note that this principle is itself an expression of reciprocity . That is, one may fairly say that “directivity” is not exclusively a transmit concept nor a receive concept, but rather is a single quantifiable characteristic of an antenna that applies in both the transmit and receive case. Recall that radiation",Electromagnetics_Vol2.pdf "characteristic of an antenna that applies in both the transmit and receive case. Recall that radiation patterns are used to quantify the way (transmit) directivity varies with direction. Suddenly , we have found that precisely the same patterns apply to the receive case! Summarizing: As long as the conditions required for formal reciprocity are satisfied, the directivity of a re- ceiving antenna (defined via Equation 10.160) is equal to directivity of the same antenna when transmitting, and patterns describing receive di- rectivity are equal to those for transmit directiv- ity . Finally , we note that the equivalence of transmit and receive directivity can, again via Equation 10.160, be used to define an effective aperture for the transmit case. In other words, we can define the effective aperture of a transmitting antenna to be λ2/4πtimes the directivity of the antenna. There is no new physics at work here; we are simply taking advantage of the",Electromagnetics_Vol2.pdf "the directivity of the antenna. There is no new physics at work here; we are simply taking advantage of the fact that the concepts of effective aperture and directivity describe essentially the same characteristic of an antenna, and that this characteristic is the same for both transmit and receive operation. Additional Reading: • “Antenna aperture” on Wikipedia. • “Boltzmann constant” on Wikipedia. • “Rayleigh-Jeans law” on Wikipedia. • “Johnson-Nyquist noise” on Wikipedia. • “Thermodynamics” on Wikipedia.",Electromagnetics_Vol2.pdf "10.14. FRIIS TRANSMISSION EQUA TION 201 10.14 Friis T ransmission Equation [m0219] A common task in radio systems applications is to determine the power delivered to a receiver due to a distant transmitter. The scenario is shown in Figure 10.22: A transmitter delivers power PT to an antenna which has gain GT in the direction of the receiver. The receiver’s antenna has gain GR. As always, antenna gain is equal to directivity times radiation efficiency , so GT and GR account for losses internal to the antenna, but not losses due to impedance mismatch. A simple expression for PR can be derived as follows. First, let us assume “free space conditions”; that is, let us assume that the intervening terrain exhibits negligible absorption, reflection, or other scattering of the transmitted signal. In this case, the spatial power density at range Rfrom the transmitter which radiates this power through a lossless and isotropic antenna would be: PT 4πR2 (10.162) that",Electromagnetics_Vol2.pdf "density at range Rfrom the transmitter which radiates this power through a lossless and isotropic antenna would be: PT 4πR2 (10.162) that is, total transmitted power divided by the area of a sphere of radius Rthrough which all the power must flow . The actual power density Si is this amount times the gain of the transmit antenna, i.e.: Si = PT 4πR2 GT (10.163) The maximum received power is the incident co-polarized power density times the effective Figure 10.22: Radio link accounting for antenna gains and spreading of the transmitted wave. aperture Ae of the receive antenna: PR,max = AeSi co = Ae PT 4πR2 GT (10.164) This assumes that the receive antenna is co-polarized with the incident electric field, and that the receiver is conjugate-matched to the antenna. The effective aperture can also be expressed in terms of the gain GR of the receive antenna: Ae = λ2 4πGR (10.165) Thus, Equation 10.164 may be written in the following form: PR,max = PTGT ( λ 4πR )2 GR (10.166) This",Electromagnetics_Vol2.pdf "Ae = λ2 4πGR (10.165) Thus, Equation 10.164 may be written in the following form: PR,max = PTGT ( λ 4πR )2 GR (10.166) This is the Friis transmission equation. Summarizing: The Friis transmission equation (Equa- tion 10.166) gives the power delivered to a conjugate-matched receiver in response to a dis- tant transmitter, assuming co-polarized antennas and free space conditions. The factor (λ/4πR)2 appearing in the Friis transmission equation is referred to as free space path gain. More often this is expressed as the reciprocal quantity: Lp ≜ ( λ 4πR )−2 (10.167) which is known as free space path loss. Thus, Equation 10.166 may be expressed as follows: PR,max = PTGTL−1 p GR (10.168) The utility of the concept of path loss is that it may also be determined for conditions which are different from free space. The Friis transmission equation still applies; one simply uses the appropriate (and probably significantly different) value of Lp. A common misconception is that path loss is equal to",Electromagnetics_Vol2.pdf "applies; one simply uses the appropriate (and probably significantly different) value of Lp. A common misconception is that path loss is equal to the reduction in power density due to spreading along",Electromagnetics_Vol2.pdf "202 CHAPTER 10. ANTENNAS the path between antennas, and therefore this “spreading loss” increases with frequency . In fact, the reduction in power density due to spreading between any two distances R1 0 } dy[n] := y[n] – y[n –1]; b[n] := n – 1; MoveTo(px, py); Line(–dx[n], –dy[n]); NextRight := true end end end; procedure ComputeTangent; var i: integer; begin i := b[n]; while dy[n] · dx[i] > dy[i] · dx[n] do begin { dy[n]/dx[n] > dy[i]/dx[i] } Algorithms and Data Structures 26 A Global Text",algorithms and data structures.pdf "3. Algorithm animation i := b[i]; dx[n] := x[n] – x[i]; dy[n] := y[n] – y[i]; MoveTo(px, py); Line(–dx[n], –dy[n]); b[n] := i end; MoveTo(px, py); PenSize(2, 2); Line(–dx[n], –dy[n]); PenNormal end; procedure Title; begin ShowText; ShowDrawing; { make sure windows lie on top } WriteLn('The convex hull'); WriteLn('of n points in the plane sorted by x-coordinate'); WriteLn('is computed in linear time.'); Write('Click next point to the right, or Click left to quit.') end; begin { ConvexHull } Title; PointZero; while NextRight do ComputeTangent; Write('That's it!') end. A gallery of algorithm snapshots The screen dumps shown in Exhibit 3.1 were taken from demonstration programs that we use to illustrate topics discussed in class. Although snapshots cannot convey the information and the impact of animations, they may give the reader ideas to try out. We select two standard algorithm animation topics (sorting and random number",algorithms and data structures.pdf "the reader ideas to try out. We select two standard algorithm animation topics (sorting and random number generation), and an example showing the effect of cumulative rounding errors. Exhibit 3.1: Initial configuration of data, … 27",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 3.1: … and snapshots from two sorting algorithms. Visual test for randomness Our visual system is amazingly powerful at detecting patterns of certain kinds in the midst of noise. Random number generators (RNGs) are intended to simulate ""noise"" by means of simple formulas. When patterns appear in the visual representation of supposedly random numbers, chances are that this RNG will also fail more rigorous statistical tests. The eyes' pattern detection ability serves well to disqualify a faulty RNG but cannot certify one as adequate. Exhibit 3.2 shows a simulation of the Galton board. In theory, the resulting density diagram should approximate a bellshaped Gaussian distribution. Obviously, the RNG used falls short of expectations. Exhibit 3.2: One look suffices to unmask a bad RNG. Numerics of chaos, or chaos of numerical computation?",algorithms and data structures.pdf "Exhibit 3.2: One look suffices to unmask a bad RNG. Numerics of chaos, or chaos of numerical computation? The following example shows the effect of rounding errors and precision in linear recurrence relations. The d- step linear recurrence with constant coefficients in the domain of real or complex numbers, Algorithms and Data Structures 28 A Global Text",algorithms and data structures.pdf "3. Algorithm animation is one of the most frequent formulas evaluated in scientific and technical computation (e.g. for the solution of differential equations). By proper choice of the constants c i and of initial values z 0, z 1, … , z d–1 we can generate sequences zk that when plotted in the plane of complex numbers form many different figures. With d= 1 and |χ 1|= 1, for example, we generate circles. The pictures in Exhibit 3.3 were all generated with d = 3 and conditions that determine a curve that is most easily described as a circle 3 running around the perimeter of another circle 2 that runs around a stationary circle 1. We performed this computation with a floating-point package that lets us pick precision P (i.e. the number of bits in the mantissa). The resulting pictures look a bit chaotic, with a behavior we have come to associate with fractals—even if the mathematics of generating them is completely different, and linear",algorithms and data structures.pdf "have come to associate with fractals—even if the mathematics of generating them is completely different, and linear recurrences computed without error would look much more regular. Notice that the first two images are generated by the same formula, with a single bit of difference in the precision used. The whim of this 1-bit difference in precision changes the image entirely. 29",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Algorithms and Data Structures 30 A Global Text",algorithms and data structures.pdf "3. Algorithm animation Exhibit 3.3: The effect of rounding errors in linear recurrence relations. Programming projects 1. Use your personal graphics frame program (the programming project of “graphics primitives and environments”) to implement and animate the convex hull algorithm example. 31",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 2. Use your graphics frame program to implement and animate the behavior of recurrence relations as discussed in the section “A gallery of algorithm snapshots”. 3. Extend your graphics frame program with a set of dialog control operations sufficient to guide the user through the various steps of the animation of recurrence relations: in particular, to give him the options, at any time, to enter a new set of parameters, then execute the algorithm and animate it in either 'movie mode' (it runs at a predetermined speed until stopped by the user), or 'step mode' [the display changes only when the user enters a logical command 'next' (e.g. by clicking the mouse or hitting a specific key)]. Algorithms and Data Structures 32 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Part II: Programming concepts: beyond notation Thoughts on the role of programming notations A programming language is the main interface between a programmer and the physical machine, and a novice programmer will tend to identify ""programming"" with ""programming in the particular language she has learned"". The realization that there is much to programming ""beyond notation"" (i.e. principles that transcend any one language) is a big step forward in a programmer's development. Part II aims to help the reader take this step forward. We present examples that are best understood by focusing on abstract principles of algorithm design, and only later do we grope for suitable notations to turn this principle into an algorithm expressed in sufficient detail to become executable. In keeping with our predilection for graphic",algorithms and data structures.pdf "into an algorithm expressed in sufficient detail to become executable. In keeping with our predilection for graphic communication, the first informal expression of an algorithmic idea is often pictorial. We show by example how such representations, although they may be incomplete, can be turned into programs in a formal notation. The literature on programming and languages. There are many books that present principles of programming and of programming languages from a higher level of abstraction. The principles highlighted differ from author to author, ranging from intuitive understanding to complete formality. The following textbooks provide an excellent sample from the broad spectrum of approaches: [ASS 84], [ASU 86], [Ben 82], [Ben 85], [Ben 88], [Dij 76], [DF 88], [Gri 81], and [Mey 90]. Algorithms and Data Structures 33 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 4. Algorithms and programs as literature: substance and form Learning objectives: • programming in the large versus programming in the small • large flat programs versus small deep programs • programs as literature • fractal pictures: snowflakes and Hilbert's space-filling curve • recursive definition of fractals by production or rewrite rules • Pascal and programming notations Programming in the large versus programming in the small In studying and discussing the art of programming it is useful to distinguish between large programs and small programs, since these two types impose fundamentally different demands on the programmer. Programming in the large Large programs (e.g. operating systems, database systems, compilers, application packages) tax our organizational ability. The most important issues to be dealt with include requirements analysis, functional",algorithms and data structures.pdf "organizational ability. The most important issues to be dealt with include requirements analysis, functional specification, compatibility with other systems, how to break a large program into modules of manageable size, documentation, adaptability to new systems and new requirements, how to organize the team of programmers, and how to test the software. These issues are the staple of software engineering. When compared to the daunting managerial and design challenges, the task of actual coding is relatively simple. Large programs are often flat: Most of the listing consists of comments, interface specifications, definitions, declarations, initializations, and a lot of code that is executed only rarely. Although the function of any single page of source code may be rather trivial when considered by itself, it is difficult to understand the entire program, as you need a lot of information to understand",algorithms and data structures.pdf "considered by itself, it is difficult to understand the entire program, as you need a lot of information to understand how this page relates to the whole. The classic book on programming in the large is [Bro 75]. Programming in the small Small programs, of the kind discussed in this book, challenge our technical know-how and inventiveness. Algorithmic issues dominate the programmer's thinking: Among several algorithms that all solve the same problem, which is the most efficient under the given circumstances? How much time and space does it take? What data structures do we use? In contrast to large programs, small programs are usually deep, consisting of short, compact code many of whose statements are executed very often. Understanding a small program may also be difficult, at least initially, since the chain of thought is often subtle. Once you understand it thoroughly, you can",algorithms and data structures.pdf "difficult, at least initially, since the chain of thought is often subtle. Once you understand it thoroughly, you can reproduce it at any time with much less effort than was first required. Mastery of interesting small programs is the Algorithms and Data Structures 34 A Global Text",algorithms and data structures.pdf "4. Algorithms and programs as literature: substance and form best way to get started in computer science. We encourage the reader to work out all the details of the examples we present. This book is concerned only with programming in the small. This decision determines our choice of topics to be presented, our style of presentation, and the notation we use to express programs, explanations, and proofs, and heavily influences our comments on techniques of programming. Our style of presentation appeals to the reader's intuition more than to formal rigor. We aim at highlighting the key idea of any argument that we make rather than belaboring the details. We take the liberty of using a free notation that suits the purpose of any specific argument we wish to make, trusting that the reader understands our small programs so well that he can translate them into the programming language of his choice. In a nut shell, we emphasize substance over form.",algorithms and data structures.pdf "them into the programming language of his choice. In a nut shell, we emphasize substance over form. The purpose of Part II is to help engender a fluency in using different notations. We provide yet other examples of unconventional notations that match the nature of the problem they are intended to describe, and we show how to translate them into Pascal-like programs. Since much of the difference between programming languages is merely syntactic, we include two chapters that cover the basics of syntax and syntax analysis. These topics are important in their own right; we present them early in the hope that they will help the student see through differences of notation that are merely ""syntactic sugar"". Documentation versus literature: is it meant to be read? It is instructive to distinguish two types of written materials, and two corresponding types of writing tasks:",algorithms and data structures.pdf "It is instructive to distinguish two types of written materials, and two corresponding types of writing tasks: documents and literature. Documents are constrained by requirements of many kinds, are read when a specific need arises (rarely for pleasure), and their quality is judged by criteria such as formality, conformity to a standard, completeness, accuracy, and consistency. Literature is a form of art free from conventions, read for education or entertainment, and its quality is judged by aesthetic criteria much harder to enumerate than the ones above. The touchstone is the question: Is it meant to be read? If the answer is ""only if necessary"", then it's a document, not literature. As the name implies, the documentation of large programs is a typical document-writing chore. Much has been written in software engineering about documentation, a topic whose importance grows with the size and complexity",algorithms and data structures.pdf "written in software engineering about documentation, a topic whose importance grows with the size and complexity of the system to be documented. We hold that small programs are not documented, they are explained. As such, they are literature, or ought to be. The idea of programs as literature is widely held (see, e.g. [Knu 84]). The key idea is that an algorithm or program is part of the text and melts into the text in the same way as a paragraph, a formula, or a picture does. There are also formal notations and systems designed to support a style of programming that integrates text and code to form a package that is both readable for humans and executable by machines [Knu 83]. Whatever notation is used for literate programming, it has to describe all phases of a program's evolution, from idea to specification to algorithm to program. Details of a good program cannot be understood, or at least not",algorithms and data structures.pdf "idea to specification to algorithm to program. Details of a good program cannot be understood, or at least not appreciated, without an awareness of the grand design that guided the programmer. Whereas details are usually well expressed in some formal notation, grand designs are not. For this reason we renounce formality and attempt to convey ideas in whatever notation suits our purpose of insightful explanation. Let us illustrate this philosophy with some examples. 35",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License A snowflake Fractal pictures are intuitively characterized by the requirement that any part of the picture, of any size, when sufficiently magnified, looks like the whole picture. Two pieces of information are required to define a specific fractal: 1. A picture primitive that serves as a building-block: Many copies of this primitive, scaled to many different sizes, are composed to generate the picture. 2. A recursive rule that defines the relative position of the primitives of different size. A picture primitive is surely best defined by a drawing, and the manner of composing primitives in space again calls for a pictorial representation, perhaps augmented by a verbal explanation. In this style we define the fractal 'Snowflake' by the following production rule, which we read as follows: A line segment, as shown on the left-hand",algorithms and data structures.pdf "'Snowflake' by the following production rule, which we read as follows: A line segment, as shown on the left-hand side, must be replaced by a polyline, a chain of four shorter segments, as shown at the right-hand side ( Exhibit 4.1). We start with an initial configuration (the zero-generation) consisting of a single segment ( Exhibit 4.2). If we apply the production rule just once to every segment of the current generation, we obtain successively a first, second, and third generation, as shown in Exhibit 4.3. Further generations quickly exhaust the resolution of a graphics screen or the printed page, so we stop drawing them. The curve obtained as the limit when this process is continued indefinitely is a fractal. Although we cannot draw it exactly, one can study it as a mathematical object and prove theorems about it. Exhibit 4.1: Production for replacing a straight-line segment by a polyline Exhibit 4.2: The simplest initial configuration",algorithms and data structures.pdf "theorems about it. Exhibit 4.1: Production for replacing a straight-line segment by a polyline Exhibit 4.2: The simplest initial configuration Exhibit 4.3: The first three generations The production rule drawn above is the essence of this fractal, and of the sequence of pictures that lead up to it. The initial configuration, on the other hand, is quite arbitrary: If we had started with a regular hexagon, rather than a single line segment, the pictures obtained would really have lived up to their name, snowflake. Any other initial configuration still generates curves with the unmistakable pattern of snowflakes, as the reader is encouraged to verify. After having familiarized ourselves with the objects described, let us turn our attention to the method of description and raise three questions about the formality and executability of such notations. 1. Is our notation sufficiently formal to serve as a program for a computer to draw the family of generations of",algorithms and data structures.pdf "1. Is our notation sufficiently formal to serve as a program for a computer to draw the family of generations of snowflakes? Certainly not, as we stated certain rules in colloquial language and left others completely unsaid, implying them only by sample drawings. As an example of the latter, consider the question: If a Algorithms and Data Structures 36 A Global Text",algorithms and data structures.pdf "4. Algorithms and programs as literature: substance and form segment is to be replaced by a ""plain with a mountain in the center"", on which side of the segment should the peak point? The drawings above suggest that all peaks stick out on the same side of the curve, the outside. 2. Could our method of description be extended and formalized to serve as a programming language for fractals? Of course. As an example, the production shown in Exhibit 4.4 specifies the side on which the peak is to point. Every segment now has a + side and a – side. The production above states that the new peak is to grow over the + side of the original segment and specifies the + sides and – sides of each of the four new segments. For every other aspect that our description may have left unspecified, such as placement on the screen, some notation could readily be designed to specify every detail with complete",algorithms and data structures.pdf "placement on the screen, some notation could readily be designed to specify every detail with complete rigor. In “Syntax” and “Syntax analysis” we introduce some of the basic techniques for designing and using formal notations. Exhibit 4.4: Refining the description to specify a ""left-right"" orientation. 3. Should we formalize this method of description and turn it into a machine-executable notation? It depends on the purpose for which we plan to use it. Often in this book we present just one or a few examples that share a common design. Our goal is for the reader to understand these few examples, not to practice the design of artificial programming languages. To avoid being sidetracked by a pedantic insistence on rigorous notation, with its inevitable overhead of introducing formalisms needed to define all details, we prefer to stop when we have given enough information for an attentive reader to grasp the main idea of each example.",algorithms and data structures.pdf "stop when we have given enough information for an attentive reader to grasp the main idea of each example. Hilbert's space-filling curve Space-filling curves have been an object of mathematical curiosity since the nineteenth century, as they can be used to prove that the cardinality of an interval, considered as a set of points, equals the cardinality of a square (or any other finite two-dimensional region). The term space-filling describes the surprising fact that such a curve visits every point within a square. In mathematics, space-filling curves are constructed as the limit to which an infinite sequence of curves Ci converges. On a discretized plane, such as a raster-scanned screen, no limiting process is needed, and typically one of the first dozen curves in the sequence already paints every pixel, so the term space-filling is quickly seen to be appropriate.",algorithms and data structures.pdf "space-filling is quickly seen to be appropriate. Let us illustrate this phenomenon using Hilbert's space-filling curve (David Hilbert, 1862–1943), whose first six approximations are shown in Exhibit 4.5. As the pictures suggest, Hilbert curves are best-described recursively, but the composition rule is more complicated than the one for snowflakes. We propose the two productions shown in Exhibit 4.6 to capture the essence of Hilbert (and similar) curves. This pictorial program requires explanation, but we hope the reader who has once understood it will find this notation useful for inventing fractals of her own. As always, a production is read: ""To obtain an instance of the left-handside, get instances of all the things listed on the right-handside"", or equivalently, ""to do the task specified by the left-hand side, do all the tasks listed on the right- hand side"". 37",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 4.5: Six generations of the family of Hilbert curves Exhibit 4.6: Productions for painting a square in terms of its quadrants The left-hand side of the first production stands for the task: paint a square of given size, assuming that you enter at the lower left corner facing in the direction indicated by the arrow and must leave in the upper left corner, again facing in the direction indicated by that arrow. We assume turtle graphics primitives, where the state of the brush is given by a position and a direction. The hatching indicates the area to be painted. It lies to the right of the line that connects entry and exit corners, which we read as ""paint with your right hand"", and the hatching is in thick strokes. The left-hand side of the second production is similar: Paint a square ""with your left hand"" (hatching is in thin strokes), entering and exiting as indicated by the arrows.",algorithms and data structures.pdf "thin strokes), entering and exiting as indicated by the arrows. The right-hand sides of the productions are now easily explained. They say that in order to paint a square you must paint each of its quadrants, in the order indicated. They give explicit instructions on where to enter and exit, Algorithms and Data Structures 38 A Global Text",algorithms and data structures.pdf "4. Algorithms and programs as literature: substance and form what direction to face, and whether you are painting with your right or left hand. The last detail is to make sure that when the brush exits from one quadrant it gets into the correct state for entering the next. This requires the brush to turn by 90˚, either left or right, as the curved arrows in the pictures indicate. In the continuous plane we imagine the brush to ""turn on its heels"", whereas on a discrete grid it also moves to the first grid point of the adjacent quadrant. These productions omit any rule for termination, thus simulating the limiting process of true space-filling curves. To draw anything on the screen we need to add some termination rules that specify two things: (1) when to invoke the termination rule (e.g. at some fixed depth of recursion), and (2) how to paint the square that invokes the",algorithms and data structures.pdf "invoke the termination rule (e.g. at some fixed depth of recursion), and (2) how to paint the square that invokes the termination rule (e.g. paint it all black). As was the case with snowflakes and with all fractals, the primitive pictures are much less important than the composition rule, so we omit it. The following program implements a specific version of the two pictorial productions shown above. The procedure 'Walk' implements the curved arrows in the productions: the brush turns by 'halfTurn', takes a step of length s, and turns again by 'halfTurn'. The parameter 'halfTurn' is introduced to show the effect of cumulative small errors in recursive procedures. 'halfTurn = 45' causes the brush to make right-angle turns and yields Hilbert curves. The reader is encouraged to experiment with 'halfTurn = 43, 44, 46, 47', and other values. program PaintAndWalk; const pi = 3.14159; s = 3; { step size of walk }",algorithms and data structures.pdf "program PaintAndWalk; const pi = 3.14159; s = 3; { step size of walk } var turtleHeading: real; { counterclockwise, radians } halfTurn, depth: integer; { recursive depth of painting } procedure TurtleTurn(angle: real); { turn the turtle angle degrees counterclockwise } begin { angle is converted to radian before adding } turtleHeading := turtleHeading + angle · pi / 180.0 end; { TurtleTurn } procedure TurtleLine(dist: real); { draws a straight line, dist units long } begin Line(round(dist · cos(turtleHeading)), round(–dist·sin(turtle Heading))) end; { TurtleLine } procedure Walk (halfTurn: integer); begin TurtleTurn(halfTurn); TurtleLine(s); TurtleTurn(halfTurn) end; procedure Qpaint (level: integer; halfTurn: integer); begin if level = 0 then TurtleTurn(2 · halfTurn) else begin Qpaint(level – 1, –halfTurn); Walk(halfTurn); Qpaint(level – 1, halfTurn); Walk(–halfTurn); Qpaint(level – 1, halfTurn); Walk(halfTurn); Qpaint(level – 1, –halfTurn) end end; { Qpaint }",algorithms and data structures.pdf "Qpaint(level – 1, halfTurn); Walk(–halfTurn); Qpaint(level – 1, halfTurn); Walk(halfTurn); Qpaint(level – 1, –halfTurn) end end; { Qpaint } begin { PaintAndWalk } 39",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License ShowText; ShowDrawing; MoveTo(100, 100); turtleHeading := 0; { initialize turtle state } WriteLn('Enter halfTurn 0 .. 359 (45 for Hilbert curves): '); ReadLn(halfTurn); TurtleTurn(–halfTurn); { init turtle turning angle } Write('Enter depth 1 .. 6: '); ReadLn(depth); Qpaint(depth, halfTurn) end. { PaintAndWalk } As a summary of this discourse on notation, we point to the fact that an executable program necessarily has to specify many details that are irrelevant from the point of view of human understanding. This book assumes that the reader has learned the basic steps of programming, of thinking up such details, and being able to express them formally in a programming language. Compare the verbosity of the one-page program above with the clarity and conciseness of the two pictorial productions above. The latter state the essentials of the recursive construction, and",algorithms and data structures.pdf "conciseness of the two pictorial productions above. The latter state the essentials of the recursive construction, and no more, in a manner that a human can understand ""at a glance"". We aim our notation to appeal to a human mind, not necessarily to a computer, and choose our notation accordingly. Pascal and its dialects: lingua franca of computer science Lingua franca (1619): 1. A common language that consists of Italian mixed with French, Spanish, Greek and Arabic and is spoken in Mediterranean ports 2. Any of various languages used as common or commercial tongues among peoples of diverse speech 3. Something resembling a common language (From Webster's Collegiate Dictionary) Pascal as representative of today's programming languages The definition above fits Pascal well: In the mainstream of the development of programming languages for a",algorithms and data structures.pdf "The definition above fits Pascal well: In the mainstream of the development of programming languages for a couple of decades, Pascal embodies, in a simple design, some of the most important language features that became commonly accepted in the 1970s. This simplicity, combined with Pascal's preference for language features that are now well understood, makes Pascal a widely understood programming notation. A few highlights in the development of programming languages may explain how Pascal got to be a lingua franca of computer science. Fortran emerged in 1954 as the first high-level programming language to gain acceptance and became the programming language of the 1950s and early 1960s. Its appearance generated great activity in language design, and suddenly, around 1960, dozens of programming languages emerged. Three among these, Algol 60, COBOL, and Lisp, became milestones in the development of programming languages, each in its own way. Whereas COBOL",algorithms and data structures.pdf "Lisp, became milestones in the development of programming languages, each in its own way. Whereas COBOL became the most widely used language of the 1960s and 1970s, and Lisp perhaps the most innovative, Algol 60 became the most influential in several respects: it set new standards of rigor for the definition and description of a language, it pioneered hierarchical block structure as the major technique for organizing large programs, and through these major technical contributions became the first of a family of mainstream programming languages that includes PL/1, Algol 68, Pascal, Modula-2, and Ada. The decade of the 1960s remained one of great ferment and productivity in the field of programming languages. PL/1 and Algol 68, two ambitious projects that attempted to integrate many recent advances in programming language technology and theory, captured the lion's share of attention for several years. Pascal, a much smaller",algorithms and data structures.pdf "language technology and theory, captured the lion's share of attention for several years. Pascal, a much smaller Algorithms and Data Structures 40 A Global Text",algorithms and data structures.pdf "4. Algorithms and programs as literature: substance and form project and language designed by Niklaus Wirth during the 1960s, ended up eclipsing both of these major efforts. Pascal took the best of Algol 60, in streamlined form, and added just one major extension, the then novel type definitions [Hoa 72]. This lightweight edifice made it possible to implement efficient Pascal compilers on the microcomputers that mushroomed during the mid 1970s (e.g. UCSD Pascal), which opened the doors to universities and high schools. Thus Pascal became the programming language most widely used in introductory computer science education, and every computer science student must be fluent in it. Because Pascal is so widely understood, we base our programming notation on it but do not adhere to it slavishly. Pascal is more than 20 years old, and many of its key ideas are 30 years old. With today's insights into",algorithms and data structures.pdf "slavishly. Pascal is more than 20 years old, and many of its key ideas are 30 years old. With today's insights into programming languages, many details would probably be chosen differently. Indeed, there are many ""dialects"" of Pascal, which typically extend the standard defined in 1969 [Wir 71] in different directions. One extension relevant for a publication language is that with today's hardware that supports large character sets and many different fonts and styles, a greater variety of symbols can be used to make the source more readable. The following examples introduce some of the conventions that we use often. ""Syntactic sugar"": the look of programming notations Pascal statements lack an explicit terminator. This makes the frequent use of begin-end brackets necessary, as in the following program fragment, which implements the insertion sort algorithm (see chapter 17 and the section",algorithms and data structures.pdf "the following program fragment, which implements the insertion sort algorithm (see chapter 17 and the section ""Simple sorting algorithms that work in time""); –∞ denotes a constant ≤ any key value: A[0] := –∞; for i := 2 to n do begin j := i; while A[j] < A[j – 1] do begin t := A[j]; A[j] := A[j – 1]; A[j – 1] := t; j := j – 1 end; end; We aim at brevity and readability but wish to retain the flavor of Pascal to the extent that any new notation we introduce can be translated routinely into standard Pascal. Thus we write the statements above as follows: A[0] := –∞; for i := 2 to n do begin j := i; { comments appear in italics } while A[j] < A[j – 1] do { A[j] :=: A[j – 1]; j := j – 1 } { braces serve as general-purpose brackets, including begin-end } { :=: denotes the exchange operator } end; Borrowing heavily from standard mathematical notation, we use conventional mathematical signs to denote",algorithms and data structures.pdf "{ :=: denotes the exchange operator } end; Borrowing heavily from standard mathematical notation, we use conventional mathematical signs to denote operators whose Pascal designation was constrained by the small character sets typical of the early days, such as: ≠ ≤ ≥ ≠ ¬ ∧ ∨ ∈ ∉ ∩ ∪ \ |x| instead of <> <= >= <> not and or in not in · + – abs(x) respectively We also use signs that may have no direct counterpart in Pascal, such as: ⊃ ⊇ ⊄ ⊂ ⊆ Set-theoretic relations ∞ Infinity, often used for a ""sentinel"" (i.e. a number larger than all numbers to be processed in a given 41",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License application) ± Plus-or-minus, used to define an interval [of uncertainty] ∑∏ Sum and product x Ceiling of a real number x (i.e. the smallest integer ≥ x) x Floor of a real number x (i.e. the largest integer ≤ x) √ Square root log Logarithm to the base 2 ln Natural logarithm, to the base e iff If and only if Although we may take a cavalier attitude toward notational differences, and readily use concise notations such as ∧ ∨ for the more verbose 'and', 'or', we will try to remind readers explicitly about our assumptions when there is a question about semantics. As an example, we assume that the boolean operators ∧ and ∨ are conditional, also called 'cand' and 'cor': An expression containing these operators is evaluated from left to right, and the evaluation stops as soon as the result is known. In the expression x ∧ y, for example, x is evaluated first. If x evaluates to 'false', the",algorithms and data structures.pdf "soon as the result is known. In the expression x ∧ y, for example, x is evaluated first. If x evaluates to 'false', the entire expression is 'false' without y ever being evaluated. This convention makes it possible to leave y undefined when x is 'false'. Only if x evaluates to 'true' do we proceed to evaluate y. An analogous convention applies to x ∨ y. Program structure Whereas the concise notations introduced above to denote operators can be translated almost one-to-one into a single line of standard Pascal, we also introduce a few extensions that may affect the program structure. In our view these changes make programs more elegant and easier to understand. Borrowing from many modern languages, we introduce a 'return()' statement to exit from procedures and functions and to return the value computed by a function. Example function gcd(u, v: integer): integer; { computes the greatest common divisor (gcd) of u and v }",algorithms and data structures.pdf "function. Example function gcd(u, v: integer): integer; { computes the greatest common divisor (gcd) of u and v } begin if v = 0 then return(u) else return(gcd(v, u mod v)) end; In this example, 'return()' merely replaces the Pascal assignments 'gcd := u' and 'gcd := gcd(v, u mod v)'. The latter in particular illustrates how 'return()' avoids a notational blemish in Pascal: On the left of the second assignment, 'gcd' denotes a variable, on the right a function. 'Return()' also has the more drastic consequence that it causes control to exit from the surrounding procedure or function as soon as it is executed. Without entering into a controversy over the general advantages and disadvantages of this ""flow of control"" mechanism, let us present one example, typical of many search procedures, where 'return()' greatly simplifies coding. The point is that a search Algorithms and Data Structures 42 A Global Text",algorithms and data structures.pdf "4. Algorithms and programs as literature: substance and form routine terminates in one of (at least) two different ways: successfully, by having found the item in question, or unsuccessfully, because of a number of reasons (the item is not present, and some index is about to fall outside the range of a table; we cannot insert an item because the table is full, or we cannot pop a stack because it is empty, etc.). For the sake of efficiency as well as readability we prefer to exit from the routine as soon as a case has been identified and dealt with, as the following example from “Address computation:” illustrates: function insert-into-hash-table(x: key): addr; var a: addr; begin a := h(x); { locate the home address of the item x to be inserted } while T[a] ≠ empty do begin { skipping over cells that are already occupied } if T[a] = x then return(a); { x is already present; return its address } a := (a + 1) mod m { keep searching at the next address } end;",algorithms and data structures.pdf "if T[a] = x then return(a); { x is already present; return its address } a := (a + 1) mod m { keep searching at the next address } end; { we've found an empty cell; see if there is room for x to be inserted } if n < m – 1 then { n := n + 1; T[a] := x } else err- msg('table is full'); return(a) { return the address where x was inserted } end; This code can only be appreciated by comparing it with alternatives that avoid the use of 'return()'. We encourage readers to try their hands at this challenge. Notice the three different ways this procedure can terminate: (1) no need to insert x because x is already in the table, (2) impossible to insert x because the table is full, and (3) the normal case when x is inserted. Standard Pascal incorporates no facilities for ""exception handling"" (e.g. to cover the first two cases that should occur only rarely) and forces all three outcomes to exit the procedure at its textual end.",algorithms and data structures.pdf "cover the first two cases that should occur only rarely) and forces all three outcomes to exit the procedure at its textual end. Let us just mention a few other liberties that we may take. Whereas Pascal limits results of functions to certain simple types, we will let them be of any type: in particular, structured types, such as records and arrays. Rather than nesting if-then-else statements in order to discriminate among more than two mutually exclusive cases, we use the ""flat"" and more legible control structure: if B1 then S1 elsif B2 then S2 elsif … else Sn ; Our sample programs do not return dynamically allocated storage explicitly. They rely on a memory management system that retrieves free storage through ""garbage collection"". Many implementations of Pascal avoid garbage collection and instead provide a procedure 'dispose(…)' for the programmer to explicitly return unneeded",algorithms and data structures.pdf "garbage collection and instead provide a procedure 'dispose(…)' for the programmer to explicitly return unneeded cells. If you work with such a version of Pascal and write list-processing programs that use significant amounts of memory, you must insert calls to 'dispose(…)' in appropriate places in your programs. The list above is not intended to be exhaustive, and neither do we argue that the constructs we use are necessarily superior to others commonly available. Our reason for extending the notation of Pascal (or any other programming language we might have chosen as a starting point) is the following: in addressing human readers, we believe an open-ended, somewhat informal notation is preferable to the straightjacket of any one programming language. The latter becomes necessary if and when we execute a program, but during the incubation period when 43",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License our understanding slowly grows toward a firm grasp of an idea, supporting intuition is much more important than formality. Thus we describe data structures and algorithms with the help of figures, words, and programs as we see fit in any particular instance. Programming project 1. Use your graphics frame program of “Graphics primitives and environments” to implement an editor for simple graphics productions such as those used to define snowflakes (e.g. 'any line segment gets replaced by a specified sequence of line segments'), and an interpreter that draws successive generations of the fractals defined by these productions. Algorithms and Data Structures 44 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 5. Divide-and-conquer and recursion Learning objectives: • The algorithmic principle of divide-and-conquer leads directly to recursive procedures. • Examples: Merge sort, tree traversal. Recursion and iteration. • My friend liked to claim ""I'm 2/3 Cherokee."" Until someone would challenge him ""Two- thirds? You mean 1/2 , or, or maybe 3/8, how on earth can you be 2/3 of anything?"" ""It's easy,"" said Jim, ""both my parents are 2/3."" An algorithmic principle Let A(D) denote the application of an algorithm A to a set of data D, producing a result R. An important class of algorithms, of a type called divide-and-conquer, processes data in two distinct ways, according to whether the data is small or large: • If the set D is small, and/or of simple structure, we invoke a simple algorithm A 0 whose application A 0(D) yields R.",algorithms and data structures.pdf "is small or large: • If the set D is small, and/or of simple structure, we invoke a simple algorithm A 0 whose application A 0(D) yields R. • If the set D is large, and/or of complex structure, we partition it into smaller subsets D 1, … , D k. For each i, apply A(Di) to yield a result Ri. Combine the results R1, … , Rk to yield R. This algorithmic principle of divide-and-conquer leads naturally to the notion of recursive procedures. The following example outlines the concept in a high-level notation, highlighting the role of parameters and local variables. procedure A(D: data; var R: result); var D1, … , Dk: data; R1, … , Rk: result; begin if simple(D) then R := A0(D) else { D1, … , Dk := partition(D); R1 := A(D1); … ; Rk := A(Dk); R := combine(R1, … , Rk) } end; Notice how an initial data set D spawns set s D1, … , D k which, in turn, spawn children of their own. Thus the",algorithms and data structures.pdf "R := combine(R1, … , Rk) } end; Notice how an initial data set D spawns set s D1, … , D k which, in turn, spawn children of their own. Thus the collection of all data sets generated by the partitioning scheme is a tree with root D. In order for the recursive procedure A(D) to terminate in all cases, the partitioning function must meet the following condition: Each branch of the partitioning tree, starting from the root D, eventually terminates with a data set D 0 that satisfies the predicate 'simple(D0)', to which we can apply the algorithm. Divide-and-conquer reduces a problem on data set D to k instances of the same problem on new sets D 1, … , D k that are ""simpler"" than the original set D. Simpler often means ""has fewer elements"", but any measure of Algorithms and Data Structures 45 A Global Text",algorithms and data structures.pdf "5. Divide-and-conquer and recursion ""simplicity"" that monotonically heads for the predicate 'simple' will do, when algorithm A0 will finish the job. ""D is simple"" may mean ""D has no elements"", in which case A 0 may have to do nothing at all; or it may mean ""D has exactly one element"", and A0 may just mark this element as having been visited. The following sections show examples of divide-and-conquer algorithms. As we will see, the actual workload is sometimes distributed unequally among different parts of the algorithm. In the sorting example, the step 'R:=combine(R1, … , R k)' requires most of the work; in the ""Tower of Hanoi"" problem, the application of algorithm A0 takes the most effort. Divide-and-conquer expressed as a diagram: merge sort Suppose that we wish to sort a sequence of names alphabetically, as shown in Exhibit 5.1. We make use of the",algorithms and data structures.pdf "Suppose that we wish to sort a sequence of names alphabetically, as shown in Exhibit 5.1. We make use of the divide-and-conquer strategy by partitioning a ""large"" sequence D into two subsequences D 1 and D 2, sorting each subsequence, and then merging them back together into sorted order. This is our algorithm A(D). If D contains at most one element, we do nothing at all. A0 is the identity algorithm, A0(D) = D. Exhibit 5.1: Sorting the sequence {Z, A, S, D} by using a divide-and-conquer scheme procedure sort(var D: sequence); var D1, D2: sequence; function combine(D1, D2: sequence): sequence; begin { combine } merge the two sorted sequences D1 and D2 into a single sorted sequence D'; return(D') end; { combine } begin { sort} if |D| > 1 then { split D into two sequences D1 and D2 of equal size; sort(D1); sort(D2); D := combine(D1, D2) } { if |D| ≤ 1, D is trivially sorted, do nothing } end; { sort } 46",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License In the chapter on “sorting and its complexity”, under the section “merging and merge sorts” we turn this divide- and-conquer scheme into a program. Recursively defined trees A tree, more precisely, a rooted, ordered tree, is a data type used primarily to model any type of hierarchical organization. Its primitive parts are nodes and leaves. It has a distinguished node called the root, which, in violation of nature, is typically drawn at the top of the page, with the tree growing downward. Each node has a certain number of children, either leaves or nodes; leaves have no children. The exact definition of such trees can differ slightly with respect to details and terminology. We may define a binary tree, for example, by the condition that each node has either exactly, or at most, two children.",algorithms and data structures.pdf "that each node has either exactly, or at most, two children. The pictorial grammar shown in Exhibit 5.2 captures this recursive definition of 'binary tree' and fixes the details left unspecified by the verbal description above. It uses an alphabet of three symbols: the nonterminal 'tree symbol', which is also the start symbol; and two terminal symbols, for 'node' and for 'leaf'. Exhibit 5.2: The three symbols of the alphabet of a tree grammar There are two production or rewriting rules, p1 and p2 ( Exhibit 5.3 ). The derivation shown in Exhibit 5.4 illustrates the application of the production rules to generate a tree from the nonterminal start symbol. Exhibit 5.3: Rule p1 generates a leaf, rule p2 generates a node and two new trees Exhibit 5.4: One way to derive the tree at right We may make the production rules more detailed by explicitly naming the coordinates associated with each",algorithms and data structures.pdf "We may make the production rules more detailed by explicitly naming the coordinates associated with each symbol. On a display device such as a computer screen, the x- and y-values of a point are typically Cartesian coordinates with the origin in the upper-left corner. The x-values increase toward the bottom and the y-values increase toward the right of the display. Let (x, y) denote the screen position associated with a particular symbol, and let d denote the depth of a node in the tree. The root has depth 0, and the children of a node with depth d have depth d+1. The different levels of the tree are separated by some constant distance s. The separation between siblings is determined by a (rapidly decreasing) function t(d) which takes as argument the depth of the siblings and depends on the drawing size of the symbols and the resolution of the screen. These more detailed productions are shown in Exhibit 5.5. Algorithms and Data Structures 47 A Global Text",algorithms and data structures.pdf "5. Divide-and-conquer and recursion Exhibit 5.5: Adding coordinate information to productions in order to control graphic layout The translation of these two rules into high-level code is now plain: procedure p1(x, y: coordinate); begin eraseTreeSymbol(x, y); drawLeafSymbol(x, y) end; procedure p2(x, y: coordinate; d: level); begin eraseTreeSymbol(x, y); drawNodeSymbol(x, y); drawTreeSymbol(x + s, y – t(d + 1)); drawTreeSymbol(x + s, y + t(d + 1)) end; If we choose t(d) = c · 2–d, these two procedures produce the display shown in Exhibit 5.6 of the tree generated in Exhibit 5.4. Exhibit 5.6: Sample layout obtained by halving horizontal displacement at each successive level Technical remark about the details of defining binary trees: Our grammar forces every node to have exactly two children: A child may be a node or a leaf. This lets us subsume two frequently occurring classes of binary trees under one common definition.",algorithms and data structures.pdf "children: A child may be a node or a leaf. This lets us subsume two frequently occurring classes of binary trees under one common definition. 1. 0-2 (binary) trees. We may identify leaves and nodes, making no distinction between them (replace the squares by circles in Exhibit 5.3 and Exhibit 5.4). Every node in the new tree now has either zero or two children, but not one. The smallest tree has a single node, the root. 2. (Arbitrary) Binary trees. Ignore the leaves (drop the squares in Exhibit 5.3 and Exhibit 5.4 and the branches leading into a square). Every node in the new tree now has either zero, one, or two children. The smallest tree (which consisted of a single leaf) now has no node at all; it is empty. For clarity's sake, the following examples use the terminology of nodes and leaves introduced in the defining grammar. In some instances we point out what happens under the interpretation that leaves are dropped. 48",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Recursive tree traversal Recursion is a powerful tool for programming divide-and-conquer algorithms in a straightforward manner. In particular, when the data to be processed is defined recursively, a recursive processing algorithm that mirrors the structure of the data is most natural. The recursive tree traversal procedure below illustrates this point. Traversing a tree (in general: a graph, a data structure) means visiting every node and every leaf in an orderly sequence, beginning and ending at the root. What needs to be done at each node and each leaf is of no concern to the traversal algorithm, so we merely designate that by a call to a 'procedure visit( )'. You may think of inspecting the contents of all nodes and/or leaves, and writing them to a file. Recursive tree traversals use divide-and-conquer to decompose a tree into its subtrees: At each node visited",algorithms and data structures.pdf "Recursive tree traversals use divide-and-conquer to decompose a tree into its subtrees: At each node visited along the way, the two subtrees L and R to the left and right of this node must be traversed. There are three natural ways to sequence the node visit and the subtree traversals: 1. node; L; R { preorder, or prefix } 2. L; node; R { inorder or infix } 3. L; R; node { postorder or suffix } The following example translates this traversal algorithm into a recursive procedure: procedure traverse(T: tree); { preorder, inorder, or postorder traversal of tree T with leaves } begin if leaf(T) then visitleaf(T) else { T is composite } { visit1(root(T)); traverse(leftsubtree(T)); visit2(root(T)); traverse(rightsubtree(T); visit3(root(T)) } end; When leaves are ignored (i.e. a tree consisting of a single leaf is considered to be empty), the procedure body becomes slightly simpler: if not empty(T) then { … }",algorithms and data structures.pdf "becomes slightly simpler: if not empty(T) then { … } To accomplish the k-th traversal scheme (k = 1, 2, 3), 'visit k' performs the desired operation on the node, while the other two visits do nothing. If all three visits print out the name of the node, we obtain a sequence of node names called 'triple tree traversal', shown in Exhibit 5.7 along with the three traversal orders of which it is composed. During the traversal the nodes are visited in the following sequence: Algorithms and Data Structures 49 A Global Text",algorithms and data structures.pdf "5. Divide-and-conquer and recursion Exhibit 5.7: Three standard orders merged into a triple tree traversal Recursion versus iteration: the Tower of Hanoi The ""Tower of Hanoi"" is a stack of n disks of different sizes, held in place by a tall peg (Exhibit 5.8). The task is to transfer the tower from source peg S to a target peg T via an intermediate peg I, one disk at a time, without ever placing a larger disk on a smaller one. In this case the data set D is a tower of n disks, and the divide-and-conquer algorithm A partitions D asymmetrically into a small ""tower"" consisting of a single disk (the largest, at the bottom of the pile) and another tower D' (usually larger, but conceivably empty) consisting of the n – 1 topmost disks. The puzzle is solved recursively in three steps: 1. Transfer D' to the intermediate peg I. 2. Move the largest disk to the target peg T. 3. Transfer D' on top of the largest disk at the target peg T.",algorithms and data structures.pdf "2. Move the largest disk to the target peg T. 3. Transfer D' on top of the largest disk at the target peg T. Exhibit 5.8: Initial configuration of the Tower of Hanoi. Step 1 deserves more explanation. How do we transfer the n – 1 topmost disks from one peg to another? Notice that they themselves constitute a tower, to which we may apply the same three-step algorithm. Thus we are presented with successively simpler problems to solve, namely, transferring the n – 1 topmost disks from one peg to another, for decreasing n, until finally, for n = 0, we do nothing. procedure Hanoi(n: integer; x, y, z: peg); { transfer a tower with n disks from peg x, via y, to z } begin if n > 0 then { Hanoi(n – 1, x, z, y); move(x, z); Hanoi(n – 1, y, x, z) } end; Recursion has the advantage of intuitive clarity. Elegant and efficient as this solution may be, there is some complexity hidden in the bookkeeping implied by recursion. 50",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The following procedure is an equally elegant and more efficient iterative solution to this problem. It assumes that the pegs are cyclically ordered, and the target peg where the disks will first come to rest depends on this order and on the parity of n (Exhibit 5.9). For odd values of n, 'IterativeHanoi' moves the tower to peg I, for even values of n, to peg T. Exhibit 5.9: Cyclic order of the pegs. procedure IterativeHanoi(n: integer); var odd: boolean; { odd represents the parity of the move } begin odd := true; repeat case odd of true: transfer smallest disk cyclically to next peg; false: make the only legal move leaving the smallest in place end; odd := not odd until entire tower is on target peg end; Exercise: recursive or iterative pictures? Chapter 4 presented some beautiful examples of recursive pictures, which would be hard to program without",algorithms and data structures.pdf "Chapter 4 presented some beautiful examples of recursive pictures, which would be hard to program without recursion. But for simple recursive pictures iteration is just as natural. Specify a convenient set of graphics primitives and use them to write an iterative procedure to draw Exhibit 5.10 to a nesting depth given by a parameter d. Exhibit 5.10: Interleaved circles and equilateral triangles cause the radius to be exactly halved at each step. Solution There are many choices of suitable primitives and many ways to program these pictures. Specifying an equilateral triangle by its center and the radius of its circumscribed circle simplifies the notation. Assume that we may use the procedures: procedure circle(x, y, r: real); { coordinates of center and radius } procedure equitr(x, y, r: real); { center and radius of circumscribed circle} Algorithms and Data Structures 51 A Global Text",algorithms and data structures.pdf "5. Divide-and-conquer and recursion procedure citr(x, y, r: real; d: integer); var vr: real; { variable radius } i: integer; begin vr := r; for i := 1 to d do { equitr(x, y, vr); vr := vr/2; circle(x, y, vr) } { show that the radius of consecutively nested circles gets exactly halved at each step } end; The flag of Alfanumerica: an algorithmic novel on iteration and recursion In the process of automating its flag industry, the United States of Alfanumerica announced a competition for the most elegant program to print its flag: All solutions submitted to the prize committee fell into one of two classes, the iterative and recursive programs. The proponents of these two algorithm design principles could not agree on a winner, and the selection process sparked a civil war that split the nation into two: the Iterative States of Alfanumerica (ISA) and the Recursive States of Alfanumerica (RSA). Both nations fly the same flag but use entirely different production algorithms.",algorithms and data structures.pdf "of Alfanumerica (RSA). Both nations fly the same flag but use entirely different production algorithms. 1. Write a procedure ISA(k: integer); to print the ISA flag, using an iterative algorithm, of course. Assume that k is a power of 2 and k ≤ (half the line length of the printer). 2. Explain why the printer industry in RSA is much more innovative than the one in ISA. All modern RSA printers include operations for positioning the writing head anywhere within a line, and line feed works both forward and backward. 3. Specify the precise operations for some RSA printer of your design. Using these operations, write a recursive procedure RSA(k: integer); to print the RSA flag. 4. Explain an unforeseen consequence of this drive to automate the flag industry of Alfanumerica: In both ISA and RSA, a growing number of flags can be seen fluttering in the breeze turned around by 90˚. Exercises",algorithms and data structures.pdf "and RSA, a growing number of flags can be seen fluttering in the breeze turned around by 90˚. Exercises 1. Whereas divide-and-conquer algorithms usually attempt to divide the data in equal halves, the recursive Tower of Hanoi procedure presented in the section 'Recursion versus iteration: The Tower of Hanoi"" divides the data in a very asymmetric manner: a single disk versus n – 1 disks. Why? 2. Prove by induction on n that the iterative program 'IterativeHanoi' solves the problem in 2n–1 iterations. 52 **************** ******** ******** **** **** **** **** ** ** ** ** ** ** ** ** * * * * * * * * * * * * * * * * k blanks followed by k stars twice (k/2 blanks followed by k/2 stars) … continue doubling and halving down to runs length of 1.",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 6. Syntax Learning objectives: • syntax and semantics • syntax diagrams and EBNF describe context-free grammars • terminal and nonterminal symbols • productions • definition of EBNF by itself • parse tree • grammars must avoid ambiguities • infix, prefix, and postfix notation for arithmetic expressions • prefix and postfix notation do not need parentheses Syntax and semantics Computer science has borrowed some important concepts from the study of natural languages (e.g. the notions of syntax and semantics). Syntax rules prescribe how the sentences of a language are formed, independently of their meaning. Semantics deals with their meaning. The two sentences ""The child draws the horse"" and ""The horse draws the child"" are both syntactically correct according to the accepted rules of grammar. The first sentence clearly",algorithms and data structures.pdf "draws the child"" are both syntactically correct according to the accepted rules of grammar. The first sentence clearly makes sense, whereas the second sentence is baffling: perhaps senseless (if ""draw"" means ""drawing a picture""), perhaps meaningful (if ""draw"" means ""pull""). Semantic aspects—whether a sentence is meaningful or not, and if so, what it means—are much more difficult to formalize and decide than syntactic issues. However, the analogy between natural languages and programming languages does not go very far. The choice of English words and phrases such as ""begin"", ""end"", ""goto"", ""if-then-else"" lends a programming language a superficial similarity to natural language, but no more. The possibility of verbal encoding of mathematical formulas into pseudo-English has deliberately been built into COBOL; for example, ""compute velocity times time giving",algorithms and data structures.pdf "into pseudo-English has deliberately been built into COBOL; for example, ""compute velocity times time giving distance"" is nothing but syntactic sugar for ""distance := velocity · time"". Much more important is the distinction that natural languages are not rigorously defined (neither the vocabulary, nor the syntax, and certainly not the semantics), whereas programming languages should be defined according to a rigorous formalism. Programming languages are much closer to the formal notations of mathematics than to natural languages, and programming notation would be a more accurate term. The lexical part of a modern programming language [the alphabet, the set of reserved words, the construction rules for the identifiers (i.e. the equivalent to the vocabulary of a natural language) and the syntax are usually defined formally. However, system-dependent differences are not always described precisely. The compiler often",algorithms and data structures.pdf "defined formally. However, system-dependent differences are not always described precisely. The compiler often determines in detail the syntactic correctness of a program with respect to a certain system (computer and operating system). The semantics of a programming language could also be defined formally, but this is rarely done, because formal semantic definitions are extensive and difficult to read. Algorithms and Data Structures 53 A Global Text",algorithms and data structures.pdf "6. Syntax The syntax of a programming language is not as important as the semantics, but good understanding of the syntax often helps in understanding the language. With some practice one can often guess the semantics from the syntax, since the syntax of a well-designed programming language is the frame that supports the semantics. Grammars and their representation: syntax diagrams and EBNF The syntax of modern programming languages is defined by grammars. These are mostly of a type called context-free grammars , or close variants thereof, and can be given in different notations. Backus-Naur form (BNF), a milestone in the development of programming languages, was introduced in 1960 to define the syntax of Algol. It is the basis for other notations used today, such as EBNF (extended BNF) and graphical representations such as syntax diagrams. EBNF and syntax diagrams are syntactic notations that describe exactly the context-free grammars of formal language theory.",algorithms and data structures.pdf "such as syntax diagrams. EBNF and syntax diagrams are syntactic notations that describe exactly the context-free grammars of formal language theory. Recursion is a central theme of all these notations: the syntactic correctness and structure of a large program text are reduced to the syntactic correctness and structure of its textual components. Other common notions include: terminal symbol, nonterminal symbol, and productions or rewriting rules that describe how nonterminal symbols generate strings of symbols. The set of terminal symbols forms the alphabet of a language, the symbols from which the sentences are built. In EBNF a terminal symbol is enclosed in single quotation marks; in syntax diagrams a terminal symbol is represented by writing it in an oval: Nonterminal symbols represent syntactic entities: statements, declarations, or expressions. Each nonterminal",algorithms and data structures.pdf "by writing it in an oval: Nonterminal symbols represent syntactic entities: statements, declarations, or expressions. Each nonterminal symbol is given a name consisting of a sequence of letters and digits, where the first character must be a letter. In syntax diagrams a nonterminal symbol is represented by writing its name in a rectangular box: If a construct consists of the catenation of constructs A and B, this is expressed by If a construct consists of either A or B, this is denoted by If a construct may be either construct A or nothing, this is expressed by If a construct consists of the catenation of any number of A's (including none), this is denoted by In EBNF parentheses may be used to group entities [e.g. ( A | B )]. 54",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License For each nonterminal symbol there must be at least one production that describes how this syntactic entity is formed from other terminal or nonterminal symbols using the composition constructs above: The following examples show productions and the constructs they generate. A, B, C, D may denote terminal or nonterminal symbols. EBNF is a formal language over a finite alphabet of symbols introduced above, built according to the rules explained above. Thus it is no great surprise that EBNF can be used to define itself. We use the following names for syntactic entities: stmt A syntactic equation. expr A list of alternative terms. term A concatenation of factors. factor A single syntactic entity or parenthesized expression. nts Nonterminal symbol that denotes a syntactic entity. It consists of a sequence of letters and digits where the first character must be a letter.",algorithms and data structures.pdf "nts Nonterminal symbol that denotes a syntactic entity. It consists of a sequence of letters and digits where the first character must be a letter. ts Terminal symbol that belongs to the defined language's vocabulary. Since the vocabulary depends on the language to be defined there is no production for ts. EBNF is now defined by the following productions: EBNF = { stmt } . Algorithms and Data Structures 55 A Global Text",algorithms and data structures.pdf "6. Syntax stmt = nts '=' expr '.' . expr = term { '|' term } . term = factor { factor } . factor = nts | ts | '(' expr ')' | '[' expr ']' | '{' expr '}' . nts= letter { letter | digit } . Example: syntax of simple expressions The following productions for the three nonterminals E(xpression), T(erm), and F(actor) can be traced back to Algol 60. They form the core of all grammars for arithmetic expressions. We have simplified this grammar to define a class of expressions that lacks, for example, a unary minus operator and many other convenient notations. These details are but not important for our purpose: namely, understanding how this grammar assigns the correct structure to each expression. We have further simplified the grammar so that constants and variables are replaced by the single terminal symbol # (Exhibit 6.1): E = T { ( '+' | '–' ) T } . T = F { ( '·' | '/' ) F } . F = '#' | '(' E ')' . Exhibit 6.1: Syntax diagrams for simple arithmetic expressions.",algorithms and data structures.pdf "E = T { ( '+' | '–' ) T } . T = F { ( '·' | '/' ) F } . F = '#' | '(' E ')' . Exhibit 6.1: Syntax diagrams for simple arithmetic expressions. From the nonterminal E we can derive different expressions. In the opposite direction we start with a sequence of terminal symbols and check by syntactic analysis, or parsing, whether a given sequence is a valid expression. If this is the case the grammar assigns to this expression a unique tree structure, the parse tree (Exhibit 6.2). 56",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 6.2: Parse tree for the expression # · ( # ) + # / # . Exercise: syntax diagrams for palindromes A palindrome is a string that reads the same when read forward or backward. Examples: 0110 and 01010. 01 is not a palindrome, as it differs from its reverse 10. 1. What is the shortest palindrome? 2. Specify the syntax of palindromes over the alphabet {0, 1} in EBNF-notation, and by drawing syntax diagrams. Solution 1. The shortest palindrome is the null or empty string. 2. S = [ '0' | '1' ] | '0' S '0' | '1' S '1' (Exhibit 6.3). Exhibit 6.3: Syntax diagram for palindromes An overly simple syntax for simple expressions Why does the grammar given in previous section contain term and factor? An expression E that involves only binary operators (e.g. +, –, · and /) is either a primitive operand, abbreviated as #, or of the form 'E op E'. Consider",algorithms and data structures.pdf "binary operators (e.g. +, –, · and /) is either a primitive operand, abbreviated as #, or of the form 'E op E'. Consider a ""simpler"" grammar for simple, parenthesis-free expressions (Exhibit 6.4): E = '#' | E ( '+' | '–' | '·' | '/' ) E . Algorithms and Data Structures 57 A Global Text",algorithms and data structures.pdf "6. Syntax Exhibit 6.4: A syntax that generates parse trees of ambiguous structure Now the expression # · # + # can be derived from E in two different ways ( Exhibit 6.5). Such an ambiguous grammar is useless since we want to derive the semantic interpretation from the syntactic structure, and the tree at the left contradicts the conventional operator precedence of · over +. Exhibit 6.5: Two incompatible structures for the expression # · # + # . “Everything should be explained as simply as possible, but not simpler.” (Albert Einstein) We can salvage the idea of a grammar with a single nonterminal E by enclosing every expression of the form 'E op E' in parentheses, thus ensuring that every expression has a unique structure (Exhibit 6.6): E = '#' | '(' E ( '+' | '–' | '·' | '/' ) E ')' . Exhibit 6.6: Parentheses serve to restore unique structure. 58",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License In doing so we change the language. The more complex grammar with three nonterminals E(xpression, T(erm), and F(actor) lets us write expressions that are only partially parenthesized and assigns to them a unique structure compatible with our priority conventions: · and / have higher priority than + and –. Exercise: the ambiguity of the dangling ""else"" The problem of the dangling ""else"" is an example of a syntax chosen to be ""too simple"" for the task it is supposed to handle. The syntax of several programming languages (e.g., Pascal) assigns to nested 'if-then[-else]' statements an ambiguous structure. It is left to the semantics of the language to disambiguate. Let E, E 1, E2, … denote Boolean expressions, S, S1, S2, … statements. Pascal syntax allows two types of if statements: if E then S and if E then S else S 1. Draw one syntax diagram that expresses both of these syntactic possibilities.",algorithms and data structures.pdf "statements: if E then S and if E then S else S 1. Draw one syntax diagram that expresses both of these syntactic possibilities. 2. Show all the possible syntactic structures of the statement if E1 then if E2 then S1 else S2 3. Propose a small modification to the Pascal language that avoids the syntactic ambiguity of the dangling else. Show that in your modified Pascal any arbitrarily nested structure of 'if-then' and 'if-then-else' statements must have a unique syntactic structure. Parenthesis-free notation for arithmetic expressions In the usual infix notation for arithmetic expressions a binary operator is written between its two operands. Even with operator precedence conventions, some parentheses are required to guarantee a unique syntactic structure. The selective use of parentheses complicates the syntax of infix expressions: Syntax analysis, interpretative evaluation, and code generation all become more complicated.",algorithms and data structures.pdf "interpretative evaluation, and code generation all become more complicated. Parenthesis-free or Polish notation (named for the Polish logician Jan Lukasiewicz) is a simpler notation for arithmetic expressions. All operators are systematically written either before ( prefix notation) or after ( postfix or suffix notation) the operands to which they apply. We restrict our examples to the binary operators +, –, · and /. Operators with different arities (i.e. different numbers of arguments) are easily handled provided that the number of arguments used is uniquely determined by the operator symbol. To introduce the unary minus we simply need a different symbol than for the binary minus. Infix a+b a+(b·c)(a+b)·c Prefix +ab +a·bc ·+abc Postfix ab+ abc·+ ab+c· Postfix notation mirrors the sequence of operations performed during the evaluation of an expression. 'ab+' is",algorithms and data structures.pdf "Postfix ab+ abc·+ ab+c· Postfix notation mirrors the sequence of operations performed during the evaluation of an expression. 'ab+' is interpreted as: load a (find first operand); load b (find the second operand); add both. The syntax of arithmetic expressions in postfix notation is determined by the following grammar: S = '#' | S S ( '+' | '–' | '·' | '/' ) Algorithms and Data Structures 59 A Global Text",algorithms and data structures.pdf "6. Syntax Exhibit 6.7: Suffix expressions have a unique structure even without the use of parentheses. Exercises 1. Consider the following syntax, given in EBNF: S = A. A = B | 'IF' A 'THEN' A 'ELSE' A. B = C | B 'OR' C. C = D | C 'AND' D. D = 'x' | '(' A ')' | 'NOT' D. (a) Determine the sets of terminal and nonterminal symbols. (b) Give the syntax diagrams corresponding to the rules above. (c) Which of the following expressions is correct corresponding to the given syntax? For the correct expressions show how they can be derived from the given rules: x AND x x NOT AND x (x OR x) AND NOT x IF x AND x THEN x OR x ELSE NOT x x AND OR x 2. Extend the grammar of Section 6.3 to include the 'unary minus' (i.e. an arithmetic operator that turns any expression into its negative, as in –x). Do this under two different assumptions: (a) The unary minus is denoted by a different character than the binary minus, say ¬.",algorithms and data structures.pdf "(a) The unary minus is denoted by a different character than the binary minus, say ¬. (b) The character – is 'overloaded' (i.e. it is used to denote both unary and binary minus). For any specific occurrence of –, only the context determines which operator it designates. 3. Extended Backus-Naur form and syntax diagrams Define each of the four languages described below using both EBNF and syntax diagrams. Use the following conventions and notations: Uppercase letters denote nonterminal symbols. Lowercase letters and the three separators ',' '(' and ')' denote terminal symbols. """" stands for the empty or null string. Notice that the blank character does not occur in these languages, so we use it to separate distinct sentences. 60",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License L ::= a | b | … | z Letter D ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Digit S ::= D { D } Sequence of digits I ::= L { L | D } Identifier (a) Real numbers (constants) in Pascal Examples: –3 + 3.14 10e–06 –10.0e6 but not 10e6 (b) Nonnested lists of identifiers (including the empty list) Examples: () (a) (year, month, day) but not (a,(b)) and not """" (c) Nested lists of identifiers (including empty lists) Examples: in addition to the examples in part (b), we have lists such as ((),()) (a, ()) (name, (first, middle, last)) but not (a)(b) and not """" (d) Parentheses expressions Almost the same problem as part (c), except that we allow the null string, we omit identifiers and commas, and we allow multiple outermost pairs of parentheses. Examples: """" () ()() ()(()) ()(()())()() 4. Use both syntax diagrams and EBNF to define the repeated if-then-else statement:",algorithms and data structures.pdf "Examples: """" () ()() ()(()) ()(()())()() 4. Use both syntax diagrams and EBNF to define the repeated if-then-else statement: if B1 then S1 elsif B2 then S2 elsif … else S Algorithms and Data Structures 61 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 7. Syntax analysis Learning objectives: • syntax is the frame that carries the semantics of a language • syntax analysis • syntax tree • top-down parser • syntax analysis of parenthesis-free expressions by counting • syntax analysis by recursive descent • recursive coroutines The role of syntax analysis The syntax of a language is the skeleton that carries the semantics. Therefore, we will try to get as much work as possible done as a side effect of syntax analysis; for example, compiling a program (i.e. translating it from one language into another) is a mainly semantic task. However, a good language and compiler are designed in such a way that syntax analysis determines where to start with the translation process. Many processes in computer science are syntax-driven in this sense. Hence syntax analysis is important. In this section we derive algorithms for",algorithms and data structures.pdf "science are syntax-driven in this sense. Hence syntax analysis is important. In this section we derive algorithms for syntax analysis directly from syntax diagrams. These algorithms reflect the recursive nature of the underlying grammars. A program for syntax analysis is called a parser. The composition of a sentence can be represented by a syntax tree or parse tree. The root of the tree is the start symbol; the leaves represent the sentence to be recognized. The tree describes how a syntactically correct sentence can be derived from the start symbol by applying the productions of the underlying grammar (Exhibit 7.1). Exhibit 7.1: The unique parse tree for # · # + # Top-down parsers begin with the start symbol as the goal of the analysis. In our example, ""search for an E"". The production for E tells us that we obtain an E if we find a sequence of T's separated by + or –. Hence we look for T's.",algorithms and data structures.pdf "production for E tells us that we obtain an E if we find a sequence of T's separated by + or –. Hence we look for T's. The structure tree of an expression grows in this way as a sequence of goals from top (the root) to bottom (the leaves). While satisfying the goals (nonterminal symbols) the parser reads suitable symbols (terminal symbols) from left to right. In many practical cases a parser needs no backtrack. No backtracking is required if the current Algorithms and Data Structures 62 A Global Text # á # + # F F F T T E",algorithms and data structures.pdf "7. Syntax analysis input symbol and the nonterminal to be expanded determine uniquely the production to be applied. A recursive- descent parser uses a set of recursive procedures to recognize its input with no backtracking. Bottom-up methods build the structure tree from the leaves to the root. The text is reduced until the start symbol is obtained. Syntax analysis of parenthesis-free expressions by counting Syntax analysis can be very simple. Arithmetic expressions in Polish notation are analyzed by counting. For sake of simplicity we assume that each operand in an arithmetic expression is denoted by the single character #. In order to decide whether a given string c1 c2 … cn is a correct expression in postfix notation, we form an integer sequence t 0, t1, … , tn according to the following rule: t0 = 0. ti+1 = ti + 1, if i > 0 and ci+1 is an operand. ti+1 = ti – 1, if i > 0 and ci+1 is an operator. Example of a correct expression: # # # # – – + # · c1 c2 c3c4c5c6c7c8c9",algorithms and data structures.pdf "ti+1 = ti – 1, if i > 0 and ci+1 is an operator. Example of a correct expression: # # # # – – + # · c1 c2 c3c4c5c6c7c8c9 t0 t1 t2t3t4t5t6t7t8t9 0 1 2 3 4 3 2 1 2 1 Example of an incorrect expression (one operator is missing): # # # + · # # / c1 c2 c3 c4 c5 c6 c7 c8 t0 t1 t2 t3 t4 t5 t6 t7 t8 0 1 2 3 2 1 2 3 2 Theorem: The string c 1 c2 … c n over the alphabet A = { # , + , – , · , / } is a syntactically correct expression in postfix notation if and only if the associated integer sequence t0, t1, … , tn satisfies the following conditions: ti > 0 for 1 ≤ i < n, tn = 1. Proof ⇒ : Let c1 c2 … cn be a correct arithmetic expression in postfix notation. We prove by induction on the length n of the string that the corresponding integer sequence satisfies the conditions. Base of induction: For n = 1 the only correct postfix expression is c 1 = #, and the sequence t 0 = 0, t 1 = 1 has the desired properties.",algorithms and data structures.pdf "Base of induction: For n = 1 the only correct postfix expression is c 1 = #, and the sequence t 0 = 0, t 1 = 1 has the desired properties. Induction hypothesis: The theorem is correct for all expressions of length ≤ m. Induction step: Consider a correct postfix expression S of length m + 1 > 1 over the given alphabet A. Let s = (s i) 0 ≤ i ≤ m+1 be the integer sequence associated with S. Then S is of the form S = T U Op, where 'Op' is an operator and T and U are correct postfix expressions of length j ≤ m and length k ≤ m, j + k = m. Let t = (t i) 0 ≤ I ≤ j and u = (ui) 0 ≤ i ≤ k be the integer sequences associated with T and U. We apply the induction hypothesis to T and U. The sequence s is composed from t and u as follows: 63",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License s = s0 , s1 , s2 , … , sj , sj + 1 , sj + 2 , … , sm , sm+1 t0 , t1 , t2 , … , tj , u1 + 1 , u2 + 1 , … , uk + 1 , 1 0, … ,1,… ,2,1 Since t ends with 1, we add 1 to each element in u, and the subsequence therefore ends with u k + 1 = 2. Finally, the operator 'Op' decreases this element by 1, and s therefore ends with sm+1 = 1. Since ti > 0 for 1 ≤ i < j and ui > 0 for 1 ≤i < k, we obtain that si > 0 for 1 ≤ i < k + 1. Hence s has the desired properties, and we have proved one direction of the theorem. Proof ⇐ : We prove by induction on the length n that a string c 1 c2 … cn over A is a correct arithmetic expression in postfix notation if the associated integer sequence satisfies the conditions stated in the theorem. Base of induction: For n = 1 the only sequence is t 0 = 0, t1 = 1. It follows from the definition of the sequence that c1 = #, which is a correct arithmetic expression in postfix notation.",algorithms and data structures.pdf "c1 = #, which is a correct arithmetic expression in postfix notation. Induction hypothesis: The theorem is correct for all expressions of length ≤ m. Induction step: Let s = (si) 0 ≤ i ≤ m+1 be the integer sequence associated with a string S = c 1 c2 … cm+1 of length m + 1 > 1 over the given alphabet A which satisfies the conditions stated in the theorem. Let j < m + 1 be the largest index with sj = 1. Since s1 = 1 such an index j exists. Consider the substrings T = c 1 c2 … cj and U = c j cj+1 … cm. The integer sequences (si) 0 ≤ i ≤ j and (si – 1) j ≤ i ≤ m associated with T and U both satisfy the conditions stated in the theorem. Hence we can apply the induction hypothesis and obtain that both T and U are correct postfix expressions. From the definition of the integer sequence we obtain that c m+1 is an operand 'O p'. Since T and U are correct postfix expressions, S = T U Op is also a correct postfix expression, and the theorem is proved.",algorithms and data structures.pdf "expressions, S = T U Op is also a correct postfix expression, and the theorem is proved. A similar proof shows that the syntactic structure of a postfix expression is unique. The integer sequence associated with a postfix expression is of practical importance: The sequence describes the depth of the stack during evaluation of the expression, and the largest number in the sequence is therefore the maximum number of storage cells needed. Analysis by recursive descent We return to the syntax of the simple arithmetic expressions of chapter 6 in the section “Example: syntax of simple expressions” ( Exhibit 7.2). Using the expression # · (# – #) as an example, we show how these syntax diagrams are used to analyze any expressions by means of a technique called recursive-descent parsing . The progress of the analysis depends on the current state and the next symbol to be read: a lookahead of exactly one",algorithms and data structures.pdf "progress of the analysis depends on the current state and the next symbol to be read: a lookahead of exactly one symbol suffices to avoid backtracking. In Exhibit 7.3 we move one step to the right after each symbol has been recognized, and we move vertically to step up or down in the recursion. Algorithms and Data Structures 64 A Global Text",algorithms and data structures.pdf "7. Syntax analysis Exhibit 7.2: Standard syntax for simple arithmetic expressions (graphic does not match) Exhibit 7.3: Trace of syntax analysis algorithm parsing the expression # · ( # – # ). Turning syntax diagrams into a parser In a programming language that allows recursion the three syntax diagrams for simple arithmetic expressions can be translated directly into procedures. A nonterminal symbol corresponds to a procedure call, a loop in the diagram generates a while loop, and a selection is translated into an if statement. When a procedure wants to delegate a goal it calls another, in cyclic order: E calls T calls F calls E, and so on. Procedures implementing such a recursive control structure are often called recursive coroutines. 65",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The procedures that follow must be embedded into a program that provides the variable 'ch' and the procedures 'read' and 'error'. We assume that the procedure 'error' prints an error message and terminates the program. In a more sophisticated implementation, 'error' would return a message to the calling procedure (e.g. 'factor'). Then this error message is returned up the ladder of all recursive procedure calls active at the moment. Before the first call of the procedure 'expression', a character has to be read into 'ch'. Furthermore, we assume that a correct expression is terminated by a period: … read(ch); expression; if ch ≠ '.' then error; … Exercises 1. Design recursive algorithms to translate the simple arithmetic expressions of chapter 6 in the section “Example: syntax of a simple expressions” into corresponding prefix and postfix expressions as defined in",algorithms and data structures.pdf "“Example: syntax of a simple expressions” into corresponding prefix and postfix expressions as defined in chapter 6 in the section “Parenthesis-free notation for arithmetic expressions”. Same for the inverse translations. 2. Using syntax diagrams and EBNF define a language of 'correctly nested parentheses expressions'. You have a bit of freedom (how much?) in defining exactly what is correctly nested and what is not, but obviously your definition must include expressions such as (), ((())), (()(())), and must exclude strings such as (, )(, ()) (). 3. Design two parsing algorithms for your class of correctly nested parentheses expressions: one that works by counting, the other through recursive descent. Algorithms and Data Structures 66 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Part III: Objects, algorithms, programs Computing with numbers and other objects Since the introduction of computers four or five decades ago the meaning of the word computation has kept expanding. Whereas ""computation"" traditionally implied ""numbers"", today we routinely compute pictures, texts, and many other types of objects. When classified according to the types of objects being processed, three types of computer applications stand out prominently with respect to the influence they had on the development of computer science. The first generation involved numerical computing, applied mainly to scientific and technical problems. Data to be processed consisted almost exclusively of numbers, or sets of numbers with a simple structure, such as vectors and matrices. Programs were characterized by long execution times but small sets of input and output data.",algorithms and data structures.pdf "and matrices. Programs were characterized by long execution times but small sets of input and output data. Algorithms were more important than data structures, and many new numerical algorithms were invented. Lasting achievements of this first phase of computer applications include systematic study of numerical algorithms, error analysis, the concept of program libraries, and the first high-level programming languages, Fortran and Algol. The second generation, hatched by the needs of commercial data processing, leads to the development of many new data structures. Business applications thrive on record keeping and updating, text and form processing, and report generation: there is not much computation in the numeric sense of the word, but a lot of reading, storing, moving, and printing of data. In other words, these applications are data intensive rather than computation",algorithms and data structures.pdf "moving, and printing of data. In other words, these applications are data intensive rather than computation intensive. By focusing attention on the problem of efficient management of large, dynamically varying data collections, this phase created one of the core disciplines of computer science: data structures, and corresponding algorithms for managing data, such as searching and sorting. We are now in a third generation of computer applications, dominated by computing with geometric and pictorial objects. This change of emphasis was triggered by the advent of computers with bitmap graphics. In turn, this leads to the widespread use of sophisticated user interfaces that depend on graphics, and to a rapid increase in applications such as computer-aided design (CAD) and image processing and pattern recognition (in medicine,",algorithms and data structures.pdf "applications such as computer-aided design (CAD) and image processing and pattern recognition (in medicine, cartography, robot control). The young discipline of computational geometry has emerged in response to the growing importance of processing geometric and pictorial objects. It has created novel data structures and algorithms, some of which are presented in Parts V and VI. Our selection of algorithms in Part III reflects the breadth of applications whose history we have just sketched. We choose the simplest types of objects from each of these different domains of computation and some of the most concise and elegant algorithms designed to process them. The study of typical small programs is an essential part of programming. A large part of computer science consists of the knowledge of how typical problems can be solved; and the best way to gain such knowledge is to study the main ideas that make standard programs work.",algorithms and data structures.pdf "and the best way to gain such knowledge is to study the main ideas that make standard programs work. Algorithms and Data Structures 67 A Global Text",algorithms and data structures.pdf "7. Syntax analysis Algorithms and programs Theoretical computer science treats algorithm as a formal concept, rigorously defined in a number of ways, such as Turing machines or lambda calculus. But in the context of programming, algorithm is typically used as an intuitive concept designed to help people express solutions to their problems. The formal counterpart of an algorithm is a procedure or program (fragment) that expresses the algorithm in a formally defined programming language. The process of formalizing an algorithm as a program typically requires many decisions: some superficial (e.g. what type of statement is chosen to set up a loop), some of great practical consequence (e.g. for a given range of values of n, is the algorithm's asymptotic complexity analysis relevant or misleading?). We present algorithms in whatever notation appears to convey the key ideas most clearly, and we have a clear",algorithms and data structures.pdf "We present algorithms in whatever notation appears to convey the key ideas most clearly, and we have a clear preference for pictures. We present programs in an extended version of Pascal; readers should have little difficulty translating this into any programming language of their choice. Mastery of interesting small programs is the best way to get started in computer science. We encourage the reader to work the examples in detail. The literature on algorithms. The development of new algorithms has been proceeding at a very rapid pace for several decades, and even a specialist can only stay abreast with the state of the art in some subfield, such as graph algorithms, numerical algorithms, or geometric algorithms. This rapid development is sure to continue unabated, particularly in the increasingly important field of parallel algorithms. The cutting edge of algorithm",algorithms and data structures.pdf "unabated, particularly in the increasingly important field of parallel algorithms. The cutting edge of algorithm research is published in several journals that specialize in this research topic, including the Journal of Algorithms and Algorithmica. This literature is generally accessible only after a student has studied a few textbooks on algorithms, such as [AHU 75], [Baa 88], [BB 88], [CLR 90], [GB 91], [HS 78], [Knu 73a], [Knu 81], [Knu 73b], [Man 89], [Meh 84a], [Meh 84b], [Meh 84c], [RND 77], [Sed 88], [Wil 86], and [Wir 86]. 68",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 8. Truth values, the data type 'set', and bit acrobatics Learning objectives: • truth values, bits • boolean variables and functions • bit sum: four clever algorithms compared • trade-off between time and space Bits and boolean functions The English mathematician George Boole (1815–1864) became one of the founders of symbolic logic when he endeavored to express logical arguments in mathematical form. The goal of his 1854 book The Laws Of Thought was ""to investigate the laws of those operations of the mind by which reasoning is performed; to give expression to them in the symbolic language of calculus. …"" Truth values or boolean values, named in Boole's honor, possess the smallest possible useful domain: the binary domain, represented by yes/no, 1/0, true/false, T/F. In the late 1940s, as the use of binary arithmetic became",algorithms and data structures.pdf "domain, represented by yes/no, 1/0, true/false, T/F. In the late 1940s, as the use of binary arithmetic became standard and as information theory came to regard a two-valued quantity as the natural unit of information, the concise term bit was coined as an abbreviation of ""binary digit"". A bit, by any other name, is truly a primitive data element—at a sufficient level of detail, (almost) everything that happens in today's computers is bit manipulation. Just because bits are simple data quantities does not mean that processing them is necessarily simple, as we illustrate in this section by presenting some clever and efficient bit manipulation algorithms. Boolean variables range over boolean values, and boolean functions take boolean arguments and produce boolean results. There are only four distinct boolean functions of a single boolean variable, among which 'not' is the",algorithms and data structures.pdf "boolean results. There are only four distinct boolean functions of a single boolean variable, among which 'not' is the most useful: It yields the complement of its argument (i.e. turns 0 into 1, and vice versa). The other three are the identity and the functions that yield the constants 0 and 1. There are 16 distinct boolean functions of two boolean variables, of which several are frequently used, in particular: 'and', 'or'; their negations 'nand', 'nor'; the exclusive-or 'xor'; and the implication '⊃ '. These functions are defined as follows: a b a and b a or b a nand b a nor b a xor b a ⊃ b 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 1 0 0 0 1 Bits are the atomic data elements of today's computers, and most programming languages provide a data type 'boolean' and built-in operators for 'and', 'or', 'not'. To avoid the necessity for boolean expressions to be fully Algorithms and Data Structures 69 A Global Text",algorithms and data structures.pdf "8. Truth values, the data type 'set', and bit acrobatics parenthesized, precedence relations are defined on these operators: 'not' takes precedence over 'and', which takes precedence over 'or'. Thus x and not y or not x and y ⇔ ((x and (not y)) or ((not x) and y)). What can you compute with boolean variables? Theoretically everything, since large finite domains can always be represented by a sufficient number of boolean variables: 16-bit integers, for example, use 16 boolean variables to represent the integer domain –2 15 .. 2 15–1. Boolean variables are often used for program optimization in practical problems where efficiency is important. Swapping and crossovers: the versatile exclusive-or Consider the swap statement x :=: y, which we use to abbreviate the cumbersome triple: t := x; x := y; y := t. On computers that provide bitwise boolean operations on registers, the swap operator :=: can be implemented efficiently without the use of a temporary variable.",algorithms and data structures.pdf "efficiently without the use of a temporary variable. The operator exclusive-or, often abbreviated as 'xor', is defined as x xor y = x and not y or not x and y. It yields true iff exactly one of its two arguments is true. The bitwise boolean operation z:= x op y on n-bit registers: x[1 .. n], y[1 .. n], z[1 .. n], is defined as for i := 1 to n do z[i] := x[i] op y[i] With a bitwise exclusive-or, the swap x :=: y can be programmed as x := x xor y; y := x xor y; x := x xor y; It still takes three statements, but no temporary variable. Given that registers are usually in short supply, and that a logical operation on registers is typically just as fast as an assignment, the latter code is preferable. Exhibit 8.1 traces the execution of this code on two 4-bit registers and shows exhaustively that the swap is performed correctly for all possible values of x and y. Exhibit 8.1: Trace of registers x and y under repeated exclusive-or operations.",algorithms and data structures.pdf "correctly for all possible values of x and y. Exhibit 8.1: Trace of registers x and y under repeated exclusive-or operations. Exercise: planar circuits without crossover of wires The code above has yet another interpretation: How should we design a logical circuit that effects a logical crossover of two wires x and y while avoiding any physical crossover? If we had an 'xor' gate, the circuit diagram shown in Exhibit 8.2 would solve the problem. 'xor' gates must typically be realized as circuits built from simpler primitives, such as 'and', 'or', 'not'. Design a circuit consisting of 'and', 'or', 'not' gates only, which has the effect of crossing wires x and y while avoiding physical crossover. Exhibit 8.2: Three exclusive-or gates in series interchange values on two wires. 70",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The bit sum or ""population count"" A computer word is a fixed-length sequence of bits, call it a bit vector. Typical word lengths are 16, 32, or 64, and most instructions in most computers operate on all the bits in a word at the same time, in parallel. When efficiency is of great importance, it is worth exploiting to the utmost the bit parallelism built into the hardware of most computers. Today's programming languages often fail to refer explicitly to hardware features such as registers or words in memory, but it is usually possible to access individual bits if one knows the representation of integers or other data types. In this section we take the freedom to drop the constraint of strong typing built into Pascal and other modern languages. We interpret the content of a register or a word in memory as it suits the need of the moment: a bit string, an integer, or a set.",algorithms and data structures.pdf "moment: a bit string, an integer, or a set. We are well aware of the dangers of such ambiguous interpretations: Programs become system and compiler dependent, and thus lose portability. If such ambiguity is localized in a single, small procedure, the danger may be kept under control, and the gain in efficiency may outweigh these drawbacks. In Pascal, for example, the type 'set' is especially well suited to operate at the bit level. 'type s = set of (a, b, c)' consists of the 2 3 sets that can be formed from the three elements a, b, c. If the basic set M underlying the declaration of type S = set of M consists of n elements, then S has 2 n elements. Usually, a value of type S is internally represented by a vector of n contiguously allocated bits, one bit for each element of the set M. When computing with values of type S we operate on single bits using the boolean operators. The union of two sets of type S is obtained by applying bitwise 'or', the",algorithms and data structures.pdf "on single bits using the boolean operators. The union of two sets of type S is obtained by applying bitwise 'or', the intersection by applying bitwise 'and'. The complement of a set is obtained by applying bitwise 'not'. Example M = {0, 1, … , 7} Set Bit vector 7 6 5 4 3 2 1 0 Elements s1{0, 3, 4, 6} 0 1 0 1 1 0 0 1 s2{0, 1, 4, 5} 0 0 1 1 0 0 1 1 s1 ∪ s2 {0, 1, 3, 4, 5, 6} 0 1 1 1 1 0 1 1 s1 ∩ s2 {0, 4} 0 0 0 1 0 0 0 1 ¬ s1 {1, 2, 5, 7} 1 0 1 0 0 1 1 0 Integers are represented on many small computers by 16 bits. We assume that a type 'w16', for ""word of length 16"", can be defined. In Pascal, this might be type w16 = set of 0 .. 15; A variable of type 'w16' is a set of at most 16 elements represented as a vector of 16 bits. Asking for the number of elements in a set s is therefore the same as asking for the number of 1's in the bit",algorithms and data structures.pdf "Asking for the number of elements in a set s is therefore the same as asking for the number of 1's in the bit pattern that represents s. The operation that counts the number of elements in a set, or the number of 1's in a word, is called the population count or bit sum. The bit sum is frequently used in inner loops of combinatorial calculations, and many a programmer has tried to make it as fast as possible. Let us look at four of these tries, beginning with the obvious. Algorithms and Data Structures 71 A Global Text",algorithms and data structures.pdf "8. Truth values, the data type 'set', and bit acrobatics Inspect every bit function bitsum0(w: w16): integer; var i, c: integer; begin c := 0; for i := 0 to 15 do { inspect every bit } if i ∈ w {w[i] = 1} then c := c + 1; { count the ones} return(c) end; Skip the zeros Is there a faster way? The following algorithm looks myster ious and tricky. The expression w ∩ (w – 1) contains both an intersection operation '∩ ', which assumes that its operands are sets, and a subtraction, which assumes that w is an integer: c := 0; while w ≠ 0 do { c := c + 1; w := w ∩ (w – 1) } ; Such mixing makes sense only if we can rely on an implicit assumption on how sets and integers are represented as bit vectors. With the usual binary number representation, an example shows that when the body of the loop is executed once, the rightmost 1 of w is replaced by 0: w 1000100011001000 w – 1 1000100011000111 w ∩ (w – 1) 1000100011000000",algorithms and data structures.pdf "executed once, the rightmost 1 of w is replaced by 0: w 1000100011001000 w – 1 1000100011000111 w ∩ (w – 1) 1000100011000000 This clever code seems to look at the 1's only and skip over all the 0's: Its loop is executed only as many times as there are 1's in the word. This savings is worthwhile for long, sparsely populated words (few 1's and many 0's). In the statement w := w ∩ (w – 1), w is used both as an integer (in w – 1) and as a set (as an operand in the intersection operation ' ∩ '). Strongly typed languages, such as Pascal, do not allow such mixing of types. In the following function 'bitsum 1', the conversion routines 'w16toi' and 'itow16' are introduced to avoid this double interpretation of w. However, 'bitsum1' is of interest only if such a type conversion requires no extra time (i.e. if one knows how sets and integers are represented internally). function bitsum1(w: w16): integer; var c, i: integer; w0, w1: w16; begin w0 := w; c := 0;",algorithms and data structures.pdf "knows how sets and integers are represented internally). function bitsum1(w: w16): integer; var c, i: integer; w0, w1: w16; begin w0 := w; c := 0; while w0 ≠ Ø { empty set } do begin i := w16toi(w0); { w16toi converts type w16 to integer } i := i – 1; w1 := itow16(i); { itow16 converts type integer to w16 } w0 := w0 ∩ w1; { intersection of two sets } c := c + 1 end; return(c) end; 72",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Most languages provide some facility for permitting purely formal type conversions that result in no work: 'EQUIVALENCE' statements in Fortran, 'UNSPEC' in PL/1, variant records in Pascal. Such ""conversions"" are done merely by interpreting the contents of a given storage location in different ways. Logarithmic bit sum For a computer of word length n, the following algorithm computes the bit sum of a word w running through its loop only ⎡log2 n⎤ times, as opposed to n times for 'bitsum0' or up to n times for 'bitsum1'. The following description holds for arbitrary n but is understood most easily if n = 2h. The logarithmic bit sum works on the familiar principle of divide-and-conquer. Let w denote a word consisting of n = 2h bits, and let S(w) be the bit sum of the bit string w. Split w into two halves and denote its left part by wL",algorithms and data structures.pdf "of n = 2h bits, and let S(w) be the bit sum of the bit string w. Split w into two halves and denote its left part by wL and its right part by wR. The bit sum obviously satisfies the recursive equation S(w) = S(wL) + S(wR). Repeating the same argument on the substrings wL and wR, and, in turn, on the substrings they create, we arrive at a process to compute S(w). This process terminates when we hit substrings of length 1 [i.e. substrings consisting of a single bit b; in this case we have S(b) = b]. Repeated halving leads to a recursive decomposition of w, and the bit sum is computed by a tree of n – 1 additions as shown below for n = 4 (Exhibit 8.3). Exhibit 8.3: Logarithmic bit sum algorithm as a result of divide-and-conquer. This approach of treating both parts of w symmetrically and repeated halving leads to a computation of depth h = ⎡log2 n⎤ . To obtain a logarithmic bit sum, we apply the additional trick of performing many additions in parallel.",algorithms and data structures.pdf "= ⎡log2 n⎤ . To obtain a logarithmic bit sum, we apply the additional trick of performing many additions in parallel. Notice that the total length of all operands on the same level is always n. Thus we can pack them into a single word and, if we arrange things cleverly, perform all the additions at the same level in one machine operation, an addition of two n-bit words. Exhibit 8.4 shows how a number of the additions on short strings are carried out by a single addition on long strings. S(w) now denotes not only the bit sum but also its binary representation, padded with zeros to the left so as to have the appropriate length. Since the same algorithm is being applied to wL and wR, and since w L and wR are of equal length, exactly the same operations are performed at each stage on wL and its parts as on wR and its corresponding parts. Thus if the operations of addition and shifting operate on words of length n, a single one of",algorithms and data structures.pdf "corresponding parts. Thus if the operations of addition and shifting operate on words of length n, a single one of these operations can be interpreted as performing many of the same operations on the shorter parts into which w has been split. This logarithmic speedup works up to the word length of the computer. For n = 64, for example, recursive splitting generates six levels and translates into six iterations of the loop below. Algorithms and Data Structures 73 A Global Text",algorithms and data structures.pdf "8. Truth values, the data type 'set', and bit acrobatics Exhibit 8.4: All processes generated by divide-and-conquer are performed in parallel on shared data registers. The algorithm is best explained with an example; we use n = 8. w7 w6 w5 w4 w3 w2 w1 w0 w 1 1 0 1 0 0 0 1 First, extract the even-indexed bits w 6 w4 w2 w0 and place a zero to the left of each bit to obtain w even. The newly inserted zeros are shown in small type. w6 w4 w2 w0 weven 0 1 0 1 0 0 0 1 Next, extract the odd-indexed bits w 7 w5 w3 w1, shift them right by one place into bit positions w 6 w4 w2 w0, and place a zero to the left of each bit to obtain wodd. w7 w5 w3 w1 wodd 0 1 0 0 0 0 0 0 Then, numerically add weven and wodd, considered as integers written in base 2, to obtain w'. w'7 w'6 w'5 w'4 w'3 w'2 w'1 w'0 weven 0 1 0 1 0 0 0 1 wodd 0 1 0 0 0 0 0 0 w' 1 0 0 1 0 0 0 1 Next, we index not bits, but pairs of bits, from right to left: (w' 1 w'0) is the zeroth pair, (w'5 w'4) is the second pair.",algorithms and data structures.pdf "w' 1 0 0 1 0 0 0 1 Next, we index not bits, but pairs of bits, from right to left: (w' 1 w'0) is the zeroth pair, (w'5 w'4) is the second pair. Extract the even-indexed pairs w'5 w'4 and w'1 w'0, and place a pair of zeros to the left of each pair to obtain w'even. 74",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License w'5 w'4 w'1 w'0 w'even 0 0 0 1 0 0 0 1 Next, extract the odd-indexed pairs w' 7 w'6 and w'3 w'2 , shift them right by two places into bit positions w' 5 w'4 and w'1 w'0 , respectively, and insert a pair of zeros to the left of each pair to obtain w'odd. w'7 w'6 w'3 w'2 w'odd 0 0 1 0 0 0 0 0 Numerically, add w'even and w'odd to obtain w"". w""7 w""6 w""5 w""4 w""3 w""2 w""1 w""0 w"" 0 0 1 1 0 0 0 1 Next, we index quadruples of bits, extract the quadruple w""3 w""2 w""1 w""0, and place four zeros to the left to obtain w""even. w""3 w""2 w""1 w""0 w""even 0 0 0 0 0 0 0 1 Extract the quadruple w"" 7 w""6 w""5 w""4, shift it right four places into bit positions w"" 3 w""2 w""1 w""0, and place four zeros to the left to obtain w""odd. w""7 w""6 w""5 w""4 w""odd 0 0 0 0 0 0 1 1 Finally, numerically add w""even and w""odd to obtain w''' = (00000100), which is the representation in base 2 of the",algorithms and data structures.pdf "w""odd 0 0 0 0 0 0 1 1 Finally, numerically add w""even and w""odd to obtain w''' = (00000100), which is the representation in base 2 of the bit sum of w (4 in this example). The following function implements this algorithm. Logarithmic bit sum implemented for a 16-bit computer: In 'bitsum2' we apply addition and division operations directly to variables of type 'w16' without performing the type conversions that would be necessary in a strongly typed language such as Pascal. function bitsum2(w: w16): integer; const mask[0] = '0101010101010101'; mask[1] = '0011001100110011'; mask[2] = '0000111100001111'; mask[3] = '0000000011111111'; var i, d: integer; weven, wodd: w16; begin d := 2; for i := 0 to 3 do begin weven := w ∩ mask[i]; w := w / d; { shift w right 2i bits } d := d2; wodd := w ∩ mask[i]; w := weven + wodd end; return(w) end; Algorithms and Data Structures 75 A Global Text",algorithms and data structures.pdf "8. Truth values, the data type 'set', and bit acrobatics Trade-off between time and space: the fastest algorithm Are th ere still faster algorithms for computing the bit sum of a word? Is there an optimal algorithm? The question of optimality of algorithms is important, but it can be answered only in special cases. To show that an algorithm is optimal, one must specify precisely the class of algorithms allowed and the criterion of optimality. In the case of bit sum algorithms, such specifications would be complicated and largely arbitrary, involving specific details of how computers work. However, we can make a plausible argument that the following bit sum algorithm is the fastest possible, since it uses a table lookup to obtain the result in essentially one operation. The penalty for this speed is an extravagant use of memory space (2 n locations), thereby making the algorithm impractical except for small values of n. The choice",algorithms and data structures.pdf "of memory space (2 n locations), thereby making the algorithm impractical except for small values of n. The choice of an algorithm almost always involves trade-offs among various desirable properties, and the better an algorithm is from one aspect, the worse it may be from another. The algorithm is based on the idea that we can precompute the solutions to all possible questions, store the results, and then simply look them up when needed. As an example, for n = 3, we would store the information Word Bit sum 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 2 1 0 0 1 1 0 1 2 1 1 0 2 1 1 1 3 What is the fastest way of looking up a word w in this table? Under assumptions similar to those used in the preceding algorithms, we can interpret w as an address of a memory cell that contains the bit sum of w, thus giving us an algorithm that requires only one memory reference. Table lookup implemented for a 16-bit computer: function bitsum3(w: w16): integer;",algorithms and data structures.pdf "us an algorithm that requires only one memory reference. Table lookup implemented for a 16-bit computer: function bitsum3(w: w16): integer; const c: array[0 .. 65535] of integer = [0, 1, 1, 2, 1, 2, 2, 3, … , 15, 16]; begin return(c[w]) end; In concluding this exa mple, we notice the variety of algorithms that exist for computing the bit sum, each one based on entirely different principles, giving us a different trade-off between space and time. 'bitsum 0' and 'bitsum3' solve the problem by ""brute force"" and are simple to understand: 'bitsum 0' looks at each bit and so requires much time; 'bitsum3' stores the solution for each separate case and thus requires much space. The logarithmic bit sum algorithm is an elegant compromise: efficient with respect to both space and time, it merely challenges the programmer's wits. Exercises 1. Show that there are exactly 16 distinct boolean functions of two variables.",algorithms and data structures.pdf "programmer's wits. Exercises 1. Show that there are exactly 16 distinct boolean functions of two variables. 2. Show that each of the boolean functions 'nand' and 'nor' is universal in the following sense: Any boolean function f(x, y) can be written as a nested expression involving only 'nands', and it can also be written using only 'nors'. Show that no other boolean function of two variables is universal. 76",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 3. Consider the logarithmic bit sum algorithm, and show that any strategy for splitting w (not just the halving split) requires n – 1 additions. Algorithms and Data Structures 77 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 9. Ordered sets Learning objectives: • searching in ordered sets • sequential search. proof of program correctness • binary search • in-place permutation • nondeterministic algorithms • cycle rotation • cycle clipping Sets of elements processed on a computer are always ordered according to some criterion. In the preceding example of the ""population count"" operation, a set is ordered arbitrarily and implicitly simply because it is mapped onto linear storage; a programmer using that set can ignore any order imposed by the implementation and access the set through functions that hide irrelevant details. In most cases, however, the order imposed on a set is not accidental, but is prescribed by the problem to be solved and/or the algorithm to be used. In such cases the programmer explicitly deals with issues of how to order a set and how to use any existing order to advantage.",algorithms and data structures.pdf "programmer explicitly deals with issues of how to order a set and how to use any existing order to advantage. Searching in ordered sets is one of the most frequent tasks performed by computers: whenever we operate on a data item, that item must be selected from a set of items. Searching is also an ideal ground for illustrating basic concepts and techniques of programming. At times, ordered sets need to be rearranged (permuted). The chapter “Sorting and its complexity” is dedicated to the most frequent type of rearrangement: permuting a set of elements into ascending order. Here we discuss another type of rearrangement: reordering a set according to a given permutation. Sequential search Consider the simple case where a fixed set of n data elements is given in an array A: const n = … ; { n > 0 } type index = 0 .. n; elt = … ; var A: array[1 .. n] of elt; or var A: array[0 .. n] of elt;",algorithms and data structures.pdf "const n = … ; { n > 0 } type index = 0 .. n; elt = … ; var A: array[1 .. n] of elt; or var A: array[0 .. n] of elt; Sequential or linear search is the simplest technique for determining whether A contains a given element x. It is a trivial example of an incremental algorithm, which processes a set of data one element at a time. If the search for x is successful, we return an index i, 1 ≤ i ≤ n, to point to x. The convention that i = 0 signals unsuccessful search is convenient and efficient, as it encodes all possible outcomes in a single parameter. function find(x: elt): index; var i: index; begin i := n; while (i > 0) { can access A } cand (A[i] ≠ x) { not yet found } do (1) { (1 ≤ i ≤ n) ∧ (∀ k, i ≤ k: A[k] ≠ x) } i := i – 1; Algorithms and Data Structures 78 A Global Text",algorithms and data structures.pdf "9. Ordered sets (2) { (∀ k, i < k: A[k] ≠ x) ∧ ((i= 0) ∧ ((1 ≤ i ≤ n) ∧ (A[i] = x))) } return(i) end; The 'cand' operator used in the termination condition is the conditional 'and'. Evaluation proceeds from left to right and stops as soon as the value of the boolean expression is determined: If i > 0 yields 'false', we immediately terminate evaluation of the boolean expression without accessing A[i], thus avoiding an out-of-bounds error. We have included two assertions, (1) and (2), that express the main points necessary for a formal proof of correctness: mainly, that each iteration of the loop extends by one element the subarray known not to contain the search argument x. Assertion (1) is trivially true after the initialization i := n, and remains true whenever the body of the while loop is about to be executed. Assertion (2) states that the loop terminates in one of two ways: • i = 0 signals that the entire array has been scanned unsuccessfully.",algorithms and data structures.pdf "• i = 0 signals that the entire array has been scanned unsuccessfully. • x has been found at index i. A formal correctness proof would have to include an argument that the loop does indeed terminate—a simple argument here, since i is initialized to n, decreases by 1 in each iteration, and thus will become 0 after a finite number of steps. The loop is terminated by a Boolean expression composed of two terms: reaching the end of the array, i = 0, and testing the current array element, A[i] = x. The second term is unavoidable, but the first one can be spared by making sure that x is always found before the index i drops off the end of the array. This is achieved by extending the array by one cell A[0] and placing the search argument x in it as a sentinel. If no true element x stops the scan of the array, the sentinel will. Upon exit from the loop, the value of i reveals the outcome of the search, with the convention that 0 signals an unsuccessful search:",algorithms and data structures.pdf "convention that 0 signals an unsuccessful search: function find(x: elt): index; var i: index; begin A[0] := x; i := n; while A[i] ≠ x do i := i – 1; return(i) end; How efficient is sequential search? An unsuccessful search always scans the entire array. If all n array elements have equal probability of being searched for, the average number of iterations of the while loop in a successful search is This algorithm needs time proportional to n in the average and the worst case. Binary search If the data elements stored in the array A are ordered according to the order relation ≤ defined on their domain, that is ∀ k, 1 ≤ k < n: A[k] ≤ A[k + 1] the search for an element x can be made much faster because a comparison of x with any array element A[m] provides more information than it does in the unordered case. The result x ≠ A[m] excludes not only A[m], but also",algorithms and data structures.pdf "provides more information than it does in the unordered case. The result x ≠ A[m] excludes not only A[m], but also all elements on one or the other side of A[m], depending on whether x is greater or smaller than A[m] (Exhibit 9.1). 79",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 9.1: Binary search identifies regions where the search argument is guaranteed to be absent. The following function exploits this additional information: const n = … ; { n > 0 } type index = 1 .. n; elt = … ; var A: array[1 .. n] of elt; function find(x: elt; var m: index): boolean; var u, v: index; begin u := 1; v := n; while u ≤ v do begin (1) { (u ≤ v) ∧ (∀ k, 1 ≤ k < u: A[k] < x) ∧(∀ k, v < k ≤ n: A[k] > x) } m := any value such that u ≤ m ≤ v ; if x < A[m] thenv := m – 1 elsif x > A[m] then u := m + 1 (2) else {x = A[m] } return(true) end; (3) { (u = v + 1) ∧(∀ k, 1 ≤ k < u: A[k]< x) ∧ (∀ k, v < k ≤ n: A[k] > x) } return(false) end; u and v bound the interval of uncertainty that might contain x. Assertion (1) states that A[1], … , A[u – 1] are known to be smaller than x; A[v + 1], … , A[n] are known to be greater than x. Assertion (2), before exit from the function,",algorithms and data structures.pdf "to be smaller than x; A[v + 1], … , A[n] are known to be greater than x. Assertion (2), before exit from the function, states that x has been found at index m. In assertion (3), u = v + 1 signals that the interval of uncertainty has shrunk to become empty. If there exists more than one match, this algorithm will find one of them. This algorithm is correct independently of the choice of m but is most efficient when m is the midpoint of the current search interval: m := (u + v) div 2; With this choice of m each comparison either finds x or eliminates half of the remaining elements. Thus at most ⎡log2 n⎤ iterations of the loop are performed in the worst case. Exercise: binary search The array var A: array [1 .. n] of integer; contains n integers in ascending order: A[1] ≤ A[2] ≤ … ≤ A[n]. (a) Write a recursive binary search function rbs (x, u, v: integer): integer; that returns 0 if x is not in A, and an index i such that A[i] = x if x is in A.",algorithms and data structures.pdf "function rbs (x, u, v: integer): integer; that returns 0 if x is not in A, and an index i such that A[i] = x if x is in A. (b) What is the maximal depth of recursive calls of 'rbs' in terms of n? Algorithms and Data Structures 80 A Global Text A[m] < x m x < A[m] m If x cannot lie in",algorithms and data structures.pdf "9. Ordered sets (c) Describe the advantages and disadvantages of this recursive binary search as compared to the iterative binary search. Exercise: searching in a partially ordered two-dimensional array Consider the n by m array: var A: array[1 .. n, 1 .. m] of integer; and assume that the integers in each row and in each column are in ascending order; that is, A[i, j] ≤ A[i, j + 1]for i = 1, … , n and j = 1, … , m – 1; A[i, j] ≤ A[i + 1, j]for i = 1, … , n – 1 and j = 1, … , m. (a) Design an algorithm that determines whether a given integer x is stored in the array A. Describe your algorithm in words and figures. Hint: Start by comparing x with A[1, m] (Exhibit 9.2). Exhibit 9.2: Another example of the idea of excluded regions. (b) Implement your algorithm by a function IsInArray (x: integer): boolean; (c) Show that your algorithm is correct and terminates, and determine its worst case time complexity. Solution",algorithms and data structures.pdf "(c) Show that your algorithm is correct and terminates, and determine its worst case time complexity. Solution (a) The algorithm compares x first with A[1, m]. If x is smaller than A[1, m], then x cannot be contained in the last column, and the search process is continued by comparing x with A[1, m – 1]. If x is greater than A[1, m], then x cannot be contained in the first row, and the search process is continued by comparing x with A[2, m]. Exhibit 9.3 shows part of a typical search process. Exhibit 9.3: Excluded regions combine to leave only a staircase-shaped strip to examine. (b) function IsInArray(x: integer): boolean; var r, c: integer; begin r := 1; c := m; while (r ≤ n) and (c ≥ 1) do {1} ifx < A[r, c] then c := c – 1 elsif x > A[r, c] then r := r + 1 81",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License else { x = A[r, c] } {2} return(true); {3} return(false) end; (c) At positions {1}, {2}, and {3}, the invariant ∀ i, 1 ≤ i ≤ n,∀ j, 1 ≤ j ≤ m: (j > c ⇒ x ≠ A[i, j]) ∧ (i < r ⇒ x ≠ A[i, j] (∗) states that the hatched rows and columns of A do not contain x. At {2}, (1 ≤ r ≤ n) ∧ (1 ≤ c ≤ m) ∧ (x = A[r, c]) states that r and c are within index range and x has been found at (r, c). At {3}, (r = n + 1) ∨(c = 0) states that r or c are outside the index range. This coupled with (*) implies that x is not in A: (r = n + 1) ∨ (c = o) ⇒ ∀ i, 1 ≤ i ,≤ n, ∀ j. 1 ≤ j ≤ m: x ≠ A[i, j]. Each iteration through the loop either decreases c by one or increases r by one. If x is not contained in the array, either c becomes zero or r becomes greater than n after a finite number of steps, and the algorithm terminates. In",algorithms and data structures.pdf "either c becomes zero or r becomes greater than n after a finite number of steps, and the algorithm terminates. In each step, the algorithm eliminates either a row from the top or a column from the right. In the worst case it works its way from the upper right corner to the lower left corner in n + m – 1 steps, leading to a complexity of Θ (n + m). In-place permutation Representations of a permutation. Consider an array D[1 .. n] that holds n data elements of type 'elt'. These are ordered by their position in the array and must be rearranged according to a specific permutation given in another array. Exhibit 9.4 shows an example for n = 5. Assume that a, b, c, d, e, stored in this order, are to be rearranged in the order c, e, d, a, b. This permutation is represented naturally by either of the two permutation arrays t (to) or f (from) declared as var t, f: array[1 .. n] of 1 .. n;",algorithms and data structures.pdf "arrays t (to) or f (from) declared as var t, f: array[1 .. n] of 1 .. n; The exhibit also shows a third representation of the same permutation: the decomposition of this permutation into cycles. The element in D[1] moves into D[4], the one in D[4] into D[3], the one in D[3] into D[1], closing a cycle that we abbreviate as (1 4 3), or (4 3 1), or (3 1 4). There is another cycle (2 5), and the entire permutation is represented by (1 4 3) (2 5). Exhibit 9.4: A permutation and its representations in terms of 'to', 'from', and cycles. The cycle representation is intuitively most informative, as it directly reflects the decomposition of the problem into independent subproblems, and both the 'to' and 'from' information is easily extracted from it. But 'to' and 'from' dispense with parentheses and lead to more concise programs. Algorithms and Data Structures 82 A Global Text",algorithms and data structures.pdf "9. Ordered sets Consider the problem of executing this permutation in place: Both the given data and the result are stored in the same array D, and only a (small) constant amount of auxiliary storage may be used, independently of n. Let us use the example of in-place permutation to introduce a notation that is frequently convenient, and to illustrate how the choice of primitive operations affects the solution. A multiple assignment statement will do the job, using either 'to' or 'from': // (1 ≤ i ≤ n) { D[t[i]] := D[i] } or // (1 ≤ i ≤ n) { D[i]} := D[f[i]] } The characteristic properties of a multiple assignment statement are: • The left-hand side is a sequence of variables, the right-hand side is a sequence of expressions, and the two sequences are matched according to length and type. The value of the i-th expression on the right is assigned to the i-th variable on the left.",algorithms and data structures.pdf "sequences are matched according to length and type. The value of the i-th expression on the right is assigned to the i-th variable on the left. • All the expressions on the right-hand side are evaluated using the original values of all variables that occur in them, and the resulting values are assigned ""simultaneously"" to the variables on the left-hand side. We use the sign // to designate concurrent or parallel execution. Few of today's programming languages offer multiple assignments, in particular those of variable length used above. Breaking a multiple assignment into single assignments usually forces the programmer to introduce temporary variables. As an example, notice that the direct sequentialization: for i := 1 to n do D[t[i]] := D[i] or for i := 1 to n do D[i] := D[f[i]] is faulty, as some of the elements in D will be overwritten before they can be moved. Overwriting can be avoided at",algorithms and data structures.pdf "is faulty, as some of the elements in D will be overwritten before they can be moved. Overwriting can be avoided at the cost of nearly doubling memory requirements by allocating an array A[1 .. n] of data elements for temporary storage: for i := 1 to n do A[t[i]] := D[i]; for i := 1 to n do D[i] := A[i]; This, however, is not an in-place computation, as the amount of auxiliary storage grows with n. It is unnecessarily inefficient: There are elegant in-place permutation algorithms based on the conventional primitive of the single assignment statement. They all assume that the permutation array may be destroyed as the permutation is being executed. If the representation of the permutation must be preserved, additional storage is required for bookkeeping, typically of a size proportional to n. Although this additional space may be as little as n bits, perhaps",algorithms and data structures.pdf "bookkeeping, typically of a size proportional to n. Although this additional space may be as little as n bits, perhaps in order to distinguish the elements processed from those yet to be moved, such an algorithm is not technically in place. Nondeterministic algorithms. Problems of rearrangement always appear to admit many different solutions —a phenomenon that is most apparent when one considers the multitude of sorting algorithms in the literature. The reason is clear: When n elements must be moved, it may not matter much which elements are moved first and which ones later. Thus it is useful to look for nondeterministic algorithms that refrain from specifying the precise sequence of all actions taken, and instead merely iterate condition ⇒ action statements, with the meaning ""wherever condition applies perform the corresponding action"". These algorithms are nondeterministic because",algorithms and data structures.pdf """wherever condition applies perform the corresponding action"". These algorithms are nondeterministic because each of several distinct conditions may apply at lots of different places, and we may ""fire"" any action that is 83",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License currently enabled. Adding sequential control to a nondeterministic algorithm turns it into a deterministic algorithm. Thus a nondeterministic algorithm corresponds to a class of deterministic ones that share common invariants, but differ in the order in which steps are executed. The correctness of a nondeterministic algorithm implies the correctness of all its sequential instances. Thus it is good algorithm design practice to develop a correct nondeterministic algorithm first, then turn it into a deterministic one by ordering execution of its steps with the goal of efficiency in mind. Deterministic sequential algorithms come in a variety of forms depending on the choice of primitive (assignment or swap), data representation ('to' or 'from'), and technique. We focus on the latter and consider two techniques:",algorithms and data structures.pdf "or swap), data representation ('to' or 'from'), and technique. We focus on the latter and consider two techniques: cycle rotation and cycle clipping. Cycle rotation follows naturally from the idea of decomposing a permutation into cycles and processing one cycle at a time, using temporary storage for a single element. It fits the 'from' representation somewhat more efficiently than the 'to' representation, as the latter requires a swap of two elements where the former uses an assignment. Cycle clipping uses the primitive 'swap two elements' so effectively as a step toward executing a permutation that it needs no temporary storage for elements. Because no temporary storage is tied up, it is not necessary to finish processing one cycle before starting on the next one –elements can be clipped from their cycles in any order. Clipping works efficiently with either representation, but is easier to understand with",algorithms and data structures.pdf "from their cycles in any order. Clipping works efficiently with either representation, but is easier to understand with 'to'. We present cycle rotation with 'from' and cycle clipping with 'to' and leave the other two algorithms as exercises. Cycle rotation A search for an in-place algorithm naturally leads to the idea of processing a permutation one cycle at a time: every element we place at its destination bumps another one, but we avoid holding an unbounded number of bumped elements in temporary storage by rotating each cycle, one element at a time. This works best using the 'from' representation. The following loop rotates the cycle that passes through an arbitrary index i: Rotate the cycle starting at index i, updating f: j := i;{ initialize a two-pronged fork to travel along the cycle } p := f[j]; { p is j's predecessor in the cycle } A := D[j]; { save a single element in an auxiliary variable A }",algorithms and data structures.pdf "p := f[j]; { p is j's predecessor in the cycle } A := D[j]; { save a single element in an auxiliary variable A } while p ≠ i do { D[j] := D[p]; f[j] := j; j := p; p := f[j]} ; D[j] := A; { reinsert the saved element into the former cycle … } f[j] := j; { … but now it is a fixed point } This code works trivially for a cycle of length 1, where p = f[i] = i guards the body of the loop from ever being executed. The statement f[j] := j in the loop is unnecessary for rotating the cycle. Its purpose is to identify an element that has been placed at its final destination, so this code can be iterated for 1 ≤ i ≤ n to yield an in-place permutation algorithm. For the sake of efficiency we add two details: (1) We avoid unnecessary movements A := D[j]; D[j] := A of a possibly voluminous element by guarding cycles of length 1 with the test 'i ≠ f[i]', and (2) we",algorithms and data structures.pdf "D[j]; D[j] := A of a possibly voluminous element by guarding cycles of length 1 with the test 'i ≠ f[i]', and (2) we terminate the iteration at n – 1 on the grounds that when n – 1 elements of a permutation are in their correct place, the n-th one is also. Using the code above, this leads to for i := 1 to n – 1 do if i ≠ f[i] then rotate the cycle starting at index i, updating f Exercise Implement cycle rotation using the 'to' representation. Hint: Use the swap primitive rather than element assignment. Algorithms and Data Structures 84 A Global Text",algorithms and data structures.pdf "9. Ordered sets Cycle clipping Cycle clipping is the key to elegant in-place permutation using the 'to' representation. At each step, we clip an arbitrary element d out of an arbitrary cycle of length > 1, thus reducing the latter's length by 1. As shown in Exhibit 9.5, we place d at its destination, where it forms a cycle of length 1 that needs no further processing. The element it displaces, c, can find a (temporary) home in the cell vacated by d. It is probably out of place there, but no more so than it was at its previous home; its time will come to be relocated to its final destination. Since we have permuted elements, we must update the permutation array to reflect accurately the permutation yet to be performed. This is a local operation in the vicinity of the two elements that were swapped, somewhat like tightening a belt by one notch —all but two of the elements in the clipped cycle remain unaffected. The Exhibit below shows an example. In order",algorithms and data structures.pdf "—all but two of the elements in the clipped cycle remain unaffected. The Exhibit below shows an example. In order to execute the permutation (1 4 3) (2 5), we clip d from its cycle (1 4 3) by placing d at its destination D[3], thus bumping c into the vacant cell D[4]. This amounts to representing the cycle (1 4 3) as a product of two shorter cycles: the swap (3 4), which can be done right away, and the cycle (1 4) to be executed later. The cycle (2 5) remains unaffected. The ovals in Exhibit 9.5 indicate that corresponding entries of D and t are moved together. Exhibit 9.6 shows what happens to a cycle clipped by a swap // { t[i], D[i] :=: t[t[i]], D[t[i]] } Exhibit 9.5: Clipping one element out of a cycle of a permutation. Exhibit 9.6: Effect of a swap caused by the condition i ≠ t[i]. 85",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Cycles of length 1 are left alone, and the absence of cycles of length > 1 signals termination. Thus the following condition ⇒ action statement, iterated as long as the condition i ≠ t[i] can be met, executes a permutation represented in the array t: ∃ i:i ≠ t[i] ⇒ // { t[i], D[i] :=: t[t[i]], D[t[i]] } We use the multiple swap operator // { :=: } with the meaning: evaluate all four expressions using the original values of all the variables involved, then perform all four assignments simultaneously. It can be implemented using six single assignments and two auxiliary variables, one of type 1 .. n, the other of type 'elt'. Each swap places (at least) one element into its final position, say j, where it is guarded from any further swaps by virtue of j = t[j]. Thus the nondeterministic algorithm above executes at most n – 1 swaps: When n – 1 elements are in final position, the",algorithms and data structures.pdf "the nondeterministic algorithm above executes at most n – 1 swaps: When n – 1 elements are in final position, the n-th one is also. The conditions on i can be checked in any order, as long as they are checked exhaustively, for example: { (0) (1 ≤ j < 0) ⇒ j = t[j] } for i := 1 to n – 1 do { (1) (1 ≤ j < i) ⇒ j = t[j] } while i ≠ t[i] do // { t[i], D[i] :=: t[t[i]], D[t[i]] } { (2) (1 ≤ j ≤ i) ⇒ j = t[j] } { (3) (1 ≤ j ≤ n – 1) ⇒ j = t[j] } For each value of i, i is the leftmost position of the cycle that passes through i. As the while loop reduces this cycle to cycles of length 1, all swaps involve i and t[i] > i, as asserted by the invariant (1) (1 ≤ j < I) ⇒ j = t[j], which precedes the while loop. At completion of the while loop, the assertion is strengthened to include i, as stated in invariant (2) (1 ≤ j ≤ I) ⇒ j = t[j]. This reestablishes (1) for the next higher value of i. The vacuously true assertion",algorithms and data structures.pdf "invariant (2) (1 ≤ j ≤ I) ⇒ j = t[j]. This reestablishes (1) for the next higher value of i. The vacuously true assertion (0) serves as the basis of this proof by induction. The final assertion (3) is just a restatement of assertion (2) for the last value of i. Since t[1] … t[n] is a permutation of 1 …n, (3) implies that n = t[n]. Exercise: cycle clipping using the 'from' representation The nondeterministic algorithm expressed as a multiple assignment // (1 ≤ i ≤ n) { D[i]} := D[f[i]] } is equally as valid for the 'from' representation as its analog // (1 ≤ i ≤ n) { D[t[i]] := D[i] } was for the 'to' representation. But in contrast to the latter, the former cannot be translated into a simple iteration of the condition ⇒ action statement: ∃ i: i ≠ f[i] ⇒ // { f[i], D[i] :=: f[f[i]], D[f[i]] } Why not? Can you salvage the idea of cycle clipping using the 'from' representation Exercises",algorithms and data structures.pdf "Why not? Can you salvage the idea of cycle clipping using the 'from' representation Exercises 1. Write two functions that implement sequential search, one with sentinel as shown in the first section, ""Sequential search"" the other without sentinel. Measure and compare their running time on random arrays of various sizes 2. Measure and compare the running times of sequential search and binary search on random arrays of size n, for n = 1 to n = 100. Sequential search is obviously faster for small values of n, and binary search for large n, but where is the crossover? Explain your observations. Algorithms and Data Structures 86 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 10. Strings Learning objectives: • searching for patterns in a string • finite-state machine Most programming languages support simple operations on strings (e.g. comparison, concatenation, extraction, searching). Searching for a specified pattern in a string (text) is the computational kernel of most string processing operations. Several efficient algorithms have been developed for this potentially time-consuming operation. The approach presented here is very general; it allows searching for a pattern that consists not only of a single string, but a set of strings. The cardinality of this set influences the storage space needed, but not the time. It leads us to the concept of a finite-state machine (fsm). Recognizing a pattern consisting of a single string Problem: Given a (long) string z = z1 z2 … zn of n characters and a (usually much shorter) string p = p 1 p2 … pm of",algorithms and data structures.pdf "Problem: Given a (long) string z = z1 z2 … zn of n characters and a (usually much shorter) string p = p 1 p2 … pm of m characters (the pattern), find all (nonoverlapping) occurrences of p in z. By sliding a window of length m from left to right along z and examining most characters z i m times we solve the problem using m · n comparisons. By constructing a finite-state machine from the pattern p it suffices to examine each character zi exactly once, as shown in Exhibit 10.1. Each state corresponds to a prefix of the pattern, starting with the empty prefix and ending with the complete pattern. The input symbols are the input characters z 1, z2, … , zn of z. In the j-th step the input character z j leads from a state corresponding to the prefix p1 p2 … pi to • the state with prefix p1 p2 … pi pi+1 if zj = pi+1 • a different state (often the empty prefix, λ) if zj ≠ pi+1 Example p = barbara (Exhibit 10.1).",algorithms and data structures.pdf "• the state with prefix p1 p2 … pi pi+1 if zj = pi+1 • a different state (often the empty prefix, λ) if zj ≠ pi+1 Example p = barbara (Exhibit 10.1). Exhibit 10.1: State diagram showing some of the transitions. All other state transitions lead back to the initial state. Notice that the pattern 'barbara', although it sounds repetitive, cannot overlap with any part of itself. Constructing a finite-state machine for such a pattern is straightforward. But consider a self-overlapping pattern such as 'barbar', or 'abracadabra', or 'xx', where the first k > 0 characters are identical with the last: The text 'barbarbar' contains two overlapping occurrences of the pattern 'barbar', and 'xxxx' contains three occurrences of 'xx'. A finite-state machine constructed in an analogous fashion as the one used for 'barbara' always finds the first of Algorithms and Data Structures 87 A Global Text",algorithms and data structures.pdf "10. Strings several overlapping occurrences but might miss some of the later ones. As an exercise, construct finite-state machines that detect all occurrences of self-overlapping patterns. Recognizing a set of strings: a finite-state-machine interpreter Finite-state machines (fsm, also called ""finite automata"") are typically used to recognize patterns that consist of a set of strings. An adequate treatment of this more general problem requires introducing some concepts and terminology widely used in computer science. Given a finite set A of input symbols, the alphabet, A* denotes the (infinite) set of all (finite) strings over A, including the nullstring λ. Any subset L ⊆ A*, finite or infinite, is called a set of strings, or a language, over A. Recognizing a language L refers to the ability to examine any string z ∈ A*, one symbol at a time from left to right, and deciding whether or not z ∈ L.",algorithms and data structures.pdf "and deciding whether or not z ∈ L. A deterministic finite-state machine M is essentially given by a finite set S of states, a finite alphabet A of input symbols, and a transition function f: S x A → S. The state diagram depicts the states and the inputs, which lead from one state to another; thus a finite-state machine maps strings over A into sequences of states. When treating any specific problem, it is typically useful to expand this minimal definition by specifying one or more of the following additional concepts. An initial state s0 S, a subset F ⊆ S of final or accepting states, a finite alphabet B of output symbols and an output function g: S → B, which can be used to assign certain actions to the states in S. We use the concepts of initial state s 0 and of accepting states F to define the notion ""recognizing a set of strings"": A set L ⊆ A* of strings is recognized or accepted by the finite-state machine M = (S, A, f, s 0, F) iff all the strings",algorithms and data structures.pdf "strings"": A set L ⊆ A* of strings is recognized or accepted by the finite-state machine M = (S, A, f, s 0, F) iff all the strings in L, and no others, lead M from s0 to some state s ∈ F. Example Exhibit 10.3 shows the state diagram of a finite-state machine that recognizes parameter lists as defined by the syntax diagrams in Exhibit 10.2. L (letter) stands for a character a .. z, D (digit) for a digit 0 .. 9. Exhibit 10.2: Syntax diagram of simple parameter lists. 88",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 10.3: State diagram of finite-state machine to accept parameter lists. The starting state is '1', the single accepting state is '8'. A straightforward implementation of a finite-state machine interpreter uses a transition matrix T to represent the state diagram. From the current state s the input symbol c leads to the next state T[s, c]. It is convenient to introduce an error state that captures all illegal transitions. The transition matrix T corresponding to Exhibit 10.3 looks as follows: L represents a character a .. z. D represents a digit 0 .. 9. ! represents all characters that are not explicitly mentioned. ( ) : , ; L D ! 0 1 2 3 4 5 6 7 8 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 2 4 4 5 7 7 8 0 0 0 0 0 0 0 0 0 0 0 8 8 0 0 5 5 0 0 0 0 0 0 3 0 0 3 0 6 6 0 0 2 2 0 0 0 0 0 0 2 2 0 0 3 0 0 6 0 0 0 0 0 0 0 0 error state skip blank left parenthesis read reading variable identifier skip blank colon read",algorithms and data structures.pdf "6 0 0 2 2 0 0 0 0 0 0 2 2 0 0 3 0 0 6 0 0 0 0 0 0 0 0 error state skip blank left parenthesis read reading variable identifier skip blank colon read reading type identifier skip blank right parenthesis read The following is a suitable environment for programming a finite-state-machine interpreter: const nstate = 8; { number of states, without error state } type state = 0 .. nstate; { 0 = error state, 1 = initial state } inchar = ' ' .. '¨'; { 64 consecutive ASCII characters } tmatrix = array[state, inchar] of state; var T: tmatrix; After initializing the transition matrix T, the procedure 'silentfsm' interprets the finite-state machine defined by T. It processes the sequence of input characters and jumps around in the state space, but it produces no output. procedure silentfsm(var T: tmatrix); var s: state; c: inchar; begin s := 1; { initial state } while s ≠ 0 do { read(c); s := T[s, c] } Algorithms and Data Structures 89 A Global Text",algorithms and data structures.pdf "10. Strings end; The simple structure of 'silentfsm' can be employed for a useful finite-state-machine interpreter in which initialization, error condition, input processing and transitions in the state space are handled by procedures or functions 'initfsm', 'alive', 'processinput', and 'transition' which have to be implemented according to the desired behavior. The terminating procedure 'terminate' should print a message on the screen that confirms the correct termination of the input or shows an error condition. procedure fsmsim(var T: tmatrix); var … ; begin initfsm; while alive do { processinput; transition }; terminate end; Exercise: finite-state recognizer for multiples of 3 Consider the set of strings over the alphabet {0, 1} that represent multiples of 3 when interpreted as binary numbers, such as: 0, 00, 11, 00011, 110. Design two finite-state machines for recognizing this set:",algorithms and data structures.pdf "numbers, such as: 0, 00, 11, 00011, 110. Design two finite-state machines for recognizing this set: • Left to right: Mlr reads the strings from most significant bit to least significant. • Right to left: Mrl reads the strings from least significant bit to most significant. Solution Left to right: Let rk be the number represented by the k leftmost bits, and let b be the (k + 1)-st bit, interpreted as an integer. Then r k+1 = 2·rk + b. The states correspond to r k mod 3 ( Exhibit 10.4). Starting state and accepting state: 0'. Exhibit 10.4: Finite-state machine computes remainder modulo 3 left to right. Right to left: r k+1 = b·2 k + r k. Show by induction that the powers of 2 are alternatingly congruent to 1 and 2 modulo 3 (i.e. 2k mod 3 = 1 for k even, 2 k mod 3 = 2 for k odd). Thus we need a modulo 2 counter, which appears in Exhibit 10.5 as two rows of three states each. Starting state: 0. Accepting states: 0 and 0'. 90",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 10.5: Finite-state machine computes remainder modulo 3 right to left. Exercises and programming projects 1. Draw the state diagram of several finite-state machines, each of which searches a string z for all occurrences of an interesting pattern with repetitive parts, such as 'abaca' or 'Caracas'. 2. Draw the state diagram of finite-state machines that detect all occurrences of a self-overlapping pattern such as 'abracadabra', 'barbar', or 'xx'. 3. Finite-state recognizer for various days: Design a finite-state machine for automatic recognition of the set of nine words: 'monday','tuesday','wednesday','thursday', 'friday', 'saturday', 'sunday', 'day', 'daytime' in a text. The underlying alphabet consists of the lowercase letters 'a' .. 'z' and the blank. Draw the state diagram of the finite-state machine; identify the initial state and indicate accepting states by a double circle.",algorithms and data structures.pdf "diagram of the finite-state machine; identify the initial state and indicate accepting states by a double circle. It suffices to recognize membership in the set without recognizing each word individually. 4. Implementation of a pattern recognizer: Some useful procedures and functions require no parameters, hence most programming languages incorporate the concept of an empty parameter list. There are two reasonable syntax conventions about how to write the headers of parameterless procedures and functions: (1) procedure p; function f: T; (2) procedure p();function f(): T; Examples: Pascal uses convention (1); Modula-2 allows both (1) and (2) for procedures, but only (2) for function procedures. For each convention (1) and (2), modify the syntax diagram in Exhibit 10.2 to allow empty parameter lists, and draw the state diagrams of the corresponding finite-state machines. 5. Standard Pascal defines parameter lists by means of the syntax diagram shown in Exhibit 10.6.",algorithms and data structures.pdf "5. Standard Pascal defines parameter lists by means of the syntax diagram shown in Exhibit 10.6. Algorithms and Data Structures 91 A Global Text",algorithms and data structures.pdf "10. Strings Exhibit 10.6: Syntax diagram for standard Pascal parameter lists. Draw a state diagram for the corresponding finite-state machine. For brevity's sake, consider the reserved words 'function', 'var' and 'procedure' to be atomic symbols rather than strings of characters. 92",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 11. Matrices and graphs: transitive closure Learning objectives: • atomic versus structured objects • directed versus undirected graphs • transitive closure • adjacency and connectivity matrix • boolean matrix multiplication • efficiency of an algorithm. asymptotic notation • Warshall’s algorithm • weighted graph • minimum spanning tree In any systematic presentation of data objects, it is useful to distinguish primitive or atomic objects from composite or structured objects. In each of the preceding chapters we have seen both types: A bit, a character, or an identifier is usually considered primitive; a word of bits, a string of characters, an array of identifiers is naturally treated as composite. Before proceeding to the most common primitive objects of computation, numbers, let us discuss one of the most important types of structured objects, matrices. Even when matrices are filled with the",algorithms and data structures.pdf "discuss one of the most important types of structured objects, matrices. Even when matrices are filled with the simplest of primitive objects, bits, they generate interesting problems and useful algorithms. Paths in a graph Syntax diagrams and state diagrams are examples of a type of object that abounds in computer science: A graph consists of nodes or vertices, and of edges or arcs that connect a pair of nodes. Nodes and edges often have additional information attached to them, such as labels or numbers. If we wish to treat graphs mathematically, we need a definition of these objects. Directed graph. Let N be the set of n elements {1, 2, … , n} and E a binary relation: E N ⊆ ξ N, also denoted by an arrow, → . Consider N to be the set of nodes of a directed graph G, and E the set of arcs (directed edges). A directed graph G may be represented by its adjacency matrix A ( Exhibit 11.1 ), an n ξ n boolean matrix whose",algorithms and data structures.pdf "directed graph G may be represented by its adjacency matrix A ( Exhibit 11.1 ), an n ξ n boolean matrix whose elements A[i, j] determine the existence of an arc from i to j: A[i, j] = true iff i → j. An arc is a path of length 1. From A we can derive all paths of any length. This leads to a relation denoted by a double arrow, ⇒ , called the transitive closure of E: i ⇒ j, iff there exists a path from i to j (i.e. a sequence of arcs i → i1, i1 → i2, i2 → i3, … , i k → j). We accept paths of length 0 (i.e. i ⇒ i for all i). This relation ⇒ is represented by a matrix C= A∗(Exhibit 11.1): Algorithms and Data Structures 93 A Global Text",algorithms and data structures.pdf "11. Matrices and graphs: transitive closure C[i, j] = true iff i ⇒ j. C stands for connectivity or reachability matrix; C = A∗ is also called transitive hull or transitive closure, since it is the smallest transitive relation that ""encloses"" E. Exhibit 11.1: Example of a directed graph with its adjacency and connectivity matrix. (Undirected) graph. If the relation E ⊆ N ξ N is symmetric [i.e. for every ordered pair (i, j) of nodes it also contains the opposite pair (j, i)] we can identify the two arcs (i, j) and (j, i) with a single edge, the unordered pair (i, j). Books on graph theory typically start with the definition of undirected graphs (graphs, for short), but we treat them as a special case of directed graphs because the latter occur much more often in computer science. Whereas graphs are based on the concept of an edge between two nodes, directed graphs embody the concept of one-way arcs leading from a node to another one. Boolean matrix multiplication",algorithms and data structures.pdf "arcs leading from a node to another one. Boolean matrix multiplication Let A, B, C be n ξ n boolean matrices defined by type nnboolean: array[1 .. n, 1 .. n] of boolean; var A, B, C: nnboolean; The boolean matrix multiplication C = A · B is defined as and implemented by and implemented by procedure mmb(var a, b, c: nnboolean); var i, j, k: integer; begin for i := 1 to n do for j := 1 to n do begin c[i, j] := false; for k := 1 to n do c[i, j] := c[i, j] or (a[i, k] and b[k, j]) (∗∗) end end; Remark: Remember (in the section, “Pascal and its dialects: Lingua franca of computer science”) that we usually assume the boolean operations 'or' and 'and' to be conditional (i.e. their arguments are evaluated only as far as necessary to determine the value of the expression). An extension of this simple idea leads to an alternative way of coding boolean matrix multiplication that speeds up the innermost loop above for large values of n. Explain why",algorithms and data structures.pdf "of coding boolean matrix multiplication that speeds up the innermost loop above for large values of n. Explain why the following code is equivalent to (∗∗): k:=1; 94 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 T T T T T T T T T T T T T T T TT T T T T C 1 2 3 4 5 1 2 3 4 5 T T T T T T A",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License while not c[i, j] and (k ≤ n) do { c[i, j] := a[i, k] and b[k, j]; k := k + 1 } Multiplication also defines powers, and this gives us a first solution to the problem of computing the transitive closure. If Al+1 denotes the L-th power of A, the formula has a clear interpretation: There exists a path of length L + 1 from i to j iff, for some node k, there exists a path of length L from i to k and a path of length 1 (a single arc) from k to j. Thus A 2 represents all paths of length 2; in general, AL represents all paths of length L, for L ≥ 1: AL[i, j] = true iff there exists a path of length L from i to j. Rather than dealing directly with the adjacency matrix A, it is more convenient to construct the matrix A' = A or I. The identity matrix I has the values 'true' along the diagonal, 'false' everywhere else. Thus in A' all diagonal",algorithms and data structures.pdf "I. The identity matrix I has the values 'true' along the diagonal, 'false' everywhere else. Thus in A' all diagonal elements A'[i, i] = true. Then A'L describes all paths of length ≤ L (instead of exactly equal to L), for L ≥ 0. Therefore, the transitive closure is A∗ = A'(n-1) The efficiency of an algorithm is often measured by the number of ""elementary"" operations that are executed on a given data set. The execution time of an elementary operation [e.g. the binary boolean operators (and, or) used above] does not depend on the operands. To estimate the number of elementary operations performed in boolean matrix multiplication as a function of the matrix size n, we concentrate on the leading terms and neglect the lesser terms. Let us use asymptotic notation in an intuitive way; it is defined formally in Part IV. The number of operations (and, or), executed by procedure 'mmb' when multiplying two boolean n ξ n matrices",algorithms and data structures.pdf "The number of operations (and, or), executed by procedure 'mmb' when multiplying two boolean n ξ n matrices is Θ (n3) since each of the nested loops is iterated n times. Hence the cost for computing A' (n–1) by repeatedly multiplying with A' is Θ (n4). This algorithm can be improved to Θ (n3 · log n) by repeatedly squaring: A'2, A'4, A'8 , … , A'k where k is the smallest power of 2 with k ≥ n – 1. It is not necessary to compute exactly A' (n–1). Instead of A'13, for example, it suffices to compute A' 16, the next higher power of 2, which contains all paths of length at most 16. In a graph with 14 nodes, this set is equal to the set of all paths of length at most 1. Warshall's algorithm In search of a faster algorithm we consider other ways of iterating over the set of all paths. Instead of iterating over paths of growing length, we iterate over an increasing number of nodes that may be used along a path from",algorithms and data structures.pdf "over paths of growing length, we iterate over an increasing number of nodes that may be used along a path from node i to node j. This idea leads to an elegant algorithm due to Warshall [War 62]: Compute a sequence of matrices B0, B1, B2, … , Bn: B0[i, j] = A'[i, j] = true iff i = j or i → j. B1[i, j] = true iff i ⇒ j using at most node 1 along the way. B2[i, j] = true iff i ⇒ j using at most nodes 1 and 2 along the way … Bk[i, j] = true iff i ⇒ j using at most nodes 1, 2, … , k along the way. The matrices B 0, B1, … express the existence of paths that may touch an increasing number of nodes along the way from node i to node j; thus Bn talks about unrestricted paths and is the connectivity matrix C = Bn. An iteration step Bk–1 → Bk is computed by the formula Algorithms and Data Structures 95 A Global Text",algorithms and data structures.pdf "11. Matrices and graphs: transitive closure Bk[i, j] = Bk–1[i, j] or (Bk–1[i, k] and Bk–1[k, j]). The cost for perfor ming one step is Θ (n2), the cost for computing the connectivity matrix is therefore Θ (n3). A comparison of the formula for Warshall's algorithm wit h the formula for matrix multiplication shows that the n-ary 'OR' has been replaced by a binary 'or'. At first sight, the following procedure appears to execute the algorithm specified above, but a closer look reveals that it executes something else: the assignment in the innermost loop computes new values that are used immediately, instead of the old ones. procedure warshall(var a: nnboolean); var i, j, k: integer; begin for k := 1 to n do for i := 1 to n do for j := 1 to n do a[i, j] := a[i, j] or (a[i, k] and a[k, j]) { this assignment mixes values of the old and new matrix } end;",algorithms and data structures.pdf "for j := 1 to n do a[i, j] := a[i, j] or (a[i, k] and a[k, j]) { this assignment mixes values of the old and new matrix } end; A more thorough examination, however, shows that this ""naively"" programmed procedure computes the correct result in-place more efficiently than would direct application of the formulas for the matrices B k. We encourage you to verify that the replacement of old values by new ones leaves intact all values needed for later steps; that is, show that the following equalities hold: Bk[i, k] = Bk–1[i, k] and Bk[k, j] = Bk–1[k, j]. Exercise: distances in a directed graph, Floyd's algorithm Modify Warshall's algorithm so that it computes the shortest distance between any pair of nodes in a directed graph where each arc is assigned a length ≥ 0. We assume that the data is given in an n ξ n array of reals, where d[i, j] is the length of the arc between node i and node j. If no arc exists, then d[i, j] is set to ∞, a constant that is the",algorithms and data structures.pdf "j] is the length of the arc between node i and node j. If no arc exists, then d[i, j] is set to ∞, a constant that is the largest real number that can be represented on the given computer. Write a procedure 'dist' that works on an array d of type type nnreal = array[1 .. n, 1 .. n] of real; Think of the meaning of the boolean operations 'and' and 'or' in Warshall's algorithm, and find arithmetic operations that play an analogous role for the problem of computing distances. Explain your reasoning in words and pictures. Solution The following procedure 'dist' implements Floyd's algorithm [Flo 62]. We assume that the length of a nonexistent arc is ∞, that x + ∞ = ∞, and that min(x, ∞) = x for all x. procedure dist(var d: nnreal); var i, j, k: integer; begin for k := 1 to n do for i := 1 to n do for j := 1 to n do d[i, j] := min(d[i, j], d[i, k] + d[k, j]) end; 96",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exercise: shortest paths In addition to the distance d[i, j] of the preceding exercise, we wish to compute a shortest path from i to j (i.e. one that realizes this distance). Extend the solution above and write a procedure 'shortestpath' that returns its result in an array 'next' of type: type nnn = array[1 .. n, 1 .. n] of 0 .. n; next[i,j] contains the next node after i on a shortest path from i to j, or 0 if no such path exists. Solution procedure shortestpath(var d: nnreal; var next: nnn); var i, j, k: integer; begin for i := 1 to n do for j := 1 to n do if d[i, j] ≠ ∞ then next[i, j] := j else next[i, j] := 0; for k := 1 to n do for i := 1 to n do for j := 1 to n do if d[i, k] + d[k, j] < d[i, j] then { d[i, j] := d[i, k] + d[k, j]; next[i, j] := next[i, k] } end;",algorithms and data structures.pdf "for i := 1 to n do for j := 1 to n do if d[i, k] + d[k, j] < d[i, j] then { d[i, j] := d[i, k] + d[k, j]; next[i, j] := next[i, k] } end; It is easy to prove that next[i, j] = 0 at the end of the algorithm iff d[i, j] = ∞ (i.e. there is no path from i to j). Minimum spanning tree in a graph Consider a weighted graph G = (V, E, w), where V = {v 1, …, vn} is the set of vertices, E = {e 1, … , e m} is the set of edges, each edge ei is an unordered pair (vj, vk) of vertices, and w: E → R assigns a real number to each edge, which we call its weight. We consider only connected graphs G, in the sense that any pair (vj, vk) of vertices is connected by a sequence of edges. In the following example, the edges are labeled with their weight (Exhibit 11.2). Exhibit 11.2: Example of a minimum spanning tree. A tree T is a connected graph that contains no circuits: any pair (v j, vk) of vertices in T is connected by a unique",algorithms and data structures.pdf "A tree T is a connected graph that contains no circuits: any pair (v j, vk) of vertices in T is connected by a unique sequence of edges. A spanning tree of a graph G is a subgraph T of G, given by its set of edges E T ⊆ E, that is a tree and satisfies the additional condition of being maximal, in the sense that no edge in E \ E T can be added to T without destroying the tree property. Observation: a connected graph G has at least one spanning tree. The weight Algorithms and Data Structures 97 A Global Text",algorithms and data structures.pdf "11. Matrices and graphs: transitive closure of a spanning tree is the sum of the weights of all its edges. A minimum spanning tree is a spanning tree of minimal weight. In Exhibit 11.2, the bold edges form the minimal spanning tree. Consider the following two algorithms: Grow: ET := ∅ ; { initialize to empty set } while T is not a spanning tree do ET := E T ∪ {a min cost edge that does not form a circuit when added to ET} Shrink: ET := E; { initialize to set of all edges } while T is not a spanning tree do ET := ET \ {a max cost edge that leaves T connected after its removal} Claim: The ""growing algorithm"" and ""shrinking algorithm"" determine a minimum spanning tree. If T is a spanning tree of G and e = (v j, vk) ∉ ET, we define Ckt(e, T), ""the circuit formed by adding e to T"" as the set of edges in ET that form a path from v j to vk. In the example of Exhibit 11.2 with the spanning tree shown in bold edges we obtain Ckt((v4, v5), T) = {(v4, v1), (v1, v2), (v2, v5)}.",algorithms and data structures.pdf "edges we obtain Ckt((v4, v5), T) = {(v4, v1), (v1, v2), (v2, v5)}. Exercise Show that for each edge e ∉ ET there exists exactly one such circuit. Show that for any e ∉ ET and any t ∉ Ckt(e, T) the graph formed by (ET \ {t}) ∪ {e} is still a spanning tree. A local minimum spanning tree of G is a spanning tree T with the property that there exist no two edges e ∉ ET , t ∉ Ckt(e, T) with w(e) < w(t). Consider the following 'exchange algorithm', which computes a local minimum spanning tree: Exchange: T := any spanning tree; while there exists e ∉ ET, t ∈ Ckt(e, T) with w(e) < w(t) do ET := (ET \ {t}) ∪ {e}; { exchange } Theorem: A local minimum spanning tree for a graph G is a minimum spanning tree. For the proof of this theorem we need: Lemma: If T' and T"" are arbitrary spanning trees for G, T' ≠ T"", then there exist e"" ∉ ET' , e' ∉ ET"" , such that e"" ∈ Ckt(e', T"") and e' ∈ Ckt(e"", T').",algorithms and data structures.pdf "∈ Ckt(e', T"") and e' ∈ Ckt(e"", T'). Proof: Since T' and T"" are spanning trees for G and T' ≠ T"", there exists e"" ∈ ET"" \ ET'. Assume that Ckt(e"", T') ⊆ T"". Then e"" and the edges in Ckt(e"", T') form a circuit in T"" that contradicts the assumption that T"" is a tree. Hence there must be at least one e' ∈ Ckt(e"", T') \ ET"". Assume that for all e' ∈ Ckt(e"", T') \ ET"" we have e"" ∈ Ckt(e', T""). Then forms a circuit in T"" that contradicts the proposition that T"" is a tree. Hence there must be at least one e' ∈ Ckt(e"", T') \ ET"" with e"" ∈ Ckt(e', T""). 98",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Proof of the Theorem: Assume that T' is a local minimum spanning tree. Let T"" be a minimum spanning tree. If T' ≠ T"" the lemma implies the existence of e' ∈ Ckt(e"", T') \ ET"" and e"" ∈ Ckt(e', T"") \ ET'. If w(e') < w(e""), the graph defined by the edges (E T"" \ {e""}) ∪ {e'} is a spanning tree with lower weight than T"". Since T"" is a minimum spanning tree, this is impossible and it follows that w(e') ≥w (e""). (∗) If w(e') > w(e""), the graph defined by the edges (E T' \ {e'}) ∪ {e""} is a spanning tree with lower weight than T'. Since T"" is a local minimum spanning tree, this is impossible and it follows that w(e') ≤ w(e""). (∗∗) From (∗∗) and ( ∗ ∗∗∗) it follows that w(e') = w(e"") must hold. The graph defined by the edges (E T"" \ {e""}) ∪ {e'} is still a spanning tree that has the same weight as T"". We replace T"" by this new minimum spanning tree and",algorithms and data structures.pdf "still a spanning tree that has the same weight as T"". We replace T"" by this new minimum spanning tree and continue the replacement process. Since T' and T"" have only finitely many edges the process will terminate and T"" will become equal to T'. This proves that T"" is a minimum spanning tree. The theorem implies that the tree computed by 'Exchange' is a minimum spanning tree. Exercises 1. Consider how to extend the transitive closure algorithm based on boolean matrix multiplication so that it computes (a) distances and (b) a shortest path. 2. Prove that the algorithms 'Grow' and 'Shrink' compute local minimum spanning trees. Thus they are minimum spanning trees by the theorem of the section entitled “Minimum spanning tree in a graph”. Algorithms and Data Structures 99 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 12. Integers Learning objectives: • integers and their operations • Euclidean algorithm • Sieve of Eratosthenes • large integers • modular arithmetic • Chinese remainder theorem • random numbers and their generators Operations on integers Five basic operations account for the lion's share of integer arithmetic: + – · div mod The product 'x · y', the quotient 'x div y', and the remainder 'x mod y' are related through the following div-mod identity: (1) (x div y) · y + (x mod y) = x for y ≠ 0. Many programming languages provide these five operations, but unfortunately, 'mod' tends to behave differently not only between different languages but also between different implementations of the same language. How come have we not learned in school what the remainder of a division is? The div-mod identity, a cornerstone of number theory, defines 'mod' assuming that all the other operations are",algorithms and data structures.pdf "The div-mod identity, a cornerstone of number theory, defines 'mod' assuming that all the other operations are defined. It is mostly used in the context of nonnegative integers x ≥ 0, y > 0, where everything is clear, in particular the convention 0 ≤ x mod y < y. One half of the domain of integers consists of negative numbers, and there are good reasons for extending all five basic operations to the domain of all integers (with the possible exception of y = 0), such as: • Any operation with an undefined result hinders the portability and testing of programs: if the ""forbidden"" operation does get executed by mistake, the computation may get into nonrepeatable states. Example: from a practical point of view it is better not to leave 'x div 0' undefined, as is customary in mathematics, but to define the result as '= overflow', a feature typically supported in hardware.",algorithms and data structures.pdf "define the result as '= overflow', a feature typically supported in hardware. • Some algorithms that we usually consider in the context of nonnegative integers have natural extensions into the domain of all integers (see the following sections on 'gcd' and modular number representations). Unfortunately, the attempt to extend 'mod' to the domain of integers runs into the problem mentioned above: How should we define 'div' and 'mod'? Let's follow the standard mathematical approach of listing desirable properties these operations might possess. In addition to the ""sacred"" div-mod identity (1) we consider: (2) Symmetry of div: (–x) div y = x div (–y) = –(x div y). The most plausible way to extend 'div' to negative numbers. Algorithms and Data Structures 100 A Global Text",algorithms and data structures.pdf "12. Integers (3) A constraint on the possible values assumed by 'x mod y', which, for y > 0, reduces to the convention of nonnegative remainders: 0 ≤ x mod y < y. This is important because a standard use of 'mod' is to partition the set of integers into y residue classes. We consider a weak and a strict requirement: (3') Number of residue classes = |y|: for given y and varying x, 'x mod y' assumes exactly |y| distinct values. (3"") In addition, we ask for nonnegative remainders: 0 ≤ x mod y < |y|. Pondering the consequences of these desiderata, we soon realize that 'div' cannot be extended to negative arguments by means of symmetry. Even the relatively innocuous case of positive denominator y > 0 makes it impossible to preserve both (2) and (3""), as the following failed attempt shows: ((–3) div 2) · 2 + ((–3) mod 2) ?=? –3 Preserving (1) (–(3 div 2)) · 2 + 1 ?=? –3 and using (2) and (3"") (–1) · 2 + 1 ≠ –3 … fails!",algorithms and data structures.pdf "((–3) div 2) · 2 + ((–3) mod 2) ?=? –3 Preserving (1) (–(3 div 2)) · 2 + 1 ?=? –3 and using (2) and (3"") (–1) · 2 + 1 ≠ –3 … fails! Even the weak condition (3'), which we consider essential, is incompatible with (2). For y = –2, it follows from (1) and (2) that there are three residue classes modulo (–2): x mod (–2) yields the values 1, 0, –1; for example, 1 mod (–2) = 1, 0 mod (–2) = 0, (–1) mod (–2) = –1. This does not go with the fact that 'x mod 2' assumes only the two values 0, 1. Since a reasonable partition into residue classes is more important than the superficially appealing symmetry of 'div', we have to admit that (2) was just wishful thinking. Without giving any reasons, [Knu 73a] (see the chapter ""Reducing a task to given primitives; programming motion) defines 'mod' by means of the div-mod identity (1) as follows: x mod y = x – y · x / y, if y ≠ 0; x mod 0 = x;",algorithms and data structures.pdf "motion) defines 'mod' by means of the div-mod identity (1) as follows: x mod y = x – y · x / y, if y ≠ 0; x mod 0 = x; Thus he implicitly defines x div y = x / y, where z, the ""floor"" of z, denotes the largest integer ≤ z; the ""ceiling"" z denotes the smallest integer ≥ z. Knuth extends the domain of 'mod' even further by defining ""x mod 0 = x"". With the exception of this special case y = 0, Knuth's definition satisfies (3'): Number of residue classes = |y|. The definition does not satisfy (3""), but a slightly more complicated condition. For given y ≠ 0, we have 0 ≤ x mod y < y, if y > 0; and 0 ≥ x mod y > y, if y < 0. Knuth's definition of 'div' and 'mod' has the added advantage that it holds for real numbers as well, where 'mod' is a useful operation for expressing the periodic behavior of functions [e.g. tan x = tan (x mod π)]. Exercise: another definition of 'div' and 'mod' 1. Show that the definition",algorithms and data structures.pdf "= tan (x mod π)]. Exercise: another definition of 'div' and 'mod' 1. Show that the definition in conjunction with the div-mod identity (1) meets the strict requirement (3""). 101",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Solution Exercise Fill out comparable tables of values for Knuth's definition of 'div' and 'mod'. Solution The Euclidean algorithm A famous algorithm for computing the greatest common divisor (gcd) of two natural numbers appears in Book 7 of Euclid's Elements (ca. 300 BC). It is based on the identity gcd(u, v) = gcd(u – v, v), which can be used for u > v to reduce the size of the arguments, until the smaller one becomes 0. We use these properties of the greatest common divisor of two integers u and v > 0: gcd(u, 0) = u By convention this also holds for u = 0. gcd(u, v) = gcd(v, u) Permutation of arguments, important for the termination of the following procedure. gcd(u, v) = gcd(v, u – q · v) For any integer q. The formulas above translate directly into a recursive procedure: Algorithms and Data Structures 102 A Global Text",algorithms and data structures.pdf "12. Integers function gcd(u, v: integer): integer; begin if v = 0 then return(u) else return(gcd(v, u mod v)) end; A test for the relative size of u and v is unnecessary. If initially u < v, the first recursive call permutes the two arguments, and thereafter the first argument is always larger than the second. This simple and concise solution has a relatively high implementation cost. A stack, introduced to manage the recursive procedure calls, consumes space and time. In addition to the operations visible in the code (test for equality, assignment, and 'mod'), hidden stack maintenance operations are executed. There is an equally concise iterative version that requires a bit more thinking and writing, but is significantly more efficient: function gcd(u, v: integer): integer; var r: integer; begin while v ≠ 0 do { r := u mod v; u := v; v := r }; return(u) end; The prime number sieve of Eratosthenes",algorithms and data structures.pdf "var r: integer; begin while v ≠ 0 do { r := u mod v; u := v; v := r }; return(u) end; The prime number sieve of Eratosthenes The oldest and best-known algorithm of type sieve is named after Eratosthenes (ca. 200 BC). A set of elements is to be separated into two classes, the ""good"" ones and the ""bad"" ones. As is often the case in life, bad elements are easier to find than good ones. A sieve process successively eliminates elements that have been recognized as bad; each element eliminated helps in identifying further bad elements. Those elements that survive the epidemic must be good. Sieve algorithms are often applicable when there is a striking asymmetry in the complexity or length of the proofs of the two assertions ""p is a good element"" and ""p is a bad element"". This theme occurs prominently in the complexity theory of problems that appear to admit only algorithms whose time requirement grows faster than",algorithms and data structures.pdf "complexity theory of problems that appear to admit only algorithms whose time requirement grows faster than polynomially in the size of the input (NP completeness). Let us illustrate this asymmetry in the case of prime numbers, for which Eratosthenes' sieve is designed. In this analogy, ""prime"" is ""good"" and ""nonprime"" is ""bad"". A prime is a positive integer greater than 1 that is divisible only by 1 and itself. Thus primes are defined in terms of their lack of an easily verified property: a prime has no factors other than the two trivial ones. To prove that 1 675 307 419 is not prime, it suffices to exhibit a pair of factors: 1 675 307 419 = 1 234 567 · 1 357. This verification can be done by hand. The proof that 217 – 1 is prime, on the other hand, is much more elaborate. In general (without knowledge of any special property this particular number might have) one has to verify, for",algorithms and data structures.pdf "In general (without knowledge of any special property this particular number might have) one has to verify, for each and every number that qualifies as a candidate factor, that it is not a factor. This is obviously more time consuming than a mere multiplication. Exhibiting factors through multiplication is an example of what is sometimes called a ""one-way"" or ""trapdoor"" function: the function is easy to evaluate (just one multiplication), but its inverse is hard. In this context, the inverse of multiplication is not division, but rather factoriz ation. Muc h of modern cryptography relies on the difficulty of factorization. The prime number sieve of Eratosthenes works as follow s. We mark the smallest prime, 2, and erase all of its multiples within the desired range 1 .. n. The smallest remaining number must be prime; we mark it and erase its 103",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License multiples. We repeat this process for all numbers up to √n: If an integer c < n can be factored, c = a · b, then at least one of the factors is <√n. { sieve of Eratosthenes marks all the primes in 1 .. n } const n = … ; var sieve: packed array [2 .. n] of boolean; p, sqrtn, i: integer; … begin for i := 2 to n do sieve[i] := true; { initialize the sieve } sqrtn := trunc(sqrt(n)); { it suffices to consider as divisors the numbers up to √ n } p := 2; while p ≤ sqrtn do begin i := p · p; while i ≤ n do { sieve[i] := false; i := i + p }; repeat p := p + 1 until sieve[p]; end; end; Large integers The range of numbers that can be represented directly in hardware is typically limited by the word length of the computer. For example, many small computers have a word length of 16 bits and thus limit integers to the range –",algorithms and data structures.pdf "computer. For example, many small computers have a word length of 16 bits and thus limit integers to the range – 215 ≤ a < +2 15 =32768. When the built-in number system is insufficient, a variety of software techniques are used to extend its range. They differ greatly with respect to their properties and intended applications, but all of them come at an additional cost in memory and, above all, in the time required for performing arithmetic operations. Let us mention the most common techniques. Double-length or double-precision integers. Two words are used to hold an integer that squares the available range as compared to integers stored in one word. For a 16-bit computer we get 32-bit integers, for a 32- bit computer we get 64-bit integers. Operations on double-precision integers are typically slower by a factor of 2 to 4. Variable precision integers. The idea above is extended to allocate as many words as necessary to hold a",algorithms and data structures.pdf "4. Variable precision integers. The idea above is extended to allocate as many words as necessary to hold a given integer. This technique is used when the size of intermediate results that arise during the course of a computation is unpredictable. It calls for list processing techniques to manage memory. The time of an operation depends on the size of its arguments: linearly for addition, mostly quadratically for multiplication. Packed BCD integers. This is a compromise between double precision and variable precision that comes from commercial data processing. The programmer defines the maximal size of every integer variable used, typically by giving the maximal number of decimal digits that may be needed to express it. The compiler allocates an array of bytes to this variable that contains the following information: maximal length, current length, sign, and the digits.",algorithms and data structures.pdf "bytes to this variable that contains the following information: maximal length, current length, sign, and the digits. The latter are stored in BCD (binary-coded decimal) representation: a decimal digit is coded in 4 bits, two of them are packed into a byte. Packed BCD integers are expensive in space because most of the time there is unused allocated space; and even more so in time, due to digit-by-digit arithmetic. They are unsuitable for lengthy scientific/technical computations, but OK for I/O-intensive data processing applications. Algorithms and Data Structures 104 A Global Text",algorithms and data structures.pdf "12. Integers Modular number systems: the poor man's large integers Modular arithmetic is a special-purpose technique with a narrow range of applications, but is extremely efficient where it applies—typically in combinatorial and number-theoretic problems. It handles addition, and particularly multiplication, with unequaled efficiency, but lacks equally efficient algorithms for division and comparison. Certain combinatorial problems that require high precision can be solved without divisions and with few comparisons; for these, modular numbers are unbeatable. Chinese Remainder Theorem: Let m 1, m 2, … , m k be pairwise relatively prime positive integers, called moduli. Let m = m1 · m2 · … · mk be their product. Given k positive integers r1, r2, … , rk, called residues, with 0 ≤ ri < mi for 1 ≤ i ≤ rk, there exists exactly one integer r, 0 ≤ r < m, such that r mod mi = ri for 1 ≤ i ≤ k.",algorithms and data structures.pdf "mi for 1 ≤ i ≤ rk, there exists exactly one integer r, 0 ≤ r < m, such that r mod mi = ri for 1 ≤ i ≤ k. The Chinese remainder theorem is used to represent integers in the range 0 ≤ r < m uniquely as k-tuples of their residues modulo mi. We denote this number representation by r ~ [r1, r2, … , rk]. The practicality of modular number systems is based on the following fact: The arithmetic operations (+ , – , ·) on integers r in the range 0 ≤ r< m are represented by the same operations, applied componentwise to k-tuples [r 1, r2, … , rk]. A modular number system replaces a single +, –, or · in a large range by k operations of the same type in small ranges. If r ~ [r1, r2, … , rk], s ~ [s1, s2, … , sk], t ~ [t1, t2, … , tk], then: (r + s)mod m = t⇔ (ri + si)mod mi = ti for 1 ≤ i ≤ k, (r – s)mod m = t⇔ (ri – si)mod mi = ti for 1 ≤ i ≤ k, (r · s)mod m = t⇔ (ri · si)mod mi = ti for 1 ≤ i ≤ k. Example",algorithms and data structures.pdf "(r – s)mod m = t⇔ (ri – si)mod mi = ti for 1 ≤ i ≤ k, (r · s)mod m = t⇔ (ri · si)mod mi = ti for 1 ≤ i ≤ k. Example m1 = 2 and m 2 = 5, hence m = m 1 · m 2 = 2 · 5 = 10. In the following table the numbers r in the range 0 .. 9 are represented as pairs modulo 2 and modulo 5. Let r = 2 and s = 3, hence r · s = 6. In modular representation: r ~ [0, 2], s ~ [1, 3], hence r · s ~ [0, 1]. A useful modular number system is formed by the moduli m1 = 99, m2 = 100, m3 = 101, hence m = m1 · m2 · m3 = 999900. Nearly a million integers in the range 0 ≤ r < 999900 can be represented. The conversion of a decimal number to its modular form is easily computed by hand by adding and subtracting pairs of digits as follows: r mod 99: Add pairs of digits, and take the resulting sum mod 99. r mod 100: Take the least significant pair of digits. r mod 101: Alternatingly add and subtract pairs of digits, and take the result mod 101.",algorithms and data structures.pdf "r mod 100: Take the least significant pair of digits. r mod 101: Alternatingly add and subtract pairs of digits, and take the result mod 101. The largest integer produced by operations on components is 100 2 ~ 213; it is smaller than 215 = 32768 ~ 32k and thus causes no overflow on a computer with 16-bit arithmetic. 105",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Example r = 123456 r mod 99 = (56 + 34 + 12) mod 99 = 3 r mod 100 = 56 r mod 101 = (56 – 34 + 12) mod 101 = 34 r ~ [3, 56, 34] s = 654321 s mod 99 = (21 + 43 + 65) mod 99 = 30 s mod 100 = 21 s mod 101 = (21 – 43 + 65) mod 101 = 43 s ~ [30, 21, 43] r + s ~ [3, 56, 34] + [30, 21, 43] = [33, 77, 77] Modular arithmetic has some shortcomings: division, comparison, overflow detection, and conversion to decimal notation trigger intricate computations. Exercise: Fibonacci numbers and modular arithmetic The sequence of Fibonacci numbers 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, … is defined by x0 = 0, x1 = 1, xn = xn–1 + xn–2 for n ≥ 2. Write (a) a recursive function (b) an iterative function that computes the n-th element of this sequence. Using modular arithmetic, compute Fibonacci numbers up to 10 8 on a computer with 16-bit integer arithmetic, where the largest integer is 215 – 1 = 32767.",algorithms and data structures.pdf "largest integer is 215 – 1 = 32767. (c) Using moduli m1 = 999, m2 = 1000, m3 = 1001, what is the range of the integers that can be represented uniquely by their residues [r1, r2, r3] with respect to these moduli? (d) Describe in words and formulas how to compute the triple [r 1, r2, r3] that uniquely represents a number r in this range. (e) Modify the function in (b) to compute Fibonacci numbers in modular arithmetic with the moduli 999, 1000, and 1001. Use the declaration type triple = array [1 .. 3] of integer; and write the procedure procedure modfib(n: integer; var r: triple); Solution (a) function fib(n: integer): integer; begin if n ≤ 1 then return(n) else return(fib(n – 1) + fib(n – 2)) end; (b) function fib(n: integer): integer; var p, q, r, i: integer; begin if n ≤ 1 then return(n) Algorithms and Data Structures 106 A Global Text",algorithms and data structures.pdf "12. Integers else begin p := 0; q := 1; for i := 2 to n do { r := p + q; p := q; q := r }; return(r) end end; (c) The range is 0 .. m – 1 with m = m1 · m2 · m3 = 999 999 000. (d) r = d1 · 1 000 000 + d2 · 1000 + d3 with 0 ≤ d1, d2, d3 ≤ 999 1 000 000 = 999 999 + 1= 1001 · 999 + 1 1000 = 999 + 1 = 1001 – 1 r1 = r mod 999 = (d1 + d2 + d3) mod 999 r2 = r mod 1000 = d3 r3 = r mod 1001 = (d1 – d2 + d3) mod 1001 (e) procedure modfib(n: integer; var r: triple); var p, q: triple; i, j: integer; begin if n ≤ 1 then for j := 1 to 3 do r[j] := n else begin for j := 1 to 3 do { p[j] := 0; q[j] := 1 }; for i := 2 to n do begin for j := 1 to 3 do r [j] := (p[j] + q[j]) mod (998 + j); p := q; q := r end end end; Random numbers The colloquial meaning of the term at random often implies ""unpredictable"". But random numbers are used in scientific/technical computing in situations where unpredictability is neither required nor desirable. What is",algorithms and data structures.pdf "scientific/technical computing in situations where unpredictability is neither required nor desirable. What is needed in simulation, in sampling, and in the generation of test data is not unpredictability but certain statistical properties. A random number generator is a program that generates a sequence of numbers that passes a number of specified statistical tests. Additional requirements include: it runs fast and uses little memory; it is portable to computers that use a different arithmetic; the sequence of random numbers generated can be reproduced (so that a test run can be repeated under the same conditions). In practice, random numbers are generated by simple formulas. The most widely used class, linear congruential generators, given by the formula ri+1 = (a · ri + c) mod m are characterized by three integer constants: the multiplier a, the increment c, and the modulus m. The sequence is initialized with a seed r0.",algorithms and data structures.pdf "are characterized by three integer constants: the multiplier a, the increment c, and the modulus m. The sequence is initialized with a seed r0. All these constants must be chosen carefully. Consider, as a bad example, a formula designed to generate random days in the month of February: r0 = 0, ri+1 = (2 · ri + 1) mod 28. It generates the sequence 0, 1, 3, 7, 15, 3, 7, 15, 3, … . Since 0 ≤ r i < m, each generator of the form above generates a sequence with a prefix of length < m which is followed by a period of length ≤ m. In the example, the 107",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License prefix 0, 1 of length 2 is followed by a period 3, 7, 15 of length 3. Usually we want a long period. Results from number theory assert that a period of length m is obtained if the following conditions are met: • m is chosen as a prime number. • (a – 1) is a multiple of m. • m does not divide c. Example r0 = 0, ri+1 = (8 · ri + 1) mod 7 generates a sequence: 0, 1, 2, 3, 4, 5, 6, 0, … with a period of length 7. Shall we accept this as a sequence of random integers, and if not, why not? Should we prefer the sequence 4, 1, 6, 2, 3, 0, 5, 4, … ? For each application of random numbers, the programmer/analyst has to identify the important statistical properties required. Under normal circumstances these include: No periodicity over the length of the sequence actually used. Example: to generate a sequence of 100 random",algorithms and data structures.pdf "No periodicity over the length of the sequence actually used. Example: to generate a sequence of 100 random weekdays ∈ {Su, Mo, … , Sat}, do not pick a generator with modulus 7, which can generate a period of length at most 7; pick one with a period much longer than 100. A desired distribution, most often the uniform distribution. If the range 0 .. m – 1 is partitioned into k equally sized intervals I1, I2, … , Ik, the numbers generated should be uniformly distributed among these intervals; this must be the case not only at the end of the period (this is trivially so for a generator with maximal period m), but for any initial part of the sequence. Many well-known statistical tests are used to check the quality of random number generators. The run test (the lengths of monotonically increasing and monotonically decreasing subsequences must occur with the right",algorithms and data structures.pdf "lengths of monotonically increasing and monotonically decreasing subsequences must occur with the right frequencies); the gap test (given a test interval called the ""gap"", how many consecutively generated numbers fall outside?); the permutation test (partition the sequence into subsequences of t elements; there are t! possible relative orderings of elements within a subsequence; each of these orderings should occur about equally often). Exercise: visualization of random numbers Write a program that lets its user enter t he constants a, c, m, and the seed r 0 for a linear congruential generator, then displays the numbers generated as dots on the screen: A pair of consecutive random numbers is interpreted as the (x, y)-coordinates of the dot. You will observe that most generators you enter have obvious flaws: our visual system is an excellent detector of regular patterns, and most regularities correspond to undesirable statistical properties.",algorithms and data structures.pdf "system is an excellent detector of regular patterns, and most regularities correspond to undesirable statistical properties. The point made above is substantiated in [PM 88]. The following simple random number generator and some of its properties are easily memorized: r0 = 1, ri+1 = 125 · ri mod 8192. 1. 8192 = 213, hence the remainder mod 8192 is represented by the 13 least significant bits. 2. 125 = 127 – 2 = (1111101) in binary representation. 3. Arithmetic can be done with 16-bit integers without overflow and without regard to the representation of negative numbers. Algorithms and Data Structures 108 A Global Text",algorithms and data structures.pdf "12. Integers 4. The numbers rk generated are exactly those in the range 0 ≤ r k < 8192 with rk mod 4 = 1 (i.e. the period has length 211 = 2048). 5. Its statistical properties are described in [Kru 69], [Knu 81] contains the most comprehensive treatment of the theory of random number generators. As a conclusion of this brief introduction, remember an important rule of thumb: Never choose a random number generator at random! Exercises 1. Work out the details of implem enting double-precision, variable-precision, and BCD integer arithmetic, and estimate the time required for each operation as compared to the time of the same operation in single precision. For variable precision and BCD, introduce the length L of the representation as a parameter. 2. The least common multiple (lcm) of two integers u and v is the smallest integer that is a multiple of u and v. Design an algorithm to compute lcm(u, v).",algorithms and data structures.pdf "Design an algorithm to compute lcm(u, v). 3. The prime decomposition of a natural number n > 0 is the (unique) multiset PD(n) = [p1, p2, … , pk] of primes pi whose product is n. A multiset differs from a set in that elements may occur repeatedly (e.g. PD(12) = [2, 2, 3]). Design an algorithm to compute PD(n) for a given n > 0. 4. Work out the details of modular arithmetic with moduli 9, 10, 11. 5. Among the 95 linear congruential random number generators given by the formula ri+1 = a · ri mod m, with prime modulus m = 97 and 1 < a < 97, find out how many get disqualified ""at first sight"" by a simple visual test. Consider that the period of these RNGs is at most 97. 109",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 13. Reals Learning objectives: • floating-point numbers and their properties • pitfalls of numeric computation • Horner's method • bisection • Newton's method Floating-point numbers Real numbers, those declared to be of type REAL in a programming language, are represented as floating-point numbers on most computers. A floating-point number z is represented by a (signed) mantissa m and a (signed) exponent e with respect to a base b: z=± m·b ±e (e.g. z=+0.11·2–1). This section presents a very brief introduction to floating-point arithmetic. We recommend [Gol91] as a comprehensive survey. Floating-point numbers can only approximate real numbers, and in important ways, they behave differently. The major difference is due to the fact that any floating-point number system is a finite number system , as the",algorithms and data structures.pdf "The major difference is due to the fact that any floating-point number system is a finite number system , as the mantissa m and the exponent e lie in a bounded range. Consider, as a simple example, the following number system: z = ±0.b1b2 · 2±e, where b1, b2, and e may take the values 0 and 1. The number representation is not unique : The same real number may have many different representations, arranged in the following table by numerical value (lines) and constant exponent (columns). 1.5 + 0.11 · 2+1 1.0 + 0.10 · 2+1 0.75 + 0.11 · 2±0 0.5 + 0.01 · 2+1 + 0.10 · 2±0 0.375 +0.11 · 2–1 0.25 + 0.01 · 2±0 +0.10 · 2–1 0.125 +0.01 · 2–1 0. +0.00 · 2+1 + 0.00 · 2±0 +0.00 · 2–1 The table is symmetric for negative numbers. Notice the cluster of representable numbers around zero. There",algorithms and data structures.pdf "The table is symmetric for negative numbers. Notice the cluster of representable numbers around zero. There are only 15 different numbers, but 25= 32 different representations. Exercise: a floating-point number system Consider floating-point numbers represented in a 6-bit ""word"" as follows: The four bits b b 2 b1 b0 represent a signed mantissa, the two bits e e 0 a signed exponent to the base 2. Every number has the form x=b b 2 b1 b0·2 ee0. Algorithms and Data Structures 110 A Global Text",algorithms and data structures.pdf "13. Reals Both the exponent and the mantissa are integers represented in 2's complement form. This means that the integer values –2..1 are assigned to the four different representations e e0 as shown: v e e0 0 0 0 1 0 1 –2 1 0 –1 1 1 1. Complete the following table of the values of the mantissa and their representation, and write down a formula to compute v from b b2 b1 b0. v b b2 b1 b0 0 0 0 0 0 1 0 0 0 1 … 7 0 1 1 1 –8 1 0 0 0 … –1 1 1 1 1 2. How many different number representations are there in this floating-point system? 3. How many different numbers are there in this system? Draw all of them on an axis, each number with all its representations. On a byte-oriented machine, floating-point numbers are often represented by 4 bytes =32 bits: 24 bits for the signed mantissa, 8 bits for the signed exponent. The mantissa m is often interpreted as a fraction 0 ≤ m < 1, whose",algorithms and data structures.pdf "signed mantissa, 8 bits for the signed exponent. The mantissa m is often interpreted as a fraction 0 ≤ m < 1, whose precision is bounded by 23 bits; the 8-bit exponent permits scaling within the range 2–128 ≤ 2 e ≤ 2 127. Because 32- and 64-bit floating-point number systems are so common, often coexisting on the same hardware, these number systems are often identified with ""single precision"" and ""double precision"", respectively. In recent years an IEEE standard format for-single precision floating-point numbers has emerged, along with standards for higher precisions: double, single extended, and double extended. 111",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The following example shows the representation of the number +1.011110 … 0 · 2–54 in the IEEE format: Some dangers Floating-point computation is fraught with problems that are hard to analyze and control. Unexpected results abound, as the following examples show. The first two use a binary floating-point number system with a signed 2- bit mantissa and a signed 1-bit exponent. Representable numbers lie in the range –0.11 · 2+1 ≤ z ≤ +0.11 · 2+1. Example: y + x = y and x ≠ 0 It suffices to choose |x| small as compared to |y|; for example, x = 0.01 · 2–1, y = 0.10 · 2+1. The addition forces the mantissa of x to be shifted to the right until the exponents are equal (i.e. x is represented as 0.0001·2+1). Even if the sum is computed correctly as 0.1001 ·2 +1 in an accumulator of double length, storing the result in memory will force rounding: x + y=0.10·2+1=y.",algorithms and data structures.pdf "result in memory will force rounding: x + y=0.10·2+1=y. Example: Addition is not associative: (x + y) + z ≠ x + (y + z) The following values for x, y, and z assign different values to the left and right sides. Left side: (0.10 · 2+1 + 0.10 · 2–1) + 0.10 · 2–1 = 0.10 · 2+1 Right side: 0.10 · 2+1 + (0.10 · 2–1 + 0.10 · 2–1) = 0.11 · 2+1 A useful rule of thumb helps prevent the loss of significant digits: Add the small numbers before adding the large ones. Example: ((x + y)2 – x2 – 2xy) / y2 = 1? Let's evaluate this expression for large |x| and small |y| in a floating-point number system with five decimal digits. x = 100.00, y = .01000 x + y = 100.01 (x + y)2 = 10002.0001, rounded to five digits yields 10002. x2 = 10000. (x + y)2 – x2 = 2.???? (four digits have been lost!) 2xy = 2.0000 (x + y)2 – x2 – 2xy = 2.???? – 2.0000 = 0.????? Now five digits have been lost, and the result is meaningless. Example: numerical instability",algorithms and data structures.pdf "(x + y)2 – x2 – 2xy = 2.???? – 2.0000 = 0.????? Now five digits have been lost, and the result is meaningless. Example: numerical instability Recurrence relations for sequences of numbers are prone to the phenomenon of numerical instability. Consider the sequence x0 = 1.0, x1 = 0.5, xn+1 = 2.5 · xn – xn–1. Algorithms and Data Structures 112 A Global Text",algorithms and data structures.pdf "13. Reals We first solve this linear recurrence relation in closed form by trying x i=ri for r≠0. This leads to r n+1 = 2.5 · r n– rn–1, and to the quadratic equation 0 = r2– 2.5 · r + 1, with the two solutions r = 2 and r = 0.5. The general solution of the recurrence relation is a linear combination: xi = a · 2i + b · 2–i. The starting values x0 = 1.0 and x 1 = 0.5 determine the coefficients a=0 and b=1, and thus the sequence is given exactly as xi = 2–i. If the sequence x i = 2–i is computed by the recurrence relation above in a floating-point number system with one decimal digit, the following may happen: x2 = 2.5 · 0.5 – 1 =0.2 (rounding the exact value 0.25), x3 = 2.5 · 0.2 – 0.5 =0 (represented exactly with one decimal digit), x4 = 2.5 · 0 – 0.2 =–0.2 (represented exactly with one decimal digit), x5 = 2.5 · (–0.2)–0 =–0.5 represented exactly with one decimal digit), x6 = 2.5 · (–0.5)–(–0.2) = –1.05 (exact) = –1.0 (rounded),",algorithms and data structures.pdf "x5 = 2.5 · (–0.2)–0 =–0.5 represented exactly with one decimal digit), x6 = 2.5 · (–0.5)–(–0.2) = –1.05 (exact) = –1.0 (rounded), x7 = 2.5 · (–1) – (–0.5) = –2.0 (represented exactly with one decimal digit), x8 = 2.5 · (–2)–(–1) = –4.0(represented exactly with one decimal digit). As soon as the first rounding error has occurred, the computed sequence changes to the alternative solution x i = a · 2i, as can be seen from the doubling of consecutive computed values. Exercise: floating-point number systems and calculations (a) Consider a floating-point number system with two ternary digits t 1, t2 in the mantissa, and a ternary digit e in the exponent to the base 3. Every number in this system has the form x = .t 1 t2 · 3e, where t 1, t2, and e assume a value chosen among{0,1,2}. Draw a diagram that shows all the different numbers in this system, and for each number, all of its representations. How many representations are there? How many different numbers?",algorithms and data structures.pdf "and for each number, all of its representations. How many representations are there? How many different numbers? (b) Recall the series which holds for |x| < 1, for example, Use this formula to express 1/0.7 as a series of powers. Horner's method A polynomial of n-th degree (e.g. n = 3) is usually represented in the form a3 · x3 + a2 · x2 + a1 · x + a0 but is better evaluated in nested form, ((a3 · x + a2) · x + a1) · x + a0. 113",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The first formula needs n multiplications of the form a i · xi and, in addition, n–1 multiplications to compute the powers of x. The second formula needs only n multiplications in total: The powers of x are obtained for free as a side effect of the coefficient multiplications. The following procedure assumes that the (n+1) coefficients a i are stored in a sufficiently large array a of type 'coeff': type coeff = array[0 .. m] of real; function horner(var a: coeff; n: integer; x: real): real; var i: integer; h: real; begin h := a[n]; for i := n – 1 downto 0 do h := h · x + a[i]; return(h) end; Bisection Bisection is an iterative method for solving equations of the form f(x) = 0. Assuming that the function f : R → R is continuous in the interval [a, b] and that f(a) · f(b) < 0, a root of the equation f(x) = 0 (a zero of f) must lie in the",algorithms and data structures.pdf "is continuous in the interval [a, b] and that f(a) · f(b) < 0, a root of the equation f(x) = 0 (a zero of f) must lie in the interval [a, b] (Exhibit 13.1). Let m be the midpoint of this interval. If f(m) = 0, m is a root. If f(m) · f(a) < 0, a root must be contained in [a, m], and we proceed with this subinterval; if f(m) · f(b) < 0, we proceed with [m, b]. Thus at each iteration the interval of uncertainty that must contain a root is half the size of the interval produced in the previous iteration. We iterate until the interval is smaller than the tolerance within which the root must be determined. Exhibit 13.1: As in binary search, bisection excludes half of the interval under consideration at every step. function bisect(function f: real; a, b: real): real; const epsilon = 10–6; var m: real; faneg: boolean; begin faneg := f(a) < 0.0; repeat m := (a + b) / 2.0; if (f(m) < 0.0) = faneg then a := m else b := m until |a – b| < epsilon; return(m)",algorithms and data structures.pdf "begin faneg := f(a) < 0.0; repeat m := (a + b) / 2.0; if (f(m) < 0.0) = faneg then a := m else b := m until |a – b| < epsilon; return(m) Algorithms and Data Structures 114 A Global Text",algorithms and data structures.pdf "13. Reals end; A sequence x1, x2, x3,… converging to x converges linearly if there exist a constant c and an index i 0 such that for all I > i 0: |x i+1 – x| ≤ c · |x i – x|. An algorithm is said to converge linearly if the sequence of approximations constructed by this algorithm converges linearly. In a linearly convergent algorithm each iteration adds a constant number of significant bits. For example, each iteration of bisection halves the interval of uncertainty in each iteration (i.e. adds one bit of precision to the result). Thus bisection converges linearly with c = 0.5. A sequence x 1, x2, x3,… converges quadratically if there exist a constant c and an index i 0 such that for all i > i 0: |xi+1 – x| ≤ c ·|xi – x|2. Newton's method for computing the square root Newton's method for solving equations of the form f(x) = 0 is an example of an algorithm with quadratic",algorithms and data structures.pdf "Newton's method for solving equations of the form f(x) = 0 is an example of an algorithm with quadratic convergence. Let f: R → R be a continuous and differentiable function. An approximation x i+1 is obtained from xi by approximating f(x) in the neighborhood of x i by its tangent at the point (x i, f(xi)), and computing the intersection of this tangent with the x-axis (Exhibit 13.2). Hence x ix i+1 f(x )i x Exhibit 13.2: Newton's iteration approximates a curve locally by a tangent. Newton's method is not guaranteed to converge (Exercise: construct counterexamples), but when it converges, it does so quadratically and therefore very fast, since each iteration doubles the number of significant bits. To compute the square root x = √a of a real number a > 0 we consider the function f(x) = x 2 – a and solve the equation x2– a = 0. With f'(x)= 2 · x we obtain the iteration formula:",algorithms and data structures.pdf "equation x2– a = 0. With f'(x)= 2 · x we obtain the iteration formula: The formula that relates xi and xi+1 can be transformed into an analogous formula that determines the propagation of the relative error: 115",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Since we obtain for the relative error: Using we get a recurrence relation for the relative error: If we start with x0 > 0, it follows that 1+R0 > 0. Hence we obtain R1 > R2 > R3 > … > 0. As soon as Ri becomes small (i.e. Ri « 1), we have 1 + Ri ≈ 1, and we obtain Ri+1 ≈ o.5 · Ri 2 Newton's method converges quadratically as soon as x i is close enough to the true solution. With a bad initial guess Ri » 1 we have, on the other hand, 1 + R i ≈ Ri, and we obtain R i+1 ≈ 0.5 · R i (i.e. the computation appears to converge linearly until Ri « 1 and proper quadratic convergence starts). Thus it is highly desirable to start with a good initial approximation x 0 and get quadratic convergence right from the beginning. We assume normalized binary floating-point numbers (i.e. a = m · 2 e with 0.5 ≤ m <1). A good approximation of is obtained by choosing any mantissa c with 0.5 ≤ c < 1 and halving the exponent:",algorithms and data structures.pdf "approximation of is obtained by choosing any mantissa c with 0.5 ≤ c < 1 and halving the exponent: In order to construct this initial approximation x 0, the programmer needs read and write access not only to a ""real number"" but also to its components, the mantissa and exponent, for example, by procedures such as procedure mantissa(z: real): integer; procedure exponent(z: real): integer; procedure buildreal(mant, exp: integer): real; Today's programming languages often lack such facilities, and the programmer is forced to use backdoor tricks to construct a good initial approximation. If x 0 can be constructed by halving the exponent, we obtain the following upper bounds for the relative error: R1 < 2–2, R2 < 2–5, R3 < 2–11, R4 < 2–23, R5 < 2–47,R6 < 2–95. Algorithms and Data Structures 116 A Global Text",algorithms and data structures.pdf "13. Reals It is remarkable that four iterations suffice to compute an exact square root for 32-bit floating-point numbers, where 23 bits are used for the mantissa, one bit for the sign and eight bits for the exponent, and that six iterations will do for a ""number cruncher"" with a word length of 64 bits. The starting value x 0 can be further optimized by choosing c carefully. It can be shown that the optimal value of c for computing the square root of a real number is c = 1/√2 ≈ 0.707. Exercise: square root Consider a floating-point number system with two decimal digits in the mantissa: Every number has the form x = ± .d1 d2 · 10±e. (a) How many different number representations are there in this system? (b) How many different numbers are there in this system? Show your reasoning. (c) Compute √50 · 102 in this number system using Newton's method with a starting value x 0 = 10. Show every step of the calculation. Round the result of any operation to two digits immediately.",algorithms and data structures.pdf "step of the calculation. Round the result of any operation to two digits immediately. Solution (a) A number representation contains two sign bits and three decimal digits, hence there are 22 · 103 = 4000 distinct number representations in this system. (b) There are three sources of redundancy: 1. Multiple representations of zero 2. Exponent +0 equals exponent –0 3. Shifted mantissa: ±.d0 · 10 ±e=±.0d · 10 ±e + 1 A detailed count reveals that there are 3439 different numbers. Zero has 2 2·10 = 40 representations, all of the form ±.00·10 ±e, with two sign bits and one decimal digit e to be freely chosen. Therefore, r1 = 39 must be subtracted from 4000. If e = 0, then ±.d 1d2 · 10+0=±.d1d2 · 10–0. We assume furthermore that d 1d2 ≠ 00. The case d 1d2 = 00 has been covered above. Then there are 2 · 99 such pairs. Therefore, r2= 198 must be subtracted from 4000. If d2 = 0, then ±.d10 · 10±e = ±.0d1 · 10±e+1. The case d1 = 0 has been treated above. Therefore, we assume that d1",algorithms and data structures.pdf "If d2 = 0, then ±.d10 · 10±e = ±.0d1 · 10±e+1. The case d1 = 0 has been treated above. Therefore, we assume that d1 ≠ 0. Since ±e can assume the 18 different values –9, –8, … , –1, +0, +1, … +8, there are 2 · 9 · 18 such pairs. Therefore, r3 = 324 must be subtracted from 4000. There are 4000 – r1– r2– r3 = 3439 different numbers in this system. (c) Computing Newton's square root algorithm: x0 = 10 x1 = .50 · (10 + 50/10) = .50 · (10 + 5) = .50 · 15 = 7.5 x2 = .50 · (7.5 + 50/7.5) = .50 · (7.5 + 6.6) = .50 · 14 = 7 x3 = .50 · = .50 · (7 + 50/7) = (7 + 7.1) = .50 · 14 = 7 117",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exercises 1. Write up all the distinct numbers in the floating-point system with number representations of the form z=0.b1b2 · 2 e1e2, where b1, b 2 and e 1, e 2 may take the values 0 and 1, and mantissa and exponent are represented in 2's complement notation. 2. Provide simple numerical examples to illustrate floating-point arithmetic violations of mathematical identities. Algorithms and Data Structures 118 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 14. Straight lines and circles Learning objectives: • intersection of two line segments • degenerate configurations • clipping • digitized lines and circles • Bresenham's algorithms • braiding straight lines Points are the simplest geometric objects; straight lines and line segments come next. Together, they make up the lion's share of all primitive objects used in two-dimensional geometric computation (e.g. in computer graphics). Using these two primitives only, we can approximate any curve and draw any picture that can be mapped onto a discrete raster. If we do so, most queries about complex figures get reduced to basic queries about points and line segments, such as: is a given point to the left, to the right, or on a given line? Do two given line segments intersect? As simple as these questions appear to be, they must be handled efficiently and carefully. Efficiently because these",algorithms and data structures.pdf "As simple as these questions appear to be, they must be handled efficiently and carefully. Efficiently because these basic primitives of geometric computations are likely to be executed millions of times in a single program run. Carefully because the ubiquitous phenomenon of degenerate configurations easily traps the unwary programmer into overflow or meaningless results. Intersection The problem of deciding whether two line segments intersect is unexpectedly tricky, as it requires a consideration of three distinct nondegenerate cases, as well as half a dozen degenerate ones. Starting with degenerate objects, we have cases where one or both of the line segments degenerate into points. The code below assumes that line segments of length zero have been eliminated. We must also consider nondegenerate objects in degenerate configurations, as illustrated in Exhibit 14.1. Line segments A and B intersect (strictly). C and D, and E",algorithms and data structures.pdf "degenerate configurations, as illustrated in Exhibit 14.1. Line segments A and B intersect (strictly). C and D, and E and F, do not intersect; the intersection point of the infinitely extended lines lies on C in the first case, but lies neither on E nor on F in the second case. The next three cases are degenerate: G and H intersect barely (i.e. in an endpoint); I and J overlap (i.e. they intersect in infinitely many points); K and L do not intersect. Careless evaluation of these last two cases is likely to generate overflow. Exhibit 14.1: Cases to be distinguished for the segment intersection problem. Computing the intersection point of the infinitely extended lines is a naive approach to this decision problem that leads to a three-step process: Algorithms and Data Structures 119 A Global Text",algorithms and data structures.pdf "14. Straight lines and circles 1. Check whether the two line segments are parallel (a necessary precaution before attempting to compute the intersection point). If so, we have a degenerate configuration that leads to one of three special cases: not collinear, collinear nonoverlapping, collinear overlapping 2. Compute the intersection point of the extended lines (this step is still subject to numerical problems for lines that are almost parallel). 3. Check whether this intersection point lies on both line segments. If all we want is a yes/no answer to the intersection question, we can save the effort of computing the intersection point and obtain a simpler and more robust procedure based on the following idea: two line segments intersect strictly iff the two endpoints of each line segment lie on opposite sides of the infinitely extended line of the other segment.",algorithms and data structures.pdf "intersect strictly iff the two endpoints of each line segment lie on opposite sides of the infinitely extended line of the other segment. Let L be a line given by the equation h(x, y) = a · x + b · y + c = 0, where the coefficients have been normalized such that a 2 + b 2 = 1. For a line L given in this Hessean normal form, and for any point p = (x, y), the function h evaluated at p yields the signed distance between p and L: h(p) > 0 if p lies on one side of L, h(p) < 0 if p lies on the other side, and h(p) = 0 if p lies on L. A line segment is usually given by its endpoints (x 1, y1) and (x 2, y2), and the Hessean normal form of the infinitely extended line L that passes through (x1, y1) and (x2, y2) is where is the length of the line segment, and h(x, y) is the distance of p = (x, y) from L. Two points p and q lie on opposite sides of L iff h(p) · h(q) < 0 ( Exhibit 14.2). h(p) = 0 or h(q) = 0 signals a degenerate configuration. Among these,",algorithms and data structures.pdf "sides of L iff h(p) · h(q) < 0 ( Exhibit 14.2). h(p) = 0 or h(q) = 0 signals a degenerate configuration. Among these, h(p) = 0 and h(q) = 0 iff the segment (p, q) is collinear with L. Exhibit 14.2: Segment s, its extended line L, and distance to points p, q as computed by function h. type point = record x, y: real end; segment = record p1, p2: point end; function d(s: segment; p: point): real; { computes h(p) for the line L determined by s } var dx, dy, L12: real; 120",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License begin dx := s.p2.x – s.p1.x; dy := s.p2.y – s.p1.y; L12 := sqrt(dx · dx + dy · dy); return((dy · (p.x – s.p1.x) – dx · (p.y – s.p1.y)) / L12) end; To optimize the intersection function, we recall the assumption L 12 > 0 and notice that we do not need the actual distance, only its sig n. Thus the function d used below avoids computing L 12. The function 'intersect' begins by checking whether the two line segments are collinear, and if so, tests them for overlap by intersecting the intervals obtained by projecting the line segments onto the x-axis (or onto the y-axis, if the segments are vertical). Two intervals [a, b] and [c, d] intersect if f min(a, b) ≤ max(c, d) and min(c, d) ≤ max(a, b). This condition could be simplified under the assumption that the representation of segments and intervals is ordered ""from left to right""",algorithms and data structures.pdf "simplified under the assumption that the representation of segments and intervals is ordered ""from left to right"" (i.e. for interval [a, b] we have a ≤ b). We do not assume this, as line segments often have a natural direction and cannot be ""turned around"". function d(s: segment; p: point): real; begin return((s.p2.y – s.p1.y) · (p.x – s.p1.x) – (s.p2.x – s.p1.x) · (p.y – s.p1.y)) end; function overlap(a, b, c, d: real): boolean; begin return((min(a, b) ≤ max(c, d)) and (min(c, d) ≤ max(a, b))) end; function intersect(s1, s2: segment): boolean; var d11, d12, d21, d22: real; begin d11 := d(s1, s2.p1); d12 := d(s1, s2.p2); if (d11 = 0) and (d12 = 0) then { s1 and s2 are collinear } if s1.p1.x = s1.p2.x then { vertical } return(overlap(s1.p1.y, s1.p2.y, s2.p1.y, s2.p2.y)) else { not vertical } return(overlap(s1.p1.x, s1.p2.x, s2.p1.x, s2.p2.x)) else begin { s1 and s2 are not collinear } d21 := d(s2, s1.p1); d22 := d(s2, s1.p2);",algorithms and data structures.pdf "return(overlap(s1.p1.x, s1.p2.x, s2.p1.x, s2.p2.x)) else begin { s1 and s2 are not collinear } d21 := d(s2, s1.p1); d22 := d(s2, s1.p2); return((d11 · d12 ≤ 0) and (d21 · d22 ≤ 0)) end end; In addition to the degeneracy issues we have addressed, there are numerical issues of near-degeneracy that we only mention. The length L12 is a condition number (i.e. an indicator of the computation's accuracy). As Exhibit 14.3 suggests, it may be numerically impossible to tell on which side of a short line segment L a distant point p lies. Algorithms and Data Structures 121 A Global Text",algorithms and data structures.pdf "14. Straight lines and circles Exhibit 14.3: A point's distance from a segment amplifies the error of the ""which side"" computation. Conclusion: A geometric algorithm must check for degenerate configurations explicitly—the code that handles configurations ""in general position"" will not handle degeneracies. Clipping The widespread use of windows on graphic screens makes clipping one of the most frequently executed operations: Given a rectangular window and a configuration in the plane, draw that part of the configuration which lies within the window. Most configurations consist of line segments, so we show how to clip a line segment given by its endpoints (x 1, y1) and (x 2, y2) into a window given by its four corners with coordinates {left, right} × {top, bottom}. The position of a point in relation to the window is described by four boolean variables: ll (to the left of the left",algorithms and data structures.pdf "bottom}. The position of a point in relation to the window is described by four boolean variables: ll (to the left of the left border), rr (to the right of the right border), bb (below the lower border), tt (above the upper border): type wcode = set of (ll, rr, bb, tt); A point inside the window has the code ll = rr = bb = tt = false, abbreviated 0000 (Exhibit 14.4). Exhibit 14.4: The clipping window partitions the plane into nine regions. The procedure 'classify' determines the position of a point in relation to the window: procedure classify(x, y: real; var c: wcode); begin c := Ø; { empty set } if x < left then c := {ll} elsif x > right then c := {rr}; if y < bottom then c := c ∪ {bb} elsif y > top then c := c ∪ {tt} end; The procedure 'clip' computes the endpoints of the clipped line segment and calls the procedure 'showline' to draw it: procedure clip(x1, y1, x2, y2: real); 122 p L",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License var c, c1, c2: wcode; x, y: real; outside: boolean; begin { clip } classify(x1, y1, c1); classify(x2, y2, c2); outside := false; while (c1 ≠ Ø) or (c2 ≠ Ø) do if c1 ∩ c2 ≠ Ø then { line segment lies completely outside the window } { c1 := Ø; c2 := Ø; outside := true } else begin c := c1; if c = Ø then c := c2; if ll ∈ c then { segment intersects left } { y := y1 + (y2 – y1) · (left – x1) / (x2 – x1); x := left } elsif rr ∈ c then { segment intersects right } { y := y1 + (y2 – y1) · (right – x1) / (x2 – x1); x := right } elsif bb ∈ c then { segment intersects bottom } { x := x1 + (x2 – x1) · (bottom – y1) / (y2 – y1); y := bottom } elsif tt ∈ c then { segment intersects top } { x := x1 + (x2 – x1) · (top – y1) / (y2 – y1); y := top }; if c = c1then { x1 := x; y1 := y; classify(x, y, c1) } else { x2 := x; y2 := y; classify(x, y, c2) } end;",algorithms and data structures.pdf "if c = c1then { x1 := x; y1 := y; classify(x, y, c1) } else { x2 := x; y2 := y; classify(x, y, c2) } end; if not outside then showline(x1, y1, x2, y2) end; { clip } Drawing digitized lines A raster graphics screen is an integer grid of pixels, each of which can be turned on or off. Euclidean geometry does not apply directly to such a discretized plane. Any designer using a CAD system will prefer Euclidean geometry to a discrete geometry as a model of the world. The problem of how to approximate the Euclidean plane by an integer grid turns out to be a hard question: How do we map Euclidean geometry onto a digitized space in such a way as to preserve the rich structure of geometry as much as possible? Let's begin with simple instances: How do you map a straight line onto an integer grid, and how do you draw it efficiently? Exhibit 14.5 shows reasonable examples. Exhibit 14.5: Digitized lines look like staircases.",algorithms and data structures.pdf "examples. Exhibit 14.5: Digitized lines look like staircases. Consider the slope m = (y2 – y1) / (x2 – x1) of a segment with endpoints p 1 = (x1, y1) and p2 = (x2, y2). If |m| ≤ 1 we want one pixel blackened on each x coordinate; if |m| ≥ 1, one pixel on each y coordinate; these two requirements are consistent for diagonals with |m| = 1. Consider the case |m| ≤ 1. A unit step in x takes us from point (x, y) on the line to (x + 1, y + m). So for each x between x 1 and x 2 we paint the pixel (x, y) closest to the mathematical line according to the formula y = round(y 1 + m · (x – x 1)). For the case |m| > 1, we reverse the roles of x and y, taking a unit step in y and incrementing x by 1/m. The following procedure draws line segments with |m| ≤ 1 using unit steps in x. procedure line(x1, y1, x2, y2: integer); var x, sx: integer; m: real; Algorithms and Data Structures 123 A Global Text",algorithms and data structures.pdf "14. Straight lines and circles begin PaintPixel(x1, y1); if x1 ≠ x2 then begin x := x1; sx := sgn(x2 – x1); m := (y2 – y1) / (x2 – x1); while x ≠ x2 do { x := x + sx; PaintPixel(x, round(y1 + m · (x – x1))) } end end; This straightforward implementation has a number of disadvantages. First, it uses floating-point arithmetic to compute integer coordinates of pixels, a costly process. In addition, rounding errors may prevent the line from being reversible: reversibility means that we paint the same pixels, in reverse order, if we call the procedure with the two endpoints interchanged. Reversibility is desirable to avoid the following blemishes: that a line painted twice, from both ends, looks thicker than other lines; worse yet, that painting a line from one end and erasing it from the other leaves spots on the screen. A weaker constraint, which is only concerned with the result and not the process of painting, is easy to achieve but is less useful.",algorithms and data structures.pdf "process of painting, is easy to achieve but is less useful. Weak reversibility is most easily achieved by ordering the points p1 and p2 lexicographically by x and y coordinates, drawing every line from left to right, and vertical lines from bottom to top. This solution is inadequate for animation, where the direction of drawing is important, and the sequence in which the pixels are painted is determined by the application —drawing the trajectory of a falling apple from the bottom up will not do. Thus interactive graphics needs the stronger constraint. Efficient algorithms, such as Bresenham's [Bre 65], avoid floating-point arithmetic and expensive multiplications through incremental computation: Starting with the current point p 1, a next point is computed as a function of the current point and of the line segment parameters. It turns out that only a few additions, shifts, and",algorithms and data structures.pdf "function of the current point and of the line segment parameters. It turns out that only a few additions, shifts, and comparisons are required. In the following we assume that the slope m of the line satisfies |m| ≤ 1. Let Δx = x2 – x1, sx = sign(Δx), Δy = y2 – y1, sy = sign(Δy). Assume that the pixel (x, y) is the last that has been determined to be the closest to the actual line, and we now want to decide whether the next pixel to be set is (x + sx, y) or (x + sx, y + sy). Exhibit 14.6 depicts the case sx = 1 and sy = 1. Exhibit 14.6: At the next coordinate x + sx, we identify and paint the pixel closest to the line. Let t denote the absolute value of the difference between y and the point with abscissa x + sx on the actual line. Then t is given by 124",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The value of t determines the pixel to be drawn: As the following example shows, reversibility is not an automatic consequence of the geometric fact that two points determine a unique line, regardless of correct rounding or the order in which the two endpoints are presented. A problem arises when two grid points are equally close to the straight line (Exhibit 14.7). Exhibit 14.7: Breaking the tie among equidistant grid points. If the tie is not broken in a consistent manner (e.g. by always taking the upper grid point), the resulting algorithm fails to be reversible: All the variables introduced in this problem range over the integers, but the ratio (Δy) (Δx) appears to introduce rational expressions. This is easily remedied by multiplying everything with Δx. We define the decision variable d as d = |Δx| · (2 · t – 1) = sx · Δx · (2 · t – 1). (∗∗)",algorithms and data structures.pdf "d = |Δx| · (2 · t – 1) = sx · Δx · (2 · t – 1). (∗∗) Let di denote the decision variable which determines the pixel (x(i), y(i)) to be drawn in the i-th step. Substituting t and inserting x = x(i–1) and y = y(i–1) in (∗∗) we obtain di = sx · sy · (2·Δx · y1 + 2 · (x(i–1) + sx – x1) · Δy – 2·Δx · y(i–1) – Δx · sy) and di+1 = sx · sy · (2·Δx · y1 + 2 · (x(i) + sx – x1) · Δy – 2·Δx · y(i) – Δx · sy). Subtracting di from di+1, we get di+1 – di = sx · sy · (2 · (x(i) – x(i–1)) · Δy – 2 · Δx · (y(i) – y(i–1))). Since x(i) – x(i–1) = sx, we obtain di+1 = di + 2 · sy · Δy – 2 · sx · Δx · sy · (y(i) – y(i–1)). Algorithms and Data Structures 125 A Global Text",algorithms and data structures.pdf "14. Straight lines and circles If di < 0, or di = 0 and sy = –1, then y(i) = y(i–1), and therefore di+1 = di + 2 · |Δy|. If di > 0, or di = 0 and sy = 1, then y(i) = y(i–1) + sy, and therefore di+1 = di + 2 · |Δy| – 2 · |Δx|. This iterative computation of d i+1 from the previous d i lets us select the pixel to be drawn. The initial starting value for d1 is found by evaluating the formula for di, knowing that (x(0), y(0)) = (x1, y1). Then we obtain d1 = 2 · |Δy| – |Δx|. The arithmetic needed to evaluate these formulas is minimal: addition, subtraction and left shift (multiplication by 2). The following procedure implements this algorithm; it assumes that the slope of the line is between –1 and 1. procedure BresenhamLine(x1, y1, x2, y2: integer); var dx, dy, sx, sy, d, x, y: integer; begin dx := |x2 – x1|; sx := sgn(x2 – x1); dy := |y2 – y1|; sy := sgn(y2 – y1); d := 2 · dy – dx; x := x1; y := y1; PaintPixel(x, y); while x ≠ x2 do begin",algorithms and data structures.pdf "dy := |y2 – y1|; sy := sgn(y2 – y1); d := 2 · dy – dx; x := x1; y := y1; PaintPixel(x, y); while x ≠ x2 do begin if (d > 0) or ((d = 0) and (sy = 1)) then { y := y + sy;– 2·dx}; x := x + sx; d := d + 2 · dy; PaintPixel(x, y) end end; The riddle of the braiding straight lines Two straight lines in a plane intersect in at most one point, right? Important geometric algorithms rest on this well-known theorem of Euclidean geometry and would have to be reexamined if it were untrue. Is this theorem true for computer lines , that is, for data objects that represent and approximate straight lines to be processed by a program? Perhaps yes, but mostly no. Yes. It is possible, of course, to program geometric problems in such a way that every pair of straight lines has at most, or exactly, one intersection point. This is most readily achieved through symbolic computation. For example,",algorithms and data structures.pdf "most, or exactly, one intersection point. This is most readily achieved through symbolic computation. For example, if the intersection of L 1 and L 2 is denoted by an expression 'Intersect(L 1, L 2)' that is ne ver evaluated but simply combined with other expres sions to represent a geometric construction, we are free to postulate that 'Intersect(L 1, L2)' is a point. No. For reasons of efficiency, most computer applications of geometry require the immediate numerical evaluation of every geometric operation. This calculation is done in a discrete, finite number system in which case the theorem need not be true. This fact is most easily seen if we work with a discrete plane of pixels, and we represent a straight line by the set of all pixels to uched by an ideal mathematical line. Exhibit 14.8 shows three digitized straight lines in such a square grid model of plane geometry. Two of the lines intersect in a common",algorithms and data structures.pdf "digitized straight lines in such a square grid model of plane geometry. Two of the lines intersect in a common interval of three pixels, whereas two others have no pixel in common, even though they obviously intersect. 126",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 14.8: Two intersecting lines may share none, one, or more pixels. With floating-point arithmetic the situation is more complicated; but the fact remains that the Euclidean plane is replaced by a discrete set of points embedded in the plane—all those points whose coordinates are representable in the particular number system being used. Experience with numerical computation, and the hazards of rounding errors, suggests that the question ""In how many points can two straight lines intersect?"" admits the following answers: • There is no intersection—the mathematically correct intersection cannot be represented in the number system. • A set of points that lie close to each other: for example, an interval. • Overflow aborts the calculation before a result is computed, even if the correct result is representable in the number system being used. Exercise: two lines intersect in how many points?",algorithms and data structures.pdf "number system being used. Exercise: two lines intersect in how many points? Construct examples to illustrate these phenomena when using floating-point arithmetic. Choose a suitable system G of floating-point numbers and two distinct straight lines ai · x + bi · y + ci = 0 with ai, bi, ci ∈ G, i=1, 2, such that, when all operations are performed in G: (a) There is no point whose coordinates x, y ∈ G satisfy both linear equations. (b) There are many points whose coordinates x, y ∈ G satisfy both linear equations. (c) There is exactly one point whose coordinates x, y ∈ G satisfy both linear equations, but the straightforward computation of x and y leads to overflow. (d) As a consequence of (a) it follows that the definition ""two lines intersect they share a common point"" is inappropriate for numerical computation. Formulate a numerically meaningful definition of the statement ""two line segments intersect"".",algorithms and data structures.pdf "inappropriate for numerical computation. Formulate a numerically meaningful definition of the statement ""two line segments intersect"". Exercise (b) may suggest that the points shared by two lines are neighbors. Pictorially, if the slopes of the two lines are almost identical, we expect to see a blurred, elongated intersection. We will show that worse things may happen: two straight lines may intersect in arbitrarily many points, and these points are separated by intervals in which the two lines alternate in lying on top of each other. Computer lines may be braided! To understand this Algorithms and Data Structures 127 A Global Text",algorithms and data structures.pdf "14. Straight lines and circles phenomenon, we need to clarify some concepts: What exactly is a straight line represented on a computer? What is an intersection? There is no one answer, there are many! Consider the analogy of the mathematical concept of real numbers, defined by axioms. When we approximate real numbers on a computer, we have a choice of many different number systems (e.g. various floating-point number systems, rational arithmetic with variable precision, interval arithmetic). These systems are typically not defined by means of axioms, but rather in terms of concrete representations of the numbers and algorithms for executing the operations on these numbers. Similarly, a computer line will be defined in terms of a concrete representation (e.g. two points, a point and a slope, or a linear expression). All we obtain depends on the formulas we use and on the basic arithmetic to operate on these",algorithms and data structures.pdf "expression). All we obtain depends on the formulas we use and on the basic arithmetic to operate on these representations. The notion of a straight line can be formalized in many different ways, and although these are likely to be mathematically equivalent, they will lead to data objects with different behavior when evaluated numerically. Performing an operation consists of evaluating a formula. Substituting a formula by a mathematically equivalent one may lead to results that are topologically different, because equivalent formulas may exhibit different sensitivities toward rounding errors. Consider a computer that has only integer arithmetic, i.e. we use only the operations +, –, ·, div. Let Z be the set of integers. Two straight lines gi (i = 1, 2) are given by the following equations: ai · x + bi · y + ci = 0 with ai, bi, ci ∈ Z; bi ≠ 0.",algorithms and data structures.pdf "of integers. Two straight lines gi (i = 1, 2) are given by the following equations: ai · x + bi · y + ci = 0 with ai, bi, ci ∈ Z; bi ≠ 0. We consider the problem of whether two given straight lines intersect in a given point x 0. We use the following method: Solve the equations for y [i. e. y = E1(x) and y = E2(x)] and test whether E1(x0) is equal to E2(x0). Is this method suitable? First, we need the following definitions: x ∈ Z is a turn for the pair (E1, E2) iff sign(E1(x) – E2(x)) ≠ sign(E1(x + 1) – E2(x + 1)). An algorithm for the intersection problem is correct iff there are at most two turns. The intuitive idea behind this definition is the recognition that rounding errors may force us to deal with an intersection interval rather than a single intersection point; but we wish to avoid separate intervals. The definition above partitions the x-axis into at most three disjoint intervals such that in the left interval the first line lies above",algorithms and data structures.pdf "above partitions the x-axis into at most three disjoint intervals such that in the left interval the first line lies above or below the second line, in the middle interval the lines ""intersect"", and in the right interval we have the complementary relation of the left one (Exhibit 14.9). 128",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 14.9: Desirable consistency condition for intersection of nearly parallel lines. Consider the straight lines: 3 · x – 5 · y + 40 = 0 and 2 · x – 3 · y + 20 = 0 which lead to the evaluation formulas Our naive approach compares the expressions (3 · x + 40) div 5 and (2 · x + 20) div 3. Using the definitions it is easy to calculate that the turns are 7, 8, 10, 11, 12, 14, 15, 22, 23, 25, 26, 27, 29, 30. The straight lines have become step functions that intersect many times. They are braided (Exhibit 14.10). Exhibit 14.10: Braiding straight lines violate the consistency condition of Exhibit 14.9. Exercise: show that the straight lines x – 2 · y = 0 k · x – (2 · k + 1) · y = 0 for any integer k > 0 Algorithms and Data Structures 129 A Global Text g1 >g1 g2 =g1 g2 |d""|, then p2 is closer. We define the decision variable d as d = d' + d"". (∗∗) We will show that the rule If d ≤ 0 then select p1 else select p2. Algorithms and Data Structures 131 A Global Text",algorithms and data structures.pdf "14. Straight lines and circles correctly selects the pixel that is closest to the actual circle. Exhibit 14.13 shows a small part of the pixel grid and illustrates the various possible ways [(1) to (5)] how the actual circle may intersect the vertical line at x + 1 in relation to the pixels p1 and p2. Exhibit 14.13: For a given octant of the circle, if pixel p is lit, only two other pixels p1 and p2 need be examined. In cases (1) and (2) p2 lies inside, p1 inside or on the circle, and we therefore obtain d' ≤ 0 and d"" < 0. Now d < 0, and applying the rule above will lead to the selection of p 1. Since |d'| ≤ |d""| this selection is correct. In case (3) p 1 lies outside and p 2 inside the circle and we therefore obtain d' > 0 and d"" < 0. Applying the rule above will lead to the selection of p1 if d ≤ 0, and p2 if d > 0. This selection is correct since in this case d ≤ 0 is equivalent to |d'| ≤ |d""|.",algorithms and data structures.pdf "the selection of p1 if d ≤ 0, and p2 if d > 0. This selection is correct since in this case d ≤ 0 is equivalent to |d'| ≤ |d""|. In cases (4) and (5) p 1 lies outside, p2 outside or on the circle and we therefore obtain d' > 0 and d"" ≥ 0. Now d > 0, and applying the rule above will lead to the selection of p2. Since |d'| > |d""| this selection is correct. Let di denote the decision variable that determines the pixel (x (i), y(i)) to be drawn in the i-th step. Starting with (x(0), y(0)) = (0, r) we obtain d1 = 3 – 2 · r. If di ≤ 0, then (x(i), y(i)) = (x(i) + 1, y(i–1)), and therefore di+1 = di + 4 · xi–1 + 6. If di > 0, then (x(i), y(i)) = (x(i) + 1, y(i–1) – 1), and therefore di+1 = di + 4 · (xi–1 – yi–1) + 10. This iterative computation of d i+1 from the previous d i lets us select the correct pixel to be drawn in the ( i + 1)-th step. The arithmetic needed to evaluate these formulas is minimal: addition, subtraction, and left shift",algorithms and data structures.pdf "step. The arithmetic needed to evaluate these formulas is minimal: addition, subtraction, and left shift (multiplication by 4). The following procedure 'BresenhamCircle' which implements this algorithm draws a circle with center (x c, y c) and radius r. It uses the procedure 'CirclePoints' to display points on the entire circle. In the cases x = y or r = 1 'CirclePoints' draws each of four pixels twice. This causes no problem on a raster display. procedure BresenhamCircle(xc, yc, r: integer); procedure CirclePoints(x, y: integer); begin PaintPixel(xc + x, yc + y); PaintPixel(xc – x, yc + y); PaintPixel(xc + x, yc – y); PaintPixel(xc – x, yc – y); PaintPixel(xc + y, yc + x); PaintPixel(xc – y, yc + x); PaintPixel(xc + y, yc – x); PaintPixel(xc – y, yc – x) end; 132",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License var x, y, d: integer; begin x := 0; y := r; d := 3 – 2 · r; while x < y do begin CirclePoints(x, y); if d < 0then d := d + 4 · x + 6 else { d := d + 4 · (x – y) + 10; y := y – 1 }; x := x + 1 end; if x = y then CirclePoints(x, y) end; .i).Bresenham's algorithm:circle; Exercises and programming projects 1. Design and implement an efficient geometric primitive which determines whether two aligned rectangles (i.e. rectangles with sides parallel to the coordinate axes) intersect. 2. Design and implement a geometric primitive function inTriangle(t: triangle; p: point): …; which takes a triangle t given by its three vertices and a point p and returns a ternary value: p is inside t, p is on the boundary of t, p is outside t. 3. Use the functions 'intersect' of in ""Intersection"" and 'inTriangle' above to program a function SegmentIntersectsTriangle(s: segment; t: triangle): …;",algorithms and data structures.pdf "function SegmentIntersectsTriangle(s: segment; t: triangle): …; to check whether segment s and triangle t share common points. 'SegmentIntersectsTriangle' returns a ternary value: yes, degenerate, no. List all distinct cases of degeneracy that may occur, and show how your code handles them. 4. Implement Bresenham's incremental algorithms for drawing digitized straight lines and circles. 5. Two circles (x', y', r') and (x'', y'', r'') are given by the coordinates of their center and their radius. Find effective formulas for deciding the three-way question whether (a) the circles intersect as lines , (b) the circles intersect as disks, or (c) neither. Avoid the square-root operation whenever possible. Algorithms and Data Structures 133 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Part IV: Complexity of problems and algorithms Fundamental issues of computation A successful search for better and better algorithms naturally leads to the question ""Is there a best algorithm?"", whereas an unsuccessful search leads one to ask apprehensively: ""Is there any algorithm (of a certain type) to solve this problem?"" These questions turned out to be difficult and fertile. Historically, the question about the existence of an algorithm came first, and led to the concepts of computability and decidability in the 1930s. The question about a ""best"" algorithm led to the development of complexity theory in the 1960s. The study of these fundamental issues of computation requires a mathematical arsenal that includes mathematical logic, discrete mathematics, probability theory, and certain parts of analysis, in particular",algorithms and data structures.pdf "mathematical logic, discrete mathematics, probability theory, and certain parts of analysis, in particular asymptotics. We introduce a few of these topics, mostly by example, and illustrate the use of mathematical techniques of algorithm analysis on the important problem of sorting. Algorithms and Data Structures 134 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 15. Computability and complexity Learning objectives: • algorithm • computability • RISC: Reduced Instruction Set Computer • Almost nothing is computable. • The halting problem is undecidable. • complexity of algorithms and problems • Strassen's matrix multiplication Models of computation: the ultimate RISC Algorithm and computability are originally intuitive concepts. They can remain intuitive as long as we only want to show that some specific result can be computed by following a specific algorithm. Almost always an informal explanation suffices to convince someone with the requisite background that a given algorithm computes a specified result. We have illustrated this informal approach throughout Part III. Everything changes if we wish to show that a desired result is not computable. The question arises immediately: ""What tools are we allowed to use?""",algorithms and data structures.pdf "show that a desired result is not computable. The question arises immediately: ""What tools are we allowed to use?"" Everything is computable with the help of an oracle that knows the answers to all questions. The attempt to prove negative results about the nonexistence of certain algorithms forces us to agree on a rigorous definition of algorithm. The question ""What can be computed by an algorithm, and what cannot?"" was studied intensively during the 1930s by Emil Post (1897–1954), Alan Turing (1912–1954), Alonzo Church (1903), and other logicians. They defined various formal models of computation, such as production systems, Turing machines, and recursive functions, to capture the intuitive concept of ""computation by the application of precise rules"". All these different formal models of computation turned out to be equivalent. This fact greatly strengthens Church's thesis that the",algorithms and data structures.pdf "formal models of computation turned out to be equivalent. This fact greatly strengthens Church's thesis that the intuitive concept of algorithm is formalized correctly by any one of these mathematical systems. We will not define any of these standard models of computation. They all share the trait that they were designed to be conceptually simple: their primitive operations are chosen to be as weak as possible, as long as they retain their property of being universal computing systems in the sense that they can simulate any computation performed on any other machine. It usually comes as a surprise to novices that the set of primitives of a universal computing machine can be so simple as long as these machines possess two essential ingredients: unbounded memory and unbounded time. Most simulations of a powerful computer on a simple one share three characteristics: it is straightforward in",algorithms and data structures.pdf "memory and unbounded time. Most simulations of a powerful computer on a simple one share three characteristics: it is straightforward in principle, it involves laborious coding in practice, and it explodes the space and time requirements of a Algorithms and Data Structures 135 A Global Text",algorithms and data structures.pdf "15. Computability and complexity computation. The weakness of the primitives, desirable from a theoretical point of view, has the consequence that as simple an operation as integer addition becomes an exercise in programming. The model of computation used most often in algorithm analysis is significantly more powerful than a Turing machine in two respects: (1) its memory is not a tape, but an array, and (2) in one primitive operation it can deal with numbers of arbitrary size. This model of computation is called random access machine, abbreviated as RAM. A RAM is essentially a random access memory , also abbreviated as RAM, of unbounded capacity, as suggested in Exhibit 15.1. The memory consists of an infinite array of memory cells, addressed 0, 1, 2, … . Each cell can hold a number, say an integer, of arbitrary size, as the arrow pointing to the right suggests. Exhibit 15.1: RAM - unbounded address space, unbounded cell size.",algorithms and data structures.pdf "Exhibit 15.1: RAM - unbounded address space, unbounded cell size. A RAM has an arithmetic unit and is driven by a program. The meaning of the word random is that any memory cell can be accessed in unit time (as opposed to a tape memory, say, where access time depends on distance). A further crucial assumption in the RAM model is that an arithmetic operation (+, –, ·, /) also takes unit time, regardless of the size of the numbers involved. This assumption is unrealistic in a computation where numbers may grow very large, but often is a useful assumption. As is the case with all models, the responsibility for using them properly lies with the user. To give the reader the flavor of a model of computation, we define a RAM whose architecture is rather similar to real computers, but is unrealistically simple. The ultimate RISC RISC stands for Reduced Instruction Set Computer , a machine that has only a few types of instructions built",algorithms and data structures.pdf "The ultimate RISC RISC stands for Reduced Instruction Set Computer , a machine that has only a few types of instructions built into the hardware. What is the minimum number of instructions a computer needs to be universal? In theory, one. Consider a stored-program computer of the ""von Neumann type"" where data and program are stored in the same memory (John von Neumann, 1903–1957). Let the random access memory (RAM) be ""doubly infinite"": There is a countable infinity of memory cells addressed 0, 1, … , each of which can hold an integer of arbitrary size, or an instruction. We assume that the constant 1 is hardwired into memory cell 1; from 1 any other integer can be constructed. There is a single type of ""three-address instruction"" which we call ""subtract, test and jump"", abbreviated as STJ x, y, z where x, y, and z are addresses. Its semantics is equivalent to STJ x, y, z ⇔ x := x – y; if x ≤ 0 then goto z;",algorithms and data structures.pdf "abbreviated as STJ x, y, z where x, y, and z are addresses. Its semantics is equivalent to STJ x, y, z ⇔ x := x – y; if x ≤ 0 then goto z; x, y, and z refer to cells Cx, Cy, and Cz. The contents of Cx and Cy are treated as data (an integer); the contents of Cz, as an instruction (Exhibit 15.2). 136",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 15.2: Stored program computer: data and instructions share the memory. Since this RISC has just one type of instruction, we waste no space on an op-code field. An instruction contains three addresses, each of which is an unbounded integer. In theory, fortunately, three unbounded integers can be packed into the same space required for a single unbounded integer. In the following exercise, this simple idea leads to a well-known technique introduced into mathematical logic by Kurt Gödel (1906 – 1978). Exercise: Gödel numbering (a) Motel Infinity has a countable infinity of rooms numbered 0, 1, 2, … . Every room is occupied, so the sign claims ""No Vacancy"". Convince the manager that there is room for one more person. (b) Assume that a memory cell in our RISC stores an integer as a sign bit followed by a sequence d 0, d1, d2, … of",algorithms and data structures.pdf "(b) Assume that a memory cell in our RISC stores an integer as a sign bit followed by a sequence d 0, d1, d2, … of decimal digits, least significant first. Devise a scheme for storing three addresses in one cell. (c) Show how a sequence of positive integers i 1, i2, … , in of arbitrary length n can be encoded in a single natural number j: Given j, the sequence can be uniquely reconstructed. Gödel's solution: Basic program fragments This computer is best understood by considering program fragments for simple tasks. These fragments implement simple operations, such as setting a variable to a given constant, or the assignment operator, that are given as primitives in most programming languages. Programming these fragments naturally leads us to introduce basic concepts of assembly language, in particular symbolic and relative addressing. Set the content of cell 0 to 0: STJ 0, 0, .+1",algorithms and data structures.pdf "basic concepts of assembly language, in particular symbolic and relative addressing. Set the content of cell 0 to 0: STJ 0, 0, .+1 Whatever the current content of cell 0, subtract it from itself to obtain the integer 0. This instruction resides at some address in memory, which we abbreviate as '.', read as ""the current value of the program counter"". '.+1' is the next address, so regardless of the outcome of the test, control flows to the next instruction in memory. a := b, where a and b are symbolic addresses. Use a temporary variable t: STJ t, t, .+1 { t := 0 } STJ t, b, .+1 { t := –b } STJ a, a, .+1{ a := 0 } STJ a, t, .+1 { a := –t, so now a = b } Exercise: a program library (a) Write RISC programs for a:= b + c, a := b · c, a := b div c, a := b mod c, a := |b|, a : = min(b, c), a := gcd(b, c). Algorithms and Data Structures 137 A Global Text 0 1 2 13 14 . . . 0 1 STJ 0, 0, 14 program counter Executing instruction 13 sets cell 0 to 0, and increments",algorithms and data structures.pdf "0 1 2 13 14 . . . 0 1 STJ 0, 0, 14 program counter Executing instruction 13 sets cell 0 to 0, and increments the program counter.",algorithms and data structures.pdf "15. Computability and complexity (b) Show how this RISC can compute with rational numbers represented by a pair [a, b] of integers denoting numerator and denominator. (c) (Advanced) Show that this RISC is universal, in the sense that it can simulate any computation done by any other computer. The exercise of building up a RISC program library for elementary functions provides the same experience as the equivalent exercise for Turing machines, but leads to the goal much faster, since the primitive STJ is much more powerful than the primitives of a Turing machine. The purpose of this section is to introduce the idea that conceptually simple models of computation are as powerful, in theory, as much more complex models, such as a high-level programming language. The next two sections demonstrate results of an opposite nature: Universal computers, in the sense we have just introduced, are",algorithms and data structures.pdf "sections demonstrate results of an opposite nature: Universal computers, in the sense we have just introduced, are subject to striking limitations, even if we remove any limit on the memory and time they may use. We prove the existence of noncomputable functions and show that the ""halting problem"" is undecidable. The theory of computability was developed in the 1930s, and greatly expanded in the 1950s and 1960s. Its basic ideas have become part of the foundation that any computer scientist is expected to know. Computability theory is not directly useful. It is based on the concept ""computable in principle"" but offers no concept of a ""feasible computation"". Feasibility, rather than ""possible in principle"", is the touchstone of computer science. Since the 1960s, a theory of the complexity of computation is being developed, with the goal of partitioning the range of",algorithms and data structures.pdf "1960s, a theory of the complexity of computation is being developed, with the goal of partitioning the range of computability into complexity classes according to time and space requirements. This theory is still in full development and breaking new ground, in particular in the area of concurrent computation. We have used some of its concepts throughout Part III and continue to illustrate these ideas with simple examples and surprising results. Almost nothing is computable Consider as a model of computation any programming language, with the fictitious feature that it is implemented on a machine with infinite memory and no operational time limits. Nevertheless we reach the conclusion that ""almost nothing is computable"". This follows simply from the observation that there are fewer programs than problems to be solved (functions to be computed). Both the number of programs and the number of",algorithms and data structures.pdf "programs than problems to be solved (functions to be computed). Both the number of programs and the number of functions are infinite, but the latter is an infinity of higher cardinality. A programming language L is defined over an alphabet A= {a 1, a2, … , ak} of k characters. The set of programs in L is a subset of the set A ∗ of all strings over A. A ∗ is countable, and so is its subset L, as it is in one-to-one correspondence with the natural numbers under the following mapping: 1. Generate all strings in A∗ in order of increasing length and, in case of equal length, in lexicographic order. 2. Erase all strings that do not represent a program according to the syntax rules of L. 3. Enumerate the remaining strings in the originally given order. Among all programs in L we consider only those which compute a (partial) function from the set N = {1, 2, 3, …} of natural numbers into N. This can be recognized by their heading; for example, function f(x: N): N;",algorithms and data structures.pdf "of natural numbers into N. This can be recognized by their heading; for example, function f(x: N): N; As this is a subset of L, there exist only countably many such programs. However, there are uncountably many functions f: N → N, as Georg Cantor (1845–1918) proved by his famous diagonalization argument. It starts by assuming the opposite, that the set {f | f: N → N} is countable, then derives 138",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License a contradiction. If there were only a countable number of such f unctions, we could enumerate all of them according to the following scheme: f1(1)f1 f1(2) f1(3) f1(4) f2(1) f2(3) f2(4)f2(2)f2 f3 f3(1) f3(3) f3(4)f3(2) 1 2 3 4 ... . . . f4 f4(1) f4(3) f4(4)f4(2) Construct a function g: N → N, g(i) = f i(i) + 1, which is obtained by adding 1 to the diagonal elements in the scheme above. Hence g is different from each f i, at least for the argument i: g(i) ≠ f i(i). Therefore, our assumption that we have enumerated all functions f: N → N is wrong. Since there exists only a countable infinity of programs, but an uncountable infinity of functions, almost all functions are noncomputable. The halting problem is undecidable If we could predict, for any program P executed on any data set D, whether P terminates or not (i.e. whether it",algorithms and data structures.pdf "The halting problem is undecidable If we could predict, for any program P executed on any data set D, whether P terminates or not (i.e. whether it will get into an infinite loop), we would have an interesting and useful technique. If this prediction were based on rules that prescribe exactly how the pair (P, D) is to be tested, we could write a program H for it. A fundamental result of computability theory states that under reasonable assumptions about the model of computation, such a halting program H cannot exist. Consider a programming language L that contains the constructs we will use: mainly recursive procedures and procedure parameters. Consider all procedures P in L that have no parameters, a property that can be recognized from the heading procedure P; This simplifies the problem by avoiding any data dependency of termination. Assume that there exists a program H in L that takes as argument any parameterless procedure P in L and",algorithms and data structures.pdf "Assume that there exists a program H in L that takes as argument any parameterless procedure P in L and decides whether P halts or loops (i.e. runs indefinitely): Consider the behavior of the following parameterless procedure X: procedure X; begin while H(X) do; end; Consider the reference of X to itself; this trick corresponds to the diagonalization in the previous example. Consider further the loop while H(X) do; which is infinite if H(X) returns true (i.e. exactly when X should halt) and terminates if H(X) returns false (i.e. exactly when X should run forever). This trick corresponds to the change of the diagonal g(i) = fi(i) + 1. We obtain: Algorithms and Data Structures 139 A Global Text",algorithms and data structures.pdf "15. Computability and complexity By definition of X: By construction of X: The fiendishly crafted program X traps H in a web of contradictions. We blame the weakest link in the chain of reasoning that leads to this contradiction, namely the unsupported assumption of the existence of a halting program H. This proves that the halting problem is undecidable. Computable, yet unknown In the preceding two sections we have illustrated the limitations of computability: clearly stated questions, such as the halting problem, are undecidable. This means that the halting question cannot be answered, in general, by any computation no matter how extensive in time and space. There are, of course, lots of individual halting questions that can be answered, asserting that a particular program running on a particular data set terminates, or fails to do so. To illuminate this key concept of theoretical computer science further, the following examples will",algorithms and data structures.pdf "fails to do so. To illuminate this key concept of theoretical computer science further, the following examples will highlight a different type of practical limitation of computability. Computable or decidable is a concept that naturally involves one algorithm and a denumerably infinite set of problems, indexed by a parameter, say n. Is there a uniform procedure that will solve any one problem in the infinite set? For example, the ""question"" (really a denumerable infinity of questions) ""Can a given integer n > 2 be expressed as the sum of two primes?"" is decidable because there exists the algorithm 's2p' that will answer any single instance of this question: procedure s2p(n: integer): boolean; { for n>2, s2p(n) returns true if n is the sum of two primes, false otherwise } function p(k: integer): integer; { for k>0, p(k) returns the k-th prime: p(1) = 2, p(2) = 3, p(3) = 5, … } end; begin for all i, j such that p(i) < n and p(j )< n do if p(i) + p(j) = n then return(true);",algorithms and data structures.pdf "= 5, … } end; begin for all i, j such that p(i) < n and p(j )< n do if p(i) + p(j) = n then return(true); return(false); end; { s2p } So the general question ""Is any given integer the sum of two primes?"" is solved readily by a simple program. A single related question, however, is much harder: ""Is every even integer >2 the sum of two primes?"" Let's try: 4 = 2 + 2, 6 = 3 + 3, 8 = 5 + 3, 10 = 7 + 3 = 5 + 5, 12 = 7 + 5, 14 = 11 + 3 = 7 + 7, 16 = 13 + 3 = 11 + 5, 18 = 13 + 5 = 11 + 7, 20 = 17 + 3 = 13 + 7, 22 = 19 + 3 = 17 + 5 = 11 + 11, 24 = 19 + 5 = 17 + 7 = 13 + 11, 26 = 23 + 3 = 21 + 5 = 19 + 7 = 13 + 13, 28 = 23 + 5 = 17 + 11, 30 = 23 + 7 = 19 + 11 = 17 + 13, 32 = 29 + 3 = 19 + 13, 34 = 31 + 3 = 29 + 5 = 23 + 11 = 17 + 17, 36 = 33 + 3 = 31 + 5 = 29 + 7 = 23 + 13 = 19 + 17. 140",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License A bit of experimentation suggests that the number of distinct representations as a sum of two primes increases as the target integer grows. Christian Goldbach (1690–1764) had the good fortune of stating the plausible conjecture ""yes"" to a problem so hard that it has defied proof or counterexample for three centuries. One might ask: Is the Goldbach conjecture decidable? The straight answer is that the concept of decidability does not apply to a single yes/no question such as Goldbach's conjecture. Asking for an algorithm that tells us whether the conjecture is true or false is meaninglessly trivial. Of course, there is such an algorithm! If the Goldbach conjecture is true, the algorithm that says 'yes' decides. If the conjecture is false, the algorithm that says 'no' will do the job. The problem that we don't know which algorithm is the right one is quite compatible with",algorithms and data structures.pdf "'no' will do the job. The problem that we don't know which algorithm is the right one is quite compatible with saying that one of those two is the right algorithm. If we package two trivial algorithms into one, we get the following trivial algorithm for deciding Goldbach's conjecture: function GoldbachOracle(): boolean: begin return(GoldbachIsRight) end; Notice that 'GoldbachOracle' is a function without arguments, and 'GoldbachIsRight' is a boolean constant, either true or false. Occasionally, the stark triviality of the argument above is concealed so cleverly under technical jargon as to sound profound. Watch out to see through the following plot. Let us call an even integer > 2 that is not a sum of two primes a counterexample. None have been found as yet, but we can certainly reason about them, whether they exist or not. Define the function G(k: cardinal): boolean; as follows:",algorithms and data structures.pdf "but we can certainly reason about them, whether they exist or not. Define the function G(k: cardinal): boolean; as follows: Goldbach's conjecture is equivalent to G(0) = true. The (implausible) rival conjecture that there is exactly one counterexample is equivalent to G(0) = false, G(1) = true. Although we do not know the value of G(k) for any single k, the definition of G tells us a lot about this artificial function, namely: if G(i) = true for any i, then G(k) = true for all k > i. With such a strong monotonicity property, how can G look? 1. If Goldbach is right, then G is a constant: G(k) = true for all k. 2. If there are a finite number i of exceptions, then G is a step function: G(k) = false for k < i, G(k) = true for k ≥ i. 3. If there is an infinite number of exceptions, then G is again a constant: G(k) = false for all k. Each of the infinitely many functions listed above is obviously computable. Hence G is computable. The value of",algorithms and data structures.pdf "G(k) = false for all k. Each of the infinitely many functions listed above is obviously computable. Hence G is computable. The value of G(0) determines truth or falsity of Goldbach's conjecture. Does that help us settle this time-honored mathematical puzzle? Obviously not. All we have done is to rephrase the honest statement with which we started this section, ""The answer is yes or no, but I don't know which"" by the circuitous ""The answer can be obtained by evaluating a computable function, but I don't know which one"". Algorithms and Data Structures 141 A Global Text",algorithms and data structures.pdf "15. Computability and complexity Multiplication of complex numbers Let us turn our attention from noncomputable functions and undecidable problems to very simple functions that are obviously computable, and ask about their complexity: How many primitive operations must be executed in evaluating a specific function? As an example, consider arithmetic operations on real numbers to be primitive, and consider the product z of two complex numbers x and y: x = x1 + i · x2 and y = y1 + i · y2, x · y = z = z1 + i · z2. The complex product is defined in terms of operations on real numbers as follows: z1 = x1 · y1 – x2 · y2, z2 = x1 · y2 + x2 · y1. It appears that one complex multiplication requires four real multiplications and two real additions/subtractions. Surprisingly, it turns out that multiplications can be traded for additions. We first compute three intermediate variables using one multiplication for each, and then obtain z by additions and subtractions:",algorithms and data structures.pdf "three intermediate variables using one multiplication for each, and then obtain z by additions and subtractions: p1 = (x1 + x2) · (y1 + y2), p2 = x1 · y1, p3 = x2 · y2, z1 = p2 – p3, z2 = p1 – p2 – p3. This evaluation of the complex product requires only 3 real multiplications, but 5 real additions / subtractions. This trade of one multiplication for three additions may not look like a good deal in practice, because many computers have arithmetic chips with fast multiplication circuitry. In theory, however, the trade is clearly favorable. The cost of an addition grows linearly in the num ber of digits, whereas the cost of a multiplication using the standard method grows quadratically. The key idea behind this algorithm is that ""linear combinations of k products of sums can generate more than k products of simple terms"". Let us exploit this idea in a context where it makes a real difference. Complexity of matrix multiplication",algorithms and data structures.pdf "real difference. Complexity of matrix multiplication The complexity of an algorithm is given by its time and space requirements. Time is usually measured by the number of operations executed, space by the number of variables needed at any one time (for input, intermediate results, and output). For a given algorithm it is often easy to count the number of operations performed in the worst and in the best case; it is usually difficult to determine the average number of operations performed (i.e. averaged over all possible input data). Practical algorithms often have time complexities of the order O(log n), O(n 2), O(n · log n), O(n2), and space complexity of the order O(n), where n measures the size of the input data. The complexity of a problem is defined as the minimal complexity of all algorithms that solve this problem. It is almost always difficult to determine the complexity of a problem, since all possible algorithms must be considered,",algorithms and data structures.pdf "almost always difficult to determine the complexity of a problem, since all possible algorithms must be considered, including those yet unknown. This may lead to surprising results that disprove obvious assumptions. The complexity of an algorithm is an upper bound for the complexity of the problem solved by this algorithm. An algorithm is a witness for the assertion: You need at most this many operations to solve this problem. A specific algorithm never provides a lower bound on the complexity of a problem— it cannot extinguish the hope for a more efficient algorithm. Occasionally, algorithm designers engage in races lasting decades that result in (theoretically) faster and faster algorithms for solving a given problem. Volker Strassen started such a race with his 1969 paper 142",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License ""Gaussian Elimination Is Not Optimal"" [Str 69], where he showed that matrix multiplication requires fewer operations than had commonly been assumed necessary. The race has not yet ended. The obvious way to multiply two n × n matrices uses three nested loops, each of which is iterated n times, as we saw in a transitive hull algorithm in the chapter, “Matrices and graphs: transitive closure”. The fact that the obvious algorithm for matrix multiplication is of time complexity Θ (n3), however, does not imply that the matrix multiplication problem is of the same complexity. Strassen's matrix multiplication The standard algorithm for multiplying two n × n matrices needs n 3 scalar multiplications and n 2 · (n – 1) additions; for the case of 2 × 2 matrices, eight multiplications and four additions. Seven scalar multiplications suffice if we accept 18 additions/subtractions.",algorithms and data structures.pdf "suffice if we accept 18 additions/subtractions. Evaluate seven expressions, each of which is a product of sums: p1 = (a11 + a22) · (b11 + b22), p2 = (a21 + a22) · b11 p3 = a11 · (b12 – b22) p4 = a22 · (–b11 + b21) p5 = (a11 + a12) · b22 p6 = (–a11 + a21) · (b11 + b12)p7 = (a12 – a22) · (b21 + b22). The elements of the product matrix are computed as follows: r11 = p1 + p4 – p5 + p7, r12 = p3 + p5, r21 = p2 + p4, r22 = p1 – p2 + p3 + p6. This algorithm does not rely on the commutativity of scalar multiplication. Hence it can be generalized to n × n matrices using the divide-and-conquer principle. For reasons of simplicity consider n to be a power of 2 (i.e. n = 2k); for other values of n, imagine padding the matrices with rows and columns of zeros up to the next power of 2. An n × n matrix is partitioned into four n/2 × n/2 matrices: The product of two n × n matrices by Strassen's method requires seven (not eight) multiplications and 18",algorithms and data structures.pdf "The product of two n × n matrices by Strassen's method requires seven (not eight) multiplications and 18 additions/subtractions of n/2 × n/2 matrices. For large n, the work required for the 18 additions is negligible compared to the work required for even a single multiplication (why?); thus we have saved one multiplication out of eight, asymptotically at no cost. Each n/2 × n/2 matrix is again partitioned recursively into four n/4 × n/4 matrices; after log 2 n partitioning steps we arrive at 1 × 1 matrices for which matrix multiplication is the primitive scalar multiplication. Let T(n) denote the number of scalar arithmetic operations used by Strassen's method for multiplying two n × n matrices. For n > 1, T(n) obeys the recursive equation Algorithms and Data Structures 143 A Global Text",algorithms and data structures.pdf "15. Computability and complexity If we are only interested in the leading term of the solution, the constants 7 and 2 justify omitting the quadratic term, thus obtaining Thus the number of primitive operations required to multiply two n × n matrices using Strassen's method is proportional to n2.81, a statement that we abbreviate as ""Strassen's matrix multiplication takes time Θ (n2.81)"". Does this asymptotic improvement lead to a more efficient program in practice? Probably not, as the ratio grows too slowly to be of practical importance: For n ≈ 1000, for example, we have 5√1024 = 4 (remember: 210 = 1024). A factor of 4 is not to be disdained, but there are many ways to win or lose a factor of 4. Trading an algorithm with simple code, such as straightforward matrix multiplication, for another that requires more elaborate bookkeeping, such as Strassen's, can easily result in a fourfold increase of the constant factor that measures the",algorithms and data structures.pdf "bookkeeping, such as Strassen's, can easily result in a fourfold increase of the constant factor that measures the time it takes to execute the body of the innermost loop. Exercises 1. Prove that the set of all ordered pairs of integers is countably infinite. 2. A recursive function is defined by a finite set of rules that specify the function in terms of variables, nonnegative integer constants, increment ('+1'), the function itself, or an expression built from these by composition of functions. As an example, consider Ackermann's function defined as A(n) = An(n) for n ≥ 1, where Ak(n) is determined by Ak(1) = 2 for k ≥ 1 A1(n) = A1(n–1) + 2 for n ≥ 2 Ak(n) = Ak–1(Ak(n–1)) for k ≥ 2 (a) Calculate A(1) , A(2) , A(3), A(4). (b) Prove that Ak(2) = 4 for k ≥ 1, A1(n) = 2·n for n ≥ 1, A2(n) = 2n for n ≥ 1, A3(n) = 2A 3 (n–1) for n ≥ 2. (c) Define the inverse of Ackermann's function as α(n) = min{m: A(m) ≥ n}.",algorithms and data structures.pdf "A1(n) = 2·n for n ≥ 1, A2(n) = 2n for n ≥ 1, A3(n) = 2A 3 (n–1) for n ≥ 2. (c) Define the inverse of Ackermann's function as α(n) = min{m: A(m) ≥ n}. Show that α (n) ≤ 3 for n ≤ 16, that α (n) ≤ 4 for n at most a ""tower"" of 65536 2's, and that α (n) → ∞ as n → ∞. 144",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 3. Complete Strassen's algorithm by showing how to multiply n × n matrices when n is not an exact power of 2. 4. Assume that you can multiply 3 × 3 matrices using k multiplications. What is the largest k that will lead to an asymptotic improvement over Strassen's algorithm? 5. A permutation matrix P is an n × n matrix that has exactly one '1' in each row and each column; all other entries are '0'. A permutation matrix can be represented by an array var a: array[1 .. n] of integer; as follows: a[i] = j if the i-th row of P contains a '1' in the j-th column. 6. Prove that the product of two permutation matrices is again a permutation matrix. 7. Design an algorithm that multiplies in time Θ (n) two permutation matrices given in the array representation above, and stores the result in this same array representation. Algorithms and Data Structures 145 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 16. The mathematics of algorithm analysis Learning objectives: • worst-case and average performance of an algorithm • growth rate of a function • asymptotics: O(), Ω (), ∴Θ () • asymptotic behavior of sums • solution techniques for recurrence relations • asymptotic performance of divide-and-conquer algorithms • average number of inversions and average distance in a permutation • trees and their properties Growth rates and orders of magnitude To understand a specific algorithm, it is useful to ask and answer the following questions, usually in this order: What is the problem to be solved? What is the main idea on which this algorithm is based? Why is it correct? How efficient is it? The variety of problems is vast, and so is the variety of ""main ideas"" that lead one to design an algorithm and establish its correctness. True, there are general algorithmic principles or schemas which are problem-independent,",algorithms and data structures.pdf "establish its correctness. True, there are general algorithmic principles or schemas which are problem-independent, but these rarely suffice: Interesting algorithms typically exploit specific features of a problem, so there is no unified approach to understanding the logic of algorithms. Remarkably, there is a unified approach to the efficiency analysis of algorithms, where efficiency is measured by a program's time and storage requirements. This is remarkable because there is great variety in (1) sets of input data and (2) environments (computers, operating systems, programming languages, coding techniques), and these differences have a great influence on the run time and storage consumed by a program. These two types of differences are overcome as follows. Different sets of input data: worst-case and average performance The most im portant characteristic of a set of data is its size, measured in terms of any unit convenient to the",algorithms and data structures.pdf "The most im portant characteristic of a set of data is its size, measured in terms of any unit convenient to the problem at hand. This is typically the number of primitive objects in the data, such as bits, bytes, integers, or any monotonic function thereof, such as the magnitude of an integer. Examples: For sorting, the number n of elements is natural; for square matrices, the number n of rows and columns is convenient; it is a monotonic function (square root) of the actual size n 2 of the data. An algorithm may well behave very differently on different data sets of equal size n—among all possible configurations o f given size n some will be favorable, others less so. Both the worst-case data set of size n and the average over all data sets of size n provide well-defined and important measures of efficiency. Example: When sorting data sets about whose order nothing is known, average performance is well",algorithms and data structures.pdf "efficiency. Example: When sorting data sets about whose order nothing is known, average performance is well characterized by averaging run time over all n! permutations of the n elements. Algorithms and Data Structures 146 A Global Text",algorithms and data structures.pdf "16. The mathematics of algorithm analysis Different environments: focus on growth rate and ignore constants The work performed by an algorithm is expressed as a function of the problem size, typically measured by size n of the input data. B y focusing on the growth rate of this function but ignoring specific constants, we succeed in losing a lot of detail information that changes wildly from one computing environment to another, while retaining some essential information that is remarkably invariant when moving a computation from a micro- to a supercomputer, from machine language to Pascal, from amateur to professional programmer. The definition of general measures for the complexity of problems and for the efficiency of algorithms is a major achievement of computer science. It is based on the notions of asymptotic time and space complexity . Asymptotics renounces",algorithms and data structures.pdf "computer science. It is based on the notions of asymptotic time and space complexity . Asymptotics renounces exact measurement but states how the work grows as the problem size increases. This information often suffices to distinguish efficient algorithms from inefficient ones. The asymptotic behavior of an algorithm is described by the O(), Ω (), Θ (), and o() notations. To determine the amount of work to be performed by an algorithm we count operations that take constant time (independently of n) and data objects that require constant storage space. The time required by an addition, comparison, or exchange of two numbers is typically independent of how many numbers we are processing; so is the storage requirement for a number. Assume that the time required by four algorithms A1, A2, A3, and A4 is log2n, n, n · log2n, and n2, respectively. The following table shows that for sizes of data sets that frequently occur in practice, from n ≈ 10 3 to 106, the difference",algorithms and data structures.pdf "following table shows that for sizes of data sets that frequently occur in practice, from n ≈ 10 3 to 106, the difference in growth rate translates into large numerical differences: n A1 = log2n A2 = n A3 = n · log2n A4 = n2 25 = 32 5 25 = 32 5 · 25 = 160 210 ≈ 103 210 = 1024 10 210 ≈ 103 10 · 210 ≈ 104 220 ≈ 106 220 ≈ 106 20 220 ≈ 106 20 · 220 ≈ 2 · 107 240 ≈ 1012 For a specific algorithm these functions are to be multiplied by a constant factor proportional to the time it takes to execute the body of the innermost loop. When comparing different algorithms that solve the same problem, it may well happen that one innermost loop is 10 times faster or slower than another. It is rare that this difference approaches a factor of 100. Thus for n ≈ 1000 an algorithm with time complexity Θ (n · log n) will almost always be much more efficient than an algorithm with time complexity Θ (n2). For small n, say n = 32, an algorithm of time",algorithms and data structures.pdf "much more efficient than an algorithm with time complexity Θ (n2). For small n, say n = 32, an algorithm of time complexity Θ (n2) may be more efficient than one of complexity Θ (n · log n) (e.g. if its constant is 10 times smaller). When we wish to predict exactly how many seconds and bytes a program needs, asymptotic analysis is still useful but is only a small part of the work. We now have to go back over the formulas and keep track of all the constant factors discarded in cavalier fashion by the O() notation. We have to assign numbers to the time consumed by scores of primitive O(1) operations. It may be sufficient to estimate the time consuming primitives, such as floating-point operations; or it may be necessary to include those that are hidden by a high-level programming language and answer questions such as: How long does an array access a[i, j] take? A procedure call? Incrementing the index i in a loop ""for i := 0 to n""? Asymptotics",algorithms and data structures.pdf "the index i in a loop ""for i := 0 to n""? Asymptotics Asymptotics is a technique used to estimate and compare the growth behavior of functions. Consider the function 147",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License f(x) is said to behave like x for x → ∞ and like 1 / x for x → 0. The motivation for such a statement is that both x and 1 / x are intuitively simpler, more easily understood functions than f(x). A complicated function is unlike any simpler one across its entire domain, but it usually behaves like a simpler one as x approaches some particular value. Thus all asymptotic statements include the qualifier x → x0. For the purpose of algorithm analysis we are interested in the behavior of functions for large values of their argument, and all our definitions below assume x → ∞. The asymptotic behavior of functions is described by the O(), Ω (), Θ (), and o() notations, as in f(x) ∈ O(g(x)). Each of these notations assigns to a given function g the set of all functions that are related to g in a well-defined",algorithms and data structures.pdf "Each of these notations assigns to a given function g the set of all functions that are related to g in a well-defined way. Intuitively, O(), Ω (), Θ (), and o() are used to compare the growth of functions, as ≤, ≥, =, and < are used to compare numbers. O(g) is the set of all functions that are ≤ g in a precise technical sense that corresponds to the intuitive notion ""grows no faster than g"". The definition involves some technicalities signaled by the preamble ∃ ∃c > 0,∃ > ∃x0 ∈ X, ∀ x ≥ x 0. It says that we ignore constant factors and initial behavior and are interested only in a function's behavior from some point on. N0 is the set of nonnegative integers, R0 the set of nonnegative reals. In the following definitions X stands for either N0 or R0. Let g: X → X. Definition of O(), ""big oh"": O(g) := {f: X → X | ∃ c > 0, ∃ x0 ∈ X, ∀ x ≥ xo : f(x) ≤ c · g(x)} We say that f ∈ O(g), or that f grows at most as fast as g(x) for x → ∞. Definition of Ω (), ""omega"":",algorithms and data structures.pdf "We say that f ∈ O(g), or that f grows at most as fast as g(x) for x → ∞. Definition of Ω (), ""omega"": Ω (g) := {f: X → X  ∃ c > 0 x0 ∈ X, ∀∀ x ≥ x0: f(x) ≥ c · g(x)}. We say that f ∈ O(g), or that f grows at least as fast as g(x) for x → ∞. Definition of Θ (), ""theta"": Θ (g) := O(g) ∩ Ω (g). We say that f ∈ Θ (g), or that f has the same growth rate as g(x) for x → ∞. Definition of o(), ""small oh"": We say that f ∈ o(g), or that f grows slower than g(x) for x → ∞. Notation: Most of th e literature uses = in place of our ∈ , such as in x = O(x 2). If you do so, just remember that this = has none of the standard properties of an equality relation—it is neither commutative nor transitive. Thus O(x2) = x is not used, and from x = O(x 2) and x2 = O(x2) it does not follow that x = x 2. The key to avoiding confusion is the insight that O() is not a function but a set of functions. Summation formulas",algorithms and data structures.pdf "is the insight that O() is not a function but a set of functions. Summation formulas log2 denotes the logarithm to the base 2, ln the natural logarithm to the base e. Algorithms and Data Structures 148 A Global Text",algorithms and data structures.pdf "16. The mathematics of algorithm analysis The asymptotic behavior of a sum can be derived by comparing the sum to an integral that can be evaluated in closed form. Let f(x) be a monotonically increasing, integrable function. Then is bounded below and above by sums (Exhibit 16.1): Exhibit 16.1: Bounding a definite integral by lower and upper sums. Letting xi = i + 1, this inequality becomes so 149 f(x) x y x 0 x1 x 2 x n−1 ξ ν",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Example By substituting with k > 0 in (∗) we obtain and therefore Example By substituting f x=ln x and ∫ln x dx=x⋅ln x−x in (∗ ∗ ) we obtain (n+1)⋅ln(n+1)−n−ln(n+1)≤∑ i=1 n ln i≤(n+1)cdotln(n+1)−n , and therefore ∑ i=1 n log2 i=(n+1)⋅log2(n+1)− n ln 2 +g(n)with g (n)∈O(log n) Example By substituting in (∗ ∗ ) we obtain with g(n) ∈ O(n · log n). Recurrence relations A homogeneous linear recurrence relation with constant coefficients is of the form xn = a1 · xn–1 + a2 · xn–2 + … + ak · xn–k where the coefficients a i are independent of n and x 1, x 2, … , x n–1 are specified. There is a general technique for solving linear recurrence relations with constant coefficients - that is, for determining x n as a function of n. We will demonstrate this technique for the Fibonacci sequence which is defined by the recurrence Algorithms and Data Structures 150 A Global Text",algorithms and data structures.pdf "16. The mathematics of algorithm analysis xn = xn–1 + xn–2, x0 = 0, x1 = 1. We seek a solution of the form xn = c · rn with constants c and r to be determined. Substituting this into the Fibonacci recurrence relation yields c · rn = c · rn–1 + c · rn–2 or c · rn–2 · (r2 – r – 1) = 0. This equation is satisfied if either c = 0 or r = 0 or r 2 – r – 1 = 0. We obtain the trivial solution x n = 0 for all n if c = 0 or r = 0. More interestingly, r2– r – 1 = 0 for The sum of two solutions of a homogeneous linear recurrence relation is obviously also a solution, and it can be shown that any linear combination of solutions is again a solution. Therefore, the most general solution of the Fibonacci recurrence has the form where c1 and c2 are determined as solutions of the linear equations derived from the initial conditions: which yield the complete solution for the Fibonacci recurrence relation is therefore",algorithms and data structures.pdf "which yield the complete solution for the Fibonacci recurrence relation is therefore Recurrence relations that are not linear with constant coefficients have no general solution techniques comparable to the one discussed above. General recurrence relations are solved (or their solutions are approximated or bounded) by trial-and-error techniques. If the trial and error is guided by some general technique, it will yield at least a good estimate of the asymptotic behavior of the solution of most recurrence relations. Example Consider the recurrence relation 151",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License with a > 0 and b > 0, which appears often in the average-case analysis of algorithms and data structures. When we know from the interpretation of this recurrence that its solution is monotonically nondecreasing, a systematic trial- and-error process leads to the asymptotic behavior of the solution. The simplest possible try is a constant, x n = c. Substituting this into (∗) leads to so xn = c is not a solution. Since the left-hand side x n is smaller than an average of previous values on the right-hand side, the solution of this recurrence relation must grow faster than c. Next, we try a linear function xn = c · n: At this stage of the analysis it suffices to focus on the leading terms of each side: c · n on the left and (c + a) · n on the right. The assumption a > 0 makes the right side larger than the left, and we conclude that a linear function also",algorithms and data structures.pdf "the right. The assumption a > 0 makes the right side larger than the left, and we conclude that a linear function also grows too slowly to be a solution of the recurrence relation. A new attempt with a function that grows yet faster, xn = c · n2, leads to Comparing the leading terms on both sides, we find that the left side is now larger than the right, and conclude that a quadratic function grows too fast. Having bounded the growth rate of the solution from below and above, we try functions whos e growth rate lies between that of a linear and a quadratic function, such as x n = c · n 1.5. A more sophisticated approach considers a family of functions of the form x n = c · n 1+e for any ε > 0: All of them grow too fast. This suggests xn = c · n · log2 n, which gives with g(n) ∈ O(n · log n) and h(n) ∈ O(log n). To match the linear terms on each side, we must choose c such that",algorithms and data structures.pdf "with g(n) ∈ O(n · log n) and h(n) ∈ O(log n). To match the linear terms on each side, we must choose c such that or c = a · ln 4 ≈ 1.386 · a. Hence we now know that the solution to the recurrence relation (∗) has the form Algorithms and Data Structures 152 A Global Text",algorithms and data structures.pdf "16. The mathematics of algorithm analysis Asymptotic performance of divide-and-conquer algorithms We illustrate the power of the techniques developed in previous sections by analyzing the asymptotic performance not of a specific algorithm, but rather, of an entire class of divide-and-conquer algorithms. In “Divide and conquer recursion” we presented the following schema for divide-and-conquer algorithms that partition the set of data into two parts: A(D): if simple(D) then return(A0(D)) else 1. divide: partition D into D1 and D2; 2. conquer: R1 := A(D1); R2 := A(D2); 3. combine: return(merge(R1, R2)); Assume further that the data set D can always be partitioned into two halves, D 1 and D 2, at every level of recursion. Two comments are appropriate: 1. For repeated halving to be possible it is not necessary that the size n of the data set D be a power of 2, n =",algorithms and data structures.pdf "1. For repeated halving to be possible it is not necessary that the size n of the data set D be a power of 2, n = 2k. It is not important that D be partitioned into two exact halves—approximate halves will do. Imagine padding any data set D whose size is not a power of 2 with dummy elements, up to the next power of 2. Dummies can always be found that do not disturb the real computation: for example, by replicating elements or by appending sentinels. Padding is usually just a conceptual trick that may help in understanding the process, but need not necessarily generate any additional data. 2. Whether or not the divide step is guaranteed to partition D into two approximate halves, on the other hand, depends critically on the problem and on the data structures used. Example: Binary search in an ordered array partitions D into halves by probing the element at the midpoint; the same idea is impractical in a",algorithms and data structures.pdf "array partitions D into halves by probing the element at the midpoint; the same idea is impractical in a linked list because the midpoint is not directly accessible. Under our assumption of halving, the time complexity T(n) of algorithm A applied to data D of size n satisfies the recurrence relation where f(n) is the sum of the partitioning or splitting time and the ""stitching time"" required to merge two solutions of size n / 2 into a solution of size n. Repeated substitution yields The term n · T(1) expresses the fact that every data item gets looked at, the second sums up the splitting and stitching time. Three typical cases occur: (a) Constant time splitting and merging f(n) = c yields 153",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License T(n) = (T(1) + c) · n. Example: Find the maximum of n numbers. (b) Linear time splitting and merging f(n) = a · n + b yields T(n) = a · n · log2 n + (T(1) + b) · n. Examples: Mergesort, quicksort. (c) Expensive splitting and merging: n ∈ o(f(n)) yields T(n) = n · T(1) + O(f(n) · log n) and therefore rarely leads to interesting algorithms. Permutations Inversions Let (ak: 1 ≤ k ≤ n) be a permutation of the integers 1 .. n. A pair (a i, aj), 1 ≤ I < j ≤ n, is called an inversion iff ai > aj. What is the average number of inversions in a permutation? Consider all permutations in pairs; that is, with any permutation A: a1 = x1; a2 = x2; … ; an = xn consider its inverse A', which contains the elements of A in inverse order: a1 = xn; a2 = xn–1; … ; an = x1. In one of these two permutations x i and x j are in the correct order, in the other, they form an inversion. Since",algorithms and data structures.pdf "a1 = xn; a2 = xn–1; … ; an = x1. In one of these two permutations x i and x j are in the correct order, in the other, they form an inversion. Since there are n· (n – 1) / 2 pairs of elements (xi, xj) with 1 ≤ i < j ≤ n there are, on average, inversions. Average distance Let (ak: 1 ≤ k ≤ n) be a permutation of the natural numbers from 1 to n. The distance of the element a i from its correct position is |ai – i|. The total distance of all elements from their correct positions is Therefore, the average total distance (i.e. the average over all n! permutations) is Algorithms and Data Structures 154 A Global Text",algorithms and data structures.pdf "16. The mathematics of algorithm analysis Let 1 ≤ i ≤ n and 1 ≤ j ≤ n. Consider all permutations for which a i is equal to j. Since there are (n – 1)! such permutations, we obtain Therefore, the average distance of an element ai from its correct position is therefore Trees Trees are ubiquitous in disc rete mathematics and computer science, and this section summarizes some of the basic concepts, terminology, and results. Although trees come in different versions, in the context of algorithms and data structures, ""tree"" almost always means an ordered rooted tree. An ordered rooted tree is either empty or it consists of a node, called a root, and a sequence of k ordered subtrees T1, T2, … , T k (Exhibit 16.2). The nodes of an ordered tree that have only empty subtrees are called leaves or external nodes, the other nodes are called internal nodes (Exhibit 16.3). The roots of the subtrees attached to a node are its children; and this node is their parent. 155",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 16.2: Recursive definition of a rooted, ordered tree. The level of a node is defined recursively. The root of a tree is at level 0. The children of a node at level t are at level t + 1. The level of a node is the length of the path from the root of the tree to this node. The height of a tree is defined as the maximum level of all leaves. The path length of a tree is the sum of the levels of all its nodes ( Exhibit 16.3). Exhibit 16.3: A tree of height = 4 and path length = 35. A binary tree is an ordered tree whose nodes have at most two children. A 0-2 binary tree is a tree in which every node has zero or two children but not one. A 0-2 tree with n leaves has exactly n – 1 internal nodes. A binary tree of height h is called complete (completely balanced) if it has 2h+1 – 1 nodes (Exhibit 16.4. A binary tree of height",algorithms and data structures.pdf "tree of height h is called complete (completely balanced) if it has 2h+1 – 1 nodes (Exhibit 16.4. A binary tree of height h is called almost comple te if all its leaves are on levels h – 1 and h, and all leaves on level h are as far left as possible (Exhibit 16.4). Algorithms and Data Structures 156 A Global Text",algorithms and data structures.pdf "16. The mathematics of algorithm analysis Exhibit 16.4: Examples of well-balanced binary trees. Exercises 1. Suppose that we are comparing implementations of two algorithms on the same machine. For inputs of size n, the first algorithm runs in 9 · n 2 steps, while the second algorithm runs in 81 · n · log2 n steps. Assuming that the steps in both algorithms take the same time, for which values of n does the first algorithm beat the second algorithm? 2. What is th e smallest value of n such that an algorithm whose running time is 256 · n2 runs faster than an algorithm whose running time is 2n on the same machine? 3. For each of the following functions f i(n), determine a function g(n) such that f i(n) ∈ Θ (g(n)). The function g(n) should be as simple as possible. f1(n) = 0.001 · n7 + n2 + 2 · n f2(n) = n · log n + log n + 1234 · n f3(n) = 5 · n · log n + n2 · log n + n2 f4(n) = 5 · n · log n + n3 + n2 · log n 4. Prove formally that 1024 · n 2+ 5 · n ∈ Θ (n2).",algorithms and data structures.pdf "f3(n) = 5 · n · log n + n2 · log n + n2 f4(n) = 5 · n · log n + n3 + n2 · log n 4. Prove formally that 1024 · n 2+ 5 · n ∈ Θ (n2). 5. Give an asymptotically tight bound for the following summation: 6. Find the most general solutions to the following recurrence relations. 7. Solve the recurrence T(√n) = 2·T() + log2 n. Hint: Make a change of variables m = log2 n. 8. Compute the number of inversions and the total distance for the permutation (3 1 2 4). 157",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 17. Sorting and its complexity Learning objectives: • What is sorting? • basic ideas and intrinsic complexity • insertion sort • selection sort • merge sort • distribution sort • a lower bound Ω (n· log n) • Quicksort • Sorting in linear time? • sorting networks What is sorting? How difficult is it? The problem Assume that S is a set of n elements x1, x2, … , xn drawn from a domain X, on which a total order ≤ is defined (i.e. a relation that satisfies the following axioms): ≤ is reflexive (i.e ∀ ∀ x ∈ X: x ≤ x) ≤ is antisymmetric (i.e ∀ ∀ x, y ∈ X: x ≤ y ∧ y ≤ x ⇒ x = y) ≤ is transitive (i.e ∀ ∀ x, y, z ∈ X: x ≤ y ∧ y ≤ z ⇒ x ≤ z) ≤ is total (i.e. ∀ ∀ x, y ∈ X ⇒ x ≤ y ∨ y ≤ x) Sorting is the process of generating a sequence such that (i1, i2, … , in) is a permutation of the integers from 1 to n and",algorithms and data structures.pdf "Sorting is the process of generating a sequence such that (i1, i2, … , in) is a permutation of the integers from 1 to n and holds. Phrased abstractly, sorting is the problem of finding a specific permutation (or one among a few permutations, when distinct elements may have equal values) out of n! possible permutations of the n given elements. Usually, the set S of elements to be sorted will be given in a data structure; in this case, the elements of S are ordered implicitly by this data structure, but not necessarily according to the desired order ≤. Typical sorting problems assume that S is given in an array or in a sequential file (magnetic tape), and the result is to be generated in the same structure. We characterize elements by their position in the structure (e.g. A[i] in the array A or by the Algorithms and Data Structures 158 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity value of a pointer in a sequential file). The access operations provided by the underlying data structure determine what sorting algorithms are possible. Algorithms Most sorting algorithms are refinements of the following idea: while ∃(i, j): i < j ∧ A[i] > A[j] do A[i] :=: A[j]; where :=: denotes the exchange operator. Even sorting algorithms that do not explicitly exchange pairs of elements, or do not use an array as the underlying data structure, can usually be thought of as conforming to the schema above. An insertion sort, for example, takes one element at a time and inserts it in its proper place among those already sorted. To find the correct place of insertion, we can think of a ripple effect whereby the new element successively displaces (exchanges position with) all those larger than itself. As the schema above shows, two types of operations are needed in order to sort:",algorithms and data structures.pdf "As the schema above shows, two types of operations are needed in order to sort: • collecting information about the order of the given elements • ordering the elements (e.g. by exchanging a pair) When designing an efficient algorithm we seek to economize the number of operations of both types: We try to avoid collecting redundant information, and we hope to move an element as few times as possible. The nondeterministic algorithm given above lets us perform any one of a number of exchanges at a given time, regardless of their usefulness. For example, in sorting the sequence x1 = 5, x2 = 2, x3 = 3, x4 = 4, x5 = 1 the nondeterministic algorithm permits any of seven exchanges x1 :=: xi for 2 ≤ i ≤ 5 and xj :=: x5 for 2 ≤ j ≤ 4. We might have reached the state shown above by following an exotic sorting technique that sorts ""from the middle toward both ends"", and we might know at this time that the single exchange x 1 :=: x5 will complete the sort.",algorithms and data structures.pdf "middle toward both ends"", and we might know at this time that the single exchange x 1 :=: x5 will complete the sort. The nondeterministic algorithm gives us no handle to express and use this knowledge. The attempt to economize work forces us to depart from nondeterminacy and to impose a control structure that carefully sequences the operations to be performed so as to make maximal use of the information g ained so far. The resulting algorithms will be more complex and difficult to understand. It is useful to remember, though, that sorting is basically a simple problem with a simple solution and that all the acrobatics in this chapter are due to our quest for efficiency. Intrinsic complexity There are obvious limits to how much we can economize. In the absence of any previously acquired information, it is clear that each element must be inspected and, in general, moved at least once. Thus we cannot hope to get",algorithms and data structures.pdf "it is clear that each element must be inspected and, in general, moved at least once. Thus we cannot hope to get away with fewer than Ω (n) primitive operations. There are less obvious limits, we mention two of them here. 1. If information is collected by asking binary questions only (any question that may receive one of two answers (e.g. a yes/no question, or a comparison of two elements that yields either ≤ or >), then at least n · log2 n questions are necessary in general, as will be proved in the section ""A lower bound Ω n · logn"". Thus in this model of computation, sorting requires time Θ (n · log n). 2. In addition to collecting information, one must rearrange the elements. In the section ""Permutation"" in chapter 16, we have shown that in a permutation the average distance of an element from its correct 159",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License position is approximately n/3. Therefore elements have to move an average distance of approximately n/3 elements to end up at their destination. Depending on the access operations of the underlying storage structure, an element can be moved to its correct position in a single step of average length n/3, or in n/3 steps of average length 1. If elements are rearranged by exchanging adjacent elements only, then on average Θ (n2) moving operations are required. Therefore, short steps are insufficient to obtain an efficient Θ (n · log n) sorting algorithm. Practical aspects of sorting Records instead of elements. We discuss sorting assuming only that the elements to be sorted are drawn from a totally ordered domain. In practice these elements are just the keys of records that contain additional data associated with the key: for example, type recordtype = record key: keytype; { totally ordered by ≤ }",algorithms and data structures.pdf "associated with the key: for example, type recordtype = record key: keytype; { totally ordered by ≤ } data: anytype end; We use the relational operators =, <, ≤ to compare keys, but in a given programming language, say Pascal, these may be undefined on values of type keytype. In general, they must be replaced by procedures: for example, when comparing strings with respect to the lexicographic order. If the key field is only a small part of a large record, the exchange operation :=:, interpreted literally, becomes an unnecessarily costly copy operation. This can be avoided by leaving the record (or just its data field) in place, and only moving a small surrogate record consisting of a key and a pointer to its associated record. Sort generators. On many systems, particularly in the world of commercial data processing, you may never need to write a sorting program, even though sorting is a frequently executed operation. Sorting is taken care of by",algorithms and data structures.pdf "need to write a sorting program, even though sorting is a frequently executed operation. Sorting is taken care of by a sort generator, a program akin to a compiler; it selects a suitable sorting algorithm from its repertoire and tailors it to the problem at hand, depending on parameters such as the number of elements to be sorted, the resources available, the key type, or the length of the records. Partially sorted sequences. The algorithms we discuss ignore any order that may exist in the sequence to be sorted. Many applications call for sorting files that are almost sorted, for example, the case where a sorted master file is updated with an unsorted transaction file. Some algorithms take advantage of any order present in the input data; their time complexity varies from O(n) for almost sorted files to O(n · log n) for randomly ordered files. Types of sorting algorithms",algorithms and data structures.pdf "data; their time complexity varies from O(n) for almost sorted files to O(n · log n) for randomly ordered files. Types of sorting algorithms Two important class es of incremental sorting algorithms create order by processing each element in turn and placing it in its correct position. These classes, insertion sorts and selection sorts, are best understood as maintaining two disjoint, mutually exhaustive structures called 'sorted' and 'unsorted'. Initialize: 'sorted' := Ø; 'unsorted' := {x1, x2, … , xn}; Loop: for i := 1 to n do move an element from 'unsorted' to its correct place in 'sorted'; The following illustrations show 'sorted' and 'unsorted' sharing an array[1 .. n]. In this case the boundary between 'sorted' and 'unsorted' is represented by an index i that increases as more elements become ordered. The important distinction between the two types of sorting algorithms emerges from the question: In which of the two",algorithms and data structures.pdf "important distinction between the two types of sorting algorithms emerges from the question: In which of the two Algorithms and Data Structures 160 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity structures is most of the work done? Insertion sorts remove the first or most easily accessible element from 'unsorted' and search through 'sorted' to find its proper place. Selection sorts search through 'unsorted' to find the next element to be appended to 'sorted'. Insertion sort The i-th step inserts the i-th element into the sorted sequence of the first (i – 1) elements Exhibit 17.1). Exhibit 17.1: Insertion sorts move an easily accessed element to its correct place. Selection sort The i-th step selects the smallest among the n – i + 1 elements not yet sorted, and moves it to the i-th position (Exhibit 17.2). Exhibit 17.2: Selection sorts search for the correct element to move to an easily accessed place. Insertion and selection sorts repeatedly search through a large part of the entire data to find the proper place of",algorithms and data structures.pdf "Insertion and selection sorts repeatedly search through a large part of the entire data to find the proper place of insertion or the proper element to be moved. Efficient search requires random access, hence these sorting techniques are used primarily for internal sorting in central memory. Merge sort Merge sorts process (sub)sequences of elements in unidirectional order and thus are well suited for external sorting on secondary storage media that provide sequential access only, such as magnetic tapes; or random access to large blocks of data, such as disks. Merge sorts are also efficient for internal sorting. The basic idea is to merge two sorted sequences of elements, called runs, into one longer sorted sequence. We read each of the input runs, and write the output run, starting with small elements and ending with the large ones. We keep comparing the smallest",algorithms and data structures.pdf "write the output run, starting with small elements and ending with the large ones. We keep comparing the smallest of the remaining elements on each input run, and append the smaller of the two to the output run, until both input runs are exhausted (Exhibit 17.3). 161",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 17.3: Merge sorts exploit order already present. The processor shown at left in Exhibit 17.4 reads two tapes, A and B. Tape A contains runs 1 and 2; tape B contains runs 3 and 4. The processor merges runs 1 and 3 into the single run 1 & 3 on tape C, and runs 2 and 4 into the single run 2 & 4 on tape D. In a second merge step, the processor shown at the right reads tapes C and D and merges the two runs 1 & 3 and 2 & 4 into one run, 1 & 3 & 2 & 4. Exhibit 17.4: Two merge steps in sequence. Distribution sort Distribution sorts process the representation of an element as a value in a radix number system and use primitive arithmetic operations such as ""extract the k-th digit"". These sorts do not compare elements directly. They introduce a different model of computation than the sorts based on comparisons, exchanges, insertions, and",algorithms and data structures.pdf "introduce a different model of computation than the sorts based on comparisons, exchanges, insertions, and deletions that we have considered thus far. As an example, consider numbers with at most three digits in radix 4 representation. In a first step these numbers are distributed among four queues according to their least significant digit, and the queues are concatenated in increasing order. The process is repeated for the middle digit, and finally for the leftmost, most significant digit, as shown in Exhibit 17.5 Algorithms and Data Structures 162 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity Exhibit 17.5 Distribution sorts use the radix representation of keys to organize elements in buckets We have now seen the basic ideas on which all sorting algorithms are built. It is more important to understand these ideas than to know dozens of algorithms based on them. To appreciate the intricacy of sorting, you must understand some algorithms in detail: we begin with simple ones that turn out to be inefficient. Simple sorting algorithms that work in time Θ (n2) If you invent your own sorting technique without prior study of the literature, you will probably ""discover"" a well-known inefficient algorithm that works in time O(n 2), requires time Θ (n2) in the worst case, and thus is of time complexity Ω (n2). Your algorithm might be similar to one described below. Consider in-place algorithms that work on an array declared as var A: array[1 .. n] of elt;",algorithms and data structures.pdf "Consider in-place algorithms that work on an array declared as var A: array[1 .. n] of elt; and place the elements in ascending order. Assume that the comparison operators are defined on values of type elt. Let cbest, caverage, and cworst denote the number of comparisons, and ebest, eaverage, and eworst the number of exchange operations performed in the best, average, and worst case, respectively. Let inv average denote the average number of inversions in a permutation. Insertion sort (Exhibit 17.6) Let –∞ denote a constant ≤ any key value. The smallest value in the domain often serves as a sentinel –∞. 163",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 17.6: Straight insertion propagates a ripple-effect across the sorted part of the array. A[0] := –∞; for i := 2 to n do begin j := i; while A[j] < A[j – 1] do { A[j] :=: A[j – 1]; { exchange } j := j – 1 } end; This straight insertion sort is an Θ (n) algorithm in the best case and an Θ (n2) algorithm in the average and worst cases. In the program above, the point of insertion is found by a linear search interleaved with exchanges. A binary search is possible but does not improve the time complexity in the average and worst cases, since the actual insertion still requires a linear-time ripple of exchanges. Selection sort (Exhibit 17.7) Exhibit 17.7: Straight selection scans the unsorted part of the array. for i := 1 to n – 1 do begin minindex := i; minkey := A[i]; for j := i + 1 to n do if A[j] < minkey then { minkey := A[j]; minindex := j } A[i] :=: A[minindex] { exchange } end;",algorithms and data structures.pdf "for j := i + 1 to n do if A[j] < minkey then { minkey := A[j]; minindex := j } A[i] :=: A[minindex] { exchange } end; Algorithms and Data Structures 164 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity The sum in the formula for the number of comparisons reflects the structure of the two nested for loops. The body of the inner loop is executed the same number of times for each of the three cases. Thus this straight selection sort is of time complexity Θ (n2). A lower bound Ω (n · log n) A straightforward counting argument yields a lower bound on the time complexity of any sorting algorithm that collects information about the ordering of the elements by asking only binary questions. A binary question has a two-valued answer: yes or no, true or false. A comparison of two elements, x ≤ y, is the most obvious example, but the following theorem holds for binary questions in general. Theorem: Any sorting algorithm that collects information by asking binary questions only executes at least binary questions both in the worst case, and averaged over all n! permutations. Thus the average and worst-case",algorithms and data structures.pdf "binary questions both in the worst case, and averaged over all n! permutations. Thus the average and worst-case time complexity of such an algorithm is Ω (n · log n). Proof: A sorting algorithm of the type considered here can be represented by a binary decision tree . Each internal node in such a tree represents a binary question, and each leaf corresponds to a result of the decision process. The decision tree must distinguish each of the n! possible permutations of the input data from all the others; and thus must have at least n! leaves, one for each permutation. Example: The decision tree shown in Exhibit 17.8 collects the information necessary to sort three elements, x, y and z, by comparisons between two elements. Exhibit 17.8 The decision tree shows the possible n! Outcomes when sorting n elements. 165",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The average number of binary questions needed by a sorting algorithm is equal to the average depth of the leaves of this decision tree. The lemma following this theorem will show that in a binary tree with k leaves the average depth of the leaves is at least log 2k. Therefore, the average depth of the leaves corresponding to the n! permutations is at least log2n!. Since it follows that on average at least n∗log2 n1− n ln2 binary questions are needed, that is, the time complexity of each such sorting algorithm is Ω (n · log n) in the average, and therefore also in the worst case. Lemma: In a binary tree with k leaves the average depth of the leaves is at least log2k. Proof: Suppose that the lemma is not true, and let T be the counterexample with the smallest number of nodes. T cannot consist of a single node because the lemma is true for such a tree. If the root r of T has only one child, the",algorithms and data structures.pdf "T cannot consist of a single node because the lemma is true for such a tree. If the root r of T has only one child, the subtree T' rooted at this child would contain the k leaves of T that have an even smaller average depth in T' than in T. Since T was the counterexample with the smallest number of nodes, such a T' cannot exist. Therefore, the root r of T must have two children, and there must be kL > 0 leaves in the left subtree and kR > 0 leaves in the right subtree of r (kL + kR = k). Since T was chosen minimal, the kL leaves in the left subtree must have an average depth of at least log2 kL, and the k R leaves in the right subtree must have an average depth of at least log 2 kR. Therefore, the average depth of all k leaves in T must be at least It is easy to see that (∗) assumes its minimum value if kL = kR. Since ( ∗ ) has the value log2 k if kL = kR = k / 2 we have found a contradiction to our assumption that the lemma is false. Quicksort",algorithms and data structures.pdf "found a contradiction to our assumption that the lemma is false. Quicksort Quicksort (C. A. R. Hoare, 1962) [Hoa 62] combines the powerful algorithmic principle of divide-and- conquer with an efficient way of moving elements using few exchanges. The divide phase partitions the array into two disjoint parts: the ""small"" elements on the left and the ""large"" elements on the right. The conquer phase sorts each part separately. Thanks to the work of the divide phase, the merge phase requires no work at all to combine two partial solutions. Quicksort's efficiency depends crucially on the expectation that the divide phase cuts two sizable subarrays rather than merely slicing off an element at either end of the array (Exhibit 17.9). Algorithms and Data Structures 166 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity Exhibit 17.9: Quicksort partitions the array into the ""small"" elements on the left and the ""large"" elements on the right. We chose an arbitrary threshold value m to define ""small"" as ≤ m, and ""large"" as ≥ m, thus ensuring that any ""small element"" ≤ any ""large element"". We partition an arbitrary subarray A[L .. R] to be sorted by executing a left- to-right scan (incrementing an index i) ""concurrently"" with a right-to-left scan (decrementing j) ( Exhibit 17.10). The left-to-right scan pauses at the first element A[i] ≥ m, and the right-to-left scan pauses at the first element A[j] ≤ m. When both scans have paused, we exchange A[i] and A[j] and resume the scans. The partition is complete when the two scans have crossed over with j < i. Thereafter, quicksort is called recursively for A[L .. j] and A[i .. R], unless one or both of these subarrays consists of a single element and thus is trivially sorted. Example of partitioning (m = 16):",algorithms and data structures.pdf "or both of these subarrays consists of a single element and thus is trivially sorted. Example of partitioning (m = 16): 25 23 3 16 4 7 29 6 i j 6 23 3 16 4 7 29 25 i j 6 7 3 16 4 23 29 25 i j 6 7 3 4 16 23 29 25 j i Exhibit 17.10: Scanning the array concurrently from left to right and from right to left. Although the threshold value m appeared arbitrary in the description above, it must meet criteria of correctness and efficiency. Correctness: if either the set of elements ≤ m or the set of elements ≥ m is empty, quicksort fails to terminate. Thus we require that min(xi) ≤ m ≤ max(xi). Efficiency requires that m be close to the median. How do we find the median of n elements? The obvious answer is to sort the elements and pick the middle one, but this leads to a chicken-and-egg problem when trying to sort in the first place. There exist sophisticated",algorithms and data structures.pdf "but this leads to a chicken-and-egg problem when trying to sort in the first place. There exist sophisticated algorithms that determine the exact median of n elements in time O(n) in the worst case [BFPRT 72]. The multiplicative constant might be large, but from a theoretical point of view this does not matter. The elements are partitioned into two equal-sized halves, and quicksort runs in time O(n · log n) even in the worst case. From a practical point of view, however, it is not worthwhile to spend much effort in finding the exact median when there are much cheaper ways of finding an acceptable approximation. The following techniques have all been used to pick a threshold m as a ""guess at the median"": • An array element in a fixed position such as A[(L + R) div 2]. Warning: stay away from either end, A[L] or A[R], as these thresholds lead to poor performance if the elements are partially sorted.",algorithms and data structures.pdf "A[R], as these thresholds lead to poor performance if the elements are partially sorted. • An array element in a random position: a simple technique that yields good results. • The median of three or five array elements in fixed or random positions. 167",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License • The average between the smallest and largest element. This requires a separate scan of the entire array in the beginning; thereafter, the average for each subarray can be calculated during the previous partitioning process. The recursive procedure 'rqs' is a possible implementation of quicksort. The function 'guessmedian' must yield a threshold that lies on or between the smallest and largest of the elements to be sorted. If an array element is used as the threshold, the procedure 'rqs' should be changed in such a way that after finishing the partitioning process this element is in its final position between the left and right parts of the array. procedure rqs (L, R: 1 .. n); { sorts A[L], … , A[R] } var i, j: 0 .. n + 1; procedure partition; var m: elt; begin { partition } m := guessmedian (L, R); { min(A[L], … , A[R]) ≤ m ≤ max(A[L], … , A[R]) } i := L; j := R; repeat",algorithms and data structures.pdf "var m: elt; begin { partition } m := guessmedian (L, R); { min(A[L], … , A[R]) ≤ m ≤ max(A[L], … , A[R]) } i := L; j := R; repeat { A[L], … , A[i – 1] ≤ m ≤ A[j + 1], … , A[R] } while A[i] < m do i := i + 1; { A[L], … , A[i – 1] ≤ m ≤ A[i] } while m < A[j] do j := j – 1; { A[j] ≤ m ≤ A[j + 1], … , A[R] } if i ≤ j then begin A[i] :=: A[j]; { exchange } { i ≤ j ⇒ A[i] ≤ m ≤ A[j] } i := i + 1; j := j – 1 { A[L], … , A[i – 1] ≤ m ≤ A[j + 1], … , A[R] } end else { i > j ⇒ i = j + 1 ⇒ exit } end until i > j end; { partition } begin { rqs } partition; if L < j then rqs(L, j); if i < R then rqs(i, R) end; { rqs } An initial call 'rqs(1, n)' with n > 1 guarantees that L < R holds for each recursive call. An iterative implementation of quicksort is given by the following procedure, 'iqs', which sorts the whole array A[1 .. n]. The boundaries of the subarrays to be sorted are maintained on a stack. procedure iqs; const stacklength = … ;",algorithms and data structures.pdf "A[1 .. n]. The boundaries of the subarrays to be sorted are maintained on a stack. procedure iqs; const stacklength = … ; type stackelement = record L, R: 1 .. n end; var i, j, L, R, s: 0 .. n; stack: array[1 .. stacklength] of stackelement; procedure partition; { same as in rqs } end; { partition } begin { iqs } s := 1; stack[1].L := 1; stack[1].R := n; repeat L := stack[s].L; R := stack[s].R; s := s – 1; Algorithms and Data Structures 168 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity repeat partition; if j – L < R – i then begin if i < R then { s := s + 1; stack[s].L := i; stack[s].R := R }; R := j end else begin if L < j then { s := s + 1; stack[s].L := L; stack[s].R := j }; L := i end until L ≥ R until s = 0 end; { iqs } After partitioning, 'iqs' pushes the bounds of the larger part onto the stack, thus making sure that part will be sorted later, and sorts the smaller part first. Thus the length of the stack is bounded by log2n. For very small arrays, the overhead of managing a stack makes quicksort less efficient than simpler O(n 2) algorithms, such as an insertion sort. A practically efficient implementation of quicksort might switch to another sorting technique for subarrays of size up to 10 or 20. [Sed 78] is a comprehensive discussion of how to optimize quicksort. Analysis for three cases: best, ""typical"", and worst",algorithms and data structures.pdf "quicksort. Analysis for three cases: best, ""typical"", and worst Consider a quicksort algorithm that chooses a guessed median that differs from any of the elements to be sorted and thus partitions the array into two parts, one with k elements, the other with n – k elements. The work q(n) required to sort n elements satisfies the recurrence relation The constant b measures the cost of calling quicksort for the array to be sorted. The term a · n covers the cost of partitioning, and the terms q(k) and q(n – k) correspond to the work involved in quicksorting the two subarrays. Most quicksort algorithms partition the array into three parts: the ""small"" left part, the single array element used to guess the median, and the ""large"" right part. Their work is expressed by the equation We analyze equation (*); it is close enough to the second equation to have the same asymptotic solution.",algorithms and data structures.pdf "We analyze equation (*); it is close enough to the second equation to have the same asymptotic solution. Quicksort's behavior in the best and worst cases are easy to analyze, but the average over all permutations is not. Therefore, we analyze another average which we call the typical case. Quicksort's best-case behavior is obtained if we guess the correct median that partitions the array into two equal-sized subarrays. For simplicity's sake the following calculation assumes that n is a power of 2, but this assumption does not affect the solution. Then (*) can be rewritten as We use this recurrence equation to calculate 169",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License and substitute on the right-hand side to obtain Repeated substitution yields The constant q(1), whic h measures quicksort's work on a trivially sorted array of length 1, and b, the cost of a single procedure call, do not affect the dominant term n · log 2n. The constant factor a in the dominant term can be estimated by analyzing the code of the procedure 'partition'. When these details do not matter, we summarize: Quicksort's time complexity in the best case is Θ (n · log n). Quicksort's worst-case behavior occurs when one of the two subarrays consists of a single element after each partitioning. In this case equation (∗) becomes We use this recurrence equation to calculate and substitute on the right-hand side to obtain Repeated substitution yields Therefore the time complexity of quicksort in the worst case is Θ (n2).",algorithms and data structures.pdf "Repeated substitution yields Therefore the time complexity of quicksort in the worst case is Θ (n2). For the analysis of quicksort's typical behavior we make the plausible assumption that the array is equally likely to get partitioned between any two of its elements: For all k, 1 ≤ k < n, the probability that the array A is partitioned into the subarrays A[1 .. k] and A[k + 1 .. n] is 1 / (n – 1). Then the average work to be performed by quicksort is expressed by the recurrence relation Algorithms and Data Structures 170 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity This recurrence relation approximates the recurrence relation discussed in chapter 16 well enough to have the same solution Since ln 4 ≈ 1.386, quicksort's asymptotic behavior in the typical case is only about 40% worse than in the best case, and remains in Θ (n · log n). [Sed 77] is a thorough analysis of quicksort. Merging and merge sorts The internal sorting algorithms presented so far require direct access to each element. This is reflected in our analyses by treating an array access A[i], or each exchange A[i] :=: A[j], as a primitive operation whose cost is constant (independent of n). This assumption is not valid for elements stored on secondary storage devices such as magnetic tapes or disks. A better assumption that mirrors the realities of external sorting is that the elements to be sorted are stored as a sequential file f. The file is accessed through a file pointer which, at any given time, provides",algorithms and data structures.pdf "sorted are stored as a sequential file f. The file is accessed through a file pointer which, at any given time, provides direct access to a single element. Accessing other elements requires repositioning of the file pointer. Sequential files may permit the pointer to advance in one direction only, as in the case of Pascal files, or to move backward and forward. In either case, our theoretical model assumes that the time required for repositioning the pointer is proportional to the distance traveled. This assumption obviously favors algorithms that process (compare, exchange) pairs of adjacent elements, and penalizes algorithms such as quicksort that access elements in random positions. The following external sorting algorithm is based on the merge sort principle. To make optimal use of the available main memory, the algorithm first creates init ial runs; a run is a sorted subsequence of elements f i, fi+1, … ,",algorithms and data structures.pdf "available main memory, the algorithm first creates init ial runs; a run is a sorted subsequence of elements f i, fi+1, … , fj stored consecutively in file f, f k ≤ fk+1 for all k with i ≤ k ≤ j – 1. Assume that a buffer of capacity m elements is available in main memory to create initial runs of length m (perhaps less for the last run). In processing the r-th run, r = 0, 1, … , we read the m elements fr·m+1, fr·m+2, … , fr·m+m into memory, sort them internally, and write the sorted sequence to a modified file f, which may or may not reside in the same physical storage area as the original file f. This new file f is partially sorted into runs: fk ≤ fk+1 for all k with r · m + 1 ≤ k < r · m + m. At this point we need two files, g and h, in addition to the file f, which contai ns the initial runs. In a copy phase we distribute the initial runs by copying half of them to g, the other half to h. In the subsequent merge phase each",algorithms and data structures.pdf "we distribute the initial runs by copying half of them to g, the other half to h. In the subsequent merge phase each run of g is merged with exactly one run of h, and the resulting new run of double length is written onto f ( Exhibit 17.11). After the first cycle, consisting of a copy phase followed by a merge phase, f contains half as many runs as it did before. After log2(n / m) cycles f contains one single run, which is the sorted sequence of all elements. 171",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 17.11: Each copy-merge cycle halves the number of runs and doubles their lengths. Exercise: a merge sort in main memory Consider the following procedure that sorts the array A: const n = … ; var A: array[1 .. n] of integer; … procedure sort (L, R: 1 .. n); var m: 1 .. n; procedure combine; var B: array [1 .. n] of integer; i, j, k: 1 .. n; begin { combine } i := L; j := m + 1; for k := L to R do if (i > m) cor ((j ≤ R) cand (A[j] < A[i])) then { B[k] := A[j]; j := j + 1 } else { B[k] := A[i]; i := i + 1 } ; for k := L to R do A[k] := B[k] end; { combine } begin { sort} if L < R then { m := (L + R) div 2; sort(L, m); sort(m + 1, R); combine } end; { sort } The relational operators 'cand' and 'cor' are conditional! The procedure is initially called by sort(1,n); (a) Draw a picture to show how 'sort' works on an array of eight elements.",algorithms and data structures.pdf "sort(1,n); (a) Draw a picture to show how 'sort' works on an array of eight elements. (b) Write down a recurrence relation to describe the work done in sorting n elements. (c) Determine the asymptotic time complexity by solving this recurrence relation. (d) Assume that 'sort' is called for m subarrays of equal size, not just for two. How does the asymptotic time complexity change? Solution (a) 'sort' depends on the algorithmic principle of divide and conquer. After dividing an array into a left and a right subarray whose numbers of elements differ by at most one, 'sort' calls itself recursively on these two subarrays. After these two calls are finished, the procedure 'combine' merges the two sorted subarrays A[L .. m] and A[m + 1 .. R] together in B. Finally, B is copied to A. An example is shown in Exhibit 17.12. Algorithms and Data Structures 172 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity Exhibit 17.12: Sorting an array by using a divide-and-conquer scheme. (b) The work w(n) performed while sorting n elements satisfies The first term describes the cost of the two recursive calls of 'sort', the term a · n is the cost of merging the two sorted subarrays, and the constant b is the cost of calling 'sort' for the array. (c) If is substituted in (*∗), we obtain Continuing this substitution process results in 173",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License since w(1) is constant the time complexity of 'sort' is Θ(n · log n). (d) If 'sort' is called recursively for m subarrays of equal size, the cost w'(n) is solving this recursive equation shows that the time complexity does not change [i.e. it is Θ (n · log n)]. Is it possible to sort in linear time? The lower bound Ω (n · log n) has been derived for sorting algorithms that gather information about the ordering of the elements by binary questions and nothing else. This lower bound need not apply in other situations. Example 1: sorting a permutation of the integers from 1 to n If we know that the elements to be sorted are a permutation of the integers 1 .. n, it is possible to sort in time Θ (n) by storing element i in the array element with index i. Example 2: sorting elements from a finite domain Assume that the elements to be sorted are samples from a finite domain W = 1 .. w. Then it is possible to sort in",algorithms and data structures.pdf "Assume that the elements to be sorted are samples from a finite domain W = 1 .. w. Then it is possible to sort in time Θ (n) if gaps between the elements are allowed (Exhibit 17.13). The gaps can be closed in time Θ (w). Exhibit 17.13: Sorting elements from a finite domain in linear time. Do these examples contradict the lower bound Ω (n · log n)? No, because in these examples the information about the ordering of elements is obtained by asking questions more powerful than binary questions: namely, n- valued questions in Example 1 and w-valued questions in Example 2. A k-valued question is equivalent to log2k binary questions. When this ""exchange rate"" is taken into consideration, the theoretical time complexities of the two sorting techniques above are Θ (n · log n) and Θ (n · log w), respectively, thus conforming to the lower bound in the section ""A lower bound Ω (n · log n)"".",algorithms and data structures.pdf "w), respectively, thus conforming to the lower bound in the section ""A lower bound Ω (n · log n)"". Sorting algorithms that sort in linear time (expected linear time, but not in the worst case) are described in the literature under the terms bucket sort, distribution sort, and radix sort. Sorting networks The sorting algorithms above are designed to run on a sequential machine in which all operations, such as comparisons and exchanges, are performed one at a time with a single processor. If algorithms are to be efficient, they need to be rethought when the ground rules for their execution change: when the theoretician uses another model of computation, or when they are executed on a computer with a different architecture. This is particularly true of the many different types of multiprocessor architectures that have been built or conceived. When many processors are available to share the workload, questions of how to distribute the work among them, how to",algorithms and data structures.pdf "processors are available to share the workload, questions of how to distribute the work among them, how to synchronize their operation, and how to transport data, prevail. It is not our intention to discuss sorting on general- purpose parallel machines. We wish to illustrate the point that algorithms must be redesigned when the model of Algorithms and Data Structures 174 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity computation changes. For this purpose a discussion of special-purpose sorting networks suffices. The ""processors"" in a sorting network are merely comparators: Their only function is to compare the values on two input wires and switch them onto two output wires such that the smaller is on top, the larger at the bottom (Exhibit 17.14). Exhibit 17.14: Building block of sorting networks. Comparators are arranged into a network in which n wires enter at the left and n wires exit at the right, as Exhibit 17.15 shows, where each vertical connection joining a pair of wires represents a comparator. The illustration also shows what happens to four input elements, chosen to be 4, 1, 3, 2 in this example, as they travel from left to right through the network. Exhibit 17.15: A comparator network that fails to sort. The output of each comparator performing an exchange is shown in the ovals.",algorithms and data structures.pdf "Exhibit 17.15: A comparator network that fails to sort. The output of each comparator performing an exchange is shown in the ovals. A network of comparators is a sorting network if it sorts every input configuration. We consider an input configuration to consist of distinct elements, so that without loss of generality we may regard it as one of the n! permutations of the sequence (1, 2, … , n). A network that sorts a duplicate-free configuration will also sort a configuration containing duplicates. The comparator network above correctly sorts many of its 4! = 24 input configurations, but it fails on the sequence (4, 1, 3, 2). Hence it is not a sorting network. It is evident that a network with a sufficient number of comparators in the right places will sort correctly, but as the example above shows, it is not immediately evident what number suffices or how the comparators should be placed. The network in Exhibit 17.16 shows that five",algorithms and data structures.pdf "what number suffices or how the comparators should be placed. The network in Exhibit 17.16 shows that five comparators, arranged judiciously, suffice to sort four elements. Exhibit 17.16: Five comparators suffice to sort four elements. How can we tell if a given n etwork sorts successfully? Exhaustive testing is feasible for small networks such as the one above, where we can trace the flow of all 4! = 24 input configurations. Networks with a regular structure 175 c1 c2 c3 c4 c5",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License usually admit a simpler correctness proof. For this example, we observe that c 1, c2, and c3 place the smallest element on the top wire. Similarly, c1, c2, and c4 place the largest on the bottom wire. This leaves the middle two elements on the middle two wires, which c5 then puts into place. What design principles might lead us to create large sorting networks guaranteed to be correct? Sorting algorithms designed for a sequential machine cannot, in general, be mapped directly into network notation, because the network is a more restricted model of computation: Whereas most sequential sorting algorithms make comparisons based on the outcome of previous comparisons, a sorting netw ork makes the same comparisons for all input configurations. The same fundamental algorithm design principles useful when designing sequential algorithms also apply to parallel algorithms.",algorithms and data structures.pdf "algorithms also apply to parallel algorithms. Divide-and-conquer. Place two sorting networks for n wires next to each other, and combine them into a sorting network for 2 · n wires by appending a merge network to merge their outputs. In sequential computation merging is simple because we can choose the most useful comparison depending on the outcome of previous comparisons. The rigid structure of comparator networks makes merging networks harder to design. Incremental algorithm.We place an n-th wire next to a sorting network with n – 1 wires, and either precede or follow the network by a ""ladder"" of comparators that tie the extra wire into the existing network, as shown in the following figures. This leads to designs that mirror the straight insertion and selection algorithms in the section ""Simple sorting algorithms that work in time Θ (n2) Insertion sort. With the top n – 1 elements sorted, the element on the bottom wire trickles into its correct place.",algorithms and data structures.pdf "Insertion sort. With the top n – 1 elements sorted, the element on the bottom wire trickles into its correct place. Induction yields the expanded diagram on the right in Exhibit 17.17. Exhibit 17.17: Insertion sort leads by induction to the sorting network on the right. Selection sort. The maximum element first trickles down to the bottom, then the remaining elements are sorted. The expanded diagram is on the right in Exhibit 17.18. Exhibit 17.18: Selection sort leads by induction to the sorting network on the right. Comparators can be shifted along their pair of wires so as to reduce the number of stages, provided that the topology of the network remains unchanged. This compression reduces both insertion and selection sort to the triangular network shown in Exhibit 17.19 . Thus we see that the distinction between insertion and selection was more a distinction of sequential order of operations rather than one of data flow. Algorithms and Data Structures 176 A Global Text",algorithms and data structures.pdf "17. Sorting and its complexity Exhibit 17.19: Shifting comparators reduces the number of stages. Any numbe r of comparators that are aligned vertically require only a single unit of time. The compressed triangular network has O(n 2) comparators, but its time complexity is 2 · n – 1 ∈ O(n). There are networks with better asymptotic behavior, but they are rather exotic [Knu 73b]. Exercises and programming projects 1. Implement insertion sort, selection sort, merge sort, and quicksort and animate the sorting process for each of these algorithms: for example, as shown in the snapshots in “Algorithm animation”. Compare the number of comparisons and exchange operations needed by the algorithms for different input configurations. 2. What is the smallest possible depth of a leaf in a decision tree for a sorting algorithm? 3. Show that 2 · n – 1 comparisons are necessary in the worst case to merge two sorted arrays containing n elements each.",algorithms and data structures.pdf "3. Show that 2 · n – 1 comparisons are necessary in the worst case to merge two sorted arrays containing n elements each. 4. The most obvious method of systematically interchanging the out-of-order pairs of elements in an array var A: array[1 .. n] of elt; is to scan adjacent pairs of elements from bottom to top (imagine that the array is drawn vertically, with A[1] at the top and A[n] at the bottom) repeatedly, interchanging those found out of order: for i := 1 to n – 1 do for j := n downto i + 1 do if A[j – 1] > A[j] then A[j – 1] :=: A[j]; This technique is known as bubble sort, since smaller elements ""bubble up"" to the top. (a) Explain by words, figures, and an example how bubble sort works. Show that this algorithm sorts correctly. (b) Determine the exact number of comparisons and exchange operations that are performed by bubble sort in the best, average, and worst case. (c) What is the worst-case time complexity of this algorithm?",algorithms and data structures.pdf "sort in the best, average, and worst case. (c) What is the worst-case time complexity of this algorithm? 5. A sorting algorithm is called stable if it preserves the original order of equal elements. Which of the sorting algorithms discussed in this chapter is stable? 6. Assume that quicksort chooses the threshold m as the first element of the sequence to be sorted. Show that the running time of such a quicksort algorithm is Θ (n2) when the input array is sorted in nonincreasing or nondecreasing order. 7. Find a worst-case input configuration for a quicksort algorithm that chooses the threshold m as the median of the first, middle, and last elements of the sequence to be sorted. 8. Array A contains m and array B contains n different integers which are not necessarily ordered: const m = … ; { length of array A } n = … ; { length of array B } var A: array[1 .. m] of integer; B: array[1 .. n] of integer; 177",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License A duplicate is an integer that is contained in both A and B. Problem: How many duplicates are there in A and B? (a) Determine the time complexity of the brute-force algorithm that compares each integer contained in one array to all integers in the other array. (b) Write a more efficient function duplicates: integer; Your solution may rearrange the integers in the arrays. (c) What is the worst-case time complexity of your improved algorithm? Algorithms and Data Structures 178 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Part V: Data structures The tools of bookkeeping When thinking of algorithms we emphasize a dynamic sequence of actions: ""Take this and do that, then that, then … ."" In human experience, ""take"" is usually a straightforward operation, whereas ""do"" means work. In programming, on the other hand, there are lots of interesting examples where ""do"" is nothing more complex than incrementing a counter or setting a bit; but ""take"" triggers a long, sophisticated search. Why do we need fancy data structures at all? Why can't we just spread out the data on a desk top? Everyday experience does not prepare us to appreciate the importance of data structure—it takes programming experience to see that algorithms are nothing without data structures. The algorithms presented so far were carefully chosen to require only the simplest of data",algorithms and data structures.pdf "without data structures. The algorithms presented so far were carefully chosen to require only the simplest of data structures: static arrays. The geometric algorithms of Part VI, on the other hand, and lots of other useful algorithms, depend on sophisticated data structures for their efficiency. The key insight in understanding data structures is the recognition that an algorithm in execution is, at all times, in some state, chosen from a potentially huge state space. The state records such vital information as what steps have already been taken with what results, and what remains to be done. Data structures are the bookkeepers that record all this state information in a tidy manner so that any part can be accessed and updated efficiently. The remarkable fact is that there are a relatively small number of standard data structures that turn out to be useful in",algorithms and data structures.pdf "remarkable fact is that there are a relatively small number of standard data structures that turn out to be useful in the most varied types of algorithms and problems, and constitute essential knowledge for any programmer. The literature on data structures. Whereas one can present some algorithms without emphasizing data structures, as we did in Part III, it appears pointless to discuss data structures without some of the typical algorithms that use them; at the very least, access and update algorithms form a necessary part of any data structure. Accordingly, a new data structure is typically published in the context of a particular new algorithm. Only later, as one notices its general applicability, it may find its way into textbooks. The data structures that have become standard today can be found in many books, such as [AHU 83], [CLR 90], [GB 91], [HS 82], [Knu 73a],",algorithms and data structures.pdf "become standard today can be found in many books, such as [AHU 83], [CLR 90], [GB 91], [HS 82], [Knu 73a], [Knu 73b], [Meh 84a], [Meh 84c], [RND 77], [Sam 90a], [Sam 90b], [Tar 83], and [Wir 86]. Algorithms and Data Structures 179 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 18. What is a data structure? Learning objectives: • data structures for manual use (e.g. edge-notched cards) • general-purpose data structures • abstract data types specify functional properties only • data structures include access and maintenance algorithms and their implementation • performance criteria and measures • asymptotics Data structures old and new The discipline of data structures, as a systematic body of knowledge, is truly a creation of computer science. The question of how best to organize data was a lot simpler to answer in the days before the existence of computers: the organization had to be simple, because there was no automatic device that could have processed an elaborate data structure, and there is no human being with enough patience to do it. Consider two examples. 1. Manual files and catalogs, as used in business offices and libraries, exhibit several distinct organizing",algorithms and data structures.pdf "1. Manual files and catalogs, as used in business offices and libraries, exhibit several distinct organizing principles, such as sequential and hierarchical order and cross-references. From today's point of view, however, manual files are not well-defined data structures. For good reasons, people did not rigorously define those aspects that we consider essential when characterizing a data structure: what constraints are imposed on the data, both on the structure and its content; what operations the data structure must support; what constraints these operations must satisfy. As a consequence, searching and updating a manual file is not typically a process that can be automated: It requires common sense, and perhaps even expert training, as is the case for a library catalog. 2. In manual computing (with pencil and paper or a nonprogrammable calculator) the algorithm is the focus",algorithms and data structures.pdf "2. In manual computing (with pencil and paper or a nonprogrammable calculator) the algorithm is the focus of attention, not the data structure. Most frequently, the person computing writes data (input, intermediate results, output) in any convenient place within his field of vision, hoping to find them again when he needs them. Occasionally, to facilitate highly repetitive computations (such as income tax declarations), someone designs a form to prompt the user, one operation at a time, to write each data item into a specific field. Such a form specifies both an algorithm and a data structure with considerable formality. Compared to the general-purpose data structures we study in this chapter, however, such forms are highly special purpose. Edge-notched cards are perhaps the most sophisticated data structures ever designed for manual use. Let us illustrate them with the example of a database of English words organized so as to help in solving crossword",algorithms and data structures.pdf "illustrate them with the example of a database of English words organized so as to help in solving crossword puzzles. We write one word per card and index it according to which vowels it contains and which ones it does not contain. Across the top row of the card we punch 10 holes labeled A, E, I, O, U, ~A, ~E, ~I, ~O, ~U. When a word, say ABACA, exhibits a given vowel, such as A, we cut a notch above the hole for A; when it does not, such as E, we cut a notch above the hole for ~E (pronounced ""not E""). Exhibit 18.1 shows the encoding of the words BEAUTIFUL, EXETER, OMAHA, OMEGA. For example, we search for words that contain at least one E, but no U, by sticking Algorithms and Data Structures 180 A Global Text",algorithms and data structures.pdf "18. What is a data structure? two needles through the pack of cards at the holes E and ~U. EXETER and OMEGA will drop out. In principle it is easy to make this sample database more powerful by including additional attributes, such as ""A occurs exactly once"", ""A occurs exactly twice"", ""A occurs as the first letter in the word"", and so on. In practice, a few dozen attributes and thousands of cards will stretch this mechanical implementation of a multikey data structure to its limits of feasibility. Exhibit 18.1: Encoding of different words in edge-notched cards. In contrast to data structures suitable for manual processing, those developed for automatic data processing can be complex. Complexity is not a goal in itself, of course, but it may be an unavoidable consequence of the search for efficiency. Efficiency, as measured by processing time and memory space required, is the primary concern of the",algorithms and data structures.pdf "efficiency. Efficiency, as measured by processing time and memory space required, is the primary concern of the discipline of data structures. Other criteria, such as simplicity of the code, play a role, but the first question to be asked when evaluating a data structure that supports a specified set of operations is typically: How much time and space does it require? In contrast to the typical situation of manual computing (consideration of the algorithm comes first, data gets organized only as needed), programmed computing typically proceeds in the opposite direction: First we define the organization of the data rigorously, and from this the structure of the algorithm follows. Thus algorithm design is often driven by data structure design. The range of data structures studied We present generally useful data structures along with the corresponding query, update, and maintenance",algorithms and data structures.pdf "The range of data structures studied We present generally useful data structures along with the corresponding query, update, and maintenance algorithms; and we develop concepts and techniques designed to organize a vast body of knowledge into a coherent whole. Let us elaborate on both of these goals. ""Generally useful"" refers to data structures that occur naturally in many applications. They are relatively simple from the point of view of the operations they support —tables and queues of various types are typical examples. These basic data structures are the building blocks from which an applications programmer may construct more elaborate structures tailored to her particular application. Although our collection of specific data structures is rather small, it covers the great majority of techniques an applications programmer is likely to need. We develop a unified scheme for understanding many data structures as special cases of general concepts. This includes: 181",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License • The separation of abstract data types, which specify only functional properties, from data structures, which also involve aspects of implementation • The classification of all data structures into three major types: implicit data structures, lists, and address computation • A rough assessment of the performance of data structures based on the asymptotic analysis of time and memory requirements The simplest and most common assumption about the elements to be stored in a data structure is that they belong to a domain on which a total order ≤ is defined. Examples: integers ordered by magnitude, a character set with its alphabetic order, character strings of bounded length ordered lexicographically. We assume that each element in a domain requires as much storage as any other element in that domain; in other words, that a data",algorithms and data structures.pdf "element in a domain requires as much storage as any other element in that domain; in other words, that a data structure manages memory fragments of fixed size. Data objects of greatly variable size or length, such as fragments of text, are typically not considered to be ""elements""; instead, they are broken into constituent pieces of fixed size, each of which becomes an element of the data structure. The elements stored in a data structure are often processed according to the order ≤ defined on their domain. The topic of sorting, which we surveyed in “Sorting and its complexity”, is closely related to the study of data structures: Indeed, several sorting algorithms appear ""for free"" in “List structures”, because every structure that implements the abstract data type dictionary leads to a sorting algorithm by successive insertion of elements, followed by a traversal. Performance criteria and measures",algorithms and data structures.pdf "followed by a traversal. Performance criteria and measures The design of data structures is dominated by considerations of efficiency, specifically with respect to time and memory. But efficiency is a multifaceted quality not easily defined and measured. As a scientific discipline, the study of data structures is not directly concerned with the number of microseconds, machine cycles, or bytes required by a specific program processing a given set of data on a particular system. It is concerned with general statements from which an expert practitioner can predict concrete outcomes for a specific processing task. Thus, measuring run times and memory usage is not the typical way to evaluate data structures. We need concepts and notations for expressing the performance of an algorithm independently of machine speed, memory size, programming language, and operating system, and a host of other details that vary from run to run.",algorithms and data structures.pdf "programming language, and operating system, and a host of other details that vary from run to run. The solution to this problem emerged over the past two decades as the discipline of computational complexity was developed. In this theory, algorithms are ""executed"" on some ""mathematical machine"", carefully designed to be as simple as possible to reflect the bare essentials of a problem. The machine makes available certain primitive operations, and we measure ""time"" by counting how many of those are executed. For a given algorithm and all the data sets it accepts as input, we analyze the number of primitive operations executed as a function of the size of the data. We are often interested in the worst case, that is, a data set of given size that causes the algorithm to run as long as possible, and the average case, the run time averaged over all data sets of a given size.",algorithms and data structures.pdf "long as possible, and the average case, the run time averaged over all data sets of a given size. Among the many different mathematical machines that have been defined in the theory of computation, data structures are evaluated almost exclusively with respect to a theoretical random access machine (RAM). A RAM is essentially a memory with as many locations as needed, each of which can hold a data element, such as an integer, or a real number; and a processing unit that can read from any one or two locations, operate on their content, and write the result back into a third location, all in one time unit. This model is rather close to actual sequential Algorithms and Data Structures 182 A Global Text",algorithms and data structures.pdf "18. What is a data structure? computers, except that it incorporates no bounds on the memory size—either in terms of the number of locations or the size of the content of this location. It implies, for example, that a multiplication of two very large numbers requires no more time than 2 · 3 does. This assumption is unrealistic for certain problems, but is an excellent one for most program runs that fit in central memory and do not require variable-precision arithmetic or variable- length data elements. The point is that the programmer has to understand the model and its assumptions, and bears responsibility for applying it judiciously. In this model, time and memory requirements are expressed as functions of input data size, and thus comparing the performance of two data structures is reduced to comparing functions. Asymptotics has proven to be just the right tool for this comparison: sharp enough to distinguish different growth rates, blunt enough to ignore constant",algorithms and data structures.pdf "right tool for this comparison: sharp enough to distinguish different growth rates, blunt enough to ignore constant factors that differ from machine to machine. As an example of the concise descriptions made possible by asymptotic operation counts, the following table evaluates several implementations for the abstract data type 'dictionary'. The four operations 'find', 'insert', 'delete', and 'next' (with respect to the order ≤) exhibit different asymptotic time requirements for the different implementations. The student should be able to explain and derive this table after studying this part of the book. Ordered array Linear list Balanced tree Hash table find O(log n) O(n) O(log n) O(1)a next O(1) O(1) O(log n) O(n) insert O(n) O(n) O(log n) O(1)a delete O(n) O(n) O(log n) O(1)b a On the average, but not necessarily in the worst case b Deletions are possible but may degrade performance Exercise",algorithms and data structures.pdf "a On the average, but not necessarily in the worst case b Deletions are possible but may degrade performance Exercise 1. Describe the manual data structures that have been developed to organize libraries (e.g. catalogs that allow users to get access to the literature in their field of interest, or circulation records, which keep track of who has borrowed what book). Give examples of queries that can be answered by these data structures. 183",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 19. Abstract data types Learning objectives: • data abstraction • abstract data types as a tool to describe the functional behavior of data structures • examples of abstract data types: stack, fifo queue, priority queue, dictionary, string Concepts: What and why? A data structure organizes the data to be processed in such a way that the relations among the data elements are reflected and the operations to be performed on the data are supported. How these goals can be achieved efficiently is the central issue in data structures and a major concern of this book. In this chapter, however, we ask not how but what? In particular, we ask: what is the exact functional behavior a data structure must exhibit to be called a stack, a queue, or a dictionary or table? There are several reasons for seeking a formal functional specification for common data structures. The primary",algorithms and data structures.pdf "There are several reasons for seeking a formal functional specification for common data structures. The primary motivation is increased generality through abstraction; specifically, to separate input/output behavior from implementation, so that the implementation can be changed without affecting any program that uses a particular data type. This goal led to the earlier introduction of the concept of type in programming languages: the type real is implemented differently on different machines, but usually a program using reals does not require modification when run on another machine. A secondary motivation is the ability to prove general theorems about all data structures that exhibit certain properties, thus avoiding the need to verify the theorem in each instance. This goal is akin to the one that sparked the development of algebra: from the axioms that define a field, we prove theorems",algorithms and data structures.pdf "akin to the one that sparked the development of algebra: from the axioms that define a field, we prove theorems that hold equally true for real or complex numbers as well as quaternions. The primary motivation can be further explained by calling on an analogy between data and programs. All programming languages support the concept of procedural abstraction : operations or algorithms are isolated in procedures, thus making it easy to replace or change them without affecting other parts of the program. Other program parts do not know how a certain operation is realized; they know only how to call the corresponding procedure and what effect the procedure call will have. Modern programming languages increasingly support the analogous concept of data abstraction or data encapsulation : the organization of data is encapsulated ( e.g. in a module or a package) so that it is possible to change the data structure without having to change the whole program.",algorithms and data structures.pdf "module or a package) so that it is possible to change the data structure without having to change the whole program. The secondary motivation for formal specification of data types remains an unrealized goal: although abstract data types are an active topic for theoretical research, it is difficult today to make the case that any theorem of use to programmers has been proved. An abstract data type consists of a domain from which the data elements are drawn, and a set of operations. The specification of an abstract data type must identify the domain and define each of the operations. Identifying and describing the domain is generally straightforward. The definition of each operation consists of a syntactic and a semantic part. The syntactic part, which corresponds to a procedure heading, specifies the operation's name and Algorithms and Data Structures 184 A Global Text",algorithms and data structures.pdf "19. Abstract data types the type of each operand. We present the syntax of operations in mathematical function notation, specifying its domain and range. The semantic part attaches a meaning to each operation: what values it produces or what effect it has on its environment. We specify the semantics of abstract data types algebraically by axioms from which other properties may be deduced. This formal approach has the advantage that the operations are defined rigorously for any domain with the required properties. A formal description, however, does not always appeal to intuition, and often forces us to specify details that we might prefer to ignore. When every detail matters, on the other hand, a formal specification is superior to a precise specification in natural language; the latter tends to become cumbersome and difficult to understand, as it often takes many words to avoid ambiguity.",algorithms and data structures.pdf "cumbersome and difficult to understand, as it often takes many words to avoid ambiguity. In this chapter we consider the abstract data types: stack, first-in-first-out queue, priority queue, and dictionary. For each of these data types, there is an ideal, unbounded version, and several versions that reflect the realities of finite machines. From a theoretical point of view we only need the ideal data types, but from a practical point of view, that doesn't tell the whole story: in order to capture the different properties a programmer intuitively associates with the vague concept ""stack"", for example, we are forced into specifying different types of stacks. In addition to the ideal unbounded stack , we specify a fixed-length stack which mirrors the behavior of an array implementation, and a variable-length stack which mirrors the behavior of a list implementation. Similar",algorithms and data structures.pdf "implementation, and a variable-length stack which mirrors the behavior of a list implementation. Similar distinctions apply to the other data types, but we only specify their unbounded versions. Let X denote the domain from which the data elements are drawn. Stacks and fifo queues make no assumptions about X; priority queues and dictionaries require that a total order ≤ be defined on X. Let X ∗denote the set of all finite sequences over X. Stack A stack is also called a last-in-first-out queue, or lifo queue. A brief informal description of the abstract data type stack (more specifically, unbounded stack, in contrast to the versions introduced later) might merely state that the following operations are defined on it: - create Create a new, empty stack. - empty Return true if the stack is empty. - push Insert a new element. - top Return the element most recently inserted, if the stack is not empty.",algorithms and data structures.pdf "- empty Return true if the stack is empty. - push Insert a new element. - top Return the element most recently inserted, if the stack is not empty. - pop Remove the element most recently inserted, if the stack is not empty. Exhibit 19.1 helps to clarify the meaning of these words. Exhibit 19.1: Elements are inserted at and removed from the top of the stack. A definition that uses conventional mathematical notation to capture the intention of the description above might define the operations by explicitly showing their effect on the contents of a stack. Let S = X ∗ be the set of 185",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License possible states of a stack, let s = x1 x2 … xk ∈ S be an arbitrary stack state with k elements, and let λ denote the empty state of the stack, corresponding to the null string ∈ X*. Let 'cat' denote string concatenation. Define the functions create: → S empty: S → {true, false} push: S × X → S top: S – {λ} → X pop: S – {λ} → S as follows: ∀ s ∈ S,∀∀ x, y ∈ X: create = λ empty(λ) = true s ≠ λ ⇒ empty(s) = false push(s, y) = s cat y = x1 x2 … xk y s ≠ λ top(s) = xk s ≠ pop(s) = x1 x2 … xk–1 This definition refers explicitly to the contents of the stack. If we prefer to hide the contents and refer only to operations and their results, we are led to another style of formal definition of abstract data types that expresses the semantics of the operations by relating them to each other rather than to the explicitly listed contents of a data",algorithms and data structures.pdf "semantics of the operations by relating them to each other rather than to the explicitly listed contents of a data structure. This is the commonly used approach to define abstract data types, and we follow it for the rest of this chapter. Let S be a set and s0 ∈ S a distinguished state. s0 denotes the empty stack, and S is the set of stack states that can be obtained from the empty stack by performing finite sequences of 'push' and 'pop' operations. The following functions represent stack operations: create: → S empty: S → {true, false} push: S X → S top: S – {s0} → X pop: S – {s0} → S The semantics of the stack operations is specified by the following axioms: ∀ s ∈ S, ∀ x ∈ X: (1) create = s0 (2) empty(s0) = true (3) empty(push(s, x)) = false (4) top(push(s, x)) = x (5) pop(push(s, x)) = s These axioms can be described in natural language as follows: (1) 'create' produces a stack in the distinguished state. (2) The distinguished state is empty.",algorithms and data structures.pdf "(1) 'create' produces a stack in the distinguished state. (2) The distinguished state is empty. (3) A stack is not empty after an element has been inserted. (4) The element most recently inserted is on top of the stack. (5) 'pop' is the inverse of 'push'. Notice that 'create' plays a different role from the other stack operations: it is merely a mechanism for causing a stack to come into existence, and could have been omitted by postulating the existence of a stack in st ate s0. In any implementation, however, there is always some code that corresponds to 'create'. Technical note: we could identify Algorithms and Data Structures 186 A Global Text",algorithms and data structures.pdf "19. Abstract data types 'create' with s 0, but we choose to make a distinction between the act of creating a new empty stack and the empty state that results from this creation; the latter may recur during normal operation of the stack. Reduced sequences Any s ∈ S is obtained from the empty stac k s0 by performing a finite sequence of 'push' and 'pop' operations. By axiom (5) this sequence can be reduced to a sequence that transforms s 0 into s and consists of 'push' operations only. Example s = pop(push(pop(push(push(s0, x), y)), z)) = pop(push(push(s0, x), z)) = push(s0, x) An implementation of a stack may provide the following procedures: procedure create(var s: stack); function empty(s: stack): boolean; procedure push(var s: stack; x: elt); function top(s: stack): elt; procedure pop(var s: stack); Any program that uses this data type is restricted to calling these five procedures for creating and",algorithms and data structures.pdf "procedure pop(var s: stack); Any program that uses this data type is restricted to calling these five procedures for creating and operating on stacks; it is not allowed to use information about the underlying implementation. The procedures may only be called within the constraints of the specification; for example, 'top' and 'pop' may be called only if the stack is not empty: if not empty(s) then pop(s); The specification above assumes that a stack can grow without a bound; it defines an abstract data type called unbounded stack. However, any implementation imposes some bound on the size ( depth) of a stack: the size of the underlying array in an array imple → d reflect such → limitations. The following fixed-length stack describes an implementation as an array of fixed size m, which limits the maximal stack depth. Fixed-length stack create:→ S empty: S → {true, false} full: S → {true, false} push: {s ∈ S: not full(s)} × X → S top: S – {s0} → X",algorithms and data structures.pdf "Fixed-length stack create:→ S empty: S → {true, false} full: S → {true, false} push: {s ∈ S: not full(s)} × X → S top: S – {s0} → X pop: S – {s0} → S To specify the behavior of the function 'full' we need an internal function depth: S → {0, 1, 2, … , m} that measures the stack depth, that is, the number of elements currently in the stack. The function 'depth' interacts with the other functions in the following axioms, which specify the stack semantics: ∀ s ∈ S, ∀ x ∈ X: create = s0 empty(s) = true not full(s) ⇒ empty(push(s, x)) = false depth(s0) = 0 187",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License not empty(s) ⇒ depth(pop(s)) = depth(s) – 1 not full(s) ⇒ depth(push(s, x)) = depth(s) + 1 full(s) = (depth(s) = m) not full(s) ⇒ top(push(s, x)) = x pop(push(s, x)) = s Variable-length stack A stack implemented as a list may overflow at unpredictable moments depending on the contents of the entire memory, not just of the stack. We specify this behavior by postulating a function 'space-available'. It has no domain and thus acts as an oracle that chooses its value independently of the state of the stack (if we gave 'space-available' a domain, this would have to be the set of states of the entire memory). create: → S empty: S → {true, false} space-available: → {true, false} push: S × X → S top: S – {s0} → X pop: S – {s0} → S ∀ s ∈ S, ∀ x ∈ X: create = s0 empty(s0) = true space-available ⇒ empty(push(s, x)) = false top(push(s, x)) = x pop(push(s, x)) = s Implementation",algorithms and data structures.pdf "∀ s ∈ S, ∀ x ∈ X: create = s0 empty(s0) = true space-available ⇒ empty(push(s, x)) = false top(push(s, x)) = x pop(push(s, x)) = s Implementation We have seen that abstract data types cannot capture our intuitive, vague concept of a stack in one single model. The rigor enforced by the formal definition makes us aware that there are different types of stacks with different behavior (quite apart from the issue of the domain type X, which specifies what type of elements are to be stored). This clarity is an advantage whenever we attempt to process abstract data types automatically; it may be a disadvantage for human communication, because a rigorous definition may force us to (over)specify details. The different types of stacks that we have introduced are directly related to different styles of implementation. The fixed-length stack, for example, describes the following implementation: const m = … ; { maximum length of a stack } type elt = … ; stack =record",algorithms and data structures.pdf "const m = … ; { maximum length of a stack } type elt = … ; stack =record a: array[1 .. m] of elt; d: 0 .. m; { current depth of stack } end; procedure create(var s: stack); begin s.d := 0 end; function empty(s: stack): boolean; begin return(s.d = 0) end; function full(s: stack): boolean; begin return(s.d = m) end; procedure push(var s: stack; x: elt); { not to be called if the stack is full } begin s.d := s.d + 1; s.a[s.d] := x end; Algorithms and Data Structures 188 A Global Text",algorithms and data structures.pdf "19. Abstract data types function top(s: stack): elt; { not to be called if the stack is empty } begin return(s.a[s.d]) end; procedure pop(var s: stack); { not to be called if the stack is empty } begin s.d := s.d – 1 end; Since the function 'depth' is not exported ( i.e. not made available to the user of this data type), it need not be provided as a procedure. Instead, we have implemented it as a variable d which also serves as a stack pointer. Our implementation assumes that the user checks that the stack is not full before calling 'push', and that it is not empty before calling 'top' or 'pop'. We could, of course, write the procedures 'push', 'top', and 'pop' so as to ""protect themselves"" against illegal calls on a full or an empty stack simply by returning an error message to the calling program. This requires adding a further argument to each of these three procedures and leads to yet other types of",algorithms and data structures.pdf "program. This requires adding a further argument to each of these three procedures and leads to yet other types of stacks which are formally different abstract data types from the ones we have discussed. First-in-first-out queue The following operations (Exhibit 19.2) are defined for the abstract data type fifo queue (first-in-first-out queue): empty Return true if the queue is empty. enqueue Insert a new element at the tail end of the queue. front Return the front element of the queue. dequeue Remove the front element. Exhibit 19.2: Elements are inserted at the tail and removed from the head of the fifo queue. Let F be the set of queue states that can be obtained from the empty queue by performing finite sequences of 'enqueue' and 'dequeue' operations. f 0 ∈ F denotes the empty queue. The following functions represent fifo queue operations: create: → F empty: F → {true, false} enqueue: F × X → F front: F – {f0} → X dequeue: F – {f0} → F",algorithms and data structures.pdf "operations: create: → F empty: F → {true, false} enqueue: F × X → F front: F – {f0} → X dequeue: F – {f0} → F The semantics of the fifo queue operations is specified by the following axioms: ∀ f ∈ F,∀ x ∈ X: (1) create = f0 (2) empty(f0) = true (3) empty(enqueue(f, x)) = false (4) front(enqueue(f0, x)) = x (5) not empty(f) ⇒ front(enqueue(f, x)) = front(f) (6) dequeue(enqueue(f0, x)) = f0 (7) not empty(f) ⇒ dequeue(enqueue(f, x)) = enqueue(dequeue(f), x) 189",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Any f ∈ F is obtained from the empty fifo queue f 0 by performing a finite sequence of 'enqueue' and 'dequeue' operations. By axioms (6) and (7) this sequence can be reduced to a sequence consisting of 'enqueue' operations only which also transforms f0 into f. Example f = dequeue(enqueue(dequeue(enqueue(enqueue(f0, x), y)), z)) = dequeue(enqueue(enqueue(dequeue(enqueue(f0, x)), y), z)) = dequeue(enqueue(enqueue(f0, y), z)) = enqueue(dequeue(enqueue(f0, y)), z) = enqueue(f0, z) An implementation of a fifo queue may provide the following procedures: procedure create(var f: fifoqueue); function empty(f: fifoqueue): boolean; procedure enqueue(var f: fifoqueue; x: elt); function front(f: fifoqueue): elt; procedure dequeue(var f: fifoqueue); Priority queue A priority queue orders the elements according to their value rather than their arrival time. Thus we assume that",algorithms and data structures.pdf "Priority queue A priority queue orders the elements according to their value rather than their arrival time. Thus we assume that a total order ≤ is defined on the domain X. In the following examples, X is the set of integers; a small integer means high priority. The following operations (Exhibit 19.3) are defined for the abstract data type priority queue: - empty Return true if the queue is empty. - insert Insert a new element into the queue. - min Return the element of highest priority contained in the queue. - delete Remove the element of highest priority from the queue. Exhibit 19.3: An element's priority determines its position in a priority queue. Let P be the set of priority queue states that can be obtained from the empty queue by performing finite sequences of 'insert' and 'delete' operations. The empty priority queue is denoted by p 0 ∈ P. The following functions represent priority queue operations: create: → P empty: P → {true, false} insert: P × X → P",algorithms and data structures.pdf "represent priority queue operations: create: → P empty: P → {true, false} insert: P × X → P min: P – {p0} → X delete: P – {p0} → P The semantics of the priority queue operations is specified by the following axioms. For x, y ∈ X, the function MIN(x, y) returns the smaller of the two values. Algorithms and Data Structures 190 A Global Text",algorithms and data structures.pdf "19. Abstract data types ∀ p ∈ P,∀ x ∈ X: (1) create = p0 (2) empty(p0) = true (3) empty(insert(p, x)) = false (4) min(insert(p0, x)) = x (5) not empty(p) ⇒ min(insert(p, x)) = MIN(x, min(p)) (6) delete(insert(p0, x)) = p0 (7) not empty(p)⇒ delete (insert(p,x))={ pifxminp insertdeletep,xelse Any p ∈ P is obtained from the empty queue p 0 by a finite sequence of 'insert' and 'delete' operations. By axioms (6) and (7) any such sequence can be reduced to a shorter one that also transforms p 0 into p and consists of 'insert' operations only. Example Assume that x < z, y < z. p = delete(insert(delete(insert(insert(p0, x), z)), y)) = delete(insert(insert(delete(insert(p0, x)), z), y)) = delete(insert(insert(p0, z), y)) = insert(p0, z) An implementation of a priority queue may provide the following procedures: procedure create(var p: priorityqueue); function empty(p: priorityqueue): boolean; procedure insert(var p: priorityqueue; x: elt); function min(p: priorityqueue): elt;",algorithms and data structures.pdf "function empty(p: priorityqueue): boolean; procedure insert(var p: priorityqueue; x: elt); function min(p: priorityqueue): elt; procedure delete(var p: priorityqueue); Dictionary Whereas stacks and fifo queues are designed to retrieve and process elements depending on their order of arrival, a dictionary (or table) is designed to process elements exclusively by their value (name). A priority queue is a hybrid: insertion is done according to value, as in a dictionary, and deletion according to position, as in a fifo queue. The simplest type of dictionary supports the following operations: - member Return true if a given element is contained in the dictionary. - insert Insert a new element into the dictionary. - delete Remove a given element from the dictionary. Let D be the set of dictionary states that can be obtained from the empty dictionary by performing finite",algorithms and data structures.pdf "Let D be the set of dictionary states that can be obtained from the empty dictionary by performing finite sequences of 'insert' and 'del ete' operations. d 0 ∈ D denotes the empty dictionary. Then the operations can be represented by functions as follows: create: → D insert: D × X → D member: D × X → {true, false} delete: D × X → D The semantics of the dictionary operations is specified by the following axioms: 191",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License ∀ d ∈ D,∀ x, y ∈ X: (1) create = d0 (2) member(d0, x) = false (3) member(insert(d, x), x) = true (4) x ≠ y ⇒ member(insert(d, y), x) = member(d, x) (5) delete(d0, x) = d0 (6) delete(insert(d, x), x) = delete(d, x) (7) x ≠ y ⇒ delete(insert(d, x), y) = insert(delete(d, y), x) Any d ∈ D is obtained from the empty dictionary d 0 by a finite sequence of 'insert' and 'delete' operations. By axioms (6) and (7) any such sequence can be reduced to a shorter one that also transforms d 0 into d and consists of 'insert' operations only. Example d = delete(insert(insert(insert(d0, x), y), z), y) = insert(delete(insert(insert(d0, x), y), y), z) = insert(delete(insert(d0, x), y), z) = insert(insert(delete(d0, y), x), z) = insert(insert(d0, x), z) This specification allows duplicates to be inserted. However, axiom (6) guarantees that all duplicates are",algorithms and data structures.pdf "= insert(insert(d0, x), z) This specification allows duplicates to be inserted. However, axiom (6) guarantees that all duplicates are removed if a delete operation is performed. To prevent duplicates, the following axiom is added to the specification above: (8) member(d, x) ⇒ insert(d, x) = d In this case axiom (6) can be weakened to (6') not member(d, x) ⇒ delete(insert(d, x), x) = d An implementation of a dictionary may provide the following procedures: procedure create(var d: dictionary); function member(d: dictionary; x: elt): boolean; procedure insert(var d: dictionary; x: elt); procedure delete(var d: dictionary; x: elt); In actual programming practice, a dictionary usually supports the additional operations 'find', 'predecessor', and 'successor'. 'find' is similar to 'member' but in addition to a true/false answer, provides a pointer to the element",algorithms and data structures.pdf "'successor'. 'find' is similar to 'member' but in addition to a true/false answer, provides a pointer to the element found. Both 'predecessor' and 'successor' take a pointer to an element e as an argument, and return a pointer to the element in the dictionary that immediately precedes or follows e, according to the order ≤. Repeated call of 'successor' thus processes the dictionary in sequential order. Exercise: extending the abstract data type 'dictionary' We have defined a dictionary as supporting the three operations 'member', 'insert' and 'delete'. But a dictionary, or table, usually supports additional operations based on a total ordering ≤ defined on its domain X. Let us add two operations that take an argument x ∈ X and deliver its two neighboring elements in the table: succ(x)Return the successor of x in the table. pred(x)Return the predecessor of x in the table. Algorithms and Data Structures 192 A Global Text",algorithms and data structures.pdf "19. Abstract data types The successor of x is defined as the smallest of all the elements in the table which are larger than x, or as +∞ if none exists. The predecessor is defined symmetrically: the largest of all the elements in the table that are smaller than x, or –∞. Present a formal specification to describe the behavior of the table. Solution Let T be the set of states of the table , and t 0 a spec ial state that denotes the empty table. The functions and axioms are as follows: member: T × X → {true,false} insert: T × X → T delete: T × X → T succ: T × X → X ∪ {+∞} pred: T × X → X ∪ {–∞} ∀ t ∈ T,∀ x, y ∈ X: member(t0, x) = false member(insert(t, x), x) = true x ≠ y ⇒ member(insert(t, y), x) = member(t, x) delete(t0, x) = t0 delete(insert(t, x), x) = delete(t, x) x ≠ y ⇒ delete(insert(t, x), y) = insert(delete(t, y), x) –∞ < x < +∞ pred(t, x) < x < succ(t, x) succ(t, x) ≠ +∞ ⇒ member(t, succ(t, x)) = true pred(t, x) ≠ –∞ ⇒ member(t, pred(t, x)) = true",algorithms and data structures.pdf "–∞ < x < +∞ pred(t, x) < x < succ(t, x) succ(t, x) ≠ +∞ ⇒ member(t, succ(t, x)) = true pred(t, x) ≠ –∞ ⇒ member(t, pred(t, x)) = true x < y, member(t, y), y ≠ succ(t, x) ⇒ succ(t, x) < y x > y, member(t, y), y ≠ pred(t, x) ⇒ y < pred(t, x) Exercise: the abstract data type 'string' We define the following operations for the abstract data type string: - empty Return true if the string is empty. - append Append a new element to the tail of the string. - head Return the head element of the string. - tail Remove the head element of the given string. - length Return the length of the string. - find Return the index of the first occurrence of a value within the string. Let X = {a, b, … , z}, and S be the set of string states that can be obtained from the empty string by performing a finite number of 'append' and 'tail' operations. s 0 ∈ S denotes the empty string. The operations can be represented by functions as follows: empty: S → {true, false} append: S × X → S",algorithms and data structures.pdf "by functions as follows: empty: S → {true, false} append: S × X → S head: S – {s0} → X tail: S – {s0} → S length: S → {0, 1, 2, … } find: S × X → {0, 1, 2, … } Examples: empty('abc') = false; append('abc', 'd') = 'abcd'; head('abcd') = 'a'; 193",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License tail('abcd') = 'bcd'; length('abcd') = 4; find('abcd', 'b') = 2. (a) Give the axioms that specify the semantics of the abstract data type 'string'. (b) The function hchop: S × X → S returns the substring of a string s beginning with the first occurrence of a given value. Similarly, tchop: S × X → S returns the substring of s beginning with head(s) and ending with the last occurrence of a given value. Specify the behavior of these operations by additional axioms. Examples: hchop('abcdabc','c')='cdabc' tchop('abcdabc', 'b') = 'abcdab' (c) The function cat: S × S → S returns the concatenation of two sequences. Specify the behavior of 'cat' by additional axioms. Example: cat('abcd', 'efg') = 'abcdefg' (d) The function reverse: S → S returns the given sequence in reverse order. Specify the behavior of reverse by additional axioms. Example: reverse('abcd') = 'dcba' Solution",algorithms and data structures.pdf "additional axioms. Example: reverse('abcd') = 'dcba' Solution (a) Axioms for the six 'string' operations: ∀ s ∈ S, ∀ x, y ∈ X: empty(s0) = true empty(append(s, x)) = false head(append(s0, x)) = x not empty(s) ⇒ head(s) = head(append(s, x)) tail(append(s0, x)) = s0 not empty(s) ⇒ tail(append(s, x)) = append(tail(s), x) length(s0) = 0 length(append(s, x)) = length(s) + 1 find(s0, x) = 0 x ≠ y, find(s, x) = 0 ⇒ find(append(s, y), x) = 0 find(s, x) = 0 ⇒ find(append(s, x), x) = length(s) + 1 find(s, x) = d > 0 ⇒ find(append(s, y), x) = d (b) Axioms for 'hchop' and 'tchop': ∀ s ∈ S, ∀ x, y ∈ X: hchop(s0, x) = s0 not empty(s), head(s) = x ⇒ hchop(s, x) = s not empty(s), head(s) ≠ x ⇒ hchop(s, x) = hchop(tail(s), x) tchop(s0, x) = s0 tchop(append(s, x), x) = append(s, x) x ≠ y ⇒ tchop(append(s, y), x) = tchop(s, x) (c) Axioms for 'cat': ∀ s, s' ∈ S: cat(s, s0) = s not empty(s') ⇒ cat(s, s') = cat(append(s, head(s')), tail(s')) (d) Axioms for 'reverse': ∀ s ∈ S:",algorithms and data structures.pdf "∀ s, s' ∈ S: cat(s, s0) = s not empty(s') ⇒ cat(s, s') = cat(append(s, head(s')), tail(s')) (d) Axioms for 'reverse': ∀ s ∈ S: Algorithms and Data Structures 194 A Global Text",algorithms and data structures.pdf "19. Abstract data types reverse(s0) = s0 s ≠ s0 ⇒ reverse(s) = append(reverse(tail(s)), head(s)) Exercises 1. Implement two stacks i ν on ε array a[1 .. m] in such a way that neit her stack overflows unless the total number of elements in both stacks together is m. The operations 'push', 'top', and 'pop' should run in O(1) time. 2. A double-ended queue (deque) can grow and shrink at both ends, left and right, using the procedures 'enqueue-left', 'dequeue-left', 'enqueue-right', and 'dequeue-right'. Present a formal specification to describe the behavior of the abstract data type deque. 3. Extend the abstract data type priority queue by the operation next(x), which returns the element in the priority queue having the next lower priority than x. 195",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 20. Implicit data structures Learning objectives: • implicit data structures describe relationships among data elements implicitly by formulas and declarations • array storage • band matrices • sparse matrices • Buffers eliminate temporary speed differences among interacting producer and consumer processes. • fifo queue implemented as a circular buffer • priority queue implemented as a heap • heapsort What is an implicit data structure? An important aspect of the art of data structure design is the efficient representation of the structural relationships among the data elements to be stored. Data is usually modeled as a graph, with nodes corresponding to data elements and links (directed arcs, or bidirectional edges) corresponding to relationships. Relationships often serve a double purpose. Primarily, they define the semantics of the data and thus allow programs to interpret",algorithms and data structures.pdf "often serve a double purpose. Primarily, they define the semantics of the data and thus allow programs to interpret the data correctly. This aspect of relationships is highlighted in the database field: for example, in the entity- relationship model. Secondarily, relationships provide a means of accessing data, by starting at some element and following an access path that leads to other elements of interest. In studying data structures we are mainly concerned with the use of relationships for access to data. When the structure of the data is irregular, or when the structure is highly dynamic (extensively modified at run time), there is no practical alternative to representing the relationships explicitly. This is the domain of list structures, presented in the chapter on “List structures”. When the structure of the data is static and obeys a regular",algorithms and data structures.pdf "structures, presented in the chapter on “List structures”. When the structure of the data is static and obeys a regular pattern, on the other hand, there are alternatives that compress the structural information. We can often replace many explicit links by a few formulas that tell us where to find the ""neighboring"" elements. When this approach works, it saves memory space and often leads to faster programs. We use the term implicit to denote data structures in which the relationships among data elements are given implicitly by formulas and declarations in the program; no additional space is needed for these relationships in the data storage. The best known example is the array. If one looks at the area in which an array is stored, it is impossible to derive, from its contents, any relationships among the elements without the information that the elements belong to an array of a given type.",algorithms and data structures.pdf "elements belong to an array of a given type. Data structures always go hand in hand with the corresponding procedures for accessing and operating on the data. This is particularly true for implicit data structures: They simply do not exist independent of their accessing procedures. Separated from its code, an implicit data structure represents at best an unordered set of data. With the right code, it exhibits a rich structure, as is beautifully illustrated by the heap at the end of this chapter. Algorithms and Data Structures 196 A Global Text",algorithms and data structures.pdf "20. Implicit data structures Array storage A two-dimensional array declared as var A: array[1 .. m, 1 .. n] of elt; is usually written in a rectangular shape: A[1, 1] A[1, 2] … A[1, n] A[2, 1] A[2, 2] … A[2, n] … … … … A[m, 1] A[m, 2] … A[m, n] But it is stored in a linearly addressed memory, typically row by row (as shown below) or column by column (as in Fortran) in consecutive storage cells, starting at base address b. If an element fits into one cell, we have address A[1, 1] b A[1, 2] b + 1 … … A[1, n] b + n – 1 A[2, 1] b + n A[2, 2] b + n + 1 … … A[2, n] b + 2 · n – 1 … … A[m, n] b + m · n – 1 If an element of type 'elt' occupies c storage cells, the address α(i, j) of A[i, j] is This linear formula generalizes to k-dimensional arrays declared as var A: array[1 .. m1, 1 .. m2, … , 1 .. mk] of elt; The address α(i1, i2, … , ik) of element A[i1, i2, … , ik] is 197",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The point is that access to an element A[i, j, …] invokes evaluation of a (linear) formula α(i, j, …) that tells us where to find this element. A high-level programming language hides most of the details of address computation, except when we wish to take advantage of any special structure our matrices may have. The following types of sparse matrices occur frequently in numerical linear algebra. Band matrices. An n × n matrix M is called a band matrix of width 2 · b + 1 (b = 0, 1, …) if Mi,j = 0 for all i and j with |i – j| > b. In other words, all nonzero elements are located on the main diagonal and in b adjacent minor diagonals on both sides of the main diagonal. If n is large and b is small, much space is saved by storing M in a two- dimensional array A with n · (2 · b + 1) cells rather than in an array with n2 cells: type bandm = array[1 .. n, –b .. b] of elt; var A: bandm;",algorithms and data structures.pdf "dimensional array A with n · (2 · b + 1) cells rather than in an array with n2 cells: type bandm = array[1 .. n, –b .. b] of elt; var A: bandm; Each row A[i, ·] stores the nonzero elements of the corresponding row of M, namely the diagonal element M i,i, the b elements to the left of the diagonal Mi,i–b, Mi,i–b+1, … , Mi,i–1 and the b elements to the right of the diagonal Mi,i+1, Mi,i+2, … , Mi,i+b. The first and the last b rows of A contain empty cells corresponding to the triangles that stick out from M in Exhibit 20.1. The elements of M are stored in array A such that A[i, j] contains Mi,i+j (1 ≤ i ≤ n, –b ≤ j ≤ b). A total of b · (b + 1) cells in the upper left and lower right of A remain unused. It is not worth saving an additional b · (b + 1) cells by packing the band matrix M into an array of minimal size, as the mapping becomes irregular and the formula for calculating the indices of Mi,j becomes much more complicated.",algorithms and data structures.pdf "formula for calculating the indices of Mi,j becomes much more complicated. Exhibit 20.1: Extending the diagonals with dummy elements gives the band matrix the shape of a rectangular array. Algorithms and Data Structures 198 A Global Text",algorithms and data structures.pdf "20. Implicit data structures Exercise: band matrices (a) Write a procedure add(p, q: bandm; var r: bandm); which adds two band matrices stored in p and q and stores the result in r. (b) Write a procedure bmv(p: bandm; v: … ; var w: … ); which multiplies a band matrix stored in p with a vector v of length n and stores the result in w. Solution (a) procedure add(p, q: bandm; var r: bandm); var i: 1 .. n; j: –b .. b; begin for i := 1 to n do for j := –b to b do r[i, j] := p[i, j] + q[i, j] end; (b) type vector = array[1 .. n] of real; procedure bmv(p: bandm; v: vector; var w: vector); var i: 1 .. n; j: –b .. b; begin for i := 1 to n do begin w[i] := 0.0; for j := –b to b do if (i + j ≥ 1) and (i + j ≤ n) then w[i] := w[i] + p[i, j] · v[i + j] end end; Sparse matrices. A matrix is called sparse if it consists mostly of zeros. We have seen that sparse matrices of",algorithms and data structures.pdf "v[i + j] end end; Sparse matrices. A matrix is called sparse if it consists mostly of zeros. We have seen that sparse matrices of regular shape can be compressed efficiently using address computation. Irregularly shaped sparse matrices, on the other hand, do not yield gracefully to compression into a smaller array in such a way that access can be based on address computation. Instead, the nonzero elements may be stored in an unstructured set of records, where each record contains the pair ((i, j), A[i, j]) consisting of an index tuple (i, j) and the value A[i, j]. Any element that is absent from this set is assumed to be zero. As the position of a data element is stored explicitly as an index pair (i, j), this representation is not an implicit data structure. As a consequence, access to a random element of an irregularly shaped sparse matrix typically requires searching for it, and thus is likely to be slower than the direct",algorithms and data structures.pdf "irregularly shaped sparse matrix typically requires searching for it, and thus is likely to be slower than the direct access to an element of a matrix of regular shape stored in an implicit data structure. Exercise: triangular matrices Let A and B be lower-triangular n × n-matrices; that is, all elements above the diagonal are zero: A i,j = Bi,j = 0 for i < j. (a) Prove that the inverse (if it exists) and the matrix product of lower-triangular matrices are again lower-triangular. (b) Devise a scheme for storing two lower-triangular matrices A and B in one array C of minimal size. Write a Pascal declaration for C and draw a picture of its contents. (c) Write two functions function A(i, j: 1 .. n): real; function B(i, j: 1 .. n): real; 199",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License (d) that access C and return the corresponding matrix elements. (e) Write a procedure that computes A := A · B in place: The entries of A in C are replaced by the entries of the product A · B. You may use a (small) constant number of additional variables, independent of the size of A and B. (f) Same as (d), but using A := A–1 · B. Solution (a) The inverse of an n × n-matrix exists iff the determinant of the matrix is non zero. Let A be a lower- triangular matrix for which the inverse matrix B exists, that is, and Let 1 ≤ j ≤ n. Then and therefore B is a lower-triangular matrix. Let A and B be lower-triangular, C := A · B: If i < j, this sum is empty and therefore Ci,j = 0 (i. e. C is lower-triangular). (b) A and B can be stored in an array C of size n · (n + 1) as follows (Exhibit 20.2): const n = … ; var C: array [0 .. n, 1 .. n] of real; Algorithms and Data Structures 200 A Global Text",algorithms and data structures.pdf "20. Implicit data structures Exhibit 20.2: A staircase separates two triangular matrices (c) stored in a rectangular array. (graphic does not match) function A(i, j: 1 .. n): real begin if i < j then return(0.0) else return(C[i, j]) end; function B(i, j: 1 .. n): real; begin if i < j then return(0.0) else return(C[n – i, n + 1 – j]) end; (d) Because the new elements of the result matrix C overwrite the old elements of A, it is important to compute them in the right order. Specifically, within every row i of C, elements C i,j must be computed from left to right, that is, in increasing order of j. procedure mult; var i, j, k: integer; x: real; begin for i := 1 to n do for j := 1 to i do begin x := 0.0; for k := j to i do x := x + A(i, k) · B(k, j); C[i, j] := x end end; (e) procedure invertA; var i, j, k: integer; x: real; begin for i := 1 to n do begin for j := 1 to i – 1 do begin x := 0.0;",algorithms and data structures.pdf "end end; (e) procedure invertA; var i, j, k: integer; x: real; begin for i := 1 to n do begin for j := 1 to i – 1 do begin x := 0.0; for k := j to i – 1 do x := x – C[i, k] · C[k, j]; 201",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License C[i, j] := x / C[i, i] end; C[i, i] := 1.0 / C[i, i] end end; procedure AinvertedmultB; begin invertA; mult end; Implementation of the fixed-length fifo queue as a circular buffer A fifo queue is needed in situations where two processes interact in the following way. A process called producer generates data for a process called consumer. The processes typically work in bursts: The producer may generate a lot of data while the consumer is busy with something else; thus the data has to be saved temporarily in a buffer, from which the consumer takes it as needed. A keyboard driver and an editor are an example of this producer- consumer interaction. The keyboard driver transfers characters generated by key presses into the buffer, and the editor reads them from the buffer and interprets them (e.g. as control characters or as text to be inserted). It is",algorithms and data structures.pdf "editor reads them from the buffer and interprets them (e.g. as control characters or as text to be inserted). It is worth remembering, though, that a buffer helps only if two processes work at about the same speed over the long run. If the producer is always faster, any buffer will overflow; if the consumer is always faster, no buffer is needed. A buffer can equalize only temporary differences in speeds. With some knowledge about the statistical behavior of producer and consumer one can usually compute a buffer size that is sufficient to absorb producer bursts with high probability, and allocate the buffer statically in an array of fixed size. Among statically allocated buffers, a circular buffer is the natural implementation of a fifo queue. A circular buffer is an array B, considered as a ring in which the first cell B[0] is the successor of the last cell B[m",algorithms and data structures.pdf "A circular buffer is an array B, considered as a ring in which the first cell B[0] is the successor of the last cell B[m – 1], as shown in Exhibit 20.3. The elements are stored in the buffer in consecutive cells between the two pointers 'in' and 'out': 'in' points to the empty cell into which the next element is to be inserted; 'out' points to the cell containing the next element to be removed. A new element is inserted by storing it in B[in] and advancing 'in' to the next cell. The element in B[out] is removed by advancing 'out' to the next cell. Algorithms and Data Structures 202 A Global Text",algorithms and data structures.pdf "20. Implicit data structures Exhibit 20.3: Insertions move the pointer 'in', deletions the pointer 'out' counterclockwise around the array. Notice that the pointers 'in' and 'out' meet both when the buffer gets full and when it gets empty. Clearly, we must be able to distinguish a full buffer from an empty one, so as to avoid insertion into the former and removal from the latter. At first sight it appears that the pointers 'in' and 'out' are insufficient to determine whether a circular buffer is full or empty. Thus the following implementation uses an additional variable n, which counts how many elements are in the buffer. const m = … ; { length of buffer } type addr = 0 .. m – 1; { index range } var B: array[addr] of elt; {storage} in, out: addr; { access to buffer } n: 0 .. m; { number of elements currently in buffer } procedure create; begin in := 0; out := 0; n := 0 end; function empty(): boolean; begin return(n = 0) end; function full(): boolean;",algorithms and data structures.pdf "procedure create; begin in := 0; out := 0; n := 0 end; function empty(): boolean; begin return(n = 0) end; function full(): boolean; begin return(n = m) end; procedure enqueue(x: elt); { not to be called if the queue is full } begin B[in] := x; in := (in + 1) mod m; n := n + 1 end; function front(): elt; { not to be called if the queue is empty } begin return(B[out]) end; procedure dequeue; { not to be called if the queue is empty } begin out := (out + 1) mod m; n := n – 1 end; 203",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The producer uses only 'enqueue' and 'full', as it deletes no elements from the circular buffer. The consumer uses only 'front', 'dequeue', and 'empty', as it inserts no elements. The state of the circular buffer is described by its contents and the values of 'in', 'out', and n. Since 'in' is changed only within 'enqueue', only the producer needs write-access to 'in'. Since 'out' is changed only by 'dequeue', only the consumer needs write-access to 'out'. The variable n, however, is changed by both processes and thus is a shared variable to which both processes have write-access (Exhibit 20.4 (a)). Exhibit 20.4: (a) Producer and consumer both have write-access to shared variable n. (b) The producer has read/write-access to 'in' and read-only-access to 'out', the consumer has read/write-access to 'out' and read-only-access to 'in'.",algorithms and data structures.pdf "the consumer has read/write-access to 'out' and read-only-access to 'in'. In a concurrent programming environment where several processes execute independently, access to shared variables must be synchronized. Synchronization is overhead to be avoided if possible. The shared variable n becomes superfluous (Exhibit 20.4 (b)) if we use the time-honored trick of leaving at least one cell free as a sentinel. This ensures that 'empty' and 'full', when expressed in terms of 'in' and 'out', can be distinguished. Specifically, we define 'empty' as in = out, and 'full' as (in + 1) mod m = out. This leads to an elegant and more efficient implementation of the fixed-length fifo queue by a circular buffer: const m = … ; { length of buffer } type addr = 0 .. m – 1; { index range } fifoqueue = record B: array[addr] of elt; { storage } in, out: addr { access to buffer } end; procedure create(var f: fifoqueue); begin f.in := 0; f.out := 0 end;",algorithms and data structures.pdf "B: array[addr] of elt; { storage } in, out: addr { access to buffer } end; procedure create(var f: fifoqueue); begin f.in := 0; f.out := 0 end; function empty(f: fifoqueue): boolean; begin return(f.in = f.out) end; function full(f: fifoqueue): boolean; begin return((f.in + 1) mod m = f.out) end; procedure enqueue(var f: fifoqueue; x: elt); { not to be called if the queue is full } begin f.B[f.in] := x; f.in := ( f.in + 1) mod m end; Algorithms and Data Structures 204 A Global Text",algorithms and data structures.pdf "20. Implicit data structures function front(f: fifoqueue): elt; { not to be called if the queue is empty } begin return(f.B[f.out]) end; procedure dequeue(f: fifoqueue); { not to be called if the queue is empty } begin f.out := (f.out + 1) mod m end; Implementation of the fixed-length priority queue as a heap A fixed-length priority queue can be realized by a circular buffer, with elements stored in the cells between 'in' and 'out', and ordered according to their priority such that 'out' points to the element with highest priority ( Exhibit 20.5). In this implementation, the operations 'min' and 'delete' have time complexity O(1), since 'out' points directly to the element with the highest priority. But insertion requires finding the correct cell corresponding to the priority of the element to be inserted, and shifting other elements in the buffer to make space. Binary search could achieve the former task in time O(log n), but the latter requires time O(n).",algorithms and data structures.pdf "the former task in time O(log n), but the latter requires time O(n). Exhibit 20.5: Implementing a fixed-length priority queue by a circular buffer. Shifting elements to make space for a new element costs O(n) time. Implementing a priority queue as a linear list, with elements ordered according to their priority, does not speed up insertion: Finding the correct position of insertion still requires time O(n) (Exhibit 20.6). Exhibit 20.6: Implementing a fixed-length priority queue by a linear list. Finding the correct position for a new element costs O(n) time. The heap is an elegant and efficient data structure for implementing a priority queue. It allows the operation 'min' to be performed in time O(1) and allows both 'insert' and 'delete' to be performed in worst-case time O(log n). A heap is a binary tree that: • obeys a structural property • obeys an order property • is embedded in an array in a certain way",algorithms and data structures.pdf "A heap is a binary tree that: • obeys a structural property • obeys an order property • is embedded in an array in a certain way Structure: The binary tree is as balanced as possible; all leaves are at two adjacent levels, and the nodes at the bottom level are located as far to the left as possible (Exhibit 20.7). 205",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 20.7: A heap has the structure of an almost complete binary tree. Order: The element assigned to any node is ≤ the elements assigned to any children this node may have (Exhibit 20.8). Exhibit 20.8: The order property implies that the smallest element is stored at the root. The order property implies that the smallest element (the one with top priority) is stored in the root. The 'min' operation returns its value in time O(1), but the most obvious way to delete this element leaves a hole, which takes time to fill. How can the tree be reorganized so as to retain the structural and the order property? The structural condition requires the removal of the rightmost node on the lowest level. The element stored there –13 in our example–is used (temporarily) to fill the vacuum in the root. The root may now violate the order condition, but the",algorithms and data structures.pdf "example–is used (temporarily) to fill the vacuum in the root. The root may now violate the order condition, but the latter can be restored by sifting 13 down the tree according to its weight ( Exhibit 20.9). If the order condition is violated at any node, the element in this node is exchanged with the smaller of the elements stored in its children; in our example, 13 is exchanged with 2. This sift-down process continues until the element finds its proper level, at the latest when it lands in a leaf. Algorithms and Data Structures 206 A Global Text 1 2 39 19 10 8 4 13 6 5 7",algorithms and data structures.pdf "20. Implicit data structures Exhibit 20.9: Rebuilding the order property of the tree in Exhibit 20.8 after 1 has been removed and 13 has been moved to the root. Insertion is handled analogously. The structural condition requires that a new node is created on the bottom level at the leftmost empty slot. The new element - 0 in our example - is temporarily stored in this node ( Exhibit 20.10). If the parent node now violates the order condition, we restore it by floating the new element upward according to its weight. If the new element is smaller than the one stored in its parent node, these two elements - in our example 0 and 6 - are exchanged. This sift-up process continues until the element finds its proper level, at the latest when it surfaces at the root. Exhibit 20.10: Rebuilding the order property of the tree in Exhibit 20.8 after 0 has been inserted in a new rightmost node on the lowest level.",algorithms and data structures.pdf "Exhibit 20.10: Rebuilding the order property of the tree in Exhibit 20.8 after 0 has been inserted in a new rightmost node on the lowest level. The number of steps executed during the sift-up process and the sift-down process is at most equal to the height of the tree. The structural condition implies that this height is [log2 n]. Thus both 'insert' and 'delete' in a heap work in time O(log n). 207",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License A binary tree can be implemented in many different ways, but the special class of trees that meets the structural condition stated above has a particularly efficient array implementation. A heap is a binary tree that satisfies the structural and the order condition and is embedded in a linear array in such a way that the children of a node with index i have indices 2 · i and 2 · i + 1 ( Exhibit 20.11). Thus the parent of a node with index j has index j div 2. Any subtree of a heap is also a heap, although it may not be stored contiguously. The order property for the heap implies that the elements stored at indices 2 · i and 2 · i + 1 are ≥ the element stored at index i. This order is called the heap order. Exhibit 20.11: Embedding the tree of Exhibit 20.8 in a linear array. The procedure 'restore' is a useful tool for managing a heap. It creates a heap out of a binary tree embedded in a",algorithms and data structures.pdf "The procedure 'restore' is a useful tool for managing a heap. It creates a heap out of a binary tree embedded in a linear array h that satisfies the structural condition, provided that the two subtrees of the root node are already heaps. Procedure 'restore' is applied to subtrees of the entire heap whose nodes are stored between the indices L and R and whose tree structure is defined by the formulas 2 · i and 2 · i + 1. const m = … ; { length of heap } type addr = 1 .. m; var h: array[addr] of elt; procedure restore(L, R: addr); var i, j: addr; begin i := L; while i ≤ (R div 2) do begin if (2 · i < R) cand (h[2 · i + 1] < h[2 · i]) then j := 2 · i + 1 else j := 2 · i; if h[j] < h[i] then { h[i] :=: h[j]; i := j } else i := R end end; Since 'restore' operates along a single path from the root to a leaf in a tree with at most R – L nodes, it works in time O(log (R – L)). Creating a heap",algorithms and data structures.pdf "time O(log (R – L)). Creating a heap An array h can be turned into a heap as follows: for i := n div 2 down to 1 do restore(i, n); Algorithms and Data Structures 208 A Global Text",algorithms and data structures.pdf "20. Implicit data structures This is more efficient than repeated insertion of a single element into an existing heap. Since the for loop is executed n div 2 times, and n – i ≤ n, the time complexity for creating a heap with n elements is O(n · log n). A more careful analysis shows that the time complexity for creating a heap is O(n). Heap implementation of the fixed-length priority queue const m = … ; { maximum length of heap } type addr = 1 .. m; priorityqueue = record h: array[addr] of elt; { heap storage } n: 0 .. m { current number of elements } end; procedure restore(var h: array[addr] of elt; L, R: addr); begin … end; procedure create(var p: priorityqueue); begin p.n := 0 end; function empty(p: priorityqueue): boolean; begin return(p.n = 0) end; function full(p: priorityqueue): boolean; begin return(p.n = m) end; procedure insert(var p: priorityqueue; x: elt); { not to be called if the queue is full } var i: 1 .. m; begin",algorithms and data structures.pdf "begin return(p.n = m) end; procedure insert(var p: priorityqueue; x: elt); { not to be called if the queue is full } var i: 1 .. m; begin p.n := p.n + 1; p.h[p.n] := x; i := p.n; while (i > 1) cand (p.h[i] < p.h[i div 2]) do { p.h[i] :=: p.h[i div 2]; i := i div 2 } end; function min(p: priorityqueue): elt; { not to be called if the queue is empty } begin return(p.h[1]) end; procedure delete(var p: priorityqueue); { not to be called if the queue is empty } begin p.h[1] := p.h[p.n]; p.n := p.n – 1; restore(p.h, 1, p.n) end; Heapsort The heap is the core of an elegant O(n · log n) sorting algorithm. The following procedure 'heapsort' sorts n elements stored in the array h into decreasing order. procedure heapsort(n: addr); { sort elements stored in h[1 .. n] } var i: addr; begin { heap creation phase: the heap is built up } for i := n div 2 downto 1 do restore(i, n); { shift-up phase: elements are extracted from heap in increasing order }",algorithms and data structures.pdf "for i := n div 2 downto 1 do restore(i, n); { shift-up phase: elements are extracted from heap in increasing order } for i := n downto 2 do { h[i] :=: h[1]; restore(1, i – 1) } end; Each of the for loops is executed less than n times, and the time complexity of restore is O(log n). Thus heapsort always works in time O(n · log n). 209",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exercises and programming projects 1. Block-diagonal matrices are composed of smaller matrices that line up along the diagonal and have 0 elements everywhere else, as shown in Exhibit 20.12. Show how to store an arbitrary block-diagonal matrix in a minimal storage area, and write down the corresponding address computation formulas. Exhibit 20.12: Structure of a block-diagonal matrix. 2. Let A be an antisymmetric n × n-matrix (i. e., all elements of the matrix satisfy Aij = –Aji). (a) What values do the diagonal elements Aii of the matrix have? (b) How can A be stored in a linear array c of minimal size? What is the size of c? (c) Write a function A(i, j: 1 .. n): real; which returns the value of the corresponding matrix element. 3. Show that the product of two n × n matrices of width 2 · b + 1 (b = 0, 1, …) is again a band matrix. What is",algorithms and data structures.pdf "3. Show that the product of two n × n matrices of width 2 · b + 1 (b = 0, 1, …) is again a band matrix. What is the width of the product matrix? Write a procedure that computes the product of two band matrices both having the same width and stores the result as a band matrix of minimal width. 4. Implement a double-ended queue (deque) by a circular buffer. 5. What are the minimum and maximum numbers of elements in a heap of height h? 6. Determine the time complexities of the following operations performed on a heap storing n elements. (a) Searching any element. (b) Searching the largest element (i.e. the element with lowest priority). 7. Implement heapsort and animate the sorting process, for example as shown in the snapshots in “Algorithm animation”. Compare the number of comparisons and exchange operations needed by heapsort and other sorting algorithms (e.g. quicksort) for different input configurations.",algorithms and data structures.pdf "sorting algorithms (e.g. quicksort) for different input configurations. 8. What is the running time of heapsort on an array h[1 .. n] that is already sorted in increasing order? What about decreasing order? 9. In a k-ary heap, nodes have k children instead of 2 children. (a) How would you represent a k-ary heap in an array? (b) What is the height of a k-ary heap in terms of the number of elements n and k? (c) Implement a priority queue by a k-ary heap. What are the time complexities of the operations 'insert' and 'delete' in terms of n and k? Algorithms and Data Structures 210 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 21. List structures Learning objectives: • static vs dynamic data structures • linear, circular and two-way lists • fifo queue implemented as a linear list • breadth-first and depth-first tree traversal • traversing a binary tree without any auxiliary memory: triple tree traversal algorithm • dictionary implemented as a binary search tree • Balanced trees guarantee that dictionary operations can be performed in logarithmic time • height-balanced trees • multiway trees Lists, memory management, pointer variables The spectrum of data structures ranges from static objects, such as a table of constants, to dynamic structures, such as lists. A list is designed so that not only the data values stored in it, but its size and shape can change at run time, due to insertions, deletions, or rearrangement of data elements. Most of the data structures discussed so far",algorithms and data structures.pdf "time, due to insertions, deletions, or rearrangement of data elements. Most of the data structures discussed so far can change their size and shape to a limited extent. A circular buffer, for example, supports insertion at one end and deletion at the other, and can grow to a predeclared maximal size. A heap supports deletion at one end and insertion anywhere into an array. In a list, any local change can be done with an effort that is independent of the size of the list - provided that we know the memory locations of the data elements involved. The key to meeting this requirement is the idea of abandoning memory allocation in large contiguous chunks, and instead allocating it dynamically in the smallest chunk that will hold a given object. Because data elements are stored randomly in memory, not contiguously, an insertion or deletion into a list does not propagate a ripple effect that shifts other",algorithms and data structures.pdf "memory, not contiguously, an insertion or deletion into a list does not propagate a ripple effect that shifts other elements around. An element inserted is allocated anywhere in memory where there is space and tied to other elements by pointers (i.e. addresses of the memory locations where these elements happen to be stored at the moment). An element deleted does not leave a gap that needs to be filled as it would in an array. Instead, it leaves some free space that can be reclaimed later by a memory management process. The element deleted is likely to break some chains that tie other elements together; if so, the broken chains are relinked according to rules specific to the type of list used. Pointers are the language feature used in modern programming languages to capture the equivalent of a memory address. A pointer value is essentially an address, and a pointer variable ranges over addresses. A pointer,",algorithms and data structures.pdf "memory address. A pointer value is essentially an address, and a pointer variable ranges over addresses. A pointer, however, may contain more information than merely an address. In Pascal and other strongly typed languages, for example, a pointer also references the type definition of the objects it can point to - a feature that enhances the compiler's ability to check for consistent use of pointer variables. Let us illustrate these concepts with a simple example: a one-way linear list is a sequence of cells each of which (except the last) points to its successor. The first cell is the head of the list, the last cell is the tail. Since the Algorithms and Data Structures 211 A Global Text",algorithms and data structures.pdf "21. List structures tail has no successor, its pointer is assigned a predefined value 'nil', which differs from the address of any cell. Access to the list is provided by an external pointer 'head'. If the list is empty, 'head' has the value 'nil'. A cell stores an element xi and a pointer to the successor cell (Exhibit 21.1): type cptr = ^cell; cell = record e: elt; next: cptr end; Exhibit 21.1: A one-way linear list. Local operations, such as insertion or deletion at a position given by a pointer p, are efficient. For example, the following statements insert a new cell containing an element y as successor of a cell being pointed at by p ( Exhibit 21.2): new(q); q^.e := y; q^.next := p^.next; p^.next := q; Exhibit 21.2: Insertion as a local operation. The successor of the cell pointed at by p is deleted by a single assignment statement (Exhibit 21.3): p^.next := p^.next^.next; Exhibit 21.3: Deletion as a local operation.",algorithms and data structures.pdf "p^.next := p^.next^.next; Exhibit 21.3: Deletion as a local operation. An insertion or deletion at the head or tail of this list is a special case to be handled separately. To support insertion at the tail, an additional pointer variable 'tail' may be set to point to the tail element, if it exists. A one-way linear list sometimes is handier if the tail points back to the head, making it a circular list. In a circular list, the head and tail cells are replaced by a single entry cell, and any cell can be reached from any other without having to start at the external pointer 'entry' (Exhibit 21.4). Exhibit 21.4: A circular list combines head and tail into a single entry point 212",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License In a two-way (or doubly linked ) list each cell contains two pointers, one to its successor, the other to its predecessor. The list can be traversed in both directions. Exhibit 21.5 shows a circular two-way list. Exhibit 21.5: A circular two-way or doubly-linked list Exercise: traversal of a singly linked list in both directions Write a recursive procedure traverse(p: cptr); to traverse a singly linked list from the head to the tail and back again. At each visit of a node, call the procedure visit(p: cptr); Solve the same problem iteratively without using any additional storage beyond a few local pointers. Your traversal procedure may modify the structure of the list temporarily. Solution (a) procedure traverse(p: cptr); begin if p ≠ nil then { visit(p); traverse(p^.next); visit(p) } end; The initial call of this procedure is traverse(head); (b) procedure traverse(p: cptr);",algorithms and data structures.pdf "visit(p) } end; The initial call of this procedure is traverse(head); (b) procedure traverse(p: cptr); var o, q: cptr; i: integer; begin for i := 1 to 2 do { forward and back again } begin o := nil; while p ≠ nil do begin visit(p); q := p^.next; p^.next := o; o := p; p := q { the fork advances } end; p := o end end; Traversal becomes simpler if we let the 'next' pointer of the tail cell point to this cell itself: procedure traverse(p: cptr); var o, q: cptr; begin o := nil; while p ≠ nil do begin visit(p); q := p^.next; p^.next := o; o := p; p := q { the fork advances } end end; Algorithms and Data Structures 213 A Global Text",algorithms and data structures.pdf "21. List structures The fifo queue implemented as a one-way list It is natural to implement a fifo queue as a one-way linear list, where each element points to the next one ""in line"". The operation 'dequeue' occurs at the pointer 'head', and 'enqueue' is made fast by having an external pointer 'tail' point to the last element in the queue. A crafty implementation of this data structure involves an empty cell, called a sentinel, at the tail of the list. Its purpose is to make the list-handling procedures simpler and faster by making the empty queue look more like all other states of the queue. More precisely, when the queue is empty, the external pointers 'head' and 'tail' both point to the sentinel rather than having the value 'nil'. The sentinel allows insertion into the empty queue, and deletion that results in an empty queue, to be handled by the same code that",algorithms and data structures.pdf "insertion into the empty queue, and deletion that results in an empty queue, to be handled by the same code that handles the general case of 'enqueue' and 'dequeue'. The reader should verify our claim that a sentinel simplifies the code by programming the plausible, but less efficient, procedures which assume that an empty queue is represented by head = tail = nil. The queue is empty if and only if 'head' and 'tail' both point to the sentinel (i.e. if head = tail). An 'enqueue' operation is performed by inserting the new element into the sentinel cell and then creating a new sentinel. type cptr = ^cell; cell = record e: elt; next: cptr end; fifoqueue = record head, tail: cptr end; procedure create(var f: fifoqueue); begin new(f.head); f.tail := f.head end; function empty(f: fifoqueue): boolean; begin return(f.head = f.tail) end; procedure enqueue(var f: fifoqueue; x: elt); begin f.tail^.e := x; new(f.tail^.next); f.tail := f.tail^.next end;",algorithms and data structures.pdf "procedure enqueue(var f: fifoqueue; x: elt); begin f.tail^.e := x; new(f.tail^.next); f.tail := f.tail^.next end; function front(f: fifoqueue): elt; { not to be called if the queue is empty } begin return(f.head^.e) end; procedure dequeue(var f: fifoqueue); { not to be called if the queue is empty } begin f.head := f.head^.next end; Tree traversal When we speak of trees in computer science, we usually mean rooted, ordered trees: they have a distinguished node called the root, and the subtrees of any node are ordered. Rooted, ordered trees are best defined recursively: a tree T is either empty, or it is a tuple (N, T1, … , Tk), where N is the root of the tree, and T 1, … , Tk is a sequence of trees. Binary trees are the special case k = 2. Trees are typically used to organize data or activities in a hierarchy: a top-level data set or activity is composed of",algorithms and data structures.pdf "Trees are typically used to organize data or activities in a hierarchy: a top-level data set or activity is composed of a next level of data or activities, and so on. When one wishes to gather or survey all of the data or activities, it is necessary to traverse the tree, visiting (i.e. processing) the nodes in some systematic order. The visit at each node might be as simple as printing its contents or as complicated as computing a function that depends on all nodes in the tree. There are two major ways to traverse trees: breadth first and depth first. Breadth-first traversal visits the nodes level by level. This is useful in heuristic search, where a node represents a partial solution to a problem, with deeper levels representing more complete solutions. Before pursuing any one solution to a great depth, it may be advantageous to assess all the partial solutions at the present 214",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License level, in order to pursue the most promising one. We do not discuss breadth-first traversal further, we merely suggest the following: Exercise: breadth-first traversal Decide on a representation for trees where each node may have a variable number of children. Write a procedure for breadth-first traversal of such a tree. Hint: use a fifo queue to organize the traversal. The node to be visited is removed from the head of the queue, and its children are enqueued, in order, at the tail end. Depth-first traversal always moves to the first unvisited node at the next deeper level, if there is one. It turns out that depth-first better fits the recursive definition of trees than breadth-first does and orders nodes in ways that are more often useful. We discuss depth-first for binary trees and leave the generalization to other trees to the",algorithms and data structures.pdf "are more often useful. We discuss depth-first for binary trees and leave the generalization to other trees to the reader. Depth-first can generate three basic orders for traversing a binary tree: preorder, inorder, and postorder, defined recursively as: preorder Visit root, traverse left subtree, traverse right subtree. Inorder Traverse left subtree, visit root, traverse right subtree. postorderTraverse left subtree, traverse right subtree, visit root. For the tree in Exhibit 21.6we obtain the orders shown. Exhibit 21.6: Standard orders defined on a binary tree An arithmetic expression can be represented as a binary tree by assigning the operands to the leaves and the operators to the internal nodes. The basic traversal orders correspond to different notations for representing arithmetic expressions. By traversing the expression tree ( Exhibit 21.7 ) in preorder, inorder, or postorder, we obtain the prefix, infix, or suffix notation, respectively.",algorithms and data structures.pdf "obtain the prefix, infix, or suffix notation, respectively. Exhibit 21.7: Standard traversal orders correspond to different notations for arithmetic expressions A binary tree can be implemented as a list structure in many ways. The most common way uses an external pointer 'root' to access the root of the tree and represents each node by a cell that contains a field for an element to be stored, a pointer to the root of the left subtree, and a pointer to the root of the right subtree ( Exhibit 21.8). An empty left or right subtree may be represented by the pointer value 'nil', or by pointing at a sentinel, or, as we shall see, by a pointer that points to the node itself. type nptr = ^node; node = record e: elt; L, R: nptr end; var root: nptr; Algorithms and Data Structures 215 A Global Text",algorithms and data structures.pdf "21. List structures Exhibit 21.8: Straightforward implementation of a binary tree The following procedure 'traverse' implements any or all of the three orders preorder, inorder, and postorder, depending on how the procedures 'visit1', 'visit2', and 'visit3' process the data in the node referenced by the pointer p. The root of the subtree to be traversed is passed through the formal parameter p. In the simplest case, a visit does nothing or simply prints the contents of the node. procedure traverse(p: nptr); begin if p ≠ nil then begin visit1(p); { preorder } traverse(p^.L); visit2(p); { inorder } traverse(p^.R); visit3(p) { postorder } end end; Traversing a tree involves both advancing from the root toward the leaves, and backing up from the leaves toward the root. Recursive invocations of the procedure 'traverse' build up a stack whose entries contain references",algorithms and data structures.pdf "toward the root. Recursive invocations of the procedure 'traverse' build up a stack whose entries contain references to the nodes for which 'traverse' has been called. These entries provide a means of returning to a node after the traversal of one of its subtrees has been finished. The bookkeeping done by a stack or equivalent auxiliary structure can be avoided if the tree to be traversed may be modified temporarily. The following triple-tree traversal algorithm provides an elegant and efficient way of traversing a binary tree without using any auxiliary memory (i.e. no stack is used and it is not assumed that a node contains a pointer to its parent node). The data structure is modified temporarily to retain the information needed to find the way back up the tree and to restore each subtree to its initial condition after traversal. The triple-tree traversal algorithm",algorithms and data structures.pdf "the tree and to restore each subtree to its initial condition after traversal. The triple-tree traversal algorithm assumes that an empty subtree is encoded not by a 'nil' pointer, but rather by an L (left) or R (right) pointer that points to the node itself, as shown in Exhibit 21.9. 216",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 21.9: Coding of a leaf used in procedure TTT procedure TTT; var o, p, q: nptr; begin o := nil; p:= root; while p ≠ nil do begin visit(p); q := p^.L; p^.L := p^.R; { rotate left pointer } p^.R := o; { rotate right pointer } o := p; p := q end end; In this procedure the pointers p (""present"") and o (""old"") serve as a two-pronged fork. The tree is being traversed by the pointer p and the companion pointer o, which always lags one step behind p. The two pointers form a two-pronged fork that runs around the tree, starting in the initial condition with p pointing to the root of the tree, and o = nil. An auxiliary pointer q is needed temporarily to advance the fork. The while loop in 'TTT' is executed as long as p points to a node in the tree and is terminated when p assumes the value 'nil'. The initial value",algorithms and data structures.pdf "executed as long as p points to a node in the tree and is terminated when p assumes the value 'nil'. The initial value of the o pointer gets saved as a temporary value. First it is assigned to the R pointer of the root, later to the L pointer. Finally, it gets assigned to p, the fork exits from the root of the tree, and the traversal of the tree is complete. The correctness of this algorithm is proved by induction on the number of nodes in the tree. Induction hypothesis H: if at the beginning of an iteration of the while loop, the fork pointer p points to the root of a subtree with n > 0 nodes, and o has a value x that is different from any pointer value inside this subtree, then after 3 · n iterations the subtree will have been traversed in triple order (visiting each node exactly three times), all tree pointers in the subtree will have been restored to their original value, and the fork pointers will have been",algorithms and data structures.pdf "tree pointers in the subtree will have been restored to their original value, and the fork pointers will have been reversed (i.e. p has the value x and o points to the root of the subtree). Base of induction: H is true for n = 1. Proof: The smallest tree we consider has exactly one node, the root alone. Before the while loop is executed for this subtree, the fork and the tree are in the initial state shown in Exhibit 21.10. Exhibit 21.11 shows the state of the fork and the tree after each iteration of the while loop. The node is visited in each iteration. Exhibit 21.10 : Initial configuration for traversing a tree consisting of a single node Algorithms and Data Structures 217 A Global Text",algorithms and data structures.pdf "21. List structures Exhibit 21.11: Tracing procedure TTT while traversing the smallest tree Induction step: If H is true for all n, 0 < n ≤ k, H is also true for k + 1. Proof: Consider a tree T with k + 1 nodes. T consists of a root and k nodes shared among the left and right subtrees of the root. Each of these subtrees has ≤ k nodes, so we apply the induction hypothesis to each of them. The following is a highly compressed account of the proof of the induction step, illustrated by Exhibit 21.12 . Consider the tree with k + 1 nodes shown in state 1. The root is a node with three fields; the left and right subtrees are shown as triangles. The figure shows the typical case when both subtrees are nonempty. If one of the two subtrees is empty, the corresponding pointer points back to the root; these two cases can be handled similarly to the case n = 1. The fork starts out with p pointing at the root and o pointing at anything outside the subtree being",algorithms and data structures.pdf "case n = 1. The fork starts out with p pointing at the root and o pointing at anything outside the subtree being traversed. We want to show that the initial state 1 is transformed in 3 · (k + 1) iterations into the final state 6. In the final state the subtrees are shaded to indicate that they have been correctly traversed; the fork has exited from the root, with p and o having exchanged values. To show that the algorithm correctly transforms state 1 into state 6, we consider the intermediate states 2 to 5, and what happens in each transition. 1 → 2 One iteration through the while loop advances the fork into the left subtree and rotates the pointers of the root. 2 → 3 H applied to the left subtree of the root says that this subtree will be correctly traversed, and the fork will exit from the subtree with pointers reversed. 3 → 4 This is the second iteration through the while loop that visits the root. The fork advances into the right",algorithms and data structures.pdf "3 → 4 This is the second iteration through the while loop that visits the root. The fork advances into the right subtree, and the pointers of the root rotate a second time. 4 → 5 H applied to the right subtree of the root says that this subtree will be correctly traversed, and the fork will exit from the subtree with pointers reversed. 5→ 6 This is the third iteration through the while loop that visits the root. The fork moves out of the tree being traversed; the pointers of the root rotate a third time and thereby assume their original values. 218",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 21.12: Trace of procedure TTT, invoking the induction hypothesis Exercise: binary trees Consider a binary tree declared as follows: type nptr = ^node; node = record L, R: nptr end; var root: nptr; (a) If a node has no left or right subtree, the corresponding pointer has the value 'nil'. Prove that a binary tree with n nodes, n > 0, has n + 1 'nil' pointers. Algorithms and Data Structures 219 A Global Text",algorithms and data structures.pdf "21. List structures (b) Write a function nodes(…): integer; that returns the number of nodes, and a function depth(…): integer; that returns the depth of a binary tree. The depth of the root is defined to be 0; the depth of any other node is the depth of its parent increased by 1. The depth of the tree is the maximum depth of its nodes. Solution (a) Each node contains two pointers, for a total of 2 · n pointers in the tree. There is exactly one pointer that points to each of n – 1 nodes, none points to the root. Thus 2 · n – (n – 1) = n + 1 pointers are 'nil'. This can also be proved by induction on the number of nodes in the tree. (b) function nodes(p: nptr): integer; begin if p = nil then return(0) else return(nodes(p^.L) + nodes(p^.R) + 1) end; function depth(p: nptr): integer; begin if p = nil then return (–1) else return(1 + max(depth(p^.L), depth(p^.R))) end; where 'max' is function max(a, b: integer): integer; begin if a > b then return(a) else return(b) end;",algorithms and data structures.pdf "end; where 'max' is function max(a, b: integer): integer; begin if a > b then return(a) else return(b) end; Exercise: list copying Effective memory management sometimes makes it desirable or necessary to copy a list. For example, performance may improve drastically if a list spread over several pages can be compressed into a single page. List copying involves a traversal of the original concurrently with a traversal of the copy, as the latter is being built up. (a) Consider binary trees built from nodes of type 'node' and pointers of type 'nptr'. A tree is accessed through a pointer to the root, which is 'nil' for an empty tree type nptr = ^ node; node = record e: elt; L, R: nptr end; Write a recursive function cptree(p: nptr): nptr; to copy a tree given by a pointer p to its root, and return a pointer to the root of the copy. (b) Consider arbitrary graphs built from nodes of a type similar to the nodes in (a), but they have an additional",algorithms and data structures.pdf "(b) Consider arbitrary graphs built from nodes of a type similar to the nodes in (a), but they have an additional pointer field cn, intended to point to the copy of a node: type node = record e: elt; L, R: nptr; cn: nptr end; A graph is accessed through a pointer to a node called the origin, and we are only concerned with nodes that can be reached from the origin; this access pointer is 'nil' for an empty graph. Write a recursive function cpgraph(p: nptr): nptr; 220",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License to copy a graph given by a pointer p to its origin, and return a pointer to the origin of the copy. Use the field cn, assuming that its initial value is 'nil' in every node of the original graph; set it to 'nil' in every node of the copy. Solution (a) function cptree(p: nptr): nptr; var cp: nptr; begin if p = nil then return(nil) else begin new(cp); cp^.e := p^.e; cp^.L := cptree(p^.L); cp^.R := cptree(p^.R); return(cp) end end; (b) function cpgraph(p: nptr): nptr; var cp: nptr; begin if p = nil then return(nil) elsif p^.cn ≠ nil then { node has already been copied } return(p^.cn) else begin new(cp); p^.cn := cp; cp^.cn := nil; cp^.e := p^.e; cp^.L := cpgraph(p^.L); cp^.R := cpgraph(p^.R); return(cp) end end; Exercise: list copying with constant auxiliary memory Consider binary trees as in part (a) of the preceding exercise. Memory for the stack implied by the recursion can",algorithms and data structures.pdf "Consider binary trees as in part (a) of the preceding exercise. Memory for the stack implied by the recursion can be saved by writing an iterative tree copying procedure that uses only a constant amount of auxiliary memory. This requires a trick, as any depth-first traversal must be able to back up from the leaves toward the root. In the triple- tree traversal procedure, the return path is temporarily encoded in the tree being traversed. This idea can again be used here, but there is a simpler solution: The return path is temporarily encoded in the R-fields of the copy; the L- fields of certain nodes of the copy point back to the corresponding node in the original. Work out the details of a tree-copying procedure that works with O(1) auxiliary memory. Exercise: traversing a directed acyclic graph A directed graph consists of nodes and directed arcs, where each arc leads from one node to another. A directed",algorithms and data structures.pdf "A directed graph consists of nodes and directed arcs, where each arc leads from one node to another. A directed graph is acyclic if the arcs form no cycles. One way to ensure that a graph is acyclic is to label nodes with distinct integers and to draw each arc from a lower number to a higher number. Consider a binary directed acyclic graph, where each node has two pointer fields, L and R, to represent at most two arcs that lead out of that node. An example is shown in Exhibit 21.13. Exhibit 21.13: A rooted acyclic graph. Algorithms and Data Structures 221 A Global Text",algorithms and data structures.pdf "21. List structures (a) Write a program to visit every node in a directed acyclic graph reachable from a pointer called 'root'. You are free to execute procedure 'visit' for each node as often as you like. (b) Write a program similar to (a) where you are required to execute procedure 'visit' exactly once per node. Hint: Nodes may need to have additional fields. Exercise: counting nodes on a square grid Consider a network superimposed on a square grid: each node is connected to at most four neighbors in the directions east, north, west, south (Exhibit 21.14): type nptr = ^node; node = record E, N, W, S: nptr; status: boolean end; var origin: nptr; Exhibit 21.14: A graph embedded in a square grid. A 'nil' pointer indicates the absence of a neighbor. Neighboring nodes are doubly linked: if a pointer in node p points to node q, the reverse pointer of q points to p; (e.g., p^.W = q and q^.E = p). The pointer 'origin' is 'nil' or",algorithms and data structures.pdf "points to node q, the reverse pointer of q points to p; (e.g., p^.W = q and q^.E = p). The pointer 'origin' is 'nil' or points to a node. Consider the problem of counting the number of nodes that can be reached from 'origin'. Assume that the status field of all nodes is initially set to false. How do you use this field? Write a function nn(p: nptr): integer; to count the number of nodes. Solution function nn(p: nptr): integer; begin if p = nil cor p^.status then return(0) else begin p^.status:= true; return(1 + nn(p^.E) + nn(p^.N) + nn(p^.W) + nn(p^.S)) end end; Exercise: counting nodes in an arbitrary network We generalize the problem above to arbitrary directed graphs, such as that of Exhibit 21.15, where each node may have any number of neighbors. This graph is represented by a data structure defined by Exhibit 21.16 and the type definitions below. Each node is linked to an arbitrary number of other nodes. Exhibit 21.15: An arbitrary (cyclic) directed graph. 222",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 21.16: A possible implementation as a list structure. type nptr = ^node; cptr = ^cell; node = record status: boolean; np: nptr; cp: cptr end; cell = record np: nptr; cp: cptr end; var origin: nptr; The pointer 'origin' has the value 'nil' or points to a node. Consider the problem of counting the number n of nodes that can be reached from 'origin'. The status field of all nodes is initially set to false. How do you use it? Write a function nn(p: nptr): integer; that returns n. Binary search trees A binary search tree is a binary tree T where each node N stores a data element e(N) from a domain X on which a total order ≤ is defined, subject to the following order condition: For every node N in T, all elements in the left subtree L(N) of N are < e(N), and all elements in the right subtree R(N) of N are > e(N). Let x1, 2, … , x n be n elements drawn from the domain X.",algorithms and data structures.pdf "elements drawn from the domain X. Definition: A binary search tree for x 1, x2, … , x n is a binary tree T with n nodes and a one-to-one mapping between the n given elements and the n nodes, such that ∀ N in T ∀ N' ∈ L(N) ∀ N"" ∈ R(N): e(N') < e(N) < e(N"") Exercise Show that the following statement is equivalent to this order condition: The inorder traversal of the nodes of T coincides with the natural order < of the elements assigned to the nodes. Remark: The order condition can be relaxed to e(N') ≤ e(N) < e(N"") to accommodate multiple occurrences of the same value, with only minor modifications to the statements and algorithms presented in this section. For simplicity's sake we assume that all values in a tree are distinct. The order condition permits binary search and thus guarantees a worst-case search time O(h) for a tree of height h. Trees that are well balanced (in an intuitive sense; see the next section for a definition), that have not",algorithms and data structures.pdf "h. Trees that are well balanced (in an intuitive sense; see the next section for a definition), that have not degenerated into linear lists, have a height h = O(log n) and thus support search in logarithmic time. Algorithms and Data Structures 223 A Global Text",algorithms and data structures.pdf "21. List structures Basic operations on binary search trees are most easily implemented as recursive procedures. Consider a tree represented as in the preceding section, with empty subtrees denoted by 'nil'. The following function 'find' searches for an element x in a subtree pointed to by p. It returns a pointer to a node containing x if the search is successful, and 'nil' if it is not. function find(x: elt; p: nptr): nptr; begin if p = nil then return(nil) elsif x < p^.e then return(find(x, p^.L)) elsif x > p^.e then return(find(x, p^.R)) else { x = p^.e } return(p) end; The following procedure 'insert' leaves the tree alone if the element x to be inserted is already stored in the tree. The parameter p initially points to the root of the subtree into which x is to be inserted. procedure insert(x: elt; var p: nptr); begin if p = nil then { new(p); p^.e := x; p^.L := nil; p^.R := nil } elsif x < p^.e then insert(x, p^.L) elsif x > p^.e then insert(x, p^.R)",algorithms and data structures.pdf "if p = nil then { new(p); p^.e := x; p^.L := nil; p^.R := nil } elsif x < p^.e then insert(x, p^.L) elsif x > p^.e then insert(x, p^.R) end; Initial call: insert(x, root); To delete an element x, we first have to find the node N that stores x. If this node is a leaf or semileaf (a node with only one subtree), it is easily deleted; but if it has two subtrees, it is more efficient to leave this node in place and to replace its element x by an element found in a leaf or semileaf node, and delete the latter ( Exhibit 21.17). Thus we distinguish three cases: 1. If N has no child, remove N. 2. If N has exactly one child, replace N by this child node. 3. If N has two children, replace x by the largest element y in the left subtree, or by the smallest element z in the right subtree of N. Either of these elements is stored in a node with at most one child, which is removed as in case (1) or (2). 224",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 21.17: Element x is deleted while preserving its node N. Node N is filled with a new value y, whose old node is easier to delete. A sentinel is again the key to an elegant iterative implementation of binary search trees. In a node with no left or right child, the corresponding pointer points to the sentinel. This sentinel is a node that contains no element; its left pointer points to the root and its right pointer points to itself. The root, if it exists, can only be accessed through the left pointer of the sentinel. The empty tree is represented by the sentinel alone ( Exhibit 21.18 ). A typical tree is shown in Exhibit 21.19. Exhibit 21.18: The empty binary tree is represented by the sentinel which points to itself. Exhibit 21.19: A binary tree implemented as a list structure with sentinel.",algorithms and data structures.pdf "Exhibit 21.19: A binary tree implemented as a list structure with sentinel. The following implementation of a dictionary as a binary search tree uses a sentinel accessed via the variable d: type nptr = ^node; node = record e: elt; L, R: nptr end; dictionary = nptr; procedure create(var d: dictionary); begin {create sentinel } new(d); d^.L := d; d^.R := d end; Algorithms and Data Structures 225 A Global Text",algorithms and data structures.pdf "21. List structures function member(d: dictionary; x: elt): boolean; var p: nptr; begin d^.e := x; { initialize element in sentinel } p := d^.L; { point to root, if it exists } while x ≠ p^.e do if x < p^.e then p := p^.L else { x > p^.e } p := p^.R; return(p ≠ d) end; Procedure 'find' searches for x. If found, p points to the node containing x, and q to its parent. If not found, p points to the sentinel and q to the parent-to-be of a new node into which x will be inserted. procedure find(d: dictionary; x: elt; var p, q: nptr); begin d^.e := x; p := d^.L; q := d; while x ≠ p^.e do begin q := p; if x < p^.e then p := p^.L else { x > p^.e } p := p^.R end end; procedure insert(var d: dictionary; x: elt); var p, q: nptr; begin find(d, x, p, q); if p = d then begin { x is not yet in the tree } new(p); p^.e := x; p^.L := d; p^.R := d; if x ≤ q^.e then q^.L := p else { x > q^.e } q^.R := p end end; procedure delete(var d: dictionary; x: elt);",algorithms and data structures.pdf "if x ≤ q^.e then q^.L := p else { x > q^.e } q^.R := p end end; procedure delete(var d: dictionary; x: elt); var p, q, t: nptr; begin find(d, x, p, q); if p ≠ d then { x has been found } if (p^.L ≠ d) and (p^.R ≠ d) then begin { p has left and right children; find largest element in left subtree } t := p^.L; q:= p; while t^.R ≠ d do { q := t; t := t^.R }; if t^.e < q^.e then q^.L := t^.L else { t^.e > q^.e } q^.R := t^.L p^.e := t^.e; end else begin { p has at most one child } ifp^.L ≠ d then{ left child only } p := p^.L elsif p^.R ≠ d then{ right child only } p := p^.R else { p has no children }p := d; if x ≤ q^.e then q^.L := p else { x > q^.e } q^.R := p end end; In the best case of a completely balanced binary search tree for n elements, all leaves are on levels [log2 n] or [log2 n]– 1, and the search tree has the height [log2 n]. The cost for performing the 'member', 'insert', or 'delete'",algorithms and data structures.pdf "[log2 n]– 1, and the search tree has the height [log2 n]. The cost for performing the 'member', 'insert', or 'delete' operation is bounded by the longest path from the root to a leaf (i.e. the height of the tree) and is therefore O(log n). 226",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Without any further provisions, a binary search tree can degenerate into a linear list in the worst case. Then the cost for each of the operations would be O(n). What is the expected average cost for the search operation in a randomly generated binary search tree? ""Randomly generated"" means that each permutation of the n elements to be stored in the binary search tree has the same probability of being chosen as the input sequence. Furthermore, we assume that the tree is generated by insertions only. Therefore, each of the n elements is equally likely to be chosen as the root of the tree. Le t pn be the expected path length of a randomly generated binary search tree storing n elements. Then As shown in chapter 16 in the section “Recurrence relations”, this recurrence relation has the solution",algorithms and data structures.pdf "As shown in chapter 16 in the section “Recurrence relations”, this recurrence relation has the solution Since the average search time in randomly generated binary search trees, measured in terms of the number of nodes visited, is p n / n and ln 4 ≈ 1.386, it follows that the cost is O(log n) and therefore only about 40 per cent higher than in the case of completely balanced binary search trees. Balanced trees: general definition If insertions and deletions occurred at random, and the assumption of the preceding section was realistic, we could let search trees grow and shrink as they please, incurring a modest increase of 40 per cent in search time over completely balanced trees. But real data are not random: they are typically clustered, and long runs of monotonically increasing or decreasing elements occur, often as the result of a previous processing step. Unfortunately, such deviation from randomness degrades the performance of search trees.",algorithms and data structures.pdf "Unfortunately, such deviation from randomness degrades the performance of search trees. To prevent search trees from degenerating into linear lists, we can monitor their shape and restructure them into a more balanced shape whenever they have become too skewed. Several classes of balanced search trees guarantee that each operation 'member', 'insert', and 'delete' can be performed in time O(log n) in the worst case. Since the work to be done depends directly on the height of the tree, such a class B of search trees must satisfy the following two conditions (hT is the height of a tree T, nT is the number of nodes in T): Balance condition: ∃c > 0 ∀ T ∀ B: hT ≤ c · log2 nT Rebalancing condition: If an 'insert' or 'delete' operation, performed on a tree T ∈ B, yields a tree T' ∉ B, it must be possible to rebalance T' in time O(log n) to yield a tree T"" ∈ B. Example: almost complete trees",algorithms and data structures.pdf "must be possible to rebalance T' in time O(log n) to yield a tree T"" ∈ B. Example: almost complete trees The class of almost complete binary search trees satisfies the balance condition but not the restructuring condition. In the worst case it takes time O(n) to restructure such a binary search tree ( Exhibit 21.20), and if 'insert' and 'delete' are defined to include any rebalancing that may be necessary, these operations cannot be guaranteed to run in time O(log n). Algorithms and Data Structures 227 A Global Text",algorithms and data structures.pdf "21. List structures Exhibit 21.20: Restructuring: worst case In the next two sections we present several classes of balanced trees that meet both conditions: the height- balanced or AVL-trees (G. Adel'son-Vel'skii and E. Landis, 1962) [AL 62] and various multiway trees, such as B- trees [BM 72, Com 79] and their generalization, (a,b)-trees [Meh 84a]. AVL-trees, with their small nodes that hold a single data element, are used primarily for storing data in main memory. Multiway trees, with potentially large nodes that hold many elements, are also useful for organizing data on secondary storage devices, such as disks, that allow direct access to sizable physical data blocks. In this case, a node is typically chosen to fill a physical data block, which is read or written in one access operation. Height-balanced trees Definition: A binary tree is height-balanced if, for each node, the heights of its two subtrees differ by at most",algorithms and data structures.pdf "Height-balanced trees Definition: A binary tree is height-balanced if, for each node, the heights of its two subtrees differ by at most one. Height-balanced search trees are also called AVL-trees. Exhibit 21.21 to Exhibit 21.23 show various AVL-trees, and one that is not. Exhibit 21.21: Examples of height-balanced trees Exhibit 21.22: Example of a tree not height-balanced;the marked node violates the balance condition. A ""most-skewed"" AVL-tree Th is an AVL-tree of height h with a minimal number of nodes. Starting with T 0 and T1 shown in Exhibit 21.23, Th is obtained by attaching Th–1 and Th–2 as subtrees to a new root. 228",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 21.23: Most skewed AVL trees of heights h = 0 through h = 4 The number of nodes in a most-skewed AVL-tree of height h is given by the recurrence relation nh = nh–1 + nh–2 + 1, n0 = 1, n1 = 2. In the section on recurrence relations in the chapter entitled “The mathematics of algorithm analysis”, it has been shown that the recurrence relation mh = mh–1 + mh–2, m0 = 0, m1 = 1 has the solution Since nh = mh+3 – 1 we obtain Since it follows that and therefore nh behaves asymptotically as Algorithms and Data Structures 229 A Global Text",algorithms and data structures.pdf "21. List structures Applying the logarithm results in Therefore, the height of a worst-case AVL-tree with n nodes is about 1.4 4 · log2 n. Thus th e class of AVL-trees satisfies the balance condition, and the 'member' operation can always be performed in time O(log n). We now show that the class of AVL-trees also satisfies the rebalancing condition. Thus AVL-trees support insertion and deletion in time O(log n). Each node N of an AVL-tree has one of the balance properties / (left- leaning), \ (right-leaning), or – (horizontal), depending on the relative height of its two subtrees. Two local tree operations, rotation and double rotation, allow the restructuring of height-balanced trees that have been disturbed by an insertion or deletion. They split a tree into subtrees and rebuild it in a different way. Exhibit 21.24 shows a node, marked black, that got out of balance, and how a local transformation builds an",algorithms and data structures.pdf "Exhibit 21.24 shows a node, marked black, that got out of balance, and how a local transformation builds an equivalent tree (for the same elements, arranged in order) that is balanced. Each of these transformations has a mirror image that is not shown. The algorithms for insertion and deletion use these rebalancing operations as described below. Exhibit 21.24: Two local rebalancing operations Insertion A new element is inserted as in the case of a binary search tree. The balance condition of the new node becomes – (horizontal). Starting at the new node, we walk toward the root of the tree, passing along the message that the height of the subtree rooted at the current node has increased by one. At each node encountered along this path, an operation determined by the following rules is performed. These rules depend on the balance condition of the node before the new element was inserted, and on the direction from which the node was entered (i.e. from its left or",algorithms and data structures.pdf "before the new element was inserted, and on the direction from which the node was entered (i.e. from its left or right child). 230",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Rule I1: If the current node has balance condition –, change it to / or \ depending on whether we entered from the node's left or from its right child. If the current node is the root, terminate; if not, continue to follow the path upward. Rule I2: If the current node has balance condition / or \ and is entered from the subtree that was previously shorter, change the balance condition to—and terminate (the height of the subtree rooted at the current node has not changed). Rule I3: If the current node has balance condition / or \ and is entered from the subtree that was previously taller, the balance condition of the current node is violated and gets restored as follows: (a) If the last two steps were in the same direction (both from left children, or both from right children), an appropriate rotation restores all balances and the procedure terminates.",algorithms and data structures.pdf "appropriate rotation restores all balances and the procedure terminates. (b) If the last two steps were in opposite directions (one from a left child, the other from a right child), an appropriate double rotation restores all balances and the procedure terminates. The initial insertion travels along a path from the root to a leaf, and the rebalancing process travels back up along the same path. Thus the cost of an insertion in an AVL-tree is O(h), or O(log n) in the worst case. Not ice that an insertion calls for at most one rotation or double rotation, as shown in the example in Exhibit 21.25. Example Insert 1, 2, 5, 3, 4, 6, 7 into an initially empty AVL-tree ( Exhibit 21.25). The balance condition of a node is shown below it. Boldfaced nodes violate the balance condition. Algorithms and Data Structures 231 A Global Text",algorithms and data structures.pdf "21. List structures Exhibit 21.25: Trace of consecutive insertions and the rebalancings they trigger Deletion An element is deleted as in the case of a binary search tree. Starting at the parent of the deleted node, walk towards the root, passing along the message that the height of the subtree rooted at the current node has decreased by one. At each node encountered, perform an operation according to the following rules. These rules depend on the balance condition of the node before the deletion and on the direction from which the current node and its child were entered. Rule D1: If the current node has balance condition –, change it to \ or / depending on whether we entered from the node's left or from its right child, and terminate (the height of the subtree rooted at the current node has not changed). Rule D2: If the current node has balance condition / or \ and is entered from the subtree that was previously",algorithms and data structures.pdf "changed). Rule D2: If the current node has balance condition / or \ and is entered from the subtree that was previously taller, change the balance condition to – and continue upward, passing along the message that the subtree rooted at the current node has been shortened. Rule D3: If the current no de has balance condition / or \ and is entered from the subtree that was previously shorter, the balance condition is violated at the current node. We distinguish three subcases according to the 232",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License balance condition of the other child of the current node (consider also the mirror images of the following illustrations): (a) X Y Z a b X Y Z b a rotation An appropriate rotation restores the balance of the current node without changing the height of the subtree rooted at this node. Terminate. (b) X Y Z b a X Y Z a b rotation A rotation restores the balance of the current node. Continue upward, passing along the message that the subtree rooted at the current node has been shortened. (c) double rotation W a b c a b c X Y Z W X Y Z A double rotation restores the balance of the current node. Continue upward, passing along the message that the subtree rooted at the current node has been shortened. Similar transformations apply if either X or Y, but not both, are one level shorter than shown in this figure. If so, the balance conditions of some nodes differ from those",algorithms and data structures.pdf "both, are one level shorter than shown in this figure. If so, the balance conditions of some nodes differ from those shown, but this has no influence on the total height of the subtree. In contrast to insertion, deletion may require more than one rotation or double rotation to restore all balances. Since the cost of a rotation or double rotation is constant, the worst-case cost for rebalancing the tree depends only on the height of the tree, and thus the cost of a deletion in an AVL-tree is O(log n) in the worst case. Multiway trees Nodes in a multiway tree may have a variable number of children. As we are interested in balanced trees, we add two restrictions. First, we insist that all leaves (the nodes without children) occur at the same depth. Second, we constrain the number of children of all internal nodes by a lower bound a and an upper bound b. Many varieties of",algorithms and data structures.pdf "constrain the number of children of all internal nodes by a lower bound a and an upper bound b. Many varieties of multiway trees are known; they differ in details, but all are based on similar ideas. For example, (2,3)-trees are defined by the requirement that all internal nodes have either two or three children. We generalize this concept and discuss (a,b)-trees. Definition: Consider a domain X on which a total order ≤ is defined. Let a and b be integers with 2 ≤ a and 2 · a – 1 ≤ b. Let c(N) denote the number of children of node N. An (a,b)-tree is an ordered tree with the following properties: Algorithms and Data Structures 233 A Global Text",algorithms and data structures.pdf "21. List structures • All leaves are at the same level • 2 ≤ c(root) ≤ b • For all internal nodes N except the root, a ≤ c(N) ≤ b A node with k children contains k – 1 elements x 1 < x2 < … < x k–1 drawn from X; the subtrees corresponding to the k children are denoted by T 1, T2, … , T k. An (a,b)-tree supports ""c(N) search"" in the same way that a binary tree supports binary search, thanks to the following order condition: • y ≤ xi for all elements y stored in subtrees T1, … , Ti • xi < z for all elements z stored in subtrees Ti+1, … , Tk Definition: (a,b)-trees with b = 2 · a – 1 are known as B-trees [BM 72, Com 79]. The algorithms we discuss operate on internal nodes, shown in white in Exhibit 21.26 , and ignore the leaves, shown in black. For the purpose of understanding search and update algorithms, leaves can be considered fictitious entities used only for counting. In practice, however, things are different. The internal nodes merely constitute a",algorithms and data structures.pdf "entities used only for counting. In practice, however, things are different. The internal nodes merely constitute a directory to a file that is stored in the leaves. A leaf is typically a physical storage unit, such as a disk block, that holds all the records whose key values lie between two (adjacent) elements stored in internal nodes. Exhibit 21.26: Example of a (3,5)-tree The number n of elements stored in the internal nodes of an (a,b)-tree of height h is bounded by and thus this shows that the class of (a,b)-trees satisfies the balance condition h = O(log n). We show that this class also meets the rebalancing condition, namely, that (a,b)-trees support insertion and deletion in time O(log n). Insertion Insertion of a new element x begins with a search for x that terminates unsuccessfully at a leaf. Let N be the parent node of this leaf. If N contained fewer than b – 1 elements before the insertion, insert x into N and",algorithms and data structures.pdf "parent node of this leaf. If N contained fewer than b – 1 elements before the insertion, insert x into N and terminate. If N was full, we imagine b elements temporarily squeezed into the overflowing node N. Let m be the median of these b elements, and use m to split N into two: a left node N L populated by the (b – 1) / 2 elements smaller than m, and a right node N R populated by the (b – 1) / 2 elements larger than m. The condition 2 · a – 1 ≤ b ensures that  (b – 1) / 2 ≥ a – 1, in other words, that each of the two new nodes contains at least a – 1 elements. The median element m is pushed upward into the parent node, where it serves as a separator between the two new nodes NL and NR that now take the place formerly inhabited by N. Thus the problem of insertion into a node at a given level is replaced by the same problem one level higher in the tree. The new separator element may be",algorithms and data structures.pdf "a given level is replaced by the same problem one level higher in the tree. The new separator element may be absorbed in a nonfull parent, but if the parent overflows, the splitting process described is repeated recursively. At 234",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License worst, the splitting process propagates to the root of the tree, where a new root that contains only the median element is created. (a,b)-trees grow at the root, and this is the reason for allowing the root to have as few as two children. Deletion Deletion of an element x begins by searching for it. As in the case of binary search trees, deletion is easiest at the bottom of the tree, at a node of maximal depth whose children are leaves. If x is found at a higher level of the tree, in a node that has internal nodes as children, x is the separator between two subtrees T L and T R. We replace x by another element z, either the largest element in T L or the smallest element in T R, both of which are stored in a node at the bottom of the tree. After this exchange, the problem is reduced to deleting an element z from a node N at the deepest level.",algorithms and data structures.pdf "at the bottom of the tree. After this exchange, the problem is reduced to deleting an element z from a node N at the deepest level. If deletion (of x or z) leaves N with at least a – 1 elements, we are done. If not, we try to restore N's occupancy condition by stealing an element from an adjacent sibling node M. If there is no sibling M that can spare an element, that is, if M is minimally occupied, M and N are merged into a single node L. L contains the a – 2 elements of N, the a – 1 elements of M, and the separator between M and N which was stored in their parent node, for a total of 2 · (a – 1) ≤ b – 1 elements. Since the parent (of the old nodes M and N, and of the new node L) lost an element in this merger, the parent may underflow. As in the case of insertion, this underflow can propagate to the root and may cause its deletion. Thus (a,b)-trees grow and shrink at the root.",algorithms and data structures.pdf "may cause its deletion. Thus (a,b)-trees grow and shrink at the root. Both insertion and deletion work along a single path from the root down to a l eaf and (possibly) back up. Thus their time is bounded by O(h), or equivalently, by O(log n): (a,b)-trees can be rebalanced in logarithmic time. Amortized cost. The performance of (a,b)-trees is better than the worst-case analysis above suggests. It can be shown that the total cost of any sequence of s insertions and deletions into an initially empty (a,b)-tree is linear in the length s of the sequence: whereas the worst-case cost of a single operation is O(log n), the amortized cost per operation is O(1) [Meh 84a]. Amortized cost is a complexity measure that involves both an average and a worst-case consideration. The average is taken over all operations in a sequence; the worst case is taken over all sequences. Although any one operation may take time O(log n), we are guaranteed that the total of all s operations in any",algorithms and data structures.pdf "Although any one operation may take time O(log n), we are guaranteed that the total of all s operations in any sequence of length s can be done in time O(s), as if each single operation were done in time O(1). Exhibit 21.27: A slightly skewed (3,5)-tree. Exercise: insertion and deletion in a (3,5)-tree Starting with the (3,5)-tree shown in Exhibit 21.27 , perform the sequence of operations: insert 38, delete 10, delete 12, delete 50. Draw the tree after each operation. Solution Inserting 38 causes a leaf and its parent to split ( Exhibit 21.28 ). Deleting 10 causes underflow, remedied by borrowing an element from the left sibling ( Exhibit 21.29 ). Deleting 12 causes underflow in both a leaf and its parent, remedied by merging ( Exhibit 21.30 ). Deleting 50 causes merging at the leaf level and borrowing at the parent level (Exhibit 21.31). Algorithms and Data Structures 235 A Global Text",algorithms and data structures.pdf "21. List structures Exhibit 21.28: Node splits propagate towards the root Exhibit 21.29: A deletion is absorbed by borrowing Exhibit 21.30: Another deletion propagates node merges towards the root Exhibit 21.31: Node merges and borrowing combined (2,3)-trees are the special case a = 2, b = 3: each node has two or three children. Exhibit 21.32 omits the leaves. Starting with the tree in state 1 we insert the value 9: the rightmost node at the bottom level overflows and splits, the median 8 moves up into the parent. The parent also overflows, and the median 6 generates a new root (state 2). The deletion of 1 is absorbed without any rebalancing (state 3). The deletion of 2 causes a node to underflow, remedied by stealing an element from a sibling: 2 is replaced by 3 and 3 is replaced by 4 (state 4). The deletion of 3 236",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License triggers the merger of the nodes assigned to 3 and 5; this causes an underflow in their parent, which in turn propagates to the root and results in a tree of reduced height (state 5). Exhibit 21.32: Tracing insertions and deletions in a (2,3)-tree As mentioned earlier, multiway trees are particularly useful for managing data on a disk. If each node is allocated to its own disk block, searching for a record triggers as many disk accesses as there are levels in the tree. The depth of the tree is minimized if the maximal fan-out b is maximized. We can pack more elements into a node by shrinking their size. As the records to be stored are normally much larger than their identifying keys, we store keys only in the internal nodes and store entire records in the leaves (which we had considered to be empty until",algorithms and data structures.pdf "keys only in the internal nodes and store entire records in the leaves (which we had considered to be empty until now). Thus the internal nodes serve as an index that assigns to a key value the path to the corresponding leaf. Exercises and programming projects 1. Design and implement a list structure for storing a sparse matrix. Your implementation should provide procedures for inserting, deleting, changing, and reading matrix elements. 2. Implement a fifo queue by a circular list using only one external pointer f and a sentinel. f always points to the sentinel and provides access to the head and tail of the queue. 3. Implement a double-ended queue (deque) by a doubly linked list. 4. Binary search trees and sorting A binary search tree given by the following declarations is used to manage a set of integers: type nptr = ^node node = record L, R: nptr; x: integer end; var root: nptr; The empty tree is represented as root = nil.",algorithms and data structures.pdf "a set of integers: type nptr = ^node node = record L, R: nptr; x: integer end; var root: nptr; The empty tree is represented as root = nil. (a) Draw the result of inserting the sequence 6, 15, 4, 2, 7, 12, 5, 18 into the empty tree. Algorithms and Data Structures 237 A Global Text",algorithms and data structures.pdf "21. List structures (b) Write a procedure smallest(var x: integer); which returns the smallest number stored in the tree, and a procedure remove smallest; which deletes it. If the tree is empty both procedures should call a procedure message('tree is empty'); (c) Write a procedure sort; that sorts the numbers stored in var a: array[1 .. n] of integer; by inserting the numbers into a binary search tree, then writing them back to the array in sorted order as it traverses the tree. (d) Analyze the asymptotic time complexity of 'sort' in a typical and in the worst case. (e) Does this approach lead to a sorting algorithm of time complexity Θ (ν • λ ογ ν) 5. Extend the implementation of a dictionary as a binary search tree in the “Binary search trees” section to support the operations 'succ' and 'pred' as defined in chapter 19 in the section “Dictionary”.",algorithms and data structures.pdf "support the operations 'succ' and 'pred' as defined in chapter 19 in the section “Dictionary”. 6. Insertion and deletion in AVL-trees: Starting with an empty AVL-tree, insert 1, 2, 5, 6, 7, 8, 9, 3, 4, in this order. Draw the AVL-tree after each insertion. Now delete all elements in the opposite order of insertion (i.e. in last-in-first-out order). Does the AVL-tree go through the same states as during insertion but in reverse order? 7. Implement an AVL-tree supporting the dictionary operations 'insert', 'delete', 'member', 'pred', and 'succ'. 8. Explain how to find the smallest element in an (a,b)-tree and how to find the predecessor of a given element in an (a,b)-tree. 9. Implement a dictionary as a B-tree. 238",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 22. Address computation Learning objectives: • hashing • perfect hashing • collision resolution methods: separate chaining, coalesced chaining, open addressing (linear probing and double hashing) • deletions degrade performance of a hash table • Performance does not depend on the number of data elements stored but on the load factor of the hash table. • randomization: transform unknown distribution into a uniform distribution • Extendible hashing uses a radix tree to adapt the address range dynamically to the contents to be stored; deletions do not degrade performance. • order-preserving extendible hashing Concepts and terminology The term address computation (also hashing, hash coding, scatter storage, or key-to-address transformations) refers to many search techniques that aim to assign an address of a storage cell to any key value x by means of a",algorithms and data structures.pdf "refers to many search techniques that aim to assign an address of a storage cell to any key value x by means of a formula that depends on x only. Assigning an address to x independently of the presence or absence of other key values leads to faster access than is possible with the comparative search techniques discussed in earlier chapters. Although this goal cannot always be achieved, address computation does provide the fastest access possible in many practical situations. We use the following concepts and terminology ( Exhibit 22.1). The home address a of x is obtained by means of a hash function h that maps the key domain X into the address space A [i.e. a = h(x)]. The address range is A = {0, 1, … , m – 1}, where m is the number of storage cells available. The storage cells are represented by an array T[0 .. m – 1], the hash table; T[a] is the cell addressed by a ∈ A. T[h(x)] is the cell where an element with key value x is",algorithms and data structures.pdf "– 1], the hash table; T[a] is the cell addressed by a ∈ A. T[h(x)] is the cell where an element with key value x is preferentially stored, but alas, not necessarily. Exhibit 22.1: The hash function h maps a (typically large) key domain X into a (much smaller) address space A. Algorithms and Data Structures 239 A Global Text",algorithms and data structures.pdf "22. Address computation Each cell has a capacity of b > 0 elements; b stands for bucket capacity. The number n of elements to be stored is therefore bounded by m · b. Two cases are usefully distinguished, depending on whether the hash table resides on disk or in central memory: 1. Disk or other secondary storage device: Considerations of efficiency suggest that a bucket be identified with a physical unit of transfer, typically a disk block. Such a unit is usually large compared to the size of an element, and thus b > 1. 2. Main memory: Cell size is less important, but the code is simplest if a cell can hold exactly one element (i.e. b = 1). For simplicity of exposition we assume that b = 1 unless otherwise stated; the generalization to arbitrary b is straightforward. The key domain X is normally much larger than the number n of elements to be stored and the number m of",algorithms and data structures.pdf "straightforward. The key domain X is normally much larger than the number n of elements to be stored and the number m of available cells T[a]. For example, a table used for storing a few thousand identifiers might have as its key domain the set of strings of length at most 10 over t he alphabet {'a', 'b', … , 'z', '0', … , '9'}; its cardinality is close to 36 10. Thus in general the function h is many-to-one: Different key values map to the same address. The content to be stored is a sample from the key domain: It is not under the programmer's control and is usually not even known when the hash function and table size are chosen. Thus we must expect collisions, that is, events where more than b elements to be stored are assigned the same address. Collision resolution methods are designed to handle this case by storing some of the colliding elements elsewhere. The more collisions that occur, the",algorithms and data structures.pdf "designed to handle this case by storing some of the colliding elements elsewhere. The more collisions that occur, the longer the search time. Since the number of collisions is a random event, the search time is a random variable. Hash tables are known for excellent average performance and for terrible worst-case performance, which, one hopes, will never occur. Address computation techniques support the operations 'find' and 'insert' (and to a lesser extent also 'delete') in expected time O(1). This is a remarkable difference from all other data structures that we have discussed so far, in that the average time complexity does not depend on the number n of elements stored, but on the load factor λ = n / (m · b), or, for the special case b = 1: λ = n / m. Note that 0 ≤ λ ≤ 1. Before we consider the typical case of a hash table, we illustrate these concepts in two special cases where everything is simple; these represent ideals rarely attainable.",algorithms and data structures.pdf "everything is simple; these represent ideals rarely attainable. The special case of small key domains If the number of possible key values is less than or equal to the number of available storage cells, h can map X one-to-one into or onto A. Everything is simple and efficient because collisions never occur. Consider the following example: X = {'a', 'b', … , 'z'}, A = {0, … , 25} h(x) = ord(x) – ord('a'); that is, h('a') = 0, h('b') = 1, h('c') = 2, … , h('z') = 25. Since h is one-to-one, each key value x is implied by its address h(x). Thus we need not store the key values explicitly, as a single bit (present / absent) suffices: var T: array[0 .. 25] of boolean; function member(x): boolean; begin return(T[h(x)]) end; 240",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License procedure insert(x); begin T[h(x)] := true end; procedure delete(x); begin T[h(x)] := false end; The idea of collision-free address computation can be extended to large key domains through a combination of address computation and list processing techniques, as we will see in the chapter ""Metric data structures"". The special case of perfect hashing: table contents known a priori Certain common applications require storing a set of elements that never changes. The set of reserved words of a programming language is an example; when the lexical analyzer of a compiler extracts an identifier, the first issue to be determined is whether this is a reserved word such as 'begin' or 'while', or whether it is programmer defined. The special case where the table contents are known a priori, and no insertions or deletions occur, is handled more",algorithms and data structures.pdf "The special case where the table contents are known a priori, and no insertions or deletions occur, is handled more efficiently by special-purpose data structures than by a general dictionary. If the elements x1, x2, … , xn to be stored are known before the hash table is designed, the underlying key domain is not as important as the set of actually occurring key values. We can usually find a table size m, not much larger than the number n of elements to be stored, and an easily evaluated hash function h that assigns to each xi a unique address from the address space {0, … , m – 1}. It takes some trial and error to find such a perfect hash function h for a given set of elements, but the benefit of avoiding collisions is well worth the effort—the code that implements a collision-free hash table is simple and fast. A perfect hash function works for a static table only —a single insertion,",algorithms and data structures.pdf "collision-free hash table is simple and fast. A perfect hash function works for a static table only —a single insertion, after h has been chosen, is likely to cause a collision and destroy the simplicity of the concept and efficiency of the implementation. Perfect hash functions should be generated automatically by a program. The following unrealistically small example illustrates typical approaches to designing a perfect hash table. The task gets harder as the number m of available storage cells is reduced toward the minimum possible, that is, the number n of elements to be stored. Example In designing a perfect hash table for the elements 17, 20, 24, 38, and 51, we look for arithmetic patterns. These are most easily detected by considering the binary representations of the numbers to be stored: 5 4 3 2 1 0 bit position 170 1 0 0 0 1 200 1 0 1 0 0 240 1 1 0 0 0 381 0 0 1 1 0 511 1 0 0 1 1",algorithms and data structures.pdf "5 4 3 2 1 0 bit position 170 1 0 0 0 1 200 1 0 1 0 0 240 1 1 0 0 0 381 0 0 1 1 0 511 1 0 0 1 1 We observe that the least significant three bits identify each element uniquely. Therefore, the hash function h(x) = x mod 8 maps these five elements collision-free into the address space A = {0, … , 6}, with m = 7 and two empty cells. An attempt to further economize space leads us to observe that the bits in positions 1, 2, and 3, with weights 2, 4, and 8 in the binary number representation, also identify each element uniquely, while ranging over the address space of minimal size A = {0, … , 4}. The function h(x) = (x div 2) mod 8 extracts these three bits and assigns the following addresses: X:1720243851 A:0 2 4 3 1 Algorithms and Data Structures 241 A Global Text",algorithms and data structures.pdf "22. Address computation A perfect hash table has to store each element explicitly, not just a bit (present/absent). In the example above, the elements 0, 1, 16, 17, 32, 33, … all map into address 0, but only 17 is present in the table. The access function 'member(x)' is implemented as a single statement: return ((h(x) ≤ 4) cand (T[h(x)] = x)); The boolean operator 'cand' used here is understood to be the conditional and : Evaluation of the expression proceeds from left to right and stops as soon as its value is determined. In our example, h(x) > 4 suffices to assign 'false' to the expression (h(x) ≤ 4) and (T[h(x)] = x). Thus the 'cand' operator guarantees that the table declared as: var T: array[0 .. 4] of element; is accessed within its index bounds. For table contents of realistic size it is impractical to construct a perfect hash function manually —we need a",algorithms and data structures.pdf "For table contents of realistic size it is impractical to construct a perfect hash function manually —we need a program to search exhaustively through the large space of functions. The more slack m – n we allow, the denser is the population of perfect functions and the quicker we will find one. [Meh 84a] presents analytical results on the complexity of finding perfect hash functions. Exercise: perfect hash tables Design several perfect hash tables for the content {3, 13, 57, 71, 82, 93}. Solution Designing a perfect hash table is like answering a question of the type: What is the next element in the sequence 1, 4, 9, … ? There are infinitely many answers, but some are more elegant than others. Consider: h 3 13 57 71 82 93 Address range (x div 3) mod 7 1 4 5 2 6 3 [1 .. 6] x mod 13 3 0 5 6 4 2 [0 .. 6]",algorithms and data structures.pdf "(x div 3) mod 7 1 4 5 2 6 3 [1 .. 6] x mod 13 3 0 5 6 4 2 [0 .. 6] (x div 4) mod 8 0 3 6 1 4 7 [0 .. 7] if x = 71 then 4 else x mod 7 3 6 1 4 5 2 [1 .. 6] Conventional hash tables: collision resolution In contrast to the special cases discussed, most applications of address computation present the data structure designer with greater uncertainties and less favorable conditions. Typically, the underlying key domain is much larger than the available address range, and not much is known about the elements to be stored. We may have an upper bound on n, and we may know the probability distribution that governs the random sample of elements to be stored. In setting up a customer list for a local business, for example, the number of customers may be bounded by",algorithms and data structures.pdf "stored. In setting up a customer list for a local business, for example, the number of customers may be bounded by the population of the town, and the distribution of last names can be obtained from the telephone directory —many names will start with H and S, hardly any with Q and Y. On the basis of such information, but in ignorance of the actual table contents to be stored, we must choose the size m of the hash table and design the hash function h that maps the key domain X into the address space A= {0, … , m – 1}. We will then have to live with the consequences of these decisions, at least until we decide to rehash: that is, resize the table, redesign the hash function, and reinsert all the elements that we have stored so far. Later sections present some pragmatic advice on the choice of h; for now, let us assume that an appropriate hash function is available. Regardless of how smart a hash function we have designed, collisions (more than b elements",algorithms and data structures.pdf "function is available. Regardless of how smart a hash function we have designed, collisions (more than b elements share the same home address of a bucket of capacity b) are inevitable in practice. Thus hashing requires techniques 242",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License for handling collisions. We present the three major collision resolution techniques in use: separate chaining, coalesced chaining, and open addressing. The two techniques called chaining call upon list processing techniques to organize overflowing elements. Separate chaining is used when these lists live in an overflow area distinct from the hash table proper; coalesced chaining when the lists live in unused parts of the table. Open addressing uses address computation to organize overflowing elements. Each of these three techniques comes in different variations; we illustrate one typical choice. Separate chaining The memory allocated to the table is split into a primary and an overflow area. Any overflowing cell or bucket in the primary area is the head of a list, called the overflow chain , that holds all elements that overflow from that",algorithms and data structures.pdf "the primary area is the head of a list, called the overflow chain , that holds all elements that overflow from that bucket. Exhibit 22.2 shows six elements inserted in the or der x1, x2, … . The first arrival resides at its home address; later ones get appended to the overflow chain. Exhibit 22.2: Separate chaining handles collisions in a separate overflow area. Separate chaining is easy to understand: insert, delete, and search operations are simple. In contrast to other collision handling techniques, this hybrid between address computation and list processing has two major advantages: (1) deletions do not degrade the performance of the hash table, and (2) regardless of the number m of home addresses, the hash table will not overflow until the entire memory is exhausted. The size m of the table has a critical influence on the performance. If m « n, overflow chains are long and we have essentially a list processing",algorithms and data structures.pdf "critical influence on the performance. If m « n, overflow chains are long and we have essentially a list processing technique that does not support direct access. If m » n, overflow chains are short but we waste space in the table. Even for the practical choice m ≈ n, separate chaining has some disadvantages: • Two different accessing techniques are required. • Pointers take up space; this may be a significant overhead for small elements. Algorithms and Data Structures 243 A Global Text",algorithms and data structures.pdf "22. Address computation • Memory is partitioned into two separate areas that do not share space: If the overflow area is full, the entire table is full, even if there is still space in the array of home cells. This consideration leads to the next technique. Coalesced chaining The chains that emanate from overflowing buckets are stored in the empty space in the hash table rather than in a separate overflow area ( Exhibit 22.3). This has the advantage that all available space is utilized fully (except for the overhead of the pointers). However, managing the space shared between the two accessing techniques gets complicated. Exhibit 22.3: Coalesced chaining handles collisions by building lists that share memory with the hash table. The next technique has similar advantages (in addition, it incurs no overhead for pointers) and disadvantages; all things considered, it is probably the best collision resolution technique. Open addressing",algorithms and data structures.pdf "all things considered, it is probably the best collision resolution technique. Open addressing Assign to each element x ∈ X a probe sequence a0 = h(x), a1, a2, … of addresses that fills the entire address range A. The intention is to store x preferentially at a 0, but if T[a 0] is occupied then at a 1, and so on, until the first empty cell is encountered along the probe sequence. The occupied cells along the probe sequence are called the collision path of x—note that the collision path is a prefix of the probe sequence. If we enforce the invariant: If x is in the table at T[a] and if i precedes a in the probe sequence for x , then T[i] is occupied. The following fast and simple loop that travels along the collision path can be used to search for x: a := h(x); while T[a] ≠ x and T[a] ≠ empty do a := (next address in probe sequence); Let us work out the details so that this loop terminates correctly and the code is as concise and fast as we can make it.",algorithms and data structures.pdf "Let us work out the details so that this loop terminates correctly and the code is as concise and fast as we can make it. The probe sequence is defined by formulas in the program (an example of an implicit data structure) rather than by pointers in the data as is the case in coalesced chaining. Example: linear probing ai+1 = (ai + 1) mod m is the simplest possible formula. Its only disadvantage is a phenomenon called clustering. Clustering arises when the collision paths of many elements in the table overlap to a large extent, as is likely to happen in linear probing. Once elements have collided, linear probing will store them in consecutive cells. All elements that hash into this block of contiguous occupied cells travel along the same collision path, thus 244",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License lengthening this block; this in turn increases the probability that future elements will hash into this block. Once this positive feedback loop gets started, the cluster keeps growing. Double hashing is a special type of open addressing designed to alleviate the clustering problem by letting different elements travel with steps of different size. The probe sequence is defined by the formulas a0 = h(x), δ = g(x) > 0, ai+1 = (ai + δ ) mod m, m prime g is a second hash function that maps the key space X into [1 .. m – 1]. Two important important details must be solved: • The probe sequence of each element must span the entire address range A. This is achieved if m is relatively prime to every step size δ, and the easiest way to guarantee this condition is to choose m prime. • The termination condition of the search loop above is: T[a] = x or T[a] = empty. An unsuccessful search (x",algorithms and data structures.pdf "• The termination condition of the search loop above is: T[a] = x or T[a] = empty. An unsuccessful search (x not in the table) can terminate only if an address a is generated with T[a] = empty. We have already insisted that each probe sequence generates all addresses in A. In addition, we must guarantee that the table contains at least one empty cell at all times—this serves as a sentinel to terminate the search loop. The following declarations and procedures implement double hashing. We assume that the comparison operators = and ≠ are defined on X, and that X contains a special value 'empty', which differs from all values to be stored in the table. For example, a string of blanks might denote 'empty' in a table of identifiers. We choose to identify an unsuccessful search by simply returning the address of an empty cell. const m = … ; { size of hash table - must be prime! } empty = … ; type key = … ; addr = 0 .. m – 1; step = 1 .. m – 1;",algorithms and data structures.pdf "const m = … ; { size of hash table - must be prime! } empty = … ; type key = … ; addr = 0 .. m – 1; step = 1 .. m – 1; var T: array[addr] of key; n: integer; { number of elements currently stored in T } function h(x: key): addr; { hash function for home address } function g(x: key): step; { hash function for step } procedure init; var a: addr; begin n := 0; for a := 0 to m – 1 do T[a] := empty end; function find(x: key): addr; var a: addr; d: step; begin a := h(x); d := g(x); while (T[a] ≠ x) and (T[a] ≠ empty) do a := (a + d) mod m; return(a) end; function insert(x: key): addr; var a: addr; d: step; begin a := h(x); d := g(x); while T[a] ≠ empty do begin if T[a] = x then return(a); a := (a + d) mod m end; if n < m – 1 then { n := n + 1; T[a] := x } else err- msg('table is full'); Algorithms and Data Structures 245 A Global Text",algorithms and data structures.pdf "22. Address computation return(a) end; Deletion of elements creates problems, as is the case in many types of hash tables. An element to be deleted cannot simply be replaced by 'empty', or else it might break the collision paths of other elements still in the table— recall the basic invariant on which the correctness of open addressing is based. The idea of rearranging elements in the table so as to refill a cell that was emptied but needs to remain full is quickly abandoned as too complicated —if deletions are numerous, the programmer ought to choose a data structure that fully supports deletions, such as balanced trees implemented as list structures. A limited number of deletions can be accommodated in an open address hash table by using the following technique. At any time, a cell is in one of three states: • empty (was never occupied, the initial state of all cells) • occupied (currently) • deleted (used to be occupied but is currently free)",algorithms and data structures.pdf "• empty (was never occupied, the initial state of all cells) • occupied (currently) • deleted (used to be occupied but is currently free) A cell in state 'empty' terminates the find loop; a cell in state 'empty' or in state 'deleted' terminates the insert loop. The state diagram shown in Exhibit 22.4 describes the transitions possible in the lifetime of a cell. Deletions degrade the performance of a hash table, because a cell, once occupied, never returns to the virgin state 'empty' which alone terminates an unsuccessful find. Even if an equal number of insertions and deletions keeps a hash table at a low load factor λ, unsuccessful finds will ultimately scan the entire table, as all cells drift into one of the states 'occupied' or 'deleted'. Before this occurs, the table ought to be rehashed; that is, the contents are inserted into a new, initially empty table. Exhibit 22.4: This state diagram describes possible life cycles of a cell: Once occupied, a cell",algorithms and data structures.pdf "new, initially empty table. Exhibit 22.4: This state diagram describes possible life cycles of a cell: Once occupied, a cell will never again be as useful as an empty cell. Exercise: hash table with deletions Modify the program above to implement double hashing with deletions. Choice of hash function: randomization In conventional terminology, hashing is based on the concept of randomization. The purpose of randomizing is to transform an unknown distribution over the key domain X into a uniform distribution, and to turn consecutive samples that may be dependent into independent samples. This task appears to call for magic, and indeed, there is little or no mathematics that applies to the construction of hash functions; but there are commonsense observations worth remembering. These observations are primarily ""don'ts"". They stem from",algorithms and data structures.pdf "commonsense observations worth remembering. These observations are primarily ""don'ts"". They stem from properties that sets of elements we wish to store frequently possess, and thus are based on some knowledge about the populations to be stored. If we assumed strictly nothing about these populations, there would be little to say about hash functions: an order-preserving proportional mapping of X into A would be as good as any other function. But in practice it is not, as the following examples show. 246",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 1. A Fortran compiler might use a hash table to store the set of identifiers it encounters in a program being compiled. The rules of the language and human habits conspire to make this set a highly biased sample from the set of legal Fortran identifiers. Example: Integer variables begin with I, J, K, L, M, N; this convention is likely to generate a cluster of identifiers that begin with one of these letters. Example: Successive identifiers encountered cannot be considered independent samples: If X and Y have occurred, there is a higher chance for Z to follow than for WRKHG. Example: Frequently, we see sequences of identifiers or statement numbers whose character codes form arithmetic progressions, such as A1, A2, A3, … or 10, 20, 30, … . 2. All file systems require or encourage the use of naming conventions, so that most file names begin or end",algorithms and data structures.pdf "… or 10, 20, 30, … . 2. All file systems require or encourage the use of naming conventions, so that most file names begin or end with one of just a few prefixes or suffixes, such as ···.SYS, ···.BAK, ···.OBJ. An individual user, or a user community, is likely to generate additional conventions, so that most file names might begin, for example, with the initials of the names of the people involved. The files that store this text, for example, are structured according to 'part' and 'chapter', so we are currently in file P5 C22. In some directories, file names might be sorted alphabetically, so if they are inserted into a table in order, we process a monotonic sequence. The purpose of a hash function is to break up all regularities that might be present in the set of elements to be stored. This is most reliably achieved by ""hashing"" the elements, a word for which the dictionary offers",algorithms and data structures.pdf "be stored. This is most reliably achieved by ""hashing"" the elements, a word for which the dictionary offers the following explanations: (1) from the French hache, ""battle-ax""; (2) to chop into small pieces; (3) to confuse, to muddle. Thus, to approximate the elusive goal of randomization, a hash function destroys patterns, including, unfortunately, the order < defined on X. Hashing typically proceeds in two steps. 1. Convert the element x into a number #(x). In most cases #(x) is an integer, occasionally, it is a real number 0 ≤ #(x) < 1. Whenever possible, this conversion of x into #(x) involves no action at all: The representation of x, whatever type x may be, is reinterpreted as the representation of the number #(x). When x is a variable-length item, for example a string, the representation of x is partitioned into pieces of suitable length that are ""folded"" on top of each other. For example, the four-letter word x = 'hash' is",algorithms and data structures.pdf "of suitable length that are ""folded"" on top of each other. For example, the four-letter word x = 'hash' is encoded one letter per byte using the 7-bit ASCII code and a leading 0 as 01101000 01100001 01110011 01101000. It may be folded to form a 16-bit integer by exclusive-or of the leading pair of bytes with the trailing pair of bytes: 0110100001100001 xor 01110011011010000 0001101100001001 which represents #(x) = 27 · 28 + 9 = 6921. Such folding, by itself, is not hashing. Patterns in the representation of elements easily survive folding. For example, the leading 0 we have used to pad the 7-bit ASCII code to an 8-bit byte remains a zero regardless of x. If we had padded with a trailing zero, all #(x) would be even. Because #(x) often has the same representation as x, or a closely related one, we drop #() and use x slightly ambiguously to denote both the original element and its interpretation as a number.",algorithms and data structures.pdf "both the original element and its interpretation as a number. 2. Scramble x [more precisely, #(x)] to obtain h(x). Any scrambling technique is a sensible try, as long as it avoids fairly obvious pitfalls. Rules of thumb: Algorithms and Data Structures 247 A Global Text",algorithms and data structures.pdf "22. Address computation ▪ Each bit of an address h(x) should depend on all bits of the key value x. In particular, don't ignore any part of x in computing h(x). Thus h(x) = x mod 213 is suspect, as only the least significant 13 bits of x affect h(x). ▪ Make sure that arithmetic progressions such as Ch1, Ch2, Ch3, … get broken up rather than being mapped into arithmetic progressions. Thus h(x) = x mod k, where k is significantly smaller than the table size m, is suspect. ▪ Avoid any function that cannot produce a uniform distribution of addresses. Thus h(x) = x 2 is suspect; if x is uniformly distributed in [0, 1], the distribution of x2 is highly skewed. A hash function must be fast and simple. All of the desiderata above are obtained by a hash function of the type: h(x) = x mod m where m is the table size and a prime number, and x is the key value interpreted as an integer.",algorithms and data structures.pdf "h(x) = x mod m where m is the table size and a prime number, and x is the key value interpreted as an integer. No hash function is guaranteed to avoid the worst case of hashing, namely, that all elements to be stored collide on one address (this happens here if we store only multiples of the prime m). Thus a hash function must be judged in relation to the data it is being asked to store, and usually this is possible only after one has begun using it. Hashing provides a perfect example for the injunction that the programmer must think about the data, analyze its statistical properties, and adapt the program to the data if necessary. Performance analysis We analyze open addressing without deletions assuming that each address αi is chosen independently of all other addresses from a uniform distribution over A. This assumption is reasonable for double hashing and leads to",algorithms and data structures.pdf "other addresses from a uniform distribution over A. This assumption is reasonable for double hashing and leads to the conclusion that the average cost for a search operation in a hash table is O(1) if we consider the load factor λ to be constant. We analyze the average number of probes executed as a function of λ in two cases: U( λ) for an unsuccessful search, and S(λ) for a successful search. Let pi denote the probability of using exactly i probes in an unsuccessful search. This event occurs if the first I – 1 probes hit occupied cells, and the i-th probe hits an empty cell: pi = λi–1 · (1 – λ). Let qi denote the probability that at least i probes are used in an unsuccessful search; this occurs if the first i – 1 inspected cells are occupied: qi = λi–1. qi can also be expressed as the sum of the probabilities that we probe exactly j cells, for j running from i to m. Thus we obtain",algorithms and data structures.pdf "qi can also be expressed as the sum of the probabilities that we probe exactly j cells, for j running from i to m. Thus we obtain The number of probes executed in a successful search for an element x equals the number of probes in an unsuccessful search for the same element x before it is inserted into the hash table. [Note: This holds only when elements are never relocated or deleted]. Thus the average number of probes needed to search for the i-th element inserted into the hash table is U((i – 1) / m), and S( λ) can be computed as the average of U( µ), for µ increasing in discrete steps from 0 to λ. It is a reasonable approximation to let µ vary continuously in the range from 0 to λ: 248",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 22.5 suggests that a reasonable operating range for a hash table keeps the load factor λ between 0.25 and 0.75. If λ is much smaller, we waste space, if it is larger than 75 per cent, we get into a domain where the performance degrades rapidly. Note: If all searches are successful, a hash table performs well even if loaded up to 95 per cent—unsuccessful searching is the killer! Table 22.1: The average number of probes per search grows rapidly as the load factor approaches 1. λ 0.25 0.5 0.75 0.9 0.95 0.99 U(λ) 1.3 2.0 4.0 10.0 20.0 100.0 S(λ) 1.2 1.4 1.8 2.6 3.2 4.7 Exhibit 22.5: The average number of probes per search grows rapidly as the load factor approaches 1. Thus the hash table designer should be able to estimate n within a factor of 2 —not an easy task. An incorrect guess may waste memory or cause poor performance, even table overflow followed by a crash. If the programmer",algorithms and data structures.pdf "guess may waste memory or cause poor performance, even table overflow followed by a crash. If the programmer becomes aware that the load factor lies outside this range, she may rehash —change the size of the table, change the hash function, and reinsert all elements previously stored. Extendible hashing In contrast to standard hashing methods, extendible forms of hashing allow for the dynamic extension or shrinkage of the address range into which the hash function maps the keys. This has two major advantages: (1) Memory is allocated only as needed (it is unnecessary to determine the size of the address range a priori), and (2) deletion of elements does not degrade performance. As the address range changes, the hash function is changed in such a way that only a few elements are assigned a new address and need to be stored in a new bucket. The idea that",algorithms and data structures.pdf "such a way that only a few elements are assigned a new address and need to be stored in a new bucket. The idea that makes this possible is to map the keys into a very large address space, of which only a portion is active at any given time. Various extendible hashing methods differ in the way they represent and manage a smaller active address range of variable size that is a subrange of a larger virtual address range. In the following we describe the method of extendible hashing that is especially well suited for storing data on secondary storage devices; in this case an address points to a physical block of secondary storage that can contain more than one element. An address is a bit string of maximum length k; however, at any time only a prefix of d bits is used. If all bit strings of length k are represented by a so-called radix tree of height k, the active part of all bit strings is obtained by using only the upper",algorithms and data structures.pdf "represented by a so-called radix tree of height k, the active part of all bit strings is obtained by using only the upper d levels of the tree (i.e. by cutting the tree at level d). Exhibit 22.6 shows an example for d = 3. Algorithms and Data Structures 249 A Global Text",algorithms and data structures.pdf "22. Address computation Exhibit 22.6: Address space organized as a binary radix tree. The radix tree shown in Exhibit 22.6 (without the nodes that have been clipped) describes an active address range with addresses {00, 010, 011, 1} that are considered as bit strings or binary numbers. To each active node with address s there corresponds a bucket B that can store b records. If a new element has to be inserted into a full bucket B, then B is split: Instead of B we find two twin buckets B0 and B1 which have a one bit longer address than B, and the elements stored in B are distributed among B 0 and B 1 according to this bit. The new radix tree now has to point to the two data buckets B 0 and B1 instead of B; that is, the active address range must be extended locally (by moving the broken line in Exhibit 22.6). If the block with address 00 overflows, two new twin blocks with addresses",algorithms and data structures.pdf "moving the broken line in Exhibit 22.6). If the block with address 00 overflows, two new twin blocks with addresses 000 and 001 will be created which are represented by the corresponding nodes in the tree. If the overflowing bucket B has depth d, then d is incremented by 1 and the radix tree grows by one level. In extendible hashing the clipped radix tree is represented by a directory that is implemented by an array. Let d be the maximum number of bits that are used in one of the bit strings for forming an address; in the example above, d = 3. Then the directory consists of 2 d entries. Each entry in this directory corresponds to an address and points to a physical data bucket which contains all elements that have been assigned this address by the hash function h. The directory for the radix tree in Exhibit 22.6 looks as shown in Exhibit 22.7. Exhibit 22.7: The active address range of the tree in Exhibit 22.6 implemented as an array.",algorithms and data structures.pdf "Exhibit 22.7: The active address range of the tree in Exhibit 22.6 implemented as an array. The bucket with address 010 corresponds to a node on level 3 of the radix tree, and there is only one entry in the directory corresponding to this bucket. If this bucket overflows, the directory and data buckets are reorganized as shown in Exhibit 22.8. Two twin buckets that jointly contain fewer than b elements are merged into a single bucket. This keeps the average bucket occupancy at a high 70 per cent even in the presence of deletions, as probabilistic analysis predicts and simulation results confirm. Bucket merging may lead to halving the directory. A formerly large file that shrinks to a much smaller size will have its directory shrink in proportion. Thus extendible hashing, unlike conventional hashing, suffers no permanent performance degradation under deletions. 250",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 22.8: An overflowing bucket may trigger doubling of the directory. A virtual radix tree: order-preserving extendible hashing Hashing, in the usual sense of the word, destroys structure and thus buys uniformity at the cost of order. Extendible hashing, on the other hand, is practical without randomization and thus needs not accept its inevitable consequence, the destruction of order. A uniform distribution of elements is not nearly as important: Nonuniformity causes the directory to be deeper and thus larger than it would be for a uniform distribution, but it affects neither access time nor bucket occupancy. And the directory is only a small space overhead on top of the space required to store the data: It typically contains only one or a few pointers, say a dozen bytes, per data bucket",algorithms and data structures.pdf "space required to store the data: It typically contains only one or a few pointers, say a dozen bytes, per data bucket of, say 1k bytes; it adds perhaps a few percent to the total space requirement of the table, so its growth is not critical. Thus extendible hashing remains feasible when the identity is used as the address computation function h, in which case data is accessible and can be processed sequentially in the order ≤ defined on the domain X. When h preserves order, the word hashing seems out of place. If the directory resides in central memory and the data buckets on disk, what we are implementing is a virtual memory organized in the form of a radix tree of unbounded size. In contrast to conventional virtual memory, whose address space grows only at one end, this address space can grow anywhere: It is a virtual radix tree. As an example, consider the domain X of character strings up to length 32, say, and assume that elements to be",algorithms and data structures.pdf "As an example, consider the domain X of character strings up to length 32, say, and assume that elements to be stored are sampled according to the distribution of the first letter in English words. We obtain an approximate distribution by counting pages in a dictionary ( Exhibit 22.9). Encode the blank as 00000, 'a' as 00001, up to 'z' as 11011, so that 'aah', for example, has the code 00001 00001 01000 00000 … (29 quintuples of zeros pad 'aah' to32letters). This address computation function h is almost an identity: It maps {' ', 'a', … , 'z'} 32 one-to-one into {0, 1}160. Such an order-preserving address computation function supports many useful types of operations: for example, range queries such as ""list in alphabetic order all the words stored from 'unix' to 'xinu' "". Algorithms and Data Structures 251 A Global Text",algorithms and data structures.pdf "22. Address computation Exhibit 22.9: Relative frequency of words beginning with a given letter in Webster's dictionary. If there is one page of words starting with X for 160 pages of words starting with S, this suggests that if our active address space is partitioned into equally sized intervals, some intervals may be populated 160 times more densely than others. This translates into a directory that may be 160 times larger than necessary for a uniform distribution, or, since directories grow as powers of 2, may be 128 or 256 times larger. This sounds like a lot but may well be bearable, as the following estimates show. Assume that we store 105 records on disk, with an avera ge occupancy of 100 records per bucket, requiring about 1000 buckets. A uniform distribution generates a directory with one entry per bucket, for a total of 1k entries, say 2k or 4k bytes. The nonuniform distribution above requires the same number of buckets, about 1,000, but",algorithms and data structures.pdf "2k or 4k bytes. The nonuniform distribution above requires the same number of buckets, about 1,000, but generates a directory of 256k entries. If a pointer requires 2 to 4 bytes, this amounts to 0.5 to 1 Mbyte. This is less of a memory requirement than many applications require on today's personal computers. If the application warrants it (e.g. for an on-line reservation system) 1 Mbyte of memory is a small price to pay. Thus we see that for large data sets, extendible hashing approximates the ideal characteristics of the special case we discussed in this chapter's section on “the special case of small key domains”. All it takes is a disk and a central memory of a size that is standard today but was practically infeasible a decade ago, impossible two decades ago, and unthought of three decades ago. Exercises and programming projects 1. Design a perfect hash table for the elements 1, 10, 14, 20, 25, and 26.",algorithms and data structures.pdf "unthought of three decades ago. Exercises and programming projects 1. Design a perfect hash table for the elements 1, 10, 14, 20, 25, and 26. 2. The six names AL, FL, GA, NC, SC and VA must be distinguished from all other ordered pairs of uppercase letters. To solve this problem, these names are stored in the array T such that they can easily be found by means of a hash function h. type addr = 0 .. 7; pair = record c1, c2: 'A' .. 'Z' end; var T: array [addr] of pair; (a) Write a function h (name: pair): adr; which maps the six names onto different addresses in the range 'adr'. 252",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License (b) Write a procedure initTable; which initializes the entries of the hash table T. (c) Write a function member (name: pair): boolean; which returns for any pair of uppercase letters whether it is stored in T. 3. Consider the hash function h(x) = x mod 9 for a table having nine entries. Collisions in this hash table are resolved by coalesced chaining. Demonstrate the insertion of the elements 14, 19, 10, 6, 11, 42, 21, 8, and 1. 4. Consider inserting the keys 14, 1, 19, 10, 6, 11, 42, 21, 8, and 17 into a hash table of length m = 13 using open addressing with the hash function h(x) = x mod m. Show the result of inserting these elements using (a) Linear probing. (b) Double hashing with the second hash function g(x) = 1 + x mod (m+1). 5. Implement a dictionary supporting the operations 'insert', 'delete', and 'member' as a hash table with double hashing.",algorithms and data structures.pdf "5. Implement a dictionary supporting the operations 'insert', 'delete', and 'member' as a hash table with double hashing. 6. Implement a dictionary supporting the operations 'insert', 'delete', 'member', 'succ', and 'pred' by order- preserving extendible hashing. Algorithms and Data Structures 253 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 23. Metric data structures Learning objectives: • organizing the embedding space versus organizing its contents • quadtrees and octtrees. grid file. two-disk-access principle • simple geometric objects and their parameter spaces • region queries of arbitrary shape • approximation of complex objects by enclosing them in simple containers Organizing the embedding space versus organizing its contents Most of the data structures discussed so far organize the set of elements to be stored depending primarily, or even exclusively, on the relative values of these elements to each other and perhaps on their order of insertion into the data structure. Often, the only assumption made about these elements is that they are drawn from an ordered domain, and thus these structures support only comparative search techniques: the search argument is compared",algorithms and data structures.pdf "domain, and thus these structures support only comparative search techniques: the search argument is compared against stored elements. The shape of data structures based on comparative search varies dynamically with the set of elements currently stored; it does not depend on the static domain from which these elements are samples. These techniques organize the particular contents to be stored rather than the embedding space. The data structures discussed in this chapter mirror and organize the domain from which the elements are drawn—much of their structure is determined before the first element is ever inserted. This is typically done on the basis of fixed points of reference which are independent of the current contents, as inch marks on a measuring scale are independent of what is being measured. For this reason we call data structures that organize the embedding",algorithms and data structures.pdf "are independent of what is being measured. For this reason we call data structures that organize the embedding space metric data structures . They are of increasing importance, in particular for spatial data, such as needed in computer-aided design or geographic data processing. Typically, these domains exhibit a much richer structure than a mere order: In two- or three-dimensional Euclidean space, for example, not only is order defined along any line (not just the coordinate axes), but also distance between any two points. Most queries about spatial data involve the absolute position of elements in space, not just their relative position among each other. A typical query in graphics, for example, asks for the first object intercepted by a given ray of light. Computing the answer involves absolute position (the location of the ray) and relative order (nearest along the ray). A data structure that supports",algorithms and data structures.pdf "absolute position (the location of the ray) and relative order (nearest along the ray). A data structure that supports direct access to objects according to their position in space can clearly be more efficient than one based merely on the relative position of elements. The terms ""organizing the embedding space"" and ""organizing its contents"" suggest two extremes along a spectrum of possibilities. As we have seen in previous chapters, however, many data structures are hybrids that combine features from distinct types. This is particularly true of metric data structures: They always have aspects of address computation needed to locate elements in space, and they often use list processing techniques for efficient memory utilization. Algorithms and Data Structures 254 A Global Text",algorithms and data structures.pdf "23. Metric data structures Radix trees, tries We have encountered binary radix trees, and a possible implementation, in chapter 22 in the section “Extendible hashing”. Radix trees with a branching factor, or fan-out, greater than 2 are ubiquitous. The Dewey decimal classification used in libraries is a radix tree with a fan-out of 10. The hierarchical structure of many textbooks, including this one, can be seen as a radix tree with a fan-out determined by how many subsections at depth d + 1 are packed into a section at depth d. As another example, consider tries, a type of radix tree that permits the retrieval of variable-length data. As we traverse the tree, we check whether or not the node we are visiting has any successors. Thus the trie can be very long along certain paths. As an example, consider a trie containing words in the English language. In Exhibit 23.1",algorithms and data structures.pdf "long along certain paths. As an example, consider a trie containing words in the English language. In Exhibit 23.1 below, the four words 'a', 'at', 'ate', and 'be' are shown explicitly. The letter 'a' is a word and is the first letter of other words. The field corresponding to 'a' contains the value 1, signaling that we have spelled a valid word, and there is a pointer to longer words beginning with 'a'. The letter 'b' is not a word, thus is marked by a 0, but it is the beginning of many words, all found by following its pointer. The string 'aa' is neither a word nor the beginning of a word, so its field contains 0 and its pointer is 'nil'. Exhibit 23.1: A radix tree over the alphabet of letters stores (prefixes of) words. Only a few words begin with 'ate', but among these there are some long ones, such as 'atelectasis'. It would be wasteful to introduce eight additional nodes, one for each of the characters in 'lectasis', just to record this word,",algorithms and data structures.pdf "wasteful to introduce eight additional nodes, one for each of the characters in 'lectasis', just to record this word, without making significant use of the fan-out of 26 provided at each node. Thus tries typically use an ""overflow technique"" to handle long entries: The pointer field of the prefix 'ate' might point to a text field that contains '(ate-)lectasis' and '(ate-)lier'. Quadtrees and octtrees Consider a s quare recursively partitioned into quadrants. Exhibit 23.2 23.2 shows such a square partitioned to the depth of 4. There are 4 quadrants at depth 1, separated by the thickest lines; 4 · 4 (sub-)quadrants separated by slightly thinner lines; 4 3 (sub-sub-)quadrants separated by yet thinner lines; and finally, 4 4 = 256 leaf quadrants separated by the thinnest lines. The partitioning structure described is a quadtree, a particular type of radix tree of",algorithms and data structures.pdf "separated by the thinnest lines. The partitioning structure described is a quadtree, a particular type of radix tree of fan-out 4. The root corresponds to the entire square, its 4 children to the 4 quadrants at depth 1, and so on, as shown in the Exhibit 23.2. 255",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 23.2: A quarter circle digitized on a 16 · 16 grid, and its representation as a 4-level quadtree. A quadtree is the obvious two-dimensional analog of the one-dimensional binary radix tree we have seen. Accordingly, quadtrees are frequently used to represent, store, and process spatial data, such as images. The figure shows a quarter circle, digitized on a 16 · 16 grid of pixels. This image is most easily represented by a 16 · 16 array of bits. The quadtree provides an alternative representation that is advantageous for images digitized to a high level of resolution. Most graphic images in practice are digitized on rectangular grids of anywhere from hundreds to thousands of pixels on a side: for example, 512 · 512. In a quadtree, only the largest quadrants of constant color (black or white, in our example) are represented explicitly; their subquadrants are implicit.",algorithms and data structures.pdf "(black or white, in our example) are represented explicitly; their subquadrants are implicit. The quadtree in Exhibit 23.2 is interpreted as follows. Of the four children of the root, the northwest quadrant, labeled 1, is simple: entirely white. This fact is recorded in the root. The other three children, labeled 0, 2, and 3, contain both black and white pixels. As their description is not simple, it is contained in three quadtrees, one for each quadrant. Pointers to these subquadtrees emanate from the corresponding fields of the root. The southwestern quadrant labeled 2 in turn has four quadrants at depth 2. Three of these, labeled 2.0, 2.1, and 2.2, are entirely white; no pointers emanate from the corresponding fields in this node. Subquadrant 2.3 contains both black and white pixels; thus the corresponding field contains a pointer to a sub-subquadtree. In this discussion we have introduced a notation to identify every quadrant at any depth of the quadtree. The",algorithms and data structures.pdf "In this discussion we have introduced a notation to identify every quadrant at any depth of the quadtree. The root is identified by the null string; a quadrant at depth d is uniquely identified by a string of d radix-4 digits. This string can be interpreted in various ways as a number expressed in base 4. Thus accessing and processing a quadtree is readily reduced to arithmetic. Breadth-first addressing Label the root 0, its children 1, 2, 3, 4, its grand children 5 through 20, and so on, one generation after the other. Algorithms and Data Structures 256 A Global Text",algorithms and data structures.pdf "23. Metric data structures 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Notice that the children of any node i are 4 · i + 1, 4 · i + 2, 4 · i + 3, 4 · i + 4. The parent of node i is ( i – 1) div 4. This is similar to the address computation used in the heap of “Implicit data structures”, a binary tree where each node i has children 2 · i and 2 · i + 1; and the parent of node i is obtained as i div 2. Exercise The string of radi x 4 digits along a path from the root to any node is called the path address of this node. Interpret the path address as an integer, most significant digit first. These integers label the nodes at depth d > 0 consecutively from 0 to 4 d – 1. Devise a formula that transforms the path address into the breadth-first address. This formula can be used to store a quadtree as a one-dimensional array. Data compression The representation of an image as a quadtree is sometimes much more compact than its representation as a bit",algorithms and data structures.pdf "Data compression The representation of an image as a quadtree is sometimes much more compact than its representation as a bit map. Two conditions must hold for this to be true: 1. The image must be fairly large, typically hundreds of pixels on a side. 2. The image must have large areas of constant value (color). The quadtree for the quarter circle above, for example, has only 14 nodes. A bit map of the same image requires 256 bits. Which representation requires more storage? Certainly the quadtree. If we store it as a list, each node must be able to hold four pointers, say 4 or 8 bytes. If a pointer has value 'nil', indicating that its quadrant needs no refinement, we need a bit to indicate the color of this quadrant (white or black), or a total of 4 bits. If we store the quadtree breadth-first, no pointers are needed as the node relationships are expressed by address computation;",algorithms and data structures.pdf "quadtree breadth-first, no pointers are needed as the node relationships are expressed by address computation; thus a node is reduced to four three-valued fields ('white', 'black', or 'refine'), conveniently stored in 8 bits, or 1 byte. This implicit data structure will leave many unused holes in memory. Thus quadtrees do not achieve data compression for small images. Octtrees Exactly the same idea for three-dimensional space as quadtrees are for two-dimensional space: A cube is recursively partitioned into eight octants, using three orthogonal planes. Spatial data structures: objectives and constraints Metric data structures are used primarily for storing spatial data, such as points and simple geometric objects embedded in a multidimensional space. The most important objectives a spatial data structure must meet include: 1. Efficient handling of large, dynamically varying data sets in interactive applications",algorithms and data structures.pdf "1. Efficient handling of large, dynamically varying data sets in interactive applications 2. Fast access to objects identified in a fully specified query 3. Efficient processing of proximity queries and region queries of arbitrary shape 4. A uniformly high memory utilization Achieving these objectives is subject to many constraints, and results in trade-offs. Managing disks. By ""large data set"" we mean one that must be stored on disk; only a small fraction of the data can be kept in central memory at any one time. Many data structures can be used in central memory, but the choice is much more restricted when it comes to managing disks because of the well-known ""memory speed gap"" 257",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License phenomenon. Central memory is organized in small physical units (a byte, a word) with access times of approximately 1 microsecond, 10 –6 second. Disks are organize in large physical blocks (512 bytes to 5kilobytes) with access times ranging from 10 to 100 milliseconds (10–2 to 10–1 second). Compared to central memory, a disk delivers data blocks typically 10 3 times larger with a delay 10 4 times greater. In terms of the data rate delivered to the central processing unit: the disk is a storage device whose effectiveness is within an order of magnitude of that of central memory. The large size of a physical disk block is a potential source of inefficiency that can easily reduce the useful data rate of a disk a hundredfold or a thousandfold. Accessing a couple of bytes on disk, say a pointer needed to traverse a list, takes",algorithms and data structures.pdf "hundredfold or a thousandfold. Accessing a couple of bytes on disk, say a pointer needed to traverse a list, takes about as long as accessing the entire disk block. Thus the game of managing disks is about minimizing the number of disk accesses. Dynamically varying data. The majority of computer applications today are interactive. That means that insertions, deletions, and modifications of data are at least as frequent as operations that merely process fixed data. Data structures that entail a systematic degradation of performance with continued use (such as ever-lengthening overflow chains, or an ever-increasing number of cells marked ""deleted"" in a conventional hash table) are unsuitable. Only structures that automatically adapt their shape to accommodate ever-changing contents can provide uniform response times. Instantaneous response. Interactive use of computers sets another major challenge for data management:",algorithms and data structures.pdf "provide uniform response times. Instantaneous response. Interactive use of computers sets another major challenge for data management: the goal of providing ""instantaneous response"" to a fully specified query. ""Fully"" specified means that every attribute relevant for the search has been provided, and that at most one element satisfies the query. Imagine the user clicking an icon on the screen, and the object represented by the icon appears instantaneously. In human terms, ""instantaneous"" is a well-defined physiological quantity, namely, about of a second, the limit of human time resolution. Ideally, an interactive system retrieves any single element fully specified in a query within 0.1 second. Two-disk-access principle. We have already stated that in today's technology, a disk access typically takes from tens of milliseconds. Thus the goal of retrieving any single element in 0.1 second translates into ""retrieve any",algorithms and data structures.pdf "from tens of milliseconds. Thus the goal of retrieving any single element in 0.1 second translates into ""retrieve any element in at most a few disk accesses"". Fortunately, it turns out that useful data structure can be designed that access data in a two-step process: (1) access the correct portion of a directory, and (2) access the correct data bucket. Under the assumption that both data and directory are so large that they are stored on disk, we call this the two-disk-access principle. Proximity queries and region queries of arbitrary shape . The simplest example of a proximity query is the operation 'next', which we have often encountered in one-dimensional data structure traversals: Given a pointer to an element, get the next element (the successor or the predecessor) accor ding to the order defined on the domain. Another simple example is an interval or range query such as ""get all x between 13 and 17"". This",algorithms and data structures.pdf "domain. Another simple example is an interval or range query such as ""get all x between 13 and 17"". This generalizes directly to k-dimensional orthogonal range queries such as the two-dimensional query ""get all (x 1, x2) with 13 ≤ x1 < 17 and 3 ≤ x2 < 4"". In geometric computation, for example, many other instances of proximity queries are important, such as the ""nearest neighbor "" (in any direction), or intersection queries among objects. Region queries of arbitrary shape (not just rectangular) are able to express a variety of geometric conditions. Algorithms and Data Structures 258 A Global Text",algorithms and data structures.pdf "23. Metric data structures Uniformly high memory utilization. Any data structure that adapts its shape to dynamically changing contents is likely to leave ""unused holes"" in storage space: space that is currently unused, and that cannot conveniently be used for other purposes because it is fragmented. We have encountered this phenomenon in multiway trees such as B-trees and in hash tables. It is practically unavoidable that dynamic data structures use their allocated space to less than 100%, and an average space utilization of 50% is often tolerable. The danger to avoid is a built-in bias that drives space utilization toward 0 when the file shrinks—elements get deleted but their space is not relinquished. The grid file, to be discussed next, achieves an average memory utilization of about 70% regardless of the mix of insertions or deletions. The grid file",algorithms and data structures.pdf "regardless of the mix of insertions or deletions. The grid file The grid file is a metric data structure designed to store points and simple geometric objects in multidimensional space so as to achieve the objectives stated above. This section describes its architecture, access and update algorithms, and properties. More details can be found in [NHS 84] and [Hin 85]. Scales, directory, buckets Consider as an example a two-dimensional domain: the Cartesian product X1 × X2, where X 1 = 0 .. 1999 is a subrange of the integers, and X 2 = a .. z is the ordered set of the 26 characters of the English alphabet. Pairs of the form (x1, x2), such as (1988, w), are elements from this domain. The bit map is a natural data structure for storing a set S of elements from X1 × X2. It may be declared as var T: array[X1, X2] of boolean; with the convention that T[x1, x2] = true ⇔ (x1, x2) ∈ S.",algorithms and data structures.pdf "var T: array[X1, X2] of boolean; with the convention that T[x1, x2] = true ⇔ (x1, x2) ∈ S. Basic set operations are performed by direct access to the array element corresponding to an element: find(x 1, x2) is simply the boolean expression T[x1, x2]; insert(x1, x2) is equivalent to T[x1, x2]:= 'true', delete(x1, x2) is equivalent to T[x 1, x 2] := 'false'. The bit map for our small domain requires an affordable 52k bits. Bit maps for realistic examples are rarely affordable, as the following reasoning shows. First, consider that x and y are just keys of records that hold additional data. If space is reserved in the array for this additional data, an array element is not a bit but as many bytes as are needed, and all the absent records, for elements (x 1, x2) ∉ S, waste a lot of storage. Second, most domains are much larger than the example above: the three-dimensional Euclidean space, for",algorithms and data structures.pdf "Second, most domains are much larger than the example above: the three-dimensional Euclidean space, for example, with elements (x, y, z) taken as triples of 32-bit integers, or 64-bit floating-point numbers, requires bit maps of about 1030 and 1060 bits, respectively. For comparison's sake: a large disk has about 1010 bits. Since large bit maps are extremely sparsely populated, they are amenable to data compression. The grid file is best understood as a practical data compression technique that stores huge, sparsely populated bit maps so as to support direct access. Returning to our example, imagine a historical database indexed by the year of birth and the first letter of the name of scientists: thus we find 'John von Neumann' under (1903, v). Our database is pictured as a cloud of points in the domain shown in Exhibit 23.3; because we have more scientists (or at least, more records) in",algorithms and data structures.pdf "cloud of points in the domain shown in Exhibit 23.3; because we have more scientists (or at least, more records) in recent years, the density increases toward the right. Storing this database implies packing the records into buckets of fixed capacity to hold c (e.g. c = 3) records. The figure shows the domain partitioned by orthogonal hyperplanes into box-shaped grid cells, none of which contains more than c points. 259",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 23.3: Cells of a grid partition adapt their size so that no cell is populated by more than c points. A grid file for this database contains the following components: • Linear scales show how the domain is currently partitioned. • The directory is an array whose elements are in one-to-one correspondence with the grid cells; each entry points to a data bucket that holds all the records of the corresponding grid cell. Access to the record (1903, v) proceeds through three steps: 1. Scales transform key values to array indices: (1903, v) becomes (5, 4). Scales contain small amounts of data, which is kept in central memory; thus this step requires no disk access. 2. The index tuple (5, 4) provides direct access to the correct element of the directory. The directory may be large and occupy many pages on disk, but we can compute the address of the correct directory page and in",algorithms and data structures.pdf "large and occupy many pages on disk, but we can compute the address of the correct directory page and in one disk access retrieve the correct directory element. 3. The directory element contains a pointer (disk address) of the correct data bucket for (1903, v), and the second disk access retrieves the correct record: [(1903, v), John von Neumann …]. Disk utilization The grid file does not allocate a separate bucket to each grid cell —that would lead to an unacceptably low disk utilization. Exhibit 23.4 suggests, for example, that the two grid cells at the top right of the directory share the same bucket. How this bucket sharing comes about, and how it is maintained through splitting of overflowing buckets, and merging sparsely populated buckets, is shown in the following. Algorithms and Data Structures 260 A Global Text",algorithms and data structures.pdf "23. Metric data structures Exhibit 23.4: The search for a record with key values (1903, v) starts with the scales and proceeds via the directory to the correct data bucket on disk. The dynamics of splitting and merging The dynamic behavior of the grid file is best explained by tracing an example: we show the effect of repeated insertions in a two-dimensional file. Instead of showing the grid directory, whose elements are in one-to-one correspondence with the grid blocks, we draw the bucket pointers as originating directly from the grid blocks. Initially, a single bucket A, of capacity c = 3 in our example, is assigned to the entire domain ( Exhibit 23.5 ). When bucket A overflows, the domain is split, a new bucket B is made available, and those records that lie in one half of the space are moved from the old bucket to the new one ( Exhibit 23.6). If bucket A overflows again, its grid",algorithms and data structures.pdf "half of the space are moved from the old bucket to the new one ( Exhibit 23.6). If bucket A overflows again, its grid block (i.e. the left half of the space) is split according to some splitting policy: We assume the simplest splitting policy of alternating directions. Those records of A that lie in the lower-left grid block of Exhibit 23.7 are moved to a new bucket C. Notice that as bucket B did not overflow, it is left alone: Its region now consists of two grid blocks. For effective memory utilization it is essential that in the process of refining the grid partition we need not necessarily split a bucket when its region is split. Exhibit 23.5: A growing grid file starts with a single bucket allocated to the entire key space. 261",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 23.6: An overflowing bucket triggers a refinement of the space partition. Exhibit 23.7: Bucket A has been split into A and C, but the contents of B remain unchanged. Assuming that records keep arriving in the lower-left corner of the space, bucket C will overflow. This will trigger a further refinement of the grid partition as shown in Exhibit 23.8, and a splitting of bucket C into C and D. The history of repeated splitting can be represented in the form of a binary tree, which imposes on the set of buckets currently in use (and hence on the set of regions of these buckets) a twin system (also called a buddy system): Each bucket and its region have a unique twin from which it split off. In Exhibit 23.8, C and D are twins, the pair (C, D) is A's twin, and the pair (A, (C, D)) is B's twin. Exhibit 23.8: Bucket regions that span several cells ensure high disk utilization.",algorithms and data structures.pdf "A's twin, and the pair (A, (C, D)) is B's twin. Exhibit 23.8: Bucket regions that span several cells ensure high disk utilization. Deletions trigger merging operations. In contrast to one-dimensional storage, where it is sufficient to merge buckets that split earlier, merging policies for multidimensional grid files need to be more general in order to maintain a high occupancy. Algorithms and Data Structures 262 A Global Text",algorithms and data structures.pdf "23. Metric data structures Simple geometric objects and their parameter spaces Consider a class of simple spatial objects, such as aligned rectangles in the plane (i.e. with sides parallel to the axes). Within its class, each object is defined by a small number of parameters. For example, an aligned rectangle is determined by its center (cx, cy) and the half-length of each side, dx and dy. An object defined within its class by k parameters can be considered to be a point in a k-dimensional parameter space. For example, an aligned rectangle becomes a point in four-dimensional space. All of the geometric and topological properties of an object can be deduced from the class it belongs to and from the coordinates of its corresponding point in parameter space. Different choices of the parameter space for the same class of objects are appropriate, depending on",algorithms and data structures.pdf "Different choices of the parameter space for the same class of objects are appropriate, depending on characteristics of the data to be processed. Some considerations that may determine the choice of parameters are: 1. Distinction between location parameters and extension parameters. For some classes of simple objects it is reasonable to distinguish location parameters, such as the center (cx, cy) of an aligned rectangle, from extension parameters, such as the half-sides dx and dy. This distinction is always possible for objects that can be described as Cartesian products of spheres of various dimensions. For example, a rectangle is the product of two one-dimensional spheres, a cylinder the product of a one-dimensional and a two- dimensional sphere. Whenever this distinction can be made, cone-shaped search regions generated by proximity queries as described in the next section have a simple intuitive interpretation: The subspace of",algorithms and data structures.pdf "proximity queries as described in the next section have a simple intuitive interpretation: The subspace of the location parameters acts as a ""mirror"" that reflects a query. 2. Independence of parameters, uniform distribution. As an example, consider the class of all intervals on a straight line. If intervals are represented by their left and right endpoints, lx and rx, the constraint lx ≤ rx restricts all representations of these intervals by points (lx, rx) to the triangle above the diagonal. Any data structure that organizes the embedding space of the data points, as opposed to the particular set of points that must be stored, will pay some overhead for representing the unpopulated half of the embedding space. A coordinate transformation that distributes data all over the embedding space leads to more efficient storage. The phenomenon of nonuniform data distribution can be worse than this. In most applications, the",algorithms and data structures.pdf "storage. The phenomenon of nonuniform data distribution can be worse than this. In most applications, the building blocks from which complex objects are built are much smaller than the space in which they are embedded, as the size of a brick is small compared to the size of a house. If so, parameters such as lx and rx that locate boundaries of an object are highly dependent on each other. Exhibit 23.9 shows short intervals on a long line clustering along the diagonal, leaving large regions of a large embedding space unpopulated; whereas the same set of intervals represented by a location parameter cx and an extension parameter dx fills a smaller embedding space in a much more uniform way. With the assumption of bounded dx, this data distribution is easier to handle. 263",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 23.9: A set of intervals represented in two different parameter spaces. Region queries of arbitrary shape Intersection is a basic component of other proximity queries, and thus deserves special attention. CAD design rules, for example, often require different objects to be separated by some minimal distance. This is equivalent to requiring that objects surrounded by a rim do not intersect. Given a subset Γ of a class of simple spatial objects with parameter space H, we consider two types of queries: • point query Given a query point q, find all objects A ∈ Γ for which q ∈ A. • point set query Given a query set Q of points, find all objects A ∈ Γ that intersect Q. Point query. For a query point q compute the region in H that contains all points representing objects in Γ that overlap q. 1. Consider the class of intervals on a straight line. An interval given by its center cx and its half length dx",algorithms and data structures.pdf "overlap q. 1. Consider the class of intervals on a straight line. An interval given by its center cx and its half length dx overlaps a point q with coordinate qx if and only if cx – dx ≤ qx ≤ cx + dx. 2. The class of aligned rectangles in the plane (with parameters cx, cy, dx, dy) can be treated as the Cartesian product of two classes of intervals, one along the x-axis, the other along the y-axis ( Exhibit 23.10 ). All rectangles that contain a given point q are represented by points in four-dimensional space that lie in the Cartesian product of two point-in-interval query regions. The region is shown by its projections onto the cx- dx plane and the cy-dy plane. Algorithms and Data Structures 264 A Global Text",algorithms and data structures.pdf "23. Metric data structures Exhibit 23.10: A set of aligned rectangles represented as a set of points in a four-dimensional parameter space. A point query is transformed into a cone-shaped region query. 3. Consider the class of circles in the plane. We represent a circle as a point in three-dimensional space by the coordinates of its center (cx, cy) and its radius r as parameters. All circles that overlap a point q are represented in the corresponding three-dimensional space by points that lie in the cone with vertex q shown in Exhibit 23.11 . The axis of the cone is parallel to the r-axis (the extension parameter), and its vertex q is considered a point in the cx-cy plane (the subspace of the location parameters). Exhibit 23.11: Search cone for a point query for circles in the plane. Point set query. Given a query set Q of points, the region in H that contains all points representing objects A",algorithms and data structures.pdf "Point set query. Given a query set Q of points, the region in H that contains all points representing objects A ∈ Γ that intersect Q is the union of the regions in H that results from the point queries for each point q ∈ Q. The union of cones is a particularly simple region in H if the query set Q is a simple spatial object. 265",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 1. Consider the class of intervals on a straight line. An interval i = (cx, dx) intersects a query interval Q = (cq, dq) if and only if its representing point lies in the shaded region shown in Exhibit 23.12; this region is given by the inequalities cx – dx ≤ cq + dq and cx + dx ≥ cq – dq. Exhibit 23.12: An interval query, as a union of point queries, again gets transformed into a search cone. 2. The class of aligned rectangles in the plane is again treated as the Cartesian product of two classes of intervals, one along the x-axis, the other along the y-axis. If Q is also an aligned rectangle, all rectangles that intersect Q are represented by points in four-dimensional space lying in the Cartesian product of two interval intersection query regions. 3. Consider the class of circles in the plane. All circles that intersect a line segment L are represented by points",algorithms and data structures.pdf "3. Consider the class of circles in the plane. All circles that intersect a line segment L are represented by points lying in the cone-shaped solid shown in Exhibit 23.13. This solid is obtained by embedding L in the cx-cy plane, the subspace of the location parameters, and moving the cone with vertex at q along L. Algorithms and Data Structures 266 A Global Text",algorithms and data structures.pdf "23. Metric data structures Exhibit 23.13: Search region as a union of cones. Evaluating region queries with a grid file We have seen that proximity queries on spatial objects lead to search regions significantly more complex than orthogonal range queries. The grid file allows the evaluation of irregularly shaped search regions in such a way that the complexity of the region affects CPU time but not disk accesses. The latter limits the performance of a data base implementation. A query region Q is matched against the scales and converted into a set I of index tuples that refer to entries in the directory. Only after this preprocessing do we access disk to retrieve the correct pages of the directory and the correct data buckets whose regions intersect Q (Exhibit 23.14). Exhibit 23.14: The cells of a grid partition that overlap an arbitrary query region Q are determined by merely looking up the scales. Interaction between query processing and data access",algorithms and data structures.pdf "merely looking up the scales. Interaction between query processing and data access The point of the two preceding sections was to show that in a metric data structure, intricate computations triggered by proximity queries can be preprocessed to a remarkable extent before the objects involved are retrieved. 267",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Query preprocessing may involve a significant amount of computation based on small amounts of auxiliary data — the scales and the query —that are kept in central memory. The final access of data from disk is highly selective — data retrieved has a high chance of being part of the answer. Contrast this to an approach where an object can be accessed only by its name (e.g. the part number) because the geometric information about its location in space is only included in the record for this object but is not part of the accessing mechanism. In such a database, all objects might have to be retrieved in order to determine which ones answer the query. Given that disk access is the bottleneck in most database applications, it pays to preprocess queries as much as possible in order to save disk accesses. The integration of query processing and accessing mechanism developed in the preceding sections was made",algorithms and data structures.pdf "The integration of query processing and accessing mechanism developed in the preceding sections was made possible by the assumption of simple objects, where each instance is described by a small number of parameters. What can we do when faced with a large number of irregularly shaped objects? Complex, irregularly shaped spatial objects can be represented or approximated by simpler ones in a variety of ways, for example: decomposition, as in a quad tree tessellation of a figure into disjoint raster squares; representation as a cover of overlapping simple shapes; and enclosing each object in a container chosen from a class of simple shapes. The container technique allows efficient processing of proximity queries because it preserves the most important properties for proximity-based access to spatial objects, in particular: It does not break up the",algorithms and data structures.pdf "the most important properties for proximity-based access to spatial objects, in particular: It does not break up the object into components that must be processed separately, and it eliminates many potential tests as unnecessary (if two containers don't intersect, the objects within won't either). As an example, consider finding all polygons that intersect a given query polygon, given that each of them is enclosed in a simple container such as a circle or an aligned rectangle. Testing two polygons for intersection is an expensive operation compared to testing their containers for intersection. The cheap container test excludes most of the polygons from an expensive, detailed intersection check. Any approximation technique limits the primitive shapes that must be stored to one or a few types: for example, aligned rectangles or boxes. An instance of such a type is determined by a few parameters, such as coordinates of its",algorithms and data structures.pdf "aligned rectangles or boxes. An instance of such a type is determined by a few parameters, such as coordinates of its center and its extension, and can be considered to be a point in a (higher-dimensional) parameter space. This transformation reduces object storage to point storage, increasing the dimensionality of the problem without loss of information. Combined with an efficient multi-dimensional data structure for point storage it is the basis for an effective implementation of databases for spatial objects. Exercises 1. Draw three quadtrees, one for each of the 4 · 8 pixel rectangles A, B and C outlined in Exhibit 23.15. Algorithms and Data Structures 268 A Global Text",algorithms and data structures.pdf "23. Metric data structures Exhibit 23.15: The location of congruent objects greatly affects the complexity of a quadtree representation. 2. Consider a g rid file that stores points lying in a two-dimensional domain: the Cartesian product X1 × X2, where X1 = 0 .. 15 and X2 = 0 .. 15 are subranges of the integers. Buckets have a capacity of two points. (a) Insert the points (2, 3), (13, 14), (3, 5), (6, 9), (10, 13), (11, 5), (14, 9), (7, 3), (15, 11), (9, 9), and (11, 10) into the initially empty grid file and show the state of the scales, the directory, and the buckets after each insert operation. Buckets are split such that their shapes remain as quadratic as possible. (b) Delete the points (10, 13), (9, 9), (11, 10), and (14, 9) from the grid file obtained in a) and show the state of the scales, the directory, and the buckets after each delete operation. Assume that after deleting a",algorithms and data structures.pdf "of the scales, the directory, and the buckets after each delete operation. Assume that after deleting a point in a bucket this bucket may be merged with a neighbor bucket if their joint occupancy does not exceed two points. Further, a boundary should be removed from its scale if there is no longer a bucket that is split with respect to this boundary. (c) Without imposing further restrictions a deadlock situation may occur after a sequence of delete operations: No bucket can merge with any of its neighbors, since the resulting bucket region would no longer be rectangular. In the example shown in Exhibit 23.16 the shaded ovals represent bucket regions. Devise a merging policy that prevents such deadlocks from occurring in a two-dimensional grid file. 269",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 23.16: This example shows bucket regions that cannot be merged pairwise. 3. Consider the class of circles in the plane represented as points in three-dimensional parameter space as proposed in chapter 23 in the section “Region queries of arbitrary shape”. Describe the search regions in the parameter space (a) for all the circles intersecting a given circle C, (b) for all the circles contained in C, and (c) for all the circles enclosing . Algorithms and Data Structures 270 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Part VI: Interaction between algorithms and data structures: case studies in geometric computation Organizing and processing Euclidean space In Part III we presented a varied sample of algorithms that use simple, mostly static, data structures. Part V was dedicated to dynamic data structures, and we presented the corresponding access and update algorithms. In this final part we illustrate the use of these dynamic data structures by presenting algorithms whose efficiency depends crucially on them, in particular on priority queues and dictionaries. We choose these algorithms from computational geometry, a recently developed discipline of great practical importance with applications in computer graphics, computer-aided design, and geographic databases. If data structures are tools for organizing sets of data and their relationships, geometric data processing poses",algorithms and data structures.pdf "If data structures are tools for organizing sets of data and their relationships, geometric data processing poses one of the most challenging tests. The ability to organize data embedded in the Euclidean space in such a way as to reflect the rich relationships due to location (e.g. touching or intersecting, contained in, distance) is of utmost importance for the efficiency of algorithms for processing spatial data. Data structures developed for traditional commercial data processing were often based on the concept of one primary key and several subordinate secondary keys. This asymmetry fails to support the equal role played by the Cartesian coordinate axes x, y, z, … of Euclidean space. If one spatial axis, say x, is identified as the primary key, there is a danger that queries involving the other axes, say y and z, become inordinately cumbersome to process, and therefore slow. For the sake of simplicity we",algorithms and data structures.pdf "axes, say y and z, become inordinately cumbersome to process, and therefore slow. For the sake of simplicity we concentrate on two-dimensional geometric problems, and in particular on the highly successful class of plane- sweep algorithms. Sweep algorithms do a remarkably good job at processing two-dimensional space efficiently using two distinct one-dimensional data structures, one for organizing the x-axis, the other for the y-axis. Algorithms and Data Structures 271 A Global Text",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 24. Sample problems and algorithms Learning objectives: • The nature of geometric computation: three problems and algorithms chosen to illustrate the variety of issues encountered: • Convex hull yields to simple and efficient algorithms, straightforward to implement and analyze. • Objects with special properties, such as convexity, are often much simpler to process than are general objects. • Visibility problems are surprisingly complex; even if this complexity does not show in the design of an algorithm, it sneaks into its analysis. Geometry and geometric computation Classical geometry, shaped by the ancient Greeks, is more axiomatic than constructive: It emphasizes axioms, theorems, and proofs, rather than algorithms. The typical statement of Euclidean geometry is an assertion about all geometric configurations with certain properties (e.g. the theorem of Pythagoras: ""In a right-angled triangle, the",algorithms and data structures.pdf "geometric configurations with certain properties (e.g. the theorem of Pythagoras: ""In a right-angled triangle, the square on the hypotenuse c is equal to the sum of the squares on the two catheti a and b: c 2 = a 2 + b 2"") or an assertion of existence (e.g. the parallel axiom: ""Given a line L and a point P ∉ L, there is exactly one line parallel to L passing through P""). Constructive solutions to problems do occur, but the theorems about the impossibility of constructive solutions steal the glory: ""You cannot trisect an arbitrary angle using ruler and compass only,"" and the proverbial ""It is impossible to square the circle."" Computational geometry, on the other hand, starts out with problems of construction so simple that, until the 1970s, they were dismissed as trivial: ""Given n line segments in the plane, are they free of intersections? If not, compute (construct) all intersections."" This problem is only trivial with respect to the existence of a constructive",algorithms and data structures.pdf "compute (construct) all intersections."" This problem is only trivial with respect to the existence of a constructive solution. As we will soon see, the question is far from trivial if interpreted as: How efficiently can we obtain the answer? Computational geometry has some appealing features that make it ideal for learning about algorithms and data structures: (a) The problem statements are easily understood, intuitively meaningful, and mathematically rigorous; right away the student can try his own hand a t solving them, without having to worry about hidden subtleties or a lot of required background knowledge. (b) Problem statement, solution, and every step of the construction have natural visual representations that support abstract thinking and help in detecting errors of reasoning. (c) These algorithms are practical; it is easy to come up with examples where they can be applied.",algorithms and data structures.pdf "algorithms are practical; it is easy to come up with examples where they can be applied. Appealing as geometric computation is, writing geometric programs is a demanding task. Two traps lie hiding behind the obvious combinatorial intricacies that must be mastered, and they are particularly dangerous when they occur together: (a) degenerate configurations, and (b) the pitfalls of numerical computation due to discretization and rounding errors. Degenerate configurations, such as those we discussed in “Straight lines and circles” on Algorithms and Data Structures 272 A Global Text",algorithms and data structures.pdf "24. Sample problems and algorithms intersecting line segments, are special cases that often require special code. It is not always easy to envision all the kinds of degeneracies that may occur in a given problem. A configuration may be degenerate for a specific algorithm, whereas it may be nondegenerate for a different algorithm solving the same problem. Rounding errors tend to cause more obviously disastrous consequences in geometric computation than, say, in linear algebra or differential equations. Whereas the traditional analysis of rounding errors focuses on bounding their cumulative value, geometry is concerned primarily with a stringent all-or-nothing question: Have errors impaired the topological consistency of the data? (Remember the pathology of the braided straight lines.) In this Part VI we aim to introduce the reader to some of the central ideas and techniques of computational",algorithms and data structures.pdf "In this Part VI we aim to introduce the reader to some of the central ideas and techniques of computational geometry. For simplicity's sake we limit coverage to two-dimensional Euclidean geometry - most problems become a lot more complicated when we go from two- to three-dimensional configurations. We focus on a type of algorithm that is remarkably well suited for solving two-dimensional problems efficiently: sweep algorithms. To illustrate their generality and effectiveness, we use plane-sweep to solve several rather distinct problems. We will see that sweep algorithms for different problems can be assembled from the same building blocks: a skeleton sweep program that sweeps a line across the plane based on a queue of events to be processed, and transition procedures that update the data structures (a dictionary or table, and perhaps other structures) at each event and maintain a",algorithms and data structures.pdf "that update the data structures (a dictionary or table, and perhaps other structures) at each event and maintain a geometric invariant. Sweeps show convincingly how the dynamic data structures of Part V are essential for the efficiency. The problems and algorithms we discuss deal with very simple objects: points and line segments. Applications of geometric computation such as CAD, on the other hand, typically deal with very complex objects made up of thousands of polygons. The simplicity of these algorithms does not deter from their utility. Complex objects get processed by being broken into their primitive parts, such as points, line segments, and triangles. The algorithms we present are some of the most basic subroutines of geometric computation, which play a role analogous to that of a square root routine for numerical computation: As they are called untold times, they must be correct and efficient. Convex hull: a multitude of algorithms",algorithms and data structures.pdf "Convex hull: a multitude of algorithms The problem of computing the convex hull H(S) of a set S consisting of n points in the plane serves as an example to demonstrate how the techniques of computational geometry yield the concise and elegant solution that we presented in “Algorithm animation”. The convex hull of a set S of points in the plane is the smallest convex polygon that contains the points of S in its interior or on its boundary. Imagine a nail sticking out above each point and a tight rubber band surrounding the set of nails. Many different algorithms solve this simple problem. Before we present in detail the algorithm that forms the basis of the program 'ConvexHull' of chapter 3, we briefly illustrate the main ideas behind three others. Most convex hull algorithms have an initialization step that uses the fact that we can easily identify two points of S that",algorithms and data structures.pdf "convex hull algorithms have an initialization step that uses the fact that we can easily identify two points of S that lie on the convex hull H(S): for example, two points Pmin and P max with minimal and maximal x-coordinate, respectively. Algorithms that grow convex hulls over increasing subsets can use the segment as a (degenerate) convex hull to start with. Other algorithms use the segment to partition S into an upper and a lower subset, and compute the upper and the lower part of the hull H(S) separately. 1. Jarvis's march [Jar 73] starts at a point on H(S), say P min, and 'walks around' by computing, at each point P, the next tangent to S, characterized by the property that all points of S lie on the same side of PQ 273",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 24.1: The ""gift-wrapping"" approach to building the convex hull. 2. Divide-and-conquer comes to mind: Sort the points of S according to their x-coordinate, use the median x- coordinate to partition S into a left half SL and a right half SR, apply this convex hull algorithm recursively to each half, and merge the two solutions H(S L) and H(SR) by computing the two common exterior tangents to H(SL) and H(SR) (Exhibit 24.2). Terminate the recursion when a set has at most three points. Exhibit 24.2: Divide-and-conquer applies to many problems on spatial data. 3. Quickhull [Byk 78], [Edd 77], [GS 79] uses divide-and-conquer in a different way. We start with two points on the convex hull H(S), say P min and Pmax. In general, if we know ≥ 2 points on H(S), say P, Q, R in Exhibit 24.3, these define a convex polygon contained in H(S). (Draw the appropriate picture for just two points",algorithms and data structures.pdf "24.3, these define a convex polygon contained in H(S). (Draw the appropriate picture for just two points Pmin and P max on the convex hull.) There can be no points of S in the shaded sectors that extend outward from the vertices of the current polygon, PQR in the example. Any other points of S must lie either in the polygon PQR or in the regions extending outward from the sides. Exhibit 24.3: Three points known to lie on the convex hull identify regions devoid of points. For each side, such as PQ in Exhibit 24.4, let T be a point farthest from PQ among all those in the region extending outward from PQ, if there are any. T must lie on the convex hull, as is easily seen by considering Algorithms and Data Structures 274 A Global Text",algorithms and data structures.pdf "24. Sample problems and algorithms the parallel to PQ that passes through T. Having processed the side PQ, we extend the convex polygon to include T, and we now must process 2 additional sides,PT and TQ. The reader will observe a formal analogy between quicksort (“Sorting and its complexity”) and quickhull, which has given the latter its name. Exhibit 24.4: The point T farthest from identifies a new region of exclusion (shaded). 4. In an incremental scan or sweep we sort the points of S according to their x-coordinates, and use the segment PminPmax to partition S into an upper subset and a lower subset, as shown in Exhibit 24.5 . For simplicity of presentation, we reduce the problem of computing H(S) to the two separate problems of computing the upper hull U(S) [i.e. the upper part of H(S)], shown in bold, and the lower hull L(S), drawn as a thin line. Our notation and pictures are chosen to describe U(S).",algorithms and data structures.pdf "as a thin line. Our notation and pictures are chosen to describe U(S). Exhibit 24.5: Separate computations for the upper hull and the lower hull. Let P1, … , P n be the points of S sorted by x-coordinate, and let U i = U(P1, … , P i) be the upper hull of the first i points. U1 = P1 may serve as an initialization. For i = 2 to n we compute U i from Ui–1, as Exhibit 24.6 shows. Starting with the tentative tangent PiPi–1 shown as a thin dashed line, we retrace the upper hull U i–1 until we reach the actual tangent: in our example, the bold dashed line PiP2. The tangent is characterized by the fact that for j = 1, … , i–1, it minimizes the angle Ai,j between PiPj and the vertical. 275",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 24.6: Extending the partial upper hull U(P1, … , Pi–1) to the next point Pi The program 'ConvexHull' presented in “Algorithm animation” as an example for algorithm animation is written as an on-line algorithm: Rather than reading all the data before starting the computation, it accepts one point at a time, which must lie to the right of all previous ones, and immediately extends the hull U i–1 to obtain U i. Thanks to the input restriction that the points are entered in sorted order, 'ConvexHull' becomes simpler and runs in linear time. This explains the two-line main body: PointZero; { sets first point and initializes all necessary variables } while NextRight do ComputeTangent; There remain a few programming details that are best explained by relating Fig. 24.6 to the declarations: var x, y, dx, dy: array[0 .. nmax] of integer; b: array[0 .. nmax] of integer; { backpointer }",algorithms and data structures.pdf "var x, y, dx, dy: array[0 .. nmax] of integer; b: array[0 .. nmax] of integer; { backpointer } n: integer; { number of points entered so far } px, py: integer; { new point } The coordinates of the points P i are stored in the arrays x and y. Rather than storing angles such as A i,j, we store quantities proportional to cos(Ai,j) and sin(Ai,j) in the arrays dx and dy. The array b holds back pointers for retracing the upper hull back toward the left: b[i] = j implies that P j is the predecessor of P i in U i. This explains the key procedure of the program: procedure ComputeTangent; { from Pn = (px, py) to Un–1 } var i: integer; begin i := b[n]; while dy[n] · dx[i] > dy[i] · dx[n] do begin { dy[n]/dx[n] > dy[i]/dx[i] } i := b[i]; Algorithms and Data Structures 276 A Global Text",algorithms and data structures.pdf "24. Sample problems and algorithms dx[n] := x[n] – x[i]; dy[n] := y[n] – y[i]; MoveTo(px, py); Line(–dx[n], –dy[n]); b[n] := i end; MoveTo(px, py); PenSize(2, 2); Line(–dx[n], –dy[n]); PenNormal end; { ComputeTangent } The algorithm implemented by 'ConvexHull' is based on Graham's scan [Gra 72], where the points are ordered according to the angle as seen from a fixed internal point, and on [And 79]. The uses of convexity: basic operations on polygons The convex hull of a set of points or objects (i.e. the smallest convex set that contains all objects) is a model problem in geometric computation, with many algorithms and applications. Why? As we stated in the introductory section, applications of geometric computation tend to deal with complex objects that often consist of thousands of primitive parts, such as points, line segments, and triangles. It is often effective to approximate a complex",algorithms and data structures.pdf "primitive parts, such as points, line segments, and triangles. It is often effective to approximate a complex configuration by a simpler one, in particular, to package it in a container of simple shape. Many proximity queries can be answered by processing the container only. One of the most frequent queries in computer graphics, for example, asks what object, if any, is first struck by a given ray. If we find that the ray misses a container, we infer that it misses all objects in it without looking at them; only if the ray hits the container do we start the costly analysis of all the objects in it. The convex hull is often a very effective container. Although not as simple as a rectangular box, say, convexity is such a strong geometric property that many algorithms that take time O(n) on an arbitrary polygon of n vertices require only time O(log n) on convex polygons. Let us list several such examples. We assume that a polygon G is",algorithms and data structures.pdf "require only time O(log n) on convex polygons. Let us list several such examples. We assume that a polygon G is given as a (cyclic) sequence of n vertices and/or n edges that trace a closed path in the plane. Polygons may be self- intersecting, whereas simple polygons may not. A simple polygon partitions the plane into two regions: the interior, which is simply connected, and the exterior, which has a hole. Point-in-polygon test Given a simple polygon G and a query point P (not on G), determine whether P lies inside or outside the polygon. Two closely related algorithms that walk around the polygon solve this problem in time O(n). The first one computes the winding number of G around P. Imagine an observer at P looking at a vertex, say V, where the walk starts, and turning on her heels to keep watching the walker ( Exhibit 24.7). The observer will make a first (positive)",algorithms and data structures.pdf "starts, and turning on her heels to keep watching the walker ( Exhibit 24.7). The observer will make a first (positive) turn α , followed by a (negative) turn β, followed by … , until the walker returns to the starting vertex V. The sum α + β + … of all turning angles during one complete tour of G is: 2·π if P is inside G, and 0 if P is outside G. 277",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 24.7: Point-in polygon test by adding up all turning angles. The second algorithm computes the crossing number of G with respect to P. Draw a semi-infinite ray R from P in any direction (Exhibit 24.8). During the walk around the polygon G from an arbitrary starting vertex V back to V, keep track of whether the current oriented edge intersects R, and if so, whether the edge crosses R from below (+1) or from above (–1). The sum of all these numbers is +1 if P is inside G, and 0 if P is outside G. Exhibit 24.8: Point-in polygon test by adding up crossing numbers. Point-in-convex-polygon test For a convex polygon Q we use binary search to perform a point-in-polygon test in time O(log n). Consider the hierarchical decomposition of Q illustrated by the convex 12-gon shown in Exhibit 24.9. We choose three",algorithms and data structures.pdf "hierarchical decomposition of Q illustrated by the convex 12-gon shown in Exhibit 24.9. We choose three (approximately) equidistant vertices as the vertices of an innermost core triangle, painted black. ""Equidistant"" here refers not to any Euclidean distance, but rather to the number of vertices to be traversed by traveling along the perimeter of Q. For a query point P we first ask, in time O(1), which of the seven regions defined by the extended edges of this triangular core contains P. These seven regions shown in Exhibit 24.10 are all ""triangles"" (albeit six of them extend to infinity), in the sense that each one is defined as the intersection of three half-spaces. Four of these regions provide a definite answer to the query ""Is P inside Q, or outside Q?"" One region (shown hatched in Exhibit 24.10) provides the answer 'In', three the answer 'Out'. The remaining three regions, labeled 'Uncertain', lead",algorithms and data structures.pdf "24.10) provides the answer 'In', three the answer 'Out'. The remaining three regions, labeled 'Uncertain', lead recursively to a new point-in-convex-polygon test, for the same query point P, but a new convex polygon Q' which is Algorithms and Data Structures 278 A Global Text",algorithms and data structures.pdf "24. Sample problems and algorithms the intersection of Q with one of the uncertain regions. As Q' has only about n / 3 vertices, the depth of recursion is O(log n). Actually, after the first comparison against the innermost triangular core of Q, we have no longer a general point-in-convex-polygon problem, but one with additional information that makes all but the first test steps of a binary search. Exhibit 24.9: Hierarchical approximation of a convex 12-gon as a 3-level tree of triangles. The root is in black, its children are in dark grey, grandchildren in light grey. Exhibit 24.10: The plane partitioned into four regions of certainty and three of uncertainty. The latter are processed recursively. Visibility in the plane: a simple algorithm whose analysis is not Many computer graphics programs are dominated by visibility problems: Given a configuration of objects in",algorithms and data structures.pdf "Many computer graphics programs are dominated by visibility problems: Given a configuration of objects in three-dimensional space, and given a point of view, what is visible? Dozens of algorithms for hidden-line or hidden- surface elimination have been developed to solve this everyday problem that our visual system performs ""at a glance"". In contrast to the problems discussed above, visibility is surprisingly complex. We give a hint of this complexity by describing some of the details buried below the smooth surface of a ""simple"" version: computing the visibility of line segments in the plane. Problem: Given n line segments in the plane, compute the sequence of (sub)segments seen by an observer at infinity (say, at y = –∞). 279",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License The complexity of this problem was unexpected until discovered in 1986 [WS 88]. Fortunately, this complexity is revealed not by requiring complicated algorithms, but in the analysis of the inherent complexity of the geometric problem. The example shown in Exhibit 24.11 illustrates the input data. The endpoints (P 1, P10), (P2, P8), (P5, P12) of the three line segments labeled 1, 2, 3 are given; other points are computed by the algorithm. The required result is a list of visible segments, each segment described by its endpoints and by the identifier of the line of which it is a part: (P1, P3, 1), (P3, P4, 2), (P5, P6, 3), (P6, P8, 2), (P7, P9, 3), (P9, P10, 1), (P11, P12, 3) Exhibit 24.11: Example: Three line segments seen from below generate seven visible subsegments. In se arch of algorithms, the reader is encouraged to work out the details of the first idea that might come to",algorithms and data structures.pdf "In se arch of algorithms, the reader is encouraged to work out the details of the first idea that might come to mind: For each of the n 2 ordered pairs (L i, L j) of line segments, remove from L i the subsegment occluded by L j. Because L i can get cut into as many as n pieces, it must be managed as a sequence of subsegments. Finding the endpoints of Lj in this sequence will take time O(log n), leading to an overall algorithm of time complexity O(n 2 · log n). After the reader has mastered the sweep algorithm for line intersection presented in “Plane-sweep: a general- purpose algorithm for two-dimensional problems illustrated using line segment intersection”, he will see that its straightforward application to the line visibility problem requires time O((n + k) · log n), where k ∈ O(n2) is the number of intersections. Thus plane-sweep appears to do all the work the brute-force algorithm above does,",algorithms and data structures.pdf "number of intersections. Thus plane-sweep appears to do all the work the brute-force algorithm above does, organized in a systematic left-to-right fashion. It keeps track of all intersections, most of which may be invisible. It has the potential to work in time O(n · log n) for many realistic data configurations characterized by k ∈ O(n), but not in the worst case. Divide-and-conquer yields a simple two-dimensional visibility algorithm with a better worst-case performance. If n = 0 or 1, the problem is trivial. If n > 1, partition the set of n line segments into two (approximate) halves, solve both subproblems, and merge the results. There is no constraint on how the set is halved, so the divide step is easy. The conquer step is taken care of by recursion. Merging amounts to computing the minimum of two piecewise (not necessarily continuous) linear functions, in time linear in the number of pieces. The example with n = 4 shown in",algorithms and data structures.pdf "necessarily continuous) linear functions, in time linear in the number of pieces. The example with n = 4 shown in Exhibit 24.12 illustrates the algorithm. f 12 is the visible front of segments 1 and 2, f 34 of segments 3 and 4, min(f 12, f34) of all four segments (Exhibit 24.13). Algorithms and Data Structures 280 A Global Text",algorithms and data structures.pdf "24. Sample problems and algorithms Exhibit 24.12: The four line segments will be partitioned into subsets {1, 2} and {3, 4}. Exhibit 24.13: The min operation merges the solutions of this divide-and-conquer algorithm. The time complexity of this divide-and-conquer algorithm is obtained as follows. Given that at each level of recursion the relevant sets of line segments can be partitioned into (approximate) halves, the depth of recursion is O(log n). A merge step that processes v visible subsegments takes linear time O(v). Together, all the merge steps at 281",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License a given depth process at most V subsegments, where V is the total number of visible subsegments. Thus the total time is bounded by O(V · log n). How large can V be? Surprising theoretical results Let V(n) be the number of visible subsegments in a given configuration of n lines, i.e. the size of the output of the visibility computation. For tiny n, the worst cases [V(2) = 4, V(3) = 8] are shown in Exhibit 24.14. An attempt to find worst-case configurations for general n leads to examples such as that shown in Figure 24.15, with V(n) = 5·n – 8. Exhibit 24.14: Configurations with the largest number of visible subsegments. Figure 24.15: A family of configurations with 5·n – 8 visible subsegments. You will find it difficult to come up with a class of configurations for which V(n) grows faster. It is tempting to",algorithms and data structures.pdf "You will find it difficult to come up with a class of configurations for which V(n) grows faster. It is tempting to conjecture that V(n) ∈ O(n), but this conjecture is very hard to prove - for the good reason that it is false, as was discovered in [WS 88]. It turns out that V(n) ∈ Θ (n · α (n)), where α (n), the inverse of Ackermann's function (see “Computability and complexity”, Exercise 2), is a monotonically increasing function that grows so slowly that for practical purposes it can be treated as a constant, call it α . Let us present some of the steps of how this surprising result was arrived at. Occasionally, simple geometric problems can be tied to deep results in other branches of mathematics. We transform the two-dimensional visibility problem into a combinatorial string problem. By numbering the given line segments, walking along the x-axis from Algorithms and Data Structures 282 A Global Text",algorithms and data structures.pdf "24. Sample problems and algorithms left to right, and writing down the number of the line segment that is currently visible, we obtain a sequence of numbers (Exhibit 24.16). Exhibit 24.16: The Davenport-Schinzel sequence associated with a configuration of segments. A geometric configuration gives rise to a sequence u1, u2, … , um with the following properties: 1. 1 ≤ ui ≤ n for 1 ≤ i ≤ m (numbers identify line segments). 2. ui ≠ ui+1 for 1 ≤ i ≤ m – 1 (no two consecutive numbers are equal). 3. There are no five indices 1 ≤ a < b < c < d < e ≤ m such that u a = uc = ue = r and u b = ud = s, r ≠ s. This condition captures the geometric properties of two intersecting straight lines: If we ever see r, s, r, s (possibly separated), we will never see r again, as this would imply that r and s intersect mo re than once (Exhibit 24.17). Exhibit 24.17: The subsequence r, s, r, s excludes further occurrences of r. Example The sequence for the example above that shows m ≥ 5 n – 8 is",algorithms and data structures.pdf "Exhibit 24.17: The subsequence r, s, r, s excludes further occurrences of r. Example The sequence for the example above that shows m ≥ 5 n – 8 is 1, 2, 1, 3, 1, … , 1, n–1, 1, n–1, n–2, n–3, … , 3, 2, n, 2, n, 3, n, … , n, n–2, n, n–1, n. 283",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Sequences with the properties 1 to 3, called Davenport-Schinzel sequences, have been studied in the context of linear differential equations. The maximal length of a Davenport-Schinzel sequence is k · n · α (n), where k is a constant and α (n) is the inverse of Ackermann's function (see “Computability and complexity”, Exercise 2) [HS 86]. With increasing n, α (n) approaches infinity, albeit very slowly. This dampens the hope for a linear upper bound for the visibility problem, but does not yet disprove the conjecture. For the latter, we need an inverse: For any given Davenport-Schinzel sequence there exists a corresponding geometric configuration which yields this sequence. An explicit construction is given in [WS 88]. This establishes an isomorphism between the two-dimensional visibility problem and the Davenport-Schinzel sequences, and shows that the size of the output of the two-dimensional",algorithms and data structures.pdf "problem and the Davenport-Schinzel sequences, and shows that the size of the output of the two-dimensional visibility problem can be superlinear - a result that challenges our geometric intuition. Exercises 1. Given a set of points S, prove that the pair of points farthest from each other must be vertices of the convex hull H(S). 2. Assume a model of computation in which the operations addition, multiplication, and comparison are available at unit cost. Prove that in such a model Ω (n · log n) is a lower bound for computing, in order, the vertices of the convex hull H(S) of a set S of n points. Hint: Show that every algorithm which computes the convex hull of n given points can be used to sort n numbers. 3. Complete the second algorithm for the point-in-polygon test in chapter 24 in the section “The uses of convexity: basic operations on polygons” which computes the crossing number of the polygon G around",algorithms and data structures.pdf "convexity: basic operations on polygons” which computes the crossing number of the polygon G around point P by addressing the special cases that arise when the semi-infinite ray R emanating from P intersects a vertex of G or overlaps an edge of G. 4. Consider an arbitrary (not necessarily simple) polygon G ( Exhibit 24.18). Provide an interpretation for the winding number w(G, P) of G around an arbitrary point P not on G, and prove that w(G, P) / 2·π of P is always equal to the crossing number of P with respect to any ray R emanating from P. Exhibit 24.18: Winding number and crossing number of a polygon G with respect to P. 5. Design an algorithm that computes the area of an n-vertex simple, but not necessarily convex polygon in Θ (n) time. 6. We consider the problem of computing the intersection of two convex polygons which are given by their lists of vertices in cyclic order. (a) Show that the intersection is again a convex polygon.",algorithms and data structures.pdf "lists of vertices in cyclic order. (a) Show that the intersection is again a convex polygon. (b) Design an algorithm that computes the intersection. What is the time complexity of your algorithm? Algorithms and Data Structures 284 A Global Text",algorithms and data structures.pdf "24. Sample problems and algorithms 7. Intersection test for line L and [convex] polygon Q If an (infinitely extended) line L intersects a polygon Q, it must intersect one of Q's edges. Thus a test for intersection of a given line L with a polygon can be reduced to repeated test of L for intersection with [some of] Q's edges. (a) Prove that, in general, a test for line-polygon intersection must check at least n – 2 of Q's edges. Hint: Use an adversary argument. If two edges remain unchecked, they could be moved so as to invalidate the answer. (b) Design a test that works in time O(log n) for decoding whether a line L intersects a convex polygon Q. 8. Divide-and-conquer algorithms may divide the space in which the data is embedded, rather than the set of data (the set of lines). Describe an algorithm for computing the sequence of visible segments that partitions the space recursively into vertical stripes, until each stripe is ""simple enough""; describe how you choose the",algorithms and data structures.pdf "the space recursively into vertical stripes, until each stripe is ""simple enough""; describe how you choose the boundaries of the stripes; state advantages and disadvantages of this algorithm as compared to the one described in chapter 24 in the section “Visibility in the plane: a simple algorithm whose analysis is not”. Analyze the asymptotic time complexity of this algorithm. 285",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License 25. Plane-sweep: a general- purpose algorithm for two- dimensional problems illustrated using line segment intersection Learning objectives: • line segment intersection test • turning space dimensions into time dimensions • updating a y table and detecting intersections • sweeping across and intersection Plane-sweep is an algorithm schema for two-dimensional geometry of great generality and effectiveness, and algorithm designers are well advised to try it first. It works for a surprisingly large set of problems, and when it works, tends to be very efficient. Plane-sweep is easiest to understand under the assumption of nondegenerate configurations. After explaining plane-sweep under this assumption, we remark on how degenerate cases can be handled with plane-sweep. The line segment intersection test We present a plane-sweep algorithm [SH 76] for the line segment intersection test:",algorithms and data structures.pdf "handled with plane-sweep. The line segment intersection test We present a plane-sweep algorithm [SH 76] for the line segment intersection test: Given n line segments in the plane, determine whether any two intersect; and if so, compute a witness (i.e. a pair of segments that intersect). Bounds on the c omplexity of this problem are easily obtained. The literature on computational geometry (e.g. [PS 85]) proves a lower bound Ω (n · log n). The obvious brute force approach of testing all n · (n – 1) / 2 pairs of line segments requires Θ (n2) time. This wide gap between n · log n and n 2 is a challenge to the algorithm designer, who strives for an optimal algorithm whose asymptotic running time O(n · log n) matches the lower bound. Divide-and-conquer is often the first attempt to design an algorithm, a nd it comes in two variants illustrated in Fig. 25.1: (1) Divide the data, in this case the set of line segments, into two subsets of approximately equal size (i.e.",algorithms and data structures.pdf "Fig. 25.1: (1) Divide the data, in this case the set of line segments, into two subsets of approximately equal size (i.e. n / 2 line segments), or (2) divide the embedding space, which is easily cut in exact halves. Algorithms and Data Structures 286 A Global Text",algorithms and data structures.pdf "25. Plane-sweep: a general-purpose algorithm for two-dimensional problems illustrated using line segment intersection Exhibit 25.1: Two ways of applying divide-and-conquer to a set of objects embedded in the plane. In the first case, we hope for a se paration into subsets S 1 and S 2 that permits an efficient test whether any line segment in S1 intersects some line segment in S 2. Exhibit 25.1 shows the ideal case where S 1 and S2 do not interact, but of course this cannot always be achieved in a nontrivial way; and even if S can be separated as the figure suggests, finding such a separating line looks like a more formidable problem than the original intersection problem. Thus, in general, we have to test each line segment in S 1 against every line segment in S 2, a test that may take Θ (n2) time. The second approach of dividing the embedding space has the unfortunate consequence of effectively increasing",algorithms and data structures.pdf "take Θ (n2) time. The second approach of dividing the embedding space has the unfortunate consequence of effectively increasing our data set. Every segment that straddles the dividing line gets ""cut"" (i.e. processed twice, once for each half space). The two resulting subproblems will be of size n' and n"", respectively, with n' + n"" > n, in the worst case n' + n"" = 2 · n. At recursion depth d we may have 2 d · n subsegments to process. No optimal algorithm is known that uses this technique. The key idea in d esigning an optimal algorithm is the observation that those line segments that intersect a vertical line L at abscissa x are totally ordered: A segment s lies below segment t, written s < L t, if both intersect L at the current position x and the intersection of s with L lies below the intersection of t with L. With respect to this order a line segment may have an upper and a lower neighbor, and Exhibit 25.2 shows that s and t are neighbors at x.",algorithms and data structures.pdf "order a line segment may have an upper and a lower neighbor, and Exhibit 25.2 shows that s and t are neighbors at x. Exhibit 25.2: The sweep line L totally orders the segments that intersect L. We describe the intersection test algorithm under the assumption that the configuration is nondegenerate (i.e. no three segments intersect in the same point). For simplicity's sake we also assume that no segment is vertical, so every segment has a left endpoint and a right endpoint. The latter assumption entails no loss of generality: For a vertical segment, we can arbitrarily define the lower endpoint to be the ""left endpoint"", thus imposing a lexicographic (x, y)-order to refine the x-order. With the important assumption of non-degeneracy, two line segments s and t ca n intersect at x 0 only if there exists an abscissa x < x 0 where s and t are neighbors. Thus it 287",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License suffices to test all segment pairs that become neighbors at some time during a left-to-right sweep of L - a number that is usually significantly smaller than n · (n – 1) / 2. As the sweep line L moves from left to right across the configuration, the order < L among the line segments intersecting L changes only at endpoints of a segment or at intersections of segments. As we intend to stop the sweep as soon as we discover an intersection, we need to perform the intersection test only at the left and right endpoints of segments. A segment t is tested at its left endpoint for intersection with its lower and upper neighbors. At the right endpoint of t we test its lower and upper neighbor for intersection (Exhibit 25.3). The algorithm terminates as soon as we discover an intersecting pair of segments. Given n segments, each of Exhibit 25.3: Three pairwise intersection tests charged to segment t.",algorithms and data structures.pdf "Exhibit 25.3: Three pairwise intersection tests charged to segment t. which may generate three intersection tests as shown in Exhibit 25.3 (two at its left, one at its right endpoint), we perform the O(1) pairwise segment intersection test at most 3 · n times. This linear bound on the number of pairs tested for intersection might raise the hope of finding a linear-time algorithm, but so far we have counted only the geometric primitive: ""Does a pair of segments intersect - yes or no?"" Hiding in the background we find bookkeeping operations such as ""Find the upper and lower neighbor of a given segment"", and these turn out to be costlier than the geometric ones. We will find neighbors efficiently by maintaining the order < L in a data structure called a y- table during the entire sweep. The skeleton: Turning a space dimension into a time dimension The name plane-sweep is derived from the image of sweeping the plane from left to right with a vertical line",algorithms and data structures.pdf "The name plane-sweep is derived from the image of sweeping the plane from left to right with a vertical line (front, or cross section), stopping at every transition point (event) of a geometric configuration to update the cross section. All processing is done at this moving front, without any backtracking, with a look-ahead of only one point. The events are stored in the x-queue, and the current cross section is maintained by the y-table. The skeleton of a plane-sweep algorithm is as follows: initX; initY; while not emptyX do { e := nextX; transition(e) } The procedures 'initX' and 'initY' initialize the x-queue and the y-table. 'nextX' returns the next event in the x- queue, 'emptyX' tells us whether the x-queue is empty. The procedure 'transition', the advancing mechanism of the sweep, embodies all the work to be done when a new event is encountered; it moves the front from the slice to the left of an event e to the slice immediately to the right of e.",algorithms and data structures.pdf "left of an event e to the slice immediately to the right of e. Data structures For the line segment intersection test, the x-queue stores the left and right endpoints of the given line segments, ordered by their x-coo rdinate, as events to be processed when updating the vertical cross section. Each endpoint stores a reference to the corresponding line segment. We compare points by their x-coordinates when building the Algorithms and Data Structures 288 A Global Text",algorithms and data structures.pdf "25. Plane-sweep: a general-purpose algorithm for two-dimensional problems illustrated using line segment intersection x-queue. For simplicity of presentation we assume that no two endpoints of line segments have equal x- or y- coordinates. The only operation to be performed on the x-queue is 'nextX': it returns the next event (i.e. the next left or right endpoint of a line segment to be processed). The cost for initializing the x-queue is O(n · log n), the cost for performing the 'nextX' operation is O(1). The y-table contains those line segments that are currently intersected by the sweep line, ordered according to delta; { step 3b: check the predecessors of the new point in the y- table } check := current; repeat check := predY(check); newDelta := distance(current, check); Algorithms and Data Structures 296 A Global Text",algorithms and data structures.pdf "26. The closest pair if newDelta < delta then begin delta := newDelta; closestLeft := check; closestRight := current; end; until current.y – check.y > delta; end; { transition } Analysis We show that the algorithm described can be implemented so as to run in worst-case time O(n · log n) and space O(n). If the y-table is implemented by a balanced binary tree (e.g. an AVL-tree or a 2-3-tree) the operations 'insertY', 'deleteY', 'succY', and 'predY' can be performed in time O(log n). The space required is O(n). 'initX' builds the sorted x-queue in time O(n · log n) using space O(n). The procedure 'deleteY' is called at most once for each point and thus accumulates to O(n · log n). Every point is inserted once into the y-table, thus the calls of 'insertY' accumulate to O(n · log n). There remains the problem of analyzing step 3. The loop in step 3a calls 'succY' once more than the number of",algorithms and data structures.pdf "There remains the problem of analyzing step 3. The loop in step 3a calls 'succY' once more than the number of points in the upper half of the bounding box. Similarly, the loop in step 3b calls 'predY' once more than the number of points in the lower half of the bounding box. A standard counting technique shows that the bounding box is sparsely populated: For any metric dk, the box contains no more than a small, constant number c k of points, and for any k, ck ≤ 8. Thus 'succY' and 'predY' are called no more than 10 times, and step 3 costs time O(log n). The key to this counting is the fact that no two points in the y-table can be closer than δ, and thus not many of them can be packed into the bounding box with sides δ and 2 · δ. We partition this box into the eight pairwise disjoint, mutually exhaustive regions shown in Exhibit 26.4 . These regions are half circles of diameter δ in the",algorithms and data structures.pdf "disjoint, mutually exhaustive regions shown in Exhibit 26.4 . These regions are half circles of diameter δ in the Manhattan metric d 1, and we first argue our case only when distances are measured in this metric. None of these half-circles can contain more than one point. If a half-circle contained two points at distance δ, they would have to be at opposite ends of the unique diameter of this half-circle. The se endpoints lie on the left or the right boundary of the bounding box, and these two boundary lines cannot contain any points, for the following reasons: • No active point can be located on the left boundary of the bounding box; such a point would have been thrown out when the δ-slice was last updated. • No active point can exist on the right boundary, as that x-coordinate is preempted by the transition point p being processed (remember our assumption of unequal x-coordinates). 297",algorithms and data structures.pdf "This book is licensed under a Creative Commons Attribution 3.0 License Exhibit 26.4: Only few points at pairwise distance ≥ δ can populate a box of size 2 · δ by δ. We have shown that the bounding box can hold no more than eight points at pairwise distance ≥ δ when using the Manhattan metric d1. It is well known that for any points p, q, and for any k > 1: d1(p,q) > dk(p,q) > d∞(p,q). Thus the bounding box can hold no more than eight points at pairwise distance ≥ δ when using any distance dk or d∞. Therefore, the calculation of the predecessors and successors of a transition point costs time O(log n) and accumulates to a total of O(n · log n) for all transitions. Summing up all costs results in O(n · log n) time and O(n) space complexity for this algorithm. Since Ω (n · log n) is a lower bound for the closest pair problem, we know that this algorithm is optimal. Sweeping in three or more dimensions",algorithms and data structures.pdf "this algorithm is optimal. Sweeping in three or more dimensions To gain insight into the power and limitation of sweep algorithms, let us explore whether the algorithm presented generalizes to higher-dimensional spaces. We illustrate our reasoning for three-dimensional space, but the same conclusion holds for any number of dimensions > 2. All of the following steps generalize easily. Sort all the points according to their x-coordinate into the x-queue. Sweep space with a y-z plane, and in processing the current transition point p, assume that we know the closest pair among all the points to the left of p, and their distance δ. Then to determine whether p forms a new closest pair, look at all the points inside a half- sphere of radius δ centered at p, extending to the left of p. In the hope of implementing this sphere query efficiently, we enclose this half sphere in a bounding box of side length 2 · δ in the y- and z-dimension, and δ in the x-",algorithms and data structures.pdf "we enclose this half sphere in a bounding box of side length 2 · δ in the y- and z-dimension, and δ in the x- dimension. Inside this box there can be at most a small, constant number c k of points at pairwise distance ≥ δ when using any distance dk or d∞. We implement this box query in two steps: (1) by cutting off all the points farther to the left of p than δ, which is done by advancing 'tail' in the x-queue, and (2) by performing a square query among the points currently in the y-z- table (which all lie in the δ-slice to the left of the sweep plane), as shown in Exhibit 26.5. Now we have reached the only place where the three-dimensional algorithm differs substantially. In the two-dimensional case, the corresponding one-dimensional interval query can be implemented efficiently in time O(log n) using find, predecessor, and successor operations on a balanced tree, and using the knowledge that the size of the answer set is",algorithms and data structures.pdf "predecessor, and successor operations on a balanced tree, and using the knowledge that the size of the answer set is Algorithms and Data Structures 298 A Global Text",algorithms and data structures.pdf "26. The closest pair bounded by a constant. In the three-dimensional case, the corresponding two-dimensional orthogonal range query cannot in general be answered in time O(log n) (per retrieved point) using any of the known data structures. Straightforward search requires time O(n), resulting in an overall time O(n 2) for the space sweep. This is not an interesting result for a problem that admits the trivial O(n2) algorithm of comparing every pair. Exhibit 26.5: Sweeping a plane across three-dimensional space. Ideas generalize, but efficiency does not. Sweeping reduces the dimensionality of a geometric problem by one, by replacing one space dimension by a ""time dimension"". Reducing a two-dimensional problem to a sequence of one-dimensional problems is often efficient because the total order defined in one dimension allows logarithmic search times. In contrast, reducing a",algorithms and data structures.pdf "efficient because the total order defined in one dimension allows logarithmic search times. In contrast, reducing a three-dimensional problem to a sequence of two-dimensional problems rarely results in a gain in efficiency. Exercises 1. Consider the following modification of the plane-sweep algorithm for solving the closest pair problem [BH 92]. When encountering a transition point p do not process all points q in the y-table with |q y – py| < δ, but test only whether the distance of p to its successor or predecessor in the y-table is smaller than δ. When deleting a point q with q x ≤ px – δ from the y-table test whether the successor and predecessor of q in the y- table are closer than δ. If a pair of points with a smaller distance than the current δ is found update δ and the closest pair found so far. Prove that this modified algorithm finds a closest pair What is the time complexity of this algorithm?",algorithms and data structures.pdf "the closest pair found so far. Prove that this modified algorithm finds a closest pair What is the time complexity of this algorithm? 2. Design a divide-and-conquer algorithm which solves the closest pair problem. What is the time complexity of your algorithm? Hint: Partition the set of n points by a vertical line into two subsets of approximately n / 2 points. Solve the closest pair problem recursively for both subsets. In the conquer step you should use the fact that δ is the smallest distance between any pair of points both belonging to the same subset. A point from the left subset can only have a distance smaller than δ to a point in the right subset if both points lie in a 2 · δ-slice to the left and to the right of the partitioning line. Therefore, you only have to match points lying in the left δ-slice against points lying in the right δ-slice. 299",algorithms and data structures.pdf "University of Arkansas, Fayetteville University of Arkansas, Fayetteville ScholarWorks@UARK ScholarWorks@UARK Open Educational Resources 2-8-2019 University Physics I: Classical Mechanics University Physics I: Classical Mechanics Julio Gea-Banacloche University of Arkansas, Fayetteville Follow this and additional works at: https://scholarworks.uark.edu/oer Part of the Atomic, Molecular and Optical Physics Commons, Elementary Particles and Fields and String Theory Commons, Engineering Physics Commons, and the Other Physics Commons Citation Citation Gea-Banacloche, J. (2019). University Physics I: Classical Mechanics. Open Educational Resources. Retrieved from https://scholarworks.uark.edu/oer/3 This Textbook is brought to you for free and open access by ScholarWorks@UARK. It has been accepted for inclusion in Open Educational Resources by an authorized administrator of ScholarWorks@UARK. For more information, please contact scholar@uark.edu.",University Physics I Classical Mechanics.pdf "University Physics I: Classical Mechanics Julio Gea-Banacloche",University Physics I Classical Mechanics.pdf "Cover image from NASA, https://www.nasa.gov/image-feature/jpl/not-really-starless-at-saturn",University Physics I Classical Mechanics.pdf "University Physics I: Classical Mechanics Julio Gea-Banacloche First revision, Fall 2019 This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Developed thanks to a grant from the University of Arkansas Libraries",University Physics I Classical Mechanics.pdf ii,University Physics I Classical Mechanics.pdf "Contents Preface i 1 Reference frames, displacement, and velocity 1 1.1 Introduction ......................................... 1 1.1.1 Particles in classical mechanics .......................... 1 1.1.2 Aside: the atomic perspective ........................... 3 1.2 Position, displacement, velocity .............................. 3 1.2.1 Position ....................................... 4 1.2.2 Displacement .................................... 6 1.2.3 Velocity ....................................... 8 1.3 Reference frame changes and relative motion ...................... 1 4 1.4 In summary ......................................... 1 9 1.5 Examples .......................................... 2 1 1.5.1 Motion with (piecewise) constant velocity .................... 2 1 1.5.2 Addition of velocities, relative motion ...................... 2 4 iii",University Physics I Classical Mechanics.pdf "iv CONTENTS 1.6 Problems .......................................... 2 7 2 Acceleration 31 2.1 The law of inertia...................................... 3 1 2.1.1 Inertial reference frames .............................. 3 3 2.2 Acceleration ......................................... 3 5 2.2.1 Average and instantaneous acceleration ..................... 3 5 2.2.2 Motion with constant acceleration ........................ 3 9 2.2.3 Acceleration as a vector .............................. 4 1 2.2.4 Acceleration in different reference frames .................... 4 1 2.3 Free fall ........................................... 4 2 2.4 In summary ......................................... 4 4 2.5 Examples .......................................... 4 6 2.5.1 Motion with piecewise constant acceleration................... 4 6 2.6 Problems .......................................... 4 8 3 Momentum and Inertia 51 3.1 Inertia ............................................ 5 1",University Physics I Classical Mechanics.pdf "2.6 Problems .......................................... 4 8 3 Momentum and Inertia 51 3.1 Inertia ............................................ 5 1 3.1.1 Relative inertia and collisions ........................... 5 1 3.1.2 Inertial mass: definition and properties ..................... 5 5 3.2 Momentum ......................................... 5 6 3.2.1 Conservation of momentum; isolated systems .................. 5 6",University Physics I Classical Mechanics.pdf "CONTENTS v 3.3 Extended systems and center of mass........................... 5 8 3.3.1 Center of mass motion for an isolated system.................. 5 9 3.3.2 Recoil and rocket propulsion ........................... 6 1 3.4 In summary ......................................... 6 1 3.5 Examples .......................................... 6 3 3.5.1 Reading a collision graph ............................. 6 3 3.5.2 Collision in different reference frames, center of mass,a n dr e c o i l....... 6 5 3.6 Problems .......................................... 6 7 4 Kinetic Energy 69 4.1 Kinetic Energy ....................................... 6 9 4.1.1 Kinetic energy in collisions ............................ 7 0 4.1.2 Relative velocity and coefficient of restitution.................. 7 4 4.2 “Convertible” and “translational” kinetic energy .................... 7 6 4.2.1 Kinetic energy and momentum in different reference frames .......... 7 9 4.3 In summary ......................................... 8 0",University Physics I Classical Mechanics.pdf "4.2.1 Kinetic energy and momentum in different reference frames .......... 7 9 4.3 In summary ......................................... 8 0 4.4 Examples .......................................... 8 2 4.4.1 Collision graph revisited .............................. 8 2 4.4.2 Inelastic collision and explosive separation.................... 8 3 4.5 Problems .......................................... 8 6 5 Interactions and energy 89",University Physics I Classical Mechanics.pdf "vi CONTENTS 5.1 Conservative interactions ................................. 8 9 5.1.1 Potential energy .................................. 9 0 5.1.2 Potential energy functions and “energy landscapes” .............. 9 4 5.2 Dissipation of energy and thermal energy ........................ 9 6 5.3 Fundamental interactions, and other forms of energy.................. 9 8 5.4 Conservation of energy ................................... 9 9 5.5 In summary .........................................1 0 1 5.6 Examples ..........................................1 0 3 5.6.1 Inelastic collision in the middle of a swing....................1 0 3 5.6.2 Kinetic energy to spring potential energy: block collides with spring .....1 0 4 5.7 Advanced Topics ......................................1 0 6 5.7.1 Two carts colliding and compressing a spring..................1 0 6 5.7.2 Getting the potential energy function from collisiondata ............1 0 7",University Physics I Classical Mechanics.pdf "5.7.2 Getting the potential energy function from collisiondata ............1 0 7 5.8 Problems ..........................................1 0 9 6 Interactions, part 2: Forces 113 6.1 Force .............................................1 1 3 6.1.1 Forces and systems of particles ..........................1 1 5 6.2 Forces and potential energy ................................1 1 6 6.3 Forces not derived from a potential energy........................1 2 0 6.3.1 Tensions .......................................1 2 0",University Physics I Classical Mechanics.pdf "CONTENTS vii 6.3.2 Normal forces ....................................1 2 2 6.3.3 Static and kinetic friction forces .........................1 2 3 6.3.4 Air resistance ....................................1 2 5 6.4 Free-body diagrams ....................................1 2 6 6.5 In summary .........................................1 2 7 6.6 Examples ..........................................1 2 9 6.6.1 Dropping an object on a weighing scale .....................1 2 9 6.6.2 Speeding up and slowing down ..........................1 3 0 6.7 Problems ..........................................1 3 4 7 Impulse, Work and Power 137 7.1 Introduction: work and impulse ..............................1 3 7 7.2 Work on a single particle .................................1 3 8 7.2.1 Work done by the net force, and the Work-Energy Theorem..........1 4 0 7.3 The “center of mass work”.................................1 4 1 7.4 Work done on a system by all the external forces....................1 4 2",University Physics I Classical Mechanics.pdf "7.3 The “center of mass work”.................................1 4 1 7.4 Work done on a system by all the external forces....................1 4 2 7.4.1 The no-dissipation case ..............................1 4 3 7.4.2 The general case: systems with dissipation ...................1 4 7 7.4.3 Energy dissipated by kinetic friction .......................1 5 0 7.5 Power ............................................1 5 0 7.6 In summary .........................................1 5 1",University Physics I Classical Mechanics.pdf "viii CONTENTS 7.7 Examples ..........................................1 5 3 7.7.1 Braking .......................................1 5 3 7.7.2 Work, energy and the choice of system: dissipative case ............1 5 4 7.7.3 Work, energy and the choice of system: non-dissipativec a s e..........1 5 5 7.7.4 Jumping .......................................1 5 6 7.8 Problems ..........................................1 5 8 8 Motion in two dimensions 161 8.1 Dealing with forces in two dimensions ..........................1 6 1 8.2 Projectile motion ......................................1 6 4 8.3 Inclined planes .......................................1 6 7 8.4 Motion on a circle (or part of a circle)..........................1 6 9 8.4.1 Centripetal acceleration and centripetal force ..................1 6 9 8.4.2 Kinematic angular variables ...........................1 7 2 8.5 In summary .........................................1 7 5 8.6 Examples ..........................................1 7 7",University Physics I Classical Mechanics.pdf "8.5 In summary .........................................1 7 5 8.6 Examples ..........................................1 7 7 8.6.1 The penny on the turntable ............................1 7 7 8.7 Advanced Topics ......................................1 7 9 8.7.1 Staying on track ..................................1 7 9 8.7.2 Going around a banked curve ...........................1 8 1 8.7.3 Rotating frames of reference: Centrifugal force and Coriolis force .......1 8 4",University Physics I Classical Mechanics.pdf "CONTENTS ix 8.8 Problems ..........................................1 8 6 9 Rotational dynamics 191 9.1 Rotational kinetic energy, and moment of inertia....................1 9 1 9.2 Angular momentum ....................................1 9 3 9.3 The cross product and rotational quantities.......................1 9 7 9.4 Torque ............................................2 0 1 9.5 Statics ............................................2 0 4 9.6 Rolling motion .......................................2 0 7 9.7 In summary .........................................2 1 1 9.8 Examples ..........................................2 1 3 9.8.1 Torques and forces on the wheels of an accelerating bicycle ..........2 1 3 9.8.2 Blocks connected by rope over a pulley with non-zero mass ..........2 1 4 9.9 Problems ..........................................2 1 7 10 Gravity 221 10.1 The inverse-square law...................................2 2 1",University Physics I Classical Mechanics.pdf "9.9 Problems ..........................................2 1 7 10 Gravity 221 10.1 The inverse-square law...................................2 2 1 10.1.1 Gravitational potential energy ..........................2 2 4 10.1.2 Types of orbits under an inverse-square force..................2 2 7 10.1.3 Kepler’s laws ....................................2 3 3 10.2 Weight, acceleration, and the equivalence principle...................2 3 6 10.3 In summary .........................................2 4 1",University Physics I Classical Mechanics.pdf "x CONTENTS 10.4 Examples ..........................................2 4 3 10.4.1 Orbital dynamics ..................................2 4 3 10.4.2 Orbital data from observations: Halley’s comet.................2 4 5 10.5 Advanced Topics ......................................2 4 7 10.5.1 Tidal Forces.....................................2 4 7 10.6 Problems ..........................................2 4 9 11 Simple harmonic motion 253 11.1 Introduction: the physics of oscillations.........................2 5 3 11.2 Simple harmonic motion..................................2 5 4 11.2.1 Energy in simple harmonic motion........................2 5 9 11.2.2 Harmonic oscillator subject to an external, constantf o r c e...........2 6 0 11.3 Pendulums .........................................2 6 2 11.3.1 The simple pendulum ...............................2 6 2 11.3.2 The “physical pendulum” .............................2 6 5 11.4 In summary .........................................2 6 6",University Physics I Classical Mechanics.pdf "11.3.2 The “physical pendulum” .............................2 6 5 11.4 In summary .........................................2 6 6 11.5 Examples ..........................................2 6 8 11.5.1 Oscillator in a box (a basic accelerometer!)...................2 6 8 11.5.2 Meter stick as a physical pendulum........................2 7 0 11.6 Advanced Topics ......................................2 7 2 11.6.1 Mass on a spring damped by friction with a surface..............2 7 2",University Physics I Classical Mechanics.pdf "CONTENTS xi 11.6.2 The Cavendish experiment: how to measureG with a torsion balance ....2 7 3 11.7 Problems ..........................................2 7 6 12 Waves in one dimension 279 12.1 Traveling waves.......................................2 7 9 12.1.1 The “wave shape” function: displacement and velocityo ft h em e d i u m .....2 8 1 12.1.2 Harmonic waves ..................................2 8 2 12.1.3 The wave velocity .................................2 8 5 12.1.4 Reflection and transmission of waves at a medium boundary .........2 8 6 12.2 Standing waves and resonance ..............................2 8 9 12.3 Conclusion, and further resources.............................2 9 3 12.4 In summary .........................................2 9 3 12.5 Examples ..........................................2 9 5 12.5.1 Displacement and density/pressure in a longitudinalw a v e...........2 9 5 12.5.2 Violin sounds ....................................2 9 8",University Physics I Classical Mechanics.pdf "12.5.1 Displacement and density/pressure in a longitudinalw a v e...........2 9 5 12.5.2 Violin sounds ....................................2 9 8 12.6 Advanced Topics ......................................2 9 9 12.6.1 Chain of masses coupled with springs: dispersion, andl o n g - w a v e l e n g t hl i m i t .299 12.7 Problems ..........................................3 0 2 13 Thermodynamics 303 13.1 Introduction .........................................3 0 3 13.2 Introducing temperature ..................................3 0 4",University Physics I Classical Mechanics.pdf "xii CONTENTS 13.2.1 Temperature and heat capacity..........................3 0 4 13.2.2 The gas thermometer ...............................3 0 6 13.2.3 The zero-th law...................................3 0 8 13.3 Heat and the first law...................................3 0 9 13.3.1 “Direct exchange of thermal energy” and early theories of heat ........3 0 9 13.3.2 The first law of thermodynamics.........................3 1 1 13.4 The second law and entropy................................3 1 2 13.4.1 Entropy .......................................3 1 3 13.4.2 The efficiency of heat engines...........................3 1 4 13.4.3 But what IS entropy, anyway?..........................3 1 7 13.5 In summary .........................................3 1 9 13.6 Examples ..........................................3 2 1 13.6.1 Calorimetry .....................................3 2 1 13.6.2 Equipartition of energy ..............................3 2 2",University Physics I Classical Mechanics.pdf "13.6.1 Calorimetry .....................................3 2 1 13.6.2 Equipartition of energy ..............................3 2 2 13.7 Problems ..........................................3 2 3",University Physics I Classical Mechanics.pdf "Preface Students: if this is too long, at the very least read the last four paragraphs. Thank you! For many years Eric Mazur’sPrinciples and Practice of Physics was the required textbook for University Physics I at the University of Arkansas. In writing this open-source replacement I have tried to preserve some of its best features, while at thesame time condensing much of the presentation, and reworking several sections that did not quite fit the needs of our curriculum: primarily, the chapters on Thermodynamics, Waves, and Work.I h a v e a l s o s k i p p e d e n t i r e l y t h e chapter on the “Principle of Relativity,” and instead distributed its contents among other chapters: in particular, the Galilean reference frame transformations are now introduced at the very beginning of the book, as are the law of inertia and the concept of inertial reference frames. Over the past few decades, there has been a trend to increase the size of introductory physics text-",University Physics I Classical Mechanics.pdf "Over the past few decades, there has been a trend to increase the size of introductory physics text- books, by including more and more visual aids (pictures, diagrams, boxes... ), as well as lengthier and more detailed explanations, perhaps in an attempt to reach as many students as possible, and maybe even to take the place of the instructor altogether. Itseems to me that the result is rather the opposite: a massive (and expensive) tome that no studentcould reasonably be expected to read all the way through, at a time when “TL;DR” has become a popular acronym, and visual learning aids (videotaped lectures, demonstrations, and computer simulations) are freely available everywhere. Our approach at the University of Arkansas, developed as a result of the work of Physics Education Research experts John and Gay Stewart, is based instead on two essential facts. First, that different students learn differently: some will learn best from a textbook, others will learn best from a lecture,",University Physics I Classical Mechanics.pdf "students learn differently: some will learn best from a textbook, others will learn best from a lecture, and most will only really learn from a hands-on approach, by working out the answers to questions themselves. Second, just about everybody will benefit from repeated presentations of the material to be learned, in different environments and even from slightly different points of view. In keeping with this, we start by requiring the students to read the textbook material before coming to lecture, and also take an online “reading quiz” where theycan check their understanding of what xiii",University Physics I Classical Mechanics.pdf "xiv CONTENTS they have read. Then, in the lecture, they will have an opportunity to see the material presented again, as a sort of executive summary delivered by, typically, a different instructor, who will also be able to answer any questions they might have about the book’s presentation. Additionally, the instructor will directly test the students’ understandingby means of conceptual questions asked of the whole class, which are to be answered using clickers. Thisp r o m p t st h es t u d e n t st ot h i n kh a r d e r about the material, and encourages them to discuss it on the spot with their classmates. Immediately after each lecture, the students will have a labactivity where they will be able to verify experimentally the concepts and principles to whichthey have just been introduced. Finally, every week they will have an “open response” homework assignment where they get to apply the",University Physics I Classical Mechanics.pdf "every week they will have an “open response” homework assignment where they get to apply the principles, mathematically, to concrete problems. For botht h el a b sa n dt h eh o m e w o r k ,a d d i t i o n a l assistance is provided by a group of dedicated teaching assistants, who are often able to explain the material to the students in a way that better relates to their own experience. In all this, the textbook is expected to play an important role, but certainly not to be the students’ only (nor even, necessarily, the primary) source of understanding or knowledge. Its job is to start the learning process, and to stand by to provide a reference (among possibly several others) afterwards. To fulfill this role, perhaps the most essentialrequirement is that it should bereadable, and hence concise enough for every reading assignment to be ofm a n a g e a b l es i z e .T h i s( a sw e l la s",University Physics I Classical Mechanics.pdf "and hence concise enough for every reading assignment to be ofm a n a g e a b l es i z e .T h i s( a sw e l la s as e n s i b l eo r g a n i z a t i o n ,c l e a re x p l a n a t i o n s ,a n dam i n i m a lassortment of worked-out exercises and end-of chapter problems) is what I have primarily tried to provide here. As t u d e n tw h ow a n t sm o r ei n f o r m a t i o nt h a np r o v i d e di nt h i st extbook, or alternative explanations, or more worked-out examples, can certainly get these from many other sources: first, of course, the instructor and the teaching assistants, whose essentialr o l ea sl e a r n i n gf a c i l i t a t o r sh a st ob e recognized from the start. Then, there is a variety of alternative textbooks available: the best choice, probably, would still be Mazur’sPrinciples and Practice of Physics,s i n c ei tu s e st h es a m e terminology and notation, introduces the material in almostt h es a m es e q u e n c e ,a n dh a st o n s",University Physics I Classical Mechanics.pdf "terminology and notation, introduces the material in almostt h es a m es e q u e n c e ,a n dh a st o n s of worked-out examples and self-quiz conceptual questions.T h a t b o o k i s a v a i l a b l e o n r e s e r v e i n the Physics library, where it can be consulted by anybody. Ifas t u d e n tf e e l st h en e e df o ra n alternative textbook that they can actually take home, one option is, of course, to actually buy Mazur’s (which is what everybody had to do before); another option is to explore other open-source textbooks available online, which have been around longer than this one and benefit from more worked-out exercises and a more conventional presentation.O n e s u c h b o o k i sUniversity Physics I at openstax.org (https://openstax.org/details/books/university-physics-volume-1). Finally, there are also a large number of other online resources, although I would advise the students",University Physics I Classical Mechanics.pdf "Finally, there are also a large number of other online resources, although I would advise the students to approach them with caution, since not all of them may be totally rigorous, and some may end up being more confusing than helpful. Some of my students have found the Khan Academy lectures and/or the “Flipping Physics” lectures helpful; I personally would recommend the lectures of Walter Lewin at MIT, if only for the wide array of cool demonstrationsy o uc a ns e et h e r e .",University Physics I Classical Mechanics.pdf "CONTENTS xv One last word, for the students who may have read this far, concerning the use of equations and “proofs” in this book. It is essential to the nature of physicst ob ea b l et oc a s ti t sr e s u l t si n mathematical terms, and to use math to explain and predict newr e s u l t s ;h e n c e ,e q u a t i o n sa n d mathematical derivations are integral parts of any physicstextbook. I have, however, tried to keep the math as simple as possible throughout, and I would not wantal e n g t h ym a t h e m a t i c a ld e r i v a t i o n to get in the way of your reading assignment. If you are readingt h et e x ta n dc o m eu p o ns e v e r a l lines of math, skim them at first to see if they make sense, but ify o ug e ts t u c kd on o ts p e n dt o o much time on them: move on to the bottom line, and keep readingfrom there. You can always ask your instructor or TA for help with the math later.",University Physics I Classical Mechanics.pdf "much time on them: move on to the bottom line, and keep readingfrom there. You can always ask your instructor or TA for help with the math later. Iw o u l d ,h o w e v e r ,e n c o u r a g ey o ut or e t u r n ,e v e n t u a l l y ,t oa nyb i to fm a t ht h a ty o uf o u n dc h a l l e n g i n g the first time around. Do try to go through all the algebra yourself! I have occasionally skipped intermediate steps, just to keep the math from overwhelmingthe text: but these are typically straightforward manipulations (multiplying or dividing both sides by something, moving something from one side of the equation to the other, multiplying out a parenthesis or, conversely, pulling out ac o m m o nf a c t o ro rd e n o m i n a t o r... ). If you actually work out, on your own, all the missing steps, you will find it’s a great way to improve your algebra skills. This is something that will make it much easier for you to deal with the homework and the exams later on this semester—and for the",University Physics I Classical Mechanics.pdf "much easier for you to deal with the homework and the exams later on this semester—and for the rest of your career as well. P.S. A few possibly useful features. The pdf version of this book is, of course searchable: you canuse command-F on the Mac or control-F in Windows to search the text for any term (hint: trys e a r c h i n gt h et e x t b o o kb e f o r e hitting Google!!). Hopefully, this will make up a little forthe lack of an actual index, which I just haven’t found the time to compile yet. The text is also pretty thoroughly hyperlinked: every equation number and figure number quoted is al i n k .C l i c k i n go nt h ee q u a t i o nn u m b e r( f o ri n s t a n c e ,t h e(6.30), in this sentence) will take you to where the equation was first displayed (in this case, in Chapter 6). Then you can use command-left arrow (on the Mac) or alt-left arrow (on Windows) to go back tothe page you were reading before",University Physics I Classical Mechanics.pdf "arrow (on the Mac) or alt-left arrow (on Windows) to go back tothe page you were reading before you clicked on the link. Command- (or alt-) left and right arrows will let you go back and forth between the two pages. (Note: these keyboard shortcuts onlywork in Adobe Acrobat, as far as I know.) The same thing works if you click on the reference to a figure number (actually that takes you to the caption to the figure, so you may need to scroll up a bit to seet h efi g u r e ) . Finally, the entries in the table of contents are links to therespective sections as well (except for the preface, which for some reason does not work; oh, well... if you are reading this, at least you made it here!).",University Physics I Classical Mechanics.pdf "Chapter 1 Reference frames, displacement, and velocity 1.1 Introduction Classical mechanics is the branch of physics that deals withthe study of the motion of anything (roughly speaking) larger than an atom or a molecule. That isal o to ft e r r i t o r y ,a n dt h em e t h o d s and concepts of classical mechanics are at the foundation ofany branch of science or engineering that is concerned with the motion of anything from a star to anamoeba—fluids, rocks, animals, planets, and any and all kinds of machines. Moreover, even though the accurate description of processes at the atomic level requires the (formally very different) methods of quantum mechanics, at least three of the basic concepts of classical mechanics that we are going to study this semester, namely, momentum, energy, and angular momentum, carry overinto quantum mechanics as well, with the last two playing, in fact, an essential role. 1.1.1 Particles in classical mechanics",University Physics I Classical Mechanics.pdf "with the last two playing, in fact, an essential role. 1.1.1 Particles in classical mechanics In the study of motion, the most basic starting point is the concept of theposition of an object. Clearly, if we want to describe accurately the position of a macroscopic object such as a car, we may need a lot of information, including the precise shape ofthe car, whether it is turned this way or that way, and so on; however, if all we want to know is how farthe car is from Fort Smith or Fayetteville, we do not need any of that: we can just treat thecar as a dot, or mathematical point, on the map—which is the way your GPS screen will show it, anyway. When we do this, we say that are describing the car (or whatever the macroscopic object may be) as aparticle. 1",University Physics I Classical Mechanics.pdf "2 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY In classical mechanics, an “ideal” particle is an object withn oa p p r e c i a b l es i z e — am a t h e m a t i c a l point. In one dimension (that is to say, along a straight line), its position can be specified just by giving a single number, the distance from some reference point, as we shall see in a moment (in three dimensions, of course, three numbers are required). Int e r m so fe n e r g y( w h i c hi sp e r h a p st h e most important concept in all of physics, and which we will introduce properly in due course), an ideal particle has only one kind of energy, what we will latercall translational kinetic energy;i t cannot have, for instance, rotational kinetic energy (sincei th a s“ n os h a p e ”f o rp r a c t i c a lp u r p o s e s ) , or any form of internal energy (elastic, thermal, etc.), since we assume it is too small to have any internal structure in the first place.",University Physics I Classical Mechanics.pdf "or any form of internal energy (elastic, thermal, etc.), since we assume it is too small to have any internal structure in the first place. The reason this is a useful concept is not just that we can oftent r e a te x t e n d e do b j e c t sa sp a r t i c l e si n an approximate way (like the car in the example above), but also, and most importantly, that if we want to be more precise in our calculations,we can always treat an extended object (mathematically) as a collection of “particles.”The physical properties of the object, such as its energy, momentum, rotational inertia, and so forth, can then be obtained by adding up the corresponding quantities for all the particles making up the object. Not only that, but theinteractions between two extended objects can also be calculated by adding up the interactionsbetween all the particles making up the two objects. This is how, once we know the form of the gravitational force between two particles",University Physics I Classical Mechanics.pdf "two objects. This is how, once we know the form of the gravitational force between two particles (which is fairly simple, as we will see in Chapter 10), we can use that to calculate the force of gravity between a planet and its satellites, which can be fairly complicated in detail, depending, for instance, on the relative orientation of the planet and the satellite. The mathematical tool we use to calculate these “sums” iscalculus—specifically, integration—and you will see many examples of this... in your calculus courses. Calculus I is only a corequisite fort h i s course, so we will not make a lot of use of it here, and in any casey o uw o u l dn e e dm u l t i d i m e n s i o n a l integrals, which are an even more advanced subject, to do these kinds of calculations. But it may be good for you to keep these ideas on the back of your mind. Calculus was, in fact, invented by Sir Isaac Newton precisely for this purpose, and the developments of physics and mathematics have",University Physics I Classical Mechanics.pdf "Sir Isaac Newton precisely for this purpose, and the developments of physics and mathematics have been closely linked together ever since. Anyway, back to particles, the plan for this semester is as follows: we will start our description of motion by treating every object (even fairly large ones, sucha sc a r s )a sa“ p a r t i c l e , ”b e c a u s ew e will only be concerned at first with its translational motionand the corresponding energy. Then we will progressively make things more complex: by considering systems of two or more particles, we will start to deal with theinternal energy of a system. Then we will move to the study ofrigid bodies,w h i c ha r ea n o t h e ri m p o r t a n ti d e a l i z a t i o n : e x t e n d e do b j e cts whose parts all move together as the object undergoes a translation or a rotation. This willa l l o wu st oi n t r o d u c et h ec o n c e p t of rotational kinetic energy. Eventually we will considerwave motion, where different parts of",University Physics I Classical Mechanics.pdf "of rotational kinetic energy. Eventually we will considerwave motion, where different parts of an extended object (or “medium”) move relative to each other.S o , y o u s e e , t h e r e i s a l o g i c a l progression here, with most parts of the course building on top of the previous ones, and energy as one of the main connecting themes.",University Physics I Classical Mechanics.pdf "1.2. POSITION, DISPLACEMENT, VELOCITY 3 1.1.2 Aside: the atomic perspective As an aside, it should perhaps be mentioned that the buildingup of classical mechanics around this concept of ideal particles had nothing to do, initially,w i t ha n yb e l i e fi n“ a t o m s , ”o ra na t o m i c theory of matter. Indeed, for most 18th and 19th century physicists, matter was supposed to be a continuous medium, and its (mental) division into particlesw a sj u s tam a t h e m a t i c a lc o n v e n i e n c e . The atomic hypothesis became increasingly more plausible ast h e1 9 t hc e n t u r yw o r eo n ,a n db y the 1920’s, when quantum mechanics came along, physicists had to face a surprising development: matter, it turned out, was indeed made up of “elementary particles,” but these particles couldnot, in fact, be themselves described by the laws of classical mechanics. One could not, for instance,",University Physics I Classical Mechanics.pdf "in fact, be themselves described by the laws of classical mechanics. One could not, for instance, attribute to them simultaneously well-defined positions andv e l o c i t i e s . Y e t ,i ns p i t eo ft h i s ,m o s t of the conclusions of classical mechanics remain valid for macroscopic objects, because, most of the time, it is OK to (formally) “break up” extended objects intochunks that are small enough to be treated as particles, but large enough that one does not needquantum mechanics to describe their behavior. Quantum properties were first found to manifest themselves att h em a c r o s c o p i cl e v e lw h e nd e a l i n g with thermal energy, because at one point it really became necessary to figure out where and how the energy was stored at the truly microscopic (atomic) level. Thus, after centuries of successes, classical mechanics met its first failure with the so-calledproblem of the specific heats,a n da",University Physics I Classical Mechanics.pdf "classical mechanics met its first failure with the so-calledproblem of the specific heats,a n da completely new physical theory—quantum mechanics—had to bed e v e l o p e di no r d e rt od e a lw i t h the newly-discovered atomic world. But all this, as they say,i sa n o t h e rs t o r y ,a n df o ro u rv e r y brief dealings with thermal physics—the last chapter in thisb o o k — w ew i l lj u s tt a k es p e c i fi ch e a t s as given, that is to say, something you measure (or look up in atable), rather than something you try to calculate from theory. 1.2 Position, displacement, velocity Kinematics is the part of mechanics that deals with the mathematical description of motion, leaving aside the question of what causes an object to move in a certainw a y . K i n e m a t i c s ,t h e r e f o r e ,d o e s not include such things as forces or energy, which fall instead under the heading of dynamics. It",University Physics I Classical Mechanics.pdf "not include such things as forces or energy, which fall instead under the heading of dynamics. It may be said, then, that kinematics by itself is not true physics, but only applied mathematics; yet it is still an essential part of classical mechanics, and itsmost natural starting point. This chapter (and parts of the next one) will introduce the basic conceptsand methods of kinematics in one dimension.",University Physics I Classical Mechanics.pdf "4 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY 1.2.1 Position As stated in the previous section, we are initially interested only in describing the motion of a “particle,” which can be thought of as a mathematical point ins p a c e . ( L a t e ro nw ew i l ls e et h a t , even for an extended object or system, it is often useful to consider the motion of a specific point that we call the system’scenter of mass.) A point in three dimensions can be located by giving three numbers, known as itsCartesian coordinates(or, more simply, itscoordinates). In two dimensions, this works as shown in Figure1.1 below. As you can see, the coordinates of a point just tell us how to find it by first moving a certain distancex,f r o map r e v i o u s l y - a g r e e do r i g i n ,a l o n gah o r i z o n t a l (or x)a x i s ,a n dt h e nac e r t a i nd i s t a n c ey along a vertical (ory)a x i s . ( O r ,o fc o u r s e ,y o uc o u l d equally well first move vertically and then horizontally.)",University Physics I Classical Mechanics.pdf "equally well first move vertically and then horizontally.) x axis y axis r x y θ Figure 1.1: The position vector,⃗r, of a point, and itsx and y components (the point’s coordinates). The quantities x and y are taken to be positive or negative depending on what side ofthe origin the point is on. Typically, we will always start by choosing apositive directionfor each axis, as the direction along which the algebraic value of the corresponding coordinate increases. This is often chosen to be to the right for the horizontal axis, and upwardsfor the vertical axis, but there is nothing that says we cannot choose a different convention if itturns out to be more convenient. In Figure 1.1,t h ea r r o w so nt h ea x e sd e n o t et h ep o s i t i v ed i r e c t i o nf o re a ch. Going by the grid, the coordinates of the point shown arex =4u n i t s ,y =3u n i t s . In two or three dimensions (and even, in a sense, in one dimension), the coordinates of a point can",University Physics I Classical Mechanics.pdf "1.2. POSITION, DISPLACEMENT, VELOCITY 5 be interpreted as thecomponents of a vectorthat we call the point’sposition vector,a n dd e n o t e by ⃗r(sometimes boldface letters are used for vectors, instead ofa na r r o wo nt o p ;i nt h a tc a s e ,t h e position vector would be denoted byr). A vector is a mathematical object, with specific geometric and algebraic properties, that physicists use to representaq u a n t i t yt h a th a sb o t ham a g n i t u d ea n d ad i r e c t i o n .T h emagnitude of the position vector in Fig.1.1 is just the length of the arrow, which is to say, 5 length units (by the Pythagorean theorem, the length of ⃗r,w h i c hw ew i l lo f t e nw r i t e using absolute value bars as|⃗r|,i se q u a lt o √ x2 + y2); this is just the straight-line distance of the point to the origin. Thedirection of ⃗r,o nt h eo t h e rh a n d ,c a nb es p e c i fi e di nan u m b e ro fw a y s ;a",University Physics I Classical Mechanics.pdf "point to the origin. Thedirection of ⃗r,o nt h eo t h e rh a n d ,c a nb es p e c i fi e di nan u m b e ro fw a y s ;a common convention is to give the value of the angle that it makes with the positivex axis, which I have denoted in the figure asθ (in this case, you can verify thatθ =t a n−1(y/x)=3 6.9◦). In three dimensions, two angles would be needed to completely specifyt h ed i r e c t i o no f⃗r. As you can see, giving the magnitude and direction of⃗ris a way to locate the point that is completely equivalent to giving its coordinatesx and y.B y t h e s a m e t o k e n , t h e c o o r d i n a t e sx and y are a way to specify the vector⃗rthat is completely equivalent to giving its magnitude and direction. As I stated above, we callx and y the components (or sometimes, to be more specific, the Cartesian components) of the vector⃗r.I nas e n s ea l lt h ev e c t o r st h a tw i l lb ei n t r o d u c e dl a t e r",University Physics I Classical Mechanics.pdf "the Cartesian components) of the vector⃗r.I nas e n s ea l lt h ev e c t o r st h a tw i l lb ei n t r o d u c e dl a t e r on this semester will derive their geometric and algebraic properties from the position vector⃗r,s o once you know how to deal with one vector, you can deal with thema l l . T h eg e o m e t r i cp r o p e r t i e s (by which I mean, how to relate a vector’s components to its magnitude and direction) I have just covered, and will come back to later on in this chapter, and again in Chapter 8; the algebraic properties (how to add vectors and multiply them by ordinarynumbers, which are calledscalars in this context) I will introduce along the way. For the first few chapters this semester, we are going to be primarily concerned with motion in one dimension (that is to say, along a straight line, backwards or forwards), in which case all we need to locate a point is one number, itsx (or y,o r z)c o o r d i n a t e ;w ed on o tt h e nn e e dt ow o r r y",University Physics I Classical Mechanics.pdf "need to locate a point is one number, itsx (or y,o r z)c o o r d i n a t e ;w ed on o tt h e nn e e dt ow o r r y particularly about vector algebra. Alternatively, we can simply say that a vector in one dimension is essentially the same as its only component, which is just apositive or negative number (the magnitude of the number being the magnitude of the vector, andi t ss i g ni n d i c a t i n gi t sd i r e c t i o n ) , and has the algebraic properties that follow naturally fromthat. The description of the motion that we are aiming for is to find afunction of time,w h i c hw ed e n o t e by x(t), that gives us the point’s position (that is to say, the valueo fx)f o ra n yv a l u eo ft h et i m e parameter, t.( S e eE q .(1.10), below, for an example.) Remember thatx stands for a number that can be positive or negative (depending on the side of the origin the point is on), and has dimensions",University Physics I Classical Mechanics.pdf "can be positive or negative (depending on the side of the origin the point is on), and has dimensions of length, so when giving a numerical value for it you must always include the appropriate units (meters, centimeters, miles... ). Similarly, t stands for the time elapsed since some more or less arbitrary “origin of time,” or time zero. Normallyt should always be positive, but in special cases it may make sense to consider negative times (think of how we count years: “AD” would correspond to “positive” and “BC” would correspond to negative—the difference being that there is actually no year zero!). Anyway,t also is a number with dimensions, and must be reported with itsa p p r o p r i a t e",University Physics I Classical Mechanics.pdf "6 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY units: seconds, minutes, hours, etc. x (m) t (s) Figure 1.2: A possible position vs. time graph for an object moving in one dimension. We will b e often interested in plotting the p osition of an ob ject as a function of time—that is to say, the graph of the functionx(t). This may, in principle, have any shape, as you can see in Figure 1.2 above. In the lab, you will have a chance to use a position sensor that will automatically generate graphs like that for you on the computer, for any moving objectt h a ty o ua i mt h ep o s i t i o ns e n s o r at. It is, therefore, important that you learn how to “read” such graphs. For example, Figure 1.2 shows an object that starts, at the timet =0 ,ad i s t a n c e0.2m a w a y a n d t o t h e r i g h t o f t h e origin (so x(0) = 0.2m ) , t h e n m o v e s i n t h e n e g a t i v e d i r e c t i o n t ox = −0.15 m, which it reaches at",University Physics I Classical Mechanics.pdf "origin (so x(0) = 0.2m ) , t h e n m o v e s i n t h e n e g a t i v e d i r e c t i o n t ox = −0.15 m, which it reaches at t =0 .5s ; t h e n t u r n s b a c k a n d m o v e s i n t h e o p po s i t e d i r e c t i o n u n t i lit reaches the pointx =0 .1m , turns again, and so on. Physically, this could be tracking thed a m p e do s c i l l a t i o n so fas y s t e ms u c h as an object attached to a spring and sliding over a surface that exerts a friction force on it (see Example 11.5.1). 1.2.2 Displacement In one dimension, thedisplacement of an object over a given time interval is a quantity that we denote as ∆x, and equals the difference between the object’s initial and final positions (in one dimension, we will often call the “position coordinate” simply the “position,” for short): ∆x = xf − xi (1.1) Here the subscripti denotes the object’s position at the beginning of the time interval considered,",University Physics I Classical Mechanics.pdf "∆x = xf − xi (1.1) Here the subscripti denotes the object’s position at the beginning of the time interval considered, and the subscript f its position at the end of the interval. The symbol ∆ will consistently be used throughout this book to denote achange in the quantity following the symbol, meaning the",University Physics I Classical Mechanics.pdf "1.2. POSITION, DISPLACEMENT, VELOCITY 7 difference between its initial value and its final value. The time interval itself will be written as ∆t and can be expressed as ∆t = tf − ti (1.2) where againti and tf are the initial and final values of the time parameter (imagine, for instance, that you are reading time in seconds on a digital clock, and youa r ei n t e r e s t e di nt h ec h a n g ei nt h e object’s position between second 130 and second 132: thenti =1 3 0s ,t2 =1 3 2s ,a n d∆t =2s ) . You can practice reading off displacements from Figure1.2.T h e d i s p l a c e m e n t b e t w e e nti =0 .5s and tf =1 s ,f o ri n s t a n c e ,i s0.25 m (xi = −0.15 m,xf =0 .1m ) . O n t h e o t h e r h a n d , be t w e e n ti =1sa n dtf =1 .3s , t h e d i s p l a c e m e n t i s ∆x =0 − 0.1= −0.1m . Notice two important things about the displacement. First,it can be positive or negative. Positive means the object moved, overall, in the positive direction;negative means it moved, overall, in",University Physics I Classical Mechanics.pdf "means the object moved, overall, in the positive direction;negative means it moved, overall, in the negative direction. Second, even when it is positive, thed i s p l a c e m e n td o e sn o ta l w a y se q u a l the distance traveled by the object (distance, of course, isalways defined as a positive quantity), because if the object “doubles back” on its tracks for some distance, that distance does not count towards the overall displacement. For instance, looking again at Figure1.2 ,i nb e t w e e nt h et i m e s ti =0 .5s a n dtf =1 .5s t h e o bj e c t m o v e d fi r s t 0.25 m in the positive direction, and then 0.15 m in the negative direction, for a total distance traveled of 0.4m ; h o w e v e r , t h e t o t a l d i s p l a c e m e n t w a s just 0.1m . In spite of these quirks, the total displacement is, mathematically, a useful quantity, because often we will have a way (that is to say, an equation) to calculate ∆x for a given interval, and then we",University Physics I Classical Mechanics.pdf "we will have a way (that is to say, an equation) to calculate ∆x for a given interval, and then we can rewrite Eq. (1.1)s ot h a ti tr e a d s xf = xi +∆ x (1.3) That is to say, if we know where the object started, and we haveaw a yt oc a l c u l a t e∆x,w ec a ne a s i l y figure out where it ended up. You will see examples of this sortof calculation in the homework later on. Extension to two dimensions In two dimensions, we write the displacement as the vector ∆⃗r= ⃗rf − ⃗ri (1.4) The components of this vector are just the differences in the position coordinates of the two points involved; that is, (∆⃗r)x (a subscriptx, y,e t c . ,i sas t a n d a r dw a yt or e p r e s e n tt h ex, y . . .component of a vector) is equal toxf − xi,a n ds i m i l a r l y( ∆⃗r)y = yf − yi.",University Physics I Classical Mechanics.pdf "8 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY x (m) y (m) ri xi yi rf Δr xf yf Figure 1.3: The displacement vector for a particle that was initially at a point with position vector⃗ri and ended up at a point with position vector⃗rf is thedifference of the position vectors. Figure 1.3 shows how this makes sense. Thex component of ∆⃗rin the figure is ∆x =3 −7= −4m ; the y component is ∆y =8 −4=4m . T h i sb a s i c a l l ys h o w sy o uh o wt os u b t r a c t( a n d ,b ye x t e nsion, add, since ⃗rf = ⃗ri +∆ ⃗r)v e c t o r s : y o uj u s ts u b t r a c t( o ra d d )t h ec o r r e s p o n d i n gc o m ponents. Note how, by the Pythagorean theorem, the length (or magnitude) of the displacement vector, |∆⃗r| = √ (xf − xi)2 +( yf − yi)2,e q u a l st h es t r a i g h t - l i n ed i s t a n c eb e t w e e nt h ei n i t i a lp o int and the final point, just as in one dimension; of course, the particlecould have actually followed a very",University Physics I Classical Mechanics.pdf "final point, just as in one dimension; of course, the particlecould have actually followed a very different path from the initial to the final point, and therefore traveled a different distance. 1.2.3 Velocity Average velocity If you drive from Fayetteville to Fort Smith in 50 minutes, your average speed for the trip is calculated by dividing the distance of 59.2m ib yt h et i m ei n t e r v a l : average speed =distance ∆t = 59.2m i 50 min= 59.2m i 50 min× 60 min 1h r =7 1.0m p h ( 1 . 5 ) (this equation, incidentally, also shows you how to convertunits, and how you will be expected to",University Physics I Classical Mechanics.pdf "1.2. POSITION, DISPLACEMENT, VELOCITY 9 work with significant figures this semester: the rule of thumbis, keep four significant figures in all intermediate calculations, and report three in the final result). The way we defineaverage velocity is similar to average speed, but with one important difference: we use thedisplacement,i n s t e a do ft h ed i s t a n c e .S o ,t h ea v e r a g ev e l o c i t yvav of an object, moving along a straight line, over a time interval ∆t is vav = ∆x ∆t (1.6) This definition has all the advantages and the quirks of the displacement itself. On the one hand, it automatically comes with a sign (the same sign as the displacement, since ∆t will always be positive), which tells us in what direction we have been traveling. On the other hand, it may not be an accurate estimate of our averagespeed,i fw ed o u b l e db a c ka ta l l .I nt h em o s te x t r e m ec a s e ,",University Physics I Classical Mechanics.pdf "be an accurate estimate of our averagespeed,i fw ed o u b l e db a c ka ta l l .I nt h em o s te x t r e m ec a s e , for a roundtrip (leave Fayetteville and return to Fayetteville), the average velocity would be zero, since xf = xi and therefore ∆x =0 . It is clear that this concept is not going to be very useful in general, if the object we are tracking has a chance to double back in the time interval ∆t.A w a y t o p r e v e n t t h i s f r o m h a p p e n i n g , a n d also getting a more meaningful estimate of the object’s speeda ta n yi n s t a n t ,i st om a k et h et i m e interval very small. This leads to a new concept, that ofinstantaneous velocity. Instantaneous velocity We define the instantaneous velocity of an ob ject (a “particle”), at the timet = ti,a st h em a t h e - matical limit v =l i m ∆t→0 ∆x ∆t (1.7) The meaning of this is the following. Suppose we compute the ratio ∆x/∆t over successively smaller",University Physics I Classical Mechanics.pdf "matical limit v =l i m ∆t→0 ∆x ∆t (1.7) The meaning of this is the following. Suppose we compute the ratio ∆x/∆t over successively smaller time intervals ∆t (all of them starting at the same timeti). For instance, we can start by making tf = ti +1 s , t h e n t r ytf = ti +0 .5s ,t h e ntf = ti +0 .1s ,a n ds oo n .N a t u r a l l y ,a st h et i m ei n t e r v a l becomes smaller, the corresponding displacement will alsobecome smaller—the particle has less and less time to move away from its initial position,xi.T h e h o p e i s t h a t t h e s u c c e s s i v e r a t i o s ∆x/∆t will converge to a definite value: that is to say, that at some point we will start getting very similar values, and that beyond a certain point making ∆t any smaller will not change any of the significant digits of the result that we care about. This limit value is theinstantaneous velocity of the object at the timeti.",University Physics I Classical Mechanics.pdf "the significant digits of the result that we care about. This limit value is theinstantaneous velocity of the object at the timeti. When you think about it, there is something almost a bit self-contradictory about the concept of instantaneous velocity. You cannot (in practice) determine the velocity of an object if all you are given is a literal instant. You cannot even tell if the object is moving, if all you have is one instant! Motion requires more than one instant, the passageof time. In fact, all the “instantaneous” velocities that we can measure, with any instrument, are always really average velocities, only the",University Physics I Classical Mechanics.pdf "10 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY average is taken over very short time intervals. Nevertheless, the fact is that for any reasonably well-behaved position functionx(t), the limit in Eq. (1.7)i s mathematically well-defined, and it equals what we call, in calculus, thederivative of the functionx(t): v =l i m ∆t→0 ∆x ∆t = dx dt (1.8) x (m) t (s)0 5 5 10 (tf , xf) Δx Δt(ti , xi) Figure 1.4: The slope of the green segment is the average velocity for the time interval ∆t shown. As ∆t becomes smaller, this approaches the slope of the tangent at the point (ti,x i) In fact, there is a nice geometric interpretation for this quantity: namely, it is the slope of a line tangent to thex-vs-t curve at the point (ti,x i). As Figure1.4 shows, the average velocity ∆x/∆t is the slope (rise over run) of a line segment drawn from the point (ti,x i)t ot h ep o i n t(tf ,x f )( t h e green line in the figure). As we make the time interval smaller,b yb r i n g i n gtf closer to ti (and",University Physics I Classical Mechanics.pdf "green line in the figure). As we make the time interval smaller,b yb r i n g i n gtf closer to ti (and hence, also,xf closer toxi), the slope of this segment will approach the slope of the tangent line at (ti,x i)( t h eb l u el i n e ) ,a n dt h i sw i l lb e ,b yt h ed e fi n i t i o n(1.7), the instantaneous velocity at that point. This geometric interpretation makes it easy to get a qualitative feeling, from the position-vs-time graph, for when the particle is moving more or less fast. A large slope means a steep rise or fall, and that is when the velocity will be largest—in magnitude. Asteep rise means a large positive velocity, whereas a steep drop means a large negative velocity, by which I mean a velocity that is given by a negative number which is large in absolute value. Int h ef u t u r e ,t os i m p l i f ys e n t e n c e s like this one, I will just use the word “speed” to refer to the magnitude (that is to say, the absolute",University Physics I Classical Mechanics.pdf "like this one, I will just use the word “speed” to refer to the magnitude (that is to say, the absolute value) of the instantaneous velocity. Thus, speed (like distance) is always a positive number, by definition, whereas velocity can be positive or negative; andas t e e ps l o p e( p o s i t i v eo rn e g a t i v e ) means the speed is large there.",University Physics I Classical Mechanics.pdf "1.2. POSITION, DISPLACEMENT, VELOCITY 11 Conversely, looking at the samplex-vs-t graphs in this chapter, you may notice that there are times when the tangent is horizontal, meaning it has zero slope, ands ot h ei n s t a n t a n e o u sv e l o c i t ya tt h o s e times is zero (for instance, at the timet =1 .0s i n F i g u r e1.2). This makes sense when you think of what the particle is actually doing at those special times: iti sj u s tc h a n g i n gd i r e c t i o n ,s oi t sv e l o c i t y is going, for instance, from positive to negative. The way this happens is, it slows down, down... the velocity gets smaller and smaller, and then, for just an instant (literally, a mathematical point in time), it becomes zero before, the next instant, going negative. We will b e coming back to this “reading of graphs” in the lab andt h eh o m e w o r k ,a sw e l la si nt h e next chapter, when we introduce the concept of acceleration. Motion with constant velocity",University Physics I Classical Mechanics.pdf "next chapter, when we introduce the concept of acceleration. Motion with constant velocity If the instantaneous velocity of an object never changes, itmeans that it is always moving in the same direction with the same speed. In that case, the instantaneous velocity and the average velocity coincide, and that means we can writev =∆ x/∆t (where the size of the interval ∆t could now be anything), and rewrite this equation in the form ∆x = v ∆t (1.9) which is the same as xf − xi = v (tf − ti) Now suppose we keepti constant (that is, we fix the initial instant) but allow the time tf to change, so we will just writet for an arbitrary value oftf ,a n dx for the corresponding value ofxf .W ee n d up with the equation x − xi = v (t − ti) which we can also write as x(t)= xi + v (t − ti)( 1 . 1 0 ) after some rearranging, and where the notationx(t)h a sb e e ni n t r o d u c e dt oe m p h a s i z et h a tw e",University Physics I Classical Mechanics.pdf "x(t)= xi + v (t − ti)( 1 . 1 0 ) after some rearranging, and where the notationx(t)h a sb e e ni n t r o d u c e dt oe m p h a s i z et h a tw e want to think ofx as a function oft.T h i s i s , n o t s u r p r i s i n g l y , t h e e q u a t i o n o f a s t r a i g h t l i n e —a “curve” which is its own tangent and always has the same slope. (Please make sure that you are not confused by the notation inEq. (1.10). The parentheses around the t on the left-hand side mean that we are considering the position x as a function oft.O n the other hand, the parentheses around the quantityt − ti on the right-hand side mean that we are multiplying this quantity byv,w h i c hi sac o n s t a n th e r e . T h i sd i s t i n c t i o nw i l lb ep a r t i c u larly important when we introduce the functionv(t)n e x t . ) Either one of equations (1.9)o r(1.11)c a nb eu s e dt os o l v ep r o b l e m si n v o l v i n gm o t i o nw i t hc o n s t a nt",University Physics I Classical Mechanics.pdf "Either one of equations (1.9)o r(1.11)c a nb eu s e dt os o l v ep r o b l e m si n v o l v i n gm o t i o nw i t hc o n s t a nt velocity, and again you will see examples of this in the homework. Motion with changing velocity",University Physics I Classical Mechanics.pdf "12 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY If the velocity changes with time, obtaining an expression for the position of the object as a function of time may be a nontrivial task. In the next chapterwe will study an important special case, namely, when the velocity changes at a constant rate (constant acceleration). For the most general case, a graphical method that is sometimes useful is the following. Suppose that we know the functionv(t), and we graph it, as in Figure1.5 below. Then the area under the curve in between any two instants, sayti and tf ,i se q u a lt ot h et o t a ld i s p l a c e m e n to ft h eo b j e c t over that time interval. The idea involved is known in calculus asintegration,a n di tg o e sa sf o l l o w s .S u p p o s et h a tIb r e a k v (m/s) t (s)t1 t2 t3 ... tf v1 v2 v(t) Figure 1.5: How to get the displacement from the area under thev-vs-t curve.",University Physics I Classical Mechanics.pdf "v (m/s) t (s)t1 t2 t3 ... tf v1 v2 v(t) Figure 1.5: How to get the displacement from the area under thev-vs-t curve. down the interval fromti to tf into equally spaced subintervals, beginning at the timeti (which I am, equivalently, going to callt1,t h a ti s ,t1 ≡ ti,s oIh a v en o wt1,t 2,t 3,...t f ). Now suppose I treat the object’s motion over each subinterval as if it were motionw i t hc o n s t a n tv e l o c i t y ,t h ev e l o c i t y being that at the beginning of the subinterval. This, of course, is only an approximation, since the velocity is constantly changing; but, if you look at Figure 1.5,y o uc a nc o n v i n c ey o u r s e l ft h a t it will become a better and better approximation as I increaset h en u m b e ro fi n t e r m e d i a t ep o i n t s and the rectangles shown in the figure become narrower and narrower. In this approximation, the displacement during the first subinterval would be ∆x1 = v1(t2 − t1)( 1 . 1 1 )",University Physics I Classical Mechanics.pdf "displacement during the first subinterval would be ∆x1 = v1(t2 − t1)( 1 . 1 1 ) where v1 = v(t1); similarly, ∆x2 = v2(t3 − t2), and so on.",University Physics I Classical Mechanics.pdf "1.2. POSITION, DISPLACEMENT, VELOCITY 13 However, Eq. (1.11)i sj u s tt h ea r e ao ft h efi r s tr e c t a n g l es h o w nu n d e rt h ec u r v einF i g u r e1.5 (the base of the rectangle has “length”t2 − t1,a n di t sh e i g h ti sv1). Similarly for the second rectangle, and so on. So the sum ∆x1 +∆x2 +... is both an approximation to the area under thev-vs-t curve, and an approximation to the total displacement ∆t.A s t h e s u b d i v i s i o n b e c o m e s fi n e r a n d fi n e r , and the rectangles narrower and narrower (and more numerous), both approximations become more and more accurate. In the limit of “infinitely many,” infinitely narrow rectangles, you get both the total displacement and the area under the curve exactly, andthey are both equal to each other. Mathematically, we would write ∆x = ∫ tf ti v(t) dt (1.12) where the stylized “S” (for “sum”) on the right-hand side is the symbol of the operation known",University Physics I Classical Mechanics.pdf "∆x = ∫ tf ti v(t) dt (1.12) where the stylized “S” (for “sum”) on the right-hand side is the symbol of the operation known as integration in calculus. This is essentially the inverse of the process know as differentiation, by which we got the velocity function from the position function, back in Eq. (1.8). This graphical method to obtain the displacement from the velocity function is sometimes useful, if you can estimate the area under thev-vs-t graph reliably. An important point to keep in mind is that rectangles under the horizontal axis (correspondingt on e g a t i v ev e l o c i t i e s )h a v et ob ea d d e d as having negative area (since the corresponding displacement is negative); see example 1.5.1 at the end of this chapter. Extension to two dimensions In two (or more) dimensions, you define the average velocity vector as a vector⃗vav whose com- ponents are vav,x =∆ x/∆t, vav,y =∆ y/∆t,a n ds oo n( w h e r e∆x, ∆y,... are the corresponding",University Physics I Classical Mechanics.pdf "ponents are vav,x =∆ x/∆t, vav,y =∆ y/∆t,a n ds oo n( w h e r e∆x, ∆y,... are the corresponding components of the displacement vector ∆⃗r). This can be written equivalently as the single vector equation ⃗vav = ∆⃗r ∆t (1.13) This tells you how to multiply (or divide) a vector by an ordinary number: you just multiply (or divide) each component by that number. Note that, if the number in question is positive, this operation does not change the direction of the vector at all,it just scales it up or down (which is why ordinary numbers, in this context, are calledscalars). If the scalar is negative, the vector’s direction is flipped as a result of the multiplication. Since∆t in the definition of velocity is always positive, it follows that the average velocity vector alwaysp o i n t si nt h es a m ed i r e c t i o na st h e displacement, which makes sense. To get the instantaneous velocity, you just take the limit ofthe expression (1.13)a s∆ t → 0, for",University Physics I Classical Mechanics.pdf "displacement, which makes sense. To get the instantaneous velocity, you just take the limit ofthe expression (1.13)a s∆ t → 0, for each component separately. The resulting vector⃗vhas components vx =l i m∆t→0 ∆x/∆t,e t c . , which can also be written asvx = dx/dt, vy = dy/dt, . . .. All the results derived above hold for each spatial dimensiona n di t sc o r r e s p o n d i n gv e l o c i t yc o m - ponent. For instance, the graphical method shown in Figure1.5 can always be used to get ∆x if",University Physics I Classical Mechanics.pdf "14 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY the functionvx(t)i sk n o w n ,o re q u i v a l e n t l yt og e t∆y if you knowvy(t), and so on. Introducing the velocity vector at this point does cause a little bit of a notational difficulty. For quantities like x and ∆x,i ti sp r e t t yo b v i o u st h a tt h e ya r et h ex components of the vectors⃗r and ∆⃗r,r e s p e c t i v e l y ;h o w e v e r ,t h eq u a n t i t yt h a tw eh a v es of a rb e enc a l l i n gs i m p l yv should more properly be denoted asvx (or vy if the motion is along they axis). In fact, there is a convention that if you use the symbol for a vector without the arrow on topor any x, y, . . .subscripts, you must mean themagnitude of the vector. In this book, however, I have decidednot to follow that convention, at least not until we get to Chapter 8 (and even then I will use it only for forces). This is because we will spend most of our time dealing with motion in only one dimension, and",University Physics I Classical Mechanics.pdf "This is because we will spend most of our time dealing with motion in only one dimension, and it makes the notation unnecessarily cumbersome to keep having to write thex or y subscripts on every component of every vector, when you really only have oned i m e n s i o nt ow o r r ya b o u ti nt h e first place. So v will, throughout, refer to the relevant component of the velocity vector, to be inferred from the context, until we get to Chapter 8 and actually need to deal with both avx and a vy explicitly. Finally, notice that the magnitude of the velocity vector,|⃗v| = √ v2x + v2y + v2z,i se q u a lt ot h e instantaneous speed,s i n c e ,a s∆t → 0, the magnitude of the displacement vector,|∆⃗r|,b e c o m e s the actual distance traveled by the object in the time interval ∆t. 1.3 Reference frame changes and relative motion Everything up to this point assumes that we are using a fixed, previously agreed uponreference",University Physics I Classical Mechanics.pdf "1.3 Reference frame changes and relative motion Everything up to this point assumes that we are using a fixed, previously agreed uponreference frame.B a s i c a l l y ,t h i s i s j u s t a n o r i g i na n d a s e t o f a x e sa l o n g w h i cht om e a s u r eo u rc o o r d i n a t e s , as shown in Figure 1. There are, however, a number of situations in physics that call for the use of different reference frames, and, more importantly, that require us toconvert various physical quantities from one reference frame to another. For instance, imagine you are onab o a to nar i v e r ,r o w i n gd o w n s t r e a m . You are moving with a certain velocity relative to the water around you, but the water itself is flowing with a different velocity relative to the shore, and youra c t u a lv e l o c i t yr e l a t i v et ot h es h o r e is the sum of those two quantities. Ships generally have to dothis kind of calculation all the time,",University Physics I Classical Mechanics.pdf "is the sum of those two quantities. Ships generally have to dothis kind of calculation all the time, as do airplanes: the “airspeed” is the speed of a plane relative to the air around it, but that air is usually moving at a substantial speed relative to the earth. The way we deal with all these situations is by introducing twor e f e r e n c ef r a m e s ,w h i c hh e r eIa m going to call A and B. One of them, say A, is “at rest” relative tot h ee a r t h ,a n dt h eo t h e ro n ei s “at rest” relative to something else—which means, really, moving along with that something else. (For instance, a reference frame at rest “relative to the river” would be a frame that’s moving along",University Physics I Classical Mechanics.pdf "1.3. REFERENCE FRAME CHANGES AND RELATIVE MOTION 15 with the river water, like a piece of driftwood that you couldmeasure your progress relative to.) In any case, graphically, this will look as in Figure1.6,w h i c hIh a v ed r a w nf o rt h et w o - d i m e n s i o n a l case because I think it makes it easier to visualize what’s going on: A B xAB xBP xAP yBPyAP yAB P rBP rAP rAB Figure 1.6: Position vectors and coordinates of a pointP in two different reference frames, A and B. In the reference frame A, the pointP has position coordinates (xAP ,y AP ). Likewise, in the reference frame B, its coordinates are (xBP ,y BP ). As you can see, the notation chosen is such that every coordinate in A will have an “A” as a first subscript, while thesecond subscript indicates the object to which it refers, and similarly for coordinates in B. The coordinates (xAB,y AB)a r es p e c i a l :t h e ya r et h ec o o r d i n a t e s ,i nt h er e f e r e n c ef r ame A, of the",University Physics I Classical Mechanics.pdf "The coordinates (xAB,y AB)a r es p e c i a l :t h e ya r et h ec o o r d i n a t e s ,i nt h er e f e r e n c ef r ame A, of the origin of reference frame B. This is enough to fully locate the frameBi nA ,a sl o n ga st h ef r a m e s are not rotated relative to each other. The thin colored lines I have drawn along the axes in Figure 1.6a r ei n t e n d e dt om a k ei tc l e a rt h a t the following equations hold: xAP = xAB + xBP yAP = yAB + yBP (1.14) Although the figure is drawn for the easy case where all these quantities are positive, you should be able to convince yourself that Eqs. (1.14)h o l da l s ow h e no n eo rm o r eo ft h ec o o r d i n a t e sh a v e negative values.",University Physics I Classical Mechanics.pdf "16 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY All these coordinates are also the components of the respective position vectors, shown in the figure and color-coded by reference frame (so, for instance,⃗rAP is the position vector ofP in the frame A), so the equations (1.14)c a nb ew r i t t e nm o r ec o m p a c t l ya st h es i n g l ev e c t o re q u a t i o n ⃗rAP = ⃗rAB + ⃗rBP (1.15) From all this you can see how to add vectors: algebraically, you just add their components sepa- rately, as in Eqs. (1.14); graphically, you draw them so the tip of one vector coincides with the tail of the other (we call this “tip-to-tail”), and then draw the sum vector from the tail of the first one to the tip of the other one. (In general, to get two arbitrary vectors tip-to-tail you may need to displace one of them; this is OK provided you do not change itsorientation, that is, provided you only displace it, not rotate it. We’ll see how this works in a moment with velocities, and later on",University Physics I Classical Mechanics.pdf "only displace it, not rotate it. We’ll see how this works in a moment with velocities, and later on with forces.) Of course, I showed you already how tosubtract vectors with Fig.1.3:a g a i n , a l g e b r a i c a l l y , y o u just subtract the corresponding coordinates, whereas graphically you draw them with a common origin, and then draw the vector from the tip of the vector youare subtracting to the tip of the other one. If you read the previous paragraph again, you can see that Fig.1.3 can equally well be used to show that ∆⃗r= ⃗rf −⃗ri,a st os h o wt h a t⃗rf = ⃗ri +∆ ⃗r. In a similar way, you can see graphically from Fig.1.6 (or algebraically from Eq. (1.15)) that the position vector ofP in the frame B is given by⃗rBP = ⃗rAP −⃗rAB.T h el a s tt e r mi nt h i se x p r e s s i o n can be written in a different way, as follows. If I follow the convention I have introduced above, the quantity xBA (with the order of the subscripts reversed) would be thex coordinate of the origin of",University Physics I Classical Mechanics.pdf "quantity xBA (with the order of the subscripts reversed) would be thex coordinate of the origin of frame A in frame B, and algebraically that would be equal to−xAB,a n ds i m i l a r l yyBA = −yAB. Hence the vector equality⃗rAB = −⃗rBA holds. Then, ⃗rBP = ⃗rAP −⃗rAB = ⃗rAP + ⃗rBA (1.16) This is, in a way, the “inverse” of Eq. (1.15): it tells us how to get the position ofP in the frame Bi fw ek n o wi t sp o s i t i o ni nt h ef r a m eA . Let me show next you how all this extends to displacements andvelocities. Suppose the pointP indicates the position of a particle at the timet.O v e rat i m ei n t e r v a l∆t,b o t ht h ep o s i t i o no ft h e particle and the relative position of the two reference frames may change. We can add yet another subscript, i or f,( f o ri n i t i a la n dfi n a l )t ot h ec o o r d i n a t e s ,a n dw r i t e ,f o re xample, xAP,i = xAB,i + xBP,i xAP,f = xAB,f + xBP,f (1.17) Subtracting these equations gives us the corresponding displacements:",University Physics I Classical Mechanics.pdf "xAP,i = xAB,i + xBP,i xAP,f = xAB,f + xBP,f (1.17) Subtracting these equations gives us the corresponding displacements: ∆xAP =∆ xAB +∆ xBP (1.18)",University Physics I Classical Mechanics.pdf "1.3. REFERENCE FRAME CHANGES AND RELATIVE MOTION 17 Dividing Eq. (1.18)b y∆t we get the average velocities1,a n dt h e nt a k i n gt h el i m i t∆t → 0w eg e t the instantaneous velocities. This applies in the same way tot h ey coordinates, and the result is the vector equation ⃗vAP = ⃗vBP + ⃗vAB (1.19) Ih a v er e a r r a n g e dt h et e r m so nt h er i g h t - h a n ds i d et o( h o p e f ully) make it easier to visualize what’s going on. In words: the velocity of the particleP relative to (ormeasured in)f r a m eAi se q u a lt o the (vector) sum of the velocity of the particle as measured inf r a m eB ,p l u st h ev e l o c i t yo ff r a m e Br e l a t i v et of r a m eA . The result (1.19)i sj u s tw h a tw ew o u l dh a v ee x p e c t e df r o mt h ee x a m p l e sIm e n t ioned at the beginning of this section, like rowing in a river or an airplane flying in the wind. For instance, for",University Physics I Classical Mechanics.pdf "beginning of this section, like rowing in a river or an airplane flying in the wind. For instance, for the airplane ⃗vBP could be its “airspeed” (only it has to be a vector, so it wouldbe more like its “airvelocity”: that is, its velocity relative to the air around it), and⃗vAB would be the velocity of the air relative to the earth (the wind velocity, at the location of the airplane). In other words, A represents the earth frame of reference and B the air, or wind,f r a m eo fr e f e r e n c e . T h e n ,⃗vAP would be the “true” velocity of the airplane relative to the earth.You can see how it would be important to add these quantities as vectors, in general, by considering what happens when you fly in a cross wind, or try to row across a river, as in Figure1.7 below. vEb vRb vER Figure 1.7: Rowing across a river. If you head “straight across” the river (with velocity vector⃗vRb in the",University Physics I Classical Mechanics.pdf "vEb vRb vER Figure 1.7: Rowing across a river. If you head “straight across” the river (with velocity vector⃗vRb in the moving frame of the river, which is flowing with velocity⃗vER in the frame of the earth), your actual velocity relative to the shore will be the vector⃗vEb. This is an instance of Eq. (1.19), with frame A being E (the earth), frame B being R (the river), and “b” (for “boat”) standing for the point P we are tracking. As you can see from this couple of examples, Equation (1.19)i so f t e nu s e f u la si ti sw r i t t e n ,b u t 1We have made a very natural assumption, that the time interval∆ t is the same for observers tracking the particle’s motion in frames A and B, respectively (where eacho b s e r v e ri su n d e r s t o o dt ob em o v i n ga l o n gw i t hh i so r her frame). This, however, turns out to benot true when any of the velocities involved is close to the speedof light,",University Physics I Classical Mechanics.pdf "her frame). This, however, turns out to benot true when any of the velocities involved is close to the speedof light, and so the simple addition of velocities formula (1.19)d o e sn o th o l di nE i n s t e i n ’ sr e l a t i v i t yt h e o r y . (This is actually the first bit of real physics I have told you about in this book, so far; unfortunately, you will have no use for it this semester!)",University Physics I Classical Mechanics.pdf "18 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY sometimes the information we have is given to us in a different way: for instance, we could be given the velocity of the object in frame A (⃗vAP ), and the velocity of frame B as seen in frame A (⃗vAB), and told to calculate the velocity of the object as seen in frame B. This can be easily accomplished if we note that the vector⃗vAB is equal to−⃗vBA;t h a ti st os a y ,t h ev e l o c i t yo ff r a m eBa ss e e nf r o m frame A is just the opposite of the velocity of frame A as seen from frame B. Hence, Eq. (1.19)c a n be rewritten as ⃗vAP = ⃗vBP −⃗vBA (1.20) For most of the next few chapters we are going to be consideringo n l ym o t i o ni no n ed i m e n s i o n , and so we will write Eq. (1.19)( o r(1.20)) without the vector symbols, and it will be understood that v refers to the component of the vector⃗valong the coordinate axis of interest.",University Physics I Classical Mechanics.pdf "that v refers to the component of the vector⃗valong the coordinate axis of interest. Aq u a n t i t yt h a tw i l lb ep a r t i c u l a r l yi m p o r t a n tl a t e ro ni st he relative velocityof two objects, which we could label 1 and 2. The velocity of object 2 relative to object 1 is, by definition, the velocity which an observer moving along with 1 would measure for object2 . S oi ti sj u s tas i m p l ef r a m e change: let the earth frame be frame E and the frame moving witho b j e c t1b ef r a m e1 ,t h e nt h e velocity we want isv12 (“velocity of object 2 in frame 1”). If we make the change A→ 1, B→ E, and P→ 2i nE q .(1.20), we get v12 = vE2 − vE1 (1.21) In other words, the velocity of 2 relative to 1 is just the velocity of 2 minus the velocity of 1. This is again a familiar effect: if you are driving down the highway at5 0m i l e sp e rh o u r ,a n dt h ec a ri n front of you is driving at 55, then its velocity relative to youi s5m p h ,w h i c hi st h er a t ea tw h i c h",University Physics I Classical Mechanics.pdf "front of you is driving at 55, then its velocity relative to youi s5m p h ,w h i c hi st h er a t ea tw h i c h it is moving away from you (in the forward direction, assumedto be the positive one). It is important to realize that all these velocities arereal velocities, each in its own reference frame. Something may be said to be truly moving at some velocity in oner e f e r e n c ef r a m e ,a n dj u s ta s truly moving with a different velocity in a different reference frame. I will have a lot more to say about this in the next chapter, but in the meantime you can reflect on the fact that, if a car moving at 55 mph collides with another one moving at 50 mph in the samedirection, the damage will be basically the same as if the first car had been moving at 5 mph andt h es e c o n do n eh a db e e na t rest. For practical purposes, where you are concerned, another car’s velocity relative to yoursis that car’s “real” velocity. Resources",University Physics I Classical Mechanics.pdf "rest. For practical purposes, where you are concerned, another car’s velocity relative to yoursis that car’s “real” velocity. Resources Ag o o da p pf o rp r a c t i c i n gh o wt oa d dv e c t o r s( a n dh o wt ob r e a kthem up into components, mag- nitude and direction, etc.) may be found here: https://phet.colorado.edu/en/simulation/vector-addition. Perhaps the most dramatic demonstration of how Eq. (1.19)w o r k si nt h er e a lw o r l di si nt h i s episode ofMythbusters: https://www.youtube.com/watch?v=BLuI118nhzc.( I ft h i sl i n kd o e sn o t work, do a search for “Mythbusters cancel momentum.”) They shoot a ball from the bed of a truck,",University Physics I Classical Mechanics.pdf "1.4. IN SUMMARY 19 with a velocity (relative to the truck) of 60 mph backwards, while the truck is moving forward at 60 mph. I think the result is worth watching. (Do not be distracted by their talk about momentum. We will get there, in time.) A very old, but also very good, educational video about different frames of reference is this one: https://www.youtube.com/watch?v=sS17fCom0Ns.Y o u s h o u l d t r y t o w a t c h a t l e a s t p a r t o f i t . Many things will be relevant to later parts of the course, including projectile motion, and the whole discussion of relative motion coming up next, in Chapter 2. 1.4 In summary 1. To describe the motion of an object in one dimension we treati ta sam a t h e m a t i c a lp o i n t , and consider itsposition coordinate, x (often shortened to just theposition), as a function of time: x(t). 2. Numerically, the position coordinate is the distance to achosen origin, with a positive or",University Physics I Classical Mechanics.pdf "time: x(t). 2. Numerically, the position coordinate is the distance to achosen origin, with a positive or negative sign depending on which side of the origin the pointis. For every problem, when we introduce a coordinate axis we need to specify a positive direction. Starting from the origin in that direction, the position coordinate is positive and increasing, whereas going from the origin in the opposite direction (negative direction) it becomes increasingly negative. 3. The displacement of an object over a time interval from an initial time ti to a final timetf is the quantity ∆x = xf −xi,w h e r exf is the position of the object at the final time (or, the final position), andxi the position at the initial time (or initial position). 4. The average velocity of an object over the time interval from ti to tf is defined asvav =∆ x/∆t, where ∆t = tf − ti. 5. The instantaneous velocity (often just called thevelocity)o fa no b j e c ta tt h et i m et is the",University Physics I Classical Mechanics.pdf "where ∆t = tf − ti. 5. The instantaneous velocity (often just called thevelocity)o fa no b j e c ta tt h et i m et is the limit value of the quantity ∆x/∆t,c a l c u l a t e df o rs u c c e s s i v e l ys h o r t e rt i m ei n t e r v a l s∆t,a l l with the same initial timeti = t.T h i s i s , m a t h e m a t i c a l l y ,t h e d e fi n i t i o n o f t h e d e r i v a t i v e of the functionx(t)a tt h et i m et,w h i c hw ee x p r e s sa sv = dx/dt. 6. Graphically, the instantaneous velocity of the object atthe timet is the slope of the tangent line to thex-vs-t graph at the timet. 7. The instantaneous velocity of an object is a positive or negative quantity depending on whether the object, at that instant, is moving in the positiveo rt h en e g a t i v ed i r e c t i o n . 8. For an object moving withconstant velocity v,t h ep o s i t i o nf u n c t i o ni sg i v e nb y[ E q .(1.10)]: x(t)= xi + v (t − ti)",University Physics I Classical Mechanics.pdf "20 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY where ti is an arbitrarily chosen initial time andxi the position at that time. This can also be written in the form given by Eq. (1.9). The argument (t)o nt h el e f t - h a n ds i d eo f(1.10)i s optional, andti is often set equal to zero, giving justx = xi + vt.T h i s , h o w e v e r ,i sn o tq u i t e as generally applicable as the result (1.9)o r(1.10). 9. For an object moving with changing velocity, the total displacement in between timesti and tf is equal to the total area under thev-vs-t curve in between those times; areas below the horizontal (t)a x i sm u s tb et r e a t e da sn e g a t i v e . 10. In two or more dimensions one introduces, for every pointin space, aposition vector whose components are just the Cartesian coordinates of that point;t h e nt h ed i s p l a c e m e n tv e c t o ri s defined as ∆⃗r= ⃗rf − ⃗ri,t h ea v e r a g ev e l o c i t yv e c t o ri s⃗vav =∆ ⃗r /∆t,a n dt h ei n s t a n t a n e o u s",University Physics I Classical Mechanics.pdf "defined as ∆⃗r= ⃗rf − ⃗ri,t h ea v e r a g ev e l o c i t yv e c t o ri s⃗vav =∆ ⃗r /∆t,a n dt h ei n s t a n t a n e o u s velocity vector is the limit of this as ∆t goes to zero. Vectors are added by adding their components separately; to multiply a vector by an ordinary number, orscalar,w ej u s tm u l t i p l y each component by that number. 11. When tracking the motion of an object, “P”, in two differentreference frames, A and B, the position vectors are related by⃗rAP = ⃗rAB + ⃗rBP ,a n dl i k e w i s et h ev e l o c i t yv e c t o r s : ⃗vAP = ⃗vAB + ⃗vBP .H e r e , t h e fi r s t s u b s c r i p t t e l l s y o u i n w h i c h r e f e r e n c e f r a m eyou are measuring, and the second subscript what it is that you are looking at; ⃗rAB is the position vector of the origin of frame B as seen in frame A, and⃗vAB its velocity.",University Physics I Classical Mechanics.pdf "1.5. EXAMPLES 21 1.5 Examples 1.5.1 Motion with (piecewise) constant velocity You leave your house on your bicycle to go visit a friend. At your normal speed of 9 mph, you know it takes you 6 minutes to get there. This time, though, when youh a v et r a v e l e dh a l ft h ed i s t a n c e you realize you forgot a book at home that you were going to return to your friend, so you turn around and pedal at twice your normal speed, get back home, grab the book, and start off again for your friend’s house at 18 mph (imagine you are really fit topull this off!) (a) How far away from you does your friend live? (b) What is the total distance you travel on this trip? (c) How long did the whole trip take? (d) Draw a position versus time and a velocity versus time graph for the whole trip. Use SI units for both graphs. Neglect the time it takes you to stop and turn around, and also the time it takes you",University Physics I Classical Mechanics.pdf "both graphs. Neglect the time it takes you to stop and turn around, and also the time it takes you to run into your house and grab the book (in other words, assumet h o s ec h a n g e si ny o u rd i r e c t i o n of motion happen instantly). (e) Show explicitly, using yourv-vs-t graph, that the graphical method of Figure1.5 gives you the total displacement for your trip. Solution Ia mg o i n gt ow o r ko u tt h i sp r o b l e mu s i n gb o t hm i l e sa n dS Iu n i ts, the first because it seems most natural, and the second because we are asked to use SI units forp a r t( d ) ,s ow em i g h ta sw e l lu s e them from the start. In general, you should use SI units whenever you can. If you are unsure of what to do in a specific problem, ask your instructor! (a) We are told that at 9 miles per hour it would take 6 minutes tog e tt h e r e ,s ol e tu su s e ∆x = v∆t (1.22)",University Physics I Classical Mechanics.pdf "(a) We are told that at 9 miles per hour it would take 6 minutes tog e tt h e r e ,s ol e tu su s e ∆x = v∆t (1.22) with v =9 m p ha n d∆t =6 m i n . W eh a v et oe i t h e rc o n v e r tt h eh o u r st om i n u t e s ,o rv i c e-versa. Again, in this case it seems easiest to realize that 6 min equals 1/10 of an hour, so: ∆x = ( 9 miles hr ) × 0.1h r=0 .9m i l e s. (1.23) In SI units, 9 mph = 4.023 m/s, and 6 min = 360 s, so ∆x =1 4 4 8m . (b) This is just a matter of keeping track of the distance traveled in the various parts of the trip. You start by riding half the distance to your friend’s house,which is to say, 0.45 miles, and then you ride that again back home, so that’s 0.9m i l e s , a n d t h e n y o u ’ r e b a c k w h e r e y o u s t a r t e d , s o y o u still have to go the 0.9m i l e s t o y o u r f r i e n d ’ s h o u s e . S o o v e r a l l , y o u r i d e f o r 1.8m i l e s , o r 2 8 9 7m .",University Physics I Classical Mechanics.pdf "22 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY (c) The whole trip consists, as detailed above, of 0.45 miles at 9 mph, and the rest, which is 1.35 miles, at 18 mph. Applying ∆t =∆ x/v to each of these intervals, we get a total time of ∆t = 0.45 miles 9m p h + 1.35 miles 18 mph =0 .125 hours =0 .125 × 60 min = 7.5m i n =7 .5 × 60 s = 450 s (1.24) (d) The graphs are shown below. Details on how to get them follow. x (m) v (m/s) t (s) t (s) • First interval: fromt =0t o t =1 8 0s( 3m i n ,w h i c hi sw h a ti tw o u l dt a k et oc o v e rh a l ft h ed i s tance to your friend’s house at 9 mph). The velocity is a constantv =4 .023 m/s. For the position graph, use Eq. (1.10)w i t hxi =0 ,ti =0a n dv =4 .023 m/s. • Second interval: fromt =1 8 0 st ot =2 7 0 s( i tt a k e sy o uh a l fo f3 m i n ,w h i c hi st os a y9 0 s ,t o cover the same distance as above at twice the speed). The velocity is a constantv = −8.046 m/s",University Physics I Classical Mechanics.pdf "1.5. EXAMPLES 23 (twice what it was earlier, but in the opposite direction). For the position graph, use Eq. (1.10) with xi =7 2 4 m( t h i si sh a l fo ft h ed i s t a n c et oy o u rf r i e n d ’ sh o u s e ,a ndt h es t a r t i n gp o s i t i o nf o r this interval),ti =1 8 0sa n dv = −8.046 m/s. • Third interval: fromt =2 7 0st ot =4 5 0s . T h ev e l o c i t yi sac o n s t a n tv =8 .046 m/s (same speed as just before, but in the opposite direction). For the position graph, use Eq. (1.10)w i t hxi =0m (you start back at your house),ti =2 7 0sa n dv =8 .046 m/s. If you are familiar with the software packageMathematica,t h ep o s i t i o ng r a p hw a sp r o d u c e du s i n g the command Plot[If[t<180, 4.023 t, If[t<270, 4.023*180-8.046 (t-180), 8.046 (t-270)]],{t, 0, 450}] and the velocity graph was produced using Plot[If[t<180, 4.023 , If[t<270, -8.046, 8.046]],{t, 0, 450}] (and then connecting the horizontal lines by hand, which is not necessary, but helps to visualize",University Physics I Classical Mechanics.pdf "(and then connecting the horizontal lines by hand, which is not necessary, but helps to visualize what’s going on). The graphs could also have been produced using the free plotting software package Gnuplot (avail- able here: http://www.gnuplot.info/download.html)w i t ht h ef o l l o w i n gc o m m a n d s : gnuplot> set dummy t gnuplot> f(t) = t<180 ? 4.023*t : t<270 ? 4.023*180-8.046*(t-180) : 8.046*(t-270) gnuplot> plot [0:450] f(t) The first line sets the default independent variable tot (instead of x,w h i c hi sw h a tG n u p l o te x - pects). The second line defines the piecewise function usingthe ternary operator (? :) borrowed from the C programming language. The third line plots the function over the range indicated. (e) For this we need to find the area under thev-vs-t graph we just plotted. Basically, we have three rectangles: the first one has base 180 units (s) and height 4 units (m/s), so its area is 4×180 = 720",University Physics I Classical Mechanics.pdf "rectangles: the first one has base 180 units (s) and height 4 units (m/s), so its area is 4×180 = 720 (m). The second rectangle has base 90 units and height−8( n e g a t i v e ,b e c a u s ei ti sb e l o wt h e horizontal axis!), so its area is−720. The last one has base 180 units again (from 270 to 450) and height 8, so its area is 8× 180 = 1440. So the total area “under” thev-vs-t curve is 720 − 720 + 1440 = 1440 meters which is (approximately) your total displacement, that is,the 9 miles to your friend’s house. (Of course, we would have obtained a more accurate result if we hadu s e dt h em o r ea c c u r a t ev a l u e sf o r the “heights” of 4.023, −8.046, and 8.046, but if all we have to go by is the graph, such accuracy is pretty much impossible.)",University Physics I Classical Mechanics.pdf "24 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY 1.5.2 Addition of velocities, relative motion This example was inspired by the “race on a moving sidewalk” demo at http://physics.bu.edu/~duffy/classroom.html. Please go take a look at it! Two girls, Ann and Becky (yes, A and B) decide to have a race while they wait for a plane at a nearly-deserted airport. Ann will run on the moving walkway,t ot h ee n do fi t( w h i c hi s3 0 ma w a y ) and back, whereas Becky will run alongside her on the (non-moving) floor, also 30 m out and back. The walkway moves at 1 m/s, and the girls both run at the same constant speed of 5 m/srelative to the surface they are standing on. (a) Relative to the (non-moving) floor, what is Ann’s velocityf o rt h efi r s tl e go fh e rr a c e ,w h e ns h e is moving in the same direction as the walkway (take that to bethe positive direction)? What is her velocity for the return leg? (b) How long does it take each of the girls to complete their race?",University Physics I Classical Mechanics.pdf "her velocity for the return leg? (b) How long does it take each of the girls to complete their race? (c) When both girls are running in the positive direction, what is Becky’s velocity relative to Ann? (That is, how fast does Ann see Becky move, and in what direction?) (d) When Ann turns around and starts running in the negative direction, but Becky is still running in the positive direction, what is Becky’s velocity relativet oA n n ? (e) What is the total distance Ann runsin the moving walkway’s frame of reference? Solution Ia mg o i n gt os o l v et h i si nt h ef o r m a tt h a ty o uw i l lb er e q u i r e dto use this semester for most of the homework and exam problems. I will not be able to do this fore v e r ys i n g l ee x a m p l e ,b u ty o u should! Please follow this carefully. To begin with, you must draw a sketch of the situation described in the problem, detailed enough to include all the relevant information you are given. Here ism i n e : vWA= 5 m/s vFW= 1 m/s",University Physics I Classical Mechanics.pdf "to include all the relevant information you are given. Here ism i n e : vWA= 5 m/s vFW= 1 m/s vFB= 5 m/s 30 m going out Alice Becky vWA= –5 m/s vFW= 1 m/s vFB= –5 m/s coming back",University Physics I Classical Mechanics.pdf "1.5. EXAMPLES 25 Note that I have drawn one picture for each half of the race, andt h a ta l lt h ei n f o r m a t i o ng i v e ni n the text of the problem is there. The figure makes it clear alsothe notation I will be using for each of the girls’ velocities, and to see at a glance what is happening. You should next state what kind of problem this is and what basic result (theorem, principle, or equation(s)) you are going to use to solve it. For this problem, you could say: “This is a relative motion/reference frame transformationproblem. I will use Eq. (1.19) ⃗vAP = ⃗vBP + ⃗vAB as well as the basic equation for motion with constant velocity:” ∆x = v∆t After that, solve each part in turn, and make sure to show all your work! Part (a): LetF stand for the floor frame of reference, andW the walkway frame. In the notation of Section 1.3, we havevFW =1m / s . F o rt h efi r s tl e go fh e rr a c e ,w ea r et o l dt h a tA n n ’ sv e l ocity",University Physics I Classical Mechanics.pdf "of Section 1.3, we havevFW =1m / s . F o rt h efi r s tl e go fh e rr a c e ,w ea r et o l dt h a tA n n ’ sv e l ocity relative to the walkwayis 5 m/s, sovWA =5 m / s . T h e n ,b yE q .(1.19)( w i t ht h ef o l l o w i n gc h a n g e of indices: A → F, B → W,a n dP → A), vFA = vFW + vWA =1 m s +5 m s =6 m s (1.25) (when you see an equation like this, full of subscripts, it isag o o dp r a c t i c et or e a di to u t ,m e n t a l l y , to yourself: “Ann’s velocity relative to the floor equals thevelocity of the walkway relative to the floor plus Ann’s velocity relative to the walkway.” Then takeam o m e n tt os e ei fi tm a k e ss e n s e ! Here is a place where the picture can be really helpful.) For the return leg, use the same formula, but note that now hervelocity relative to the walkway is negative, vWA = −5m / s , s i n c e s h e i s m o v i n g i n t h e o p po s i t e d i r e c t i o n : vFA = vFW + vWA =1 m s − 5 m s = −4 m s (1.26)",University Physics I Classical Mechanics.pdf "negative, vWA = −5m / s , s i n c e s h e i s m o v i n g i n t h e o p po s i t e d i r e c t i o n : vFA = vFW + vWA =1 m s − 5 m s = −4 m s (1.26) Part (b): Relative to the floor reference frame, we have just seen that Ann first covers 30 m at a speed of 6 m/s, and then the same 30 m at a speed of 4 m/s, so her total time is ∆tA = 30m 6m/s + 30m 4m/s =5s+7 .5s =1 2.5s ( 1 . 2 7 ) whereas Becky just runs 30 m at 5 m/s both ways, so it takes her 6se i t h e rw a y ,f o rat o t a lo f1 2 s , which means she wins the race.",University Physics I Classical Mechanics.pdf "26 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY Part (c): The quantity we want is written, in the notation of Section 1.3,vAB (“velocity of Becky relative to Ann”). To calculate this, we just need to know thevelocities of both girls in some frame of reference (the same for both!), then subtract Ann’s velocity from Becky’s (this is what Eq. (1.21) is saying). In this case, if we just choose the floor’s reference frame, we havevFA =6 m / sa n d vFB =5m / s ,s o vAB = vFB − vFA =5 m s − 6 m s = −1 m s (1.28) The negative sign makes sense: Ann sees Beckyfalling behind her,s or e l a t i v et oh e rB e c k yi sm o v i n g backwards,w h i c hi st os a y ,i nt h ed i r e c t i o nw eh a v ei d e n t i fi e da sn e g a t ive. Part (d): Again we use the same equation, and Becky’s velocityi ss t i l lt h es a m e ,b u tn o wA n n ’ s velocity isvFA = −4m / s ( n o t e t h e n e g a t i v e s i g n ! ) , s o vAB = vFB − vFA =5 m s − ( −4 m s ) =9 m s (1.29)",University Physics I Classical Mechanics.pdf "velocity isvFA = −4m / s ( n o t e t h e n e g a t i v e s i g n ! ) , s o vAB = vFB − vFA =5 m s − ( −4 m s ) =9 m s (1.29) Part (e): You may find this a bit surprising, but if you think about it the explanation for why Ann lost the race, despite her running at the same speed as Becky relative to the surface she was standing on,h a st ob et h a ts h ea c t u a l l yr a nal o n g e rd i s t a n c eo nt h a ts u r face! Since she was running for a total of 12.5s a t a c o n s t a n tspeed (not velocity!) of 5 m/s in the walkway frame, then in that frame she ran a distanced = |v|∆t =5 × 12.5=6 2.5m . T h a t i s t h e t o t a l l e n g t h o f w a l k w a y t h a t she actually stepped on.",University Physics I Classical Mechanics.pdf "1.6. PROBLEMS 27 1.6 Problems Problem 1 x (m) t (s) The above figure is the position (in meters) versus time (in seconds) graph of an object in motion. Only the segments betweent =1 sa n dt =2 s ,a n db e t w e e nt =4 sa n dt =5 s ,a r es t r a i g h tl i n e s . The peak of the curve is att =3s , x =4m . Answer the following questions, and provide a brief justification for your answer in every case. (a) At what time(s) is the object’s velocity equal to zero? (b) For what range(s) of times is the object moving with constant velocity? (c) What is the object’s position coordinate att =1s ? (d) What is the displacement of the object betweent =1sa n dt =4s ? (e) What is thedistance traveled betweent =1sa n dt =4s ? (f) What is the instantaneous velocity of the object att =1 .5s ? (g) What is its average velocity betweent =1sa n dt =3s ? Problem 2 Ap a r t i c l ei si n i t i a l l ya txi =3 m ,yi = −5m , a n d a f t e r a w h i l e i t i s f o u n d a t t h e c o o r d i n a t e s",University Physics I Classical Mechanics.pdf "Problem 2 Ap a r t i c l ei si n i t i a l l ya txi =3 m ,yi = −5m , a n d a f t e r a w h i l e i t i s f o u n d a t t h e c o o r d i n a t e s xf = −4m ,yf =2m . (a) On the grid below (next page), draw the initial and final position vectors, and the displacement vector. (b) What are the components of the displacement vector? (c) What are the magnitude and direction of the displacementvector? (You can specify the direction by the angle it makes with either the positivex or the positivey axis.)",University Physics I Classical Mechanics.pdf "28 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY x y Problem 3 Marshall Dillon is riding at 30 mph after the robber of the Dodge City bank, who has a head start of 15 minutes, but whose horse can only make 25 mph on a good day.H o w l o n g d o e s i t t a k e f o r Dillon to catch up with the bad guy, and how far from Dodge Cityare they when this happens? (Assume the road is straight, for simplicity.) Problem 4 The picture below shows the velocity versus time graph of thefirst 21 seconds of a race between two friends, “Red” and “Green.” (a) Who is ahead att =1 0s ,a n db yh o wm u c h ? (b) Who passes the 100 m marker first? 5 10 15 200 0 5 t (s) v (m/s)",University Physics I Classical Mechanics.pdf "1.6. PROBLEMS 29 Problem 5 You are trying to pass a truck on the highway. The truck is driving at 55 mph, so you speed up to 60 mph and move over to the left lane. If the truck is 17 m long, and your car is 3 m long (a) how long does it take you to pass the truck completely? (b) How far (along the highway) have you traveled in that time? Note: to answer part (a) look at the problem from the perspective of the truck driver. How far are you going relative to him, and how far would it take you to cover2 0 ma tt h a ts p e e d ? Problem 6 Suppose the position function of a particle moving in one dimension is given by x(t)=5+3 t +2 t2 − 0.5t3 (1.30) where the coefficients are such that the result will be in metersi fy o ue n t e rt h et i m ei ns e c o n d s . What is the particle’s velocity att =2s ? T h e r ea r et w ow a y sy o uc a nd ot h i s : • If you know calculus, calculate the derivative of (1.30)a n de v a l u a t ei ta tt =2s .",University Physics I Classical Mechanics.pdf "• If you know calculus, calculate the derivative of (1.30)a n de v a l u a t ei ta tt =2s . • If you donot yet know how to take derivatives, calculate the limit in the definition (1.8). That is to say, calculate ∆x/∆t with ti =2sa n d∆t equal, first, to 0.1s , t h e n t o 0.01 s, and then to 0.001 s. You will need to keep more than the usual 4 decimals in thei n t e r m e d i a t e calculations if you want an accurate result, but you should still report only 3 significant digits in the final result. Problem 7 Suppose you are rowing across a river, as in Figure1.7.Y o u rs p e e di s2m i l e sp e rh o u r r e l a t i v et o the current, which is moving at a leisurely 1 mile per hour. Ifthe river is 10 m wide, (a) How far downstream do you end up? (b) To row straight across you would need to have an upstream velocity component (relative to the current). How large would that be? (c) If your rowing speed is still only 2 miles per hour, how longd o e si tt a k ey o ut or o wa c r o s st h e",University Physics I Classical Mechanics.pdf "current). How large would that be? (c) If your rowing speed is still only 2 miles per hour, how longd o e si tt a k ey o ut or o wa c r o s st h e river now?",University Physics I Classical Mechanics.pdf "30 CHAPTER 1. REFERENCE FRAMES, DISPLACEMENT, AND VELOCITY",University Physics I Classical Mechanics.pdf "Chapter 2 Acceleration 2.1 The law of inertia There is something funny about motion with constant velocity: it is indistinguishable from rest. Of course, you can usually tell whether you are movingrelative to something else.B u t i f y o u a r e enjoying a smooth airplane ride, without looking out the window, you have no idea how fast you are moving, or even, indeed (if the flight is exceptionally smooth) whether you are moving at all. Ia ma c t u a l l yw r i t i n gt h i so na na i r p l a n e . T h efl i g h ts c r e e ni nforms me that I am moving at 480 mph relative to the ground, but I do not feel anything like that: just a gentle rocking up and down and sideways that gives me no clue as to what my forward velocity is. If I were to drop something, I know from experience that it would fall on a straight line—relative to me, that is. If it falls from my hand it will land at my feet, just as if we were all at rest. But",University Physics I Classical Mechanics.pdf "to me, that is. If it falls from my hand it will land at my feet, just as if we were all at rest. But we are not at rest. In the half second or so it takes for the object to fall,t h ea i r p l a n eh a sm o v e d forward 111 meters relative to the ground. Yet the (hypothetical) object I drop does not land 300 feet behind me! It moves forward with me as it falls, even though I am not touching it.It keeps its initial forward velocity,even though it is no longer in contact with me or anything connected to the airplane. (At this point you might think that the object is still in contact with the air inside the plane, which is moving with the plane, and conjecture that maybe it is the air inside the plane that “pushes forward” on the object as it falls and keeps it from moving backwards. This is not necessarily a dumb idea, but a moment’s reflection will convince you that itis impossible. We are all familiar with",University Physics I Classical Mechanics.pdf "dumb idea, but a moment’s reflection will convince you that itis impossible. We are all familiar with the way air pushes on things moving through it, and we know thatt h ef o r c ea no b j e c te x p e r i e n c e s depends on its mass and its shape, so if that was what was happening, dropping objects of different masses and shapes I would see them falling in all kind of different ways—as I would, in fact, if I 31",University Physics I Classical Mechanics.pdf "32 CHAPTER 2. ACCELERATION were dropping things from rest outdoors in a strong wind. Butthat is not what we experience on an airplane at all. The air, in fact, has no effect on the forwardmotion of the falling object. It does not push it in any way, because it is moving at the same velocity. This, in fact, reinforces our previous conclusion: the object keeps its forward velocitywhile it is falling, in the absence of any external influence.) This remarkable observation is one of the most fundamental principles of physics (yes, we have started to learn physics now!), which we callthe law of inertia.I t c a nb e s t a t e da s f o l l o w s :i n t h e absence of any external influence (orforce)a c t i n go ni t ,a no b j e c ta tr e s tw i l ls t a ya tr e s t ,w h i l ea n object that is already moving with some velocity will keep that same velocity (speed and direction of motion)—at least until it is, in fact, acted upon by some force.",University Physics I Classical Mechanics.pdf "of motion)—at least until it is, in fact, acted upon by some force. Please let that sink in for a moment, before we start backtracking, which we have to do now on several accounts. First, I have used repeatedly the term “force,” but I have not defined it properly. Or have I? What if I just said that forces are precisely any “external influences” that may cause a change in the velocity of an object? That will work, I think, until it is time to explore the concept in more detail, a few chapters from now. Next, I need to draw your attention to the fact that the objectI( h y p o t h e t i c a l l y )d r o p p e dd i dn o t actually keep itstotal initial velocity: it only kept its initialforward velocity. In the downward direction, it was speeding up from the moment it left my hand,as would any other falling object (and as we shall see later in this chapter). But this actuallymakes sense in a certain way: there",University Physics I Classical Mechanics.pdf "(and as we shall see later in this chapter). But this actuallymakes sense in a certain way: there was no forward force, so the forward velocity remained constant; there was, however, a vertical force acting all along (the force of gravity), and so the object did speed up in that direction. This observation is, in fact, telling us something profound aboutt h ew o r l d ’ sg e o m e t r y : n a m e l y ,t h a t forces and velocities arevectors,a n dl a w ss u c ha st h el a wo fi n e r t i aw i l lt y p i c a l l ya p p l yt ot he vector as a whole, as well as to each component separately (that is to say, each dimension of space). This anticipates, in fact, the way we will deal, later on, withm o t i o ni nt w oo rm o r ed i m e n s i o n s ; but we do not need to worry about that for a few chapters still. Finally, it is worth spending a moment reflecting on how radically the law of inertia seems to",University Physics I Classical Mechanics.pdf "Finally, it is worth spending a moment reflecting on how radically the law of inertia seems to contradict our intuition about the way the world works. Whatit seems to be telling us is that, if we throw or push an object, it should continue to move foreverwith the same speed and in the same direction with which it set out—something that we know isc e r t a i n l yn o tt r u e . B u tw h a t ’ s happening in “real life” is that, just because we have left something alone, it doesn’t mean the world has left it alone. After we lose contact with the object, all sorts of other forces will continue to act on it. A ball we throw, for instance, will experience air resistance or drag (the same effect I was worrying about in that paragraph in parenthesis in the previous page), and that will slow it down. An object sliding on a surface will experience friction, andthat will slow it down too. Perhaps the",University Physics I Classical Mechanics.pdf "An object sliding on a surface will experience friction, andthat will slow it down too. Perhaps the closest thing to the law of inertia in action that you may get tos e ei sah o c k e yp u c ks l i d i n go nt h e ice: it is remarkable (perhaps even a bit frightening) to seehow little it slows down, but even so the ice does a exert a (very small) frictional force that wouldb r i n gt h ep u c kt oas t o pe v e n t u a l l y .",University Physics I Classical Mechanics.pdf "2.1. THE LAW OF INERTIA 33 This is why, historically, the law of inertia was not discovered until people started developing an appreciation for frictional forces, and the way they are constantly acting all around us to oppose the relative motion of any objects trying to slide past each other. This mention of relative motion, in a way, brings us full circle. Yes, relative motion is certainly detectable, and for objects in contact it actually results int h eo c c u r r e n c eo ff o r c e so ft h ef r i c t i o n a l , or drag, variety. Butabsolute (that is, without reference to anything external) motion with constant velocity is fundamentally undetectable. And in view of the law of inertia, it makes sense: if no force is required to keep me moving with constant velocity, it follows that as long as I am moving with constant velocity I should not be feeling any net force actingo nm e ;n o rw o u l da n yo t h e rd e t e c t i o n apparatus I might be carrying with me.",University Physics I Classical Mechanics.pdf "apparatus I might be carrying with me. What we do feel in our bodies, and what we can detect with our inertial navigation systems (now you may start to guess why they are called “inertial”), is achange in our velocity, which is to say, our acceleration (to be defined properly in a moment). We rely, ultimately, on the law of inertia to detect accelerations: if my plane is shaking up and down, because of turbulence (as, in fact, it is right now!), the water in my cup may not stay put. Or, rather,t h ew a t e rm a yt r yt os t a yp u t (really, to keep moving, at any moment, with whatever velocity it has at that moment), but if the cup, which is connected to my hand which is connected, ultimately, to this bouncy plane, moves suddenly out from under it, not all of the water’s parts will bea b l et oa d j u s tt h e i rv e l o c i t i e st ot h e new velocity of the cup in time to prevent a spill.",University Physics I Classical Mechanics.pdf "new velocity of the cup in time to prevent a spill. This is the next very interesting fact about the physical world that we are about to discover: forces cause accelerations, or changes in velocity, but they do so in different degrees for different objects; and, moreover, the ultimate change in velocitytakes time.T h e fi r s t p a r t o f t h i s s t a t e m e n t h a s t o do with the concept ofinertial mass,t ob ei n t r o d u c e di nt h en e x tc h a p t e r ;t h es e c o n dp a r tw ea r e going to explore right now, after a brief detour to defineinertial reference frames. 2.1.1 Inertial reference frames The example I just gave you of what happens when a plane in flighte x p e r i e n c e st u r b u l e n c ep o i n t s to an important phenomenon, namely, that there may be times where the law of inertia may not seem to apply in a certain reference frame. By this I mean that an object that I left at rest, like the",University Physics I Classical Mechanics.pdf "seem to apply in a certain reference frame. By this I mean that an object that I left at rest, like the water in my cup, may suddenly start to move—relative to the reference frame coordinates—even though nothing and nobody is acting on it. More dramaticallystill, if a car comes to a sudden stop, the passengers may be “projected forward”—they were initially at rest relative to the car frame, but now they find themselves moving forward (always inthe car reference frame), to the point that, if they are not wearing seat belts, they may end uphitting the dashboard, or the seat in front of them.",University Physics I Classical Mechanics.pdf "34 CHAPTER 2. ACCELERATION Again, nobody has pushed on them, and in fact what we can see inthis case, from outside the car, is nothing but the law of inertia at work: the passengers werejust keeping their initial velocity, when the car suddenly slowed down under and around them. So there is nothing wrong with the law of inertia, butthere is a problem with the reference frame:i fI w a n tt od e s c r i b e t h e m o t i o no f objects in a reference frame like a plane being shaken up or a car that is speeding up or slowing down, I need to allow for the fact that objects may move—alwaysr e l a t i v et ot h a tf r a m e — i na n apparent violation of the law of inertia. The way we deal with this in physics is by introducing the veryimportant concept of aninertial reference frame,b yw h i c hw em e a nar e f e r e n c ef r a m ei nw h i c ha l lo b j e c t sw i l l ,at all times, be observed to move (or not move) in a way fully consistent with the law of inertia. In other words,",University Physics I Classical Mechanics.pdf "observed to move (or not move) in a way fully consistent with the law of inertia. In other words, the law of inertia has to holdwhen we use that frame’s own coordinates to calculate the objects’ velocities.T h i s , o f c o u r s e , i s w h a t w e a l w a y s d o i n s t i n c t i v e l y :w h e n I amo nap l a n eIl o c a t et h e various objects around me relative to the plane frame itself,n o tr e l a t i v et ot h ed i s t a n tg r o u n d . To ascertain whether a frame is inertial or not, we start by checking to see if the description of motion using that frame’s coordinates obeys the law of inertia: does an object left at rest on the counter in the laboratory stay at rest? If set in motion, doesit move with constant velocity on a straight line? The Earth’s surface, as it turns out, isnot quite a perfect inertial reference frame, but itis good enough that it made it possible for us to discover the lawof inertia in the first place!",University Physics I Classical Mechanics.pdf "but itis good enough that it made it possible for us to discover the lawof inertia in the first place! What spoils the inertial-ness of an Earth-bound reference frame is the Earth’s rotation, which, as we shall see later, is an example ofaccelerated motion.I n f a c t , i f y o u t h i n k a b o u t t h e g r o s s l y non-inertial frames I have introduced above—the bouncy plane, the braking car—they all have this in common: that their velocities are changing; they arenot moving with constant speed on a straight line. So, once you have found an inertial reference frame, to decidew h e t h e ra n o t h e ro n ei si n e r t i a lo r not is simple: if it is moving with constant velocity (relative to the first, inertial frame), then it is itself inertial; if not, it is not. I will show you how this works, formally, in a little bit (section 2.2.4, below), after I (finally!) get around to properly introducingt h ec o n c e p to fa c c e l e r a t i o n .",University Physics I Classical Mechanics.pdf "below), after I (finally!) get around to properly introducingt h ec o n c e p to fa c c e l e r a t i o n . It is a fundamental principle of physics thatthe laws of physics take the same form in all inertial reference frames.T h e l a w o f i n e r t i a i s , o f c o u r s e , a n e x a m p l e o f s u c h a l a w .S i nce all inertial frames are moving with constant velocity relative to each other, this is another way to say that absolute motion is undetectable, and all motion is ultimately relative. Accordingly, this principle is known as the principle of relativity.",University Physics I Classical Mechanics.pdf "2.2. ACCELERATION 35 2.2 Acceleration 2.2.1 Average and instantaneous acceleration Just as we defined average velocity in the previous chapter, using the concept of displacement (or change in position) over a time interval ∆t,w ed e fi n eaverage accelerationover the time ∆t using the change in velocity: aav = ∆v ∆t = vf − vi tf − ti (2.1) Here, vi and vf are the initial and final velocities, respectively, that is tos a y ,t h ev e l o c i t i e sa t the beginning and the end of the time interval ∆t.A s w a s t h e c a s e w i t h t h e a v e r a g e v e l o c i t y , though, the average acceleration is a concept of somewhat limited usefulness, so we might as well proceed straight away to the definition of theinstantaneous acceleration(or just “the” acceleration, without modifiers), through the same sort of limiting processb yw h i c hw ed e fi n e dt h ei n s t a n t a n e o u s velocity: a =l i m ∆t→0 ∆v ∆t (2.2)",University Physics I Classical Mechanics.pdf "velocity: a =l i m ∆t→0 ∆v ∆t (2.2) Everything that we said in the previous chapter about the relationship between velocity and position can now be said about the relationship between accelerationand velocity. For instance (if you know calculus), the acceleration as a function of time is the derivative of the velocity as a function of time, which makes it the second derivative of the position function: a = dv dt = d2x dt2 (2.3) (and if you donot know calculus yet, do not worry about the superscripts “2” onthat last expres- sion! It is just a weird notation that you will learn someday.) Similarly, we can “read off” the instantaneous accelerationfrom a velocity versus time graph, by looking at the slope of the line tangent to the curve at any point. However, if what we are given is a position versus time graph, the connection to the acceleration is morei n d i r e c t .F i g u r e2.1 (next",University Physics I Classical Mechanics.pdf "a position versus time graph, the connection to the acceleration is morei n d i r e c t .F i g u r e2.1 (next page) provides you with such an example. See if you can guess atw h a tp o i n t sa l o n gt h i sc u r v et h e acceleration is positive, negative, or zero. The way to do this “from scratch,” as it were, is to try to figureout what the velocity is doing, first, and infer the acceleration from that. Here is how that would go: Starting att =0 ,a n dk e e p i n ga ne y eo nt h es l o p eo ft h ex-vs-t curve, we can see that the velocity starts at zero or near zero and increases steadily for a while,u n t i lt is a little bit more than 2 s (let us say,t =2 .2sf o rd e fi n i t e n e s s ) . T h a tw o u l dc o r r e s p o n dt oap e r i o do fp o sitive acceleration, since ∆v would be positive for every ∆t in that range.",University Physics I Classical Mechanics.pdf "36 CHAPTER 2. ACCELERATION x (m) t (s)0 5 5 10 Figure 2.1: A possible position vs. time graph for an object whose acceleration changes with time. Between t =2 .2sa n dt =2 .5s ,a st h eo b j e c tm o v e sf r o mx =2mt o x =4m ,t h ev e l o c i t yd o e s not appear to change very much, and the acceleration would correspondingly be zero or near zero. Then, aroundt =2 .5s , t h e v e l o c i t y s t a r t s t o d e c r e a s e n o t i c e a b l y , be c o m i n g ( instantaneously) zero at t =3s( x =6m ) . T h a tw o u l dc o r r e s p o n dt oan e g a t i v ea c c e l e r a t i o n . N o te, however, that the velocity afterwards continues to decrease, becoming more and more negative until aroundt =4 s. This also corresponds to a negative acceleration: even though the object is speeding up, it is speeding up in the negative direction, so ∆v,a n dh e n c ea,i sn e g a t i v ef o re v e r yt i m ei n t e r v a lt h e r e .",University Physics I Classical Mechanics.pdf "speeding up in the negative direction, so ∆v,a n dh e n c ea,i sn e g a t i v ef o re v e r yt i m ei n t e r v a lt h e r e . We conclude thata< 0f o ra l lt i m e sb e t w e e nt =2 .5sa n dt =4s . Next, as we just look pastt =4 s ,s o m e t h i n ge l s ei n t e r e s t i n gh a p p e n s : t h eo b j e c ti ss t i llg o i n g in the negative direction (negative velocity), but now it isslowing down. Mathematically, that corresponds to apositive acceleration, since the algebraic value of the velocity is inf a c ti n c r e a s i n g (a number like−3i sl a r g e rt h a nan u m b e rl i k e−5). Another way to think about it is that, if we have less and less of a negative thing, our overall trend is positive. So the acceleration is positive all the way fromt =4st h r o u g ht =5s( w h e r et h ev e l o c i t yi si n s t a n t a n e o u s l yz e r oa st h eo b j e ct’s direction of motion reverses), and beyond, until aboutt =6s ,s i n c eb e t w e e nt =5sa n dt =6st h e",University Physics I Classical Mechanics.pdf "direction of motion reverses), and beyond, until aboutt =6s ,s i n c eb e t w e e nt =5sa n dt =6st h e velocity is positive and growing. You can probably figure out on your own now what happens aftert =6 s ,r e a s o n i n ga sId i d above, but you may also have noticed a pattern that makes thiskind of analysis a lot easier. The acceleration (as those with a knowledge of calculus may have understood already), being proportional to the second derivative of the functionx(t)w i t hr e s p e c tt ot,i sd i r e c t l yr e l a t e dt o the curvature of the x-vs-t graph. As figure 2.2 below shows, if the graph isconcave (sometimes",University Physics I Classical Mechanics.pdf "2.2. ACCELERATION 37 called “concave upwards”), the acceleration is positive, whereas it is negative whenever the graph is convex (or “concave downwards”). It is (instantly) zero at those points where the curvature changes (which you may know asinflection points), as well as over stretches of time when the x-vs-t graph is a straight line (motion with constant velocity). xx x tt t a > 0 a < 0 a = 0 Figure 2.2: What thex-vs-t curves look like for the different possible signs of the acceleration. Figure 2.3 (in the next page) shows position, velocity, and acceleration versus time for a hypothetical motion case. Please study it carefully until every feature ofe v e r yg r a p hm a k e ss e n s e ,r e l a t i v et o the other two! You will see many other examples of this in the homework and the lab. Notice that, in all these figures, the sign ofx or v at any given time has nothing to do with the sign",University Physics I Classical Mechanics.pdf "Notice that, in all these figures, the sign ofx or v at any given time has nothing to do with the sign of a at that same time. It is true that, for instance, a negativea,i fs u s t a i n e df o ras u ffi c i e n t l yl o n g time, will eventually result in a negativev (as happens, for instance, in Fig.2.3 over the interval from t =1t o t =4 s )b u tt h i sm a yt a k eal o n gt i m e ,d e p e n d i n go nt h es i z eo fa and the initial value ofv.T h e g r a p h i c a lc l u e st of o l l o w ,i n s t e a d ,a r e :t h ea c c e l e r a tion is given by the slope of the tangent to thev-vs-t curve, or the curvature of thex-vs-t curve, as explained in Fig.2.2;a n dt h e velocity is given by the slope of the tangent to thex-vs-t curve. (Note: To make the interpretation of Figure2.3 simpler, I have chosen the acceleration to be “piecewise constant,” that is to say, constant over extendedt i m ei n t e r v a l sa n dc h a n g i n gi nv a l u e",University Physics I Classical Mechanics.pdf "“piecewise constant,” that is to say, constant over extendedt i m ei n t e r v a l sa n dc h a n g i n gi nv a l u e discontinuously from one interval to the next. This is physically unrealistic: in any real-life situa- tion, the acceleration would be expected to change more or less smoothly from instant to instant. We will see examples of that later on, when we start looking atrealistic models of collisions.)",University Physics I Classical Mechanics.pdf "38 CHAPTER 2. ACCELERATION Position (meters)Acceleration (m/s2) Velocity (m/s) Time (seconds) 1234567890 0 5 10 15 20 25 30 35 1234567890 0 5 10 15 20 -5 -10 1234567890 0 5 10 15 20 -5 -10 Time (seconds) Time (seconds) Figure 2.3: Sample position, velocity and acceleration vs. time graphs for motionwith piecewise-constant acceleration.",University Physics I Classical Mechanics.pdf "2.2. ACCELERATION 39 2.2.2 Motion with constant acceleration Ap a r t i c u l a rk i n do fm o t i o nt h a ti sb o t hr e l a t i v e l ys i m p l ea ndv e r yi m p o r t a n ti np r a c t i c ei sm o t i o n with constant acceleration (see Figure2.3 again for examples). Ifa is constant, it means that the velocity changes with time at a constant rate, by a fixed numbero fm / se a c hs e c o n d . ( T h e s ea r e , incidentally, the units of acceleration: meters per secondper second, or m/s2.) The change in velocity over a time interval ∆t is then given by ∆v = a ∆t (2.4) which can also be written v = vi + a (t − ti)( 2 . 5 ) Equation (2.5)i st h ef o r mo ft h ev e l o c i t yf u n c t i o n(v as a function oft)f o rm o t i o nw i t hc o n s t a n t acceleration. This, in turn, has to be the derivative with respect to time of the corresponding position function. If you know simple derivatives, then, youc a nv e r i f yt h a tt h ea p p r o p r i a t ef o r m",University Physics I Classical Mechanics.pdf "position function. If you know simple derivatives, then, youc a nv e r i f yt h a tt h ea p p r o p r i a t ef o r m of the position function must be x = xi + vi(t − ti)+ 1 2 a (t − ti)2 (2.6) or in terms of intervals, ∆x = vi∆t + 1 2 a (∆t)2 (2.7) Most often Eq. (2.6)i sw r i t t e nw i t ht h ei m p l i c i ta s s u m p t i o nt h a tt h ei n i t i a lv alue oft is zero: x = xi + vit + 1 2 at2 (2.8) This is simpler, but not as general as Eq. (2.6). Always make sure that you know what conditions apply for any equation you decide to use! As you can see from Eq. (2.5), for intervals during which the acceleration is constant,the velocity vs. time curve should be a straight line. Figure2.3 (previous page) illustrates this. Equation (2.6), on the other hand, shows that for those same intervals the position vs. time curve should be a (portion of a) parabola, and again this can be seen in Figure2.3 (sometimes, if the acceleration is",University Physics I Classical Mechanics.pdf "(portion of a) parabola, and again this can be seen in Figure2.3 (sometimes, if the acceleration is small, the curvature of the graph may be hard to see; this happens in Figure2.3 for the interval between t =4sa n dt =5s ) . The observation thatv-vs-t is a straight line when the acceleration is constant providesu sw i t h as i m p l ew a yt od e r i v eE q .(2.7), when combined with the result (from the end of the previous chapter) that the displacement over a time interval ∆t equals the area under thev-vs-t curve for that time interval. Indeed, consider the situation shown inFigure 2.4.T h e t o t a l a r e a u n d e r t h e segment shown is equal to the area of a rectangle of base ∆t and height vi,p l u st h ea r e ao fa",University Physics I Classical Mechanics.pdf "40 CHAPTER 2. ACCELERATION triangle of base ∆t and height vf − vi.S i n c evf − vi = a∆t,s i m p l eg e o m e t r yi m m e d i a t e l yy i e l d s Eq. (2.7), or its equivalent (2.6). v (m/s) t (s)ti tf vi vf v(t) Figure 2.4: Graphical way to find the displacement for motion with constant acceleration. Lastly, consider what happens if we solve Eq. (2.4)f o r∆t and substitute the result in (2.7). We get ∆x = vi∆v a + (∆v)2 2a (2.9) Letting ∆v = vf − vi,al i t t l ea l g e b r ay i e l d s v2 f − v2 i =2 a∆x (2.10) This is a handy little result that can also be seen to follow, more directly, from the work-energy theorems to be introduced in Chapter 71. 1In fact, equation (2.10)t u r n so u tt ob eso handy that you will probably find yourself using it over and over this semester, and you may even be tempted to use it for problems involving motion in two dimensions. However, unless",University Physics I Classical Mechanics.pdf "semester, and you may even be tempted to use it for problems involving motion in two dimensions. However, unless you really know what you are doing, you should resist the temptation, since it is very easy to use (2.10)i n c o r r e c t l y when the acceleration and the displacement do not lie along the same line. You should use the appropriate form of aw o r k - e n e r g yt h e o r e mi n s t e a d .",University Physics I Classical Mechanics.pdf "2.2. ACCELERATION 41 2.2.3 Acceleration as a vector In two (or more) dimensions we introduce the average acceleration vector ⃗aav = ∆⃗v ∆t = 1 ∆t (⃗vf −⃗vi)( 2 . 1 1 ) whose components areaav,x =∆ vx/∆t,e t c . . T h ei n s t a n t a n e o u sa c c e l e r a t i o ni st h e nt h ev e c t o rg iven by the limit of Eq. (2.11)a s∆t → 0, and its components are, therefore,ax = dvx/dt, ay = dvy/dt, . . . Note that, since⃗vi and ⃗vf in Eq. (2.11)a r ev e c t o r s ,a n dh a v et ob es u b t r a c t e da ss u c h ,t h ea c c e l e r - ation vector will be nonzero whenever⃗vi and ⃗vf are different, even if, for instance, their magnitudes (which are equal to the object’s speed) are the same. In otherwords, you have accelerated motion whenever thedirection of motion changes, even if the speed does not. As long as we are working in one dimension, I will follow the same convention for the acceleration",University Physics I Classical Mechanics.pdf "As long as we are working in one dimension, I will follow the same convention for the acceleration as the one I introduced for the velocity in Chapter 1: namely,Iw i l lu s et h es y m b o la,w i t h o u t as u b s c r i p t ,t or e f e rt ot h er e l e v a n tc o m p o n e n to ft h ea c c e l eration (ax,a y,... ), and not to the magnitude of the vector⃗a. 2.2.4 Acceleration in different reference frames In Chapter 1 you saw that the following relation (Eq. (1.19)) holds between the velocities of a particle P measured in two different reference frames, A and B: ⃗vAP = ⃗vAB + ⃗vBP (2.12) What about the acceleration? An equation like (2.12)w i l lh o l df o rt h ei n i t i a la n dfi n a lv e l o c i t i e s , and subtracting them we will get ∆⃗vAP =∆ ⃗vAB +∆⃗vBP (2.13) Now suppose that reference frame B moves withconstant velocityrelative to frame A. In that case, ⃗vAB,f = ⃗vAB,i,s o∆⃗vAB =0 ,a n dt h e n ,d i v i d i n gE q .(2.13)b y∆t,a n dt a k i n gt h el i m i t∆t → 0, we get",University Physics I Classical Mechanics.pdf "⃗vAB,f = ⃗vAB,i,s o∆⃗vAB =0 ,a n dt h e n ,d i v i d i n gE q .(2.13)b y∆t,a n dt a k i n gt h el i m i t∆t → 0, we get ⃗aAP = ⃗aBP (for constant⃗vAB)( 2 . 1 4 ) So, if two reference frames are moving at constant velocity relative to each other, observers in both frames measure thesame acceleration for any object they might both be tracking. The result (2.14)m e a n s ,i np a r t i c u l a r ,t h a ti fw eh a v ea ni n e r t i a lf r a m et h e nany frame moving at constant velocity relative to it will be inertial too, since the respective observers’ measurements",University Physics I Classical Mechanics.pdf "42 CHAPTER 2. ACCELERATION will agree that an object’s velocity does not change (otherwise put, its acceleration is zero) when no forces act on it. Conversely, an accelerated frame willnot be an inertial frame, because Eq. (2.14) will not hold. This is consistent with the examples I mentioned in Section 2.1 (the bouncing plane, the car coming to a stop). Another example of a non-inertial frame would be a car going around ac u r v e ,e v e ni fi ti sg o i n ga tc o n s t a n ts p e e d ,s i n c e ,a sIj u s tpointed out above, this is also an accelerated system. This is confirmed by the fact that objectsi ns u c hac a rt e n dt om o v e — r e l a t i v e to the car—towards the outside of the curve, even though no actual force is acting on them. 2.3 Free fall An important example of motion with (approximately) constant acceleration is provided byfree fall near the surface of the Earth. We say that an object is in “freefall” when the only force acting on it",University Physics I Classical Mechanics.pdf "near the surface of the Earth. We say that an object is in “freefall” when the only force acting on it is the force of gravity (the word “fall” here may be a bit misleading, since the object could actually be moving upwards some of the time, if it has been thrown straight up, for instance). The space station is in free fall, but because it is nowhere near the surface of the earth its direction of motion (and hence its acceleration, regarded as a two-dimensionalvector) is constantly changing. Right next to the surface of the earth, on the other hand, the planet’s curvature is pretty much negligible and gravity provides an approximately constant, vertical acceleration, which, in the absence of other forces, turns out to bethe same for every object,r e g a r d l e s so fi t ss i z e ,s h a p e ,o rw e i g h t . The above result—that, in the absence of other forces, all objects should fall to the earth at the",University Physics I Classical Mechanics.pdf "The above result—that, in the absence of other forces, all objects should fall to the earth at the same rate, regardless of how big or heavy they are—is so contrary to our common experience that it took many centuries to discover it. The key, of course, as with the law of inertia, is to realize that, under normal circumstances, frictional forces are, inf a c t ,a c t i n ga l lt h et i m e ,s oa no b j e c t falling through the atmosphere is neverreally in “free” fall: there is always, at a minimum, and in addition to the force of gravity, an air drag force that opposes its motion. The magnitude of this force does depend on the object’s size and shape (basically,on how “aerodynamic” the object is); and thus a golf ball, for instance, falls much faster than a flats h e e to fp a p e r .Y e t ,i fy o uc r u m p l e up the sheet of paper till it has the same size and shape as the golf ball, you can see for yourself",University Physics I Classical Mechanics.pdf "up the sheet of paper till it has the same size and shape as the golf ball, you can see for yourself that they do fall at approximately the same rate! The equalityc a nn e v e rb ee x a c t ,h o w e v e r ,u n l e s s you get rid completely of air drag, either by doing the experiment in an evacuated tube, or (in a somewhat extreme way), by doing it on the surface of the moon,as the Apollo 15 astronauts did with a hammer and a feather back in 19712. This still leaves us with something of a mystery, however: thef o r c eo fg r a v i t yi st h eo n l yf o r c e known to have the property that it imparts all objects thesame acceleration, regardless of their mass or constitution. A way to put this technically is that thef o r c eo fg r a v i t yo na no b j e c ti s 2The video of this is available online:https://www.youtube.com/watch?v=oYEgdZ3iEKA.I t i s , h o w e v e r , p r e t t y",University Physics I Classical Mechanics.pdf "2The video of this is available online:https://www.youtube.com/watch?v=oYEgdZ3iEKA.I t i s , h o w e v e r , p r e t t y low resolution and hard to see. A very impressive modern-daydemonstration involving feathers and a bowling ball in a completely evacuated (airless) room is available here:https://www.youtube.com/watch?v=E43-CfukEgs.",University Physics I Classical Mechanics.pdf "2.3. FREE FALL 43 proportional to that object’sinertial mass,aq u a n t i t yt h a tw ew i l li n t r o d u c ep r o p e r l yi nt h en e x t chapter. For the time being, we will simply record here that this acceleration, near the surface of the earth, has a magnitude of approximately 9.8m / s2,aq u a n t i t yt h a ti sd e n o t e db yt h es y m b o lg. Thus, if we take the upwards direction as positive (as is usually done), we get for the acceleration of an object in free falla = −g,a n dt h ee q u a t i o n so fm o t i o nb e c o m e ∆v = −g ∆t (2.15) ∆y = vi∆t − 1 2 g (∆t)2 (2.16) where I have usedy instead of x for the position coordinate, since that is a more common choice for a vertical axis. Note that we could as well have chosen thedownward direction as positive, and that may be a more natural choice in some problems. Regardless, the quantityg is always defined",University Physics I Classical Mechanics.pdf "that may be a more natural choice in some problems. Regardless, the quantityg is always defined to be positive:g =9 .8m / s2.T h e a c c e l e r a t i o n ,t h e n , i sg or −g,d e p e n d i n go nw h i c hd i r e c t i o nw e take to be positive. In practice, the value ofg changes a little from place to place around the earth, for various reasons (it is somewhat sensitive to the density of the ground below you, and it decreases as you climb higher away from the center of the earth). In a later chapter wew i l ls e eh o wt oc a l c u l a t et h ev a l u e of g from the mass and radius of the earth, and also how to calculatet h ee q u i v a l e n tq u a n t i t yf o r other planets. In the meantime, we can use equations like (2.15)a n d(2.16)( a sw e l la s(2.10), with the appropriate substitutions) to answer a number of interesting questionsabout objects thrown or dropped straight up or down (always, of course, assuming that air drag is negligible). For instance, back at the",University Physics I Classical Mechanics.pdf "up or down (always, of course, assuming that air drag is negligible). For instance, back at the beginning of this chapter I mentioned that if I dropped an object it might take about half a second to hit the ground. If you use Eq. (2.16)w i t hvi =0( s i n c eIa md r o p p i n gt h eo b j e c t ,n o tt h r o w i n g it down, its initial velocity is zero), and substitute ∆t =0 .5s , y o u g e t ∆y =1 .23 m (about 4 feet). This is a reasonable height from which to drop something. On the other hand, you may note that half a second is not a very long time in which to make accurate observations (especially if you do not have modernelectronic equipment), and as a result of that there was considerable confusion for many centuriesas to the precise way in which objects fell. Some people believed that the speed did increase in somew a ya st h eo b j e c tf e l l ,w h i l eo t h e r s appear to have believed that an object dropped would “instantaneously” (that is, at soon as it",University Physics I Classical Mechanics.pdf "appear to have believed that an object dropped would “instantaneously” (that is, at soon as it left your hand) acquire some speed and keep that unchanged allt h ew a yd o w n . I nr e a l i t y ,i nt h e presence of air drag, what happens is a combination of both: initially the speed increases at an approximately constant rate (free, or nearly free fall), butt h ed r a gf o r c ei n c r e a s e sw i t ht h es p e e d as well, until eventually it balances out the force of gravity, and from that point on the speed does not increase anymore: we say that the object has reached “terminal velocity.” Some objects reach terminal velocity almost instantly, whereas others (the more “aerodynamic” ones) may take a long time to do so. This accounts for the confusion that prevailedbefore Galileo’s experiments in the early 1600’s.",University Physics I Classical Mechanics.pdf "44 CHAPTER 2. ACCELERATION Galileo’s main insight, on the theoretical side, was the realization that it was necessary to separate clearly the effect of gravity and the effect of the drag force. Experimentally, his big idea was to use an inclined plane to slow down the “fall” of an object, so ast om a k ea c c u r a t em e a s u r e m e n t s possible (and also, incidentally, reduce the air drag force!). These “inclined planes” were just basically ramps down which he sent small balls (like marbles)r o l l i n g . B yc h a n g i n gt h es t e e p n e s s of the ramp he could control how slowly the balls moved. He reasoned that, ultimately, the force that made the balls go down was essentially the same force of gravity, only not the whole force, but just a fraction of it. Today we know that, in fact, an objects l i d i n g(not rolling!) up or down on a frictionless incline will experience an acceleration directed downwardsa l o n gt h ei n c l i n ea n d",University Physics I Classical Mechanics.pdf "on a frictionless incline will experience an acceleration directed downwardsa l o n gt h ei n c l i n ea n d with a magnitude equal tog sin θ,w h e r eθ is the angle that the slope makes with the horizontal: a = g sin θ (inclined plane, takingdownwards to be positive) (2.17) (for some reason, it seems more natural, when dealing with inclined planes, to take the downward direction as positive!). Equation (2.17)m a k e ss e n s ei nt h et w oe x t r e m ec a s e si nw h i c ht h ep l a n ei s completely vertical (θ =9 0◦, a = g)a n dc o m p l e t e l yh o r i z o n t a l(θ =0 ◦, a =0 ) . F o ri n t e r m e d i a t e values, you will carry out experiments in the lab to verify this result. We will show, in a later chapter, how Eq. (2.17)c o m e sa b o u tf r o mac a r e f u lc o n s i d e r a t i o no fa l lt h e forces acting on the object; we will also see, later on, how itneeds to be modified for the case of a",University Physics I Classical Mechanics.pdf "forces acting on the object; we will also see, later on, how itneeds to be modified for the case of a rolling, rather than a sliding, object. This modification does not affect Galileo’s main conclusion, which was, basically, that the natural falling motion in theabsence of friction or drag forces is motion withconstant acceleration(at least, near the surface of the earth, whereg is constant to a very good approximation). 2.4 In summary 1. The law of inertiastates that, if no external influences (forces) are acting onan object, then, if the object is initially at rest it will stay at rest, and if iti si n i t i a l l ym o v i n gi tw i l lc o n t i n u e to move with constant velocity (unchanging speed and direction). 2. Reference frames in which the law of inertia is seen to hold(when the velocities of objects are calculated from their coordinates in that frame) are calledinertial.A r e f e r e n c e f r a m e t h a t i s",University Physics I Classical Mechanics.pdf "calculated from their coordinates in that frame) are calledinertial.A r e f e r e n c e f r a m e t h a t i s moving at constant velocity relative to an inertial frame isalso an inertial frame. Conversely, accelerated reference frames are non-inertial. 3. Motion with constant velocity is fundamentally indistinguishable from no motion at all (i.e., rest). As long as the velocity (of the objects involved) doesnot change, onlyrelative motion can be detected. This is known as theprinciple of relativity.A n o t h e r w a y t o s t a t e i t is that the laws of physics must take the same form in all inertial reference frames (so you cannot single out one as being in “absolute rest” or “absolutem o t i o n ” ) .",University Physics I Classical Mechanics.pdf "2.4. IN SUMMARY 45 4. Changes in velocity are detectable, and, by (1) above, are evidence of unbalanced forces acting on an object. 5. The rate of change of an object’s velocity is the object’sacceleration:t h e a v e r a g e a c c e l e r a t i o n over a time interval ∆t is aav =∆ v/∆t,a n dt h ei n s t a n t a n e o u sa c c e l e r a t i o na tat i m et is the limit of the average acceleration calculated for successively shorter time intervals ∆t,a l lw i t h the same initial timeti = t.M a t h e m a t i c a l l y ,t h i sm e a n st h ea c c e l e r a t i o ni st h ed e r i v ative of the velocity function,a = dv/dt. 6. In a velocity versus time graph, the acceleration can be read from the slope of the line tangent to the curve (just like the velocity in a position versus timegraph). 7. In a position versus time graph, the regions with positiveacceleration correspond to a concave curvature (like a parabola opening up), and those with negative acceleration correspond to a",University Physics I Classical Mechanics.pdf "curvature (like a parabola opening up), and those with negative acceleration correspond to a convex curvature (like a parabola opening down). Points of inflection (where the curvature changes) and straight lines correspond to points where the acceleration is zero. 8. The basic equations used to describe motion with constantacceleration are (2.4), (2.7)a n d (2.10)a b o v e .A l t e r n a t i v ef o r m so ft h e s ea r ea l s op r o v i d e di nt h etext. 9. In more than one dimension, a change in thedirection of the velocity vector results in a nonzero acceleration, even if the object’s speed does not change. 10. An object is said to be infree fall when the only force acting on it is gravity. All objects in free fall experience the same acceleration at the same point in their motion, regardless of their mass or composition. Near the surface of the earth, thisa c c e l e r a t i o ni sa p p r o x i m a t e l y constant and has a magnitudeg =9 .8m / s2.",University Physics I Classical Mechanics.pdf "constant and has a magnitudeg =9 .8m / s2. 11. An object sliding on a frictionless inclined plane experiences (if air drag is negligible) an acceleration directed downward along the incline and with amagnitude g sin θ,w h e r eθ is the angle the incline makes with the horizontal.",University Physics I Classical Mechanics.pdf "46 CHAPTER 2. ACCELERATION 2.5 Examples 2.5.1 Motion with piecewise constant acceleration Construct the position vs. time, velocity vs. time, and acceleration vs. time graphs for the motion described below. For each of the intervals (a)–(d) you’ll need to figure out the position (height) and velocity of the rocket at the beginning and the end of the interval, and the acceleration for the interval. In addition, for interval (b) you need to figure outthe maximum height reached by the rocket and the time at which it occurs. For interval (d) you need to figure out its duration, that is to say, the time at which the rocket hits the ground. (a) A rocket is shot upwards, accelerating from rest to a finalvelocity of 20 m/s in 1 s as it burns its fuel. (Treat the acceleration as constant during this interval.) (b) Fromt =1st o t =4 s ,w i t ht h ef u e le x h a u s t e d ,t h er o c k e tfl i e su n d e rt h ei n fl u ence of gravity",University Physics I Classical Mechanics.pdf "(b) Fromt =1st o t =4 s ,w i t ht h ef u e le x h a u s t e d ,t h er o c k e tfl i e su n d e rt h ei n fl u ence of gravity alone. At some point during this time interval (you need to figure out when!) it stops climbing and starts falling. (c) At t =4 sap a r a c h u t eo p e n s ,s u d d e n l yc a u s i n ga nu p w a r d sa c c e l e r ation (again, treat it as constant) lasting 1 s; at the end of this interval, the rocket’s velocity is 5 m/s downwards. (d) The last part of the motion, with the parachute deployed,is with constant velocity of 5 m/s downwards until the rocket hits the ground. Solution: (a) For this first interval (for which I will use a subscript “1”t h r o u g h o u t )w eh a v e ∆y1 = 1 2a1(∆t1)2 (2.18) using Eq. (2.6)f o rm o t i o nw i t hc o n s t a n ta c c e l e r a t i o nw i t hz e r oi n i t i a lv elocity (I am using the",University Physics I Classical Mechanics.pdf "2a1(∆t1)2 (2.18) using Eq. (2.6)f o rm o t i o nw i t hc o n s t a n ta c c e l e r a t i o nw i t hz e r oi n i t i a lv elocity (I am using the variable y,i n s t e a do fx,f o rt h ev e r t i c a lc o o r d i n a t e ;t h i si sm o r eo rl e s sc u s t o m a r y,b u t ,o fc o u r s e ,I could have usedx just as well). Since the acceleration is constant, it is equal to its averagev a l u e : a1 = ∆v ∆t =2 0m s2 . Substituting this into (2.18)w eg e tt h eh e i g h ta tt =1 si s1 0m . T h ev e l o c i t ya tt h a tt i m e ,o f course, isvf1 =2 0 m / s ,a sw ew e r et o l di nt h es t a t e m e n to ft h ep r o b l e m . (b) This part is free fall with initial velocityvi2 =2 0m / s . T ofi n dh o wh i g ht h er o c k e tc l i m b s ,u s e Eq. (2.15)i nt h ef o r mvtop − vi2 = −g(ttop − ti2), with vtop =0( a st h er o c k e tc l i m b s ,i t sv e l o c i t y decreases, and it stops climbing when its velocity is zero).This gives usttop =3 .04 s as the time at",University Physics I Classical Mechanics.pdf "2.5. EXAMPLES 47 which the rocket reaches the top of its trajectory, and then starts coming down. The corresponding displacement is, by Eq. (2.16), ∆ytop = vi2(ttop − ti2) − 1 2g(ttop − ti2)2 =2 0.4m so the maximum height it reaches is 30.4m . At the end of the full 3-second interval, the rocket’s displacement is ∆y2 = vi2∆t2 − 1 2g(∆t2)2 =1 5.9m (so its height is 25.9ma b o v et h eg r o u n d ) ,a n dt h efi n a lv e l o c i t yi s vf2 = vi2 − g∆t2 = −9.43 m s . (c) The acceleration for this part is (vf3 −vi3)/∆t3 =( −5+9 .43)/1=4 .43 m/s2.N o t et h e p o s i t i v e sign. The displacement is ∆y3 = −9.43 × 1+ 1 2 × 4.43 × 12 = −7.22 m so the final height is 25.9 − 7.21 = 18.7m . (d) This is just motion with constant speed to cover 18.7ma t5m / s .T h et i m ei tt a k e si s3.74 s. The graphs for this motion are shown earlier in the chapter, inF i g u r e2 . 3 .",University Physics I Classical Mechanics.pdf "48 CHAPTER 2. ACCELERATION 2.6 Problems Problem 1 You get on your bicycle and ride it with a constant acceleration of 0.5m / s2 for 20 s. After that, you continue riding at a constant velocity for a distance of 200 m. Finally, you slow to a stop, with ac o n s t a n ta c c e l e r a t i o n ,o v e rad i s t a n c eo f2 0 m . v (m/s) t (s) 0 0 x (m) t (s) 0 0 a (m/s2) t (s) 0",University Physics I Classical Mechanics.pdf "2.6. PROBLEMS 49 (a) How far did you travel while you were accelerating at 0.5m / s2,a n dw h a tw a sy o u rv e l o c i t ya t the end of that interval? (b) After that, how long did it take you to cover the next 200 m? (c) What was your acceleration while you were slowing down toas t o p ,a n dh o wl o n gd i di tt a k e you to come to a stop? (d) Considering the whole trip, what was your average velocity? (e) Plot the position versus time, velocity versus time, andacceleration versus time graphs for the whole trip, in the grids provided above. Values at the beginning and end of each interval must be exact. Slopes and curvatures must be represented accurately. Do not draw any of the curves beyond the time the rider stops (or, if you do, make sure what you draw makes sense!). Problem 2 You throw an ob ject straight upwards and catch it again, whenit comes down to the same initial height, 2 s later. (a) How high did it rise above its initial height?",University Physics I Classical Mechanics.pdf "height, 2 s later. (a) How high did it rise above its initial height? (b) With what initial speed did you throw it? (Note: for this problem you should use the fact that, if air drag is negligible, the object will return to its initial height with the same speed it had initially.) Problem 3 You are trying to catch up with a car that is in front of you on theh i g h w a y . I n i t i a l l yy o ua r e both moving at 25m/s, and the distance between you is 100m. Yous t e po nt h eg a sa n ds u s t a i na constant acceleration for a time ∆t =3 0s ,a tw h i c hp o i n ty o uh a v ep u l l e de v e nw i t ht h eo t h e rc a r . (a) What is 25 m/s, in miles per hour? (b) What was your acceleration over the 30 s time interval? (c) How fast were you going when you caught up with the other car? Problem 4 Go back to Problem 4 of Chapter 1, and use the information in thefi g u r et od r a wa na c c u r a t e position vs. time graph for both runners. Problem 5",University Physics I Classical Mechanics.pdf "position vs. time graph for both runners. Problem 5 Ac h i l do nas l e ds l i d e s( s t a r t i n gf r o mr e s t )d o w na ni c ys l o p ethat makes an angle of 15◦ with the horizontal. After sliding 20 m down the slope, the child enters a flat, slushy region, where she slides for 2.0s w i t h a c o n s t a n t n e g a t i v e a c c e l e r a t i o n o f−1.5m / s2 with respect to her direction of motion. She then slides up another icy slope that makes a 20◦ angle with the horizontal. (a) How fast was the child going when she reached the bottom ofthe first slope? How long did it take her to get there? (b) How long was the flat stretch at the bottom? (c) How fast was the child going as she started up the second slope? (d) How far up the second slope did she slide?",University Physics I Classical Mechanics.pdf 50 CHAPTER 2. ACCELERATION,University Physics I Classical Mechanics.pdf "Chapter 3 Momentum and Inertia 3.1 Inertia In everyday language, we speak of something or someone “having a large inertia” to mean, essen- tially, that they are very difficult to set in motion. This usageo ft h ew o r d“ i n e r t i a ”i sc o n s i s t e n t with the “law of inertia” we introduced in the previous chapter (which states, among other things, that an object at rest, if left to itself, will just remain at rest), but it goes a bit beyond that by trying to quantify just how hard it may be to get the object to move. We do know, from exp erience, that lighter ob jects are easierto set in motion than heavier objects, but most of us probably have an intuition that gravity (the force that pulls an object towards the earth and hence determines its weight) is not involved inan essential way here. Imagine, for instance, the difference between slapping a volleyball and a bowling ball. It is not hard to believe",University Physics I Classical Mechanics.pdf "instance, the difference between slapping a volleyball and a bowling ball. It is not hard to believe that the latter would hurt as much if we did it while floating infree fall in the space station (in a state of effective “weightlessness”) as if we did it right hereon the surface of the earth. In other words, it is not (necessarily) how heavy something feels, butj u s th o wmassive it is. But just what is this “massiveness” quality that we associatei n t u i t i v e l yw i t hal a r g ei n e r t i a ? I s there a way (other than resorting to the weight again) to assign to it a numerical value? 3.1.1 Relative inertia and collisions One possible way to determine therelative inertias of two objects, conceptually, at least, is to try to use one of them to set the other one in motion. Most of us are familiar with what happens 51",University Physics I Classical Mechanics.pdf "52 CHAPTER 3. MOMENTUM AND INERTIA when two identical objects (presumably, therefore, havingthe same inertia) collide: if the collision is head-on (so the motion, before and after, is confined to a straight line), they basically exchange velocities. For instance, a billiard ball hitting another one will stop dead and the second one will set off with the same speed as the first one. The toy sometimes called“ N e w t o n ’ sb a l l s ”o r“ N e w t o n ’ s cradle” also shows this effect. Intuitively, we understand that what it takes to stop the first ball is exactly the same as it would take to set the second one in motionw i t ht h es a m ev e l o c i t y . But what if the objects colliding have different inertias? We expect that the change in their velocities as a result of the collision will be different: the velocity of the object with the largest inertia will not change very much, and conversely, the changei nt h ev e l o c i t yo ft h eo b j e c tw i t ht h e",University Physics I Classical Mechanics.pdf "inertia will not change very much, and conversely, the changei nt h ev e l o c i t yo ft h eo b j e c tw i t ht h e smallest inertia will be comparatively larger. A velocity vs. time graph for the two objects might look somewhat like the one sketched in Fig.3.1. -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 0 2 4 6 8 10 1 1 2 2 1 m/s v (m/s) t (ms) Figure 3.1: An example of a velocity vs. time graph for a collision of two objects with different inertias. In this picture, object 1, initially moving with velocityv1i =1m / s ,c o l l i d e sw i t ho b j e c t2 ,i n i t i a l l y at rest. After the collision, which here is assumed to take a millisecond or so, object 1 actually bounces back, so its final velocity isv1f = −1/3m / s , w h e r e a s o bj e c t 2 e n d s u p m o v i n g t o t h e r i g h t with velocityv2f =2 /3m / s . S ot h ec h a n g ei nt h ev e l o c i t yo fo bj e c t1i s∆v1 = v1f −v1i = −4/3m / s , whereas for object 2 we have ∆v2 = v2f − v2i =2 /3m / s .",University Physics I Classical Mechanics.pdf "whereas for object 2 we have ∆v2 = v2f − v2i =2 /3m / s . It is tempting to use this ratio, ∆v1/∆v2,a sam e a s u r eo ft h erelative inertia of the two objects, only we’d want to use it upside down and with the opposite sign:t h a t i s ,s i n c e ∆v2/∆v1 = −1/2 we would say that object 2 hastwice the inertia of object 1. But then we have to ask: is this a",University Physics I Classical Mechanics.pdf "3.1. INERTIA 53 reliable, repeatable measure? Will it work for any kind of collision (within reason, of course: we clearly need to stay in one dimension, and eliminate externali n fl u e n c e ss u c ha sf r i c t i o n ) ,a n df o r any initial velocity? To begin with, we have reason to expect that it does not matterwhether we shoot object 1 towards object 2 or object 2 towards object 1, because we learned in thep r e v i o u sc h a p t e rt h a tonly relative motion is detectable,a n dt h er e l a t i v em o t i o ni st h es a m ei nb o t hc a s e s . C o n s i d e r ,for instance, what the collision in Figure3.1 appears like to a hypothetical observer moving along with object 1, at 1 m/s. To him, object 1 appears to be at rest, and it is object 2 that is coming towards him, with a velocity of−1m / s . T o s e e w h a t t h e o u t c o m e o f t h e c o l l i s i o n l o o k s l i k e t o h im, just add the same",University Physics I Classical Mechanics.pdf "velocity of−1m / s . T o s e e w h a t t h e o u t c o m e o f t h e c o l l i s i o n l o o k s l i k e t o h im, just add the same −1m / s t o t h e fi n a l v e l o c i t i e s w e o b t a i n e d be f o r e : o bj e c t 1 w i l lend up moving atv1f = −4/3m / s , and object 2 would move atv2f = −1/3m / s , a n d w e w o u l d h a v e a s i t u a t i o n l i k e t h e o n e s h o w n i n Figure 3.2,w h e r eb o t hc u r v e sh a v es i m p l yb e e ns h i f t e dd o w nb y1m / s : -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0 2 4 6 8 10 1 2 v (m/s) t (ms) 1 2 −1 m/s Figure 3.2: Another example (really the same collision as in Figure 1, only as seen byan observer initially moving to the right at 1 m/s). But then, this is exactly what we should expect to find also in our laboratory if we actually did send the second object at 1 m/s towards the first one sitting atrest. All the individual velocities",University Physics I Classical Mechanics.pdf "send the second object at 1 m/s towards the first one sitting atrest. All the individual velocities have changed relative to Figure3.1,b u tt h evelocity changes,∆ v1 and ∆v2,a r ec l e a r l ys t i l lt h e same, and therefore so is our (tentative) measure of the objects’ relative inertia. Clearly, the same argument can be used to conclude that the same result will be obtained when both objects are initially moving towards each other, as longa st h e i rrelative velocityis the same as",University Physics I Classical Mechanics.pdf "54 CHAPTER 3. MOMENTUM AND INERTIA in these examples, namely, 1 m/s. However, unless we do the experiments we cannot really predict what will happen if we increase (or decrease) their relativevelocity. In fact, we could imagine smashing the two objects at very high speed, so they might evenb e c o m es e r i o u s l ym a n g l e di nt h e process. Yet, experimentally (and this is not at all an obvious result!), we would still find the same value of −1/2f o rt h er a t i o∆v2/∆v1,a tl e a s ta sl o n ga st h ec o l l i s i o ni sn o ts ov i o l e n tt h a tt h e objects actually break up into pieces. Perhaps the most surprising result of our experiments wouldbe the following: imagine that the objects have a “sticky” side (for instance, the small black rectangles shown in the pictures could be strips of Velcro), and we turn them around so that when theycollide they will end up stuck to each other. In this case (which, as we shall see later, is termed acompletely inelasticcollision),",University Physics I Classical Mechanics.pdf "each other. In this case (which, as we shall see later, is termed acompletely inelasticcollision), the v-vs-t graph might look like Figure3.3 below. Now the two objects end up moving together to the right, fairlys l o w l y :v1f = v2f =1 /3m / s . T h e velocity changes are ∆v1 = −2/3m / s a n d ∆v2 =1 /3 m/s, both of which are different from what they were before, in Figs.3.1 and 3.2:y e t ,t h er a t i o∆v2/∆v1 is still equal to−1/2, just as in all the previous cases. 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 1 2 1 m/s 1 2 v (m/s) t (ms) Figure 3.3: What would happen if the objects in Figure 1 became stuck togetherwhen they collided.",University Physics I Classical Mechanics.pdf "3.1. INERTIA 55 3.1.2 Inertial mass: definition and properties At this point, it would seem reasonable to assume that this ratio, ∆v2/∆v1,i s ,i nf a c t ,t e l l i n gu s something about anintrinsic property of the two objects, what we have called above their “relative inertia.” It is easy, then, to see how one could assign a valueto the inertia of any object (at least, conceptually): choose a “standard” object, and decide, arbitrarily, that its inertia will have the numerical value of 1, in whichever units you choose for it (these units will turn out, in fact, to be kilograms, as you will see in a minute). Then, to determine thei n e r t i ao fa n o t h e ro b j e c t ,w h i c h we will label with the subscript 1, just arrange a one-dimensional collision between object 1 and the standard, under the right conditions (basically, no netexternal forces), measure the velocity changes ∆v1 and ∆vs,a n dt a k et h eq u a n t i t y−∆vs/∆v1 as the numerical value of the ratio of the",University Physics I Classical Mechanics.pdf "changes ∆v1 and ∆vs,a n dt a k et h eq u a n t i t y−∆vs/∆v1 as the numerical value of the ratio of the inertia of object 1 to the inertia of the standard object. In symbols, using the letterm to represent an object’s inertia, m1 ms = −∆vs ∆v1 (3.1) But, sincems =1b yd e fi n i t i o n ,t h i sg i v e su sd i r e c t l yt h en u m e r i c a lv a l u eof m1. The reason we use the letterm is, as you must have guessed, because, in fact, the inertia defined in this way turns out to be identical to what we have traditionally called “mass.” More precisely, the quantity defined this way is an object’sinertial mass.T h e r e m a r k a b l ef a c t ,m e n t i o n e de a r l i e r , that the force of gravity between two objects turns out to be proportional to their inertial masses, allows us to determine the inertial mass of an object by the more traditional procedure of simply weighing it, rather than elaborately staging a collision between it and the standard kilogram on",University Physics I Classical Mechanics.pdf "weighing it, rather than elaborately staging a collision between it and the standard kilogram on an ice-hockey rink. But, in principle, we could conceive of the existence of two different quantities that should be called “inertial mass” and “gravitational mass,” and the identity (or more precisely, the—so far as we know—exact proportionality) of the two is a rather mysterious experimental fact1. In any case, by the way we have constructed it, the inertial mass, defined as in Eq. (3.1), does capture, in a quantitative way, the concept that we were trying to express at the beginning of the chapter: namely, how difficult it may be to set an object in motion. In principle, however, other experiments would need to be conducted to make sure thati td o e sh a v et h ep r o p e r t i e sw e have traditionally associated with the concept of mass. Forinstance, suppose we join together two",University Physics I Classical Mechanics.pdf "have traditionally associated with the concept of mass. Forinstance, suppose we join together two objects of massm.I s t h e m a s s o f t h e r e s u l t i n g o b j e c t 2m?C o l l i s i o n e x p e r i m e n t s w o u l d , i n d e e d , show this to be the case with great accuracy in the macroscopicw o r l d( w i t hw h i c hw ea r ec o n c e r n e d this semester), but this is a good example of how you cannot take anything for granted: at the microscopic level, it is again a fact that the inertial mass ofa na t o m i cn u c l e u si sal i t t l eless than the sum of the masses of all its constituent protons and neutrons2. Probably the last thing that would need to be checked is thatthe ratio of inertias is independent 1This fact, elevated to the category of a principle by Einstein( t h eequivalence principle)i st h es t a r t i n gp o i n to f the general theory of relativity.",University Physics I Classical Mechanics.pdf "the general theory of relativity. 2And this is not just an unimportant bit of trivia: all of nuclear power depends on this small difference.",University Physics I Classical Mechanics.pdf "56 CHAPTER 3. MOMENTUM AND INERTIA of the standard.S u p p o s e t h a t w e h a v e t w o o b j e c t s , t o w h i c h w e h a v e a s s i g n e d masses m1 and m2 by arranging for each to collide with the “standard object” independently. If we now arrange for ac o l l i s i o nb e t w e e no b j e c t s1a n d2d i r e c t l y ,w i l lw ea c t u a l lyfi n dt h a tt h er a t i oo ft h e i rv e l o c i t y changes is given by the ratio of the separately determined masses m1 and m2?W ec e r t a i n l yw o u l d need that to be the case, in order for the concept of inertia tobe truly useful; but again, we should not assume anything until we have tested it! Fortunately, thet e s t sw o u l di n d e e dr e v e a lt h a t ,i n every case, the expected relationship holds3 − ∆v2 ∆v1 = m1 m2 (3.2) At this point, we are not just in possession of a useful definition of inertia, but also of a veritable law of nature,a sIw i l le x p l a i nn e x t . 3.2 Momentum",University Physics I Classical Mechanics.pdf "law of nature,a sIw i l le x p l a i nn e x t . 3.2 Momentum For an ob ject of (inertial) massm moving, in one dimension, with velocityv,w ed e fi n ei t smomen- tum as p = mv (3.3) (the choice of the letterp for momentum is apparently related to the Latin word “impetus”). We can think of momentum as a sort of extension of the concept ofi n e r t i a ,f r o ma no b j e c ta tr e s t to an object in motion. When we speak of an object’s inertia, wet y p i c a l l yt h i n ka b o u tw h a ti t may take to get it moving; when we speak of its momentum, we typically think of that it may take to stop it (or perhaps deflect it). So, both the inertial massm and the velocityv are involved in the definition. We may also observe that what looks like inertia in some reference frame may look like momentum in another. For instance, if you are driving in a car towing a trailer behind you, the trailer has only a large amount of inertia, but no momentum, relative to you, because its velocity relative to",University Physics I Classical Mechanics.pdf "only a large amount of inertia, but no momentum, relative to you, because its velocity relative to you is zero; however, the trailer definitely has a large amounto fm o m e n t u m( b yv i r t u eo fb o t hi t s inertial mass and its velocity) relative to somebody standing by the side of the road. 3.2.1 Conservation of momentum; isolated systems For a system of ob jects, we treat the momentum as anadditive quantity. So, if two colliding objects, of massesm1 and m2,h a v ei n i t i a lv e l o c i t i e sv1i and v2i,w es a yt h a tt h et o t a li n i t i a lm o m e n t u mo f 3Equation 3.2 actually is found to hold also at the microscopic (orquantum)l e v e l ,a l t h o u g ht h e r ew ep r e f e rt o state the result by saying that conservation of momentum holds (see the following section).",University Physics I Classical Mechanics.pdf "3.2. MOMENTUM 57 the system ispi = m1v1i + m2v2i,a n ds i m i l a r l yi ft h efi n a lv e l o c i t i e sa r ev1f and v2f ,t h et o t a lfi n a l momentum will bepf = m1v1f + m2v2f . We then assert thatthe total momentum of the system is not changed by the collision.M a t h e m a t - ically, this means pi = pf (3.4) or m1v1i + m2v2i = m1v1f + m2v2f (3.5) But this last equation, in fact, follows directly from Eq. (3.2): to see this, move all the quantities in Eq. (3.5)h a v i n gt od ow i t ho b j e c t1t oo n es i d eo ft h ee q u a ls i g n ,a n dt hose having to do with object 2 to the other side. You then get m1 (v1i − v1f )= m2 (v2f − v2i) −m1∆v1 = m2∆v2 (3.6) which is just another way to write Equation (3.2). Hence, the result (3.2)e n s u r e st h ec o n s e r v a t i o n of the total momentum of a system of any two interacting objects (“particles”), regardless of the form the interaction takes, as long as there are no external forces acting on them.",University Physics I Classical Mechanics.pdf "form the interaction takes, as long as there are no external forces acting on them. Momentum conservation is one of the most important principles in all of physics, so let me take al i t t l et i m et oe x p l a i nh o ww eg o th e r ea n de l a b o r a t eo nt h i sresult. First, as I just mentioned, we have been more or less implicitly assuming that the two interacting objects form anisolated system, by which we mean that, throughout, they interact withn o t h i n go t h e rt h a ne a c ho t h e r . (Equivalently, there are no external forces acting on them.) It is pretty much impossible to set up a system so that it isreally isolated in this strict sense; instead, in practice, we settle for making sure that the external forces on the two objectscancel out.T h i s i s w h a t h a p p e n s o n t h e a i r t r a c k s w i t h w h i c h y o u w i l l b e doing experiments this semester: gravity is acting on the carts, but that force is balanced outby the upwards push of the air from",University Physics I Classical Mechanics.pdf "gravity is acting on the carts, but that force is balanced outby the upwards push of the air from the track. A system on which there is nonet external force is as good as isolated for practical purposes, and we will refer to it as such. (It is harder, of course, to completely eliminate friction and drag forces, so we just have to settle for approximately isolated systems in practice.) Secondly, we have assumed so far that the motion of the two objects is restricted to a straight line—one dimension. In fact, momentum is avector quantity (just like velocity is), so in general we should write ⃗p= m⃗ v and conservation of momentum, in general, holds as a vector equation for any isolated system in three dimensions: ⃗pi = ⃗pf (3.7)",University Physics I Classical Mechanics.pdf "58 CHAPTER 3. MOMENTUM AND INERTIA What this means, in turn, is that each separate component (x, y and z)o ft h em o m e n t u mw i l l be separately conserved (so Eq. (3.7)i se q u i v a l e n tt ot h r e es c a l a re q u a t i o n s ,i nt h r e ed i m e n s i ons). When we get to study the vector nature of forces, we will see aninteresting implication of this, namely, that it is possible for one component of the momentumvector to be conserved, but not another—depending on whether there is or there isn’t a net external force in that direction or not. For example, anticipating things a bit, when you throw an ob ject horizontally, as long as you can ignore air drag, there is no horizontal force acting on it, ands ot h a tc o m p o n e n to ft h em o m e n t u m vector is conserved, but the vertical component is changingall the time because of the (vertical) force of gravity. Thirdly, although this may not be immediately obvious, for ani s o l a t e ds y s t e mo ft w oc o l l i d i n g",University Physics I Classical Mechanics.pdf "force of gravity. Thirdly, although this may not be immediately obvious, for ani s o l a t e ds y s t e mo ft w oc o l l i d i n g objects the momentum is truly conserved throughout the wholec o l l i s i o np r o c e s s . I ti sn o tj u s ta matter of comparing the initial and final velocities: at any oft h et i m e ss h o w ni nF i g u r e s1t h r o u g h 3, if we were to measurev1 and v2 and compute m1v1 + m2v2,w ew o u l do b t a i nt h es a m er e s u l t . In other words, the total momentum of an isolated system isconstant:i t h a s t h e s a m e v a l u e a t a l l times. Finally, all these examples have involved interactions between only two particles. Can we really generalize this to conclude that the total momentum of an isolated system of any number of particles is constant, even when all the particles may be interacting with each other simultaneously? Here, again, the experimental evidence is overwhelmingly in favoro ft h i sh y p o t h e s i s4,b u tm u c ho fo u r",University Physics I Classical Mechanics.pdf "again, the experimental evidence is overwhelmingly in favoro ft h i sh y p o t h e s i s4,b u tm u c ho fo u r confidence on its validity comes in fact from a considerationof the nature of the internal interactions themselves. It is a mathematical fact that all of the interactions so far known to physics have the property of conserving momentum, whether acting individually or simultaneously. No experiments have ever suggested the existence of an interaction that doesn o th a v et h i sp r o p e r t y . 3.3 Extended systems and center of mass Consider a collection of particles with massesm1,m 2,... ,a n dl o c a t e d ,a ts o m eg i v e ni n s t a n t ,a t positions x1,x 2 ... .( W e a r e s t i l l , f o r t h e t i m e b e i n g , c o n s i d e r i n g o n l y m o t i o n ino n ed i m e n s i o n ,b u t all these results generalize easily to three dimensions.) The center of massof such a system is a mathematical point whose position coordinate is given by xcm = m1x1 + m2x2 + ...",University Physics I Classical Mechanics.pdf "mathematical point whose position coordinate is given by xcm = m1x1 + m2x2 + ... m1 + m2 + ... (3.8) Clearly, the denominator of (3.8)i sj u s tt h et o t a lm a s so ft h es y s t e m ,w h i c hw em a yj u s td e n o t e by M.I fa l lt h ep a r t i c l e sh a v et h es a m em a s s ,t h ec e n t e ro fm a s sw ill be somehow “in the middle” 4For an important piece of indirect evidence, just consider that any extended object is in reality a collection of interacting particles, and the experiments establishingc o n s e r v a t i o no fm o m e n t u ma l m o s ta l w a y si n v o l v es u c h extended objects. See the following section for further thoughts on this matter.",University Physics I Classical Mechanics.pdf "3.3. EXTENDED SYSTEMS AND CENTER OF MASS 59 of all of them; otherwise, it will tend to be closer to the moremassive particle(s). The “particles” in question could be spread apart, or they could literally bethe “parts” into which we choose to subdivide, for computational purposes, a single extended object. If the particles are in motion, the position of the center of mass, xcm,w i l li ng e n e r a lc h a n g ew i t h time. For a solid object, where all the parts are moving together, the displacement of the center of mass will just be the same as the displacement of any part of theo b j e c t . I nt h em o s tg e n e r a lc a s e , we will have (by subtractingxcmi from xcmf ) ∆xcm = 1 M (m1∆x1 + m2∆x2 + ... )( 3 . 9 ) Dividing Eq. (3.9)b y∆t and taking the limit as ∆t → 0, we get the instantaneous velocity of the center of mass: vcm = 1 M (m1v1 + m2v2 + ... )( 3 . 1 0 ) But this is just vcm = psys M (3.11) where psys = m1v1 + m2v2 + ... is the total momentum of the system.",University Physics I Classical Mechanics.pdf "vcm = 1 M (m1v1 + m2v2 + ... )( 3 . 1 0 ) But this is just vcm = psys M (3.11) where psys = m1v1 + m2v2 + ... is the total momentum of the system. 3.3.1 Center of mass motion for an isolated system Equation (3.11)i sav e r yi n t e r e s t i n gr e s u l t . S i n c et h et o t a lm o m e n t u mo fa nisolated system is constant, it tells us that the center of mass of an isolated system of particles moves at constant velocity, regardless of the relative motion of the particlest h e m s e l v e so rt h e i rp o s s i b l ei n t e r a c t i o n s with each other. As indicated above, this generalizes straightforwardly to more than one dimension, so we can write⃗vcm = ⃗psys/M.T h u s , w e c a n s a y t h a t , f o r a n i s o l a t e d s y s t e m i n s p a c e , n o t o nly the speed, but also the direction of motion of its center of mass does not change with time. Clearly this result is a sort of generalization of the law of inertia. For a solid, extended object, it",University Physics I Classical Mechanics.pdf "Clearly this result is a sort of generalization of the law of inertia. For a solid, extended object, it does, in fact, provide us with the precise form that the law ofinertia must take: in the absence of external forces,the center of masswill just move on a straight line with constant velocity, whereas the object itself may be moving in any way that does not affect thec e n t e ro fm a s st r a j e c t o r y . Specifically, the most general motion of an isolated rigid body is a straight line motion of its center of mass at constant speed, combined with a possible rotationof the object as a whole around the center of mass. For a system that consists of separate parts, on the other hand, the center of mass is generally just a point in space, which may or may not coincide at any timewith the position of any of the parts, but which will nonetheless move at constant velocityas long as the system is isolated. This",University Physics I Classical Mechanics.pdf "parts, but which will nonetheless move at constant velocityas long as the system is isolated. This is illustrated by Figure3.4,w h e r et h ep o s i t i o nv s . t i m ec u r v e sh a v eb e e nd r a w nf o rt h ec olliding",University Physics I Classical Mechanics.pdf "60 CHAPTER 3. MOMENTUM AND INERTIA objects of Figure3.1.I h a v ea s s u m e d t h a to b j e c t 1 s t a r t so u t a tx1i = −5m m a tt =0 ,a n do b j e c t 2s t a r t sa tx2i =0a t t =0 . B e c a u s eo b j e c t2h a st w i c et h ei n e r t i ao fo b j e c t1 ,t h ep o sition of the center of mass, as given by Eq. (3.8), will always be xcm = x1/3+2 x2/3 that is to say, the center of mass will always be in between objects 1 and 2, and its distance from object 2 will always be half its distance to object 1: |xcm − x1| = 2 3|x1 − x2| |xcm − x2| = 1 3|x1 − x2| Figure 4 shows that this simple prescription does result in motion with constant velocity for the center of mass (the green straight line), even though thex-vs-t curves of the two objects themselves look relatively complicated. (Please check it out! Take a ruler to Fig.3.4 and verify that the center of mass is, at every instant, where it is supposed to be.) -5 -4 -3 -2 -1 0 1 2 3 4 0 2 4 6 8 10 x1(t) x2(t) xcm x (mm)",University Physics I Classical Mechanics.pdf "of mass is, at every instant, where it is supposed to be.) -5 -4 -3 -2 -1 0 1 2 3 4 0 2 4 6 8 10 x1(t) x2(t) xcm x (mm) t (ms) Figure 3.4: Position vs. time graph for the objects colliding in Figure 1. The greenline shows the position of the center of mass as a function of time. The concept of center of mass gives us an important way to simplify the description of the motion of potentially complicated systems. We will make good use ofit in forthcoming chapters. Av e r yn i c ed e m o n s t r a t i o no ft h em o t i o no ft h ec e n t e ro fm a s sint w o - b o d yo n e - d i m e n s i o n a lc o l l i s i o n s can be found at https://phet.colorado.edu/sims/collision-lab/collision-lab_en.html (you need to check the “center of mass” box to see it).",University Physics I Classical Mechanics.pdf "3.4. IN SUMMARY 61 3.3.2 Recoil and rocket propulsion As we have just seen, you cannot alter the motion of your centero fm a s sw i t h o u tr e l y i n go ns o m e external force—which is to say, some kind of external support. This is actually something you may have experienced when you are resting on a very slippery surface and you just cannot “get a grip” on it. There is, however, one way to circumvent this problem which, in fact, relies on conservation of momentum itself: if you are carrying something with you, and can throw it away from you at high speed, you will recoil as a result of that. If you can keepthrowing things, you (with your store of as yet unthrown things) will speed up a little more every time. This is, in essence, the principle behind rocket propulsion. Mathematically, consider two objects, of massesm1 and m2,i n i t i a l l ya tr e s t ,s ot h e i rt o t a lm o -",University Physics I Classical Mechanics.pdf "behind rocket propulsion. Mathematically, consider two objects, of massesm1 and m2,i n i t i a l l ya tr e s t ,s ot h e i rt o t a lm o - mentum is zero. If mass 1 is thrown away from mass 2 with a speedv1f ,t h e n ,b yc o n s e r v a t i o no f momentum (always assuming the system is isolated) we must have 0= m1v1f + m2v2f (3.12) and thereforev2f = −m1v1f /m2.T h i s i s h o w a r o c k e t m o v e sf o r w a r d , b y c o n s t a n t l ye x p e l l i n gmass (the hot exhaust gas) backwards at a high velocity. Note that,e v e nt h o u g hb o t ho b j e c t sm o v e ,t h e center of mass of the whole system doesnot (in the absence of any external force), as discussed above. 3.4 In summary 1. The inertia of an object is a measure of its tendency to resist changes in its motion. It is quantified by theinertial mass (measured in kilograms). 2. A system of objects is calledisolated (for practical purposes) when there are nonet (or",University Physics I Classical Mechanics.pdf "quantified by theinertial mass (measured in kilograms). 2. A system of objects is calledisolated (for practical purposes) when there are nonet (or unbalanced)e x t e r n a lf o r c e sa c t i n go na n yo ft h eo b j e c t s( t h eo b j e c t sm ays t i l li n t e r a c tw i t h each other). 3. When two objects forming an isolated system collide in onedimension, the changes in their velocities are inversely proportional to their inertial masses: ∆v1 ∆v2 = −m2 m1 This may be used, in principle, as a way to define the inertial mass operationally. 4. The inertial mass thus defined turns out to be exactly (as fara sw ek n o w )p r o p o r t i o n a lt ot h e object’sgravitational mass,w h i c hd e t e r m i n e st h eg r a v i t a t i o n a lf o r c eo fa t t r a c t i o nb etween it and any other object. For this reason, most often we measure ano b j e c t ’ si n e r t i a lm a s ss i m p l y by weighing it.",University Physics I Classical Mechanics.pdf "62 CHAPTER 3. MOMENTUM AND INERTIA 5. The momentum of an object of inertial massm moving with a velocity⃗vis defined as⃗p= m⃗ v. The total momentum of a system of objects is defined as the (vector) sum of all the individual momenta. 6. (Conservation of momentum) The momentum of an isolated system remains always con- stant,r e g a r d l e s so fh o wt h ep a r t st h a tm a k eu pt h es y s t e mm a yi n t e ract with one another. 7. In one dimension, thecenter of massof a system of particles is a mathematical point whose x coordinate is given by Equation (3.8)a b o v e . ( I nm o r ed i m e n s i o n s ,j u s tc h a n g et h ex’s in Eq. (3.8)t oy and z to getycm and zcm.) 8. The center of mass of a system always moves with a velocity ⃗vcm = ⃗psys M where ⃗psys is the total momentum of the system, andM its total mass. 9. It follows from 8 and 6 above that for an isolated system, thec e n t e ro fm a s sm u s ta l w a y sb e",University Physics I Classical Mechanics.pdf "9. It follows from 8 and 6 above that for an isolated system, thec e n t e ro fm a s sm u s ta l w a y sb e at rest or moving with constant velocity. This result generalizes the law of inertia to extended objects, or systems of particles.",University Physics I Classical Mechanics.pdf "3.5. EXAMPLES 63 3.5 Examples 3.5.1 Reading a collision graph The graph shows a collision between two carts (possibly equipped with magnets so that they repel each other before they actually touch) on an air track. The inertia (mass) of cart 1 is 1 kg. Note: this is aposition vs. time graph! (a) What are the initial velocities of the carts? (b) What are the final velocities of the carts? (c) What is the mass of the second cart? (d) Does the air track appear to be level? Why? (Hint: does thegraph show any evidence of acceleration, for either cart, outside of the collision region?) (e) At the collision time, is the acceleration of the first cartp o s i t i v eo rn e g a t i v e ? H o wa b o u tt h e second cart? (Justify your answers.) (f) For the system consisting of the two carts, what is its initial (total) momentum? What is its final momentum? (g) Imagine now that one of the magnets is reversed, so when thec a r t sc o l l i d et h e ys t i c kt oe a c h",University Physics I Classical Mechanics.pdf "final momentum? (g) Imagine now that one of the magnets is reversed, so when thec a r t sc o l l i d et h e ys t i c kt oe a c h other. What would then be the final momentum of the system? Whatw o u l db ei t sfi n a lv e l o c i t y ? x (m) t (s) cart 2 cart 1 Figure 3.5: A collision between two carts. Solution (a) All the velocities are to be calculated by picking an easystraight part of each curve and calculating v = ∆x ∆t",University Physics I Classical Mechanics.pdf "64 CHAPTER 3. MOMENTUM AND INERTIA for suitable intervals. In this way one gets v1i = −1 m s v2i =0 .5 m s (b) Similarly, one gets v1f =1 m s v2f = −0.5 m s (c) Use this equation, or equivalent (conservation of momentum is OK) m2 m1 = −∆v1 ∆v2 m2 m1 = − 1 − (−1) −0.5 − 0.5 =2 so the mass of the second cart is 2 kg. (d) Yes, the track appears to be level because the carts do notshow any evidence of acceleration outside of the collision region (the position vs. time curvesa r es t r a i g h tl i n e so u t s i d eo ft h er e g i o n approximately given by 4.5s 0i sa nexplosive separation,w h i c hi sw h e nt h et w o objects are initially moving together and then fly apart. In that case, the denominator of Eq. (4.9)",University Physics I Classical Mechanics.pdf "objects are initially moving together and then fly apart. In that case, the denominator of Eq. (4.9) is zero, and soe is formally infinite. This suggests, what is in fact the case,namely, that although explosive processes are certainly important, describing them through the coefficient of restitution is rare, even when it would be formally possible. In practice,u s eo ft h ec o e ffi c i e n to fr e s t i t u t i o ni s mostly limited to the elastic-to-completely inelastic range, that is, 0≤ e ≤ 1. 4.2 “Convertible” and “translational” kinetic energy Figure 4.5 shows how the total kinetic energy varies with time, for the two objects shown colliding in Figure4.1 ,d e p e n d i n go nt h ed e t a i l so ft h ec o l l i s i o n ,n a m e l y ,o nt h ev alue ofe.T h e t h r e e c u r v e s shown cover the elastic case,e =1( F i g u r e4.1), the totally inelastic case,e =0( F i g u r e4.3), and",University Physics I Classical Mechanics.pdf "shown cover the elastic case,e =1( F i g u r e4.1), the totally inelastic case,e =0( F i g u r e4.3), and the inelastic case withe =0 .6o fF i g u r e4.4.R e c a l l t h a t t h e t o t a l m o m e n t u m i s c o n s e r v e d i n a l l three cases. 0 0.1 0.2 0.3 0.4 0.5 0 2 4 6 8 10 e = 1 e = 0.6 e = 0 Ksys (J) t (ms) Figure 4.5: The total kinetic energy as a function of time for the collisions shownin Figures 1, 3 and 4, respectively.",University Physics I Classical Mechanics.pdf "4.2. “CONVERTIBLE” AND “TRANSLATIONAL” KINETIC ENERGY 77 Figure 4.5 shows that the greatest loss of kinetic energy happens for thet o t a l l yi n e l a s t i cc o l l i s i o n , which, as we will see in a moment, is, in fact, a general result.T h a t b e i n g t h e c a s e , t h e fi g u r e also shows that it may not be always be possible to bring the total kinetic energy down to zero, even temporarily. The reason for this is that, if momentum isconserved, the velocity of the center of mass cannot change, so if the center of mass was moving before the collision, it must still be moving afterwards; and, as mentioned in this chapter’s introduction, as long as there is motion in as y s t e m ,i t st o t a lk i n e t i ce n e r g yc a n n o tb ez e r o . All of this suggests that it should be possible to break up a system’s total kinetic energy into two parts: one part associated with the motion of the center of mass, which cannot change in any",University Physics I Classical Mechanics.pdf "parts: one part associated with the motion of the center of mass, which cannot change in any momentum-conserving collision, and one part associated with the relative motion of the parts that make up the system. This second part would vanish irreversibly in a totally inelastic collision, whereas it would recover its original value in an elastic collision. The way to see this mathematically, for a system of two objectsw i t hm a s s e sm1 and m2,i st o introduce the center of mass velocityvcm [Eq. (3.10)] vcm = m1v1 + m2v2 m1 + m2 and the relative velocityv12 = v2 − v1 (Eq. (4.3)a b o v e ) ,a n do b s e r v et h a tt h ev e l o c i t i e sv1 and v2 can be written, respectively, as v1 = vcm − m2 m1 + m2 v12 v2 = vcm + m1 m1 + m2 v12 (4.10) Substituting the equations (4.10)i n t ot h ee x p r e s s i o nKsys = 1 2 m1v2 1 + 1 2 m2v2 2,o n efi n d st h a tt h e cross-terms vanish, and all that is left is Ksys = 1 2(m1 + m2)v2 cm + 1 2 m1m2 2 + m2m2 1 (m1 + m2)2 v2 12",University Physics I Classical Mechanics.pdf "1 + 1 2 m2v2 2,o n efi n d st h a tt h e cross-terms vanish, and all that is left is Ksys = 1 2(m1 + m2)v2 cm + 1 2 m1m2 2 + m2m2 1 (m1 + m2)2 v2 12 Af a c t o ro f(m1 + m2)m a yb ec a n c e l e di nt h el a s tt e r m ,a n dt h efi n a le x p r e s s i o nt a kes the form Ksys = Kcm + Kconv (4.11) where the center of mass kinetic energy (ortranslational energy)i sj u s tw h a to n ew o u l dh a v ei ft h e whole system was a single particle of massM = m1 + m2 moving at the center of mass speed: Kcm = 1 2Mv2 cm (4.12) and the “convertible energy” Kconv is the part associated with the relative motion, which can be",University Physics I Classical Mechanics.pdf "78 CHAPTER 4. KINETIC ENERGY made to vanish entirely in an inelastic collision3: Kconv = 1 2 m1m2 m1 + m2 v2 12 = 1 2µv2 12 (4.13) The last equation implicitly defines a useful quantity that wec a l lt h ereduced massof a system of two particles, and denote byµ: µ = m1m2 m1 + m2 (4.14) Equation (4.11), with the definitions (4.12)a n d(4.13), pretty much explains everything that we see going on in Figure4.5.T h e t o t a l k i n e t i c e n e r g y i s t h e s u m o f t w o t e r m s , t h e fi r s t o f which, Kcm,c a nn e v e rc h a n g e : i ti s ,i nf a c t ,a sc o n s t a n ta st h et o t a lm o mentum itself, since it involves the center of mass velocity,vcm,w h i c hi sp r o p o r t i o n a lt ot h et o t a lm o m e n t u mo ft h es y s t e m( recall equation (3.11)). The term that can, and does change, is the second one, the convertible energy. In fact, in an ordinary collision in which the objects do not passt h r o u g he a c ho t h e r ,t h e r em u s tb ea t",University Physics I Classical Mechanics.pdf "fact, in an ordinary collision in which the objects do not passt h r o u g he a c ho t h e r ,t h e r em u s tb ea t least an instant in time whenKconv =0 . T h i si sb e c a u s ei ti n v o l v e st h er e l a t i v ev e l o c i t y ,a n ds ince the relative velocity must change sign at some point (the objects are initially coming together, but end up moving apart), it must be zero at that time. This explains why all the curves in Fig.4.5 have the same minimum value (even though they may reach it at different times): that value is clearlyKcm for the system (sinceKconv is zero at that time). It is the same for all the curves because all the systemsc o n s i d e r e dh a v et h es a m et o t a lm a s s and momentum (as determined by the initial velocities)—we just chose them that way. Since Kcm cannot change for an isolated system, the maximum kinetic energy that can be lost in a",University Physics I Classical Mechanics.pdf "Since Kcm cannot change for an isolated system, the maximum kinetic energy that can be lost in a collision in such a system is the initial value ofKconv,w h i c hw ew o u l dd e n o t ea sKconv,i.T h i s i s , i n fact, completely lost in a totally inelastic collision, since in that casev12,f =0 ,a n dE q .(4.13)t h e n gives Kconv,f =0 . I nf a c t ,u s i n gE q .(4.9), we can relate the final value of the convertible energy to its initial value via the coefficient of restitution: Kconv,f = 1 2µv2 12,f = 1 2µe2v2 12,i = e2Kconv,i (4.15) Thus, for example, in a collision withe =0 .6, the final value of the convertible energy would be only 0.36 times its initial value: 64% of it would have been “lost.” (This is not, however, the same as 64% of thetotal initial energy, since the latter still includesKcm,w h i c hd o e sn o tc h a n g e . ) W e can also write Eq. (4.15)a s ∆Ksys = ( e2 − 1 ) Kconv,i = ( e2 − 1 ) 1 2µv2 12,i (4.16)",University Physics I Classical Mechanics.pdf "can also write Eq. (4.15)a s ∆Ksys = ( e2 − 1 ) Kconv,i = ( e2 − 1 ) 1 2µv2 12,i (4.16) since the only possible change inKsys must come from the convertible energy. 3Although the name “convertible energy” makes sense in this context, it is not, as far as I can tell, in general usage. I have borrowed it from Mazur’sThe Principles and Practice of Physics,b u ty o us h o u l dp r o b a b l yn o te x p e c t to find it in other textbooks.",University Physics I Classical Mechanics.pdf "4.2. “CONVERTIBLE” AND “TRANSLATIONAL” KINETIC ENERGY 79 Although we have derived the decomposition (4.11)f o rt h ev e r yr e s t r i c t e ds i t u a t i o no ft w oo b j e c t s moving in one dimension, the basic result is quite general: first, everything in the derivation works if v1 and v2 are replaced by vectors⃗v1 and ⃗v2,s ot h er e s u l t sh o l d si nt h r e ed i m e n s i o n sa sw e l l . Second, for a system of any number of particles, one still canwrite Ksys as Kcm+a n o t h e rt e r m that depends only on the relative motion of all the pairs of particles. This “generalized convertible energy,” orkinetic energy of relative motionwould have the form Krel = 1 2µ12v2 12 + 1 2µ13v2 13 + ... + 1 2µ23v2 23 + ... (in this expression, something likeµ23 means a reduced mass like the one in Eq. (4.14), only for masses m2 and m3,a n ds of o r t h ) . When we get to the study of rotational motion, for instance, wew i l ls e et h a tt h et o t a lk i n e t i c",University Physics I Classical Mechanics.pdf "masses m2 and m3,a n ds of o r t h ) . When we get to the study of rotational motion, for instance, wew i l ls e et h a tt h et o t a lk i n e t i c energy of an extended rigid object can be written asKcm + Krot,w h e r eKrot,t h er o t a t i o n a lk i n e t i c energy, is just the same kind of thing as what we have called the“ c o n v e r t i b l ee n e r g y ”h e r e . All of the above still leaves unanswered the question of whathappens to the convertible energy that is lost in an inelastic collision. Just what is it that itgets converted into? The answer to this question will be the subject of the following chapter. 4.2.1 Kinetic energy and momentum in different reference frames Ih a v ep o i n t e do u tr e p e a t e d l yb e f o r et h a ta l lm o t i o ni sr e l a tive, and so, to some extent, kinetic energy and momentum must be somewhat relative as well. A car inaf r e i g h tt r a i nh a sal o to f",University Physics I Classical Mechanics.pdf "energy and momentum must be somewhat relative as well. A car inaf r e i g h tt r a i nh a sal o to f momentum relative to an observer on the ground, but its momentum relative to another car on the same train is zero, since they are not moving relative to eachother. The same could be said about its kinetic energy. In general, if you have a system with a total momentum⃗psys and inertiaM,i t sc e n t e ro fm a s sw i l l have a velocity⃗vcm = ⃗psys/M.T h e n , i f y o u w e r e t o m o v e a l o n g s i d e t h e s y s t e m w i t h a v e l o c i ty exactly equal to⃗vcm,t h et o t a lm o m e n t u mo ft h es y s t e mr e l a t i v et oy o uw o u l db ez e ro. If the system was a solid object, it would not “hit” you if you made contact;there would be no collision. It may help here to think, for instance, of aircraft refueling in flight: if the two planes’ velocities are exactly matched, they can make contact without any damage, just as ifthey were at rest. A reference frame",University Physics I Classical Mechanics.pdf "matched, they can make contact without any damage, just as ifthey were at rest. A reference frame moving at a system’s center of mass velocity is, for this reason, called azero-momentum framefor the system in question. Clearly, in such a reference frame, the translational kinetic energy of the system,Kcm = 1 2 Mv2 cm, will also be zero (since, in that frame, the center of mass is not moving at all). However, the relative motion term,Kconv,w o u l db ecompletely unaffectedby the change in reference frame. This is because, as you may have noticed by now, to convert velocities from one frame of reference to",University Physics I Classical Mechanics.pdf "80 CHAPTER 4. KINETIC ENERGY another we just add or subtract from all the velocities the relative velocity of the two frames. This operation, however, will not change any of the relative velocities of the parts of the system, since these are all differences to begin with. Mathematically, (v2 + v′) − (v1 + v′)= v2 − v1 regardless of the value ofv′. So there something we might callabsolute (as opposed to “relative”) about the convertible kinetic energy: it is the same, it will have the same value, for any observer, regardless of how fast or in what direction that observer may be moving relative to the system as a whole. We may think of it as anintrinsic (meaning, observer-independent) property of the system. 4.3 In summary 1. The kinetic energy of a particle of massm moving with velocityv is defined asK = 1 2 mv2.I t is a scalar quantity, and it is always positive. For a system ofp a r t i c l e so ra ne x t e n d e do b j e c t ,",University Physics I Classical Mechanics.pdf "2 mv2.I t is a scalar quantity, and it is always positive. For a system ofp a r t i c l e so ra ne x t e n d e do b j e c t , we defineKsys as the sum of the kinetic energies of all the particles makingup the system. 2. For any system, the total kinetic energy can be written as the sum of thetranslational (or center of mass)k i n e t i ce n e r g y ,Kcm,a n da n o t h e rt e r mt h a ti n v o l v e st h em o t i o no ft h ep a r t s of the system relative to each other. (See Eq. (4.11)a b o v e . ) T h et r a n s l a t i o n a lk i n e t i ce n e r g y is constant for an isolated system, and is always given byKcm = 1 2 Mv2 cm. 3. The kinetic energy of relative motion (which, in the context of collisions, is called thecon- vertible energy)i sg i v e n ,f o rt h es p e c i a lc a s eo fas y s t e mc o n s i s t i n go ft w oparticles (or two non-rotating extended objects), byKconv = 1 2 µv2 12,w h e r eµ = m1m2/(m1 +m2)i st h er e d u c e d",University Physics I Classical Mechanics.pdf "non-rotating extended objects), byKconv = 1 2 µv2 12,w h e r eµ = m1m2/(m1 +m2)i st h er e d u c e d mass, andv12 = v2 − v1 is the relative velocity of the two objects. 4. In a one-dimensional collision between two objects that don o tp a s st h r o u g he a c ho t h e r ,t h e convertible energy always drops to zero at some point, as a result of the interaction; that is, it is converted entirely into some other form of energy. At thee n do ft h ei n t e r a c t i o n ,a l lt h e convertible energy may be recovered (elastic collision), oro n l yp a r to fi t( i n e l a s t i cc o l l i s i o n ) , or none of it (completely inelastic collision). 5. In terms of thecoefficient of restitutione,d e fi n e da se = −v12,f /v12,i,e l a s t i cc o l l i s i o n sh a v e e =1 ,t o t a l l yi n e l a s t i cc o l l i s i o n sh a v ee =0 ,a n di n e l a s t i cc o l l i s i o n s0 1. In these latter collisions some internal source of energy is converted into additionalkinetic energy when the objects interact. The extreme case of this is anexplosive separation,w h i c hi st h er e v e r s eo fat o t a l l y inelastic collision—two objects initially moving togetherfl ya p a r t ,w i t han e ti n c r e a s ei nt h e system’s kinetic energy. 8. The translational kinetic energy of a system will, in general, have different values for observers moving with different velocities. The convertible kinetic energy, on the other hand, is seen by all observers to have the same value, regardless of their relative state of motion.",University Physics I Classical Mechanics.pdf "82 CHAPTER 4. KINETIC ENERGY 4.4 Examples 4.4.1 Collision graph revisited Look again at the collision graph from example 3.5.1 from thepoint of view of the kinetic energy of the two carts. (a) What is the initial kinetic energy of the system? (b) How much of this is in the center of mass motion, and how mucho fi sc o n v e r t i b l e ? (c) Does the convertible kinetic energy go to zero at some point during the collision? If so, when? Is it fully recovered after the collision is over? (d) What kind of collision is this? (Elastic, inelastic, etc.) What is the coefficient of restitution? Solution (a) From the solution to example 3.5.1 we know that v1i = −1 m s v2i =0 .5 m s v1f =1 m s v2f = −0.5 m s and m1 =1k ga n dm2 =2k g . S ot h ei n i t i a lk i n e t i ce n e r g yi s Ksys,i = 1 2m1v2 1i + 1 2m2v2 2i =0 .5J+0 .25 J = 0.75 J (4.17) (b) To calculateKcm = 1 2 (m1 + m2)v2 cm,w en e e dvcm,w h i c hi nt h i sc a s ei se q u a lt o vcm = m1v1i + m2v2i m1 + m2 = −1+2 × 0.5 3 =0",University Physics I Classical Mechanics.pdf "(b) To calculateKcm = 1 2 (m1 + m2)v2 cm,w en e e dvcm,w h i c hi nt h i sc a s ei se q u a lt o vcm = m1v1i + m2v2i m1 + m2 = −1+2 × 0.5 3 =0 so Kcm =0 ,w h i c hm e a n sa l lt h ek i n e t i ce n e r g yi sc o n v e r t i b l e . W ec a nalso calculate that directly: Kconv,i = 1 2µv2 12,i = 1 2 ( 1 × 2 1+2 kg ) × ( 0.5 m s − (−1) m s )2 = 1.52 3 J=0 .75 J (4.18) (c) If we look at figure3.5,w ec a ns e et h a tt h ec a r t sd on o tp a s st h r o u g he a c ho t h e r ,s ot heir relative velocity must be zero at some point, and with that, the convertible energy. In fact, the figure makes it quite clear thatboth v1 and v2 are zero att =5 s ,s oa tt h a tp o i n ta l s ov12 =0 , and the convertible energyKconv =0 . ( A n ds oi st h et o t a lKsys =0a tt h a tt i m e ,s i n c eKcm =0 throughout.)",University Physics I Classical Mechanics.pdf "4.4. EXAMPLES 83 On the other hand, it is also clear thatKconv is fully recovered after the collision is over, since the relative velocity just changes sign: v12,i = v2i − v1i =0 .5 m s − (−1) m s =1 .5 m s v12,f = v2f − v1f = −0.5 m s − 1 m s = −1.5 m s (4.19) Therefore Kconv,f = 1 2µv2 12,f = 1 2µv2 12,i = Kconv,i (d) Since the total kinetic energy (which in this case is onlyconvertible energy) is fully recovered when the collision is over, the collision is elastic. Using equation (4.19), we can see that the coefficient of restitution is e = −v12,f v12,i = −−1.5 1.5 =1 as it should be. 4.4.2 Inelastic collision and explosive separation Analyze example 3.5.2 from the point of view of the system’s kinetic energy. In particular, answer the following questions: (a) What is the total kinetic energy of the system (i)b e f o r et h ep l a y e r sc o l l i d e ,(ii)r i g h ta f t e rt h e",University Physics I Classical Mechanics.pdf "(a) What is the total kinetic energy of the system (i)b e f o r et h ep l a y e r sc o l l i d e ,(ii)r i g h ta f t e rt h e collision, when they are holding to one another, and (iii)a f t e rt h e ys e p a r a t e . H o wm u c ho ft h i s energy is translational (that is, center-of-mass kinetic energy), and how much is convertible? (b) Answer the same questions from the point of view of the player who is skating at a constant 1.5m / s t o t h e r i g h t ( p l a y e r 3 ) (To avoid needless repetition, you may use already established results, such as conservation of momentum.) Solution (a) Before the players collide, we have Ksys,i = 1 2m1v2 1i + 1 2m2v2 2i = 1 2 (80 kg)× ( 3 m s )2 + 1 2 (90 kg)× ( −2 m s )2 =5 4 0J ( 4 . 2 0 ) While they are still holding to each other, we know from the solution to example 3.5.2 that their joint velocity is 0.353 , and that this has to be also the velocity of their center ofm a s s ,w h i c hi s unchanged by the collision. So, we have Kcm = 1",University Physics I Classical Mechanics.pdf "unchanged by the collision. So, we have Kcm = 1 2(m1 + m2)v2 cm = 1 2 (170 kg) ( 0.353 m s )2 =1 0.6J ( 4 . 2 1 )",University Physics I Classical Mechanics.pdf "84 CHAPTER 4. KINETIC ENERGY This isKcm throughout, as well asKsys right after the collision, since the collision is totally inelastic and that means thatKconv drops to zero. Also, subtracting this from (4.20)w i l lg i v eu st h ei n i t i a l value of the convertible energy, without the need for a separate calculation, so Kconv,i = Ksys,i − Kcm =5 4 0J− 10.6J =5 2 9.4J ≃ 529 J (4.22) After the separation, the new total kinetic energy (for whichIw i l lu s et h es u b s c r i p tf)i s Ksys,i = 1 2m1v2 1f + 1 2m2v2 2f = 1 2 (80 kg)× ( −0.176 m s )2 + 1 2 (90 kg)× ( 0.824 m s )2 =3 1.8J ( 4 . 2 3 ) where I have gotten the values forv1f and v2f from the solution to part (d) of Example 3.5.2. Subtracting Kcm from this will give us the final value of the convertible energy: Kconv,f = Ksys,f − Kcm =3 1.8J − 10.6J=2 1 .2J ( 4 . 2 4 ) To summarize, then, we have: • Before the collision: Ksys,i =5 4 0J,K cm =1 0.6J ,K conv,i =5 2 9.4J",University Physics I Classical Mechanics.pdf "To summarize, then, we have: • Before the collision: Ksys,i =5 4 0J,K cm =1 0.6J ,K conv,i =5 2 9.4J • Right after the collision (players still holding to each other): Ksys = Kcm =1 0.6J ,K conv =0 • After the (explosive) separation: Ksys,f =3 1.8J ,K cm =1 0.6J ,K conv,i =2 1.2J So, in the collision, approximately 529 J of kinetic energy “disappeared” from the system (or, we could say, were “converted into some form of internal energy”), whereas the players’ pushing on each other managed to put about 21 J of kinetic energy back intot h es y s t e m ;w ew i l le x p l o r et h e s e kinds of processes in more detail in the following chapter! (b) We need to repeat all the above calculations with all the velocities shifted down by 1.5m / s , to bring them to the reference frame of player 3. Instead of putting a subscript “3” on all the quantities, since we already have tons of subscripts to worrya b o u t ,I ’ mg o i n gt of o l l o wa na l t e r n a t i v e",University Physics I Classical Mechanics.pdf "quantities, since we already have tons of subscripts to worrya b o u t ,I ’ mg o i n gt of o l l o wa na l t e r n a t i v e convention and use a “prime” superscript (′)t od e n o t ea l lt h eq u a n t i t i e si nt h i sf r a m eo fr e f e r e n c e . In brief, we have K′ sys,i = 1 2m1(v′ 1i)2 + 1 2m2(v′ 2i)2 = 1 2 (80 kg)× ( 1.5 m s )2 + 1 2 (90 kg)× ( −3.5 m s )2 =6 4 1.3J ( 4 . 2 5 )",University Physics I Classical Mechanics.pdf "4.4. EXAMPLES 85 K′ cm = 1 2(m1 + m2)(v′ cm)2 = 1 2 (170 kg) ( 0.353 m s − 1.5 m s )2 =1 1 1.8J ( 4 . 2 6 ) K′ conv,i = K′ sys,i − K′ cm =6 4 1.3J − 111.8J =5 2 9.5J ≃ 529 J (4.27) This shows explicitly that the convertible energy, as I pointed out earlier in this chapter, is the same in every reference frame! (The equality is exact, if you keepenough decimals in the calculation.) Knowing this, we can simplify the calculation of the final kinetic energy, after the explosive sepa- ration: the convertible energy,K′ conv,f ,w i l lb et h es a m ea si nt h ee a r t hr e f e r e n c ef r a m e ,t h a ti st o say, 21.2J , a n d t h e t o t a l k i n e t i c e n e r g y w i l l beK′ sys,f = K′ cm + K′ conv,f =1 1 1.8J + 2 1.2J =1 3 3J . So, in this frame of reference, we have (to three significant figures): K′ sys,i =6 4 1J,K ′ cm =1 1 2J,K ′ conv,i =5 2 9J ( b e f o r et h ec o l l i s i o n ) K′ sys = K′ cm =1 1 2J,K ′ conv =0 ( r i g h ta f t e rt h ec o l l i s i o n ) K′ sys,f =1 3 3J,K ′",University Physics I Classical Mechanics.pdf "K′ sys = K′ cm =1 1 2J,K ′ conv =0 ( r i g h ta f t e rt h ec o l l i s i o n ) K′ sys,f =1 3 3J,K ′ cm =1 1 2J,K ′ conv,i =2 1.2J ( a f t e r t h e s e p a r a t i o n ) So, even though the total kinetic energy is different in the tworeference frames, all the (inertial) observers will agree as to the amount of kinetic energy “lost”i nt h ec o l l i s i o n ,a sw e l la st h ea m o u n t of kinetic energy put back into the system by the players’ pushing on each other.",University Physics I Classical Mechanics.pdf "86 CHAPTER 4. KINETIC ENERGY 4.5 Problems Problem 1 A7 1 - k gm a nc a nt h r o wa1 - k gb a l lw i t ham a x i m u ms p e e do f6m / sr elative to himself. Imagine that one day he decides to try to do that on roller skates. Starting from rest, he throws the ball as hard as he can, so it ends up moving at 6 m/s relative to him, but he himself is recoiling as a result of the throw. (a) Assuming conservation of momentum, find the velocities oft h em a na n dt h eb a l lr e l a t i v et ot h e ground. (b) What is the kinetic energy of the system right after the throw? (By the system here we mean the man and the ball throughout.) Where did this kinetic energy come from? (c) Is the man’s reference frame inertial throughout this process? Why or why not? (d) Does the center of mass of the system move at all throughoutt h i sp r o c e s s ? Problem 2 Analyze Problem 1 from Chapter 3 from the point of view of the system’s kinetic energy. In particular, answer the following questions:",University Physics I Classical Mechanics.pdf "Problem 2 Analyze Problem 1 from Chapter 3 from the point of view of the system’s kinetic energy. In particular, answer the following questions: (a) What is the total kinetic energy of the system before and after the collision? How much of this energy is translational (that is, center-of-mass kinetic energy), and how much is convertible? (b) What kind of collision is this? (Elastic, inelastic, etc.) What is the coefficient of restitution? Problem 3 Analyze Problem 2 from Chapter 3 from the point of view of the system’s kinetic energy. In particular, answer the following questions: (a) What is the coefficient of restitution for the collision described in part (a) of the problem, and how much kinetic energy is “lost” in that collision? (b) What is the coefficient of restitution for the collision described in part (b) of the problem, and how much kinetic energy is “lost” in that collision? Problem 4",University Physics I Classical Mechanics.pdf "how much kinetic energy is “lost” in that collision? Problem 4 A0 .012-kg bullet, traveling at 850 m/s, hits a 2-kg block of woodthat is initially at rest, and goes straight through it. Assume that the final velocity of the bullet relative to the blockis 400 m/s, and that the system is isolated. (a) What is the coefficient of restitution for this collision? (b) How much kinetic energy is “lost” in the collision? (c) What is the final velocity of the block? Problem 5 A2 - k go b j e c t ,m o v i n ga t1 m / s ,c o l l i d e sw i t ha1 - k go b j e c tt h ati si n i t i a l l ya tr e s t . A s s u m et h e y form an isolated system.",University Physics I Classical Mechanics.pdf "4.5. PROBLEMS 87 (a) What is the initial kinetic energy of the system? How muchof this is center of mass energy, and how much is convertible? (b) What is the maximum amount of kinetic energy that could be“lost” (converted to other forms of energy) in this collision? (c) If 60% of the amount you calculated in part (b) is in fact converted into other forms of energy in the collision, what are the final velocities of the two objects?",University Physics I Classical Mechanics.pdf 88 CHAPTER 4. KINETIC ENERGY,University Physics I Classical Mechanics.pdf "Chapter 5 Interactions and energy 5.1 Conservative interactions Let me summarize the physical concepts and principles we havee n c o u n t e r e ds of a ri no u rs t u d y of classical mechanics. We have “discovered” one importantquantity, the inertia or inertial mass of an object, and introduced two different quantities based onthat concept, the momentumm⃗ v and the kinetic energy1 2 mv2. We found that these quantities have different but equally intriguing properties. The total momentum of a system is insensitive tothe interactions between the parts that make up the system, and therefore it stays constant in thea b s e n c eo fe x t e r n a li n fl u e n c e s( a more general statement of the law of inertia, the first important principle we encountered). The total kinetic energy, on the other hand, changes while any sort of interaction is taking place, but in some cases it may actually return to its original value afterwards.",University Physics I Classical Mechanics.pdf "in some cases it may actually return to its original value afterwards. In this chapter, we will continue to explore this intriguingbehavior of the kinetic energy, and use it to gain some important insights into the kinds of interactions we encounter in classical physics. In the next chapter, on the other hand, we will return to the momentum perspective and use it to formally introduce the concept of force. Hence, we can say that this chapter deals with interactions from an energy point of view, whereas next chapter will deal with them from a force point of view. In the previous chapter I suggested that what was going on in ane l a s t i cc o l l i s i o nc o u l db ei n t e r - preted, or described (perhaps in a figurative way) more or lessa sf o l l o w s : a st h eo b j e c t sc o m e together, the total kinetic energy goes down, but it is as if itw a sb e i n gt e m p o r a r i l ys t o r e da w a y",University Physics I Classical Mechanics.pdf "together, the total kinetic energy goes down, but it is as if itw a sb e i n gt e m p o r a r i l ys t o r e da w a y somewhere, and as the objects separate, that “stored energy”i sf u l l yr e c o v e r e da sk i n e t i ce n e r g y . Whether this does happen or not in any particular collision (that is, whether the collision is elastic or not) depends, as we have seen, on the kind of interaction (“bouncy” or “sticky,” for instance) that takes place between the objects. 89",University Physics I Classical Mechanics.pdf "90 CHAPTER 5. INTERACTIONS AND ENERGY We are going to take the ab ove description literally, and usethe name conservative interaction for any interaction that can “store and restore” kinetic energy in this way. The “stored energy” itself—which is not actually kinetic energy while it remains stored, since it isnot given by the value of 1 2 mv2 at that time—we are going to callpotential energy.T h u s , c o n s e r v a t i v e i n t e r a c t i o n s w i l l be those that have a “potential energy” associated with them,a n dv i c e - v e r s a . 5.1.1 Potential energy Perhaps the simplest and clearest example of the storage andrecovery of kinetic energy is what happens when you throw an object straight upwards, as it risesa n de v e n t u a l l yf a l l sb a c kd o w n . The object leaves your hand with some kinetic energy; as it rises it slows down, so its kinetic energy goes down, down... all the way down to zero, eventually, as it momentarily stopsat the top of its",University Physics I Classical Mechanics.pdf "goes down, down... all the way down to zero, eventually, as it momentarily stopsat the top of its rise. Then it comes down, and its kinetic energy starts to increase again, until eventually, as it comes back to your hand, it has very nearly the same kinetic energy it started out with (exactly the same, actually, if you neglect air resistance). The interaction responsible for this change in the object’skinetic energy is, of course, the gravi- tational interaction between it and the Earth, so we are goingt os a yt h a tt h e“ m i s s i n g ”k i n e t i c energy is temporarily stored asgravitational potential energyof the system formed by the Earth and the object. We even have a way to describ e what is going on mathematically.R e c a l l t h e e q u a t i o nv2 f − v2 i = 2a∆x for motion under constant acceleration. Let us usey instead of x,f o rt h ev e r t i c a lm o t i o n ; let a = −g,a n dl e tvf just be the generic velocity,v,a ts o m ea r b i t r a r yh e i g h ty.W eh a v e",University Physics I Classical Mechanics.pdf "let a = −g,a n dl e tvf just be the generic velocity,v,a ts o m ea r b i t r a r yh e i g h ty.W eh a v e v2 − v2 i = −2g(y − yi) Now multiply both sides of this equation by1 2 m: 1 2mv2 − 1 2mv2 i = −mg(y − yi)( 5 . 1 ) The left-hand side of (5.1)i sj u s tt h ec h a n g ei nk i n e t i ce n e r g y( f r o mi t si n i t i a lv a l u ewhen the object was launched). We will interpret the right-hand side as the negative of the change in gravitational potential energy. To make this clearer, rearrange Eq. (5.1)b ym o v i n ga l lt h e“ i n i t i a l ”q u a n t i t i e st o one side: 1 2mv2 + mgy = 1 2mv2 i + mgyi (5.2) We see, then, that the quantity1 2 mv2 + mgy stays constant (always equal to its initial value) as the object goes up and down. Let us define thegravitational potential energyof a system formed by the Earth and an object a heighty above the Earth’s surface as the following simple function of y: UG(y)= mgy (5.3)",University Physics I Classical Mechanics.pdf "5.1. CONSERVATIVE INTERACTIONS 91 Then we see from Eq. (5.2)t h a t K + UG =c o n s t a n t ( 5 . 4 ) This is a statement of conservation of energy under the gravitational interaction. For any interaction that has a potential energy associated with it, the quantityK + U is called the (total)mechanical energy. Figure 5.1 shows how the kinetic and potential energies of an object thrown straight up change with time. To calculateK Ih a v eu s e dt h ee q u a t i o nv = vi − gt (taking ti =0 ) ;t oc a l c u l a t eUG = mgy, Ih a v eu s e dy = yi + vit − 1 2 gt2.Ih a v ea r b i t r a r i l ya s s u m e dt h a tt h eo b j e c th a sam a s so f1 k gand an initial velocity of 2 m/s, and it is thrown from an initial height of 0.5m a bo v e t h e g r o u n d . N o t e how the change in potential energy exactly mirrors the changei nk i n e t i ce n e r g y( s o∆UG = −∆K, as indicated by Eq. (5.1)), and the total mechanical energy remains equal to its initial value of 6.9J throughout. 0 1 2 3",University Physics I Classical Mechanics.pdf "as indicated by Eq. (5.1)), and the total mechanical energy remains equal to its initial value of 6.9J throughout. 0 1 2 3 4 5 6 7 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 K UG energy (J) t (s) Figure 5.1: Potential and kinetic energy as a function of time for a system consisting of the earth and a 1-kg object sent upwards withvi = 2 m/s from a height of 0.5m . There is something about potential energy that probably needs to be mentioned at this point. Because I have chosen to launch the object from 0.5m a bo v e t h e g r o u n d , a n d I h a v e c h o s e n t o measure y from the ground, I started out with a potential energy ofmgyi =4 .9J . T h i s m a k e s sense, in a way: it tells you that if you simply dropped the object from this height, it would have picked up an amount of kinetic energy equal to 4.9J b y t h e t i m e i t r e a c h e d t h e g r o u n d . B u t , actually, where I choose the vertical origin of coordinatesis arbitrary. I could start measuringy",University Physics I Classical Mechanics.pdf "92 CHAPTER 5. INTERACTIONS AND ENERGY from any height I wanted to—for instance, taking the initialheight of my hand to correspond to y =0 . T h i sw o u l ds h i f tt h eb l u ec u r v ei nF i g .5.1 down by 4.9J , b u t i t w o u l d n o t c h a n g e a n y o f the physics. The only important thing I really want the potential energy for is to calculate the kinetic energy the object will lose or gainas it moves from one height to another,a n df o rt h a to n l y changes in potential energy matter. I can always add or subtract any (constant) number1 to or from U,a n di tw i l ls t i l lb et r u et h a t∆K = −∆U. What about potential energy in the context in which we first encountered it, that of elastic collisions in one dimension? Imagine that we have two carts collide on anair track, and one of them, let us say cart 2, is fitted with a spring. As the carts come together,they compress the spring, and some",University Physics I Classical Mechanics.pdf "say cart 2, is fitted with a spring. As the carts come together,they compress the spring, and some of their kinetic energy is “stored” in it as elastic potentiale n e r g y .I np h y s i c s ,w eu s et h ef o l l o w i n g expression for the potential energy stored in what we call anideal spring2: Uspr(x)= 1 2k(x − x0)2 (5.5) where k is something called the spring constant;x0 is the “equilibrium length” of the spring (when it is neither compressed nor stretched); andx its actual length, sox>x 0 means the spring is stretched, and x 0, which translates to the condition on t shown above. Having a solution forx12,w ec o u l dn o wo b t a i ne x p l i c i tr e s u l t sf o rx1(t)a n dx2(t)s e p a r a t e l y ,u s i n g the fact thatx1 = xcm −m2x12/(m1 +m2), andx2 = xcm +m1x12/(m1 +m2)( c o m p a r eE q s .(4.10), in chapter 4), and finding the position of the center of mass asaf u n c t i o no ft i m ei sat r i v i a lp r o b l e m , since it just moves with constant velocity. We do not, however, need to do any of this in order to generate the plots of the kinetic and potential energy shown in Fig.5.2:t h e p o t e n t i a le n e r g y d e p e n d s o n l y o nx2 − x1,w h i c hi sg i v e ne x p l i c i t l y",University Physics I Classical Mechanics.pdf "energy shown in Fig.5.2:t h e p o t e n t i a le n e r g y d e p e n d s o n l y o nx2 − x1,w h i c hi sg i v e ne x p l i c i t l y by Eq. (5.19), and the kinetic energy is equal toKcm + Kconv,w h e r eKcm is constant andKconv is given by Eq. (5.16), which can also be easily rewritten in terms of Eq. (5.19). The results are Eqs. (5.7)i nt h et e x t . 5.7.2 Getting the potential energy function from collisiondata Consider the collision illustrated in Figure3.4 (back in Chapter 3). Can we tell what the potential energy function is for the interaction between the two carts? At first sight, it may seem that all the information necessaryto “reconstruct” the functionU(x1−x2) is available already, at least in graphical form: From Figure 3.4 you could get the value ofx2 − x1 at any timet;t h e nf r o mF i g u r e4 . 5y o uc a ng e tt h ev a l u eo fK (in the elastic-collision scenario) for the same value oft;a n dt h e ny o uc o u l dp l o tU = E − K (where E is the total energy) as a",University Physics I Classical Mechanics.pdf "for the same value oft;a n dt h e ny o uc o u l dp l o tU = E − K (where E is the total energy) as a function ofx2 − x1. But there is a catch: Figure3.4 shows that the colliding objects never get any closer thanx2 −x1 ≃ 0.28 mm, so we have no way to tell whatU(x2−x1)i sf o rs m a l l e rv a l u e so fx2−x1.T h i s i s e s s e n t i a l l y the problem faced by particle physicists when they use collisions (which they do regularly) to try to determine the precise nature of the interactions betweenthe particles they study! You can check this for yourself. The functions I used forx1(t)a n dx2(t)i nfi g u r e3.4 are x1(t)= 1 3 ( (2t − 10) erf(10− 2t)+1 0e r f ( 1 0 )+t − e−4(t−5)2 √ π ) − 5 x2(t)= 1 3 ( (5 − t)e r f ( 1 0− 2t) − 5e r f ( 1 0 )+t + e−4(t−5)2 2√ π ) (5.20) Here, “erf” is the so-called “error function,” which you canfind in any decent library of mathemat-",University Physics I Classical Mechanics.pdf "108 CHAPTER 5. INTERACTIONS AND ENERGY ical functions. This looks complicated, but it just gives yout h es h a p e sy o uw a n tf o rt h ev e l o c i t y curves. The derivative of the above is v1(t)= 1 3 (1 + 2 erf(10− 2t)) v2(t)= 1 3 (1 − erf(10 − 2t)) (5.21) and you may want to try plotting these for yourself; the results h o u l db eF i g u r e3.1. Now, assume (as I did for figure4.5)t h a tm1 =1k g ,a n dm2 =2k g ,a n du s et h e s ev a l u e sa n dt h e results (5.21)( a s s u m e dt ob ei nm / s )t oc a l c u l a t eKsys as a function oft.T h e nU = Esys − Ksys, with Esys =1 /2J : U = 1 2 − 1 2m1v2 1(t) − 1 2m2v2 2(t)= 1 3 ( 1 − erf2(10 − 2t) ) (5.22) and now do a parametric plot ofU versus x2 − x1,u s i n gt as a parameter. You will end up with a figure like the one below: U (J) x2 - x1 (mm) Figure 5.5: The potential energy function reconstructed from the information available for the collision",University Physics I Classical Mechanics.pdf "figure like the one below: U (J) x2 - x1 (mm) Figure 5.5: The potential energy function reconstructed from the information available for the collision shown in Figs. 3.1, 3.4, 4.5. No information can be gathered from those figures (nor from theexplicit expressions (5.20)a n d(5.21) above) on the values ofU for x2 − x1 < 0.28 mm, the distance of closest approach of the two carts.",University Physics I Classical Mechanics.pdf "5.8. PROBLEMS 109 5.8 Problems Problem 1 Ap a r t i c l ei si nar e g i o nw h e r et h ep o t e n t i a le n e r g yh a st h ef orm U =5 /x (in joules, if x is in meters). (a) Sketch this potential energy function forx> 0. (b) Assuming the particle starts at rest atx =0 .5m , w h i c h w a y w i l l i t g o i f r e l e a s e d ? W h y ? (c) Under the assumption in part (b), what will be the particle’s kinetic energy after it has moved 0.1m f r o m i t s o r i g i n a l po s i t i o n ? (d) Now assume that initially the particle is atx =1 m ,m o v i n gt o w a r d st h el e f tw i t ha ni n i t i a l velocity vi =2 m / s . I ft h em a s so ft h ep a r t i c l ei s1 k g ,h o wc l o s et ot h eo r i gin can it get before it stops? Problem 2 A“ b a l l i s t i cp e n d u l u m ”i sad e v i c e( n o wl a r g e l yo b s o l e t e ,b utv e r yu s e f u li ni t sd a y )t om e a s u r et h e",University Physics I Classical Mechanics.pdf "A“ b a l l i s t i cp e n d u l u m ”i sad e v i c e( n o wl a r g e l yo b s o l e t e ,b utv e r yu s e f u li ni t sd a y )t om e a s u r et h e speed of a bullet as it hits a target. Let the target be a block ofw o o ds u s p e n d e df r o mas t r i n g ,a s in the figure below. When the bullet hits, it is embedded in thewood, and together they swing, like a pendulum, to some maximum heighth.T h e q u e s t i o ni s ,h o wd oy o ufi n d t h ei n i t i a ls p e e do f the bullet (vi)i fy o uk n o wt h em a s so ft h eb u l l e t(m1), the mass of the block (m2), and the height h? h (a) (b) Figure 5.6: Ballistic pendulum. (a) Before the bullet hits. (b) After the bullet hitsand is embedded in the block, at the maximum height of the swing. Problem 3 You drop a 0.5k g b a l l f r o m a h e i g h t o f 2m , a n d i t b o u n c e s b a c k t o a h e i g h t o f 1.5m . C o n s i d e rt h e system formed by the ball and the Earth, so we can speak properly of its gravitational potential",University Physics I Classical Mechanics.pdf "110 CHAPTER 5. INTERACTIONS AND ENERGY energy. (a) What is the kinetic energy of the ball just before it hits the ground? (b) What is the kinetic energy of the ball just after it bouncesu p ? (c) What is the coefficient of restitution for this collision? (d) What kind of collision is this (elastic, inelastic, etc.)? Why? (e) If the coefficient of restitution does not change, how highwould the ball rise on asecond bounce? (f) On the graphs below, draw the energy bar diagrams for the system: (1) as the ball leaves your hand; (2) just before it hits the ground (assumeh =0f o rp r a c t i c a lp u r p o s e s ) ;( 3 )j u s ta f t e ri t leaves the ground on its way up (h =0s t i l l ) ,a n d( 4 )a tt h et o po fi t s( fi r s t )b o u n c e . M a k es u r et o do this to scale, consistent with the values for the energiesyou have calculated above. Esource KU Ediss Esource KU Ediss Esource KU Ediss Esource KU Ediss (1) As the ball leaves your hand (2) Just before it hits the ground",University Physics I Classical Mechanics.pdf "Esource KU Ediss Esource KU Ediss Esource KU Ediss Esource KU Ediss (1) As the ball leaves your hand (2) Just before it hits the ground (3) Just after it leaves the ground on its way up (4) At the top of its bounce Problem 4 A6 0 - k gs k y d i v e rj u m p sf r o ma na i r p l a n e4 0 0 0 ma b o v et h ee a r t h.A f t e r f a l l i n g 4 5 0 m , h e r e a c h e s at e r m i n a ls p e e do f5 5 m / s( a b o u t1 2 0m p h ) . T h i sm e a n st h a ta f ter this time his speed does not increase any more. (a) At the moment of the jump, what is the initial (gravitational) potential energy of the system formed by the earth and the skydiver? (TakeUG =0a tg r o u n dl e v e l . ) (b) After the skydiver has fallen 450 m, what is the (gravitational) potential energy of the system? (Call this the “final” potential energy.) (c) What is the final kinetic energy of the diver at that time? (d) Assume the initial kinetic energy of the skydiver is zero.I s ∆K = −∆U for this system? If",University Physics I Classical Mechanics.pdf "(d) Assume the initial kinetic energy of the skydiver is zero.I s ∆K = −∆U for this system? If not, explain what happened to the “missing” energy. (e) Can the skydiver and the earth below (excluding the atmosphere!)b e c o n s i d e r e d a c l o s e d s y s t e m",University Physics I Classical Mechanics.pdf "5.8. PROBLEMS 111 here? Explain. (f) After the skydiver reaches terminal speed (and before heopens his parachute), he falls for a while at constant speed. What kind of energy conversion is taking place during this time? (Consider the system to be the earth, the skydiver, and the air around him). Problem 5 You shoot a 1-kg pro jectile straight up from a spring toy gun,and find that it reaches a height of 5m . ( H o w d o y o u fi g u r e o u t t h e h e i g h t ? F r o m t h e t i m e o f fl i g h t , o fcourse! See problem 2 from Chapter 2.) You also measure that when you load the gun, the spring compresses a distance 10 cm. What is the value of the spring constant?",University Physics I Classical Mechanics.pdf 112 CHAPTER 5. INTERACTIONS AND ENERGY,University Physics I Classical Mechanics.pdf "Chapter 6 Interactions, part 2: Forces 6.1 Force As we saw in the previous chapter, when an interaction can be described by a potential energy function, it is possible to use this to get a full solution forthe motion of the objects involved, at least in one dimension. In fact, energy-based methods (knowna st h eL a g r a n g i a na n dH a m i l t o n i a n methods) can be also generalized to deal with problems in three dimensions, and they also provide the most direct pathway to quantum mechanics and quantum fieldt h e o r y .I tm i g h tb ep o s s i b l et o write an advanced textbook on classical mechanics without mentioning the concept of force at all. On the other hand, as you may have also gathered from the example I worked out at the end of the previous chapter (section 5.6.3), solving for the equationof motion using energy-based methods may involve somewhat advanced math, even in just one dimension,and it only gets more complicated",University Physics I Classical Mechanics.pdf "involve somewhat advanced math, even in just one dimension,and it only gets more complicated in higher dimensions. There is also the question of how to dealw i t hi n t e r a c t i o n st h a ta r en o t conservative (at the macroscopic level) and therefore cannot be described by a potential energy function of the macroscopic coordinates. And, finally, therea r es p e c i a l i z e dp r o b l e ma r e a s( s u c ha s the entire field of statics) where you actuallywant to know the forces acting on the various objects involved. For all these reasons, the concept of force will beintroduced here, and the next few chapters will illustrate how it may be used to solve a varietyof elementary problems in classical mechanics. This does not mean, however, that we are going to forget about energy from now on: as we will see, energy methods will continue to provide usefuls h o r t c u t si nav a r i e t yo fs i t u a t i o n s as well.",University Physics I Classical Mechanics.pdf "as we will see, energy methods will continue to provide usefuls h o r t c u t si nav a r i e t yo fs i t u a t i o n s as well. We start, as usual, by considering two ob jects that form an isolated system, so they interact with each other and with nothing else. As we have seen, under thesecircumstances their individual momenta change, but the total momentum remains constant. Weare going to take therate of 113",University Physics I Classical Mechanics.pdf "114 CHAPTER 6. INTERACTIONS, PART 2: FORCES change of each object’s momentum as a measure of theforce exerted on it by the other object. Mathematically, this means we will write for theaverage force exerted by 1 on 2over the time interval ∆t the expression (F12)av = ∆p2 ∆t (6.1) Please observe the notation we are going to use: the subscripts on the symbolF are in the order “by,on”, as in “force exerted by” (object identified by first subscript) “on” (object identified by second subscript). (The comma is more or less optional.) You can also see from Eq. (6.1)t h a tt h eS Iu n i t so ff o r c ea r ek g· m/s2.T h i s c o m b i n a t i o n o f u n i t s has the special name “newton,” and it’s abbreviated by an uppercase N. In the same way as above, we can write the average force exertedb yo b j e c t2o no b j e c t1 : (F21)av = ∆p1 ∆t (6.2) and we know, by conservation of momentum, that we must have ∆p1 = −∆p2,s ow eg e to u rfi r s t important result, (F12)av = −(F21)av (6.3)",University Physics I Classical Mechanics.pdf "∆t (6.2) and we know, by conservation of momentum, that we must have ∆p1 = −∆p2,s ow eg e to u rfi r s t important result, (F12)av = −(F21)av (6.3) That is, whenever two objects interact, they always exert equal(in magnitude) and opposite (in direction) forces on each other.T h i s i s m o s t o f t e n c a l l e dNewton’s third lawof motion, or informally “the law of action and reaction.” We might as well now proceed along familiar lines and take thelimit of Eqs. (6.1)a n d(6.2)a b o v e , as ∆t goes to zero, in order to introduce the more general concept oft h ei n s t a n t a n e o u sf o r c e( o r just the “force,” without any further qualifiers). We then get F12 = dp2 dt F21 = dp1 dt (6.4) and, since Eq. (6.3)s h o u l dh o l df o rat i m ei n t e r v a lo fa n ys i z e , F12 = −F21 (6.5) Now, under most circumstances the mass of, say, object 2 willnot change during the interaction, so we can write F12 = d dt(m2v2)= m2 dv2 dt = m2a2 (6.6)",University Physics I Classical Mechanics.pdf "so we can write F12 = d dt(m2v2)= m2 dv2 dt = m2a2 (6.6) This is the result that we often refer to as “F = ma”, also known asNewton’s second law of motion: the (net) force acting on an object is equal to the product of its inertial mass and its acceleration.T h e f o r m u l a t i o n i n t e r m s o f t h e r a t e o f c h a n g e o f m o m e n t u m , asi nE q s .(6.4), is,",University Physics I Classical Mechanics.pdf "6.1. FORCE 115 however, somewhat more general, so it is technically preferred, even though this semester we will directly useF = ma throughout. If you want an example of a physical situation whereF = dp/dt is not equivalent to F = ma, consider a system where object 1 is a rocket, including its fuel, and “object” 2 are the gases ejected by the rocket. In this case, the mass of both “objects” is constantly changing, as the fuel is burned and more gases are ejected, and so the more general formF = dp/dt needs to be used to calculate the force on the rocket (the thrust) at any given time. At this point you may be wondering just what is Newton’sfirst law? It is just the law of inertia: an object on which no force acts will stay at rest if it is initially at rest, or will move with constant velocity. 6.1.1 Forces and systems of particles What if you had, say, three objects (let us make them “particles,” for simplicity), all interacting",University Physics I Classical Mechanics.pdf "velocity. 6.1.1 Forces and systems of particles What if you had, say, three objects (let us make them “particles,” for simplicity), all interacting with one another? In physics we find that all our interactionsare pairwise additive, that is, we can write the total potential energy of the system as the sum of thep o t e n t i a le n e r g i e sa s s o c i a t e dw i t h each pair of particles separately. As we will see in a moment,this means that the corresponding forces are additive too, so that, for instance, the total force on particle 1 could be written as Fall,1 = F21 + F31 = dp1 dt (6.7) Consider now the most general case of a system that has an arbitrary number of particles, and is not isolated; that is, there are other objects, outside the system, that exert forces on some or all of the particles that make up the system. We will call theseexternal forces.T h e s u m o f a l l t h e f o r c e s",University Physics I Classical Mechanics.pdf "the particles that make up the system. We will call theseexternal forces.T h e s u m o f a l l t h e f o r c e s (both internal and external) acting on all the particles willt a k eaf o r ml i k et h i s : Ftotal = Fext,1 + F21 + F31 + ... + Fext,2 + F12 + F32 + ... + ... = dp1 dt + dp2 dt + ... (6.8) where Fext,1 is the sum of all the external forces acting on particle 1, andso on. But now, observe that because of Newton’s third law, Eq. (6.5), for every term of the formFij appearing in the sum (6.8), there is a corresponding termFji = −Fij (you can see this explicitly already in Eq. (6.8) with F12 and F21), so all those terms (which represent all the internal forces) are going to cancel out, and we will be left only with the sum of the external forces: Fext,1 + Fext,2 + ... = dp1 dt + dp2 dt + ... (6.9) The left-hand side of this equation is the sum of all the external forces; the right-hand side is the",University Physics I Classical Mechanics.pdf "dt + dp2 dt + ... (6.9) The left-hand side of this equation is the sum of all the external forces; the right-hand side is the rate of change of the total momentum of the system. But the total momentum of the system is",University Physics I Classical Mechanics.pdf "116 CHAPTER 6. INTERACTIONS, PART 2: FORCES just equal toMvcm (compare Eq. (3.11), in the “Momentum” chapter). So we have Fext,all = dpsys dt = d dt(Mvcm)( 6 . 1 0 ) This extends a previous result. We already knew that in the absence of external forces, the mo- mentum of a system remained constant. Now we see that the system’s momentum responds to the net external force as if the whole system was a single particleo fm a s se q u a lt ot h et o t a lm a s sM and moving at the center of mass velocityvcm.I n f a c t ,a s s u m i n g t h a tM does not change we can rewrite Eq. (6.10)i nt h ef o r m Fext,all = Macm (6.11) where acm is the acceleration of the center of mass. This is the key result that allows us to treat extended objects as if they were particles: as far as the motion of the center of mass is concerned, all the internal forces cancel out (as we already saw in our study of collisions), and the point",University Physics I Classical Mechanics.pdf "all the internal forces cancel out (as we already saw in our study of collisions), and the point representing the center of mass responds to the sum of the external forces as if it were just a particle of massM subject to Newton’s second law,F = ma.T h e r e s u l t (6.11)a p p l i e se q u a l l yw e l l to an extended solid object that we choose to mentally break upi n t oac o l l e c t i o no fp a r t i c l e s ,a s to an actual collection of separate particles, or even to a collection of separate extended objects; in the latter case, we would just have each object’s motion represented by the motion of its own center of mass. Finally, note that all the results above generalize to more than one dimension. In fact, forces are vectors (just like velocity, acceleration and momentum), and all ofthe above equations, in 3 dimensions, apply separately to each vector component. In one dimension, we just need to be aware of the sign of the forces, whenever we add several of them together.",University Physics I Classical Mechanics.pdf "of the sign of the forces, whenever we add several of them together. 6.2 Forces and potential energy In the last chapter I mentioned a special case that we encounter often, in which a lighter object is interacting with a much more massive one, so that the massiveone essentially does not move at all as a result of the interaction. Note that this does not contradict Newton’s 3rd law, Eq. (6.5): the forces the two objects exert on each otherare the same in magnitude, but the acceleration of each object is inversely proportional to its mass, soF12 = −F21 implies m2a2 = −m1a1 (6.12) and so if, for instance,m2 ≫ m1,w eg e t|a2| = |a1|m1/m2 ≪| a1|.I n w o r d s , t h e m o r e m a s s i v e object is less responsive than the less massive one to a forceof the same magnitude. This is just how we came up with the concept of inertial mass in the first place! Anyway, you’ll recall that in this situation I could just write the potential energy function of the",University Physics I Classical Mechanics.pdf "Anyway, you’ll recall that in this situation I could just write the potential energy function of the whole system as a function of only the lighter object’s coordinate, U(x). I am going to use this",University Physics I Classical Mechanics.pdf "6.2. FORCES AND POTENTIAL ENERGY 117 simplified setup to show you a very interesting relationshipbetween potential energies and forces. Suppose this is a closed system in which no dissipation of energy is taking place. Then the total mechanical energy is a constant: Emech = 1 2mv2 + U(x)=c o n s t a n t ( 6 . 1 3 ) (Here, m is the mass of the lighter object, andv its velocity; the more massive object does not contribute to the total kinetic energy, since it does not move!) As the lighter object moves, bothx and v in Eq. (6.13)c h a n g ew i t ht i m e( r e c a l l ,f o ri n s t a n c e ,o u r study of “energy landscapes” in the previous chapter, section 5.1.2). So I can take the derivative of Eq. (6.13)w i t hr e s p e c tt ot i m e ,u s i n gt h ec h a i nr u l e ,a n dn o t i n gt h a t ,since the whole thing is a constant, the total value of the derivative must be zero: 0= d dt ( 1 2m ( v(t) )2 + U ( x(t) )) = mv(t) dv dt + dU dx dx dt (6.14)",University Physics I Classical Mechanics.pdf "constant, the total value of the derivative must be zero: 0= d dt ( 1 2m ( v(t) )2 + U ( x(t) )) = mv(t) dv dt + dU dx dx dt (6.14) But note thatdx/dt is just the same asv(t). So I can cancel that on both terms, and then I am left with m dv dt = −dU dx (6.15) But dv/dt is just the accelerationa,a n dF = ma.S ot h i st e l l sm et h a t F = −dU dx (6.16) and this is how you can always get the force from a potential energy function. Let us check it right away for the force of gravity: we know that UG = mgy,s o FG = −dUG dy = − d dy(mgy)= −mg (6.17) Is this right? It seems to be! Recall all objects fall with thesame acceleration, −g (assuming the upwards direction to be positive), so ifF = ma,w em u s th a v eFG = −mg.S o t h e g r a v i t a t i o n a l force exerted by the earth on any object (which I would denotein full byFG E,o)i sp r o p o r t i o n a lt o the inertial mass of the object—in fact, it is what we call theobject’sweight—but since to get the",University Physics I Classical Mechanics.pdf "E,o)i sp r o p o r t i o n a lt o the inertial mass of the object—in fact, it is what we call theobject’sweight—but since to get the acceleration you have to divide the force by the inertial mass, that cancels out, anda ends up being the same for all objects, regardless of how heavy they are. Now that we have this result under our belt, we can move on to thes l i g h t l ym o r ec h a l l e n g i n gc a s e of two objects of comparable masses interacting through a potential energy function that must be, as I pointed out in the previous chapter, a function of just ther e l a t i v ec o o r d i n a t ex12 = x2 − x!.",University Physics I Classical Mechanics.pdf "118 CHAPTER 6. INTERACTIONS, PART 2: FORCES Ic l a i mt h a ti nt h a tc a s ey o uc a na g a i ng e tt h ef o r c eo no b j e c t1, F21,b yt a k i n gt h ed e r i v a t i v e of U(x2 − x1)w i t hr e s p e c tt ox1 (leaving x2 alone), and reciprocally, you getF12 by taking the derivative ofU(x2 − x1)w i t hr e s p e c tt ox2.H e r ei sh o wi tw o r k s ,a g a i nu s i n g t h ec h a i nr u l e : F21 = − d dx1 U(x12)= − dU dx12 d dx1 (x2 − x1)= dU dx12 F12 = − d dx2 U(x12)= − dU dx12 d dx2 (x2 − x1)= − dU dx12 (6.18) and you can see that this automatically ensures thatF21 = −F12.I n f a c t ,i t w a si no r d e r t oe n s u r e this that I required thatU should depend only on thedifference of x1 and x2,r a t h e rt h a no ne a c h one separately. Since we got the conditionF21 = −F12 originally from conservation of momentum, you can see now how the two things are related1. The only example we have seen so far of this kind of potential energy function was in last chapter’s",University Physics I Classical Mechanics.pdf "you can see now how the two things are related1. The only example we have seen so far of this kind of potential energy function was in last chapter’s Section 5.1.1, for two carts interacting through an “ideal”spring. I told you there that the potential energy of the system could be written as1 2 k(x2 −x1 −x0)2,w h e r ek was the “spring constant” and x0 the relaxed length of the spring. If you apply Eqs. (6.18)t ot h i sf u n c t i o n ,y o uw i l lfi n dt h a tt h e force exerted (through the spring) by cart 2 on cart 1 is F21 = k(x2 − x1 − x0)( 6 . 1 9 ) Note that this force will be negative under the assumptions wem a d el a s tc h a p t e r ,n a m e l y ,t h a tc a r t 2i so nt h er i g h t ,c a r t1o nt h el e f t ,a n dt h es p r i n gi sc o m p r e s sed, so thatx2 − x1 x 0 > 0( s p r i n gs t r e t c h e d ,p u l l i n gf o r c e )a n dp o s i t i v ei fxx 0.",University Physics I Classical Mechanics.pdf "120 CHAPTER 6. INTERACTIONS, PART 2: FORCES only meaningful at the macroscopic level, since at the microscopic level objects neverreally touch, and all forces are field forces, it is just that some are “long range” and some are “short range.” For our purposes, really, the word “contact” will just be a convenient, catch-all sort of moniker that we will use to label the force vectors when nothing more specificwill do. 6.3 Forces not derived from a potential energy As we have seen in the previous section, for interactions thata r ea s s o c i a t e dw i t hap o t e n t i a le n e r g y , we are always able to determine the forces from the potentialenergy by simple differentiation. This means that we do not have to rely exclusively on an equation ofthe typeF = ma,l i k e(6.4)o r(6.6), to infer the value of a force from the observed acceleration; rather,we can work in reverse, and predict the value of the acceleration (and from it all the subsequentmotion) from our knowledge of the force.",University Physics I Classical Mechanics.pdf "predict the value of the acceleration (and from it all the subsequentmotion) from our knowledge of the force. Ih a v es a i db e f o r et h a t ,o nam i c r o s c o p i cl e v e l ,a l lt h ei n t e ractions can be derived from potential energies, yet at the macroscopic level this is not generallytrue: we have many kinds of interactions for which the associated “stored” or converted energy cannot, in general, be written as a function of the macroscopic position variables for the objects makingu pt h es y s t e m( b yw h i c hIm e a n , typically, the positions of their centers of mass). So what dow ed oi nt h o s ec a s e s ? The forces of this type with which we shall deal this semesteractually fall into two different categories: the ones that do not dissipate energy, and that we could,i nf a c t ,a s s o c i a t ew i t ha potential energy if we wanted to3,a n dt h eo n e st h a td e fi n i t e l yd i s s i p a t ee n e r g ya n dn e e ds p e c ial",University Physics I Classical Mechanics.pdf "potential energy if we wanted to3,a n dt h eo n e st h a td e fi n i t e l yd i s s i p a t ee n e r g ya n dn e e ds p e c ial handling. The former category includes the normal force, tension, and the static friction force; the second category includes the force of kinetic (or sliding) friction, and air resistance. A brief description of all these forces, and the methods to deal withthem, follows. 6.3.1 Tensions Tension is the force exerted by a stretched spring, and, similarly, byo b j e c t ss u c ha sc a b l e s ,r o p e s , and strings in response to a stretching force (or load) applied to them. It is ultimately an elastic force, so, as I said above, we could in principle describe it byap o t e n t i a le n e r g y ,b u ti np r a c t i c e cables, strings and the like are so stiff that it is often all right to neglect their change in length altogether and assume thatno potential energy is, in fact, stored in them. The price we payfor",University Physics I Classical Mechanics.pdf "altogether and assume thatno potential energy is, in fact, stored in them. The price we payfor this simplification (and itis as i m p l i fi c a t i o n )i st h a tw ea r el e f tw i t h o u ta ni n d e p e n d e n tway to determine the value of the tension in any specific case; we justh a v et oi n f e ri tf r o mt h ea c c e l e r a t i o n 3If we wanted to complicate our life, that is...",University Physics I Classical Mechanics.pdf "6.3. FORCES NOT DERIVED FROM A POTENTIAL ENERGY 121 of the object on which it acts (since it is a reaction force, itcan assume any value as required to adjust to any circumstance—up to the point where the rope snaps, anyway). Thus, for instance, in the picture below, which shows two blocks connected by a rope over a pulley, the tension force exerted by the rope on block 1 must equalm1a1,w h e r ea1 is the acceleration of that block, provided there are no other horizontal forces (such as friction) acting on it. For the hanging block, on the other hand, the net force is the sum of thet e n s i o no nt h eo t h e re n do ft h e rope (pulling up) and gravity, pulling down. If we choose theupward direction as positive, we can write Newton’s second law for the second block as Ft r,2 − m2g = m2a2 (6.22) Two things need to be realized now. First, if the rope is inextensible, both blocks travel the same",University Physics I Classical Mechanics.pdf "Ft r,2 − m2g = m2a2 (6.22) Two things need to be realized now. First, if the rope is inextensible, both blocks travel the same distance in the same time, so their speeds are always the same,a n dh e n c et h emagnitude of their accelerations will always be the same as well; only the sign may be different depending on which direction we choose as positive. If we take to the right to be positive for the horizontal motion, we will havea2 = −a1.I ’ mj u s tg o i n gt oc a l la1 = a,s ot h e na2 = −a. 1 2 Fr,1 t Fr,2 t FE,2 G Fs,1 fr a1 a2 Figure 6.2: Two blocks joined by a massless, inextensible strength threaded over a massless pulley. An optional friction force (in red, wherefr could be eithers or k) is shown for use later, in the discussion in subsection 3.3. In this subsection, however, it is assumed to be zero. The second thing to note is that, if the rope’s mass is negligible, it will, like an ideal spring, pull",University Physics I Classical Mechanics.pdf "The second thing to note is that, if the rope’s mass is negligible, it will, like an ideal spring, pull with a force with the samemagnitude on both ends. With our specific choices (up and to the right is positive), we then haveFt r,2 = Ft r,1,a n dI ’ mj u s tg o i n gt oc a l lt h i sq u a n t i t yFt.A l l t h i s y i e l d s ,",University Physics I Classical Mechanics.pdf "122 CHAPTER 6. INTERACTIONS, PART 2: FORCES then, the following two equations: Ft = m1a Ft − m2g = −m2a (6.23) The system (6.23)c a nb ee a s i l ys o l v e dt og e t a = m2g m1 + m2 Ft = m1m2g m1 + m2 (6.24) 6.3.2 Normal forces Normal force is the reaction force with which a surface pushesb a c kw h e ni ti sb e i n gp u s h e do n . Again, this works very much like an extremely stiff spring, this time under compression instead of tension. And, again, we will eschew the potential energy treatment by assuming that the surface’s actual displacement is entirely negligible, and we will justc a l c u l a t et h ev a l u eo fFn as whatever is needed in order to make Newton’s second law work. Note that this force will always be perpendicular to the surface, by definition (the word “normal” means “perpendicular” here); the task of dealing with a sideways push on the surface will be delegated to the static friction force, to be covered next.",University Physics I Classical Mechanics.pdf "with a sideways push on the surface will be delegated to the static friction force, to be covered next. If I am just standing on the floor and not falling through it, then e tv e r t i c a lf o r c ea c t i n go nm e must be zero. The force of gravity on me ismg downwards, and so the upwards normal force must match this value, so for this situationFn = mg.B u t d o n ’ t g e t t o o a t t a c h e d t o t h e n o t i o n t h a t the normal force must always be equal tomg,s i n c et h i sw i l lo f t e nn o tb et h ec a s e . I m a g i n e ,f o r instance, a person standing inside an elevator at the time itis accelerating upwards. With the upwards direction as positive, Newton’s second law for the person reads Fn − mg = ma (6.25) and therefore for this situation Fn = mg + ma (6.26) If you were weighing yourself on a bathroom scale in the elevator, this is the upwards force that the bathroom scale would have to exert on you, and it would do thatby compressing a spring inside,",University Physics I Classical Mechanics.pdf "bathroom scale would have to exert on you, and it would do thatby compressing a spring inside, and it would record the “extra” compression (beyond that required by your actual weight,mg) as extra weight. Conversely, if the elevator were accelerating downward, the scale would record you as being lighter. In the extreme case in which the cable ofthe elevator broke and you, the elevator and the scale ended up (briefly, before the emergencyb r a k ec a u g h to n )i nf r e ef a l l ,y o u would all be falling with the same acceleration, you would notb ep u s h i n gd o w no nt h es c a l ea ta l l , and its normal force as well as your recorded weight would be zero. This is ultimately the reason",University Physics I Classical Mechanics.pdf "6.3. FORCES NOT DERIVED FROM A POTENTIAL ENERGY 123 for the apparent weightlessness experienced by the astronauts in the space station, where the force of gravity is, in fact, not very much smaller than on the surface of the earth. (We will return to this effect after we have a good grip on two-dimensional, and inparticular circular, motion.) 6.3.3 Static and kinetic friction forces The static friction force is a force that prevents two surfaces in contact from slipping relative to each other. It is an extremely useful force, since we would notb ea b l et od r i v eac a r ,o rr i d ea bicycle, or even walk, without it—as we know from experience,i fw eh a v ee v e rt r i e dt od oa n yo f those things on a low-friction surface (such as a sheet of ice). The science behind friction (known technically astribology)i sa c t u a l l yn o tv e r ys i m p l ea ta l l ,a n d it is of great current interest for many reasons—whether theultimate goal is to develop ways to",University Physics I Classical Mechanics.pdf "it is of great current interest for many reasons—whether theultimate goal is to develop ways to reduce friction or to increase it. On an elementary level, weare all aware of the fact that even a surface that looks smooth on a macroscopic scale will actually exhibit irregularities, such as ridges and valleys, under a microscope. It makes sense, then, that when two such surfaces are pressed together, the bumps on one of them will hit, and be held in placeb y ,t h eb u m p so nt h eo t h e ro n e , and that will prevent sliding until and unless a sufficient force is applied to temporarily “flatten” the bumps enough to allow the thing to move4. As long as this does not happen, that is, as long as the surfacesd onot slide relative to each other, we say we are dealing with thestatic friction force, which is, at least approximately, an elasticf o r c e that does not dissipate energy: the small distortion of the “bumps” on the surfaces that takes place",University Physics I Classical Mechanics.pdf "that does not dissipate energy: the small distortion of the “bumps” on the surfaces that takes place when you push on them typically happens slowly enough, and issmall enough, to be reversible, so that when you stop pushing the two surfaces just go back to their initial state. This is no longer the case once the surfaces start sliding relative to each other. At that point the character of the friction force changes, and we have to deal with thesliding,o rkinetic friction force, as I will explain below. The static friction force is also, like tension and the normalf o r c e ,ar e a c t i o nf o r c et h a tw i l la d j u s t itself, within limits, to take any value required to preventslippage in a given circumstance. Hence, its actual value in a particular situation cannot really be ascertained until the other relevant forces— the other forces pushing or pulling on the object—are known.",University Physics I Classical Mechanics.pdf "the other forces pushing or pulling on the object—are known. For instance, for the system in Figure6.2,i m a g i n et h e r ei saf o r c eo fs t a t i cf r i c t i o nb e t w e e nb l o c k 1a n dt h es u r f a c eo nw h i c hi tr e s t s ,s u ffi c i e n t l yl a r g et ok e e pitf r o ms l i d i n ga l t o g e t h e r . H o wl a r g e 4This picture based, essentially, on classical physics, leaves out an atomic-scale effect that may be important in some cases, which is the formation of weak bonds between thea t o m so fb o t hs u r f a c e s ,r e s u l t i n gi na na c t u a l “adhesive” force. This is, for instance, how geckos can run upv e r t i c a lw a l l s . F o ro u rp u r p o s e s ,h o w e v e r ,t h ec l a s s i c a l picture (of small ridges and valleys bumping into each other)w i l ls u ffi c et oq u a l i t a t i v e l yu n d e r s t a n da l lt h ee x a m p l e s we will cover this semester.",University Physics I Classical Mechanics.pdf "124 CHAPTER 6. INTERACTIONS, PART 2: FORCES does this have to be? If there is no acceleration (a =0 ) ,t h ee q u i v a l e n to fs y s t e m(6.23)w i l lb e Fs s,1 + Ft =0 Ft − m2g =0 ( 6 . 2 7 ) where Fs s,1 is the force of static friction exerted by the surface on block1 ,a n dw ea r eg o i n gt o let the math tell us what sign it is supposed to have. Solving the system (6.27)w ej u s tg e tt h e condition Fs s,1 = −m2g (6.28) so this is how largeFs s,1 has to be in order to keep the whole system from moving in this case. There is an empirical formula that tells us approximately howl a r g et h ef o r c eo fs t a t i cf r i c t i o ncan get in a given situation. The idea behind it is that, microscopically, the surfaces are in contact only near the top of their respective ridges. If you press them together harder, some of the ridges get flattened and the effective contact area increases; this in turnm a k e st h es u r f a c e sm o r er e s i s t a n tt o",University Physics I Classical Mechanics.pdf "flattened and the effective contact area increases; this in turnm a k e st h es u r f a c e sm o r er e s i s t a n tt o slippage. A direct measure of how strongly the two surfaces press against each other is, actually, just the normal force they exert on each other. So, in general,w ee x p e c tt h em a x i m u mf o r c et h a t static friction will be able to exert to be proportional to the normal force between the surfaces: ⏐⏐Fs s1,s2 ⏐⏐ max = µs ⏐⏐Fn s1,s2 ⏐⏐ (6.29) where s1a n ds2j u s tm e a n“ s u r f a c e1 ”a n d“ s u r f a c e2 , ”r e s p e c t i v e l y ,a n dt hen u m b e rµs is known as thecoefficient of static friction:i ti sa t a b u l a t e dq u a n t i t yt h a ti sd e t e r m i n e d e x p e r i m e n t a lly, by testing the slippage of different surfaces against each otherunder different loads. In our example, the normal force exerted by the surface on block 1 has to be equal tom1g,s i n c e",University Physics I Classical Mechanics.pdf "In our example, the normal force exerted by the surface on block 1 has to be equal tom1g,s i n c e there is no vertical acceleration for that block, and so the maximum value thatFs may have in this case isµsm1g,w h a t e v e rµs might happen to be. In fact, this setup would give us a way to determine µs for these two surfaces: start with a small value ofm2,a n dg r a d u a l l yi n c r e a s ei tu n t i l the system starts moving. At that point we will know thatm2g has just exceeded the maximum possible value of |Fs 12|,n a m e l y ,µsm1g,a n ds oµs =( m2)max/m1,w h e r e(m2)max is the largest mass we can hang before the system starts moving. By contrast with all of the above, thekinetic friction force, which always acts so as to oppose the relative motion of the two surfaces when theyare actually slipping, is not elastic, it is definitely dissipative, and, most interestingly, it is alsonot much of a reactive force, meaning that its value",University Physics I Classical Mechanics.pdf "dissipative, and, most interestingly, it is alsonot much of a reactive force, meaning that its value can be approximately predicted for any given circumstance,and does not depend much on things such as how fast the surfaces are actually moving relative toeach other. It does depend on how hard the surfaces are pressing against each other, as quantified by the normal force, and on another tabulated quantity known as thecoefficient of kinetic friction: ⏐⏐⏐Fk s1,s2 ⏐⏐⏐= µk ⏐⏐Fn s1,s2 ⏐⏐ (6.30)",University Physics I Classical Mechanics.pdf "6.3. FORCES NOT DERIVED FROM A POTENTIAL ENERGY 125 Note that, unlike for static friction, this isnot the maximum possible value of|Fk|,b u ti t sactual value; so if we knowFn (and µk)w ek n o wFk without having to solve any other equations (its sign does depend on the direction of motion, of course). The coefficient µk is typically a little smaller than µs,r e fl e c t i n gt h ef a c tt h a to n c ey o ug e ts o m e t h i n gy o uh a v eb e e npushing on to move, keeping it in motion with constant velocity usually does not requirethe same amount of force. To finish off with our example in Figure 2, suppose the systemis moving, and there is a kinetic friction forceFk s,1 between block 1 and the surface. The equations (6.23)t h e nh a v et ob ec h a n g e d to Ft − µkm1g = m1a Ft − m2g = −m2a (6.31) and the solution now is a = m2 − µkm1 m1 + m2 g Ft = m1m2(1 +µk) m1 + m2 g (6.32) You may ask, why does kinetic friction dissipate energy? A qualitative answer is that, as the surfaces",University Physics I Classical Mechanics.pdf "m1 + m2 g Ft = m1m2(1 +µk) m1 + m2 g (6.32) You may ask, why does kinetic friction dissipate energy? A qualitative answer is that, as the surfaces slide past each other, their small (sometimes microscopic)ridges are constantly “bumping” into each other; so you have lots of microscopic collisions happening all the time, and they cannot all be perfectly elastic. So mechanical energy is being “lost.”In fact, it is primarily being converted to thermal energy, as you can verify experimentally: this iswhy you rub your hands together to get warm, for instance. More dramatically, this is how some people (those who really know what they are doing!) can actually start a fire by rubbing sticks together. 6.3.4 Air resistance Air resistance is an instance of fluid resistance ordrag,af o r c et h a to p p o s e st h em o t i o no fa no b j e c t through a fluid. Microscopically, you can think of it as beingdue to the constant collisions of the",University Physics I Classical Mechanics.pdf "through a fluid. Microscopically, you can think of it as beingdue to the constant collisions of the object with the air molecules, as it cleaves its way through the air. As a result of these collisions, some of its momentum is transferred to the air, as well as someof its kinetic energy, which ends up as thermal energy (as in the case of kinetic friction discussed above). The very high temperatures that air resistance can generate can be seen, in a particularly dramatic way, on the re-entry of spacecraft into the atmosphere. Unlike kinetic friction between solid surfaces, the fluid drag force does depend on the velocity of the object (relative to the fluid), as well as on a number of other factors having to do with the object’s shape and the fluid’s density and viscosity. Very roughly speaking, for low velocities the",University Physics I Classical Mechanics.pdf "126 CHAPTER 6. INTERACTIONS, PART 2: FORCES drag force is proportional to the object’s speed, whereas forh i g hv e l o c i t i e si ti sp r o p o r t i o n a lt ot h e square of the speed. In principle, one can use the appropriate drag formula together with Newton’s second law to calculate the effect of air resistance on a simple object throwno rd r o p p e d ;i np r a c t i c e ,t h i sr e q u i r e s as o m e w h a tm o r ea d v a n c e dm a t ht h a nw ew i l lb eu s i n gt h i sc o u r se, and the formulas themselves are complicated, so I will not introduce them here. One aspect of air resistance that deserves to be mentioned iswhat is known as “terminal velocity” (which I already introduced briefly in Section 2.3). Since airr e s i s t a n c ei n c r e a s e sw i t hs p e e d ,i f you drop an object from a sufficiently great height, the upwardsd r a gf o r c eo ni tw i l li n c r e a s ea si t",University Physics I Classical Mechanics.pdf "you drop an object from a sufficiently great height, the upwardsd r a gf o r c eo ni tw i l li n c r e a s ea si t accelerates, until at some point it will become as large as thed o w n w a r df o r c eo fg r a v i t y . A tt h a t point, the net force on the object is zero, so it stops accelerating, and from that point on it continues to fall with constant velocity. When the Greek philosopher Aristotle was trying to figure out the motion of falling bodies, he reasoned that, since air was justa n o t h e rfl u i d ,h ec o u l ds l o wd o w nt h e fall (in order to study it better) without changing the physics by dropping objects in liquids instead of air. The problem with this approach, though, is that terminal velocity is reached much faster in a liquid than in air, so Aristotle missed entirely the early stage of approximately constant acceleration, and concluded (wrongly) that the natural way all objects fellw a sw i t hc o n s t a n tv e l o c i t y . I tt o o k",University Physics I Classical Mechanics.pdf "and concluded (wrongly) that the natural way all objects fellw a sw i t hc o n s t a n tv e l o c i t y . I tt o o k almost two thousand years until Galileo disproved that notion by coming up with a better method to slow down the falling motion—namely, by using inclined planes. 6.4 Free-body diagrams As Figure6.1 shows, trying to draw every single force acting on every single object can very quickly become pretty messy. And anyway, this is not usually what we need: what we need is to separate cleanly all the forces acting on any given object, one objectat a time, so we can apply Newton’s second law,Fnet = ma,t oe a c ho b j e c ti n d i v i d u a l l y . In order to accomplish this, we use what are known asfree-body diagrams.I n a f r e e - b o d y d i a g r a m , ap o t e n t i a l l yv e r yc o m p l i c a t e do b j e c ti sr e p l a c e ds y m b o l i cally by a dot or a small circle, and all",University Physics I Classical Mechanics.pdf "ap o t e n t i a l l yv e r yc o m p l i c a t e do b j e c ti sr e p l a c e ds y m b o l i cally by a dot or a small circle, and all the forces acting on the object are drawn (approximately to scale and properly labeled) as acting on the dot. Regardless of whether a force is a pulling or pushing force, the convention is to always draw itas a vector that originates at the dot.I f t h e s y s t e mi s a c c e l e r a t i n g ,i t i sa l s o a g o o d i d e a t o indicate the acceleration’s direction also somewhere on thed i a g r a m . The figure below (next page) shows, as an example, a free-bodydiagram for block 1 in Figure6.2, in the presence of both a nonzero acceleration and a kinetic friction force. The diagram includes all the forces, even gravity and the normal force, which wereleft out of the picture in Figure6.2.",University Physics I Classical Mechanics.pdf "6.5. IN SUMMARY 127 Fr,1 t Fs,1 n FE,1 G Fs,1 k a Figure 6.3: Free-body diagram for block 1 in Figure6.2, with the friction force adjusted so as to be compatible with a nonzero acceleration to the right. Note that I have drawnFn and the force of gravityFG E,1 as having the same magnitude, since there is no vertical acceleration for that block. If I know thev a l u eo fµk,Is h o u l da l s ot r yt od r a w Fk = µkFn approximately to scale with the other two forces. Then, sinceIk n o wt h a tt h e r ei sa n acceleration to the right, I need to drawFt greater thanFk,s i n c et h en e tf o r c eo nt h eb l o c km u s t be to the right as well. And, if I were drawing a free-body diagram for block 2, I would have to make sure that I drew its weight,FG E,2,a sb e i n gg r e a t e ri nm a g n i t u d et h a nFt,s i n c et h en e tf o r c e on that block needs to be downwards. 6.5 In summary 1. Whenever two objects interact, they exertforces on each other that are equal in magnitude",University Physics I Classical Mechanics.pdf "on that block needs to be downwards. 6.5 In summary 1. Whenever two objects interact, they exertforces on each other that are equal in magnitude and opposite in direction (Newton’s 3rd law). 2. Forces are vectors, and they are additive. The total (or net) force on an object or system is equal to the rate of change of its total momentum (Newton’s 2nd law). If the system’s mass is constant, this can be written asFext,all = Macm,w h e r eM is the system’s total mass andacm is the acceleration of its center of mass. Only theexternal forces contribute to this equation; the internal forces cancel out because of point 1 above. 3. For any interaction that can be derived from a potential energy function U(x1 − x2), the force exerted by object 2 on object 1 is equal to−dU/dx1 (where the derivative is calculated treating x2 as a constant), and vice-versa. 4. The force of gravity on an object near the surface of the earth is known as the object’sweight,",University Physics I Classical Mechanics.pdf "treating x2 as a constant), and vice-versa. 4. The force of gravity on an object near the surface of the earth is known as the object’sweight, and it is equal (in magnitude) tomg,w h e r em is the object’s inertial mass. 5. An ideal spring whose relaxed length isx0,w h e ns t r e t c h e do rc o m p r e s s e dt oal e n g t hx,e x e r t s ap u l l i n go rp u s h i n gf o r c e ,r e s p e c t i v e l y ,a tb o t he n d s ,w i t hmagnitude k|x − x0|,w h e r ek is called the spring constant.",University Physics I Classical Mechanics.pdf "128 CHAPTER 6. INTERACTIONS, PART 2: FORCES 6. When dealing with macroscopic objects we introduce several “constraint” forces whose values need to be determined from the accelerations through Newton’s second law: thetension Ft in ropes, strings or cables; thenormal force Fn exerted by a surface in response to applied pressure; and the static friction forceFs that prevents surfaces from slipping past each other. 7. The maximum possible value of the static friction force isµs|Fn|,w h e r eµs is the coefficient of static friction. 8. The force of sliding or kinetic friction,Fk,a p p e a r sw h e nt w os u r f a c e sa r es l i d i n gp a s te a c h other. Its magnitude isµk|Fn| (µk is the coefficient of static friction), and its sign is such as to oppose the sliding motion. Unlike the forces in 6 above, itis a dissipative force. 9. A free-body diagramis a way to depictall (and only)t h ef o r c e sacting on an object. The",University Physics I Classical Mechanics.pdf "9. A free-body diagramis a way to depictall (and only)t h ef o r c e sacting on an object. The object should be represented as a small circle or dot. The forces should all be drawn as vectors originating on the dot, with their directions correctly shown and their lengths approximately to scale. The acceleration of the object should also be indicated elsewhere in the picture. The forces should be labeled like this:Ftype by,on.",University Physics I Classical Mechanics.pdf "6.6. EXAMPLES 129 6.6 Examples 6.6.1 Dropping an object on a weighing scale (Short version) Suppose you drop a 5-kg object on a spring scale from a height of 1 m. If the spring constant isk =2 0, 000 N/m, what will the scale read? (Long version) OK, let’s break that up into parts. Suppose that a spring scale is just a platform (of negligible mass) sitting on top of a spring. If you put an object of massm on top of it, the spring compresses so that (in equilibrium) it exerts an upwards force that matches that of gravity. (a) If the spring constant isk and the object’s mass ism and the whole system is at rest, what distance is the spring compressed? (b) If you drop the object from a heighth,w h a ti st h e( i n s t a n t a n e o u s )maximum compression of the spring as the object is brought to a momentary rest? (Thispart is anenergy problem! Assume that h is much greater than the actual compression of the spring, soyou can neglect that when",University Physics I Classical Mechanics.pdf "that h is much greater than the actual compression of the spring, soyou can neglect that when calculating the change in gravitational potential energy.) (c) What mass would give you that same compression, if you weret op l a c ei tg e n t l yo nt h es c a l e , and wait until all the oscillations died down? (d) OK, now answer the question at the top! Solution (a) The forces acting on the object sitting at rest on the platform are the force of gravity,FG E,o = −mg,a n dt h en o r m a lf o r c ed u et ot h ep l a t f o r m ,Fn p,o.T h i s l a s t f o r c e i s e q u a l , i n m a g n i t u d e , t o the force exerted on the platform by the spring (it has to be, because the platform itself is being pushed down by a forceFn o,p = −Fn p,o,a n dt h i sh a st ob eb a l a n c e db yt h es p r i n gf o r c e ) . T h i sm e a n s we can, for practical purposes, pretend the platform is not there and just set the upwards force on the object equal to the spring force,Fspr",University Physics I Classical Mechanics.pdf "we can, for practical purposes, pretend the platform is not there and just set the upwards force on the object equal to the spring force,Fspr s,p = −k(x − x0). So, Newton’s second law gives Fnet = FG E,o + Fspr s,p = ma =0 ( 6 . 3 3 ) For a compressed spring,x − x0 is negative, and we can just letd = x0 − x be the distance the spring is compressed. Then Eq. (6.33)g i v e s −mg + kd =0 so d = mg/k (6.34) when you just set an object on the scale and let it come to rest. (b) This part, as the problem says, is a conservation of energys i t u a t i o n . T h es y s t e mf o r m e db y the spring, the object and the earth starts out with some gravitational potential energy, and ends",University Physics I Classical Mechanics.pdf "130 CHAPTER 6. INTERACTIONS, PART 2: FORCES up, with the object momentarily at rest, with only spring potential energy: UG i + Uspr i = UG f + Uspr f mgyi +0= mgyf + 1 2kd2 max (6.35) where I have used the subscript “max” on the compression distance to distinguish it from what Ic a l c u l a t e di np a r t( a )( t h i sk i n do fm a k e ss e n s ea l s ob e c a u set h es c a l ei sg o i n gt os w i n gu pa n d down, and we want only the maximum compression, which will give us the largest reading). The problem said to ignore the compression when calculating thechange in UG,m e a n i n gt h a t ,i fw e measure height from the top of the scale,yi = h and yf =0 . T h e n ,s o l v i n gE q .(6.35)f o rdmax,w e get dmax = √ 2mgh k (6.36) (c) For this part, let us rewrite Eq. (6.34)a s meq = kdmax/g,w h e r emeq is the “equivalent” mass that you would have to place on the scale (gently) to get the same reading as in part (b). Using then Eq. (6.36), meq = k g √ 2mgh k = √ 2mkh g (6.37)",University Physics I Classical Mechanics.pdf "then Eq. (6.36), meq = k g √ 2mgh k = √ 2mkh g (6.37) (d) Now we can substitute the values given:m =5 k g ,h =1 m ,k =2 0, 000 N/m. The result is meq =1 4 3k g . (Note: if you found the purely algebraic treatment above confusing, try substituting numerical values in Eqs. (6.34)a n d(6.36). The first equation tells you that if you just place the 5-kg mass on the scale it will compress a distanced =2 .45 mm. The second tells you that if you drop it it will compress the spring a distancedmax =7 0 m m ,a b o u t2 8.6t i m e sm o r e ,w h i c hc o r r e s p o n d st o an “equivalent mass” 28.6t i m e sg r e a t e rt h a n5 k g ,w h i c hi st os a y ,1 4 3 k g .N o t ea l s ot h at1 4 3 k gi s an equivalent weight of 309 pounds, so if you want to try this onab a t h r o o ms c a l eI ’ da d v i s ey o u to use smaller weights and drop them from a much smaller height!) 6.6.2 Speeding up and slowing down",University Physics I Classical Mechanics.pdf "to use smaller weights and drop them from a much smaller height!) 6.6.2 Speeding up and slowing down (a) A 1400-kg car, starting from rest, accelerates to a speedof 30 mph in 10 s. What is the force on the car (assumed constant) over this period of time? (b) Where does this force comes from? That is, what is the (external) object that exerts this force on the car, and what is the nature of this force? (c) Draw a free-body diagram for the car. Indicate the direction of motion, and the direction of the acceleration. (d) Now assume that the driver, travelingat 30 mph, sees a red light ahead and",University Physics I Classical Mechanics.pdf "6.6. EXAMPLES 131 pushes on the brake pedal. Assume that the coefficient of staticf r i c t i o nb e t w e e nt h et i r e sa n dt h e road is µs =0 .7, and that the wheels don’t “lock”: that is to say, they continue rolling without slipping on the road as they slow down. What is the car’s minimum stopping distance? (e) Draw a free-body diagram of the car for the situation in (d). Again indicate the direction of motion, and the direction of the acceleration. (f) Now assumet h a tt h ed r i v e ra g a i nw a n t st os t o p as in part (c), but he presses on the brakes too hard, so the wheels lock, and, moreover, the road is wet, and the coefficient of kinetic friction is onlyµk =0 .2. What is the distance the car travels now before coming to a stop? Solution (a) First, let us convert 30 mph to meters per second. There are1 , 609 meters to a mile, and 3, 600 seconds to an hour, so 30 mph = 10× 1609/3600 m/s = 13.4m / s .",University Physics I Classical Mechanics.pdf "seconds to an hour, so 30 mph = 10× 1609/3600 m/s = 13.4m / s . Next, for constant acceleration, we can use Eq. (2.4): ∆v = a∆t.S o l v i n gf o ra, a = ∆v ∆t = 13.4m / s 10 s =1 .34 m s2 Finally, sinceF = ma,w eh a v e F = ma =1 4 0 0k g× 1.34 m s2 =1 8 8 0N (b) The force must be provided by the road, which is the only thing external to the car that is in contact with it. The force is, in fact, the force ofstatic friction between the car and the tires. As explained in the chapter, this is a reaction force (the tirespush on the road, and the road pushes back). It is static friction because the tires are not slipping relative to the road. In fact, we will see in Chapter 9 that the point of the tire in contact with the road has an instantaneous velocity of zero (see Figure9.8). (c) This is the free-body diagram. Note the force of static friction pointingforward,i nt h ed i r e c t i o n of the acceleration. The forces have been drawn to scale. Fr,c s Fr,c n FE,c G a v",University Physics I Classical Mechanics.pdf "132 CHAPTER 6. INTERACTIONS, PART 2: FORCES (d) This is the opposite of part (a): the driver now relies on the force of static friction toslow down the car. The shortest stopping distance will correspond to the largest (in magnitude) acceleration, as per our old friend, Eq. (2.10): v2 f − v2 i =2 a∆x (6.38) In turn, the largest acceleration will correspond to the largest force. As explained in the chapter, the static friction force cannot exceedµsFn (Eq. (6.29)). So, we have Fs max = µsFn = µsmg since, in this case, we expect the normal force to be equal to the force of gravity. Then |amax| = Fs max m = µsmg m = µsg We can substitute this into Eq. (6.38)w i t han e g a t i v es i g n ,s i n c et h ea c c e l e r a t i o na c t si nt h eo p posite direction to the motion (and we are implicitly taking the direction of motion to be positive). Also note that the final velocity we want is zero,vf =0 . W eg e t −v2 i =2 a∆x = −2µsg∆x From here, we can solve for ∆x: ∆x = v2 i",University Physics I Classical Mechanics.pdf "note that the final velocity we want is zero,vf =0 . W eg e t −v2 i =2 a∆x = −2µsg∆x From here, we can solve for ∆x: ∆x = v2 i 2µsg = (13.4m / s )2 2 × 0.7 × 9.81 m/s2 =1 3.1m (e) Here is the free-body diagram. The interesting feature is that the force of static friction has re- versed direction relative to parts (a)–(c). It is also much larger than before. (The forces are again to scale.) Fr,c s Fr,c n FE,c G a v (f) The math for this part is basically identical to that in part (d). The difference, physically, is that now you are dealing with the force ofkinetic (or “sliding”) friction, and that is always given by Fk = µkFn (this is not an upper limit, it’s just whatFk is). So we havea = −Fk/m = −µkg, and, just as before (but withµk replacing µs), ∆x = v2 i 2µkg = (13.4m / s )2 2 × 0.2 × 9.81 m/s2 =4 5.8m",University Physics I Classical Mechanics.pdf "6.6. EXAMPLES 133 This is a huge distance, close to half a football field! If thesen u m b e r sa r ea c c u r a t e ,y o uc a ns e e that locking your brakes in the rain can have some pretty bad consequences.",University Physics I Classical Mechanics.pdf "134 CHAPTER 6. INTERACTIONS, PART 2: FORCES 6.7 Problems Problem 1 (a) Draw a free-body diagram for the skydiver in Problem 4 of Chapter 5. (b) What is the magnitude of the air drag force on the skydiver,a f t e rh er e a c h e st e r m i n a ls p e e d ? Problem 2 Ab o o ki ss e n ts l i d i n ga l o n gat a b l ew i t ha ni n i t i a lv e l o c i t yof2 m / s . I ts l i d e sf o r1.5m be f o r e coming to a stop. What is the coefficient of kinetic friction between the book and the table? Problem 3 You are pulling on a block of mass 4 kg that is attached, via a rope of negligible mass, to another block, of mass 6 kg. The coefficient of kinetic friction betweent h eb l o c k sa n dt h es u r f a c eo nw h i c h they are sliding isµk.Y o u fi n d t h a t w h e n y o u a p p l y a f o r c e o f 2 0 N , t h e w h o l e t h i n g m o ves at constant velocity. (a) Draw a free-body diagram for each of the two blocks (b) What is the coefficient of kinetic friction between the blocks and the surface?",University Physics I Classical Mechanics.pdf "(a) Draw a free-body diagram for each of the two blocks (b) What is the coefficient of kinetic friction between the blocks and the surface? (c) What is the tension in the rope? Problem 4 Ab o xo fm a s s2 k gi ss i t t i n go nt o po fas l e do fm a s s5 k g ,w h i c hi sresting on top of a frictionless surface (ice). (a) What is the normal force exerted by the box on the sled? (Andb yt h es l e db a c ko nt h eb o x . ) (b) If you pull on the sled with a force of 35 N, how large does thec o e ffi c i e n to fs t a t i cf r i c t i o n , µs,b e t w e e nt h eb o xa n dt h es l e dh a v et ob e ,i no r d e rf o rt h eb o xt omove with the sled? Draw free-body diagrams for the box and for the sled under this assumption (that they move together). (c) Suppose thatµs is less than the value you got in part (b), so the box starts to slide back (relative to the sled). If the coefficient of kinetic frictionµk between the box and the sled is 0.15, what is",University Physics I Classical Mechanics.pdf "to the sled). If the coefficient of kinetic frictionµk between the box and the sled is 0.15, what is the acceleration of the sled, and what is the acceleration ofthe box, while they are sliding relative to each other (so, before the box falls off, and while you are still pulling with a 35-N force)? Draw again the free-body diagrams appropriate to this situation. Problem 5 You stick two ob jects together, one with a mass of 10 kg and onewith a mass of 5 kg, using a glue that is supposed to be able to provide up to 19 N of force beforeit fails. Suppose you then pull on the 10 kg block with a force of 30 N. (a) What is the acceleration of the whole system? (b) What is the force exerted on the 5 kg block, and where does itc o m ef r o m ?D o e st h eg l u eh o l d ? (c) Now suppose you pull on the 5 kg block instead with the sameforce. Does the glue hold this time?",University Physics I Classical Mechanics.pdf "6.7. PROBLEMS 135 Problem 6 Draw a free-body diagram for a 70-kg person standing in an elevator carrying a 15-kg backpack (do not consider the backpack a part of the person!). (a) if the elevator is not moving, and (b) if the elevator is accelerating downwards at 2 m/s2.I n e a c h c a s e , w h a t i s t h e m a g n i t u d e o f t h e n o r m a l force exerted on the person by the floor?",University Physics I Classical Mechanics.pdf "136 CHAPTER 6. INTERACTIONS, PART 2: FORCES",University Physics I Classical Mechanics.pdf "Chapter 7 Impulse, Work and Power 7.1 Introduction: work and impulse In physics, “work” (or “doing work”) is what we call the process through which a force changes the energy of an object it acts on (or the energy of a system to which the object belongs). It is, therefore, a very technical term with a very specific meaningthat may seem counterintuitive at times. For instance, as it turns out, in order to change the energy ofan object on which it acts, the force needs to be at least partly in line with the displacement of theo b j e c td u r i n gt h et i m ei ti sa c t i n g . Af o r c et h a ti sp e r p e n d i c u l a rt ot h ed i s p l a c e m e n td o e sn ow o rk—it does not change the object’s energy. Imagine a satellite in a circular orbit around the earth. Theearth is constantly pulling on it with af o r c e( g r a v i t y )d i r e c t e dt o w a r d st h ec e n t e ro ft h eo r b i ta tany given time. This force is always",University Physics I Classical Mechanics.pdf "af o r c e( g r a v i t y )d i r e c t e dt o w a r d st h ec e n t e ro ft h eo r b i ta tany given time. This force is always perpendicular to the displacement, which is along the orbit,a n ds oi td o e sn ow o r k : t h es a t e l l i t e moves always at the same speed, so its kinetic energy does notchange. The force does change the satellite’s momentum, however: it keeps bendingthe trajectory, and therefore changing the direction (albeit not the magnitude)o ft h es a t e l l i t e ’ sm o m e n t u mv e c t o r . O f course, it is obvious that a force must change an object’s momentum, because that is pretty much how we defined force anyway. Recall Eq. (6.1) for the average force on an object: ⃗Fav =∆ ⃗p /∆t. We can rearrange this to read ∆⃗p= ⃗Fav∆t (7.1) For a constant force, the product of the force and the time overw h i c hi ti sa c t i n gi sc a l l e dt h e 137",University Physics I Classical Mechanics.pdf "138 CHAPTER 7. IMPULSE, WORK AND POWER impulse,u s u a l l yd e n o t e da s⃗J ⃗J = ⃗F ∆t (7.2) Clearly, the impulse given by a force to an object is equal to the change in the object’s momentum (by Eq. (7.1)), as long as it is the only force (or, alternatively, the netforce) acting on it. If the force is not constant, we break up the time interval ∆t into smaller subintervals and add all the pieces, pretty much as we did with Figure1.5 in Chapter 1 in order to calculate the displacement for a variable velocity. Formally this results in an integral: ⃗J = ∫ tf ti ⃗F(t) dt (7.3) Graphically, thex component of the impulse is equal to the area under the curve of Fx versus time, and similarly for the other components. You will get to see howi tw o r k si nal a be x p e r i m e n tt h i s semester. There is not a whole lot more to be said about impulse. The mainlesson to be learned from Eq. (7.1) is that one can get a desired change in momentum—bring an object to a stop, for instance—either",University Physics I Classical Mechanics.pdf "is that one can get a desired change in momentum—bring an object to a stop, for instance—either by using a large force over a short time, or a smaller force overal o n g e rt i m e . I ti se a s yt os e e how different circumstances may call for different strategies:sometimes you may want to make the force as small as possible, if the object on which you are acting is particularly fragile; other times you may just need to make the time as short as possible instead. Of course, to bring something to a stop you not only need to remove its momentum, but also its (kinetic) energy. If the former task takes time, the latter,it turns out, takesdistance.W o r k i s am u c hr i c h e rs u b j e c tt h a ni m p u l s e ,n o to n l yb e c a u s e ,a sIh a vei n d i c a t e da b o v e ,t h ea c t u a lw o r k done depends on the relative orientation of the force and displacement vectors, but also because",University Physics I Classical Mechanics.pdf "done depends on the relative orientation of the force and displacement vectors, but also because there is only one kind of momentum, but many different kinds of energy, and one of the things that typically happens when work is done is theconversion of one type of energy into another. So there is a lot of ground to cover, but we’ll start small, in the next section, with the simplest kind of system, and the simplest kind of energy. 7.2 Work on a single particle Consider a particle that undergoes a displacement ∆x while a constant forceF acts on it. In one dimension, thework done by the force on the particle is defined by W = F∆x (constant force) (7.4) and it is positive if the force and the displacement have the same sign (that is, if they point in the same direction), and negative otherwise.",University Physics I Classical Mechanics.pdf "7.2. WORK ON A SINGLE PARTICLE 139 In three dimensions, the force will be a vector⃗F with components (Fx,F y,F z), and the displacement, likewise, will be a vector ∆⃗rwith components (∆x, ∆y, ∆z). The work will be defined then as W = Fx∆x + Fy∆y + Fz∆z (7.5) This expression is an instance of what is known as thedot product (or inner product,o r scalar product)o ft w ov e c t o r s .G i v e nt w ov e c t o r s⃗A and ⃗B,t h e i rd o tp r o d u c ti sd e fi n e d ,i nt e r m so ft h e i r components, as ⃗A · ⃗B = AxBx + AyBy + AzBz (7.6) This can also be expressed in terms of the vectors’ magnitudes, | ⃗A| and | ⃗B|,a n dt h ea n g l et h e y make, in the following form: ⃗A · ⃗B = | ⃗A|| ⃗B| cos φ (7.7) A ¶ B Figure 7.1: Illustrating the angle φ to be used when calculating the dot product of two vectors by the formula (7.7). One way to think of this formula is that you take the projection ofvector ⃗A onto vector ⃗B",University Physics I Classical Mechanics.pdf "formula (7.7). One way to think of this formula is that you take the projection ofvector ⃗A onto vector ⃗B (indicated here by the blue lines), which is equal to| ⃗A| cos φ, then multiply that by the length of⃗B (or vice-versa, of course). Figure 7.1 shows what I mean by the angleφ in this expression. The equality of the two definitions, Eqs. (7.6)a n d(7.7), is proved in mathematics textbooks. The advantage of Eq. (7.7)i st h a ti ti s independent of the choice of a system of coordinates. Using the dot product notation, the work done by a constant force can be written as W = ⃗F · ∆⃗r (7.8) Equation (7.7)t h e ns h o w st h a t ,a sIm e n t i o n e di nt h ei n t r o d u c t i o n ,w h e nt hef o r c ei sp e r p e n d i c u l a r to the displacement (φ =9 0◦)t h ew o r ki td o e si sz e r o . Y o uc a na l s os e et h i sd i r e c t l yf r o mEq. (7.5), by choosing thex axis to point in the direction of the force (soFy = Fz =0 ) ,a n dt h ed i s p l a c e m e n t",University Physics I Classical Mechanics.pdf "by choosing thex axis to point in the direction of the force (soFy = Fz =0 ) ,a n dt h ed i s p l a c e m e n t to point along any of the other two axes (so ∆x =0 ) : t h er e s u l ti sW =0 . If the force is not constant, again we follow the standard procedure of breaking up the total displacement into pieces that are short enough that the forcem a yb et a k e nt ob ec o n s t a n to v e r",University Physics I Classical Mechanics.pdf "140 CHAPTER 7. IMPULSE, WORK AND POWER each of them, calculating all those (possibly very small) “pieces of work,” and adding them all together. In one dimension, the final result can be expressedas the integral W = ∫ xf xi F(x)dx (variable force) (7.9) So the work is given by the “area” under theF-vs-x curve. In more dimensions, we have to write ak i n do fm u l t i v a r i a b l ei n t e g r a lk n o w na saline integral.T h a t i sa d v a n c e dc a l c u l u s ,s o w e w i l ln o t go there this semester. 7.2.1 Work done by the net force, and the Work-Energy Theorem So much for the math and the definitions. Where does the energycome in? Let us suppose that F is either the only force or thenet force on the particle—the sum of all the forces acting on the particle. Again, for simplicity we will assume that it isconstant (does not change) while the particle undergoes the displacement ∆x.H o w e v e r , n o w ∆x and Fnet are related: a constant net",University Physics I Classical Mechanics.pdf "particle undergoes the displacement ∆x.H o w e v e r , n o w ∆x and Fnet are related: a constant net force means a constant acceleration,a = Fnet/m,a n df o rc o n s t a n ta c c e l e r a t i o nw ek n o wt h ef o r m u l a v2 f − v2 i =2 a∆x applies. Therefore, we can write Wnet = Fnet∆x = ma∆x = m1 2 ( v2 f − v2 i ) (7.10) which is to say Wnet =∆ K (7.11) In words,the work done by the net force acting on a particle as it moves equals the change in the particle’s kinetic energy in the course of its displacement.T h i s r e s u l t i s o f t e n r e f e r r e d t o a sthe Work-Energy Theorem. As you may have guessed from our calling it a “theorem,” the result (7.11)i sv e r yg e n e r a l . I th o l d s in three dimensions, and it holds also when the force isn’t constant throughout the displacement— you just have to use the correct equation to calculate the worki nt h o s ec a s e s . I tw o u l da p p l yt o",University Physics I Classical Mechanics.pdf "you just have to use the correct equation to calculate the worki nt h o s ec a s e s . I tw o u l da p p l yt o the work done by the net force on an extended object, also, provided it is OK to treat the extended object as a particle—so basically, a rigid object that is moving as a whole and not doing anything fancy such as spinning while doing so. Another possible direction in which to generalize (7.11)m i g h tb ea sf o l l o w s . B yd e fi n i t i o n ,a “particle” has no other kind of energy, besides (translational) kinetic energy. Also, and for the same reason (namely, the absence of internal structure), ithas no “internal” forces—all the forces acting on it are external. So—for this very simple system—wecould rephrase the result (7.11)b y saying that the work done by the netexternal force acting on the system (the particle in this case) is equal to the change in itstotal energy. It is in fact in this form that we will ultimately generalize",University Physics I Classical Mechanics.pdf "is equal to the change in itstotal energy. It is in fact in this form that we will ultimately generalize (7.11)t od e a lw i t ha r b i t r a r ys y s t e m s .",University Physics I Classical Mechanics.pdf "7.3. THE “CENTER OF MASS WORK” 141 Before we go there, however, I would like to take a little detour to explore another “reasonable” extension of the result (7.11), as well as its limitations. 7.3 The “center of mass work” All the physics I used in order to derive the result (7.11)w a sF = ma,a n dt h ee x p r e s s i o nv2 f −v2 i = 2a∆x,w h i c ha p p l i e sw h e n e v e rw eh a v em o t i o nw i t hc o n s t a n ta c c e l eration. Now, we know that for an arbitrary system, of total massM, Fext,net = Macm [see Eq. (6.11)]. That is enough, then, to ensure that, ifFext,net is a constant, we will have Fext,net∆xcm =∆ Kcm (7.12) where Kcm,t h et r a n s l a t i o n a lk i n e t i ce n e r g y ,i s ,a su s u a l ,Kcm = 1 2 Mv2 cm,a n d∆xcm is the displace- ment of the center of mass. The result (7.12)h o l d sf o ra na r b i t r a r ys y s t e m ,a sl o n ga sFext,net is constant, and can be generalized by means of an integral (as inE q .(7.9)) when it is variable.",University Physics I Classical Mechanics.pdf "constant, and can be generalized by means of an integral (as inE q .(7.9)) when it is variable. So it seems that we could define the left-hand side of Eq. (7.12)a s“ t h ew o r kd o n eo nt h ec e n t e ro f mass,” and take that as the natural generalization to a systemo ft h er e s u l t(7.11)f o rap a r t i c l e . Most physicists would, in fact, be OK with that, but educatorsn o w a d a y sf r o w no nt h a ti d e a ,f o ra couple of reasons. First, it seems that it is essential to the notion of work thatone should multiply the force by the displacement of the object on which it is acting.M o r e p r e c i s e l y , i n t h e d e fi n i t i o n (7.4), we want the displacementof the point of applicationof the force1.B u t t h e r ea r e m a n ye x a m p l e so fs y s t e m s where there is nothing at the precise location of the center ofm a s s ,a n dc e r t a i n l yn of o r c ea c t i n g precisely there.",University Physics I Classical Mechanics.pdf "where there is nothing at the precise location of the center ofm a s s ,a n dc e r t a i n l yn of o r c ea c t i n g precisely there. This is not necessarily a problem in the case of a rigid objectwhich is not doing anything funny, just moving as a whole so that every part has the same displacement,b e c a u s et h e nt h ed i s p l a c e m e n to f the center of mass would simply stand for the displacement ofany point at which an external force might actually be applied. But for manydeformable systems, this would not be case. In fact, for such systems one can usually show thatFext,net∆xcm is actuallynot the work done on the system by the net external force. A simple example of such a system isshown below, in Figure7.2. 1As the name implies, this is the precise point at which the force is applied. For contact forces (other than friction; see later), this is easily identified. For gravity, a sum overall the forces exerted on all the particles that make up the",University Physics I Classical Mechanics.pdf "see later), this is easily identified. For gravity, a sum overall the forces exerted on all the particles that make up the object may be shown to be equivalent to a single resultant force acting at a point called thecenter of gravity,w h i c h , for our purposes (objects in uniform or near-uniform gravitational fields) will be the same as the center of mass.",University Physics I Classical Mechanics.pdf "142 CHAPTER 7. IMPULSE, WORK AND POWER Fs,2 spr Fs,1 spr Fh,2 c Fh,2 c ∆x1 ∆x2∆xcm 1 1 2 2 Figure 7.2: A system of two blocks connected by a spring. A constant externalf o r c e ,⃗Fc h,2, is applied to the block on the right. Initially the spring is relaxed, but as soon as block 2starts to move it stretches, pulling back on block 2 and pulling forward on block 1. Because of the stretching of the spring, the displacements ∆x1,∆ xcm and ∆x2 are all different, and the work done by the external force,Fc h,2∆x2, is different from the “center of mass work”Fc h,2∆xcm. In this figure, the two blocks are connected by a spring, and thee x t e r n a lf o r c ei sa p p l i e dt ot h e block on the right (block 2). If the blocks have the same mass,the center of mass of the system is a point exactly halfway between them. If the spring startsin its relaxed state, it will stretch at first, so that the center of mass will lag behind block 2, andFc h,2∆x2,w h i c hi st h eq u a n t i t yt h a t",University Physics I Classical Mechanics.pdf "first, so that the center of mass will lag behind block 2, andFc h,2∆x2,w h i c hi st h eq u a n t i t yt h a t we should properly call the “work done by the net external force” willnot be equal toFc h,2∆xcm. We find ourselves, therefore, with a very general and p otentially rather useful result, Eq. (7.12), that looks a lot like it should be “the work done on the system byt h en e te x t e r n a lf o r c e ”b u t ,i n fact, is that only sometimes. On the other hand, the result isso useful that simply referring to it all the time by “Eq. (7.12)” will not do. I propose, therefore, to call it the “center ofmass work,” in between quotation marks, just so we all know what we are talking about, and remember the caveats that go with it. We can now move to thereal theorem relating the work of the external forces on a system to the change in its energy. What we have seen so far are really just straightforward applications",University Physics I Classical Mechanics.pdf "the change in its energy. What we have seen so far are really just straightforward applications of Newton’s second law. The main result coming up is deeper than that, since it involves also, ultimately, the principle of conservation of energy. 7.4 Work done on a system by all the external forces Consider the most general possible system, one that might contain any number of particles, with possibly many forces, both internal and external, acting oneach of them. I will again, for simplicity,",University Physics I Classical Mechanics.pdf "7.4. WORK DONE ON A SYSTEM BY ALL THE EXTERNAL FORCES 143 start by considering what happens over a time interval so short that all the forces are approximately constant (the final result will hold for arbitrarily long timei n t e r v a l s ,j u s tb ya d d i n g ,o ri n t e g r a t i n g , over many such short intervals). I will also work explicitlyonly the one-dimensional case, although again that turns out to not be a real restriction. Let then Wall,1 be the work done on particle 1 by all the forces acting on it,Wall,2 the work done on particle 2, and so on. The total work is the sumWall,sys = Wall,1 + Wall,2 + ... .H o w e v e r , by the results of section 7.2, we haveWall,1 =∆ K1 (the change in kinetic energy of particle 1), Wall,2 =∆ K2,a n ds oo n ,s oa d d i n ga l lt h e s eu pw eg e t Wall,sys =∆ Ksys (7.13) where ∆Ksys is the change in kinetic energy of the whole system. So far, of course, this is nothing new. To learn something elsew en e e dt ol o o kn e x ta tt h ew o r k",University Physics I Classical Mechanics.pdf "So far, of course, this is nothing new. To learn something elsew en e e dt ol o o kn e x ta tt h ew o r k done by the internal forces. It is helpful here to start by considering the “no-dissipation case” in which all the internal forces can be derived from a potentialenergy2.W e w i l l c o n s i d e r t h e c a s e where dissipative processes happen inside the system afterwe have gained a full understanding of the result we will obtain for this simpler case. 7.4.1 The no-dissipation case The internal forces are, by definition, forces that arise fromt h ei n t e r a c t i o n sb e t w e e np a i r so f particles that are both inside the system. Because of Newton’s 3rd law, the forceF12 (we will omit the “type” superscript for now) exerted by particle 1 on particle 2 must be the negative ofF21,t h e force exerted by particle 2 on particle 1. Hence, the work associated with this interaction for this pair of particles can be written W(1, 2) =F12∆x2 + F21∆x1 = F12 (∆x2 − ∆x1)( 7 . 1 4 )",University Physics I Classical Mechanics.pdf "pair of particles can be written W(1, 2) =F12∆x2 + F21∆x1 = F12 (∆x2 − ∆x1)( 7 . 1 4 ) Notice that ∆x2 − ∆x1 can be rewritten asx2,f − x2,i − x1,f + x1,i = x12,f − x12,i =∆ x12,w h e r e x12 = x2 − x1 is the relative position coordinate of the two particles. Therefore, W(1, 2) =F12∆x12 (7.15) Now, if the interaction in question is associated with a potential energy, as I showed in section 6.2, F12 = −dU/dx12.A s s u m et h ed i s p l a c e m e n t∆x12 is so small that we can replace the derivative by just the ratio ∆U/∆x12 (which is consistent with our assumption that the force is approximately constant over the time interval considered); the result willt h e nb e W(1, 2) =F12∆x12 ≃− ∆U ∆x12 ∆x12 = −∆U (7.16) 2Or else they do no work at all: the magnetic force between moving charges is an example of the latter.",University Physics I Classical Mechanics.pdf "144 CHAPTER 7. IMPULSE, WORK AND POWER Adding up very many such “infinitesimal” displacements willlead to the same final result, where ∆U will be the change in the potential energy over the whole process. This can also be proved using calculus, without any approximations: W(1, 2) = ∫ x12,f x12,i F12dx12 = − ∫ x12,f x12,i dU dx12 dx12 = −∆U. (7.17) We can apply this to every pair of particles and every internali n t e r a c t i o n ,a n dt h e na d du pa l lt h e results. On one side, we will get the total work done on the system by all the internal forces; on the other side, we will get the negative of the change in the system’s total internal energy: Wint,sys = −∆Usys. (7.18) In words, the work done by all the (conservative) internal forces is equal to the change in the system’s potential energy. Let us now put Eqs. (7.13)a n d(7.18) together: the difference between the work done by all the forces and the work done by the internal forces is, of course,the work done by theexternal forces,",University Physics I Classical Mechanics.pdf "forces and the work done by the internal forces is, of course,the work done by theexternal forces, but according to Eqs. (7.13)a n d(7.18), this is equal to Wext,sys = Wall,sys − Wint,sys =∆ Ksys +∆ Usys (7.19) which is the change in the totalmechanical (kinetic plus potential) energy of the system. If we further assume that the system, in the absence of the externalf o r c e s ,i sc l o s e d ,t h e nt h e r ea r en o other processes (such as the absorption of heat) by which thetotal energy of the system might change, and we get the simple result thatthe work done by the external forces equals the change in the system’s total energy: Wext,sys =∆ Esys (7.20) As a first application of the result (7.20), consider again the blocks connected by a spring shown in Fig. 2. You can see now why the work done by the external forceFc h,2 has to be different, and in fact larger, than the “center of mass work”: the latter only gives us the change in thetranslational",University Physics I Classical Mechanics.pdf "h,2 has to be different, and in fact larger, than the “center of mass work”: the latter only gives us the change in thetranslational energy, but the former has to give us the change in thetotal energy—translational, convertible, and potential: Fc h,2∆xcm =∆ Kcm Fc h,2∆x2 =∆ Kcm +∆ Kconv +∆ Uspr (7.21) As another example, imagine you throw a ball of massm upwards (see Figure7.3,n e x tp a g e ) ,a n d it reaches a maximum heighth above the point where your hand started to move. Let us define the system to be the ball and the earth, so the force exerted byyour hand is an external force. Then you do work on the system during the throw, which in the figure is the interval, from A to B, during which your hand is on contact with the ball. The bar diagram on the side shows that some of this work goes into increasing the system’s (gravitational) potential energy (because the",University Physics I Classical Mechanics.pdf "7.4. WORK DONE ON A SYSTEM BY ALL THE EXTERNAL FORCES 145 ball goes up a little while in contact with your hand), and therest, which is typically most of it, goes into increasing the system’s kinetic energy (in this case, just the ball’s; the earth’s kinetic energy does not change in any measurable way!). A B C rising, from A to C ∆K ∆U Wext falling, from C to B ∆K ∆U Wext the throw, from A to B ∆K ∆U Wext h Figure 7.3: Tossing a ball into the air. We consider the system formed by the balland the earth. The force exerted by the hand (which is in contact with the ball from point A to point B) is therefore an external force. The diagrams show the system’s energy balance over threedifferent intervals. So how much work did you actually do? If we knew the distance from A to B, and the magnitude of the force you exerted, and if we could assume that your forcew a sc o n s t a n tt h r o u g h o u t ,w ec o u l d",University Physics I Classical Mechanics.pdf "of the force you exerted, and if we could assume that your forcew a sc o n s t a n tt h r o u g h o u t ,w ec o u l d calculate W from the definition (7.4). But in this case, and many others like it, it is actually easier to find out how much total energy the system gained and just use Eq. (7.20). To find ∆E in",University Physics I Classical Mechanics.pdf "146 CHAPTER 7. IMPULSE, WORK AND POWER practice, all we have to do is see how high the ball rises. At theb a l l ’ sm a x i m u mh e i g h t( p o i n tC ) , as the second diagram shows, all the energy in the system is gravitational potential energy, and (as long as the system stays closed), all that energy is still equal to the work you did initially, so if the distance from A to C ish you must have done an amount of work Wyou =∆ UG = mgh (7.22) The third diagram in Figure7.3 shows the work-energy balance for another time interval, during which the ball falls from C to B. Over this time, noexternal forces act on the ball (recall we have taken the system to be the ball and the earth, so gravity is aninternal force). Then, the work done by the external forces is zero, and the change in the total energy of the system is also zero. The diagram just shows an increase in kinetic energy at the expense of an equal decrease in potential energy.",University Physics I Classical Mechanics.pdf "diagram just shows an increase in kinetic energy at the expense of an equal decrease in potential energy. What about the work done by theinternal forces? Eq. (7.18)t e l l su st h a tt h i sw o r ki se q u a lt o the negative of the change in potential energy. In this case,the internal force is gravity, and the corresponding energy is gravitational potential energy. This change in potential energy is clearly visible in all the diagrams; however, when you add to it the change in kinetic energy, the result is always equal to the work done by the external forceonly.P u t o t h e r w i s e , t h e i n t e r n a l f o r c e s d o not change the system’s total energy, they just “redistribute” it among different kinds—as in, for instance, the last diagram in Fig.7.3,w h e r ey o uc a nc l e a r l ys e et h a tg r a v i t yi sc a u s i n gt h ek i n e t ic energy of the system to increase at the expense of the potential energy.",University Physics I Classical Mechanics.pdf "energy of the system to increase at the expense of the potential energy. We will use diagrams like the ones in Figure7.3 to look at the work-energy balance for different systems. The idea is that the sum of all the columns on the left(the change in the system’s total energy) has to equal the result on the far-right column (the work done by the net external force): that is the content of the theorem (7.20). Note that, unlike the energy diagrams we used in Chapter 5, these columns representchanges in the energy, so they could be positive or negative. Just as for the earlier energy diagrams, the picture we get will be different, even for the same physical situation, depending on the choice of system. Thisis illustrated in Figure7.4 below (next page), where I have taken the same throw shown in Fig.7.3,b u tn o wt h es y s t e mI ’ ml o o k i n ga ti s the ball only. This means gravity is now an external force, asis the force of the hand, and the ball",University Physics I Classical Mechanics.pdf "the ball only. This means gravity is now an external force, asis the force of the hand, and the ball only has kinetic energy. Normally one would show the sum of thew o r kd o n eb yt h et w oe x t e r n a l forces on a single column, but here I have chosen to break it upinto two columns for clarity. As you can see, during the throw the hand does positive work, whereas gravity does a comparatively small amount of negative work, and the change in kinetic energy is the sum of the two. For the longer interval from A to C (second diagram), gravity continues to do negative work until all the kinetic energy of the ball is gone. For the interval from C to B,t h eo n l ye x t e r n a lf o r c ei sg r a v i t y , which now does positive work, equal to the increase in the ball’s kinetic energy.",University Physics I Classical Mechanics.pdf "7.4. WORK DONE ON A SYSTEM BY ALL THE EXTERNAL FORCES 147 the throw, from A to B ∆K Wgrav Whand rising, from A to C ∆K WhandWgrav } Wext } Wext ∆K WhandWgrav} Wext falling, from C to B Figure 7.4: Work-energy balance diagrams for the same toss illustrated in Fig.7.3, but now the system is taken to be the ball only. Of course, the numerical value of the actual work done by any particular force does not depend on our choice of system: in each case, gravity does the same amount of work in the processes illustrated in Fig. 7.4 as in those illustrated in Fig.7.3. The difference, however, is that for the system in Fig. 7.4,g r a v i t yi sa ne x t e r n a lf o r c e ,a n dn o wt h ew o r ki td o e sa c t u a lly changes the system’s total energy, because the gravitational potential energy is nownot included in that total. Formally, it works like this: in the case shown in Fig.7.3,w h e r et h es y s t e mi st h eb a l la n dt h e",University Physics I Classical Mechanics.pdf "Formally, it works like this: in the case shown in Fig.7.3,w h e r et h es y s t e mi st h eb a l la n dt h e earth, we have ∆K +∆ UG = Whand.B yt h er e s u l t (7.18), however, we have ∆UG = −Wgrav ,a n d so this equation can be rearranged to read ∆K = Wgrav + Whand,w h i c hi sj u s tt h er e s u l t(7.20) when the system is the ball alone. Ultimately, the reason we emphasize the importance of the choice of system is to prevent double counting: if you want to count the work done by gravity as contributing to the change in the system’s total energy, it means that you are, implicitly, treating gravity as an external force, and therefore your system must be something that does not have, by itself, gravitational potential energy (the case of the ball in Figure7.4); conversely, if you insist on counting gravitational potential energy as contributing to the system’s total energy, then you must treat gravity as an internal force, and",University Physics I Classical Mechanics.pdf "as contributing to the system’s total energy, then you must treat gravity as an internal force, and leave it out of the calculation of the work done on the system byt h ee x t e r n a lf o r c e s ,w h i c ha r et h e only ones that can change the system’s total energy. 7.4.2 The general case: systems with dissipation We are now ready to consider what happ ens when some of the internal interactions in a system are not conservative. There are two key observations to keep in mind: first, of course, that energy will always be conserved in a closed system, regardless of whethert h ei n t e r n a lf o r c e sa r e“ c o n s e r v a t i v e ” or not: if they are not, it merely means that they will convertsome of the “organized,” mechanical energy, into disorganized (primarily thermal) energy.",University Physics I Classical Mechanics.pdf "148 CHAPTER 7. IMPULSE, WORK AND POWER The second observation is that the work done by an external force on a system does not depend on where the force comes from—that is to say, what physical arrangement we use to produce the force. Only the value of the force at each step and the displacement oft h ep o i n to fa p p l i c a t i o na r ei n v o l v e d in the definition (7.9). This means, in particular, that we can use a conservative interaction to do the work for us. It turns out, then, that the generalization oft h er e s u l t(7.20)t oa p p l yt oa l ls o r t s of interactions becomes straightforward. To see the idea, consider, for example, the situation in Figure 7.5 below. This is essentially the same as Figure 6.2,w h i c hw ea n a l y z e di nd e t a i lf r o mt h ep e r s p e c t i v eo ff o r c e sand accelerations in the previous chapter. Here I have broken it up into two systems. System A, outlined in blue, consists",University Physics I Classical Mechanics.pdf "previous chapter. Here I have broken it up into two systems. System A, outlined in blue, consists of block 1 and the surface on which it slides, and includes a dissipative interaction—namely, kinetic friction—between the block and the surface. The force doingwork on this system is the tension force from the rope,⃗Ft r,1. 1 2 Fr,1 t Fr,2 t FE,2 G Fs,1 fr a1 a2 A B Figure 7.5: Block sliding on a surface, with friction, being pulled by a rope attached to a block falling under the action of gravity. The motion of this system was solved for in Section 6.3. Because the rope is assumed to have negligible mass, this force is the same in magnitude as the",University Physics I Classical Mechanics.pdf "7.4. WORK DONE ON A SYSTEM BY ALL THE EXTERNAL FORCES 149 force ⃗Ft r,2 that is doing negative work on system B. System B, outlined in magenta, consists of block 2 and the earth and thus it includes only one internal interaction, namely gravity, which is conservative. This means that we can immediately apply the theorem (7.20)t oi t ,a n dc o n c l u d e that the work done on B by⃗Ft r,2 is equal to the change in system B’s total energy: Wr,B =∆ EB (7.23) However, since the rope is inextensible, the two blocks movethe same distance in the same time, and the force exerted on each by the rope is the same in magnitude, so the work done by the rope on system A is equal in magnitude but opposite in sign to the work it does on system B: Wr,A = −Wr,B = −∆EB (7.24) Now consider thetotal system formed by A+B. Assuming it is a closed system, its totale n e r g y must be constant, and so any change in the total energy of B mustb ee q u a la n do p p o s i t et h e",University Physics I Classical Mechanics.pdf "must be constant, and so any change in the total energy of B mustb ee q u a la n do p p o s i t et h e corresponding change in the total energy of A: ∆EB = −∆EA.T h e r e f o r e , Wr,A = −∆EB =∆ EA (7.25) So we conclude that the work done by the external force on system A must be equal to the total change in system A’s energy. In other words, Eq. (7.20)a p p l i e st os y s t e mAa sw e l l ,a si td o e st o system B, even though the interaction between the parts thatmake up system A is dissipative. Although I have shown this to be true just for one specific example, the argument is quite general: if I use a conservative system B to do some work on another system A, two things happen: first, by virtue of (7.20), the work done by B comes at the expense of its total energy, so Wext,A = −∆EB. Second, if A and B together form a closed system, the change inA’s energy must be equal and opposite the change in B’s energy, so ∆EA = −∆EB = Wext,A.S o t h e r e s u l t (7.20)h o l d sf o rA ,",University Physics I Classical Mechanics.pdf "opposite the change in B’s energy, so ∆EA = −∆EB = Wext,A.S o t h e r e s u l t (7.20)h o l d sf o rA , regardless of whether its internal interactions are conservative or not. What is essential in the above reasoning is that A and B together should form a closed system, that is, one that does not exchange energy with its environment. It is very important, therefore, if we want to apply the theorem (7.20)t oag e n e r a ls y s t e m — t h a ti s ,o n et h a ti n c l u d e sd i s s i p a t i v e interactions—that we draw the boundary of the system in suchaw a ya st oe n s u r et h a tno dissipation is happening at the boundary.F o r e x a m p l e , i n t h e s i t u a t i o n i l l u s t r a t e d i n F i g .7.5,i fw ew a n tt h e result (7.25)t oa p p l yw em u s tt a k es y s t e mAt oi n c l u d eb o t hb l o c k1and the surface on which it slides.T h e r e a s o n f o r t h i s i s t h a t t h e e n e r g y “ d i s s i p a t e d ” b y k i n e tic friction when two objects",University Physics I Classical Mechanics.pdf "it slides.T h e r e a s o n f o r t h i s i s t h a t t h e e n e r g y “ d i s s i p a t e d ” b y k i n e tic friction when two objects rub together goes into both objects. So, as the block slides,kinetic friction is converting some of its kinetic energy into thermal energy, but not all this thermal energy stays inside block 1. Put otherwise, in the presence of friction, block 1 by itself is not a closed system: it is “leaking” energy to the surface. On the other hand, when you include (enough of)t h es u r f a c ei nt h es y s t e m ,y o u can be sure to have “caught” all the dissipated energy, and ther e s u l t(7.20)a p p l i e s .",University Physics I Classical Mechanics.pdf "150 CHAPTER 7. IMPULSE, WORK AND POWER 7.4.3 Energy dissipated by kinetic friction In the situation illustrated in Fig.7.5,w em i g h tc a l c u l a t et h ee n e r g yd i s s i p a t e db yk i n e t i cf r i c t ion by indirect means. For instance, we can use the fact that the energy of system A is of two kinds, kinetic and “dissipated,” and therefore, by theorem (7.20), we have ∆K +∆ Ediss = Ft r,1∆x1 (7.26) Back in section 6.3, we used Newton’s laws to solve for the acceleration of this system and the tension in the rope; using those results, we can calculate thed i s p l a c e m e n t∆x1 over any time interval, and the corresponding change inK,a n dt h e nw ec a ns o l v eE q .(7.26)f o r∆Ediss. If we do this, we will find out that, in fact, the following result holds, ∆Ediss = −Fk s,1∆x1 (7.27) where Fk s,1 is the force of kinetic friction exerted by the surface on block 1, and must be understood",University Physics I Classical Mechanics.pdf "∆Ediss = −Fk s,1∆x1 (7.27) where Fk s,1 is the force of kinetic friction exerted by the surface on block 1, and must be understood to be negative in this equation (so that ∆Ediss will come out positive, as it must be). It is tempting to think of the productFk s,1∆x as the work done by the force of kinetic friction on the block, and most of the time there is nothing wrong with that, but it is important to realize that the “point of application” of the friction force is not asingle point: rather, the force is “distributed,” that is to say, spread over the whole contactarea between the block and the surface. As a consequence of this, a more general expression for the energy dissipated by kinetic friction between an objecto and a surfaces should be ∆Ediss = |Fk s,o||∆xso| (7.28) where I am using the Chapter 1 subscript notationxAB to refer to “the position ofB in the frame of A”( o r“ r e l a t i v et oA”); in other words, ∆xso is the change in the position of the object relative",University Physics I Classical Mechanics.pdf "of A”( o r“ r e l a t i v et oA”); in other words, ∆xso is the change in the position of the object relative to the surface or, more simply,the distance that the object and the surface slip past each other (while rubbing against each other, and hence dissipating energy). If the surfaces is at rest (relative to the Earth), ∆xso reduces to ∆xEo,t h ed i s p l a c e m e n to ft h eo b j e c ti nt h eE a r t hr e f e r e n c ef r a m e, and we can remove the subscriptE,a sw et y p i c a l l yd o ,f o rs i m p l i c i t y ;h o w e v e r ,i nt h er a r ec a ses when both the surface and the objet are moving (as in part (c) ofP r o b l e m3i nC h a p t e r6 ,t h e sled problem) what matters is how far they moverelative to each other.I n t h a t c a s e w e h a v e |∆xso| = |∆xo − ∆xs| (with both ∆xo and ∆xs measured in the Earth reference frame). 7.5 Power By “power” we mean the rate at which work is done, which is to say, the rate at which energy is",University Physics I Classical Mechanics.pdf "7.5 Power By “power” we mean the rate at which work is done, which is to say, the rate at which energy is taken in, or given out, or converted from one form to another.The SI unit of power is the watt (W),",University Physics I Classical Mechanics.pdf "7.6. IN SUMMARY 151 which is equal to 1 J/s. The average power going into or comingout of a system by mechanical means, that is to say, through the action of a force applied atap o i n tu n d e r g o i n gad i s p l a c e m e n t ∆x,w i l lb e Pav = ∆E ∆t = W ∆t = F ∆x ∆t (7.29) assuming the force is constant. Note that in the limit when ∆t goes to zero, this gives us the instantaneous power associated with the forceF as P = Fv (7.30) where v is the (instantaneous) velocity of the point of applicationof the force. This one-dimensional result generalizes to three dimensions as P = ⃗F · ⃗v (7.31) using again the dot product notation. An important goal of this chapter has been to develop a set of tools that you may use to find out where power is spent, and how much: in any practical situation, which systems are giving energy and which are taking it in, what forms of energy conversion are taking place, and where and",University Physics I Classical Mechanics.pdf "energy and which are taking it in, what forms of energy conversion are taking place, and where and through which means are the exchanges and conversions happening. These are extremely important practical questions; the problems and exercises that you will see here will give you a feel for the variety of situations that can already be analyzed by this “systems-based” approach, but in a way they will still do little more than scratch the surface. 7.6 In summary 1. The change in the momentum of a system produced by a force⃗F acting over a time ∆t is given the name of “impulse” and denoted by⃗J.F o r a c o n s t a n t f o r c e , w e h a v e⃗J =∆ ⃗p= ⃗F∆t. 2. Work, or “doing work” is the name given in physics to the process by which an applied force brings about a change in the energy of an object, or of a systemthat contains the object on which the force is acting. 3. The work done by a constant force⃗F acting on an object or system is given byW = ⃗F · ∆⃗r,",University Physics I Classical Mechanics.pdf "which the force is acting. 3. The work done by a constant force⃗F acting on an object or system is given byW = ⃗F · ∆⃗r, where the dot represents the “dot” or “scalar” product of thetwo vectors, and ∆⃗ris the displacement undergone by the point of application of the force while the force is acting.I f the force is perpendicular to the displacement, it does no work. 4. For a system that is otherwise closed, the net sum of the amounts of work done by all the external forces is equal to the change in the system’s total energy, when all the types of energy are included. Note that, for deformable systems, the displacement of the point of application may be different for different forces.",University Physics I Classical Mechanics.pdf "152 CHAPTER 7. IMPULSE, WORK AND POWER 5. The result in 4 above holds only provided the boundary of thes y s t e mi sn o td r a w na ta physical surface on which dissipation occurs. Put otherwise, kinetic friction or other similar dissipative forces (drag, air resistance) must be includedas internal,not external forces. 6. The work done by the internal forces in a closed system results only in the conversion of one type of energy into another, always keeping the total energyconstant. 7. For a system with no internal energy, like a particle, the work done by all the external forces equals the change in kinetic energy. This result is sometimesc a l l e dthe Work-Energy theorem in a narrow sense. 8. For any system, if ⃗Fext,net (assumed constant) is the sum of all the external forces, the following result holds: ⃗Fext,net · ∆⃗rcm =∆ Kcm where Kcm is the translational (or “center of mass”) kinetic energy, and ∆⃗rcm is the displace-",University Physics I Classical Mechanics.pdf "following result holds: ⃗Fext,net · ∆⃗rcm =∆ Kcm where Kcm is the translational (or “center of mass”) kinetic energy, and ∆⃗rcm is the displace- ment of the center of mass. This is only sometimes equal to thenet work done on the system by the external forces. 9. For an objecto sliding on a surfaces,t h ee n e r g yd i s s i p a t e db yk i n e t i cf r i c t i o nc a nb ed i r e c t l y calculated as ∆Ediss = |Fk s,o||∆xso| where |∆xso| = |∆xo − ∆xs| is the distance that the two surfaces in contact slip past each other. This expression, with a negative sign, can be used to take the place of the “work done by friction” in applications of the results 7 and 8 above to systems involving kinetic friction forces. 10. The power of a system is the rate at which it does work, that is to say, takes in or gives up energy: Pav =∆ E/∆t.W h e nt h i si sd o n e b ym e a n so fa na p p l i e d f o r c eF,t h ei n s t a n t a n e o u s",University Physics I Classical Mechanics.pdf "energy: Pav =∆ E/∆t.W h e nt h i si sd o n e b ym e a n so fa na p p l i e d f o r c eF,t h ei n s t a n t a n e o u s power can be written asP = Fv ,o r ,i nt h r e ed i m e n s i o n s ,⃗F · ⃗v.",University Physics I Classical Mechanics.pdf "7.7. EXAMPLES 153 7.7 Examples 7.7.1 Braking Suppose you are riding your bicycle and hit the brakes to cometo a stop. Assuming no slippage between the tire and the road: (a) Which force is responsible for removing your momentum? (By “you” I mean throughout “you and the bicycle.”) (b) Which force is responsible for removing your kinetic energy? Solution (a) According to what we saw in previous chapters, for example, Eq. (6.10) ∆psys ∆t = Fext,net (7.32) the total momentum of the system can only be changed by the action of an external force, and the only available external force is the force of static friction between the tire and the road (static, because we assume no slippage). So it is this force that removes the forward momentum from the system. The stopping distance, ∆xcm,a n dt h ef o r c e ,c a nb er e l a t e du s i n gE q .(7.12): Fs r,t∆xcm =∆ Kcm (7.33) (b) Now, here is an interesting fact: the force of static friction, although fully responsible for",University Physics I Classical Mechanics.pdf "Fs r,t∆xcm =∆ Kcm (7.33) (b) Now, here is an interesting fact: the force of static friction, although fully responsible for stopping your center of mass motiondoes no work in this case.T h a t i sb e c a u s et h e p o i n tw h e r e i t is applied—the point of the tire that is momentarily in contact with the road—is also momentarily at rest relative to the road: it is, precisely,not slipping,s o∆x in the equationW = F∆x is zero. By the time that bit of the tire has moved on, so you actually have a nonzero ∆x,y o un ol o n g e r have anF:t h e f o r c e o f s t a t i c f r i c t i o n i s n o l o n g e r a c t i n g o n t h a t b i t oft h et i r e ,i ti sa c t i n go na different bit—on which it will, again, do no work, for the same reason. So, as you bring your bicycle to a halt the workWext,sys =0 ,a n di tf o l l o w sf r o mE q .(7.20)t h a t the total energy of your system is, in fact, conserved:all your initial kinetic energy is converted to",University Physics I Classical Mechanics.pdf "the total energy of your system is, in fact, conserved:all your initial kinetic energy is converted to thermal energy by the brake pad rubbing on the wheel, and the internal force responsible for that conversion is the force ofkinetic friction between the pad and the wheel.",University Physics I Classical Mechanics.pdf "154 CHAPTER 7. IMPULSE, WORK AND POWER 7.7.2 Work, energy and the choice of system: dissipative case Consider again the situation shown in Figure7.5.L e tm1 =1k g ,m2 =2k g ,a n dµk =0 .3. Use the solutions provided in Section 6.3 to calculate the work doneby all the forces, and the changes in all energies, when the system undergoes a displacement of 0.5m , a n dr e p r e s e n tt h ec h a n g e sg r a p h i c a l l y using bar diagrams like the ones in Figure7.3 (for system A and B separately) Solution From Eq. (6.32), we have a = m2 − µkm1 m1 + m2 g =5 .55 m s2 Ft = m1m2(1 +µk) m1 + m2 g =8 .49 N (7.34) We can use the acceleration to calculate the change in kinetice n e r g y ,s i n c ew eh a v eE q .(2.10)f o r motion with constant acceleration: v2 f − v2 i =2 a∆x =2 × ( 5.55 m s2 ) × 0.5m=5 .55 m2 s2 (7.35) so the change in kinetic energy of the two blocks is ∆K1 = 1 2m1 ( v2 f − v2 i ) =2 .78 J ∆K2 = 1 2m2 ( v2 f − v2 i ) =5 .55 J (7.36)",University Physics I Classical Mechanics.pdf "s2 (7.35) so the change in kinetic energy of the two blocks is ∆K1 = 1 2m1 ( v2 f − v2 i ) =2 .78 J ∆K2 = 1 2m2 ( v2 f − v2 i ) =5 .55 J (7.36) We can also use the tension to calculate the work done by the external force on each system: Wext,A = Ft r,1∆x =( 8.49 N)× (0.5m )=4 .25 J Wext,B = Ft r,2∆y =( 8.49 N)× (−0.5m )= −4.25 J (7.37) Lastly, we need the change in the gravitational potential energy of system B: ∆UG B = m2g∆y =( 2k g )× ( 9.8 m s2 ) × (−0.5m )= −9.8J ( 7 . 3 8 ) and the increase in dissipated energy in system A, which we cang e tf r o mE q .(7.28): ∆Ediss = −Fk s,1∆x = µkFn s,1∆x = µkm1g∆x =0 .3 × (1 kg)× ( 9.8 m s2 ) × (0.5m )=1 .47 J (7.39) We can now put all this together to show that Eq. (7.20)i n d e e dh o l d s : Wext,A =∆ EA =∆ K1 +∆ Ediss =2 .78 J + 1.47 J = 4.25 J Wext,B =∆ EB =∆ K2 +∆ UG B =5 .55 J− 9.8J= −4.25 J (7.40)",University Physics I Classical Mechanics.pdf "7.7. EXAMPLES 155 To plot all this as energy bars, if you do not have access to a very precise drawing program, you typically have to make some approximations. In this case, wesee that ∆K2 =2 ∆K1 (exactly), whereas ∆K1 ≃ 2∆Ediss,s ow ec a nu s eo n eb o xt or e p r e s e n tEdiss,t w ob o x e sf o r∆K1,t h r e ef o r Wext,A,f o u rf o r∆K2,a n ds oo n . T h er e s u l ti ss h o w ni ng r e e ni nt h ep i c t u r eb e l o w ;the blue bars have been drawn more exactly to scale, and are shown for your information only. system A ∆K1 ∆Ediss Wext system B ∆K2 ∆UG Wext 7.7.3 Work, energy and the choice of system: non-dissipativec a s e Suppose you hang a spring from the ceiling, then attach a blockt ot h ee n do ft h es p r i n ga n dl e tg o . The block starts swinging up and down on the spring. Considerthe initial time just before you let go, and the final time when the block momentarily stops at the bottom of the swing. For each of",University Physics I Classical Mechanics.pdf "go, and the final time when the block momentarily stops at the bottom of the swing. For each of the choices of a system listed below, find the net energy changeo ft h es y s t e mi nt h i sp r o c e s s ,a n d relate it explicitly to the work done on the system by an external force (or forces) (a) System is the block and the spring. (b) System is the block alone. (c) System is the block and the earth. Solution (a) The block alone has kinetic energy, and the spring alone has (elastic) potential energy, so the total energy of this system is the sum of these two. For the interval considered, the change in kinetic energy is zero, because the block starts and ends (momentarily) at rest, so only the spring energy changes. This has to be equal to the work done by gravity, which is the only external force. So, if the spring stretches a distanced,i t sp o t e n t i a le n e r g yg o e sf r o mz e r ot o1 2 kd2,a n dt h eb l o c k",University Physics I Classical Mechanics.pdf "So, if the spring stretches a distanced,i t sp o t e n t i a le n e r g yg o e sf r o mz e r ot o1 2 kd2,a n dt h eb l o c k falls the same distance, so gravity does an amount of work equal tomgd,a n dw eh a v e Wgrav = mgd =∆ Esys =∆ K +∆ Uspr =0+ 1 2kd2 (7.41)",University Physics I Classical Mechanics.pdf "156 CHAPTER 7. IMPULSE, WORK AND POWER (b) If the system is the block alone, the only energy it has is kinetic energy, which, as stated above, does not see a net change in this process. This means the net work done on the block by the external forces must be zero. The external forces in this casea r et h es p r i n gf o r c ea n dg r a v i t y ,s o we have Wspr + Wgrav =∆ K =0 ( 7 . 4 2 ) We have calculatedWgrav above, so from this we get that the work done by the spring on theb l o c k , as it stretches, is−mgd,o r( b yE q .(7.41)) −1 2kd2.N o t et h a t t h e f o r c e e x e r t e db y t h e s p r i n g i snot constant as it stretches (or compresses) so we cannot just useE q .(7.4)t oc a l c u l a t ei t ;r a t h e r ,w e need to calculate it as an integral, as in Eq. (7.9), or derive it in some indirect way as we have just done here. (c) If the system is the block and the earth, it has kinetic energy and gravitational potential energy.",University Physics I Classical Mechanics.pdf "done here. (c) If the system is the block and the earth, it has kinetic energy and gravitational potential energy. The force exerted by the spring is an external force now, so wehave: Wspr =∆ Esys =∆ K +∆ UG =0 − mgd (7.43) so we end up again with the result thatWspr = −mgd = −1 2 kd2.N o t et h a tb o t ht h ew o r kd o n eb y the spring and the work done by gravity are equal to the negative of the changes in their respective potential energies, as they should be. 7.7.4 Jumping For a standing jump, you start standing straight (A) so your body’s center of mass is at a height h1 above the ground. You then bend your knees so your center of mass is now at a (lower) height h2 (B). Finally, you straighten your legs, pushing hard on the ground, and take off, so your center of mass ends up achieving a maximum height,h3,a b o v et h eg r o u n d( C ) .A n s w e rt h ef o l l o w i n g questions in as much detail as you can.",University Physics I Classical Mechanics.pdf "questions in as much detail as you can. (a) Consider the system to be your body only. In going from (A)to (B), which external forces are acting on it? How do their magnitudes compare, as a function oft i m e ? (b) In going from (A) to (B), does any of the forces you identified in part (a) do work on your body? If so, which one, and by how much? Does your body’s energyi n c r e a s eo rd e c r e a s ea sa result of this? Into what kind of energy do you think this workis primarily converted? (c) In going from (B) to (C), which external forces are actingon you? (Not all of them need to be acting all the time.) How do their magnitudes compare, as a function of time? (d) In going from (B) to (C), does any of the forces you identified do work on your body? If so, which one, and by how much? Does your body’s kinetic energy seean e tc h a n g ef r o m( B )t o( C ) ? What other energy change needs to take place in order for Eq. (7.20)( a l w a y sw i t hy o u rb o d ya s",University Physics I Classical Mechanics.pdf "What other energy change needs to take place in order for Eq. (7.20)( a l w a y sw i t hy o u rb o d ya s the system) to be valid for this process? Solution",University Physics I Classical Mechanics.pdf "7.7. EXAMPLES 157 (a) The external forces on your body are gravity, pointing down, and the normal force from the floor, pointing up. Initially, as you start lowering your center of mass, the normal force has to be slightly smaller than gravity, since your center of mass acquires a small downward acceleration. However, eventuallyFn would have to exceedFG in order to stop the downward motion. (b) The normal force does no work, because its point of application (the soles of your feet) does not move, so ∆x in the expressionW = F∆x (Eq. (7.4)) is zero. Gravity, on the other hand, does positive work, since you mayalways treat the center of mass as the point of application of gravity (see Section 7.3, footnote).W e h a v eFG y = −mg,a n d∆y = h2 −h1, so Wgrav = FG y ∆y = −mg(h2 − h1)= mg(h1 − h2) Since this is the net work done by all the external forces on mybody, and it is positive, the total energy in my body must have increased (by the theorem (7.20): Wext,sys =∆ Esys). In this case,",University Physics I Classical Mechanics.pdf "energy in my body must have increased (by the theorem (7.20): Wext,sys =∆ Esys). In this case, it is clear that the main change has to be an increase in my body’selastic potential energy,a sm y muscles tense for the jump. (An increase in thermal energy isalways possible too.) (c) During the jump, the external forces acting on me are againg r a v i t ya n dt h en o r m a lf o r c e , which together determine the acceleration of my center of mass. At the beginning of the jump, the normal force has to be much stronger than gravity, to give me alarge upwards acceleration. Since the normal force is a reaction force, I accomplish this by pushing very hard with my feet on the ground, as I extend my leg’s muscles: by Newton’s third law, the ground responds with an equal and opposite force upwards. As my legs continue to stretch, and move upwards, the force they exert on the ground decreases,",University Physics I Classical Mechanics.pdf "and opposite force upwards. As my legs continue to stretch, and move upwards, the force they exert on the ground decreases, and so doesFn,w h i c he v e n t u a l l yb e c o m e sl e s st h a nFG.A tt h a tp o i n t ( p r o b a b l ye v e nb e f o r e m y feet leave the ground) the acceleration of my center of mass becomes negative (that is, pointing down). This ultimately causes my upwards motion to stop, andmy body to come down. (d) The only force that does work on my body during the processdescribed in (c) is gravity, since, again, the point of application ofFn is the point of contact between my feet and the ground, and that point does not move up or down—it is always level with theground. So Wext,sys = Wgrav , which in this case is actuallynegative: Wgrav = −mg(h3 − h2). In going from (B) to (C), there is no change in your kinetic energy, since you start at rest and end (momentarily) with zero velocity at the top of the jump. So thef a c tt h a tt h e r ei san e tn e g a t i v e",University Physics I Classical Mechanics.pdf "(momentarily) with zero velocity at the top of the jump. So thef a c tt h a tt h e r ei san e tn e g a t i v e work done on you means that the energy inside your body must have gone down. Clearly, some of this is just a decrease in elastic potential energy. However,s i n c eh3 (the final height of your center of mass) is greater thanh1 (its initial height at (A), before crouching), there is anet loss of energy in your body as a result of the whole process. The most obviousplace to look for this loss is in chemical energy: you “burned” some calories in the process,primarily when pushing hard against the ground.",University Physics I Classical Mechanics.pdf "158 CHAPTER 7. IMPULSE, WORK AND POWER 7.8 Problems Problem 1 In a mattress test, you drop a 7.0k g bo w l i n g b a l l f r o m a h e i g h t o f 1.5m a bo v e a mattress, which as a result compresses 15 cm as the ball comesto a stop. (a) What is the kinetic energy of the ball just before it hits the mattress? (b) How much work does the gravitational force of the earth doon the ball as it falls, for the first part of the fall (from the moment you drop it to just before it hits the mattress)? (c) How much work does the gravitational force do on the ball while it is compressing the mattress? (d) How much work does the mattress do on the ball? (e) Now model the mattress as a single spring with an unknown spring constant k,a n dc o n s i d e r the whole system formed by the ball, the earth and the mattress. By how much does the potential energy of the mattress increase as it compresses? (f) What is the value of the spring constantk?",University Physics I Classical Mechanics.pdf "energy of the mattress increase as it compresses? (f) What is the value of the spring constantk? Problem 2 Ab l o c ko fm a s s1 k gi ss i t t i n go nt o po fac o m p r e s s e ds p r i n go fspring constant k =3 0 0N / ma n de q u i l i b r i u ml e n g t h2 0c m . I n i t i a l l yt h es p r i n gisc o m p r e s s e d1 0 c m ,a n dt h eb l o c k is held in place by someone pushing down on it with his hand. Att =0 ,t h eh a n di sr e m o v e d( t h i s involves no work), the spring expands and the block flies upwards. (a) Draw a free-body diagram for the block while the hand is still pressing down. Try to get the forces approximately to scale. The following question should help. (b) What must be the force (magnitude and direction) exertedby the hand on the block? (c) How much elastic potential energy was stored in the springi n i t i a l l y ? (d) Taking the system formed by the block and the earth, how much total work is done on it by",University Physics I Classical Mechanics.pdf "(d) Taking the system formed by the block and the earth, how much total work is done on it by the spring, as it expands to its equilibrium length? (You do not need to do a new calculation here, just think of conservation of energy.) (e) How high does the block rise above its initial position? (f) Treating the block alone as the system, how much net work isd o n eo ni tb yt h et w oe x t e r n a l forces (the spring and gravity) from the time just before it starts moving to the time it reaches its maximum height? (Again, no calculation is necessary if you can justify your answer.) Problem 3 Ac r a n ei sl i f t i n ga5 0 0 - k go b j e c ta tac o n s t a n ts p e e do f0.5m / s . W h a t i s t h e po w e r output of the crane? Problem 4 In a crash test, a car, initially moving at 30 m/s, hits a wall and crumples to a halt. In the process of crumpling, the center of mass of the car movesf o r w a r dad i s t a n c eo f1 m .",University Physics I Classical Mechanics.pdf "In the process of crumpling, the center of mass of the car movesf o r w a r dad i s t a n c eo f1 m . (a) If the car has a mass of 1, 800 kg, what is the magnitude of the average force acting on itwhile it stops? What, physically, is this force? (b) Does the force you found in (a) actually do any work on the car? (Think carefully!) (c) What is the net change in the car’s kinetic energy? Where does all that kinetic energy go?",University Physics I Classical Mechanics.pdf "7.8. PROBLEMS 159 Problem 5 Ab l o c ko fm a s s3 k gs l i d e so nah o r i z o n t a l ,r o u g hs u r f a c et o w ards a spring with k =5 0 0N / m . T h ek i n e t i cf r i c t i o nc o e ffi c i e n tb e t w e e nt h eb l o c kand the surface isµk =0 .6. If the block’s speed is 5 m/s at the instant it first makes contact witht h es p r i n g , (a) Find the maximum compression of the spring. (b) Draw work-energy bar diagrams for the process of the blockc o m i n gt oah a l t ,t a k i n gt h es y s t e m to be the block and the surface only.",University Physics I Classical Mechanics.pdf "160 CHAPTER 7. IMPULSE, WORK AND POWER",University Physics I Classical Mechanics.pdf "Chapter 8 Motion in two dimensions 8.1 Dealing with forces in two dimensions We have b een able to get a lot of physics from our study of (mostly) one-dimensional motion only, but it goes without saying that the real world is a lot richer than that, and there are a number of new and interesting phenomena that appear when one considersm o t i o ni nt w oo rt h r e ed i m e n s i o n s . The purpose of this chapter is to introduce you to some of the simplest two-dimensional situations of physical interest. Ac o m m o nf e a t u r et oa l lt h e s ep r o b l e m si st h a tt h ef o r c e sa c t ing on the objects under consideration will typically not line up with the displacements. This means, in practice, that we need to pay more attention to the vector nature of these quantities thanwe have done so far. This section will present a brief reminder of some basic properties of vectors, and introduce a couple of simple principles for the analysis of the systems that will follow.",University Physics I Classical Mechanics.pdf "principles for the analysis of the systems that will follow. To begin with, recall that a vector is a quantity that has botham a g n i t u d ea n dad i r e c t i o n . The magnitude of the vector just tells us how big it is: the magnitude of the velocity vector, for instance, is the speed, that is, just how fast something is moving. When working with vectors in one dimension, we have typically assumed that the entire vector (whether it was a velocity, an acceleration or a force) lay along the line of motion of the system, and all we had to do to indicate the direction was to give the vector’s magnitude an appropriate sign. For the problems that follow, however, it will become essential to break up the vectors intot h e i rcomponents along an appropriate set of axes. This involves very simple geometry, and followsthe example of the position vector⃗r, whose components are just the Cartesian coordinates of the point it locates in space (as shown in",University Physics I Classical Mechanics.pdf "whose components are just the Cartesian coordinates of the point it locates in space (as shown in Figure 1.1). For a generic vector, for instance, a force, like the one shown in Figure8.1 below, the components Fx and Fy may be obtained from a right triangle, as indicated there: 161",University Physics I Classical Mechanics.pdf "162 CHAPTER 8. MOTION IN TWO DIMENSIONS F F Fx Fy x y θ θ180° − θ Fx Figure 8.1: The components of a vector that makes an angleθ with the positivex axis. Two examples are shown, for θ< 90◦ (in which caseFx > 0) and for 90◦ <θ< 180◦ (in which caseFx < 0). In both cases, Fy > 0. The triangle will always have the vector’s magnitude (| ⃗F| in this case) as the hypothenuse. The two other sides should be parallel to the coordinate axes. Their lengths are the corresponding components, except for a sign that depends on the orientationo ft h ev e c t o r .I fw eh a p p e nt ok n o w the angleθ that the vector makes with the positivex axis, the following relations will always hold: Fx = | ⃗F| cos θ Fy = | ⃗F| sin θ | ⃗F| = √ F2x + F2y θ =t a n−1 Fy Fx (8.1) Note, however, that in general this angleθ may not be one of the interior angles of the triangle (as shown on the right diagram in Fig.8.1), and that in that case it may just be simpler to calculate",University Physics I Classical Mechanics.pdf "shown on the right diagram in Fig.8.1), and that in that case it may just be simpler to calculate the magnitude of the components using trigonometry and an interior angle (such as 180◦ −θ in the example), and give them the appropriate signs “by hand.” In the example on the right, the length of the horizontal side of the triangle is equal to| ⃗F| cos(180◦ − θ), which is a positive quantity; the correct value forFx,h o w e v e r ,i st h en e g a t i v en u m b e r| ⃗F| cos θ = −| ⃗F| cos(180◦ − θ). In any case, it is important not to get fixated on the notion that“ t h ex component will always be proportional to the cosine ofθ.” The symbolθ is just a convenient one to use for a generic angle. There are four sections in this chapter, and in every one therei sa θ used with a different meaning. When in doubt, just draw the appropriate right triangle and remember from your trigonometry classes which side goes with the sine, and which with the cosine.",University Physics I Classical Mechanics.pdf "classes which side goes with the sine, and which with the cosine. For the problems that we are going to study in this chapter, thei d e ai st ob r e a ku pa l lt h ef o r c e s involved into components along properly-chosen coordinatea x e s ,t h e na d da l lt h ec o m p o n e n t sa l o n g any given direction, and applyFnet = ma along that direction: that is to say, we will write (and",University Physics I Classical Mechanics.pdf "8.1. DEALING WITH FORCES IN TWO DIMENSIONS 163 eventually solve) the equations Fnet,x = max Fnet,y = may (8.2) We can show that Eqs. (8.2)m u s th o l df o ra n yc h o i c eo fo r t h o g o n a lx and y axes, based on the fact that we know⃗Fnet = m⃗ aholds along one particular direction, namely, the directionc o m m o n to ⃗Fnet and ⃗a,a n dt h ef a c tt h a tw eh a v ed e fi n e dt h ep r o j e c t i o np r o c e d u r et obe the same for any kind of vector. Figure8.2 shows how this works. Along the dashed line you just have the situation that is by now familiar to us from one-dimensional problems,where ⃗alies along ⃗F (assumed here to be the net force), and| ⃗F| = m|⃗a|.H o w e v e r , i n t h e fi g u r e I h a v e c h o s e n t h e a x e s t o m a k e a n angle θ with this direction. Then, if you look at the projections of⃗F and ⃗aalong the x axis, you will find ax = |⃗a| cos θ Fx = | ⃗F| cos θ = m|⃗a| cos θ = max (8.3)",University Physics I Classical Mechanics.pdf "will find ax = |⃗a| cos θ Fx = | ⃗F| cos θ = m|⃗a| cos θ = max (8.3) and similarly, Fy = may.I n w o r d s ,each component of the force vector is responsible for only the corresponding component of the acceleration.A f o r c e i n t h ex direction does not cause any acceleration in they direction, and vice-versa. a F ax Fx ay Fy x y θ Figure 8.2:If you take the familiar, one-dimensional (see the black dashed line)form of⃗F = m⃗ a,a n dp r o j e c t it onto orthogonal, rotated axes, you get the general two-dimensional case, showing that each orthogonal component of the acceleration is proportional, via the massm, to only the corresponding component of the force (Eqs. (8.2)). In the rest of the chapter we shall see how to use Eqs. (8.2)i nan u m b e ro fe x a m p l e s .O n et h i n gI can anticipate is that, in general, we will try to choose our axes (unlike in Fig.8.2 above) so that one of them does coincide with the direction of the acceleration, so the motion along the other",University Physics I Classical Mechanics.pdf "one of them does coincide with the direction of the acceleration, so the motion along the other direction is either nonexistent (v =0 )o rt r i v i a l( c o n s t a n tv e l o c i t y ) .",University Physics I Classical Mechanics.pdf "164 CHAPTER 8. MOTION IN TWO DIMENSIONS 8.2 Projectile motion Projectile motion is basically just free fall, only with theunderstanding that the object we are tracking was “projected,” or “shot,” with some initial velocity (as opposed to just dropped from rest). Unlike in the previous cases of free fall that we have studied so far, we will now assume that the initial velocity has a horizontal component, as a resultof which, instead of just going straight up and/or down, the object will describe (ignoring air resistance, as usual) aparabola in a vertical plane. The plane in question is determined by the initial velocity (more precisely, the horizontal component of the initial velocity) and gravity. A generic trajectory iss h o w ni nF i g u r e8.3,s h o w i n gt h ef o r c e and acceleration vectors (constant throughout) and the velocity vector at various points along the path. y x ymax height xmax height xrange vi yi vx,i vy,i FG a",University Physics I Classical Mechanics.pdf "path. y x ymax height xmax height xrange vi yi vx,i vy,i FG a Figure 8.3: A typical projectile trajectory. The velocity vector (in green) is shown at the initial time, the point of maximum height, and the point where the projectile is back toits initial height. Conceptually, the problem turns out to be extremely simple ifw ea p p l yt h eb a s i cp r i n c i p l ei n t r o - duced in Section 8.1. The force is vertical throughout; so, after the throw, there is no horizontal acceleration, and the vertical acceleration is just−g,j u s ta si ta l w a y sw a si no u re a r l i e r ,o n e - dimensional free-fall problems: ax = Fx m =0 ay = Fy m = −g (8.4)",University Physics I Classical Mechanics.pdf "8.2. PROJECTILE MOTION 165 The overall motion, then, is a combination of motion with constant velocity horizontally, and motion with constant acceleration vertically, and we can write down the corresponding equations of motion immediately: vx = vx,i vy = vy,i − gt x = xi + vx,it y = yi + vy,it − 1 2gt2 (8.5) where (xi,y i)a r et h ec o o r d i n a t e so ft h el a u n c h i n gp o i n t( t h e r ei su s u a l lyn or e a s o nt om a k exi anything other than zero, so we will do that below), and (vx,i,v y,i)t h ei n i t i a lc o m p o n e n t so ft h e velocity vector. By eliminating t in between the last two Eqs. (8.5), we get the equation of the trajectory in the x-y plane: y = yi + vy,i vx,i x − g 2v2 x,i x2 (8.6) which, as indicated earlier, and as shown in Fig.8.3,i si n d e e dt h ee q u a t i o no fap a r a b o l a . The apex of the parabola (highest point in the trajectory) isat xmax height = vx,ivy,i/g.W e c a n g e t",University Physics I Classical Mechanics.pdf "The apex of the parabola (highest point in the trajectory) isat xmax height = vx,ivy,i/g.W e c a n g e t this result from calculus, or from a comparison of Eq. (8.6)w i t ht h ec a n o n i c a lf o r mo fap a r a b o l a , or we can use some physics: the maximum height is reached, as usual, when the vertical velocity becomes momentarily zero, so solving thevy equation (8.5)f o rtmax height and substituting in thex equation, we get tmax height = vy,i g xmax height = vx,ivy,i g ymax height = yi + v2 y,i 2g (8.7) The last of these equations should look familiar. It is, indeed a variation on our old friendv2 f −v2 i = −2g∆y,o n l yn o wi n s t e a do ft h ef u l lv e l o c i t y⃗vwe have to use only the vertical velocity component vy.J u s t l i k e f o r o n e - d i m e n s i o n a l m o t i o n , t h i s r e s u l t f o l l o w sagain from conservation of energy: throughout the flight, we must haveK + UG =c o n s t a n t ,o n l yn o wt h e r ei sac o m p o n e n tt ot h e",University Physics I Classical Mechanics.pdf "throughout the flight, we must haveK + UG =c o n s t a n t ,o n l yn o wt h e r ei sac o m p o n e n tt ot h e kinetic energy—the part associated with the horizontal motion—which remains constant on its own. In general, the kinetic energy of a particle will be1 2 m|⃗v|2,w h e r e|⃗v| is the magnitude of the velocity vector—that is to say, the speed. In two dimensions,t h i sg i v e s K = 1 2mv2 x + 1 2mv2 y (8.8)",University Physics I Classical Mechanics.pdf "166 CHAPTER 8. MOTION IN TWO DIMENSIONS For pro jectile motion, however,vx does not change, so any change inK will affect only the second term in Eq. (8.8). Conservation of energy between any two instantsi and f gives K + UG = 1 2mv2 x,i + 1 2mv2 y,i + mgyi = 1 2mv2 x,i + 1 2mv2 y,f + mgyf (8.9) The 1 2 mv2 x,i term cancels, and therefore v2 y,f − v2 y,i = −2g(yf − yi)( 8 . 1 0 ) Another quantity of interest is the projectile’srange,o rm a x i m u mh o r i z o n t a ld i s t a n c et r a v e l e d . W e can calculate it from Eqs. (8.5), by settingy equal to the final height, then solving fort (which generally requires solving a quadratic equation), and thensubstituting the result in the equation for x.I n t h e s i m p l e c a s e w h e n t h e fi n a l h e i g h t i s t h e s a m e a s t h e i n i tial height, we can avoid the need for calculating altogether, and just reason, from the fact that the trajectory is symmetric, that",University Physics I Classical Mechanics.pdf "need for calculating altogether, and just reason, from the fact that the trajectory is symmetric, that the total horizontal distance traveled will be twice the distance to the point where the maximum height is reached, that is,xrange =2 xmax height: xrange = 2vx,ivy,i g (only ifyf = yi)( 8 . 1 1 ) As you can see, all these equations depend on the initial values of the components of the velocity vector ⃗vi.I f ⃗vi makes an angleθ with the horizontal, and we simplify the notation by callingits magnitude vi,t h e nw ec a nw r i t e vx,i = vi cos θ vy,i = vi sin θ (8.12) In terms ofvi and θ,t h er a n g ee q u a t i o n(8.11)b e c o m e s xrange = v2 i sin(2θ) g (only ifyf = yi)( 8 . 1 3 ) since 2 sinθ cos θ =s i n ( 2θ). This tells us that for any given launch speed, the maximum range is achieved when the launch angleθ =4 5◦ (always assuming the final height is the same as the initial height).",University Physics I Classical Mechanics.pdf "achieved when the launch angleθ =4 5◦ (always assuming the final height is the same as the initial height). In real life, of course, there will always be air resistance,and all these results will be modified somewhat. Mathematically, things become a lot more complicated: the drag force depends on the speed, which involvesboth components of the velocity, so the horizontal and vertical motions are no longer decoupled: not only is there now anFx,b u ti t sv a l u ea ta n yg i v e nt i m ed e p e n d sb o t ho n vx and vy.P h y s i c a l l y , y o u m a y t h i n k o f t h e d r a g f o r c e a s d o i n g n e g a t i vew o r ko nt h ep r o j e c t i l e , and hence removing kinetic energy from it. Less kinetic energy means, basically, that it will not travel quite as far either vertically or horizontally. Surprisingly, the optimum launch angle remains pretty close to 45◦,a tl e a s ti ft h es i m u l a t i o n sa tt h i sl i n ka r ea c c u r a t e :",University Physics I Classical Mechanics.pdf "pretty close to 45◦,a tl e a s ti ft h es i m u l a t i o n sa tt h i sl i n ka r ea c c u r a t e : https://phet.colorado.edu/en/simulation/projectile-motion",University Physics I Classical Mechanics.pdf "8.3. INCLINED PLANES 167 8.3 Inclined planes Back in Chapter 2, I stated without proof that the acceleration of an object sliding, without friction, down an inclined plane making an angleθ with the horizontal wasg sin θ.Ic a ns h o wy o un o ww h y this is so, and introduce friction as well. FG θ θ F n F k a θ F k FG Eb sb sb sb F n sb Eb ax y x y Figure 8.4: A block sliding down an inclined plane. The corresponding free-body diagram is shown on the right. Figure 8.4 above shows, on the left, a block sliding down an inclined plane and all the forces acting on it. These are more clearly seen on the free-body diagram onthe right. I have labeled all the forces using the⃗Ftype by,on convention introduced back in Chapter 6 (so, for instance,⃗Fk sb is the force of kinetic friction exerted by the surface on the block); however, later on, for algebraic manipulations, and especially wherex and y components need to be taken, I will drop the “by, on” subscripts, and",University Physics I Classical Mechanics.pdf "and especially wherex and y components need to be taken, I will drop the “by, on” subscripts, and just let the “type” superscript identify the force in question. The diagrams also show the coordinate axes I have chosen: thex axis is along the plane, and the y is perpendicular to it. The advantage of this choice is obvious: the motion is entirely along one of the axes, and two of the forces (the normal force and the friction) already lie along the axes. The only force that does not is the block’s weight (that is, thef o r c eo fg r a v i t y ) ,s ow en e e dt o decompose it into itsx and y components. For this, we can make use of the fact, which follows from basic geometry, that the angle of the incline,θ,i sa l s ot h ea n g l eb e t w e e nt h ev e c t o r⃗Fg and the negative y axis. This means we have Fg x = Fg sin θ Fg y = −Fg cos θ (8.14) Equations (8.14)a l s os h o wa n o t h e rc o n v e n t i o nIw i l la d o p tf r o mn o w ,n a m e l y ,that whenever the",University Physics I Classical Mechanics.pdf "Fg y = −Fg cos θ (8.14) Equations (8.14)a l s os h o wa n o t h e rc o n v e n t i o nIw i l la d o p tf r o mn o w ,n a m e l y ,that whenever the symbol for a vector is shownwithout an arrow on topor an x or y subscript, it will be understood to refer to themagnitude of the vector, which is always a positive number by definition.",University Physics I Classical Mechanics.pdf "168 CHAPTER 8. MOTION IN TWO DIMENSIONS Newton’s second law, as given by equations (8.4)a p p l i e dt ot h i ss y s t e m ,t h e nr e a d s : Fg x + Fk x = max = Fg sin θ − Fk (8.15) for the motion along the plane, and Fg y + Fn y = may = −Fg cos θ + Fn (8.16) for the direction perpendicular to the plane. Of course, since there is no motion in this direction, ay is zero. This gives us immediately the value of the normal force: Fn = Fg cos θ = mg cos θ (8.17) since Fg = mg.W e c a n a l s o u s e t h e r e s u l t (8.17), together with Eq. (6.30), to get the magnitude of the friction force, assuming we know the coefficient of kinetic (or sliding) friction,µk: Fk = µkFn = µkmg cos θ (8.18) Substituting this andFg = mg in Eq. (8.15), we get max = mg sin θ − µkmg cos θ (8.19) We can eliminate the mass to obtain finally ax = g (sin θ − µk cos θ)( 8 . 2 0 ) which is the desired result. In the absence of friction (µk =0 )t h i sg i v e sa = g sin θ,a sw eh a di n",University Physics I Classical Mechanics.pdf "ax = g (sin θ − µk cos θ)( 8 . 2 0 ) which is the desired result. In the absence of friction (µk =0 )t h i sg i v e sa = g sin θ,a sw eh a di n Chapter 2. Note that, if you reduce the tilt of the surface (that is, makeθ smaller), the cosθ term in Eq. (8.20)g r o w sa n dt h es i nθ term gets smaller, so we must make sure that we do not use this equation whenθ is too small or we would get the absurd result thatax < 0, that is, that the force of kinetic friction has overcome gravity and is acceleratingt h eo b j e c tupwards! Of course, we know from experience that what happens whenθ is very small is that the block does not slide: it is held in place by the force of static friction. Thediagram for such a situation looks the same as Fig.8.4,e x c e p tt h a t⃗a=0 ,t h ef o r c eo ff r i c t i o ni sFs instead of Fk,a n do fc o u r s ei t s magnitude must match that of thex component of gravity. Equation (8.15)t h e nb e c o m e s max =0= Fg sin θ − Fs (8.21)",University Physics I Classical Mechanics.pdf "magnitude must match that of thex component of gravity. Equation (8.15)t h e nb e c o m e s max =0= Fg sin θ − Fs (8.21) Recall from Chapter 6 that the force of static friction does not have a fixed value: rather, it will match the applied force up to a maximum value given by Eq. (6.29): Fs max = µsFn = µsmg cos θ (8.22) where I have used Eq. (8.17), since clearly the equation (8.16)s t i l la p p l i e sa l o n gt h ev e r t i c a l direction. So, on the one hand we have the requirement thatFs = mg sin θ to keep the block from",University Physics I Classical Mechanics.pdf "8.4. MOTION ON A CIRCLE (OR PART OF A CIRCLE) 169 sliding, and on the other hand the constraintFs ≤ µsmg cos θ.P u t t i n gt h e s et o g e t h e rw ec o n c l u d e that the block willnot slide as long as mg sin θ ≤ µsmg cos θ (8.23) or tan θ ≤ µs (8.24) In short, as long asθ is small enough to satisfy Eq. (8.24), the block will not move. Onceθ exceeds the value tan−1 µs,w ec a na p p l yt h er e s u l t(8.20)f o rt h ea c c e l e r a t i o n . N o t et h a t ,s i n c ew ea l w a y s have µs ≥ µk,t h er e s u l t(8.20)w i l la l w a y sb ep o s i t i v ei fθ> tan−1 µs,t h a ti s ,i fs i nθ>µ s cos θ. What if we send the block slidingup the plane instead? The acceleration would still be pointing down (since the object would be slowing down all the while), but now the force of kinetic friction would point in the directionopposite that indicated in Figure8.4,s i n c ei ta l w a y sm u s to p p o s e",University Physics I Classical Mechanics.pdf "would point in the directionopposite that indicated in Figure8.4,s i n c ei ta l w a y sm u s to p p o s e the motion. If you go through the same analysis I carried out above, you will get thatax = g (sin θ + µk cos θ)i nt h a tc a s e ,s i n c en o wf r i c t i o na n dg r a v i t ya r ew o r k i n gt o gether to slow the motion down. 8.4 Motion on a circle (or part of a circle) The last example of motion in two dimensions that I will consider in this chapter is motion on ac i r c l e . T h e r ea r em a n ye x a m p l e so fc i r c u l a r( o rn e a r - c i r c ular) motion in nature, particularly in astronomy (as we shall see in a later chapter, the orbits of most planets and many satellites are very nearly circular). There are also many devices that we usea l lt h et i m et h a ti n v o l v er o t a t i n g or spinning objects (wheels, gears, turntables, turbines... ). All of these can be mathematically described as collections of particles moving in circles.",University Physics I Classical Mechanics.pdf "described as collections of particles moving in circles. In this section, I will first introduce the concept ofcentripetal force,w h i c hi st h ef o r c en e e d e d to bend an object’s trajectory into a circle (or an arc of a circle), and then I will also introduce an u m b e ro fq u a n t i t i e st h a ta r eu s e f u lf o rt h ed e s c r i p t i o no fcircular motion in general, such as angular velocity and angular acceleration. The dynamics ofrotational motion (questions having to do with rotational energy, and a new important quantity, angular momentum) will be the subject of the next chapter. 8.4.1 Centripetal acceleration and centripetal force As you know by now, the law of inertia states that, in the absence of external forces, an object will move with constant speed on a straight line. A circle is not a straight line, so an object will not naturally follow a circular path unless there is a force acting on it.",University Physics I Classical Mechanics.pdf "170 CHAPTER 8. MOTION IN TWO DIMENSIONS Another way to see this is to go back to the definition of acceleration. If an object has a velocity vector ⃗v(t)a tt h et i m et, and a different velocity vector⃗v(t +∆ t)a tt h el a t e rt i m et +∆ t,t h e ni t s average acceleration over the time interval ∆t is the quantity⃗vav =( ⃗v(t +∆ t) −⃗v(t))/∆t.T h i si s nonzero even if thespeed does not change (that is, even if the two velocity vectors havet h es a m e magnitude), as long as they have different directions, as you can see from Figure8.5 below. Thus, motion on a circle (or an arc of a circle), even at constant speed, is accelerated motion,a n d ,b y Newton’s second law, accelerated motion requires a force tomake it happen. θ R s v(t) v(t)v(t+Δt) v(t+Δt) Δv θ P Q Figure 8.5: A particle moving along an arc of a circle of radiusR. The positions and velocities at the times t and t +∆ t are shown. The diagram on the right shows the velocity difference, ∆⃗v= ⃗v(t +∆ t) −⃗v(t).",University Physics I Classical Mechanics.pdf "t and t +∆ t are shown. The diagram on the right shows the velocity difference, ∆⃗v= ⃗v(t +∆ t) −⃗v(t). We can find out how large this acceleration, and the associatedf o r c e ,h a v et ob e ,b ya p p l y i n ga little geometry and trigonometry to the situation depictedin Figure8.5.H e r eap a r t i c l ei sm o v i n g along an arc of a circle of radiusr,s ot h a ta tt h et i m et it is at point P and at the later timet+∆t it is at point Q. The length of the arc between P and Q (the distance it has traveled) iss = Rθ, where the angleθ is understood to be in radians. I have assumed the speed to be constant, so the magnitude of the velocity vector,v,i sj u s te q u a lt ot h er a t i oo ft h ed i s t a n c et r a v e l e d( a l o n gt he circle), to the time elapsed:v = s/∆t. Despite the speed being constant, the motion is accelerated,a sIj u s ts a i da b o v e ,b e c a u s et h e direction of the velocity vector changes. The diagram on theright shows the velocity difference",University Physics I Classical Mechanics.pdf "direction of the velocity vector changes. The diagram on theright shows the velocity difference vector ∆⃗v= ⃗v(t +∆ t) − ⃗v(t). We can get its length from trigonometry: if we split the angle θ in half, we get two right triangles, and for each of them|∆⃗v|/2= v sin(θ/2). Thus, we have |⃗aav| = |∆⃗v| ∆t = 2v sin(θ/2) ∆t (8.25) for the magnitude of the average acceleration vector. The instantaneous acceleration is obtained by taking the limit of this expression as ∆t → 0. In this limit, the angleθ = s/R = v∆t/R becomes",University Physics I Classical Mechanics.pdf "8.4. MOTION ON A CIRCLE (OR PART OF A CIRCLE) 171 very small, and we can use the so-called “small angle approximation,” which states that sinx ≃ x when x is small and expressed in radians. Therefore, by Eq. (8.25), |⃗aav| = 2v sin(θ/2) ∆t ≃ vθ ∆t = v2∆t/R ∆t (8.26) This expression becomes exact as ∆t → 0, and then ∆t cancels out, showing the instantaneous acceleration has magnitude |⃗a| = ac = v2 R (8.27) This acceleration is called thecentripetal acceleration,w h i c hi sw h yIh a v ed e n o t e di tb yt h es y m b o l ac.T h e r e a s o n f o r t h a t n a m e i s t h a t i t i salways pointing towards the center of the circle.Y o u can kind of see this from Figure8.5:i fy o ut a k et h ev e c t o r∆⃗vshown there, and move it (without changing its direction, so it stays ‘parallel to itself”) tothe midpoint of the arc, halfway between points P and Q, you will see that it does point almost straightto the center of the circle. (A more",University Physics I Classical Mechanics.pdf "points P and Q, you will see that it does point almost straightto the center of the circle. (A more mathematically rigorous proof of this fact, using calculus,w i l lb ep r e s e n t e di nt h en e x tc h a p t e r , section 9.3.) The force ⃗Fc needed to provide this acceleration is called thecentripetal force,a n db yN e w t o n ’ s second law it has to satisfy⃗Fc = m⃗ ac.T h u s ,t h ec e n t r i p e t a lf o r c eh a sm a g n i t u d e Fc = mac = mv2 R (8.28) and, like the acceleration⃗ac,i sa l w a y sd i r e c t e dt o w a r d st h ec e n t e ro ft h ec i r c l e . Physically, the centripetal forceFc,a sg i v e nb yE q .(8.28), is what it takes to bend the trajectory so as to keep it precisely on an arc of a circle of radiusR and with constant speedv.N o t et h a t ,s i n c e ⃗Fc is always perpendicular to the displacement (which, over anys h o r tt i m ei n t e r v a l ,i se s s e n t i a l l y",University Physics I Classical Mechanics.pdf "⃗Fc is always perpendicular to the displacement (which, over anys h o r tt i m ei n t e r v a l ,i se s s e n t i a l l y tangent to the circle), it doesno work on the object, and therefore (by Eq. (7.11)) its kinetic energy does not change, sov does indeed stay constant when the centripetal force equalsthe net force. Note also that “centripetal” is just a job description: it isnot an e wt y p eo ff o r c e . I na n yg i v e n situation, the role of the centripetal force will be played byo n eo ft h ef o r c e sw ea r ea l r e a d yf a m i l i a r with, such as the tension on a rope (or an appropriate component thereof) when you are swinging an object in a horizontal circle, or gravity in the case of themoon or any other satellite. At this point, if you have never heard about the centripetal force before, you may be feeling a little confused, since you almost certainly have heard, instead, about a so-calledcentrifugal force that",University Physics I Classical Mechanics.pdf "confused, since you almost certainly have heard, instead, about a so-calledcentrifugal force that tends to push spinning things away from the center of rotation. In fact, however, this “centrifugal force” does not really exist: the “force” that you may feel pushing you towards the outside of a curve when you ride in a vehicle that makes a sharp turn is really nothing but your own inertia—your body “wants” to keep moving on a straight line, but the car, bybending its trajectory, is preventing it from doing so. The impression that you get that you would flyradially out, as opposed to along a tangent, is also entirely due to the fact that the reference frame you are in (the car) is continuously",University Physics I Classical Mechanics.pdf "172 CHAPTER 8. MOTION IN TWO DIMENSIONS changing its direction of motion. You will find this effect illustrated in some detail in an example in the “Advanced Topics” section, if you want to look at it in more depth. On the other hand, getting a car to safely negotiate a turn is actually an important example of a situation that requires a definitecentripetal force. On a flat surface (see the “Advanced Topics” section for a treatment of a banked curve!), you rely entirelyo nt h ef o r c eo fs t a t i cf r i c t i o nt ok e e p you on the track, which can typically be modeled as an arc of a circle with some radiusR.S o , i f you are traveling at a speedv,y o un e e dFs = mv2/R.R e c a l l i n g t h a t t h e f o r c e o f s t a t i c f r i c t i o n cannot exceed µsFn,a n dt h a to nafl a ts u r f a c ey o uw o u l dj u s th a v eFn = Fg = mg,y o us e ey o u need to keepmv2/R smaller thanµsmg;o r ,c a n c e l i n gt h em a s s , v2 R <µ sg (8.29)",University Physics I Classical Mechanics.pdf "need to keepmv2/R smaller thanµsmg;o r ,c a n c e l i n gt h em a s s , v2 R <µ sg (8.29) This is the condition that has to hold in order to be able to maket h et u r ns a f e l y . T h em a x i m u m speed is then vmax = √ µsgR,w h i c h ,a sy o uc a ns e e ,w i l ld e p e n do nt h es t a t eo ft h er o a d( f or instance, if the road is wet the coefficientµs will be smaller). The posted, recommended speed will typically take this into consideration and will be as low as ith a st ob et ok e e py o us a f e . N o t i c et h a t the left-hand side of Eq. (8.29)i n c r e a s e sa st h esquare of the speed, so doubling your speed makes that term four times larger! Do not even think of taking a turnat 60 mph if the recommended speed is 30, and do not exceed the recommended speedat all if the road is wet or your tires are worn. 8.4.2 Kinematic angular variables Consider a particle moving on a circle, as in Figure8.6 below (next page). Of course, we can",University Physics I Classical Mechanics.pdf "worn. 8.4.2 Kinematic angular variables Consider a particle moving on a circle, as in Figure8.6 below (next page). Of course, we can just use the regular, cartesian coordinates,x and y,t od e s c r i b ei t sm o t i o n . B u t ,i naw a y ,t h i si s carrying around more information than we typically need, andi ti sa l s on o tv e r yt r a n s p a r e n t : a value ofx and y does not immediately tell us how far the object has traveled along the circle itself. Instead, the most convenient way to describe the motion of thep a r t i c l e ,i fw ek n o wt h er a d i u so f the circle, is to give theangle θ that the position vector makes with some reference axis at any given time, as shown in Fig.8.6.I fw ec h o o s et h ex axis as the reference, then the conversion from ad e s c r i p t i o nb a s e do nt h er a d i u sR and the angleθ to a description in terms ofx and y is simply x = R cos θ y = R sin θ (8.30)",University Physics I Classical Mechanics.pdf "ad e s c r i p t i o nb a s e do nt h er a d i u sR and the angleθ to a description in terms ofx and y is simply x = R cos θ y = R sin θ (8.30) so knowing the functionθ(t)w ec a ni m m e d i a t e l yg e tx(t)a n dy(t), if we need them. (Note: in this section I am using an uppercaseR for the magnitude of the position vector, to emphasize that it is a constant, equal to the radius of the circle.)",University Physics I Classical Mechanics.pdf "8.4. MOTION ON A CIRCLE (OR PART OF A CIRCLE) 173 + r v P (x,y) x y R sin θθ R cos θ Figure 8.6: A particle moving on a circle. The position vector has lengthR,s ot h ex and y coordinates are R cos θ and R sin θ, respectively. The conventional positive direction of motion is indicated. The velocity vector is always, as usual, tangent to the trajectory. Although the angleθ itself is not a vector quantity, nor a component of a vector, iti sc o n v e n i e n t to allow for the possibility that it might be negative. The standard convention is thatθ grows in the counterclockwise direction from the reference axis, andd e c r e a s e si nt h ec l o c k w i s ed i r e c t i o n . O f course, you can always get to any angle by coming from either direction, so the angle by itself does not tell you how the particle got there. Information on the direction of motion at any given time is best captured by the concept of theangular velocity,w h i c hw er e p r e s e n tb yt h es y m b o lω and",University Physics I Classical Mechanics.pdf "is best captured by the concept of theangular velocity,w h i c hw er e p r e s e n tb yt h es y m b o lω and define in a manner analogous to the way we defined the ordinary velocity: if ∆θ = θ(t +∆ t) −θ(t) is theangular displacement over a time ∆t,t h e n ω =l i m ∆t→0 ∆θ ∆t = dθ dt (8.31) The standard convention is also to use radians as an angle measure in this context, so that the units ofω will be radians per second, or rad/s. Note that the radian is adimensionless unit, so it “disappears” from a calculation when the final result does notc a l lf o ri t( a si nE q .(8.35)b e l o w ) . For motion with constant angular velocity, we clearly will have θ(t)= θi + ω(t − ti)o r ∆ θ = ω∆t (constant ω)( 8 . 3 2 )",University Physics I Classical Mechanics.pdf "174 CHAPTER 8. MOTION IN TWO DIMENSIONS where ω is positive for counterclockwise motion, and negative for clockwise. (There is as e n s ei n which it is useful to think ofω as a vector, but, since it is not immediately obvious how or why, I will postpone discussion of this next chapter, after I have introduced angular momentum.) When ω changes with time, we can introduce anangular acceleration α,d e fi n e d ,a g a i n ,i nt h e obvious way: α =l i m ∆t→0 ∆ω ∆t = dω dt (8.33) Then for motion with constant angular acceleration we have the formulas ω(t)= ωi + α(t − ti)o r ∆ ω = α∆t (constant α) θ(t)= θi + ωi(t − ti)+ 1 2α(t − ti)2 or ∆ θ = ωi∆t + 1 2α(∆t)2 (constant α)( 8 . 3 4 ) Equations (8.32)a n d(8.34)c o m p l e t e l yp a r a l l e lt h ec o r r e s p o n d i n ge q u a t i o n sf o rm o t ion in one dimension that we saw in Chapter 1. In fact, of course, a circlei sj u s tal i n et h a th a sb e e nb e n t",University Physics I Classical Mechanics.pdf "dimension that we saw in Chapter 1. In fact, of course, a circlei sj u s tal i n et h a th a sb e e nb e n t in a uniform way, so the distance traveled along the circle itself is simply proportional to the angle swept by the position vector⃗r.A sa l r e a d yp o i n t e do u ti nc o n n e c t i o nw i t hF i g .8.5,i fw ee x p r e s s e d θ in radians then the length of the arc corresponding to an angular displacement ∆θ would be s = R|∆θ| (8.35) so multiplying Eqs. (8.32)o r( 8.34)b y R directly gives the distance traveled along the circle in each case. Δθ s r(t) r(t+∆t) ∆r Figure 8.7: A small angular displacement. The distance traveled along the circle,s = R∆θ, is almost identical to the straight-line distance|∆⃗r| between the initial and final positions; the two quantities become the same in the limit ∆t → 0. Figure 8.7 shows that, for very small angular displacements, it does notm a t t e rw h e t h e rt h ed i s t a n c e",University Physics I Classical Mechanics.pdf "the same in the limit ∆t → 0. Figure 8.7 shows that, for very small angular displacements, it does notm a t t e rw h e t h e rt h ed i s t a n c e traveled is measured along the circle itself or on a straightline; that is,s ≃| ∆⃗r|.D i v i d i n gb y∆t, using Eq. (8.35)a n dt a k i n gt h e∆t → 0l i m i tw eg e tt h ef o l l o w i n gu s e f u lr e l a t i o n s h i pb e t w e e nt h e angular velocity and the instantaneous speedv (defined in the ordinary way as the distance traveled per unit time, or the magnitude of the velocity vector): |⃗v| = R|ω| (8.36)",University Physics I Classical Mechanics.pdf "8.5. IN SUMMARY 175 As we shall see later, the productRα is also a useful quantity. It isnot,h o w e v e r ,e q u a lt ot h em a g - nitude of the acceleration vector, but only one of its two components, thetangential acceleration: at = Rα (8.37) The sign convention here is that a positiveat represents a vector that is tangent to the circle and points in the direction of increasingθ (that is, counterclockwise); the full acceleration vectoris equal to the sum of this vector and thecentripetal accelerationvector, introduced in the previous subsection, which always points towards the center of the circle and has magnitude ac = v2 R = Rω2 (8.38) (making use of Eqs. (8.29)a n d(8.36)). These results will be formally established in the next chapter, after we introduce the vector product, although you could also verify them right now—if you are familiar enough with derivatives at this point—by using thechain rule to take the derivatives with",University Physics I Classical Mechanics.pdf "familiar enough with derivatives at this point—by using thechain rule to take the derivatives with respect to time of the components of the position vector, as given in Eq. (8.30)( w i t hθ = θ(t), an arbitrary function of time). The main thing to remember about the radial and tangential components of the acceleration is that the radial component (the centripetal acceleration) isalways there for circular motion, whether the angular velocity is constant or not, whereas the tangentialacceleration is only nonzero if the angular velocity is changing, that is to say, if the particle is slowing down or speeding up as it turns. 8.5 In summary 1. To solve problems involving motion in two dimensions, youshould break up all the forces into their components along a suitable pair of orthogonal axes, then apply Newton’s second law to each direction separately:Fnet,x = max, Fnet,y = may.I t i sc o n v e n i e n tt oc h o o s ey o u r axes so that at least one of eitherax or ay will be zero.",University Physics I Classical Mechanics.pdf "axes so that at least one of eitherax or ay will be zero. 2. An object thrown with some horizontal velocity componentand moving under the influence of gravity alone (near the surface of the Earth) will follow aparabola in a vertical plane. This results from horizontal motion with constant velocity,a n dv e r t i c a lm o t i o nw i t hc o n s t a n t acceleration equal to−g,a sd e s c r i b e db ye q u a t i o n s(8.7). 3. To analyze motion up or down an inclined plane, it is convenient to choose your axes so that the x axis lies along the surface, and they axis is perpendicular to the surface. Then, ifθ is the angle the incline makes with the horizontal, the force ofgravity on the object will also make an angleθ with thenegative y axis. 4. Recall that the force of kinetic friction will always pointi nad i r e c t i o no p p o s i t et h em o t i o n , and will have magnitudeFk = µkFn,w h e r e a st h ef o r c eo fs t a t i cf r i c t i o nw i l la l w a y st a k e",University Physics I Classical Mechanics.pdf "176 CHAPTER 8. MOTION IN TWO DIMENSIONS on whatever value is necessary to keep the object from moving,u pt oam a x i m u mv a l u eo f Fs max = µsFn. 5. An object moving in an arc of a circle of radiusR with a speedv experiences a centripetal acceleration of magnitude ac = v2/R.“ C e n t r i p e t a l ” m e a n s t h e c o r r e s p o n d i n g v e c t o r p o i n t s towards the center of the circle. Accordingly, to get an object of massm to move on such a path requires acentripetal forceFc = mv2/R. 6. To describe the motion of a particle on a circle of radiusR,w eu s ea na n g u l a rp o s i t i o nv a r i a b l e θ(t), in terms of which we define angular displacement ∆θ,a n g u l a rv e l o c i t yω = dθ/dt,a n d angular acceleration α = dω/dt.T h e e q u a t i o n s f o r m o t i o n i n o n e d i m e n s i o n w i t h c o n s t a n t acceleration apply to circular motion with constantα with the changesx → θ, v → ω and a → α.",University Physics I Classical Mechanics.pdf "acceleration apply to circular motion with constantα with the changesx → θ, v → ω and a → α. 7. The displacement along the circle,s,c o r r e s p o n d i n gt oa na n g u l a rd i s p l a c e m e n t∆θ,i s( i n magnitude) s = R|∆θ|.S i m i l a r l y ,t h e( l i n e a r )s p e e do ft h ep a r t i c l e( m a g n i t u d eofi t sv e l o c i t y vector) is equal tov = R|ω|,a n dt h et a n g e n t i a lc o m p o n e n to fi t sa c c e l e r a t i o nv e c t o rh as magnitude at = R|α|.I n a d d i t i o n t o t h i s , t h e p a r t i c l e a l w a y s h a s a r a d i a l a c c e l eration component ar equal to the centripetal acceleration of point 5 above.",University Physics I Classical Mechanics.pdf "8.6. EXAMPLES 177 8.6 Examples You will work out a rather thorough example of pro jectile motion in the lab, and Section 8.3 above already has the problem of a block sliding down an inclined plane worked out for you. The following example will show you how to use the kinematic angular variables of section8.4.2 to deal with motion in a circle, and to calculate the centripetal acceleration in a simple situation. The section on Advanced Topics deals with a few more challenging(but interesting) examples. 8.6.1 The penny on the turntable Suppose that you have a penny sitting on a turntable, a distance d =1 0 c mf r o mt h ea x i so f rotation. Assume the turntable starts moving, steadily spinning up from rest, in such a way that after 1.3s e c o n d si th a sr e a c h e di t sfi n a lr o t a t i o nr a t eo f3 3.3r p m ( r e v o l u t i o n s pe r m i n u t e ) . A n s w e r the following questions:",University Physics I Classical Mechanics.pdf "the following questions: (a) What was the turntable’s angular acceleration over the time interval fromt =0t o t =1 .3s ? (b) How many turns (complete and fractional) did the turntable make before reaching its final velocity? (c) Assuming the penny has not slipped, what is its centripetal acceleration once the turntable reaches its final velocity? (d) How large does the static friction coefficient between thepenny and the turntable have to be for the penny not to slip throughout this process? Solution (a) We are told that the turntable spins up “steadily” fromt =0t o t =1 .3s . T h e w o r d “ s t e a d i l y ” here is a keyword that means the (angular) acceleration is constant (that is, the angular velocity increases at a constant rate). What is this rate? For constantα,w eh a v e ,f r o mE q .(8.34), α =∆ ω/∆t.H e r e ,t h e t i m ei n t e r v a l ∆t =1 .3, s o w e j u s t n e e d t o fi n d ∆ω.B yd e fi n i t i o n , ∆ω = ωf − ωi,a n ds i n c ew es t a r tf r o mr e s t ,",University Physics I Classical Mechanics.pdf "∆t =1 .3, s o w e j u s t n e e d t o fi n d ∆ω.B yd e fi n i t i o n , ∆ω = ωf − ωi,a n ds i n c ew es t a r tf r o mr e s t , ωi =0 . S ow ej u s tn e e dωf .W ea r et o l dt h a t“ t h efi n a lr o t a t i o nr a t e ”i s3 3.3r p m ( r e v o l u t i o n s pe r minute). What does this tell us about the angular velocity? The angular velocity is the number of radians an object movingi nac i r c l e( s u c ha st h ep e n n yi n this example) travels per second. A complete turn around thecircle, orrevolution,c o r r e s p o n d st o 180◦,o re q u i v a l e n t l y2π radians. So, 33.3r e v o l u t i o n s ,o rt u r n s ,p e rm i n u t em e a n s3 3.3×2π radians per 60s, that is, ωf = 33.3 × 2π rad 60 s =3 .49 rad s (8.39)",University Physics I Classical Mechanics.pdf "178 CHAPTER 8. MOTION IN TWO DIMENSIONS The angular acceleration, therefore, is α = ∆ω ∆t = ωf − ωi ∆t = 3.49 rad/s 1.3s =2 .68 rad s2 (8.40) (b) The way to answer this question is to find out the total angular displacement, ∆θ,o ft h ep e n n y over the time interval considered (fromt =0t o t =1 .3s ) , a n d t h e n c o n v e r t t h i s t o a n u m be r o f turns, using the relationship 2π rad = 1 turn. To get ∆θ,w es h o u l du s et h ee q u a t i o n(8.34)f o r motion with constant angular acceleration: ∆θ = ωi∆t + 1 2α(∆t)2 (8.41) We start from rest, soωi =0 ,W ek n o w∆t =1 .3s , a n d w e j u s t c a l c u l a t e dα =2 .68 rad/s2,s ow e have ∆θ = 1 2 × 2.68 rad s2 × (1.3s )2 =2 .26 rad (8.42) This is less than 2π radians, so it takes the turntable less than one complete revolution to reach its final angular velocity. To be precise, since 2π radians is one turn, 2.26 rad will be 2.26/(2π)t u r n s , which is to say, 0.36 turns—a little more than 1/3o fat u r n .",University Physics I Classical Mechanics.pdf "which is to say, 0.36 turns—a little more than 1/3o fat u r n . (c) For the questions above, the penny just served as a markerto keep track of the revolutions of the turntable. Now, we turn to the dynamics of the motion of thep e n n yi t s e l f . F i r s t ,t og e ti t s angular acceleration, we can just use Eq. (8.38), in the form ac = Rω2 =0 .1m × ( 3.49 rad s ) 2 =1 .22 m s2 (8.43) noticing that R,t h er a d i u so ft h ec i r c l eo nw h i c ht h ep e n n ym o v e s ,i sj u s tt h edistance d to the axis of rotation that we were given at the beginning of the problem, andω,i t sa n g u l a rv e l o c i t y ,i s just the final angular velocity of the turntable (assuming, asw ea r et o l d ,t h a tt h ep e n n yh a sn o t slipped relative to the turntable). (d) Finally, how about the force needed to keep the penny fromslipping—that is to say, to keep it moving with the turntable? This is just the centripetal force needed “bend” the trajectory of",University Physics I Classical Mechanics.pdf "it moving with the turntable? This is just the centripetal force needed “bend” the trajectory of the penny into a circle of radiusR,s o Fc = mac,w h e r em is the mass of the penny andac is the centripetal acceleration we just calculated. Physically,we know that this force has to be provided by the static (as long as the penny does not slip!) friction force between the penny and the turntable. We know thatFs ≤ µsFn,a n dw eh a v ef o rt h en o r m a lf o r c e ,i nt h i ss i m p l es i t u a t i o n ,just Fn = mg. Therefore, settingFs = mac we have: mac = Fs ≤ µsFn = µsmg (8.44) This is equivalent to the single inequalitymac ≤ µsmg,w h e r ew ec a nc a n c e lo u tt h em a s so ft h e penny to conclude that we must haveac ≤ µsg,a n dt h e r e f o r e µs ≥ ac g = 1.22 m/s2 9.8m / s2 =0 .124 (8.45)",University Physics I Classical Mechanics.pdf "8.7. ADVANCED TOPICS 179 8.7 Advanced Topics 8.7.1 Staying on track (This example studies a situation that you could easily setupe x p e r i m e n t a l l ya th o m e( y o uc a nu s e aw h o l es p h e r ei n s t e a do fah a l f - s p h e r e ! ) ,a l t h o u g ht og e tt hen u m b e r st ow o r ko u ty o ur e a l l yn e e d to make sure that the friction between the surface and the object you choose is truly negligible. Essentially the same mathematical approach could be used tostudy the problem of a skier going over a mogul, or a car losing contact with the road if it is goingt o of a s to v e rah i l l . ) As m a l lo b j e c ti sp l a c e da tt h et o po fas m o o t h( f r i c t i o n l e s s )dome shaped like a half-sphere of radius R,a n dg i v e nas m a l lp u s hs oi ts t a r t ss l i d i n gd o w nt h ed o m e ,i n itially moving very slowly (vi ≃ 0), but picking up speed as it goes, until at some point it fliesoff the surface.",University Physics I Classical Mechanics.pdf "(vi ≃ 0), but picking up speed as it goes, until at some point it fliesoff the surface. (a) At that point, when the object loses contact with the surface, what is the angle that its position vector (with origin at the center of the sphere) makes with thev e r t i c a l ? (b) How far away from the sphere does the object land? θ θmax F n sb FG Ebθ θ (a) (b) Figure 8.8: An object (small block) sliding on a hemispherical dome. The drawing (a) shows the angle θmax at which the object flies off (red dashed line), and a smaller, generic angle θ. The drawing (b) shows the free-body diagram corresponding to the angleθ. Solution (a) As we saw in Section 8.4, in order to get an object to move along an arc of a circle, a centripetal force of magnitude mv2/r is required. As long as our object is in contact with the surface, the forces acting on it are the normal force (which points along the radial direction, so it makes a",University Physics I Classical Mechanics.pdf "forces acting on it are the normal force (which points along the radial direction, so it makes a negative contribution to the centrifugal force) and gravity, which has a componentmg cos θ along the radius, towards the center of the circle (see Figure8.8(b), the dashed light blue line). So, the centripetal force equation reads mv2 R = mg cos θ − Fn (8.46)",University Physics I Classical Mechanics.pdf "180 CHAPTER 8. MOTION IN TWO DIMENSIONS The next thing we need to do is find the value of the speedv for a given angleθ.I f w e t r e a t the object as a particle, its only energy is kinetic energy, and ∆K = Wnet (Eq. (7.11)), where Wnet is the work done on the particle by the net force acting on it. The normal force is always perpendicular to the displacement, so it does no work, whereas gravity is always vertical and does work Wgrav = −mg∆y (taking upwards as positive, so ∆y is negative). In fact, from Figure8.8(a) (follow the dashed blue line) you can see that for a given angle θ,t h eh e i g h to ft h eo b j e c ta b o v e the ground isR cos θ,s ot h ev e r t i c a ld i s p l a c e m e n tf r o mi t si n i t i a lp o s i t i o ni s ∆y = −(R − R cos θ)( 8 . 4 7 ) Hence we have, for the change in kinetic energy, 1 2mv2 − 1 2mv2 i = mgR − mgR cos θ (8.48) Assuming, as we are told in the text of the problem, thatvi ≃ 0, we getv2 ≃ 2gR −2gR cos θ,a n d using this in Eq. (8.46)",University Physics I Classical Mechanics.pdf "i = mgR − mgR cos θ (8.48) Assuming, as we are told in the text of the problem, thatvi ≃ 0, we getv2 ≃ 2gR −2gR cos θ,a n d using this in Eq. (8.46) 2mg − 2mg cos θ = mg cos θ − Fn (8.49) or Fn =3 mg cos θ −2mg.T h i s s h o w s t h a tFn starts out (whenθ =0 )h a v i n gi t su s u a lv a l u eo fmg, and then it becomes progressively smaller as the object slides down. The point where the object loses contact with the surface is whenFn =0 ,a n dt h a th a p p e n sf o r 3c o sθmax =2 ( 8 . 5 0 ) or θmax =c o s−1(2/3) = 48.2◦. Recalling that ∆y = −(R −R cos θ), we see that when cosθ =2 /3, the object has fallen a distance R/3; put otherwise, its height above the ground at the time it flies off is 2R/3, or 2/3o ft h ei n i t i a l height. (b) This is just a projectile problem now. We just have to find the values of the initial conditions (xi,y i,v x,i and vy,i)a n ds u b s t i t u t ei nt h ee q u a t i o n s(8.5). By inspecting the figure, you can see that, at the time the object flies off,",University Physics I Classical Mechanics.pdf "that, at the time the object flies off, xi = R sin θmax =0 .745R yi = R cos θmax =0 .667R (8.51) Also, we found above thatv2 ≃ 2gR − 2gR cos θ,a n dw h e nθ = θmax this gives v2 =0 .667gR, or v =0 .816√ gR.T h e p r o j e c t i o n a n g l e i n t h i s c a s e i s−θmax;t h a ti s ,t h ei n i t i a lv e l o c i t yo ft h e projectile (dashed red arrow in Figure8.8(a)) is at an angle 48.2◦ below the positivex axis, so we have: vx,i = vi cos θmax =0 .544 √ gR vy,i = −vi sin θmax = −0.609 √ gR (8.52)",University Physics I Classical Mechanics.pdf "8.7. ADVANCED TOPICS 181 Now we just use these results in Eqs. (8.5). Specifically, we want to know how long it takes for the object to reach the ground, so we use the last equation (8.5)w i t hy =0a n ds o l v ef o rt: 0= yi + vy,it − 1 2gt2 (8.53) The result is t =0 .697 √ R/g.( Y o u d o n o t n e e d t o c a r r y t h e “g”t h r o u g h o u t ;i tw o u l db eO K to substitute 9.8m / s2 for it. I have just kept it in symbolic form so far to make it clear that the quantities we derive will have the right units.) Substituting this in the equation forx,w eg e t x = xi + vx,it =0 .745R +0 .544 √ gR × 0.697 √ R/g =1 .125R (8.54) (Note how theg cancels, so we would get the same result on any planet!) Sincethe sphere has a radius R,t h eo b j e c tf a l l sad i s t a n c e0.125R away from the sphere. 8.7.2 Going around a banked curve Roadway engineers often bank a curve, especially if it is a very tight turn, so the cars will not have",University Physics I Classical Mechanics.pdf "8.7.2 Going around a banked curve Roadway engineers often bank a curve, especially if it is a very tight turn, so the cars will not have to rely on friction alone to provide the required centripetalf o r c e . T h ep i c t u r es h o w sac a rg o i n g around such a curve, which we can model as an arc of a circle of radius r.I nt e r m so fr,t h eb a n k angle θ,a n dt h ec o e ffi c i e n to fs t a t i cf r i c t i o n ,fi n dt h em a x i m u ms a f espeed around the curve. F n sc FG Ec F s sc x y θ F n sc FG Ec F s sc x y a Figure 8.9: A car going around a banked curve (sketch and free-body diagram). The center of the circle is towards the right. The figure shows the appropriate choice of axes for this problem. The criterion is, again, to choose the axes so that one of them will coincide with the direction oft h ea c c e l e r a t i o n . I nt h i sc a s e ,t h e acceleration is all centripetal, that is to say, pointing, horizontally, towards the center of the circle",University Physics I Classical Mechanics.pdf "acceleration is all centripetal, that is to say, pointing, horizontally, towards the center of the circle on which the car is traveling. It may seem strange to see the force of static friction pointing down the slope, but recall that for a car turning on a flat surface it would have been pointing inwards (towards the center of the circle),",University Physics I Classical Mechanics.pdf "182 CHAPTER 8. MOTION IN TWO DIMENSIONS so this is the natural extension of that. In general, you should always try to imagine which way the object would slide if friction disappeared altogether:⃗Fs must point in the directionopposite that. Thus, for a car traveling at a reasonable speed, the directioni nw h i c hi tw o u l ds k i di su pt h es l o p e , and that means⃗Fs must point down the slope. But, for a car just sitting still onthe tilted road, ⃗Fs must point upwards, and we shall see in a moment that in generalt h e r ei sam i n i m u mv e l o c i t y required for the force of static friction to point in the direction we have chosen. Apart from this, the main difference with the flat surface case ist h a tn o wt h en o r m a lf o r c eh a sa component along the direction of the acceleration, so it helps to keep the car moving in a circle. On the other hand, note that we now lose (for centripetal purposes) a little bit of the friction force,",University Physics I Classical Mechanics.pdf "On the other hand, note that we now lose (for centripetal purposes) a little bit of the friction force, since it is pointing slightly downwards. This, however, is more than compensated for by the fact that the normal force is greater now than it would be for a flat surface, since the car is now, so to speak, “driving into” the road somewhat. The dashed blue lines in the free-body diagram are meant to indicate that the angleθ of the bank is also the angle between the normal force and the positivey axis, as well as the angle that⃗Fs makes below the positivex axis. It follows that the components of these two forces alongt h ea x e s shown are: Fn x = Fn sin θ Fn y = Fn cos θ (8.55) and Fs x = Fs cos θ Fn y = −Fs sin θ (8.56) The vertical force equation is then: 0= may = Fn y + Fs y − FG = Fn cos θ − Fs sin θ − mg (8.57) This shows thatFn =( mg + Fs sin θ)/ cos θ is indeed greater than justmg for this problem, and",University Physics I Classical Mechanics.pdf "y + Fs y − FG = Fn cos θ − Fs sin θ − mg (8.57) This shows thatFn =( mg + Fs sin θ)/ cos θ is indeed greater than justmg for this problem, and must increase as the angleθ increases (since cosθ decreases with increasing θ). The horizontal equation is: max = Fn x + Fs x = Fn sin θ + Fs cos θ = mv2 r (8.58) where I have already substituted the value of the centripetala c c e l e r a t i o nf o rax.E q u a t i o n s(8.57) and (8.58)f o r mas y s t e mt h a tn e e d st ob es o l v e df o rt h et w ou n k n o w n sFn and Fs.T h e r e s u l ti s : Fn = mg cos θ + mv2 r sin θ Fs = −mg sin θ + mv2 r cos θ (8.59)",University Physics I Classical Mechanics.pdf "8.7. ADVANCED TOPICS 183 Note that the second equation would haveFs becoming negative ifv2 x 1,t h ed e n o m i n a t o ri nE q .(10.5)i sj u s tt h ed i s t a n c eb e t w e e nt h et w o particles, and the potential energy function could be written, in three dimensions, as UG(r12)= −Gm1m2 r12 (10.6) where r12 = |⃗r2 − ⃗r1|,a n dIh a v es e tt h ec o n s t a n tC equal to zero. This means that the potential",University Physics I Classical Mechanics.pdf "UG(r12)= −Gm1m2 r12 (10.6) where r12 = |⃗r2 − ⃗r1|,a n dIh a v es e tt h ec o n s t a n tC equal to zero. This means that the potential energy of the system is alwaysnegative,w h i c hi s ,o nt h ef a c eo fi t ,as t r a n g er e s u l t .H o w e v e r ,t h e r e is no way to choose the constantC in (10.5)t h a tw i l lp r e v e n tt h a t : n om a t t e rh o wb i ga n dp o s i t i v e C might be, the first term in (10.5)c a na l w a y sb e c o m el a r g e r( i nm a g n i t u d e )a n dn e g a t i v e ,i ft he particles are very close together. So we might as well chooseC =0 ,w h i c h ,a tl e a s t ,g i v e su st h e somewhat comforting result that the potential energy of thesystem is zero when the particles are “infinitely” distant from each other—that is to say, so far apart that they do not feel a force from each other any more. But Eq. (e10.5) also makes sense in a different way: namely, it shows that the system’s potential",University Physics I Classical Mechanics.pdf "each other any more. But Eq. (e10.5) also makes sense in a different way: namely, it shows that the system’s potential energy increases as the particles are moved farther apart. Indeed, we expect,physically, that if you separate the particles by a great distance and then release them, they will pick up a lot of speed as they approach each other; or, put differently, that the force doing work over a large distance will give them a large amount of kinetic energy—which must come from the system’s potential energy. But, in fact, mathematically, Eq. (10.6)a g r e e sw i t ht h i se x p e c t a t i o n : f o ra n yfi n i t ed i s t a n c e ,UG is negative, and it gets smallerin magnitude as the distance increases, which means algebraically",University Physics I Classical Mechanics.pdf "10.1. THE INVERSE-SQUARE LAW 225 it increases (since a number like, say,−0.1i s ,i nf a c t ,g r e a t e rt h a nan u m b e rl i k e−10). So as the particles are moved farther and farther apart, the potentiale n e r g yo ft h es y s t e mdoes increase—all the way up to a maximum value of zero! Still, even if it makes sense mathematically, the notion of a“negative energy” is hard to wrap your mind around. I can only offer you two possible ways to look at it.One is to simply not think of potential energy as being anything like a “substance,” but just an accounting device that we use to keep track of the potential that a system has to do work for us—or (more or less equivalently) to give us kinetic energy, which is always positive and hence mayb et h o u g h to fa st h e“ r e a l ”e n e r g y . From this point of view, whetherU is positive or negative does not matter: all that matters is the",University Physics I Classical Mechanics.pdf "From this point of view, whetherU is positive or negative does not matter: all that matters is the change ∆U,a n dw h e t h e rt h i sc h a n g eh a sas i g nt h a tm a k e ss e n s e .T h i s ,a tleast, is the case here, as I have argued in the paragraph above. The other perspective is almost opposite, and based on Einstein’s theory of relativity: in this theory, the total energy of a system is indeed “something like a substance,” in that it is directly related to the system’s total inertia,m,t h r o u g ht h ef a m o u se q u a t i o nE = mc2.F r o m t h i s p o i n t o f v i e w , the total energy of a system of two particles, interacting gravitationally, at rest, and separated by a distancer12,w o u l db et h es u mo ft h eg r a v i t a t i o n a lp o t e n t i a le n e r g y( n e gative), and the two particles’ “rest energies,”m1c2 and m2c2: Etotal = m1c2 + m2c2 − Gm1m2 r12 (10.7)",University Physics I Classical Mechanics.pdf "particles’ “rest energies,”m1c2 and m2c2: Etotal = m1c2 + m2c2 − Gm1m2 r12 (10.7) and this quantitywill always be positive, unless one of the “particles” is a black hole and the other one is inside it3! Please note that we will not use equation (10.7)t h i ss e m e s t e ra ta l l ,s i n c ew ea r ec o n c e r n e d only with nonrelativistic mechanics here. In other words, wew i l ln o ti n c l u d et h e“ r e s te n e r g y ” in our calculations of a system’s total energy at all. However, if we did, we would find that a system whose rest energy is given by Eq. (10.7)d o e s ,i nf a c t ,h a v ea ni n e r t i at h a ti sless than the sum m1 + m2.T h i s s t r o n g l y s u g g e s t s t h a t t h e n e g a t i v i t yo f t h e p o t e n t i ale n e r g yi sn o tj u s ta mathematical convenience, but rather it reflects a fundamental physical fact. For a system of more than two particles, the total gravitational potential energy would be obtained",University Physics I Classical Mechanics.pdf "For a system of more than two particles, the total gravitational potential energy would be obtained by adding expressions like (10.6)o v e ra l lt h epairs of particles. Thus, for instance, for three particles one would have UG(⃗r1,⃗ r2,⃗ r3)= −Gm1m2 r12 − Gm1m3 r13 − Gm2m3 r23 (10.8) Al a r g em a s ss u c ha st h ee a r t h ,o ras t a r ,h a sa ni n t r i n s i ca m o unt of gravitational potential energy that can be calculated by breaking it up into small parts and performing a sum like (10.8)o v e ra l l the possible pairs of “parts.” (As usual, this sum is usuallyevaluated as an integral, by taking the limit of an infinite number of infinitesimally small parts.) This “self-energy” does not change with 3For a justification of this statement, please see the definition of the Schwarzschild radius, later on in this chapter.",University Physics I Classical Mechanics.pdf "226 CHAPTER 10. GRAVITY time, and hence does not need to be included in most energy calculations involving gravitational forces between extended objects. One thing that you may be wondering about, regarding Eq. (10.6)f o rt h ep o t e n t i a le n e r g yo fa pair of particles (or, for that matter, Eq. (10.1)f o rt h ef o r c e ) ,i sw h a th a p p e n sw h e nt h ed i s t a n c e r12 goes to zero, since the mathematical expression appears to become infinite. This is technically true, but, in practice, it would only be a problem for a pair oftrue point particles—objects that would literally be mathematical points, with no dimensionsat all. Such things may exist in some sense—electrons may well be an example—but they need to be described by quantum mechanics, which is an altogether different mathematical theory. For finite-sized ob jects, you cannot continue to use an equation like (10.6)( o r(10.1), for the force)",University Physics I Classical Mechanics.pdf "For finite-sized ob jects, you cannot continue to use an equation like (10.6)( o r(10.1), for the force) when you areunder the surface of the object. If you could dig a tunnel all the way down to the center of a hypothetical “earth” that had a constant density,t h ep o t e n t i a le n e r g yo ft h es y s t e m formed by this “earth” and a particle of massm,ad i s t a n c er from the center, would look as shown in Fig. 10.2.N o t i c e h o wUG becomes “flat,” indicating an equilibrium position (zero force), as r → 0. It stands to reason that the net gravitational force at thecenter of this model “earth” should be zero, since one would be pulled equally strongly inall directions by all the mass around. r/RE UG/mgRE Figure 10.2: Gravitational potential energy of a system formed by a particle ofmass m and a hypothetical earth with uniform density, a massM, and a radiusRE, as a function of the distancer between the particle",University Physics I Classical Mechanics.pdf "earth with uniform density, a massM, and a radiusRE, as a function of the distancer between the particle and the center of the “earth” (solid line). The dashed line shows theresult for a system of two (point-like) particles. The energyUG is expressed in units ofmgRE,w h e r eg = GM/R2 E. Finally, let me show you that the result (10.6)i sf u l l yc o n s i s t e n tw i t ht h ea p p r o x i m a t i o nUG = mgy that we have been using up till now near the surface of the earth. (If you are not interested in mathematical derivations, feel free to skip this next bit.)Consider a particle of massm that is",University Physics I Classical Mechanics.pdf "10.1. THE INVERSE-SQUARE LAW 227 initially on the surface of the earth, and then we move it to a height h above the earth. The change in potential energy, according to (10.6), is UG f − UG i = −GMEm RE + h + GMEm RE (10.9) If we write both terms with a common denominator, we get UG f − UG i = GMEm (RE + h)RE h ≃ GMEm R2 E h = mgh (10.10) The only approximation here has been to setRE + h ≃ RE in the denominator of this expression. Since RE is of the order of thousands of kilometers, this is an excellent approximation, as long as h is less than, say, a few hundred meters. 10.1.2 Types of orbits under an inverse-square force Consider a system formed by two particles (or two perfect, rigid spheres) interacting only with each other, through their gravitational attraction. Conservation of the total momentum tells us that the center of mass of the system is either at rest or moving with constant velocity. Let us assume that",University Physics I Classical Mechanics.pdf "center of mass of the system is either at rest or moving with constant velocity. Let us assume that one of the objects has a much greater mass,M,t h a nt h eo t h e r ,s ot h a t ,f o rp r a c t i c a lp u r p o s e s ,i t s center coincides with the center of mass of the whole system.This is not a bad approximation if what we are interested in is, for instance, the orbit of a planet around the sun. The most massive planet, Jupiter, has only about 0.001 times the mass of the sun. Accordingly, we will assume that the more massive object doesn o tm o v ea ta l l( b yw o r k i n gi ni t s center of mass reference frame, if necessary—note that, by our assumptions, this will be an inertial reference frame to a good approximation), and we will be concerned only with the motion of the less massive object under the forceF = GMm/r2,w h e r er is the distance between the centers of the two objects. Since this force is always pulling towards the center of the more massive object (it is",University Physics I Classical Mechanics.pdf "two objects. Since this force is always pulling towards the center of the more massive object (it is what is often called acentral force), its torque around that point is zero, and therefore the angular momentum, ⃗L,o ft h el e s sm a s s i v eb o d ya r o u n dt h ec e n t e ro fm a s so ft h es y s tem is constant. This is an interesting result: it tells us, for instance, that themotion is confined to a plane,t h es a m e plane that the vectors⃗rand ⃗vdefined initially, since their cross-product cannot change. In spite of this simplification, the calculation of the object’s trajectory, ororbit,r e q u i r e ss o m e fairly advanced mathematical techniques, except for the simplest case, which is that of a circular orbit of radius R.N o t e t h a t t h i s c a s e r e q u i r e s a v e r y p r e c i s e r e l a t i o n s h i p t ohold between the object’s velocity and the orbit’s radius, which we can get bysetting the force of gravity equal to the centripetal force: GMm R2 = mv2",University Physics I Classical Mechanics.pdf "object’s velocity and the orbit’s radius, which we can get bysetting the force of gravity equal to the centripetal force: GMm R2 = mv2 R (10.11)",University Physics I Classical Mechanics.pdf "228 CHAPTER 10. GRAVITY So, if we want to, say, put a satellite in a circular orbit around a central body of massM and at ad i s t a n c eR from the center of that body, we can do it, but only provided wegive the satellite an initial velocityv = √ GM/R in a direction perpendicular to the radius. But what if we were to release the satellite at the same distanceR, but with a different velocity, either in magnitude or direction? Too much speed would pull it away from the circle, so the distance to the center, r,w o u l dt e m p o r a r i l yi n c r e a s e ;t h i sw o u l di n c r e a s et h es y s t em’s potential energy and accordingly reduce the satellite’s velocity, so eventually it would getpulled back; then it would speed up again, and so on. You may experiment with this kind of thing yourself using thePhET demo at this link: https://phet.colorado.edu/en/simulation/gravity-and-orbits You will find that, as long as you do not give the satellite—or planet, in the simulation—too much",University Physics I Classical Mechanics.pdf "You will find that, as long as you do not give the satellite—or planet, in the simulation—too much speed (more on this later!) the orbit you get is, in fact, a closed curve, the kind of curve we callan ellipse.Ih a v ed r a w no n es u c he l l i p s ef o ry o ui nF i g .10.3. a b e a r P A O Figure 10.3: An elliptical orbit. The semimajor axis isa, the semiminor axis isb, and the eccentricity e = √ 1 − b2/a2 =0 .745 in this case.. The “center of attraction” (the sun, for instance, in the case of a planet’s or comet’s orbit) is at the point O. As a geometrical curve, any ellipse can be characterized by acouple of numbers,a and b,w h i c h are the lengths of thesemimajor and semiminor axes, respectively. These lengths are shown in the figure. Alternatively, one could specifya and a parameter known as theeccentricity,d e n o t e d by e (do not mistake this “e”f o rt h ec o e ffi c i e n to fr e s t i t u t i o no fC h a p t e r4 ! ) ,w h i c hi se qual to e = √",University Physics I Classical Mechanics.pdf "by e (do not mistake this “e”f o rt h ec o e ffi c i e n to fr e s t i t u t i o no fC h a p t e r4 ! ) ,w h i c hi se qual to e = √ 1 − b2/a2.I f a = b,o re =0 ,t h ee l l i p s eb e c o m e sac i r c l e . The most striking feature of the elliptical orbits under theinfluence of the 1/r2 gravitational force is that the “central object” (the sun, for instance, if we are interested in the orbit of a planet, asteroid or comet) isnot at the geometric center of the ellipse. Rather, it is at a special point called the focus of the ellipse (labeled “O” in the figure, since that is the origin for the position vector of the orbiting body). There are actually two foci, symmetricallyplaced on the horizontal (major) axis,",University Physics I Classical Mechanics.pdf "10.1. THE INVERSE-SQUARE LAW 229 and the distance of each focus to the center of the ellipse is given by the productea,t h a ti s ,t h e product of the eccentricity and the semimajor axis. (This explains why the “eccentricity” is called that: it is a measure of how “off-center” the focus is.) For an ob ject moving in an elliptical orbit around the sun, thed i s t a n c et ot h es u ni sm i n i m a la t ap o i n tc a l l e dt h ep e r i h e l i o n ,a n dm a x i m a la tap o i n tc a l l e dthe aphelion. Those points are shown in the figure and labeled “P” and “A”, respectively. For an object in orbit around the earth, the corresponding terms are perigee and apogee; for an orbit around some unspecified central body, the terms periapsis and apoapsis are used. There is some confusion as to whether the distances are to be measured from the surface or from the center of the central body; here I will assume they are",University Physics I Classical Mechanics.pdf "to be measured from the surface or from the center of the central body; here I will assume they are all measured from the center, in which case the following relationships follow directly from Figure 10.3: rmax =( 1+ e)a rmin =( 1− e)a rmin + rmax =2 a e = rmax − rmin 2a (10.12) The ellipse I have drawn in Fig.10.3 is actually way too eccentric to represent the orbit of any planet in the solar system (although it could well be the orbito fac o m e t ) . T h ep l a n e tw i t ht h e most eccentric orbit is Mercury, and that is onlye =0 .21. This means thatb =0 .978a,a na l m o s t imperceptible deviation from a circle. I have drawn the orbitt os c a l ei nF i g .10.4,a n da sy o uc a n see the only way you can tell it is an ellipse is, precisely, because the sun is not at the center. Figure 10.4: Orbit of Mercury, with the sun approximately to scale.",University Physics I Classical Mechanics.pdf "230 CHAPTER 10. GRAVITY Since an ellipse has only two parameters, and we have two constants of the motion (the total energy, E,a n dt h ea n g u l a rm o m e n t u m ,L), we should be able to determine what the orbit will look like based on just those two quantities. Under the assumptionw ea r em a k i n gh e r e ,t h a tt h ev e r y massive object does not move at all, the total energy of the system is just E = 1 2mv2 − GMm r (10.13) For a circular orbit, the radiusR determines the speed (as per Eq. (10.11)), and hence the total energy, which is easily seen to beE = −GMm 2R .I t t u r n s o u t t h a t t h i s f o r m u l a h o l d s a l s o f o r e l l i p t i c a l orbits, if one substitutes the semimajor axisa for R: E = −GMm 2a (10.14) Note that the total energy (10.14)i snegative.T h i sm e a n st h a tw eh a v eabound orbit, by which I mean, a situation where the orbiting object does not have enough kinetic energy to fly arbitrarily far",University Physics I Classical Mechanics.pdf "mean, a situation where the orbiting object does not have enough kinetic energy to fly arbitrarily far away from the center of attraction. Indeed, sinceUG → 0a sr →∞ ,y o uc a ns e ef r o mE q .(10.13) that if the two objects could be infinitely far apart, the totale n e r g yw o u l de v e n t u a l l yh a v et ob e positive, for any nonzero speed of the lighter object. So, ifE< 0, we have bound orbits, which are ellipses (of which a circle is a special case), and conversely, ifE> 0w eh a v e“ u n b o u n d ”t r a j e c t o r i e s , which turn out to be hyperbolas4.T h e s e t r a j e c t o r i e sj u s t p a s s n e a r t h e c e n t e r o f a t t r a c t i o nonce, and never return. The special borderline case whenE =0c o r r e s p o n d st oaparabolic trajectory. In this case, the particle also never comes back: it has just enough kinetic energy to make it “to infinity,” slowing",University Physics I Classical Mechanics.pdf "particle also never comes back: it has just enough kinetic energy to make it “to infinity,” slowing down all the while, sov → 0a s r →∞ .T h e i n i t i a l s p e e d n e c e s s a r y t o a c c o m p l i s h t h i s , s t a r t i n g from an initial distanceri,i su s u a l l yc a l l e dt h e“ e s c a p ev e l o c i t y ”( a l t h o u g hi tr e a l lys h o u l db e called the escape speed), and it is found by simply setting Eq.( 10.13)e q u a lt oz e r o ,w i t hr = ri, and solving forv: vesc = √ 2GM ri (10.15) In general, you can calculate the escape speed from any initial distance ri to the central object, but most often it is calculated from its surface. Note thatvesc does not depend on the mass of the lighter object (always assuming that the heavier object doesn o tm o v ea ta l l ) .T h ee s c a p ev e l o c i t y from the surface of the earth is about 11 km/s, or 1.1×104 m/s; but this alone would not be enough",University Physics I Classical Mechanics.pdf "from the surface of the earth is about 11 km/s, or 1.1×104 m/s; but this alone would not be enough to let you leave the attraction of the sun behind. The escape speed from the sun starting from a point on the earth’s orbit is 42km/s. To summarize all of the above, suppose you are trying to put something in orbit around a much more massive body, and you start out a distancer away from the center of that body. If you give the object a speed smaller than the escape speed at that point,t h er e s u l tw i l lb eE< 0a n da n 4There is apparently a way to describe a hyperbola as an ellipsew i t he c c e n t r i c i t ye> 1, but I’m definitely not going to go there.",University Physics I Classical Mechanics.pdf "10.1. THE INVERSE-SQUARE LAW 231 elliptical orbit (of which a circle is a special case, if you give it the precise speedv = √ GM/r in the right direction). If you give it precisely the escape speed (10.15), the total energy of the system will be zero and the trajectory of the object will be a parabola; and if you give it more speed than vesc,t h et o t a le n e r g yw i l lb ep o s i t i v ea n dt h et r a j e c t o r yw i l lb eah y p e r b o l a .T h i si si l l u s t r a t e di n Fig. 10.5 below. Figure 10.5: Possible trajectories for an object that is “released” with a sideways velocity at the lowest point in the figure, under the gravitational attraction of a large mass represented by the black circle. Each trajectory corresponds to a different value of the object’s initialkinetic energy: ifKcirc is the kinetic energy needed to have a circular orbit through the point of release, the figure shows the casesKi =0 .5Kcirc (small",University Physics I Classical Mechanics.pdf "needed to have a circular orbit through the point of release, the figure shows the casesKi =0 .5Kcirc (small ellipse), Ki = Kcirc (circle), Ki =1 .5Kcirc (large ellipse), Ki =2 Kcirc (escape velocity, parabola), and Ki =2 .5Kcirc (hyperbola). Note that all the trajectories shown in Figure10.5 have the same potential energy at the “point of release” (since the distance from that point to the centerof attraction is the same for all), so increasing the kinetic energy at that point also means increasing the total energy (10.13)( w h i c hi s constant throughout). So the picture shows different orbits ino r d e ro fi n c r e a s i n gt o t a le n e r g y . For a given total energy, the total angular momentum does notchange the fundamental nature of the orbit (bound or unbound), but it can make a big difference onthe orbit’s shape. Generally speaking, for a given energy the orbits with less angular momentum will be “narrower,” or “more",University Physics I Classical Mechanics.pdf "speaking, for a given energy the orbits with less angular momentum will be “narrower,” or “more squished” than the ones with more angular momentum, since a smaller initial angular momentum at the point of insertion means a smaller sideways velocity component. In the extreme case of zero initial angular momentum (no sideways velocity at all), thetrajectory, regardless of the total energy, reduces to a straight line, either straight towards or straight away from the center of attraction.",University Physics I Classical Mechanics.pdf "232 CHAPTER 10. GRAVITY For elliptical orbits, one can prove the result e = √ 1 − L2 aGMm2 (10.16) which shows how the eccentricity increases asL decreases, for a given value ofa (which is to say, for a given total energy). I should at least sketch how to obtain this result, since it is a variant of ap r o c e d u r et h a ty o um a yh a v et ou s ef o rs o m eh o m e w o r kp r o b l e mst h i ss e m e s t e r . Y o us t a r tb y writing the angular momentum asL = mrP vP (or mrAvA), where A and P are the special points shown in Figure 10.2, where⃗vand ⃗rare perpendicular. Then, you note thatrP = rmin =( 1− e)a (or, alternatively,rA = rmax =( 1+e)a), sovP = L/[m(1 −e)a]. Then substitute these expressions for rP and vP in Eq. (10.13), set the result equal to the total energy (10.14), and solve fore. ri vi vi vi Figure 10.6: Effect of the “angle of insertion” on the orbit. Figure 10.6 illustrates the effect of varying the angular momentum, for a given energy. All the",University Physics I Classical Mechanics.pdf "Figure 10.6 illustrates the effect of varying the angular momentum, for a given energy. All the initial velocity vectors in the figure have the same magnitude, and the release point (with position vector ⃗ri)i st h es a m ef o ra l lt h eo r b i t s ,s ot h e ya l lh a v et h es a m ee n e r gy; indeed, you can check that the semimajor axis of the two ellipses is the same as the radius of the circle, as required by Eq. (10.14). The difference between the orbits is their total angular momentum. The green orbit has the maximum angular momentum possible at the given energy, since the green velocity vector is perpendicular to⃗ri.N o t e t h a t t h i s ( m a x i m i z i n gL for a givenE< 0) always results in a circle, in agreement with Eq. (e10.15): the eccentricity is zero when L = Lcirc ≡ √ aGMm2,w h i c hi st h e largest value ofL allowed in Eq. (e10.15). For the other two orbits,⃗vi and ⃗ri make angles of 45◦ and 135◦,a n ds ot h ea n g u l a rm o m e n t u m",University Physics I Classical Mechanics.pdf "largest value ofL allowed in Eq. (e10.15). For the other two orbits,⃗vi and ⃗ri make angles of 45◦ and 135◦,a n ds ot h ea n g u l a rm o m e n t u m L has magnitude L = Lcirc sin 45◦ = Lcirc/ √ 2. The result are the red and blue ellipses, with eccentricities e = √ 1 − sin2(45◦)=0 .707.",University Physics I Classical Mechanics.pdf "10.1. THE INVERSE-SQUARE LAW 233 10.1.3 Kepler’s laws The first great success of Newton’s theory was to account for the results that Johannes Kepler had extracted from astronomical data on the motion of the planets around the sun. Kepler had managed to find a number of regularities in a mountain of data (most of which were observations by his mentor, the Danish astronomer Tycho Brahe), and expressed them in a succinct way in mathematical form. These results have come to be known asKepler’s laws,a n dt h e ya r ea sf o l l o w s : 1. The planets move around the sun in elliptical orbits, withthe sun at one focus of the ellipse. 2. (Law of areas) A line that connects the planet to the sun (thep l a n e t ’ sp o s i t i o nv e c t o r )s w e e p s equal areas in equal times. 3. The square of the orbital period of any planet is proportional to the cube of the semimajor axis of its orbit (the same proportionality constant holds for allt h ep l a n e t s ) .",University Physics I Classical Mechanics.pdf "of its orbit (the same proportionality constant holds for allt h ep l a n e t s ) . Ih a v ed i s c u s s e dt h efi r s t“ l a w ”a tl e n g t hi nt h ep r e v i o u ss e c tion, and also pointed out that the math necessary to prove it is far from trivial. The second law, on the other hand, while it sounds com- plicated, turns out to be a straightforward consequence of the conservation of angular momentum. To see what it means, consider Figure10.7. O A B A’ B’ rA rB vA∆t vB∆t Figure 10.7: Illustrating Kepler’s law of areas. The two gray “curved triangles” have the same area, so the particle must take the same time to go from A to A′ as it does to go from B to B′. Suppose that, at some timetA,t h ep a r t i c l ei sa tp o i n tA ,a n dat i m e∆t later it has moved to A′. The area “swept” by its position vector is shown in grey in thefigure, and Kepler’s second law states that it must be the same, for the same time interval, atany point in the trajectory; so, for",University Physics I Classical Mechanics.pdf "234 CHAPTER 10. GRAVITY instance, if the particle starts out at B instead, then in thesame time interval ∆t it will move to a point B′ such that the area of the “curved triangle” OBB′ equals the area of OAA′. Qualitatively, this means that the particle needs to move more slowly when it is farther from the center of attraction, and faster when it is closer. Quantitatively, this actually just means that its angular momentum is constant! To see this, note that the straight distance from A toA′ is the displacement vector ∆⃗rA,w h i c h ,f o ras u ffi c i e n t l ys h o r ti n t e r v a l∆t,w i l lb ea p p r o x i m a t e l ye q u a lt o ⃗vA∆t.A g a i n ,f o rs m a l l∆t,t h ea r e ao ft h ec u r v e dt r i a n g l ew i l lb ea p p r o x i m a t e l yt h es ame as that of the straight triangle OAA′.I ti saw e l l - k n o w nr e s u l ti nt r i g o n o m e t r yt h a tt h ea r e ao fatriangle",University Physics I Classical Mechanics.pdf "of the straight triangle OAA′.I ti saw e l l - k n o w nr e s u l ti nt r i g o n o m e t r yt h a tt h ea r e ao fatriangle is equal to 1/2 the product of the lengths of any two of its sidest i m e st h es i n eo ft h ea n g l et h e y make. So, if the two triangles in the figures have the same areas, we must have |⃗rA||⃗vA|∆t sin θA = |⃗rB||⃗vB|∆t sin θB (10.17) and we recognize here the condition|⃗LA| = |⃗LB|,w h i c hi st os a y ,c o n s e r v a t i o no fa n g u l a rm o m e n - tum. (Once the result is established for infinitesimally small ∆t,w ec a ne s t a b l i s hi tf o rfi n i t e - s i z e areas by using integral calculus, which is to say, in essence,b yb r e a k i n gu pl a r g et r i a n g l e si n t os u m s of many small ones.) As for Kepler’s third result, it is easy to establish for a circular orbit, and definitely not easy for an elliptical one. Let us callT the orbital period, that is, the time it takes for the less massive object",University Physics I Classical Mechanics.pdf "elliptical one. Let us callT the orbital period, that is, the time it takes for the less massive object to go around the orbit once. For a circular orbit, the angularvelocity ω can be written in terms of T as ω =2 π/T ,a n dh e n c et h er e g u l a rs p e e dv = Rω =2 πR/T .S u b s t i t u t i n g t h i s i n E q . (10.11), we getGM/R2 =4 π2R/T2,w h i c hc a nb es i m p l i fi e df u r t h e rt or e a d T2 = 4π2 GM R3 (10.18) Again, this turns out to work for an elliptical orbit if we replace R by a. Note that the proportionality constant in Eq. (10.18)d e p e n d so n l yo nt h em a s so ft h ec e n t r a lb o d y . For the solar system, that would be the sun, of course, and thent h ef o r m u l aw o u l da p p l yt oa n y planet, asteroid, or comet, with the same proportionality constant. This gives you a quick way to calculate the orbital period of anything orbiting the sun, ify o uk n o wi t sd i s t a n c e( o rv i c e - v e r s a ) ,",University Physics I Classical Mechanics.pdf "calculate the orbital period of anything orbiting the sun, ify o uk n o wi t sd i s t a n c e( o rv i c e - v e r s a ) , based on the fact that you know what these quantities are for the Earth. More generally, suppose you have two planets, 1 and 2, both orbiting the same star, at distances R1 and R2,r e s p e c t i v e l y . T h e nt h e i ro r b i t a lp e r i o d sT1 and T2 must satisfyT2 1 =( 4π2/GM)R3 1 and T2 2 =( 4π2/GM)R3 2.D i v i d e o n e e q u a t i o n b y t h e o t h e r , a n d t h e p r o p o r t i o n a l i t y constant cancels, so you get ( T2 T1 ) 2 = ( R2 R1 ) 3 (10.19)",University Physics I Classical Mechanics.pdf "10.1. THE INVERSE-SQUARE LAW 235 From this some simple manipulation gives you T2 = T1 ( R2 R1 ) 3/2 (10.20) Note you can expressR1 and R2 in any units you like, as long as you use the same units for both, and similarlyT1 and T2.F o ri n s t a n c e ,i fy o uu s et h eE a r t ha sy o u rr e f e r e n c e“ p l a n e t1,” then you know that T1 =1( i ny e a r s ) ,a n dR1 =1 ,i nA U( a nA U ,o r“ a s t r o n o m i c a lu n i t , ”i st h ed i s t a n c e from the Earth to the sun). A hypothetical planet at a distanceo f4A Uf r o mt h es u ns h o u l dt h e n have an orbital period of 8 Earth-years, since 43/2 = √ 43 = √ 64 = 8. Af o r m u l aj u s tl i k e(10.18), but with a different proportionality constant, would applyto the satellites of any given planet; for instance, the myriad of artificial satellites that orbit the Earth. Again, you could introduce a “reference satellite” labeled1, with known period and distance to the",University Physics I Classical Mechanics.pdf "Again, you could introduce a “reference satellite” labeled1, with known period and distance to the Earth (the moon, for instance?), and derive again the result(10.20), which would allow you to get the period of any other satellite, if you knew how its distancet ot h ee a r t hc o m p a r e st ot h em o o n ’ s (or, conversely, the distance at which you would need to placei ti no r d e rt og e tad e s i r e do r b i t a l period). For instance, suppose I want to place a satellite on a “geosynchronous” orbit, meaning that it takes 1d a yf o ri tt oo r b i tt h eE a r t h . Ik n o wt h em o o nt a k e s2 9d a y s ,s oIc a nw r i t eE q .(10.20)a s 1=2 9 (R2/R1)3/2,o r ,s o l v i n gi t ,R2/R1 =( 1/29)2/3 =0 .106, meaning the satellite would have to be approximately 1/10 of the Earth-moon distance from (the center of) the Earth. In hindsight, it is somewhat remarkable that Kepler’s laws are as accurate, for the solar system,",University Physics I Classical Mechanics.pdf "In hindsight, it is somewhat remarkable that Kepler’s laws are as accurate, for the solar system, as they turned out to be, since they can only be mathematicallyd e r i v e df r o mN e w t o n ’ st h e o r yb y making a number of simplifying approximations: that the sundoes not move, that the gravitational force of the other planets has no effect on each planet’s orbit,and that the planets (and the sun) are perfect spheres, for instance. The first two of these approximations work as well as they do because the sun is so massive; the third one works because thesizes of all the objects involved (including the sun) are much smaller than the correspondingorbits. Nevertheless, Newton’s work made it clear that Kepler’s laws could only be approximatelyvalid, and scientists soon set to work on developing ways to calculate the corrections necessary tod e a lw i t h ,f o ri n s t a n c e ,t h et r a j e c t o r i e s of comets or the orbit of the moon.",University Physics I Classical Mechanics.pdf "of comets or the orbit of the moon. Of the main approximations I have listed above, the easiest one to get rid of (mathematically) is the first one, namely, that the sun does not move. Instead, whato n efi n d si st h a t ,a sl o n ga st h es u n and the planet are still treated as an isolated system, they will both revolve around the system’s center of mass. Of course, the sun’s motion (a slight “wobble”) is very small, but not completely negligible. You can even see it in the simulation I mentionedearlier, at https://phet.colorado.edu/en/simulation/gravity-and-orbits. What is much harder to deal with, mathematically, is the factthat none of the planets in the",University Physics I Classical Mechanics.pdf "236 CHAPTER 10. GRAVITY solar system actually forms an isolated system with the sun,since all the planets are really pulling gravitationally on each other all the time. Particularly, Jupiter and Saturn have a non-negligible influence on each other’s orbits, and on the orbits of every other planet, which can only be perceived over centuries. Basically, the orbits still look like ellipses to a very good degree, but the ellipses rotate very, very slowly (so they fail to exactly close in on themselves). This effect, known as orbital precession, is most dramatic for Mercury, where the ellipse’s axes rotate by more than one degree per century. Nevertheless, the Newtonian theory is so accurate, and the calculation techniques developed over the centuries so sophisticated, that by the early 20th century the precession of the orbits of all planets except Mercury had been calculated to near exact agreement with thebest observational",University Physics I Classical Mechanics.pdf "planets except Mercury had been calculated to near exact agreement with thebest observational data. The unexplained discrepancy for Mercury amounted onlyt o4 3s e c o n d so fa r cp e rc e n t u r y , out of 5600 (an error of only 0.8%). It was eventually resolved by Einstein’s general theoryo f relativity. 10.2 Weight, acceleration, and the equivalence principle Whether we write it asmg or as GMm/r2,t h ef o r c eo fg r a v i t yo na no b j e c to fm a s sm has the remarkable property—not shared by any other known force—ofbeing proportional to the inertial mass of the object. This means that, if gravity is the only force acting on a system made up of many particles, when you divide the force on each particle bythe particle’s mass in order to find the particle’s acceleration, you get the same value ofa for every particle (at least, assuming that they are all at about the same distance from the object exerting the force in the first place). Thus,",University Physics I Classical Mechanics.pdf "they are all at about the same distance from the object exerting the force in the first place). Thus, all the parts making up the object will accelerate together,as a whole. Suppose that you are holding an object, while in free fall (remember that “free fall” means that gravity is the only force acting on you), and you let go of it, asi nF i g .10.8 below. Since gravity will give you and the object the same acceleration, you’ll findt h a ti td o e sn o t“ f a l l ”r e l a t i v et o you—that is, it will not fall any faster nor more slowly than yourself. From your own reference frame, you will just see it hovering motionless in front of you, in the same position (relative to you) that it occupied before you let go of it. This is exactly what you see in videos shot aboard the International Space Station. The result is an impression ofweightlessness, or “zero gravity”—even though gravity is very much nonzero; the space station, and everything inside it, is constantly",University Physics I Classical Mechanics.pdf "though gravity is very much nonzero; the space station, and everything inside it, is constantly “falling” to the earth, it just does not hit it because it has some sideways velocity (or angular momentum) to begin with, and the earth’s pull just bends its trajectory around enough to keep it moving in a circle. But gravity is the only force acting on it,and on everything in it (at least until somebody pushes himself against a wall, or something like that). So, the kind of acceleration you get from gravity is, paradoxically, such that, if you give in to it completely, you feel like there isno gravity.",University Physics I Classical Mechanics.pdf "10.2. WEIGHT, ACCELERATION, AND THE EQUIVALENCE PRINCIPLE 237 (a) (b) Figure 10.8: If you are holding something while in free fall (a) and let go, since you are all accelerating at the same rate, it stays in the same position relative to you (b), so it appears to be weightless. The familiar sensation of weight, on the other hand, comes precisely fromnot giving in, and rather, enlisting other forces to fight against gravity. When you do this—when you simply stand on the surface of the earth, for instance—your feet are supported byt h eg r o u n db e l o wy o u ,b u te v e r yo t h e r part of your body is supported by some other part of your body,immediately above or below it, that you can think of as a sort of spring that is either somewhats t r e t c h e do rs o m e w h a tc o m p r e s s e d . It is primarily your skeleton, and mostly your spine, that bears most of the compressive load. (See",University Physics I Classical Mechanics.pdf "It is primarily your skeleton, and mostly your spine, that bears most of the compressive load. (See Fig. 10.9,n e x tp a g e . ) T h es e n s a t i o no fw e i g h ti sy o u rr e s p o n s et ot h i sload. Interestingly, even though this constant squishing may actually result in your losing a little height in the course of ad a y( w h i c hy o ur e c o v e ra tn i g h t ,w h e ny o ul i eh o r i z o n t a l l y ),i ti sn o tab a dt h i n g ,r a t h e rt h e contrary: your bones have evolved so that theyneed this constant pressure to grow and replace the mass that they would otherwise lose in a “weightless” environment. On the other hand, as shown in Fig.10.9 (c), the same compression (or extension—for instance, for the muscles in your arms, as they hang by your side) would result from a situation in which you were, say, standing motionless inside a rocket that is accelerating upwards witha = g,b u t",University Physics I Classical Mechanics.pdf "you were, say, standing motionless inside a rocket that is accelerating upwards witha = g,b u t very far away from any gravity source. In Fig.10.9 (b), the “spring” that represents your skeleton needs to be compressed so it can exert an upward forceFspr = mug to support the weight of your upper body (simplified here as just a single massmu). In Fig.10.9 (c), it needs to be compressed by the same amount, so it can exert the upward forceFspr = mua needed to give your upper body an accelerationa = g.T h e e q u a l i t yo ft h e t w oe x p r e s s i o n si sa d i r e c t c o n s e q u e n c eof the fact that the force of gravity is proportional to an object’s inertialmass (since the second expression is just",University Physics I Classical Mechanics.pdf "238 CHAPTER 10. GRAVITY Newton’s second law). (a) gravity g, a = – g (b) gravity g, a = 0 (c) no gravity, a = g Fgl n Fgl n Fsl spr Fsu spr Fsu spr Fsl spr FEu G FEu G FEl G FEl G Figure 10.9: (a) In free fall, your skeleton (represented here by a relaxed spring) does not need to support your upper body, so there is no sensation of weight. When standingon the ground motionless under the influence of gravity, however (b), every part of your body needsto compress a little in order to support the weight of the parts above it (as shown here by the compressed spring). The same compression, and hence the same subjective sensation of weight, results if you are moving upwards with an accelerationa = g,b u t in the absence of gravity (c). (The subscriptsu and l on the forces stand for “upper” and “lower” body, respectively.) In general, then, when your whole body is subjected to an upward accelerationa,i tf e e l sl i k ey o u r",University Physics I Classical Mechanics.pdf "respectively.) In general, then, when your whole body is subjected to an upward accelerationa,i tf e e l sl i k ey o u r weight is increased by an amountma.T h e s a m e t h i n g h o l d s r e g a r d l e s s o f d i r e c t i o n — a f o r w a r d acceleration a on a jet pilot’s body feels like a “weight”ma pushing her against her seat. This is why these “effective forces” (or, more precisely, the accelerations that cause them) are measured in g’s: a “force” of, say, 5g,m e a n st h a tt h ep i l o tf e e l sp u s h e da g a i n s th e rs e a tw i t ha“ f orce” equal to 5 times her weight. What’s really happening, of course, isthe opposite—her seat is pushing her forward,b u th e ri n t e r n a lo r g a n sa r eb e i n gc o m p r e s s e d( i no r d e rt op rovide that same forward acceleration) the way they would under a gravity force five times stronger than at the earth’s surface. The parallels between being in a constantly accelerating frame of reference and being at rest under",University Physics I Classical Mechanics.pdf "surface. The parallels between being in a constantly accelerating frame of reference and being at rest under the influence of a constant gravity force go beyond the subjective sensation of weight. Figure10.10",University Physics I Classical Mechanics.pdf "10.2. WEIGHT, ACCELERATION, AND THE EQUIVALENCE PRINCIPLE 239 illustrates what happens when you drop something while traveling in the upwardly accelerating rocket, in the absence of gravity. From an inertial observer’s point of view, the object you drop merely keeps the upward velocity it had the moment it left yourh a n d ;b u t ,s i n c ey o ua r ei nc o n t a c t with the rocket, your own velocity is constantly increasing,a n da sar e s u l to ft h a ty o us e et h e object fall—relative to you. (a) (b) Figure 10.10: “Dropping” an object inside a constantly accelerating rocket, away from any gravity. From a practical point of view, this suggests a couple of waysto provide an “artificial gravity” for astronauts who might one day have to spend a long time in space,e i t h e ru n d e re x t r e m e l yw e a k gravity (for instance, during a trip to Mars), or, what amounts to essentially the same thing, in",University Physics I Classical Mechanics.pdf "gravity (for instance, during a trip to Mars), or, what amounts to essentially the same thing, in free fall (as in a space station orbiting a planet). The one most often seen in movies consists in having the space station (or spaceship) constantly spin around an axis with some angular velocity ω.T h e n a n y o b j e c t t h a t i s m o v i n g w i t h t h e s t a t i o n , a d i s t a n c eR away from the axis, will experience ac e n t r i p e t a la c c e l e r a t i o no fm a g n i t u d eω2R,w h i c hw i l lf e e ll i k eag r a v i t yf o r c emω2R directed in the opposite direction, that is to say, away from the center.People would then basically “walk on the walls” (that is to say, sideways as seen from above, with their feet away from the rotation axis and their heads towards the rotation axis). If somebody let goo fs o m e t h i n gt h e yw e r eh o l d i n g ,",University Physics I Classical Mechanics.pdf "240 CHAPTER 10. GRAVITY the object would “fall towards the wall,” just like the objectc o n s i d e r e di nE x a m p l e9 . 6 . 3( p r e v i o u s chapter). Unfortunately, while the idea might work for a space station, it would probably be impractical for a spaceship, since one would need a fairly large R and/or a fairly large rotation rate to get ω2R ≃ g.( O n t h e o t h e r h a n d , p r o b a b l y e v e n s o m e t h i n g l i k e1 5 g is better than nothing, so who knows... ) On a fundamental level, the equivalence between a constantlya c c e l e r a t e dr e f e r e n c ef r a m e ,a n d an inertial frame with a uniform gravitational field (such as,a p p r o x i m a t e l y ,t h es u r f a c eo ft h e earth), was elevated by Einstein to a basic principle of physics, which became the foundation of his general theory of relativity. Thisequivalence principle asserts that it is absolutely impossible",University Physics I Classical Mechanics.pdf "his general theory of relativity. Thisequivalence principle asserts that it is absolutely impossible to distinguish, by any kind of physics experiment, between the two situations just mentioned: a constantly accelerated reference frame is postulated to becompletely equivalent in every way to an inertial frame with a uniform gravitational field. Ar e m a r k a b l ec o n s e q u e n c eo ft h ee q u i v a l e n c ep r i n c i p l ei st hat light, despite having technically “zero rest mass,” must bend its trajectory under the influence of gravity. This can be seen as follows. Imagine shooting a projectile horizontally inside the rocket in Figure10.10.A l t h o u g h a n i n e r t i a l observer, looking from the outside, would see the projectilet r a v e li nas t r a i g h tl i n e ,t h eo b s e r v e r inside the rocket would see its path bend down, just as for theprojectiles we studied back in Chapter",University Physics I Classical Mechanics.pdf "inside the rocket would see its path bend down, just as for theprojectiles we studied back in Chapter 8. This is for the same reason he would see the object fall, relative to him, in Figure10.10:t h e projectile has a constant velocity, so it travels the same distance in every equal time interval, but the rocket is accelerating, so the distance it travels in equal time intervals is constantly increasing. In basically the same way, then, a beam of light sent horizontally inside the rocket, and traveling with constant velocity (and, therefore, in a straight line)in an inertial frame, would be seen as bending down in the rocket’s reference frame. However, if the equivalence principle is true, and physicalphenomena look the same in a constantly accelerating frame as in an inertial frame with a constant gravitational field, it follows that light must also bend its path in the latter system, in much the same way as a projectile would. (I say",University Physics I Classical Mechanics.pdf "must also bend its path in the latter system, in much the same way as a projectile would. (I say “much the same way” because the effect is not just as simple as giving light an “effective mass”; there are other relativistic effects, such as space contraction and time dilation, that must also be reckoned with.) This gravitational bending was one of the most important early predictions of Einstein’s General Relativity theory, and certainly the most spectacular. Since one needs the light rays to pass vary close to a large mass to get an observable effect, the way the prediction was verified was by looking at the apparent position of the stars that can be seen close to the edge of the sun’s disk during a solar eclipse. The slight (apparent)shift in position predicted by Einstein was observed by Sir Arthur Eddington during the solar eclipseo f1 9 1 9( t w oe x p e d i t i o n sw e r es e n t to remote corners of the earth for this purpose), and it was primarily responsible for Einstein’s",University Physics I Classical Mechanics.pdf "to remote corners of the earth for this purpose), and it was primarily responsible for Einstein’s sudden fame among the general public of his day. Today, with modern telescopes, this so-called “gravitational lensing” effect has become an important tool in astronomy, allowing us to interpret the pictures taken of distant galaxies, which are often",University Physics I Classical Mechanics.pdf "10.3. IN SUMMARY 241 shifted and/or distorted by the gravity of the galaxies thatlie in between them and us. It has even become possible to imagine an object so dense thatit would “capture” light, attracting it so strongly that it could not leave the object’s neighborhood. Such an object has come to be called a black hole.I f y o u s e t t h e e s c a p e v e l o c i t y o f E q . (10.15)e q u a lt ot h es p e e do fl i g h ti n vacuum, c,a n ds o l v ef o rri,y o uo b t a i nw h a ti sc a l l e dt h eSchwarzschild radius, rs,f o rab l a c kh o l e of mass M;t h ei d e ab e i n gt h a t ,i no r d e rt obe ab l a c kh o l e ,t h eo b j e c th a st ob es od e n s et h a ta l l its mass M is inside a sphere of radius smaller thanrs.P h y s i c i s t s t o d a y b e l i e v e i n t h e e x i s t e n c e (and even what one might call the ubiquity) of black holes, ofwhich the Schwarzschild solution was",University Physics I Classical Mechanics.pdf "(and even what one might call the ubiquity) of black holes, ofwhich the Schwarzschild solution was only the first calculated example. Note thatrs does not define the actual, physical surface of the object; it does, however, locate what is known as the black hole’sevent horizon.N o t h i n g c a n b e known, through observation, about anything that might happen closer to the black hole’s center than the distancers,s i n c en oi n f o r m a t i o nc a nb et r a n s m i t t e df a s t e rt h a nl i g h t ,and no light can escape from a distanceri 0. The special trajectory obtained whenE =0i sap a r a b o l a . 7. For the elliptical orbits, one hasE = −GMm/2a,w h e r ea is the ellipse’s semimajor axes. The large mass object is not at the center, but at one of the focio ft h ee l l i p s e . T h ed i s t a n c e from the focus to the center is equal toea,w h e r ee is called theeccentricity of the ellipse. 8. The escape speedof an object bound gravitationally to a massM,ad i s t a n c eri away from that mass’s center, is obtained by setting the total energy oft h es y s t e me q u a lt oz e r o . I ti s the speed the object needs in order to be able to just escape to“infinity” and “stop there”",University Physics I Classical Mechanics.pdf "the speed the object needs in order to be able to just escape to“infinity” and “stop there” (mathematically, v → 0a sr →∞ ,w h i c hm a k e sE = K + UG =0 ) . 9. The angular momentum of a particle in a Kepler trajectory (circle, ellipse, parabola or hy- perbola), relative to the point where the large massM is located, is constant. For a given energy, orbits with less angular momentum are more eccentric. 10. A consequence of conservation of angular momentum is Kepler’s second law, or “law of areas”: The orbiting object’s position vector (with the origin at thel o c a t i o no ft h el a r g em a s s ) ,s w e e p s equal areas in equal times. 11. The square of the orbital period of any object in a Kepler elliptical orbit is proportional to the cube of the semimajor axis of the ellipse. This is Kepler’st h i r dl a w . S p e c i fi c a l l y ,o n e finds, from Newton’s theory,T2 =( 4π2/GM)a3. 12. According to Einstein’s principle of equivalence, a constant accelerationa of a reference frame",University Physics I Classical Mechanics.pdf "finds, from Newton’s theory,T2 =( 4π2/GM)a3. 12. According to Einstein’s principle of equivalence, a constant accelerationa of a reference frame is experienced by every object in that reference frame as an “extra weight,” or gravitational force, equal to−ma (that is, of magnitudema and in the direction opposite the acceleration).",University Physics I Classical Mechanics.pdf "10.4. EXAMPLES 243 10.4 Examples 10.4.1 Orbital dynamics In the early days of space flight, astronauts sometimes mentioned the counterintuitive aspects of orbital flight. For example, if, from a circular orbit aroundthe Earth, they wanted to move to a lower orbit, the way to do it was to slow down their capsule (byfiring a thruster in the direction opposite their motion). This would take them to a lower orbit,b u tt h e nt h ec a p s u l ew o u l ds t a r t speeding up,o ni t so w n . Use the concepts introduced in this chapter to explain what isg o i n go ni nt h i ss c e n a r i o . L e tR be the radius of the initial orbit. For simplicity, assume thet h r u s t e ri so no n l yf o rav e r ys h o r t time, so you can neglect the motion of the capsule during thistime. In other words, treat it as an instantaneous reduction in velocity, and discuss: (a) What happens to the system’s potential and kinetic energy, and angular momentum?",University Physics I Classical Mechanics.pdf "instantaneous reduction in velocity, and discuss: (a) What happens to the system’s potential and kinetic energy, and angular momentum? (b) Is the new orbit circular or elliptic? How do you know? Whati st h en e wo r b i t ’ srmax (maximum distance to the center of the Earth)? (c) Why does the capsule speed up in its new orbit? (d) If the new orbit is not circular, what would the astronautsn e e dt od ot om a k ei ts o ? ( W i t h o u t getting any closer to the Earth, that is, keepingrmin the same.) Make sure to draw a diagram of the situation. Make it as accurate as you can. Solution (a) Under the assumption that the capsule barely changes position during the thruster firing, the potential energy of the system, which is equal toUG = −GMm/R,w i l ln o tc h a n g e :UG f = UG i . The kinetic energy, on the other hand, will go down, since thecapsule’s speed is reduced:Kf r min,a n dy o uw a n tt h e new a to be equal tormin). AP",University Physics I Classical Mechanics.pdf "10.4. EXAMPLES 245 The diagram of the situation is above (previous page). The long-dash circle is the original orbit; the solid line is the elliptical orbit resulting from the speed reduction at point A; the short-dash circle is the circular orbit that would result from another speed reduction at the point P. Note: the size of the orbits is greatly exaggerated compared to those int h ee a r l ys p a c efl i g h t s ,w h i c hw e r e much closer to the Earth! The way to draw this kind of figure is to first draw an accurate ellipse, making sure you know where the focus is; then draw the circles centered at the focus and touching the ellipse at the right points. An ellipse’s equation in polar form, with the origin at one focus, isr = a + ae cos φ. 10.4.2 Orbital data from observations: Halley’s comet Halley’s comet follows an elliptical orbit around the sun. Ati t sc l o s e s ta p p r o a c h ,i ti sad i s t a n c eo f",University Physics I Classical Mechanics.pdf "Halley’s comet follows an elliptical orbit around the sun. Ati t sc l o s e s ta p p r o a c h ,i ti sad i s t a n c eo f 0.59 AU from the sun (an astronomical unit, AU, is defined as the average distance from the earth to the sun: 1 AU = 1.496 × 1011 m), and it is moving at 5.4 × 104 m/s. We know its period is approximately 76 years. Ignoring the forces exerted on the comet by the other solar system objects (a rather rough approximation): (a) Use the appropriate Kepler law to infer the value ofa (the semimajor axis) for the comet’s orbit. (b) What is the eccentricity of the comet’s orbit? (c) Using the result in (a) and conservation of angular momentum, find the speed of the comet at aphelion (the point in its orbit when it is farthest away fromthe sun). Solution (a) The “appropriate Kepler law” here is the third one. For anyt w oo b j e c t so r b i t i n g ,f o ri n s t a n c e , the sun, the square of their orbital periods is proportionalto the cube of their orbits’ semimajor",University Physics I Classical Mechanics.pdf "the sun, the square of their orbital periods is proportionalto the cube of their orbits’ semimajor axes, with the same proportionality constant (4π/GMsun;s e eE q .(10.18)). We do not even need to calculate the proportionality constant; we can divide thee q u a t i o nf o rH a l l e y ’ sc o m e tb yt h e equation for the earth, and get T2 Halley T2 earth = a3 Halley a3 earth (10.21) where T2 earth =1y r2,a n da3 earth =1A U3,s ow eg e ti m m e d i a t e l y aHalley = ( 762)1/3 AU = 17.9A U ( 1 0 . 2 2 ) (b) We can get this one from a look at Figure10.3:t h e p r o d u c tea,p l u st h em i n i m u md i s t a n c e between the comet and the sun (0.59 AU) is equal toa.( T h i s i s j u s t w h a t t h e s e c o n d o f t h e",University Physics I Classical Mechanics.pdf "246 CHAPTER 10. GRAVITY equations (10.12)s a y sa sw e l l . ) .S ow eh a v e e = a − rmin a =1 − rmin a =1 − 0.59 17.9 =0 .967 (10.23) Note that we did not even have to convert AU to kilometers. In these types of problems, particularly, where you have to manipulate very large numbers, it really pays off to do all the calculations symbolically and not substitute the numbers in until the verye n d ,t os e ei fs o m e t h i n gc a n c e l so u t , and to prevent mistakes when copying large numbers form one line to the next; and sometimes, like here, you do not even have to convert to other units! (c) At the point of closest approach (perihelion), the velocity and the position vector of the comet are perpendicular, and so the magnitude of the comet’s angular momentum is just equal toL = mrv. The same happens at the farthest point in the orbit (aphelion), and since angular momentum is conserved for the Kepler problem, we can write mrminvmax = mrmaxvmin (10.24)",University Physics I Classical Mechanics.pdf "conserved for the Kepler problem, we can write mrminvmax = mrmaxvmin (10.24) (the reason for this choice of subscripts is that we know thatwhen r is maximum,v is minimum, and vice-versa). Solving forvmin,t h es p e e da ta p h e l i o n ,w eg e t vmin = rmin rmax vmax = rmin 2a − rmin vmax = 0.59 2 · 17.9 − 0.59 5.4 × 104 m s =9 0 5m s (10.25) Here again the equation I used to findrmax can be derived directly from Fig.10.3 (and it is also one of the equations (10.12): rmin + rmax =2 a). Once again, I was able to use AU throughout, since the units of distance cancel out in the fractionrmin/rmax.",University Physics I Classical Mechanics.pdf "10.5. ADVANCED TOPICS 247 10.5 Advanced Topics 10.5.1 Tidal Forces Throughout this chapter we have treated the objects interacting gravitationally as if they were particles, that is to say, as if they were non-deformable andtheir shape and relative orientation did not matter. However, these conditions are never quite realized in real life. Some planets, like our own Earth, are particularly susceptible to deformation,b e c a u s eo ft h el a r g ea m o u n to ffl u i d matter on their surface, and even rocky planets and moons aresensitive totidal forces,w h i c ha r e the differences on the gravitational pull by the central attractor on different parts of the object considered. If you look back on Figure10.1,f o ri n s t a n c e ,i ti se a s yt os e et h a tt h em o o nm u s tb ep u l l i n gmore strongly on the side of the Earth that is closer to it (the leftside, on that picture) than on the",University Physics I Classical Mechanics.pdf "strongly on the side of the Earth that is closer to it (the leftside, on that picture) than on the farther side. This is, of course, because the force of gravityd e p e n d so nt h ed i s t a n c eb e t w e e nt h e interacting objects, and is stronger when the objects are closer. You can easily calculate that the force by the moon on a given volume of Earth (say, a cubic meter)i sa b o u t7 %s t r o n g e ro nt h en e a r side than on the far side. A deformable object subject to suchap a i ro ff o r c e sw i l ln a t u r a l l yb e stretched along the direction of the pull: in the case of the Earth, this “stretching” affects primarily the water in the oceans that cover most of the surface, resulting in two “tidal bulges” that account for the well-known phenomenon of tides: as the earth rotatesaround its axis, each point on the surface passes through one of the bulges once a day, resultingi nt w oh i g ht i d e se a c hd a y( a n d ,i n",University Physics I Classical Mechanics.pdf "surface passes through one of the bulges once a day, resultingi nt w oh i g ht i d e se a c hd a y( a n d ,i n between, a comparatively lower water level, or low tide, twice a day as well).5 For many ob jects in the solar system, this tidal stretching has, over millions of years, resulted in a permanent deformation. The tidal forces by the Earth on the moon are weaker than those by the moon on the Earth (since the moon is much smaller, the differenceb e t w e e nt h eE a r t h ’ sp u l lo nt h e moon’s near and far side is less than 1.5%), but at a time when the moon was more malleable than at present, it was enough to produce an elongation along the Earth-moon axis that is now pretty much frozen in place. Once a satellite (I will use the term generically to refer either to a planet orbiting the sun, or a moon orbiting a planet) becomes permanently deformed, a new phenomenon, known astidal locking,c a n",University Physics I Classical Mechanics.pdf "orbiting a planet) becomes permanently deformed, a new phenomenon, known astidal locking,c a n happen. Suppose the satellite is rotating around its own axis, in addition to orbiting around the primary body. As you can see from the figure below, if the rotation is too fast, the gravitational 5You may ask, besides being stretched, shouldn’t the net pullof the moon cause the Earth to fall towards it? The answer is that the Earth does not fall straight towards them o o n ,f o rt h es a m er e a s o nt h em o o nd o e sn o tf a l l straight towards the Earth: both have a sideways velocity that keeps them in a steady orbit, for which the net gravitational pull provides the centripetal force. Both actually orbit around the center of mass of the system, which is located about 1, 690 km under the Earth’s surface; the Earth’s orbit (and its orbital velocity) is much smaller than the moon’s, by virtue of its much larger mass, of course.",University Physics I Classical Mechanics.pdf "248 CHAPTER 10. GRAVITY forces from the primary will result in a net torque on the satellite that will tend to slow down its rotation; conversely, if it is rotating too slowly, the torque will tend to speed up the rotation. A torque-free situation will only happen when the satellite’sp e r i o do fr o t a t i o ne x a c t l ym a t c h e si t s orbital period, so that it always shows the same side to the primary body. This is the situation with the Earth’s moon, and indeed for most of the major moons oft h eg i a n tp l a n e t s . (a) (b) τ τ Figure 10.11: An elongated moon revolving around a planet in a clockwise orbit, and at the same time rotating clockwise around an axis through its center. In (a), the rotation is too fast, resulting in a counter- clockwise “tidal torque.” In (b), the rotation is too slow, and the “tidal torque” is clockwise. In both cases, the torque is due to the moon’s misalignment, and to the gravitational force on its near side being stronger",University Physics I Classical Mechanics.pdf "the torque is due to the moon’s misalignment, and to the gravitational force on its near side being stronger than on its far side, as shown by the blue force vectors. Note that, by the same argument, we would expect the tidal forces on the Earth due to the moon to try and bring the Earth into tidal locking with the moon—that is, to try to bring the duration of an Earth day closer to that of a lunar month. Indeed, the moon’s tidal forceshave been slowing down the Earth’s rotation for billions of years now, and continue to do so by about 15 microseconds every year. This process requires dissipation of energy, (which is in fact associated with the ocean tides: think of the frictional forces caused by the waves, asthe tide comes in and out); however, to the extent that the Earth-moon system may be treated as isolated, its total angular momentum cannot change, and so the slowing-down of the Earth is accompanied by a very gradual increase",University Physics I Classical Mechanics.pdf "cannot change, and so the slowing-down of the Earth is accompanied by a very gradual increase in the radius of the moon’s orbit—about 3.8c m pe r y e a r , c u r r e n t l y — t o k e e p t h e t o t a l a n g u l a r momentum constant.",University Physics I Classical Mechanics.pdf "10.6. PROBLEMS 249 10.6 Problems Problem 1 Suppose you fire a projectile straight up from the Earth’s North Pole with a speed of 10.5k m / s . Ignore air resistance. (a) How far from the center of the Earth does the projectile rise? How high above the surface of the Earth is that? (The radius of the Earth isRE =6 .37 × 106 m, and the mass of the Earth is M =5 .97 × 1024 kg.) (b) How different is the result you got in part (a) above from whaty o uw o u l dh a v eo b t a i n e di f you had treated the Earth’s gravitational force as a constant( i n d e p e n d e n to fh e i g h t ) ,a sw ed i di n previous chapters? (c) Using the correct expression for the gravitational potential energy, what is the total energy of the projectile-Earth system, if the projectile’s mass is 1, 000 kg? Now assume the projectile is firedhorizontally instead, with the same speed. This time, it actually goes into orbit! (Well, it would, if you could neglect thingslike air resistance, and mountains and",University Physics I Classical Mechanics.pdf "goes into orbit! (Well, it would, if you could neglect thingslike air resistance, and mountains and stuff like that. Assume it does, anyway, and answer the following questions:) (d) What is the projectile’s angular momentum around the center of the Earth? (e) How far from the center of the Earth does it make it this time? (You will need to use conservation of energy and angular momentum to answer this one, unless youcan think of a shortcut... ) (f) Draw a sketch of the Earth and the projectile’s trajectory. Problem 2 You want to put a satellite in ageosynchronous orbit around the earth. (This means the asteroid takes 1 day to complete a turn around the earth.) (a) At what height above the surface do you need to put it? (b) How fast is it moving? (c) How does the answer to (b) compare to the escape speed fromthe earth, for an objectat this height? Problem 3 Suppose that one day astronomers discover a new asteroid thatm o v e so nav e r ye l l i p t i c a lo r b i t",University Physics I Classical Mechanics.pdf "height? Problem 3 Suppose that one day astronomers discover a new asteroid thatm o v e so nav e r ye l l i p t i c a lo r b i t around the sun. At the point of closest approach (perihelion), the asteroid is 1.61 × 108 km away from the (center of the) sun, and its speed is 38.9k m / s . (a) What is the escape velocity from the sun at this distance?The mass of the sun is 2× 1030 kg. (b) The astronomers estimate the mass of the asteroid as 1012 kg. What is its kinetic energy at perihelion? (c) What is the gravitational potential energy of the sun-asteroid system at perihelion? (d) What is the total energy of the sun-asteroid system? Is itpositive or negative? Is this consistent with the assumption that the orbit is an ellipse? What would apositive total energy mean? (e) At perihelion, the asteroid’s velocity vector is perpendicular to its position vector (as drawn",University Physics I Classical Mechanics.pdf "250 CHAPTER 10. GRAVITY from the sun). What is then its angular momentum? (f) Draw a sketch of an elliptical orbit. On your sketch, indicate (1) the semimajor axis, and (2) qualitatively, where the sun might be. (g) The point in its orbit where the asteroid is farthest awayfrom the sun is called aphelion. Use conservation of energy and angular momentum to figure out theasteroid’s distance to the sun at aphelion. (Hint: if solving simultaneous equations does nota p p e a lt oy o u ,t h e r ei saf o r m u l ai n this chapter which you can use to answer this question fairlyquickly, based on something you have calculated already.) (h) How fast is the asteroid moving at aphelion? Problem 4 The mass of the moon is 7.34 × 1022 kg, and its radius is about 1.74 × 106 m (a) What is the value of “gmoon”, that is, the acceleration of gravity for a falling object near the surface of the moon? (b) What is the escape speed (from the moon) for an object on thes u r f a c eo ft h em o o n ?",University Physics I Classical Mechanics.pdf "surface of the moon? (b) What is the escape speed (from the moon) for an object on thes u r f a c eo ft h em o o n ? (c) What is the escape speedfrom the earthfor an object that is as far from the earth as the orbit of the moon? (d) At some point between the earth and the moon, an object would be pulled with equal strength towards both bodies. How far from the earth is that point? Problem 5 On August 17, 2017, the LIGO observatory reported the detection of gravitational waves from the merger of two neutron stars. Neutron stars are extremelydense (“a teaspoon of neutron star material has a mass of about a billion tons”) and very small—only about 10 or 20 km in diameter. The stars were estimated to have been separated by about 300 kmw h e nt h em e r g e rs i g n a lb e c a m e detectable. Let us start a little before that. Suppose the stars have the same mass, M =2 .6 × 1030 kg",University Physics I Classical Mechanics.pdf "detectable. Let us start a little before that. Suppose the stars have the same mass, M =2 .6 × 1030 kg (approximately 1.3t i m e st h em a s so ft h es u n ) ,a n da r es e p a r a t e d( c e n t e r - t o - c enter distance) by 1000 km. They pull on each other gravitationally, and as a result each one moves in a circular orbit around their common center of mass. What is then (a) their period of revolution, and (b) their speed? (Hint: what is the centripetal force in this case?) Problem 6 (a) Consider two possible circular orbits for a satellite around a planet, with radiiR1 and R2.I f R1 0b u t A − (2n +1 )x′ 0 < 0. (That is to say,n is equal to the integer part of (A/x′ 0 +1 )/2.) The figure shows an example of how this would go, for the following choice of parameters: period T =1s , µk =0 .1, andA =0 .18 m. Note that, sincex′ 0 depends only on the ratiom/k =1 /ω2,t h e r e is no need to specifym and k separately. We getω =2 π/T =2 π rad/s, x′ 0 = µkg/ω2 =0 .0248 m, and (A/x′",University Physics I Classical Mechanics.pdf "is no need to specifym and k separately. We getω =2 π/T =2 π rad/s, x′ 0 = µkg/ω2 =0 .0248 m, and (A/x′ 0 +1)/2=4 .13, which means that the motion will go on for 4 half-periods before stopping.",University Physics I Classical Mechanics.pdf "11.6. ADVANCED TOPICS 273 Figure 11.9: Damped oscillations. Note that, in general, the oscillator does not stop at the equilibrium position. Rather, its final position will be at the end of the last half-swing, which is either x′ 0 − An (if the number n of half-periods is odd), or−x′ 0 + An,i ft h en u m b e rn is even. Either way, at that point the spring will be exerting a force of magnitude Fspr = k|x′ 0 − An| = k|x′ 0 − A +( 2n − 1)x′ 0| = k|A − 2nx′ 0| 0.",University Physics I Classical Mechanics.pdf "the first medium, only now it will be “upright,” that is,ξ0,refl = ξ0,trans − ξ0,inc > 0. To finish up the sub ject of impedance, note that the observation we just made, that impedance will typically go as the square root of the product of the medium’s “stiffness” times its density, is quite general. Hence, a medium’s density will typically be agood proxy for its impedance, at least as long as the “stiffness” factor is independent of the density(as for strings, where it is just equal to the tension) or, even better, increases with it (as is typically the case for sound waves in most materials). Thus, you will often hear that a reflected wave isinverted (flipped upside down) when it is reflected from a denser medium, without any reference tothe impedance—it is just understood that “denser” also means “larger impedance” in this case. Also note, along these lines, that a “fixed end,” such as the end of a string that is tied down (or, for soundw a v e s ,t h ec l o s e de n do fa no r g a n",University Physics I Classical Mechanics.pdf "end,” such as the end of a string that is tied down (or, for soundw a v e s ,t h ec l o s e de n do fa no r g a n pipe), is essentially equivalent to a medium with “infinite”impedance, in which case there is no transmitted wave at that end, and all the energy is reflected. Finally, the expressionξ0,inc + ξ0,refl that I wrote earlier, for the amplitude of the wave in the first medium, implicitly assumes a very important property of waves, which is the phenomenon known as interference,o re q u i v a l e n t l y ,t h e“ l i n e a rs u p e r p o s i t i o np r i n c i p l e . ” According to this principle, when two waves overlap in the same region of space, the total displacement is just equal to the algebraic sum of the displacements produced by each wave separately. Since the displacements are added with their signs, one may get destructive interference if the signs are different, or constructive",University Physics I Classical Mechanics.pdf "added with their signs, one may get destructive interference if the signs are different, or constructive interference if the signs are the same. This will play an important role in a moment, when we start the study of standing waves. 12.2 Standing waves and resonance Imagine you have a sinusoidal traveling wave of the form (12.5), only traveling to the left, incident from the right on a “fixed end” atx =0 . T h ei n c i d e n tw a v ew i l lg oa sξ0 sin[2π(x + ct)/λ]; the reflected wave should be flipped left to right and upside down,so changex to −x and put an overall 3Ab e t t e rw a yt op u tt h i sw o u l db et os a yt h a tt h ea m p l i t u d ei sp ositive as always, but the reflected wave is 180◦ out of phase with the incident wave, so the amplitude of the total wave on the medium 1 side of the boundary is ξ0,inc − ξ0,refl .",University Physics I Classical Mechanics.pdf "290 CHAPTER 12. WAVES IN ONE DIMENSION minus sign on the displacement, to get−ξ0 sin[2π(−x + ct)/λ]. The sum of the two waves in the region x> 0i st h e n ξ(x, t)= ξ0 sin [2π λ (x + ct) ] − ξ0 sin [2π λ (−x + ct) ] =2 ξ0 sin ( 2πx λ ) cos (2πft )( 1 2 . 1 6 ) using a trigonometrical identity for sin(a + b), andf = c/λ. The result on the right-hand side of Eq. (12.16)i sc a l l e dastanding wave.I t d o e s n o t t r a v e l anywhere, it just oscillates “in place”: every pointx behaves like a separate oscillator with an amplitude 2ξ0 sin(2πx/λ). This amplitude is zero at special points, where 2x/λ is equal to an integer. These points are callednodes. We could think of “confining” a wave of this sort to a string fixeda tb o t he n d s ,i fw em a k et h e string have an end atx =0a n dt h eo t h e ro n ea to n eo ft h e s ep o i n t sw h e r et h ea m p l i t u d eis zero; this means we want the lengthL of the string to satisfy 2L = nλ (12.17)",University Physics I Classical Mechanics.pdf "this means we want the lengthL of the string to satisfy 2L = nλ (12.17) where n =1 , 2,... .A l t e r n a t i v e l y ,w e c a nt h i n ko fL as being fixed and Eq. (12.17)a sg i v i n gu st h e possible values ofλ that will give us standing waves:λ =2 L/n.S i n c ef = c/λ,w es e et h a ta l l these possible standing waves, for fixedL and c, have different frequencies that we can write as fn = nc 2L,n =1 , 2, 3,... (12.18) Note that these are all multiples of the frequencyf1 = c/2L.W e c a l l t h i s t h efundamental frequency of oscillation of a string fixed at both ends. The period corresponding to this fundamental frequency is the roundtrip time of a wave pulse around the string, 2L/c. The first three standing waves are plotted in Figure12.5 (next page). Their wave functions are given by the right-hand side of Eq. (12.16), for 0 ≤ x ≤ L,w i t hλ =2 L/n (n =1 , 2, 3), and",University Physics I Classical Mechanics.pdf "given by the right-hand side of Eq. (12.16), for 0 ≤ x ≤ L,w i t hλ =2 L/n (n =1 , 2, 3), and f = fn = nc/2L.T h e a m p l i t u d ei sa r b i t r a r y ;i nt h e fi g u r e Ih a v es e ti te q u a lto1f o rc o n v e n i e n c e . Calling the corresponding functionun(x, t)i sm o r eo rl e s sc o m m o np r a c t i c ei no t h e rc o n t e x t s : un(x, t)=s i n ( nπx L ) cos (2πfnt)( 1 2 . 1 9 ) These functions are called the normal modes of vibration of the string. In Figure 12.5 Ih a v e shown, for each of them, the displacement at the initial time, t =0 ,a sas o l i dl i n e ,a n dt h e nh a l fa period later as a dashed line. In addition to this, notice thatt h ew a v ef u n c t i o nv a n i s h e si d e n t i c a l l y (the string is flat) at the quarter-period intervals,t =1 /4fn and t =3 /4fn.A t t h o s e t i m e s , t h e wave has no elastic potential energy (since the string is unstretched): as with a simple oscillator",University Physics I Classical Mechanics.pdf "wave has no elastic potential energy (since the string is unstretched): as with a simple oscillator passing through the equilibrium position, all its energy iskinetic. For n> 1, there are also nodes (places where the oscillation amplitude is always zero) at points other than the ends. Including the endpoints, the n-th normal mode hasn +1 n o d e s . T h ep l a c e s w h e r et h eo s c i l l a t i o n a m p l i t u d ei s largest are calledantinodes.",University Physics I Classical Mechanics.pdf "12.2. STANDING WAVES AND RESONANCE 291 -1 0 1 0 0.2 0.4 0.6 0.8 1 -1 0 1 -1 0 1 x/L ξ/ξ0 Figure 12.5: The three lowest-frequency normal modes of vibration of a stringheld down at both ends, corresponding to, from top to bottom,n =1 , 2, 3 Animations of these standing waves can be found in many places; one I particularly like is here: http://newt.phys.unsw.edu.au/jw/strings.html#standing.I t a l s o s h o w s g r a p h i c a l l yh o wt h e standing wave can be considered as a superposition of two oppositely-directed traveling waves, as in Eq. (12.16). If we initially bent the string into one of the shapes shown inFig. 12.5,a n dt h e nr e l e a s e di t ,i t would oscillate at the corresponding frequencyfn,k e e p i n gt h es a m es h a p e ,o n l ys c a l i n gi tu pa n d down by a factor cos(2πfnt)a st i m ee l a p s e d .S o ,a n o t h e rw a yt ot h i n ko fs t a n d i n gw a v e sisa st h e",University Physics I Classical Mechanics.pdf "down by a factor cos(2πfnt)a st i m ee l a p s e d .S o ,a n o t h e rw a yt ot h i n ko fs t a n d i n gw a v e sisa st h e natural modes of vibration of an extended system—the string, in this case, although standing waves can be produced in any medium that can carry a traveling wave. What I mean by a “natural mode of vibration” is the following:as i n g l eo s c i l l a t o r ,s a y ,ap e n d u l u m , has a single “natural” frequency; if you displace it or hit it,i tj u s to s c i l l a t e sa tt h a tf r e q u e n c yw i t h ac o n s t a n ta m p l i t u d e . A ne x t e n d e ds y s t e m ,l i k et h es t r i n g ,can be viewed as a collection of coupled oscillators, which may in general oscillate in many differentand complicated ways; yet, there is a specific set of frequencies—for the string with two ends fixed,t h es e q u e n c efn of Eq. (12.18)—and associated shapes that will result in all the parts of the string performing simple harmonic motion,",University Physics I Classical Mechanics.pdf "associated shapes that will result in all the parts of the string performing simple harmonic motion, in synchrony, all at the same frequency. Of course, to produce just one of these specific modes of oscillation requires some care (“driving” the string at the right frequency is probably the easiest way;s e en e x tp a r a g r a p h ) ;h o w e v e r ,i f you simply hit or pluck the string in any random way, a remarkable thing happens: the resulting motion will be, mathematically, described as a sum of sinusoidal standing waves, each with one",University Physics I Classical Mechanics.pdf "292 CHAPTER 12. WAVES IN ONE DIMENSION of the frequencies fn, and each with a different amplitudeAn.I n a m u s i c a l i n s t r u m e n t , t h i s will eventually generate a superposition of sound waves withf r e q u e n c i e sf1 = c/2L, f2 =2 f1, f3 =3 f1 ... (called, in this context, thefundamental, f1,a n di t sovertones, fn = nf1). Each one of these frequencies corresponds to a different pitch, or musicaln o t e ,a n dt h er e s u l tw i l ls o u n dal i t t l e like a chord, although not nearly as pronounced—we will mostly hear only the fundamental, which corresponds to the root note of the chord, but all the notes inam a j o rt r i a da r ei nf a c tp r e s e n ti n the vibration of a single guitar or piano string4. But wait, there’s more! Suppose that you try to get the stringto oscillate by “driving” it: that is to say, grabbing a hold of one end and shaking it at some frequency, only with a very small amplitude,",University Physics I Classical Mechanics.pdf "say, grabbing a hold of one end and shaking it at some frequency, only with a very small amplitude, so the displacement at that end remains always close to zero.In that case, you will typically get only very small amplitude oscillations, until the driving frequency hits one of the special frequencies fn,a tw h i c hp o i n ty o uw i l lg e tal a r g eo s c i l l a t i o nw i t ht h es h a peo ft h ec o r r e s p o n d i n gs t a n d i n g wave. This is a phenomenon known asresonance,a n dt h efn are the resonant frequencies of this system. Note that the effect I just described is essentially the same asyou experience when you are “pump- ing,” or simply pushing, a swing. Unless you do it at the rightfrequency, you do not get very far; but if you do it at the right frequency (which is the swing’s natural frequency, the one at which it will swing on its own), you can get huge amplitude oscillations. So, the frequencies (12.18)m a yb e",University Physics I Classical Mechanics.pdf "will swing on its own), you can get huge amplitude oscillations. So, the frequencies (12.18)m a yb e said to be the string’s natural oscillation frequencies in the same two ways: they are the ones at which it will oscillate if you just pluck it, and they are the ones at which you have to drive it if you want to get large oscillations. Pretty much everything I have just shown you above for standing waves on a string applies to sound waves inside a tube or pipe open at both ends. In that case, however, it is not the displacement, but the pressure (or density) wave that must have zeros at theends (since the ends are open, the pressure there must be just the average atmospheric pressure; note that the pressure or density waves in a sound wave do not give the absolute pressure or density, but the deviation, positive or negative, from the average). The math, however, is identical, and one finds the same set of normal",University Physics I Classical Mechanics.pdf "negative, from the average). The math, however, is identical, and one finds the same set of normal modes and resonance frequencies as above. These are then thefrequencies that would be produced when blowing in a flute or an organ pipe open at both ends. So, both from pipes and strings we get the same “harmonic series” of frequencies (12.18)t h a th a sb e e nt h ef o u n d a t i o no fW e s t e r nm u s i c since at least the time of Pythagoras. 4It works like this: sayf1 corresponds to a C, thenf2 is the C above that,f3 the G above that,f4 the C above that, andf5 the E above that.",University Physics I Classical Mechanics.pdf "12.3. CONCLUSION, AND FURTHER RESOURCES 293 12.3 Conclusion, and further resources This chapter on one-dimensional waves has barely scratchedthe surface of the extremely rich world of wave phenomena. I have only given you a passing glance at interference, and I have not said anything at all about diffraction, the Doppler effect, polarization, refraction... .M a n y o f t h e s e things you will learn about in later courses, most likely wheny o ue n c o u n t e re l e c t r o m a g n e t i cw a v e s (which are non-mechanical, but described by the same mathematical equation). Waves are such an intrinsically kinetic phenomenon that theya r eb e s ta p p r e c i a t e db yw a t c h - ing them in action, or, as a second-best alternative, througha n i m a t i o n s . Aw o n d e r f u lr e p o s - itory of such movies and animations is PHYSCLIPS at the University of New South Wales: http://www.animations.physics.unsw.edu.au/waves-sound/oscillations/index.html",University Physics I Classical Mechanics.pdf "http://www.animations.physics.unsw.edu.au/waves-sound/oscillations/index.html They also have a set of pages on the “physics of music” that I have already mentioned a couple of times. If you are interested in this topic, you should go spends o m et i m et h e r e ! http://newt.phys.unsw.edu.au/music Finally, closer to home, the fellows at PhET (University of Colorado), have this great interactive app to explore waves on a string: https://phet.colorado.edu/en/simulation/wave-on-a-s tring 12.4 In summary 1. A traveling wave in an elastic medium is a collective disturbance of the particles in the medium (a displacement, or change in pressure or density) that carries energy and momentum from one point of the medium to another, over a distance that is typically much larger than the displacement of the individual particles making up the wave. 2. In a longitudinal wave, the displacement of the particlesis along the line of motion of the",University Physics I Classical Mechanics.pdf "2. In a longitudinal wave, the displacement of the particlesis along the line of motion of the wave; in a transverse wave, it is perpendicular to the wave’smotion. 3. An important kind of waves are periodic waves, in which thedisturbance repeats itself at each point in the medium with a periodT.S i n u s o i d a l , p e r i o d i c w a v e s a r e c a l l e d h a r m o n i c waves. Their spatial period is called the wavelengthλ.I ft h es p e e do ft h ew a v ei sc,o n eh a s c = fλ,w h e r ef =1 /T is the wave frequency. 4. The time-averaged energy density in a harmonic wave (sum ofk i n e t i ca n de l a s t i cp o t e n t i a l energy per unit volume) isE/V = ρ0ω2ξ2 0/2, where ρ0 is the medium’s density, andξ0 the amplitude of the displacement oscillations. The time average momentum density isE/cV . The intensity of the wave (energy carried per unit time per unit area) iscE/V .",University Physics I Classical Mechanics.pdf "294 CHAPTER 12. WAVES IN ONE DIMENSION 5. Sound is a longitudinal compression-and-rarefaction wave in an elastic medium. It can be described in terms of displacement, pressure or density. Thep r e s s u r eo rd e n s i t yd i s t u r b a n c e is maximal where the displacement is zero, and vice-versa. 6. The speed of sound in a solid with Young modulusY is c = √ Y/ρ0;i nafl u i dw i t hb u l k modulus B,i ti sc = √ B/ρ0.I na ni d e a lg a s ,t h i sd e p e n d s o n l yo nt h e r a t i oo fs p e c i fi c h e ats, the molar mass, and the temperature. 7. Transverse waves on a string with mass per unit lengthµ and under a tensionFt travel with as p e e dc = √ Ft/µ. 8. When a wave reaches the boundary between two media, it is typically partly reflected and partly transmitted. The incident, reflected and transmittedw a v e sa l lh a v et h es a m ef r e q u e n c y . The transmitted wave has a wavelengthc2/f,w h e r ec2 is the wave speed in the second medium.",University Physics I Classical Mechanics.pdf "The transmitted wave has a wavelengthc2/f,w h e r ec2 is the wave speed in the second medium. 9. The quantity that determines how much of the energy is reflected or transmitted is the mechanical impedance,d e fi n e df o re a c hm e d i u ma sZ = cρ0.I f Z1 = Z2 there is no reflected wave. IfZ1 Z 2,i ti su p r i g h t . 10. Standing waves arise in a medium that is confined to a regiono fs p a c e ,a n da r et h en o r m a l( o r “natural”) modes of vibration of the system. In a standing wave, each particle of the medium oscillates with an amplitude that is a fixed function of the particle’s position (a sinusoidal function in one dimension). This amplitude is zero at pointscalled nodes. 11. In one dimension, all the standing wave frequencies are multiples of a fundamental frequency",University Physics I Classical Mechanics.pdf "11. In one dimension, all the standing wave frequencies are multiples of a fundamental frequency f1 = c/2L,w h e r eL is the length of the medium (as long as the boundary conditionsa t both ends of the medium are identical). These are theresonant frequencies of the system: if disturbed, it will naturally oscillate in a superposition oft h e s ef r e q u e n c i e s ,a n di fd r i v e na t one of these frequencies, one will obtain a large response.",University Physics I Classical Mechanics.pdf "12.5. EXAMPLES 295 12.5 Examples 12.5.1 Displacement and density/pressure in a longitudinalw a v e The picture below shows the displacement of a medium (let’s say air) as a sound pulse travels through it. (Don’t worry about the units on the axes right now!W e a r e o n l y i n t e r e s t e d i n q u a l i t a t i v e results here.) ξdisplacement direction of propagation of the wave (x) x (a) Sketch the corresponding pressure (or density) pulse. Note: pressure and density are in phase, so one is large where the other is large. In either case what isalways plotted is thedifference between the actual pressure or density and the average pressure (for air, atmospheric pressure) or density of the medium. (b) If this sound pulse is incident on water, sketch the reflected pulse, both in a displacement and in a pressure/density plot. Solution (a) The purpose of this example is to help refine the intuitionyou may have gotten from Figure",University Physics I Classical Mechanics.pdf "in a pressure/density plot. Solution (a) The purpose of this example is to help refine the intuitionyou may have gotten from Figure 12.3 regarding the relationship between the displacement and thep r e s s u r e / d e n s i t yi nal o n g i t u d i n a l wave. When discussing Fig.12.3,Ia r g u e dt h a tt h ed e n s i t ys h o u l db eh i g ha tap o i n tl i k ex = π in that figure, because the particles to the left of that pointwere being pushed to the right, and those to the right were being pushed to the left. However, a similar argument can be made to show that the density should be higher than its equilibrium valuewhenever the displacement curve has a negative slope, in general. For instance, consider pointx =1i nt h efi g u r ea b o v e . P a r t i c l e sb o t ht ot h el e f ta n dt h er i g h tof that point are being pushed to the right (positive displacement), but the displacement is larger for the ones on the left, which will result in a bunching atx =1 .",University Physics I Classical Mechanics.pdf "296 CHAPTER 12. WAVES IN ONE DIMENSION Conversely, if you look at a point with positive slope, such as x =0 ,y o us e et h a tt h ep a r t i c l e so n the right are pushed farther to the right than the particles ont h el e f t ,w h i c hm e a n st h ed e n s i t y around x =0w i l ld r o p . From this you may conclude that the density versus position graph will look somewhat like the negative of the derivative of theξ-vs.-x graph: positive when ξ falls, negative when it rises, and zero at the “turning points” (maxima or minima ofξ(x)). This is, in fact, mathematically true, and is illustrated in the figure below. density/pressure ξdisplacement x x Figure 12.6: Illustrating the relationship between displacement (blue curve) andpressure/density (red) in a longitudinal wave. The dashed lines separate the regions where the pressure (or density) is positive (higher than in the absence of the wave) from those where it is negative.",University Physics I Classical Mechanics.pdf "than in the absence of the wave) from those where it is negative. (b) If this sound wave is incident from air into water, it meansi ti sg o i n gf r o mal o wi m p e d a n c e to a high impedance medium (both the density and the speed of sound are much greater in water than in air, giving a much largerZ = cρ0;s e eE q .(12.15)f o rt h ed e fi n i t i o no fi m p e d a n c e ) . T h i s means the reflected displacement pulse will be flipped upsidedown, as well as left to right (see the figure on the next page). This is just (except for the scale, which here is arbitrary) like the bottom part of Fig.12.4.",University Physics I Classical Mechanics.pdf "12.5. EXAMPLES 297 However, if you now try to figure out the shape of the density/pressure wave based on the displace- ment wave, as we did in part (a), you’ll see that it is only reversed left to right, butnot flipped upside down! This is a general property of longitudinal waves: the reflected pressure/density wave behaves in exactly the opposite way as the displacement wave,a sf a ra st h eu p s i d e - d o w n“ fl i p ”i s concerned: it gets flipped when going from high impedance to low impedance, and not when going from low to high. density/pressure ξdisplacement x x Figure 12.7: What the wave pulse in the previous figure would look like if reflected from a high-impedance medium. The displacement wave is reversed left to right and flipped upside down. The pressure/density wave is only reversed left to right. If you are curious to see how this happens mathematically, thei d e ai st h a tt h ed e n s i t yw a v ei s",University Physics I Classical Mechanics.pdf "wave is only reversed left to right. If you are curious to see how this happens mathematically, thei d e ai st h a tt h ed e n s i t yw a v ei s proportional to−dξ/dx,a n dt h er e fl e c t e dd i s p l a c e m e n tw a v eg o e sl i k eξrefl = −ξinc(−x), where the first minus sign gives the vertical flip and the second the horizontal one. Taking the derivative of this last expression with respect tox then removes the minus sign in front.",University Physics I Classical Mechanics.pdf "298 CHAPTER 12. WAVES IN ONE DIMENSION 12.5.2 Violin sounds The “sounding length” of a violin string, from the bridge to the nut at the upper end of the fingerboard, is about 32 cm. (a) If the string is tuned so that its fundamental frequency corresponds to a concert A (440 Hz), what is the speed of a wave on that string? (b) If the string’s density is 0.66 g/m (note: the “g” stands for “grams”!), what is the tensiono n the string? (c) When the string is played, its vibration is transmitted through the bridge to the violin plates. At what frequency will the plates vibrate? (d) The vibration of the plates then sets up a sound wave in air.W h a t i s t h e w a v e l e n g t h o f t h i s wave? Solution (a) In Section12.2 we saw that the fundamental frequency of a string fixed at bothends isf1 = c/2L (corresponding to Eq. (12.18)w i t hn =1 ) . S e t t i n gt h i se q u a lt o4 4 0H z ,a n ds o l v i n gf o rc, c =2 Lf1 =2 × (0.32 m)× 440 s−1 =2 8 2m s",University Physics I Classical Mechanics.pdf "c =2 Lf1 =2 × (0.32 m)× 440 s−1 =2 8 2m s (b) From Section12.1.3,w eh a v et h a tt h es p e e do faw a v eo nas t r i n gi sc = √ Ft/µ,w h e r eFt is the tension andµ the mass per unit length (Eq. (12.11). Solving forFt, Ft = c2µ = ( 282 m s )2 × 6.6 × 10−4 kg m =5 2.5N (c) The plates will vibrate at the same frequency as the string, 440 Hz, since they are driven by the motion of the string. (d) The basic relationship to use here is Eq. (12.4), f = c/λ,w h i c hw ec a ns o l v ef o rλ if we know c,t h es p e e do fs o u n di na i r .I nS e c t i o n12.1.3 it was stated that the speed of sound in air is about 340 m/s, so we have λ = c f = 340 m/s 440 s−1 =0 .77 m",University Physics I Classical Mechanics.pdf "12.6. ADVANCED TOPICS 299 12.6 Advanced Topics 12.6.1 Chain of masses coupled with springs: dispersion, andl o n g - w a v e l e n g t h limit. Consider a model of an extended elastic medium in which, for simplicity, we separate the two main medium properties, inertia and elasticity, by describing ita sac h a i no fp o i n t - l i k em a s s e s( p a r t i c l e s ) connected by massless springs, as in Figure12.8 below. I will show you here how one can get “ideal” wave behavior in this system, provided we work in the“long-wavelength” limit, that is to say, we consider only waves whose wavelength is much greaterthan the average distance between neighboring masses. ...... ξn-1 ξn+1ξn d Figure 12.8: A chain of masses connected by massless springs. The top picture shows the equilibrium posi- tions with the springs relaxed, the bottom one the situation where each mass has undergone a displacement ξ.",University Physics I Classical Mechanics.pdf "tions with the springs relaxed, the bottom one the situation where each mass has undergone a displacement ξ. In the figure above I have explicitly shown then-th mass and the two springs that push and/or pull on it, both in equilibrium (top drawing) and when the chain isin motion (bottom). In the latter case, the length of the springs depends on the relative displacements of all three masses shown. Specifically, the length of the spring on the left isd+ξn −ξn−1,w h e r ed is the distance between the masses in equilibrium, and the length of the spring on the right isd + ξn+1 − ξn.I ft h el e f ts p r i n g is stretched (length greater thand)i tw i l lp u l lt ot h el e f to nt h en-th mass, and, conversely, if the right spring is stretched (length greater thand)i tw i l lp u l lt ot h er i g h to nt h en-th mass. So, if all the springs have the same constantk,t h ef o r c ee q u a t i o nF = ma for massn is man = −k(ξn − ξn−1)+ k(ξn+1 − ξn)( 1 2 . 2 0 ) which we can rewrite as md2ξn",University Physics I Classical Mechanics.pdf "man = −k(ξn − ξn−1)+ k(ξn+1 − ξn)( 1 2 . 2 0 ) which we can rewrite as md2ξn dt2 = kξn−1 − 2kξn + kξn+1 (12.21)",University Physics I Classical Mechanics.pdf "300 CHAPTER 12. WAVES IN ONE DIMENSION Now let us try to see if we can get a sinusoidal solution to thissystem of differential equations. By analogy with Eq. (12.3)l e t ξn(t)= A sin [ 2π ( xn λ − ft )] where xn = nd is the equilibrium position of then-th mass. Then for each of the three masses considered, we have ξn−1(t)= A sin[2π((n − 1)d/λ − ft)] =A sin[2π(nd/λ − ft) − 2πd/λ] ξn(t)= A sin[2π(nd/λ − ft)] ξn+1(t)= A sin[2π((n +1 )d/λ − ft)] =A sin[2π(nd/λ − ft)+2 πd/λ]( 1 2 . 2 2 ) We want to substitute all this in Eq. (12.21). We can use the trigonometric identity sin(a − b)+ sin(a + b)=2s i na cos b to simplifyξn−1 + ξn+1: ξn−1 + ξn+1 =2 A sin [ 2π ( nd λ − ft )] cos ( 2πd λ ) (12.23) then use 1− cos x =2s i n2(x/2) to yield kξn−1 − 2kξn + kξn+1 = −4kA sin2 ( πd λ ) sin [ 2π ( nd λ − ft )] = −4k sin2 ( πd λ ) ξn (12.24) It is clear now that Eq. (12.21)w i l lb es a t i s fi e dp r o v i d e dt h ef o l l o w i n gc o n d i t i o nh o l d s : m(2πf )2 =4 k sin2 ( πd λ ) (12.25)",University Physics I Classical Mechanics.pdf "m(2πf )2 =4 k sin2 ( πd λ ) (12.25) Or, taking the square root and simplifying, f = 1 π √ k m sin ( πd λ ) (12.26) This is clearly a more complicated relation betweenf and λ than just Eq. (12.4). However, since we can argue that Eq. (12.4)m u s ta l w a y sh o l df o ras i n u s o i d a lw a v e ,w h a tw eh a v ea c t u a l lyf o u n d is that the chain of masses and springs in Fig. (12.8)w i l ls u p p o r tas i n u s o i d a lw a v ep r o v i d e dt h e wave velocity depends on the wavelengthas required by Eqs. (12.4)a n d(12.26): c = λf = √ k m λ π sin ( πd λ ) (12.27) This is an instance of the phenomenon calleddispersion: sinusoidal waves of different frequencies (or wavelengths) have different velocities. One thing that happens in the presence of dispersion is that, although a single (infinite), sinusoidal wave can travel without changing its shape (provided f and λ satisfy Eq. (12.26)), a general pulse will be distorted as it propagates throught h em e d i u m ,",University Physics I Classical Mechanics.pdf "f and λ satisfy Eq. (12.26)), a general pulse will be distorted as it propagates throught h em e d i u m , often severely so.",University Physics I Classical Mechanics.pdf "12.6. ADVANCED TOPICS 301 In the long wavelength limit, however, the dispersion in thism o d e ld i s a p p e a r s . W ec a ns e et h i s as follows. In that limit,λ ≫ d (the wavelength is much greater than the distance between the masses), and thereforeπd/λ ≪ 1; we can then make the small-angle approximation in Eq. (12.27), sin(πd/λ) ≃ πd/λ,a n de n du pw i t h c ≃ d √ k m (12.28) This is of the general form √ stiffness/inertia (as per Eq. (12.10)). Basically, in the long-wavelength limit, the medium appears homogeneous to the wave—it cannot“tell” that it is a chain of discrete particles. When you consider that everything that looks homogeneous on a macroscopic scale is actually made of discrete atoms or molecules at the microscopic level, you can see that this model is perhaps not as artificial as it might seem, and that in general you should, in fact, expect some kind of dispersion to occur in any medium, at sufficiently smallw a v e l e n g t h s .",University Physics I Classical Mechanics.pdf "302 CHAPTER 12. WAVES IN ONE DIMENSION 12.7 Problems Problem 1 When plucked, the D string on a guitar vibrates with a frequency of 147 Hz. (a) What would happen to this frequency if you were toincrease the tension in the string? (b) The vibration of the string eventually produces a sound wave of the same frequency, traveling through the air. If the speed of sound in air is 340 m/s, what isthe wavelength of this wave? Problem 2 Think of a flute as basically a cylindrical tube of length 0.6m , o pe n t o t h e a t m o s p h e r e a t bo t h ends. If the speed of sound in air is 340 m/s (a) What is the fundamental (lowest) frequency of a sound wavei nafl u t e ? (b) Is this a transverse or a longitudinal wave? (c) The speed of sound in helium is about 3 times that in air. Howw o u l dt h efl u t e ’ sr e s o n a n c e frequencies change if you filled it with helium instead of air? Justify each of your answers briefly. Problem 3",University Physics I Classical Mechanics.pdf "frequencies change if you filled it with helium instead of air? Justify each of your answers briefly. Problem 3 The top picture shows a wave pulse on a string (string 1) traveling to the right, where the string is attached to another one (string 2, not shown). The bottom picture shows the reflected wave some time later. If the tension on both strings is the same, (a) Is string 2 more or less dense than string 1? (b) In which string will the wave travel faster? (c) Sketch what the reflected wave would look like if the strings’ densities were the opposite of what you answered in part (a). Explain each of your answers briefly.",University Physics I Classical Mechanics.pdf "Chapter 13 Thermodynamics 13.1 Introduction The last two lectures this semester are about thermodynamics, an extremely important branch of physics that developed throughout the 19th century, motivated in part by the development of the steam engines that brought about the Industrial Revolution. Physics majors will study ther- modynamics at much greater length in University Physics IIIand subsequent courses, whereas Engineering and Chemistry majors will encounter it also in specialized courses in their own disci- plines. There is really no escaping thermodynamics, but you may wonder why bring it up here (in this course, at this time) at all? The answer is twofold: • From the point of view of the study of energy and its transformations, which has been one of the major themes of this course, thermodynamics providesus with the last missing pieces: it is here that we find out what thermal energy really is, and how it is different from other",University Physics I Classical Mechanics.pdf "it is here that we find out what thermal energy really is, and how it is different from other forms of energy (so much so, that we say that energy has been “dissipated” or “lost” when it becomes thermal energy). It is also here that we deal with theother way that energy can be transferred from a system to another (other, that is, than bydoing work): this is the “direct transfer of thermal energy,” or what is normally called anexchange of heat. • From the point of view of the study of motion, which has been also another running theme, thermodynamics also represents the next logical step beyondw h a tw eh a v el e a r n e ds of a r . Recall that we started looking at the motion of extended objects as if they were simple point particles, moving as a whole along with their center of mass,and slowly introduced tools to deal with more complex kinds of motion: first rigid body rotations, then elastic deformations 303",University Physics I Classical Mechanics.pdf "304 CHAPTER 13. THERMODYNAMICS (waves) in which the constituent parts of an object move relative to each other in a way that looks “organized,” or synchronized, from a macroscopic perspective. What is needed next is to account for the random motion, on a microscopic scale, of the smallest parts (atoms or molecules) that make up an extended object. This motion is constantly happening, and it is ak e yi n g r e d i e n to ft h ec o n c e p t so ft h e r m a le n e r g ya n dt e m p e rature. Conceptually, thermodynamics involves the introduction oft w on e wp h y s i c a lq u a n t i t i e s ,tempera- ture and entropy.T e m p e r a t u r e w i l l b e i n t r o d u c e d i n t h i s l e c t u r e , a n d e n t r o pyi nt h en e x to n e . I t is interesting to note from the start, however, that these are very different from all the quantities we have introduced so far this semester, in a fundamental way.I n c l a s s i c a lp h y s i c s , a t l e a s t ,t h e r e",University Physics I Classical Mechanics.pdf "we have introduced so far this semester, in a fundamental way.I n c l a s s i c a lp h y s i c s , a t l e a s t ,t h e r e is no difficulty in extending all those other quantities to thestudy of the smallest parts making up an object: we can perfectly well talk about the position, velocity or energy of a molecule. But temperature and entropy arestatistical quantities, which are only properly defined, from a funda- mental point of view, for a large collection of (small) subsystems: it makes no sense to speak about the temperature or the entropy of a single molecule. This shows that there was really a profound change in perspective and methodology in classical physicswhen statistical mechanics(the part of physics that provides a microscopic foundation for thermodynamics) was developed. 13.2 Introducing temperature 13.2.1 Temperature and heat capacity The change in perspective that I just mentioned also means that it is not easy to evendefine",University Physics I Classical Mechanics.pdf "13.2.1 Temperature and heat capacity The change in perspective that I just mentioned also means that it is not easy to evendefine temperature, beyond our natural intuition of “hot” and “cold,” or the somewhat circular notion that temperature is simply “what thermometers measure.” Roughly speaking, though, temperature is a measure of the amount (or, to be somewhat more precise, the concentration)o ft h e r m a le n e r g y in an object. When we directly put an amount of thermal energy,∆ Eth (what we will be calling heat in a moment), in an object, we typically observe its temperature to increase in a way that is approximately proportional to ∆Eth,a tl e a s ta sl o n ga s∆Eth is not too large: ∆T = ∆Eth C (13.1) The proportionality constantC is called theheat capacityof the object: according to Eq. (13.1), a system with a large heat capacity could absorb (or give off—theequation is supposed to apply in",University Physics I Classical Mechanics.pdf "system with a large heat capacity could absorb (or give off—theequation is supposed to apply in either case) a large amount of thermal energy without experiencing a large change in temperature. If the system does not do any work in the process (recall Eq. (7.20)!), then its internal energy will increase (or decrease) by exactly the same amount of thermalenergy it has taken in (or given off)1, 1If the systemdoes do some work (or has work done on it), then Eq. (13.8)a p p l i e s ;s e eb e l o w .",University Physics I Classical Mechanics.pdf "13.2. INTRODUCING TEMPERATURE 305 and we can use the heat capacity2 to, ultimately, relate the system’s temperature to its energy content in a one-to-one-way. What is found experimentally is that the heat capacity of a homogeneous object (that is, one made of just one substance) is, in general, proportional to its mass. This is why, instead of tables of heat capacities, what we compile are tables ofspecific heats,w h i c ha r eh e a tc a p a c i t i e sp e rk i l o g r a m( o r sometimes per mole, or per cubic centimeter... but all these things are ultimately proportional to the object’s mass). In terms of a specific heatc = C/m,a n da g a i na s s u m i n gn ow o r kd o n eo rb y the system, we can rewrite Eq. (13.1)t or e a d ∆Esys = mc∆T (13.2) or, again, ∆T = ∆Esys mc (13.3) which shows what I said above, that temperature really measures, not the total energy content of an object, but itsconcentration—the thermal energy “per unit mass,” or, if you prefer (and",University Physics I Classical Mechanics.pdf "of an object, but itsconcentration—the thermal energy “per unit mass,” or, if you prefer (and somewhat more fundamentally) “per molecule.” An object canhave a great deal of thermal energy just by virtue of being huge, and yet still be pretty cold (water in the ocean is a good example). In fact, we can also rewrite Eqs. (13.1–13.3)i nt h e( s o m e w h a tc o n t r i v e d - l o o k i n g )f o r m C = mc = m∆Esys/m ∆T (13.4) which tells you that an object can have a large heat capacity int w ow a y s :o n ei ss i m p l yt oh a v ea lot of mass, and the other is to have a large specific heat. The first of these ways is kind of boring (but potentially useful, as I will discuss below); the secondi si n t e r e s t i n g ,b e c a u s ei tm e a n st h a t ar e l a t i v e l yl a r g ec h a n g ei nt h ei n t e r n a le n e r g yp e rm o l e c u le( r o u g h l ys p e a k i n g ,t h en u m e r a t o ro f",University Physics I Classical Mechanics.pdf "(13.4)) will only show as a relatively small change in temperature(the denominator of (13.4); a large numerator and a small denominator make for a large fraction!). Put differently, and somewhat fancifully,substances with a large specific heat are very good at hiding their thermal energy from thermometers(see Fig. 13.1 for an example). This, as I said, is an interesting observation, but it also means that measuringh e a tc a p a c i t i e s — o r ,f o rt h a tm a t t e r , measuring temperature itself—may not be an easy matter. Howdo we get at the object’s internal energy if not through its temperature? Where does one start? 2Which, it must be noted, may also be a function of the system’stemperature—another complication we will cheerfully ignore here.",University Physics I Classical Mechanics.pdf "306 CHAPTER 13. THERMODYNAMICS Figure 13.1: In this simple model of a gas of diatomic molecules, each molecule can store “vibrational” potential energy (both potential and kinetic, through the oscillations of the “spring” that models the inter- action between the atoms), plus as at least two kinds of rotationalkinetic energy (corresponding to rotations around the axes shown), in addition to just the translational kinetic energy of its center of mass. The latter is the only one directly measured by a gas thermometer, so a diatomicgas has many more ways of “hiding” its thermal energy (and hence, a larger specific heat) than a monoatomic gas. 13.2.2 The gas thermometer Ag o o ds t a r t ,a tl e a s tc o n c e p t u a l l y ,i sp r o v i d e db yl o o k i n gatas y s t e mt h a th a sn op l a c et oh i d ei t s thermal energy—it has to show it all, have it, as it were, in full view all the time. Such a system",University Physics I Classical Mechanics.pdf "thermal energy—it has to show it all, have it, as it were, in full view all the time. Such a system is what has come to be known asan ideal gas—which we model, microscopically, as a collection of molecules (or, more properly, atoms) with no dimension andn os t r u c t u r e :j u s tp o i n t l i k et h i n g s whizzing about and continually banging into each other and against the walls of their container. For such a systemthe only possible kind of internal energy is the sum of the molecules’ translational kinetic energy.W e m a y e x p e c t t h i s t o b e e a s i l y d e t e c t e d b y a t h e r m o m e t e r ( o rany other energy- sensitive probe), because as the gas molecules bang againstthe thermometer, they will indirectly reveal the energy they carry, both by how often and how hard they collide. As it turns out, we can be a lot more precise than that. We can analyze the theoretical model",University Physics I Classical Mechanics.pdf "As it turns out, we can be a lot more precise than that. We can analyze the theoretical model of an ideal gas that we have just described fairly easily, using nothing but the concepts we have introduced earlier in the semester (plus a few simple statistical ideas) and obtain the following result for the gas’ pressure and volume: PV = 2 3N⟨Ktrans⟩ (13.5) where N is the total number of molecules, and⟨Ktrans⟩ is the average translational kinetic energy per molecule. Now, you are very likely to have seen, in high-school chemistry, theexperimentally derived “ideal gas law,” PV = nRT (13.6) where n is the number of moles, andR the “ideal gas constant.” Comparing Eq. (13.5)( at h e o r e t i c a l prediction for a mathematical model) and Eq. (13.6)( a ne m p i r i c a lr e s u l ta p p r o x i m a t e l yv a l i df o r",University Physics I Classical Mechanics.pdf "13.2. INTRODUCING TEMPERATURE 307 many real-world gases under a wide range of pressure and temperature, where “temperature” literally means simply “what any good thermometer would measure”) immediately tells us what temperature is,a tl e a s tf o rt h i se x t r e m e l ys i m p l es y s t e m : i ti sj u s tam e a s ure of the average (translational) kinetic energy per molecule. It would be tempting to leave it at that, and immediately generalize the result to all kinds of other systems. After all, presumably, a thermometer inserted in aliquid is fundamentally responding to the same thing as a thermometer inserted in an ideal gas: namely, to how often, and how hard, the liquid’s molecules bang against the thermometer’s wall. Sowe can assume that, in fact, it must be measuring the same thing in both cases—and that would be thea v e r a g et r a n s l a t i o n a lk i n e t i c energy per molecule. Indeed, there is a result in classical statistical mechanics that states that for",University Physics I Classical Mechanics.pdf "energy per molecule. Indeed, there is a result in classical statistical mechanics that states that for any system (liquid, solid, or gas) in “thermal equilibrium” (a state that I will define more precisely later), the average translational kinetic energy per molecule must be ⟨Ktrans⟩ = 3 2kBT (13.7) where kB is a constant calledBoltzmann’s constant(kB =1 .38×10−23 J/K), andT,a si nE q .(13.6) is measured in degrees Kelvin. There is nothing wrong with this way to think about temperature, except that it is too self- limiting. To simply identify temperature with the translational kinetic energy per molecule leaves out a lot of other possible kinds of energy that a complex system might have (a sufficiently complex molecule may also rotate and vibrate, for instance, as shownin Fig. 13.1;t h e s ea r es o m eo ft h e ways the molecule can “hide” its energy from the thermometer,a sIs u g g e s t e da b o v e ) . T y p i c a l l y ,",University Physics I Classical Mechanics.pdf "ways the molecule can “hide” its energy from the thermometer,a sIs u g g e s t e da b o v e ) . T y p i c a l l y , all those other forms of internal energy also go up as the temperature increases, so it would be at least a bit misleading to think of the temperature as havingt od ow i t ho n l yKtrans,E q .(13.7) notwithstanding. Ultimately, in fact, it is thetotal internal energy of the system that we want to relate to the temperature, which means having to deal with those pesky specific heats I introduced in the previous section. (As an aside, the calculation of specific heats was one of the great challenges to the theoretical physicists of the late 19th and early 20thcentury, and eventually led to the introduction of quantum mechanics—but that is another story!) In any case, the ideal gas not only provides us with an insightinto the microscopic picture behind the concept of temperature, it may also serve as a thermometer itself. Equation (13.6)s h o w st h a tt h e",University Physics I Classical Mechanics.pdf "concept of temperature, it may also serve as a thermometer itself. Equation (13.6)s h o w st h a tt h e volume of an ideal gas held at constant pressure will increasei naw a yt h a t ’ sd i r e c t l yp r o p o r t i o n a lt o the temperature. This is just how a conventional, old-fashioned mercury thermometer worked—as the temperature rose, the volume of the liquid in the tube wentu p .T h ei d e a lg a st h e r m o m e t e ri s ab i tm o r ec u m b e r s o m e( ar e l a t i v e l ys m a l lt e m p e r a t u r ec h a n gem a yc a u s eap r e t t yl a r g ec h a n g ei n volume), but, as I stated earlier, typically works well overav e r yl a r g et e m p e r a t u r er a n g e . By using an ideal (or nearly ideal) gas as a thermometer, basedo nE q .(13.6), we are, in fact, implicitly defining a specific temperature scale, the Kelvinscale (indeed, you may recall that for",University Physics I Classical Mechanics.pdf "308 CHAPTER 13. THERMODYNAMICS Eq. (13.6)t ow o r k ,t h et e m p e r a t u r em u s tb em e a s u r e di nd e g r e e sK e l v i n). The zero point of that scale (what we call absolute zero) is the theoretical point atw h i c ha ni d e a lg a sw o u l ds h r i n kt o precisely zero volume. Of course, no gas stays ideal (or evengaseous!) at such low temperatures, but the point can easily be found by extrapolation: for instance, imagine plotting experimental values ofV vs T,a tc o n s t a n tp r e s s u r e ,f o ran e a r l yi d e a lg a s ,u s i n ga n yk i n dof thermometer scale to measureT,o v e raw i d er a n g eo ft e m p e r a t u r e s .T h e n ,c o n n e c tt h ep o i n t sby a straight line, and extend the line to where it crosses theT axis (soV =0 ) ;t h a tp o i n tg i v e sy o ut h ev a l u eo fa b s o l u t e zero in the scale you were using, such as−273.15 Celsius, for instance, or−459.67 Fahrenheit. V T (any scale)T = 0 (Kelvin scale)",University Physics I Classical Mechanics.pdf "zero in the scale you were using, such as−273.15 Celsius, for instance, or−459.67 Fahrenheit. V T (any scale)T = 0 (Kelvin scale) Figure 13.2: Illustrating how a gas thermometer can be used to define the Kelvin,or absolute, temperature scale. The connection between Kelvin (orabsolute)t e m p e r a t u r ea n dm i c r o s c o p i cm o t i o ne x p r e s s e db y equations like (13.5)t h r o u g h(13.7)i m m e d i a t e l yt e l l su st h a ta sy o ul o w e rt h et e m p e r a t u r et h e atoms in your system will move more and more slowly, until, when you reach absolute zero, all microscopic motion would cease. This does not quite happen,because of quantum mechanics, and we also believe that it is impossible to really reach absolutez e r of o ro t h e rr e a s o n s ,b u ti ti st r u e to a very good approximation, and experimentalists have recently become very good at cooling small ensembles of atoms to temperatures extremely close toabsolute zero, where the atoms move,",University Physics I Classical Mechanics.pdf "small ensembles of atoms to temperatures extremely close toabsolute zero, where the atoms move, literally, slower than snails (instead of whizzing by at close to the speed of sound, as the air molecules do at room temperature). 13.2.3 The zero-th law Historically, thermometers became useful because they gaveu saw a yt oq u a n t i f yo u rn a t u r a l perception of cold and hot, but the quantity they measure, temperature, would have been pretty useless if it had not exhibited an important property, whichwe naturally take for granted, but which is, in fact, surprisingly not trivial. This property, whichoften goes by the name ofthe zero-th law of thermodynamics,c a nb es t a t e da sf o l l o w s : Suppose you place two systemsA and B in contact, so they can directly exchange thermal energy (more about this in the next section), while isolating them from the rest of the world (so their joint",University Physics I Classical Mechanics.pdf "13.3. HEAT AND THE FIRST LAW 309 thermal energy has no other place to go). Then, eventually, they will reach a state, calledthermal equilibrium,i nw h i c ht h e yw i l lb o t hh a v et h es a m et e m p e r a t u r e . This is important for many reasons, not the least of which being that that is what allows us to mea- sure temperature with a thermometer in the first place: the thermometer tells us the temperature of the object with which we place it in contact, by first adopting itself that temperature! Of course, ag o o dt h e r m o m e t e rh a st ob ed e s i g n e ds ot h a ti tw i l ld ot h a tw hile changing the temperature of the system being measured as little as possible; that is to say, the thermometer has to have a much smaller heat capacity than the system it is measuring, so thati to n l yn e e d st og i v eo rt a k eav e r y small amount of thermal energy in order to match its temperature. But the main point here is that",University Physics I Classical Mechanics.pdf "small amount of thermal energy in order to match its temperature. But the main point here is that the match actually happens, and when it does, the temperaturem e a s u r e db yt h et h e r m o m e t e rw i l l be the same for any other systems that are, in turn, in thermalequilibrium with—that is, at the same temperature as—the first one. The zero-th law only assures us that thermal equilibrium wille v e n t u a l l yh a p p e n ,t h a ti s ,t h et w o systems will eventually reach one and the same temperature;it does not tell us how long this may take, nor even, by itself, what that final temperature will be.T h e l a t t e r p o i n t , h o w e v e r , c a n b e easily determined if you make use of conservation of energy (the first law, coming up!) and the concept of heat capacity introduced above (think about it foram i n u t e ) . Still, as I said above, this result is far from trivial. Just imagine, for instance, two different ideal",University Physics I Classical Mechanics.pdf "Still, as I said above, this result is far from trivial. Just imagine, for instance, two different ideal gases, whose molecules have different masses, that you bring toas t a t eo fj o i n tt h e r m a le q u i l i b r i u m . Equations (13.5)t h r o u g h(13.7)t e l lu st h a ti nt h i sfi n a ls t a t et h ea v e r a g et r a n s l a t i o n a lk inetic energy of the “A”m o l e c u l e sa n dt h e“B”m o l e c u l e sw i l lb et h es a m e .T h i sm e a n s ,i np a r t i c u l a r ,t h a tthe more massive molecules will end up moving more slowly, on average, so mav2 a,av = mbv2 b,av.B u t why is that? Why should it be the kinetic energies that end up matching, on average, and not, say, the momenta, or the molecular speeds themselves? The result,t h o u g hu n d o u b t e d l yt r u e ,d e fi e d ar i g o r o u sm a t h e m a t i c a lp r o o ff o rd e c a d e s ,i fn o tc e n t u r i e s;Ia mn o ts u r et h a tar i g o r o u sp r o o f exists, even now. 13.3 Heat and the first law",University Physics I Classical Mechanics.pdf "exists, even now. 13.3 Heat and the first law 13.3.1 “Direct exchange of thermal energy” and early theories of heat In the previous section I have considered the possibility of“direct exchange of thermal energy” between two objects. This is a phenomenon with which we are allf a m i l i a r :w h e nac o l d e ro b j e c ti s placed in contact with a warmer one, the warmer one cools off andt h ec o l d e ro n ew a r m su p .T h i s “warmth” that seems to flow out of one object and into the otheris conventionally called “heat.”",University Physics I Classical Mechanics.pdf "310 CHAPTER 13. THERMODYNAMICS Naturally, this observation was made long before the concepto f“ e n e r g y ”w a se v e nd e v e l o p e d ,a n d so heat was thought of, for a time, as an “invisible fluid” (called, at one point, “caloric fluid”), a sort of indestructible “substance” that literally passed from one body to another. By “indestructible” I mean that they had a notion of this caloric fluid being conserved: it was not created or destroyed, only exchanged from one body to another. This makes sense, inaw a y : i fi tw a sr e a l l ys o m e t h i n g material, how could it be created or destroyed? Conservationo fm a t t e rw a sp r e t t ym u c ha c c e p t e d scientific “dogma” already by the end of the 18th century. This idea of conservation of the caloric fluid led to the wholefield of “calorimetry,” as essentially aw a yt ot r yt oq u a n t i f y( t h a ti s ,m e a s u r e )t h ea m o u n to f“ c a l oric” that materials would take",University Physics I Classical Mechanics.pdf "aw a yt ot r yt oq u a n t i f y( t h a ti s ,m e a s u r e )t h ea m o u n to f“ c a l oric” that materials would take in or give off. The connection with temperature led directly tothe definition of heat capacities and specific heats, just as I have introduced them above (in section 2.1); only instead of “change in energy” you would use “change in caloric content.” This would be measured in units, called calories, defined by the amount of caloric that led to a given temperature change in a reference substance, such as water. To be precise, let 1 calorie be the amount of “caloric” neededto raise the temperature of one gram of water by one degree Celsius at a pressure of one atmosphere.T h i s m a k e s t h e s p e c i fi c h e a t o f water, by definition, 1 calorie/◦C· gram. Now imagine you place a hot object in a container of water, insulated from the rest of the world, and wait until thermal equilibrium is reached. Then you can",University Physics I Classical Mechanics.pdf "insulated from the rest of the world, and wait until thermal equilibrium is reached. Then you can calculate the “amount of caloric that flowed into the water,”from the change in its temperature, and if you assume that all this came from the hot object then youc a nc a l c u l a t ei t sh e a tc a p a c i t y( i n calories/◦C) from the change inits temperature. By proceeding in this fashion, scientists developed tables of specific heats that do not need any change today—onlyt h er e c o g n i t i o nt h a t“ c a l o r i c ”i s not really a fluid at all, but a form of energy, and can, therefore, be measured in energy units. Clearly, conservation of caloric was a very good idea in its own way, since much of what was established back then still works if you simply replace the word “caloric” or “heat” by “thermal energy.” It was, however, ultimately unsatisfactory precisely because it restricted itself to what we",University Physics I Classical Mechanics.pdf "energy.” It was, however, ultimately unsatisfactory precisely because it restricted itself to what we would today recognize as just one kind of energy, and so it failed to recognize thermal energy as something that could be converted into, or from, other kindsof energy. In hindsight, it is a bit surprising that the belief in the conservation of caloric could have held for so long. What today appear to us like obvious instances of thetransformation of (macroscopic) mechanical energy into thermal energy, such as the warmth generated when you rub two objects together, were explained away as instances of mechanically“squeezing” caloric fluid out of the objects. Around the turn of the 19th century, an American expatriate, Count Rumford, observed one of the most egregious instances of this in the enormous amount of “heat” that was generated in the boring of cannons (which involved, basically, a huge metal tool drilling a hole in a large metal",University Physics I Classical Mechanics.pdf "the boring of cannons (which involved, basically, a huge metal tool drilling a hole in a large metal cylinder). He noticed that the total mass of the metal, including all the shavings, did not appear to change in the process, and concluded that caloric had to bevirtually massless, since enormous quantities of it could be “squeezed” out without an appreciable mass loss. He speculated that",University Physics I Classical Mechanics.pdf "13.3. HEAT AND THE FIRST LAW 311 caloric was not a fluid at all, but rather “a form of motion,” since only something like that could be made to increase without any apparent limit. Rumford’s theory was not generally accepted at the time, butlater in the 19th century the direct conversion of mechanical energy into thermal energy was established beyond a doubt by James Prescott Joule in a series of painstaking experiments in which he used a system of weights to turn some vanes, or paddles, that stirred water in a container andeventually caused its temperature to rise. By measuring the mechanical energy deficit (gravitational plus kinetic) of his system of weights and paddles, he could tell how much energy the water must have gained, and by measuring the water’s change in temperature he could then establish thee q u i v a l e n t“ a m o u n to fc a l o r i c ”t h a t had gone into it. He thus established what was called “the mechanical equivalent of heat,” which",University Physics I Classical Mechanics.pdf "had gone into it. He thus established what was called “the mechanical equivalent of heat,” which we would express today by saying that a calorie does not measure the amount of some (nonexistent) caloric fluid, but simply an amount of energy equal to 4.18 joules (and yes, the Joule is named after him!). 13.3.2 The first law of thermodynamics The upshot of all this experimentation was the full development of the concept of energy as a conserved quantity that manifested itself in different ways and could be “converted” among different kinds. To the observation, already familiar from macroscopic mechanics, that the energy of a system could be changed by doing work on it (or letting it do work on itse n v i r o n m e n t )w a sa d d e dt h e observation, coming from thermal physics, thatthermal energy could also be directly exchanged between two objects merely by placing them in contact, without any macroscopic work being",University Physics I Classical Mechanics.pdf "between two objects merely by placing them in contact, without any macroscopic work being involved. The two things taken together led to the principleof conservation of energy in its most general (pre-relativistic) form: ∆E = W + Q (13.8) which says simply that a change in the total energy of a systemmay result from work (W)o rf r o m “heat exchange” (Q). “Heat,” in physics usage today, is simply what we call the thermal energy that is directly transferred from one object to another, typically by contact; the convention used for this term is the same as for the work term, that is,Q is positive if thermal energy flows into the system and negative if thermal energy leaves the system. Equation (13.8)i st h efirst law of thermodynamics.N o t e t h a t , i n t e r m s o fQ,t h ep r e c i s ed e fi n i t i o n of a system’s heat capacity isC = Q/∆T,a n ds ot h i sw i l lo n l yb ee q u a lt o∆E/∆t when the system",University Physics I Classical Mechanics.pdf "of a system’s heat capacity isC = Q/∆T,a n ds ot h i sw i l lo n l yb ee q u a lt o∆E/∆t when the system does no work, which is why I was careful to include that condition in the derivation of Eq. (13.2).",University Physics I Classical Mechanics.pdf "312 CHAPTER 13. THERMODYNAMICS 13.4 The second law and entropy The second law of thermodynamics is really little more than aformal statement of the observation that heat always flows spontaneously from a warmer to a colderobject, and never in reverse. More precisely, consider two systems, at different temperatures, that can exchange heat with each other but are otherwise isolated from the rest of the world. The second law states that under those conditions the heat will only flow from the warmer to the coldero n e . The closure of the system—its isolation from any sources of energy—is important in the above statement. It is certainly possible to build devices that will remove heat from a relatively cold place (like the inside of your house on a hot summer day) and exhaust it to a warmer environment. These devices are called refrigerators or heat pumps, and them a i nt h i n ga b o u tt h e mi st h a tt h e y",University Physics I Classical Mechanics.pdf "These devices are called refrigerators or heat pumps, and them a i nt h i n ga b o u tt h e mi st h a tt h e y need to be plugged in to operate: that is, they require an external energy source. If you have an energy source, then, youcan move heat from a colder to a warmer object. To avoid unnecessary complications and loopholes (what if the energys o u r c ei sab a t t e r yt h a ti sp h y s i c a l l y inside your “closed” system?) an alternative formulation oft h eb a s i cp r i n c i p l e ,d u et oC l a u s i u s , goes as follows: No process is possible whosesole result is the transfer of heat from a cooler to a hotter body The words “sole result” are meant to imply that in order to accomplish this “unnatural” transfer of heat you must draw energy from some source, and so you must be, in some way,depleting that source (the battery, for instance). On the other hand, for ther e v e r s e ,“ s p o n t a n e o u s ”p r o c e s s — t h e",University Physics I Classical Mechanics.pdf "source (the battery, for instance). On the other hand, for ther e v e r s e ,“ s p o n t a n e o u s ”p r o c e s s — t h e flow from hotter to cooler—no such energy source is necessary. Am a t h e m a t i c a lw a yt of o r m u l a t et h es e c o n dl a ww o u l db ea sf o llows. Consider two systems, in thermal equilibrium at temperaturesT1 and T2,t h a ty o up l a c ei nc o n t a c ts ot h e yc a ne x c h a n g e heat. For simplicity, assume that exchange of heat is all thath a p p e n s ;n ow o r ki sd o n ee i t h e rb y the systems or on them, and no heat is transferred to or from theo u t s i d ew o r l de i t h e r . T h e n ,i f Q1 and Q2 are the amounts of heat gained by each system, we must have, bythe conservation of energy, Q2 = −Q1,s oo n eo ft h e s ei sp o s i t i v ea n dt h eo t h e ro n ei sn e g a t i v e ,a n d,b yt h es e c o n d law, the system with the positiveQ (the one that gains thermal energy) must be the colder one.",University Physics I Classical Mechanics.pdf "law, the system with the positiveQ (the one that gains thermal energy) must be the colder one. This is ensured by the following inequality: Q1(T2 − T1) ≥ 0( 1 3 . 9 ) So, if T2 >T 1, Q1 must be positive, and ifT1 >T 2, Q1 must be negative. (The equal sign is there to allow for the case in whichT1 = T2,i nw h i c hc a s et h et w os y s t e m sa r ei n i t i a l l yi nt h e r m a l equilibrium already, and no heat transfer takes place.)",University Physics I Classical Mechanics.pdf "13.4. THE SECOND LAW AND ENTROPY 313 Equation (13.9)i sv a l i dr e g a r d l e s so ft h et e m p e r a t u r es c a l e . I fw eu s et h eKelvin scale, in which all the temperatures are positive3,w ec a nr e w r i t ei tb yd i v i d i n gb o t hs i d e sb yt h ep r o d u c tT1T2,a n d using Q2 = −Q1,a s Q1 T1 + Q2 T2 ≥ 0( 1 3 . 1 0 ) This more symmetric statement of the second law is a good starting point from which to introduce the concept ofentropy,w h i c hIw i l lp r o c e e dt od on e x t . 13.4.1 Entropy In Equations (13.9)a n d(13.10), we have takenT1 and T2 to be the initial temperatures of the two systems, but in general, of course, these temperatures willchange during the heat transfer process. It is useful to consider an “infinitesimal” heat transfer,dQ,s os m a l lt h a ti tl e a d st oan e g l i g i b l e temperature change, and then define thechange in the system’s entropyby dS = dQ T (13.11)",University Physics I Classical Mechanics.pdf "temperature change, and then define thechange in the system’s entropyby dS = dQ T (13.11) Here, S denotes a new system variable, the entropy, which is implicitly defined by Eq. (13.11). That is to say, suppose you take a system from one initial statet oa n o t h e rb ya d d i n go rr e m o v i n g as e r i e so fi n fi n i t e s i m a la m o u n t so fh e a t .W et a k et h ec h a n g eine n t r o p yo v e rt h ew h o l ep r o c e s st o be ∆S = Sf − Si = ∫ f i dQ T (13.12) Starting from an arbitrary state, we could use this to find theentropy for any other state, at least up to a (probably) unimportant constant (a little like what happens with the energy: the absolute value of the energy does not typically matter, it is only the energy differences that are meaningful). This may be easier said than done, though; there is noap r i o r iguarantee that any two arbitrary states of a system could be connected by a process for which (13.12)c o u l db ec a l c u l a t e d ,a n d",University Physics I Classical Mechanics.pdf "states of a system could be connected by a process for which (13.12)c o u l db ec a l c u l a t e d ,a n d conversely, it might also happen that two states could be connected by several possible processes, and the integral in (13.12) would have different values for all those. In other words, there is no guarantee that the entropy thus defined will be a truestate function—something that is uniquely determined by the other variables that characterize a system’s state in thermal equilibrium. Nevertheless, it turns out that it is possible to show that thei n t e g r a l(13.12)i si n d e e di n d e p e n d e n t of the “path” connecting the initial and final states, at leasta sl o n ga st h ep h y s i c a lp r o c e s s e s considered are “reversible” (a constraint that basically amounts to the requirement that heat be exchanged, and work done, only in small increments at a time,so that the system never departs",University Physics I Classical Mechanics.pdf "exchanged, and work done, only in small increments at a time,so that the system never departs 3For a while in the 1970’s some people were very excited by the concept of negative absolute temperatures, but that is mostly an artificial contrivance used to describe systems that are not really in thermal equilibrium anyway.",University Physics I Classical Mechanics.pdf "314 CHAPTER 13. THERMODYNAMICS too far from a state of thermal equilibrium). I will not attempt the proof here, but merely note that this provides the following, alternative formulationof the second law of thermodynamics: For every system in thermal equilibrium, there is a state function, the entropy, with the property that it can never decrease for a closed system. You can see how this covers the case considered in the previouss e c t i o n ,o ft w oo b j e c t s ,1a n d2 ,i n thermal contact with each other but isolated from the rest ofthe world. If object 1 absorbs some heat dQ1 while at temperatureT1 its change in entropy will bedS1 = dQ1/T1,a n ds i m i l a r l yf o r object 2. The total change in the entropy of the closed systemformed by the two objects will then be dStotal = dS1 + dS2 = dQ1 T1 + dQ2 T2 (13.13) and the requirement that this cannot be negative (that is,Stotal must not decrease) is just the same as Eq. (13.10), in differential form.",University Physics I Classical Mechanics.pdf "T2 (13.13) and the requirement that this cannot be negative (that is,Stotal must not decrease) is just the same as Eq. (13.10), in differential form. Once again, this simply means that the hotter object gives offthe heat and the colder one absorbs it, but when you look at it in terms of entropy it is a bit more interesting than that. You can see that the entropy of the hotter object decreases (negativedQ), and that of the colder one increases (positive dQ), butby a different amount:i n f a c t , i t i n c r e a s e s s o m u c h t h a t i t m a k e s t h e t o t a l c h a n g e in entropy for the system positive. This shows that entropy is rather different from energy (which is simply conserved in the process). You can always make it increase just by letting a process “take its normal course”—in this case, just letting the heat flow from the warmer to the colder object until they reach thermal equilibrium with each other (at which point, of course, the entropy will",University Physics I Classical Mechanics.pdf "until they reach thermal equilibrium with each other (at which point, of course, the entropy will stop increasing, since it is a function of the state and the state will no longer change). Although not immediately obvious from the above, the absolute (or Kelvin) temperature scale plays an essential role in the definition of the entropy, in the senset h a to n l yi ns u c has c a l e( o ra n o t h e r scale linearly proportional to it) is the entropy, as defined by Eq. (13.12), a state variable; that is, only when using such a temperature scale is the integral (13.12)p a t h - i n d e p e n d e n t . T h ep r o o fo f this (which is much too complicated to even sketch here) relies essentially on the Carnot principle, to be discussed next. 13.4.2 The efficiency of heat engines By the beginning of the 19th century, an industrial revolution was underway in England, due primarily to the improvements in the efficiency of steam engines that had taken place a few decades",University Physics I Classical Mechanics.pdf "primarily to the improvements in the efficiency of steam engines that had taken place a few decades earlier. It was natural to ask how much this efficiency could ultimately be increased, and in 1824, a French engineer, Nicolas Sadi Carnot, wrote a monograph thatp r o v i d e da na n s w e rt ot h i sq u e s t i o n .",University Physics I Classical Mechanics.pdf "13.4. THE SECOND LAW AND ENTROPY 315 Carnot modeled a “heat engine” as an abstract machine that worked in a cycle. In the course of each cycle, the engine would take in an amount of heatQh from a “hot reservoir,” give off (or “exhaust”) an amount of heat|Qc| to a “cold reservoir,” and produce an amount of work|W|.( I am using absolute value bars here because, from the point of view of the engine,Qc and W must be negative quantities.) At the end of the cycle, the engine should be back to its initial state, so ∆Eengine =0 . T h eh o ta n dc o l dr e s e r v o i r sw e r es u p p o s e dt ob es y s t e m sw ith very large heat capacities, so that the change in their temperatures as theytook in or gave off the heat from or to the engine would be negligible. If ∆Eengine =0 ,w em u s th a v e ∆Eengine = Qh + Qc + W = Qh −| Qc|−| W| =0 ( 1 3 . 1 4 ) that is, the work produced by the engine must be |W| = Qh −| Qc| (13.15)",University Physics I Classical Mechanics.pdf "∆Eengine = Qh + Qc + W = Qh −| Qc|−| W| =0 ( 1 3 . 1 4 ) that is, the work produced by the engine must be |W| = Qh −| Qc| (13.15) The energy input to the engine isQh,s oi ti sn a t u r a lt od e fi n et h ee ffi c i e n c ya sϵ = |W|/Qh;t h a t is to say, the Joules of work done per Joule of heat taken in. A value of ϵ =1w o u l dm e a na n efficiency of 100%, that is, the complete conversion of thermale n e r g yi n t om a c r o s c o p i cw o r k . B y Eq. (13.15), we have ϵ = |W| Qh = Qh −| Qc| Qh =1 − |Qc| Qh (13.16) which shows thatϵ will always be less than 1 as long as the heat exhausted to the cold reservoir, Qc,i sn o n z e r o . T h i si sa l w a y sn e c e s s a r i l yt h ec a s ef o rs t e a me ngines: the steam needs to be cooled off at the end of the cycle, so a new cycle can start again. Carnot considered a hypothetical “reversible” engine (sometimes called aCarnot machine), which",University Physics I Classical Mechanics.pdf "Carnot considered a hypothetical “reversible” engine (sometimes called aCarnot machine), which could be runbackwards,w h i l ei n t e r a c t i n gw i t ht h es a m et w or e s e r v o i r s . I nb a c k w a rds mode, the machine would work as a refrigerator or heat pump. It would take in an amount of workW per cycle (from some external source) and use that to absorb the amountof heat|Qc| from the cold reservoir and dump the amountQh to the hot reservoir. Carnot argued thatno heat engine could have a greater efficiency than a reversible one working between the same heat reservoirs,a n d ,c o n s e q u e n t l y , that all reversible engines, regardless of their composition, would have the same efficiency when working in between the same temperatures.H i s a r g u m e n t w a s b a s e d o n t h e o b s e r v a t i o n t h a t a hypothetical engine with a greater efficiency than the reversible one could be used to drive a",University Physics I Classical Mechanics.pdf "hypothetical engine with a greater efficiency than the reversible one could be used to drive a reversible one in refrigerator mode, to produce as the sole result the transfer of some net amount of heat from the cold to the hot reservoir4,s o m e t h i n gt h a tw ea r g u e di nS e c t i o n1s h o u l db e impossible. 4The greater efficiency engine could produce the same amount ofwork as the reversible one while absorbing less heat from the hot reservoir and dumping less heat to the cold one. If all the work output of this engine were used to drive the reversible one in refrigerator mode, the resultwould be, therefore, a net flow of heat out of the cold one and a net flow of heat into the hot one.",University Physics I Classical Mechanics.pdf "316 CHAPTER 13. THERMODYNAMICS What makes this result more than a theoretical curiosity is the fact that an ideal gas would, in fact, provide a suitable working substance for a Carnot machine, ifp u tt h r o u g ht h ef o l l o w i n gc y c l e( t h e so-called “Carnot cycle”): an isothermal expansion, followed by an adiabatic expansion, then an isothermal compression, and finally an adiabatic compression. What makes this ideally reversible is the fact that the heat is exchanged with each reservoir onlyw h e nt h eg a si sa t( n e a r l y )t h es a m e temperature as the reservoir itself, so by just “nudging” thet e m p e r a t u r eu po rd o w nal i t t l eb i ty o u can get the exchange to go either way. When the ideal gas laws are used to calculate the efficiency of such a machine, the result (theCarnot efficiency)i s ϵC =1 − Tc Th (13.17) where the temperatures must be measured in degrees Kelvin, the natural temperature scale for an ideal gas.",University Physics I Classical Mechanics.pdf "ϵC =1 − Tc Th (13.17) where the temperatures must be measured in degrees Kelvin, the natural temperature scale for an ideal gas. It is actually easy to see the connection between this resultand the entropic formulation of the second law presented above. Suppose for a moment that Carnot’s principle does not hold, that is to say, that we can build an engine withϵ>ϵ C =1 − Tc/Th.S i n c e(13.16)m u s th o l di na n yc a s e (because of conservation of energy), we find that this would imply 1 − |Qc| Qh > 1 − Tc Th (13.18) and then some very simple algebra shows that − Qh Th + |Qc| Tc < 0( 1 3 . 1 9 ) But now consider the total entropy of the system formed by theengine and the two reservoirs. The engine’s entropy does not change (because it works in a cycle); the entropy of the hot reservoir goes down by an amount−Qh/Th;a n dt h ee n t r o p yo ft h ec o l dr e s e r v o i rg o e sup by an amount|Qc|/Tc.",University Physics I Classical Mechanics.pdf "down by an amount−Qh/Th;a n dt h ee n t r o p yo ft h ec o l dr e s e r v o i rg o e sup by an amount|Qc|/Tc. So the left-hand side of Eq. (13.19)a c t u a l l ye q u a l st h et o t a lc h a n g ei ne n t r o p y ,a n dE q .(13.19)i s telling us that this change isnegative (the total entropy goesdown)d u r i n gt h eo p e r a t i o no ft h i s hypothetical heat engine whose efficiency is greater than theCarnot limit (13.17). Since this is impossible (the total entropy of a closed system can never decrease), we conclude that the Carnot limit must always hold. As you can see, the seemingly trivial observation with whichIs t a r t e dt h i ss e c t i o n( n a m e l y ,t h a t heat always flows spontaneously from a hotter object to a colder object, and never in reverse) turns out to have profound consequences. In particular, it means that the complete conversion of thermal energy into macroscopic work is essentially impossible5,w h i c hi sw h yw et r e a tm e c h a n i c a le n e r g y",University Physics I Classical Mechanics.pdf "energy into macroscopic work is essentially impossible5,w h i c hi sw h yw et r e a tm e c h a n i c a le n e r g y as “lost” once it is converted to thermal energy. By Carnot’stheorem, to convert some of that 5At least it is impossible to do using a device that runs in a cycle. For a one-use-only, you might do something like pump heat into a gas and allow it to expand, doing work as itd o e ss o ,b u te v e n t u a l l yy o uw i l lr u no u to fr o o m to do your expanding into...",University Physics I Classical Mechanics.pdf "13.4. THE SECOND LAW AND ENTROPY 317 thermal energy back to work we would need to introduce a colderr e s e r v o i r( a n dt a k ea d v a n t a g e ,s o to speak, of the natural flow of heat from hotter to colder), andt h e nw ew o u l do n l yg e tar e l a t i v e l y small conversion efficiency, unless the cold reservoir is really at a very low Kelvin temperature (and to create such a cold reservoir would typically require refrigeration, which again consumes energy). It is easy to see that Carnot efficiencies for reservoirs closeto room temperature are rather pitiful. For instance, ifTh =3 0 0Ka n dTc =2 7 3K ,t h eb e s tc o n v e r s i o ne ffi c i e n c yy o uc o u l dg e tw o u l db e 0.09, or 9%. 13.4.3 But what IS entropy, anyway? The existence of this quantity, the entropy, which can be measured or computed (up to an arbitrary reference constant) for any system in thermal equilibrium,is one of the great discoveries of 19th",University Physics I Classical Mechanics.pdf "reference constant) for any system in thermal equilibrium,is one of the great discoveries of 19th century physics. There are tables of entropies that can be putt om a n yu s e s( f o ri n s t a n c e ,i n chemistry, to figure out which reactions will happen spontaneously and which ones will not), and one could certainly take the point of view that those tables,plus the basic insight that the total entropy can never decrease for a closed system, are all one needs to know about it. From this perspective, entropy is just a convenient number that we canassign to any equilibrium state of any system, which gives us some idea of which way it is likely to goif the equilibrium is perturbed. Nonetheless, it is natural for a physicist to ask to what, exactly, does this number correspond? What property of the equilibrium state is actually capturedby this quantity? Especially, in the context of a microscopic description, since that is, by and large, how physicists have always been",University Physics I Classical Mechanics.pdf "context of a microscopic description, since that is, by and large, how physicists have always been trying to explain things, by breaking them up into little pieces, and figuring out what the pieces were doing. What are the molecules or atoms of a system doing inas t a t eo fh i g he n t r o p yt h a ti s different from a state of low entropy? The answer to this question is provided by the branch of physics known as Statistical Mechanics, which today is mostly quantum-based (since you need quantummechanics to describe most of what atoms or molecules do, anyway), but which started in the context of pure classical mechanics in the mid-to-late 1800’s and, despite this handicap, was actually able to make surprising headway for a while. From this microscopic, but still classical, perspective (which applies, for instance, moderately well to an ideal gas), the entropy can be seen as a measure of thespread in the velocities and positions",University Physics I Classical Mechanics.pdf "to an ideal gas), the entropy can be seen as a measure of thespread in the velocities and positions of the molecules that make up the system. If you think of a probability distribution, it has a mean value and a standard deviation. In statistical mechanics, the molecules making up the system are described statistically, by giving the probability thatt h e ym i g h th a v eac e r t a i nv e l o c i t yo rb e at some point or another. These probability distributions may be very narrow (small standard deviation), if you are pretty certain of the positions or thevelocities, or very broad, if you are not very certain at all, or rather expect the actual velocities and positions to be spread over a",University Physics I Classical Mechanics.pdf "318 CHAPTER 13. THERMODYNAMICS considerable range of values. A state of large entropy corresponds to a broad distribution, and a state of small entropy to a narrow one. For an ideal gas, the temperature determines both the averagem o l e c u l a rs p e e da n dt h es p r e a do f the velocity distribution. This is because the average velocity is zero (since it is just as likely to be positive or negative), so the only way to make the average speed (or root-mean-square speed) large is to have a broad velocity distribution, which makes large speeds comparatively more likely. Then, as the temperature increases, so does the range of velocities available to the molecules, and correspondingly the entropy. Similarly (but more simply), for a given temperature, a gas that occupies a smaller volume will have a smaller entropy, sincethe range of positions available to the molecules will be smaller. These considerations may help us understand an important property of entropy, which is that",University Physics I Classical Mechanics.pdf "molecules will be smaller. These considerations may help us understand an important property of entropy, which is that it increases in all irreversible processes. To begin with, note that this makes sense, since, by definition, these are processes that do not “reverse” spontaneously. If a process involves an increase in the total entropy of a closed system, then the reverse process will not happen, because it would require a spontaneous decrease in entropy, which the secondlaw forbids. But, moreover, we can see the increase in entropy directly in many of the irreversible processes we have considered this semester, such as the ones involving friction. As I just pointed out above, in general, we may expect that increasing the temperature of an object will increase its entropy (other things being equal), regardless of how the increase in temperature comes about. Now, when mechanical energy is lost",University Physics I Classical Mechanics.pdf "regardless of how the increase in temperature comes about. Now, when mechanical energy is lost due to friction, the temperature ofboth of the objects (surfaces) involved increases, so the total entropy will increase as well. That marks the process as irreversible. Another example of an irreversible process might be the mixing of two gases (or of two liquids, like cream and coffee). Start with all the “brown” molecules tothe left of a partition, and all the “white” molecules to the right. After you remove the partition, the system will reach an equilibrium state in which the range of positions available to both the brown and white molecules has increased substantially—and this is, according to our microscopic picture, a state of higher entropy (other things, such as the average molecular speeds, being equal6). For quantum mechanical systems, where the position and velocity are not simultaneously well",University Physics I Classical Mechanics.pdf "For quantum mechanical systems, where the position and velocity are not simultaneously well defined variables, one uses the more abstract concept of “state” to describe what each molecule is doing. The entropy of a system in thermal equilibrium is thendefined as a measure of the total number of states available to its microscopic components, compatible with the constraints that determine the macroscopic state (such as, again, total energy, number of particles, and volume). 6In the case of cream and coffee, the average molecular speeds will not be equal—the cream will be cold and the coffee hot—but the resulting exchange of heat is just the kindof process I described at the beginning of the chapter, and we have seen that it, too, results in an increase in the total entropy.",University Physics I Classical Mechanics.pdf "13.5. IN SUMMARY 319 13.5 In summary 1. Temperature is a statistical quantity that provides a (typically indirect) measure of thecon- centration of thermal energy in a system. For a system that is (approximately) well described by classical mechanics, the temperature, as measured by a conventional thermometer, is di- rectly proportional to the average translational kinetic energy per molecule. 2. In a process in which a system does no work, a change in the system’s temperature is related to a change in its total internal energy (which typically includes more than just translational kinetic energy contributions) by ∆E = C∆T,w h e r eC is the system’sheat capacity for the process. 3. The transfer of thermal energy between two systems withoute i t h e ro n ed o i n gm a c r o s c o p i c work on each other is generally possible. Thermal energy transferred in this way is called heat,a n dd e n o t e db yt h es y m b o lQ.",University Physics I Classical Mechanics.pdf "work on each other is generally possible. Thermal energy transferred in this way is called heat,a n dd e n o t e db yt h es y m b o lQ. 4. The actual definition of a system’s heat capacity isC = Q/∆T.F o r a h o m o g e n e o u s s y s t e m (made of just one substance),C = mc,w h e r em is the system’s mass andc the substance’s specific heat. Specific heats typically depend on temperaturei nn o n t r i v i a lw a y s . 5. Two systems isolated from the rest of the world but allowedto exchange thermal energy with each other will eventually reach a state ofthermal equilibrium in which their temperatures will be the same (zero-th law of thermodynamics). 6. The work done on (or by) a system by (or on) its environment,plus the heat given to (or taken from) the system by its environment, always equals thenet change in the system’s total energy (conservation of energy, or first law of thermodynamics; Eq. (13.8)).",University Physics I Classical Mechanics.pdf "energy (conservation of energy, or first law of thermodynamics; Eq. (13.8)). 7. For any system in thermal equilibrium, there exists a statev a r i a b l e ,c a l l e dentropy,w i t ht h e property that it can never decrease for a closed system. Whenas y s t e ma tt e m p e r a t u r eT takes in a small amount of heatdQ,i t sc h a n g ei ne n t r o p yi sg i v e nb ydS = dQ/T. 8. This principle of never-decreasing entropy is equivalentt ot h es t a t e m e n tt h a t“ N op r o c e s si s possible whose sole result is the transfer of heat from a cooler to a hotter body.” 9. The principle 7. is also equivalent to Carnot’s theorem, which states that “it is impossible for an engine that operates in a cycle, taking in heat from a hot reservoir at temperatureTh and exhausting heat to a cold reservoir at temperatureTc,t od ow o r kw i t ha ne ffi c i e n c yg r e a t e r than 1− Tc/Th.” 10. Either one of 7., 8., or 9., above, may be regarded as an equivalent statement of thesecond",University Physics I Classical Mechanics.pdf "than 1− Tc/Th.” 10. Either one of 7., 8., or 9., above, may be regarded as an equivalent statement of thesecond law of thermodynamics. 11. Carnot’s theorem shows the limitations inherent in the conversion of thermal energy into macroscopic work, which is the reason why one usually regardsm e c h a n i c a le n e r g yt h a ti s converted into thermal energy as “lost.”",University Physics I Classical Mechanics.pdf "320 CHAPTER 13. THERMODYNAMICS 12. Microscopically, the entropy of a system is a measure of the range of distinct states available to its microscopic components (atoms or molecules) that arecompatible with the set of macroscopic constraints that determine its thermal equilibrium state. More entropy means a greater range of possible “microstates.” 13. Entropy always increases in irreversible processes.",University Physics I Classical Mechanics.pdf "13.6. EXAMPLES 321 13.6 Examples 13.6.1 Calorimetry The specific heat of aluminum is 900 J/kg· K, and that of water is 4186 J· K. Suppose you drop a block of aluminum of mass 1 kg at a temperature of 80◦Ci nal i t e ro fw a t e r( w h i c ha l s oh a sa mass of 1 kg) at a temperature of 20◦C. What is the final temperature of the system, assuming no exchange of heat with the environment takes place? How much energy does the aluminum lose/the water gain? Solution Let us callTAl the initial temperature of the aluminum,Twater the initial temperature of the water, and Tf their final common temperature. The thermal energy given off byt h ea l u m i n u me q u a l s ∆EAl = CAl(Tf − TAl)( t h i sf o l l o w sf r o mt h ed e fi n i t i o n(13.1)o fh e a tc a p a c i t y ;w ec o u l de q u a l l y well call this quantity “the heat given off by the aluminum”).In the same way, the thermal energy change of the water (heat absorbed by the water) equals ∆Ewater = Cwater(Tf −Twater). If the total",University Physics I Classical Mechanics.pdf "change of the water (heat absorbed by the water) equals ∆Ewater = Cwater(Tf −Twater). If the total system is closed, the sum of these two quantities, each with its appropriate sign, must be zero: 0=∆ EAl +∆ Ewater = CAl(Tf − TAl)+ Cwater(Tf − Twater)( 1 3 . 2 0 ) This equation forTf has the solution Tf = CAlTAl + CwaterTwater CAl + Cwater (13.21) As you can see, the result is a weighted average of the two starting temperatures, with the corre- sponding heat capacities as the weighting factors. The heat capacities C are equal to the given specific heats multiplied by the respective masses. In this case, the mass of aluminum and the mass of the water arethe same, so they will cancel in the final result. Also, we can use the temperatures in degrees Celsius, instead of Kelvin. This is not immediately obvious from the final expression (13.21), but if you look at (13.20)y o u ’ l ls e e it involves only temperature differences, and those have the same value in the Kelvin and Celsius scales.",University Physics I Classical Mechanics.pdf "it involves only temperature differences, and those have the same value in the Kelvin and Celsius scales. Substituting the given values in (13.21), then, we get Tf = 900 × 80 + 4186× 20 900 + 4186 =3 0.6◦C( 1 3 . 2 2 ) This is much closer to the initial temperature of the water, ase x p e c t e d ,s i n c ei th a st h eg r e a t e r heat capacity. The amount of heat exchanged is Cwater(Tf − Twater)=4 1 8 6× (30.6 − 20) = 44, 440 J = 44.4k J ( 1 3 . 2 3 )",University Physics I Classical Mechanics.pdf "322 CHAPTER 13. THERMODYNAMICS So, 1 kg of aluminum gives off 44.4k J o f t h e r m a l e n e r g y a n d i t s t e m pe r a t u r e d r o p s a l m o s t 5 0◦C, from 80◦Ct o3 0.6◦C, whereas 1 kg of water takes in the same amount of thermal energy and its temperature only rises about 10.6◦C. 13.6.2 Equipartition of energy Estimate the speed of an oxygen molecule in air at room temperature (about 300 K). Solution Recall that in Section 13.2.2 I mentioned that the average translational kinetic energy of a molecule in a system at a temperatureT is 3 2 kBT (Eq. (13.7), where kB,B o l t z m a n n ’ sc o n s t a n t ,i se q u a lt o 1.38 × 10−23 J/K. So, atT =3 0 0 K ,am o l e c u l eo fo x y g e n( o ro fa n y t h i n ge l s e ,f o rt h a tm a tter) should have, on average, a kinetic energy of ⟨Ktrans⟩ = 3 2kBT = 3 2 × 1.38 × 10−23 × 300 J = 6.21 × 10−21 J( 1 3 . 2 4 ) Since K = 1 2 mv2,w ec a nfi g u r eo u tt h ea v e r a g ev a l u eo fv2 if we know the mass of an oxygen",University Physics I Classical Mechanics.pdf "Since K = 1 2 mv2,w ec a nfi g u r eo u tt h ea v e r a g ev a l u eo fv2 if we know the mass of an oxygen molecule. This is something you can look up, or derive like this: One mole of oxygen atoms has am a s so f1 6g r a m s( 1 6i st h ea t o m i cm a s sn u m b e ro fo x y g e n )a n dcontains Avogadro’s number of atoms, 6.02 × 1023.S o a s i n g l e a t o m h a s a m a s s o f 0.016 kg/6.02 × 1023 =2 .66 × 10−26 kg. A molecule of oxygen contains two atoms, so it has twice the mass, m =5 .32 × 10−26 kg. Then, ⟨v2⟩ = 2⟨Ktrans⟩ m = 2 × 6.21 × 10−21 J 5.32 × 10−26 kg =2 .33 × 105 m2 s2 (13.25) The square root of this will give us what is called the “root mean square” velocity, orvrms: vrms = √ 2.33 × 105 m2 s2 =4 8 3m s (13.26) This is of the same order of magnitude as (but larger than) thespeed of sound in air at room temperature (about 340 m/s, as you may recall from Chapter 12).",University Physics I Classical Mechanics.pdf "13.7. PROBLEMS 323 13.7 Problems Problem 1 Consider a system of two objects in contact, one initially hotter than the other, so they may directly exchange thermal energy, in isolation from the resto ft h ew o r l d .A c c o r d i n gt ot h el a w so f thermodynamics, what must happen to the system’s total energy and entropy? (Do they change, increase, decrease, stay constant... ?) Problem 2 Consider the same two objects in Problem 1 and suppose the heatc a p a c i t yo ft h ec o l d e ro b j e c t is much greater than the heat capacity of the hotter one. When the system reaches thermal equilibrium, will its final temperature will be closer to theinitial temperature of the hot object, the colder object, or exactly halfway between the two initialt e m p e r a t u r e s ?W h y ? Problem 3 Which of the following isnot av a l i df o r m u l a t i o no ft h es e c o n dl a wo ft h e r m o d y n a m i c s ?",University Physics I Classical Mechanics.pdf "Problem 3 Which of the following isnot av a l i df o r m u l a t i o no ft h es e c o n dl a wo ft h e r m o d y n a m i c s ? (a) For any system in thermal equilibrium, there exists a state variable, called entropy, with the property that it can never decrease for a closed system. (b) No process is possible whose sole result is the transfer ofh e a tf r o mac o o l e rt oah o t t e rb o d y . (c) It is impossible for an engine that operates in a cycle, taking in heat from a hot reservoir at temperature Th and exhausting heat to a cold reservoir at temperatureTc,t od ow o r kw i t ha n efficiency greater than 1− Tc/Th. (d) The entropy of any system goes to zero asT (the absolute, or Kelvin) temperature goes to zero. Problem 4 Which of the following statements is true? (a) Once the entropy of a system increases, it is impossible tob r i n gi tb a c kd o w n . (b) Once some amount of mechanical energy is converted to thermal energy, it is impossible to turn",University Physics I Classical Mechanics.pdf "(b) Once some amount of mechanical energy is converted to thermal energy, it is impossible to turn any of it back into mechanical energy. (c) It is always possible to reduce the entropy of a system, fori n s t a n c e ,b yc o o l i n gi t . (d) All of the above statements are true. (e) None of the above statements are true. Other questions • Can you tell the temperature of a gas by measuring the translational kinetic energy of a single molecule? • Does a shuffled deck of cards have more or less entropy (in the thermodynamic sense) than an identical, ordered set of cards? Assume they are at the samet e m p e r a t u r e .",University Physics I Classical Mechanics.pdf "324 CHAPTER 13. THERMODYNAMICS • Ad i a t o m i cg a sm o l e c u l e ,s u c ha sO2,c a ns t o r ek i n e t i ce n e r g yi nt h ef o r mo fv i b r a t i o n sa n d rotations, in addition to just translation of the center of mass. By contrast, a monoatomic gas molecule such asC has virtually no kinetic energy (at normal temperatures) other than translational kinetic energy. Which kind of gas do you expectt oh a v eal a r g e rm o l a rh e a t capacity (heat capacity per molecule)?",University Physics I Classical Mechanics.pdf "Michael Biehl The Shallow and the Deep A biased introduction to neural networks and old school machine learning The Shallow and the Deep is a collection of lecture notes that offers an accessible introduction to neural networks and machine learning in general. However, it was clear from the beginning that these notes would not be able to cover this rapidly changing and growing field in its entirety. The focus lies on classical machine learning techniques, with a bias towards classification and regression. Other learning paradigms and many recent developments in, for instance, Deep Learning are not addressed or only briefly touched upon. Biehl argues that having a solid knowledge of the foundations of the field is essential, especially for anyone who wants to explore the world of machine learning with an ambition that goes beyond the application of some software package to some data set. Therefore, The Shallow and the Deep places",The+Shallow+and+the+Deep.pdf "learning with an ambition that goes beyond the application of some software package to some data set. Therefore, The Shallow and the Deep places emphasis on fundamental concepts and theoretical background. This also involves delving into the history and pre-history of neural networks, where the foundations for most of the recent developments were laid. These notes aim to demystify machine learning and neural networks without losing the appreciation for their impressive power and versatility./uni00A0 Michael Biehl is Associate Professor of Computer Science at the Bernoulli Institute for Mathematics, Computer Science and Artificial Intelligence of the University of Groningen, where he joined the Intelligent Systems group in 2003. He also holds an honorary Professorship of Machine Learning at the Center for Systems Modelling and Quantitative Biomedicine of the University of Birmingham, UK. His research focuses on the modelling and theoretical",The+Shallow+and+the+Deep.pdf "Systems Modelling and Quantitative Biomedicine of the University of Birmingham, UK. His research focuses on the modelling and theoretical understanding of neural networks and machine learning in general. The development of efficient training algorithms for interpretable, transparent systems is a topic of particular interest. A variety of interdisciplinary collaborations concern practical applications of machine learning in the biomedical domain, in astronomy and other areas. T/h.smcp/e.smcp S/h.smcp/a.smcp/l.smcp/l.smcp/o.smcp/w.smcp /a.smcp/n.smcp/d.smcp /t.smcp/h.smcp/e.smcp D/e.smcp/e.smcp/p.smcp Michael Biehl",The+Shallow+and+the+Deep.pdf The Shallow and the Deep,The+Shallow+and+the+Deep.pdf "The Shallow and the Deep A biased introduction to neural networks and old school machine learning Michael Biehl",The+Shallow+and+the+Deep.pdf "Published by University of Groningen Press Broerstraat 4 9712 CP Groningen The Netherlands First published in the Netherlands © 2023 Michael Biehl, Bernoulli Institute for Mathematics, Computer Science and Artificial Intelligence, Groningen Comments, corrections and suggestions are welcome, contact: m.biehl@rug.nl Please cite as: Biehl, M. (2023). The Shallow and the Deep: A biased introduction to neural networks and old school machine learning. University of Groningen Press. This book has been published open access thanks to the financial support of the Open Access Textbook Fund of the University of Groningen. Cover design: Bas Ekkers Coverphoto: Michael Biehl Production: LINE UP boek en media bv ISBN (print) 9789403430287 ISBN (ePDF) 9789403430270 DOI https://doi.org/ 10.21827/648c59c1a467e This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0",The+Shallow+and+the+Deep.pdf "DOI https://doi.org/ 10.21827/648c59c1a467e This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. The full licence terms are available at creativecommons.org/ licenses/ by-nc-sa/4.0/legalcode",The+Shallow+and+the+Deep.pdf "Preface Stop calling everything AI. — Michael I. Jordan, in [Pre21] The subtitle of these lecture notes is “Abiased introduction to neural networks and old school machine learning” for good reasons. Although the aim was to give an accessible introduction to the field, it has been clear from the beginning that it would not end up as a comprehensive, complete overview. The focus is on classical machine learning, many recent developments cannot be covered. Personally, I first got in touch with neural networks in my early life as a physicist. At the time, it was sufficient to read a handful of papers and perhaps a little later the good book [HKP91] to be up-to-date and able to contribute a piece to the big puzzle. Am I exaggerating and somewhat nostalgic? Probably. But the situation has definitely changed a lot. Nowadays, an overwhelming flood of publications makes it difficult to filter out the relevant information and keep up with the developments.",The+Shallow+and+the+Deep.pdf "flood of publications makes it difficult to filter out the relevant information and keep up with the developments. The selection of topics in these notes has been determined to a large extent by my own research interests and early experiences. This is definitely true for the initial focus on the simple perceptron, the hydrogen atom of neural network research as Manfred Opper put it [Opp90]. Moreover, the bulk of this text deals with shallow systems for supervised learning, in particular classification, which reflects my main interest in the field. The notes may be perceived as old school, certainly by some dedicated fol- lowers of fashion [Dav66]. Admittedly, the text does not address the most recent developments in e.g. Deep Learning and its applications. However, in my humble opinion it is invaluable to have a solid background knowledge of the basics before exploring the world of machine learning with an ambition that goes beyond the application of some software package to some data set.",The+Shallow+and+the+Deep.pdf "basics before exploring the world of machine learning with an ambition that goes beyond the application of some software package to some data set. Therefore, the emphasis is on basic concepts and theoretical background, with specific aspects selected from a personal and clearly biased viewpoint. In a sense, the goal is to de-mystify machine learning and neural networks without iii",The+Shallow+and+the+Deep.pdf "iv losing the appreciation for their fascinating power and versatility. Very often, this involves a look into the history and pre-history of neural networks, where the foundations for most of the recent developments were laid. I have aimed at pointing the interested reader to many resources for further exploration of the area. Therefore, the list of references in the bibliography, although by no means complete, is slightly more extensive than initially envi- sioned. The starting point for these notes was the desire to provide more comprehen- sive material than the presentation slides in the MSc level course Neural Net- works (renamed Neural Networks and Computational Intelligence later) which I have been giving at the University of Groningen. A thorough archeological investigation of the text and figures would also reveal traces of the courses The- orie Neuronaler Netzwerke and Unüberwachtes Lernen, that I taught way back when in the Physics program at the University of Würzburg.",The+Shallow+and+the+Deep.pdf "orie Neuronaler Netzwerke and Unüberwachtes Lernen, that I taught way back when in the Physics program at the University of Würzburg. My writing activity was greatly boosted on the occasion of the wonderful 30th Canary Islands Winter School in 2018, devoted to Big Data analysis in Astronomy, where I had the honor to give a series of lectures on supervised learning, see [MSK19,Bie19] for course materials and video-recorded lectures. Last not least I would like to acknowledge constructive feedback from several “generations” of students who followed the course and from many colleagues and collaborators. In particular, I thank Elisa Oostwal and Janis Norden for a critical reading of the manuscript and many suggestions for improvements. Groningen, June 2023 The mysterious machine learning machine © Catharina M. Gerigk and Elina L. van den Brandhof Reproduced with kind permission of the artists.",The+Shallow+and+the+Deep.pdf "Contents Preface iii 1 From neurons to networks 1 1.1 Spiking neurons and synaptic interactions . . . . . . . . . . . . . 3 1.2 Firing rate models . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.1 Neural activity and synaptic interaction . . . . . . . . . . 5 1.2.2 Sigmoidal activation functions . . . . . . . . . . . . . . . 6 1.2.3 Hebbian learning . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 Network architectures . . . . . . . . . . . . . . . . . . . . . . . . 9 1.3.1 Attractor networks and the Hopfield model . . . . . . . . 10 1.3.2 Feed-forward layered neural networks . . . . . . . . . . . 12 1.3.3 Other architectures . . . . . . . . . . . . . . . . . . . . . . 15 2 Learning from example data 17 2.1 Learning scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.1.1 Unsupervised learning . . . . . . . . . . . . . . . . . . . . 17 2.1.2 Supervised learning . . . . . . . . . . . . . . . . . . . . . 19",The+Shallow+and+the+Deep.pdf "2.1.1 Unsupervised learning . . . . . . . . . . . . . . . . . . . . 17 2.1.2 Supervised learning . . . . . . . . . . . . . . . . . . . . . 19 2.1.3 Other learning scenarios . . . . . . . . . . . . . . . . . . . 22 2.2 Machine Learning vs. Statistical Modelling . . . . . . . . . . . . 23 2.2.1 Differences and commonalities . . . . . . . . . . . . . . . 23 2.2.2 An example case: linear regression . . . . . . . . . . . . . 24 2.2.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3 The Perceptron 31 3.1 History and literature . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2 Linearly separable functions . . . . . . . . . . . . . . . . . . . . . 33 3.3 The Rosenblatt perceptron . . . . . . . . . . . . . . . . . . . . . 36 3.3.1 The perceptron storage problem . . . . . . . . . . . . . . 36 3.3.2 Iterative Hebbian training algorithms . . . . . . . . . . . 37 3.3.3 The Rosenblatt perceptron algorithm . . . . . . . . . . . 39",The+Shallow+and+the+Deep.pdf "3.3.2 Iterative Hebbian training algorithms . . . . . . . . . . . 37 3.3.3 The Rosenblatt perceptron algorithm . . . . . . . . . . . 39 3.3.4 The perceptron algorithm as gradient descent . . . . . . . 41 3.3.5 The Perceptron Convergence Theorem . . . . . . . . . . . 42 3.3.6 A few remarks . . . . . . . . . . . . . . . . . . . . . . . . 45 3.4 The capacity of a hyperplane . . . . . . . . . . . . . . . . . . . . 46 v",The+Shallow+and+the+Deep.pdf "vi CONTENTS 3.4.1 The number of linearly separable dichotomies . . . . . . . 46 3.4.2 Discussion of the result . . . . . . . . . . . . . . . . . . . 52 3.4.3 Time for a pizza or some cake . . . . . . . . . . . . . . . . 53 3.5 Learning a linearly separable rule . . . . . . . . . . . . . . . . . . 55 3.5.1 Student-teacher scenario . . . . . . . . . . . . . . . . . . . 55 3.5.2 Learning in version space . . . . . . . . . . . . . . . . . . 57 3.5.3 Generalization begins where storage ends . . . . . . . . . 60 3.5.4 Optimal generalization . . . . . . . . . . . . . . . . . . . . 62 3.6 The perceptron of optimal stability . . . . . . . . . . . . . . . . . 63 3.6.1 The stability criterion . . . . . . . . . . . . . . . . . . . . 63 3.6.2 The MinOver algorithm . . . . . . . . . . . . . . . . . . . 65 3.7 Optimal stability by quadratic optimization . . . . . . . . . . . . 67 3.7.1 Optimal stability reformulated . . . . . . . . . . . . . . . 67",The+Shallow+and+the+Deep.pdf "3.7 Optimal stability by quadratic optimization . . . . . . . . . . . . 67 3.7.1 Optimal stability reformulated . . . . . . . . . . . . . . . 67 3.7.2 The Adaptive Linear Neuron - Adaline . . . . . . . . . . . 68 3.7.3 The Adaptive Perceptron Algorithm - AdaTron . . . . . . 73 3.7.4 Support vectors . . . . . . . . . . . . . . . . . . . . . . . . 78 3.8 Inhom. lin. sep. functions revisited . . . . . . . . . . . . . . . . . 80 3.9 Some remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4 Beyond linear separability 83 4.1 Perceptron with errors . . . . . . . . . . . . . . . . . . . . . . . . 85 4.1.1 Minimal number of errors . . . . . . . . . . . . . . . . . . 85 4.1.2 Soft margin classifier . . . . . . . . . . . . . . . . . . . . . 87 4.2 Layered networks of perceptron-like units . . . . . . . . . . . . . 90 4.2.1 Committee and parity machines . . . . . . . . . . . . . . 91 4.2.2 The parity machine: a universal classifier . . . . . . . . . 92",The+Shallow+and+the+Deep.pdf "4.2.1 Committee and parity machines . . . . . . . . . . . . . . 91 4.2.2 The parity machine: a universal classifier . . . . . . . . . 92 4.2.3 The capacity of machines . . . . . . . . . . . . . . . . . . 95 4.3 Support Vector Machines . . . . . . . . . . . . . . . . . . . . . . 97 4.3.1 Non-linear transformation to higher dimension . . . . . . 98 4.3.2 Large margin classifier . . . . . . . . . . . . . . . . . . . . 99 4.3.3 The kernel trick . . . . . . . . . . . . . . . . . . . . . . . 100 4.3.4 A few remarks . . . . . . . . . . . . . . . . . . . . . . . . 104 5 Feed-forward networks for regression and classification 107 5.1 Feed-forward networks as non-linear function approximators . . . 107 5.1.1 Architecture and input-output relation . . . . . . . . . . . 108 5.1.2 Universal approximators . . . . . . . . . . . . . . . . . . . 109 5.2 Gradient based training of feed-forward nets . . . . . . . . . . . . 114 5.2.1 Computing the gradient: Backpropagation of Error . . . . 116",The+Shallow+and+the+Deep.pdf "5.2 Gradient based training of feed-forward nets . . . . . . . . . . . . 114 5.2.1 Computing the gradient: Backpropagation of Error . . . . 116 5.2.2 Batch gradient descent . . . . . . . . . . . . . . . . . . . . 116 5.2.3 Stochastic gradient descent . . . . . . . . . . . . . . . . . 119 5.2.4 Practical aspects and modifications . . . . . . . . . . . . . 122 5.3 Objective functions . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.3.1 Cost functions for regression . . . . . . . . . . . . . . . . 124 5.3.2 Cost functions for classification . . . . . . . . . . . . . . . 125 5.4 Activation functions . . . . . . . . . . . . . . . . . . . . . . . . . 127",The+Shallow+and+the+Deep.pdf "CONTENTS vii 5.4.1 Sigmoidal and related functions . . . . . . . . . . . . . . . 127 5.4.2 One-sided and unbounded activation functions . . . . . . 128 5.4.3 Exponential and normalized activations . . . . . . . . . . 130 5.4.4 Remark: universal function approximation . . . . . . . . . 131 5.5 Specific architectures . . . . . . . . . . . . . . . . . . . . . . . . . 131 5.5.1 Popular shallow networks . . . . . . . . . . . . . . . . . . 132 5.5.2 Deep and convolutional neural networks . . . . . . . . . . 135 6 Distance-based classifiers 141 6.1 Prototype-based classifiers . . . . . . . . . . . . . . . . . . . . . . 143 6.1.1 Nearest Neighbor and Nearest Prototype Classifiers . . . 143 6.1.2 Learning Vector Quantization . . . . . . . . . . . . . . . . 144 6.1.3 LVQ training algorithms . . . . . . . . . . . . . . . . . . . 145 6.2 Distance measures and relevance learning . . . . . . . . . . . . . 148 6.2.1 LVQ beyond Euclidean distance . . . . . . . . . . . . . . 148",The+Shallow+and+the+Deep.pdf "6.2 Distance measures and relevance learning . . . . . . . . . . . . . 148 6.2.1 LVQ beyond Euclidean distance . . . . . . . . . . . . . . 148 6.2.2 Adaptive distances in relevance learning . . . . . . . . . . 149 6.3 Concluding remarks . . . . . . . . . . . . . . . . . . . . . . . . . 153 7 Model evaluation and regularization 155 7.1 Bias and variance, over- and underfitting . . . . . . . . . . . . . 155 7.1.1 Decomposition of the error . . . . . . . . . . . . . . . . . 156 7.1.2 The bias-variance dilemma . . . . . . . . . . . . . . . . . 158 7.1.3 Beyond the classical bias-variance trade-off (?) . . . . . . 161 7.2 Controlling the network complexity . . . . . . . . . . . . . . . . . 163 7.2.1 Early stopping . . . . . . . . . . . . . . . . . . . . . . . . 163 7.2.2 Weight decay and related concepts . . . . . . . . . . . . . 164 7.2.3 Constructive algorithms . . . . . . . . . . . . . . . . . . . 167 7.2.4 Pruning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167",The+Shallow+and+the+Deep.pdf "7.2.3 Constructive algorithms . . . . . . . . . . . . . . . . . . . 167 7.2.4 Pruning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 7.2.5 Weight-sharing . . . . . . . . . . . . . . . . . . . . . . . . 169 7.2.6 Dropout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 7.3 Cross-validation and related methods . . . . . . . . . . . . . . . . 171 7.3.1 n-fold cross-validation and related schemes . . . . . . . . 172 7.3.2 Model and parameter selection . . . . . . . . . . . . . . . 175 7.4 Performance measures . . . . . . . . . . . . . . . . . . . . . . . . 175 7.4.1 Measures for regression . . . . . . . . . . . . . . . . . . . 176 7.4.2 Measures for classification . . . . . . . . . . . . . . . . . . 176 7.4.3 Receiver Operating Characteristics . . . . . . . . . . . . . 177 7.4.4 The area under the ROC curve . . . . . . . . . . . . . . . 180 7.4.5 Alternative measures for two-class problems . . . . . . . . 181",The+Shallow+and+the+Deep.pdf "7.4.4 The area under the ROC curve . . . . . . . . . . . . . . . 180 7.4.5 Alternative measures for two-class problems . . . . . . . . 181 7.4.6 Multi-class problems . . . . . . . . . . . . . . . . . . . . . 182 7.4.7 Averages of class-wise quality measures . . . . . . . . . . 183 7.5 Interpretable systems . . . . . . . . . . . . . . . . . . . . . . . . . 185",The+Shallow+and+the+Deep.pdf "viii CONTENTS 8 Preprocessing and unsupervised learning 187 8.1 Normalization and transformations . . . . . . . . . . . . . . . . . 188 8.1.1 Coordinate-wise transformations . . . . . . . . . . . . . . 189 8.1.2 Normalization . . . . . . . . . . . . . . . . . . . . . . . . . 191 8.2 Dimensionality reduction . . . . . . . . . . . . . . . . . . . . . . 192 8.2.1 Low-dimensional embedding . . . . . . . . . . . . . . . . . 194 8.2.2 Multi-dimensional Scaling . . . . . . . . . . . . . . . . . . 194 8.2.3 Neighborhood Embedding . . . . . . . . . . . . . . . . . . 195 8.2.4 Feature selection . . . . . . . . . . . . . . . . . . . . . . . 196 8.3 PCA and related methods . . . . . . . . . . . . . . . . . . . . . . 197 8.3.1 Principal Component Analysis . . . . . . . . . . . . . . . 198 8.3.2 PCA by Hebbian learning . . . . . . . . . . . . . . . . . . 200 8.3.3 Independent Component Analysis . . . . . . . . . . . . . 203 8.4 Clustering and Vector Quantization . . . . . . . . . . . . . . . . 204",The+Shallow+and+the+Deep.pdf "8.3.3 Independent Component Analysis . . . . . . . . . . . . . 203 8.4 Clustering and Vector Quantization . . . . . . . . . . . . . . . . 204 8.4.1 Basic clustering methods . . . . . . . . . . . . . . . . . . 205 8.4.2 Competitive learning for Vector Quantization . . . . . . . 206 8.4.3 Practical issues and extensions of VQ . . . . . . . . . . . 208 8.5 Density estimation . . . . . . . . . . . . . . . . . . . . . . . . . . 211 8.5.1 Parametric density estimation . . . . . . . . . . . . . . . . 211 8.5.2 Gaussian Mixture Models . . . . . . . . . . . . . . . . . . 212 8.6 Missing values and imputation techniques . . . . . . . . . . . . . 215 8.6.1 Approaches without explicit imputation . . . . . . . . . . 216 8.6.2 Imputation based on available data . . . . . . . . . . . . . 216 8.7 Over- and undersampling, augmentation . . . . . . . . . . . . . . 218 8.7.1 Weighted cost functions . . . . . . . . . . . . . . . . . . . 218",The+Shallow+and+the+Deep.pdf "8.7 Over- and undersampling, augmentation . . . . . . . . . . . . . . 218 8.7.1 Weighted cost functions . . . . . . . . . . . . . . . . . . . 218 8.7.2 Undersampling . . . . . . . . . . . . . . . . . . . . . . . . 218 8.7.3 Oversampling . . . . . . . . . . . . . . . . . . . . . . . . . 219 8.7.4 Data augmentation . . . . . . . . . . . . . . . . . . . . . . 220 Concluding quote 223 A Optimization 225 A.1 Multi-dimensional Taylor expansion . . . . . . . . . . . . . . . . 225 A.2 Local extrema and saddle points . . . . . . . . . . . . . . . . . . 227 A.2.1 Necessary and sufficient conditions . . . . . . . . . . . . . 227 A.2.2 Example: unsolvable systems of linear equations . . . . . 228 A.3 Constrained optimization . . . . . . . . . . . . . . . . . . . . . . 230 A.3.1 Equality constraints . . . . . . . . . . . . . . . . . . . . . 230 A.3.2 Example: under-determined linear equations . . . . . . . 231 A.3.3 Inequality constraints . . . . . . . . . . . . . . . . . . . . 232",The+Shallow+and+the+Deep.pdf "A.3.2 Example: under-determined linear equations . . . . . . . 231 A.3.3 Inequality constraints . . . . . . . . . . . . . . . . . . . . 232 A.3.4 The Wolfe Dual for convex problems . . . . . . . . . . . . 234 A.4 Gradient based optimization . . . . . . . . . . . . . . . . . . . . . 235 A.4.1 Gradient and directional derivative . . . . . . . . . . . . . 235 A.4.2 Gradient descent . . . . . . . . . . . . . . . . . . . . . . . 236 A.4.3 The gradient under coordinate transformations . . . . . . 238 A.5 Variants of gradient descent . . . . . . . . . . . . . . . . . . . . . 239",The+Shallow+and+the+Deep.pdf "CONTENTS ix A.5.1 Coordinate descent . . . . . . . . . . . . . . . . . . . . . . 239 A.5.2 Constrained problems and projected gradients . . . . . . 240 A.5.3 Stochastic gradient descent . . . . . . . . . . . . . . . . . 240 A.6 Example calculation of a gradient . . . . . . . . . . . . . . . . . . 243 List of figures 246 List of algorithms 247 Abbrev. and acronyms 248 Bibliography 250 1. Abandon the idea that you are ever going to finish. — John Steinbeck, Six Writing Tips",The+Shallow+and+the+Deep.pdf x CONTENTS,The+Shallow+and+the+Deep.pdf "Chapter 1 From neurons to networks Reality is overrated anyway. — Unknown To understand and explain the brain’s fascinating capabilities1 remains one of the greatest scientific challenges ever. This is particularly true for its plas- ticity, i.e. the ability to learn from experience, to adapt to and to survive in ever-changing environments. Ultimately, the performance of the brain must rely on its hardware (or wet- ware [LB89]) and emerges from the cooperative behavior of its many, relatively simple, yet highly interconnected building blocks: the neurons. The human cortex, for instance, comprises an estimated number of 1012 neurons and each individual cell can be connected to thousands of others. In this introduction to Neural Networks and Computational Intelligence we will study artificial neural networks and related systems, designed for the pur- pose of adaptive information processing. The degree to which these systems",The+Shallow+and+the+Deep.pdf "pose of adaptive information processing. The degree to which these systems relate to their biological counterparts is, generally speaking, quite limited. How- ever, their development was greatly inspired by key aspects of biological neurons and networks. Therefore, it is useful to be aware of the conceptual connections between artificial and biological systems, at least on a basic level. Quite often, technical solutions are inspired by natural systems without copy- ing all their properties in detail. Due to biological constraints, nature (i.e. evolu- tion) might have found highly complex solutions to certain problems that could be dealt with in a simpler fashion in a technical realization. A somewhat over- used example in this context is the construction of efficient aircraft, which by no means requires the use of moving wings in order to imitate bird flight faithfully. Of course, it is unclear a priori which of the details are essential and which",The+Shallow+and+the+Deep.pdf "Of course, it is unclear a priori which of the details are essential and which ones can be left out in artificial systems. Obviously, this also depends on the 1(including the capability of being fascinated) 1",The+Shallow+and+the+Deep.pdf "2 1. FROM NEURONS TO NETWORKS specific task and context. Consequently, the interaction between the neuro- sciences and machine learning research continues to play an important role for the further development of both. In this introductory text we will consider learning systems, which draw on only the most basic mechanisms. Therefore, this chapter is only meant as a very brief overview, which should allow to relate some of the concepts in artificial neural computation to their biological background. The reader should be aware that the presentation is certainly over-simplifying and probably not quite up- to-date in all aspects. Recommended textbooks and other sources In most of this introductory chapter, detailed citations concerning specific topics will not be provided. Instead, the following list points the reader to selected textbooks, reviews or lecture notes. They range from brief and superficial to very comprehensive and detailed reviews of the biological background. The same",The+Shallow+and+the+Deep.pdf "very comprehensive and detailed reviews of the biological background. The same is true for the discussion of the different conceptual levels on which biological systems can be modelled. References point to the full citation information in the bibliography. Note that the selection is certainly incomplete and biased by personal preferences. ◦ K. Guerney’s (Neural Networks) gives a very basic overview and provides a glossary of biological or biologically inspired terms [Gue97]. ◦ The first sections of Neural Networks and Learning Machines by S. Haykin cover the relevant topics in slightly greater depth [Hay09]. ◦ The classical textbook Neural Networks: An Introduction to the Theory of Neural Computation by J.A. Hertz, A. Krogh and R.G. Palmer discusses the inspiration from biological neurons and networks in the first chapters. It also provides a thorough analysis of the Hopfield model from a statistical physics perspective [HKP91].",The+Shallow+and+the+Deep.pdf "It also provides a thorough analysis of the Hopfield model from a statistical physics perspective [HKP91]. ◦ H. Horner and R. Kühn give a brief general introduction in Neural Net- works [HK98], including a basic discussion of the biological background. ◦ Models of biological neurons, their bio-chemistry and bio-physics are in the focus of C. Koch’s comprehensive monograph on the Biophysics of computation [Koc98]. It discusses the different modelling approaches and relates them to experimental data obtained from real world neurons. ◦ T. Kohonen has introduced important prototype-based learning schemes. An entire chapter of his seminal work Self-Organizing Maps is devoted to the Justification of Neural Modeling [Koh97]. ◦ H. Ritter, T. Martinetz and K. Schulten give an overview and also discuss some aspects of the organization of the brain in terms of maps in their monograph Neural Computation and Self-Organizing Maps [RMS92].",The+Shallow+and+the+Deep.pdf "some aspects of the organization of the brain in terms of maps in their monograph Neural Computation and Self-Organizing Maps [RMS92]. ◦ M. van Rossum’s lecture notes on Neural Computation provide an overview of biological information processing and models of neural activity, synaptic interaction and plasticity. Moreover, modelling approaches are discussed in some detail [Ros16].",The+Shallow+and+the+Deep.pdf "1.1. SPIKING NEURONS AND SYNAPTIC INTERACTIONS 3 1.1 Spiking neurons and synaptic interactions The physiology and functionality of the biological systems is highly complex, already on the single neuron level. Sophisticated modelling frameworks have been developed that take into account the relevant electro-chemical processes in great detail in order to represent the biology as faithfully as possible. This includes the famous Hodgkin-Huxley model and variants thereof. They describe the state of cell compartments in terms of an electrostatic potential, which is due to varying ion concentrations on both sides of the cell membrane. A number of ion channels and pumps control the concentrations and, thus, govern the membrane potential. The original Hodgkin-Huxley model describes its temporal evolution in terms of four coupled ordinary differential equations, the parameters of which can be fitted to experimental data measured in real world neurons.",The+Shallow+and+the+Deep.pdf "equations, the parameters of which can be fitted to experimental data measured in real world neurons. Whenever the membrane potential reaches a threshold value, for instance triggered by the injection of an external current, a short, localized electrical pulse is generated. The term action potential or the more sloppy spike will be used synonymously. The neuron is said to fire when a spike is generated. The action potential discharges the membrane locally and propagates along the membrane. As illustrated in Figure 1.1 (left panel), a strongly elongated extension is attached to the soma, the so-called axon. From a purely technical point of view, it serves as a cable along which action potentials can travel. Of course, the actual electro-chemical processes are significantly different from the flow of electrons in a conventional copper cable, for instance. In fact, action potentials jump between short gaps in the myelin sheath, an insulating",The+Shallow+and+the+Deep.pdf "action potentials jump between short gaps in the myelin sheath, an insulating layer around the axon. By means of saltatory conduction, action potentials spread along the axonic branches of the firing neuron and eventually reach the points where the branches connect to the dendrites of other neurons. Such a connection, termed synapse, is shown schematically in Fig. 1.1 (right panel). Upon arrival of a spike, so-called neuro-transmitters are released into the synap- tic cleft, i.e. the gap between pre-synaptic axon branch and the post-synaptic dendrite. The transmitters are received on the post-synaptic side by substance specific receptors. Thus, in the synapse, the action potential is not transferred directly through a physical contact point, but chemically.2 The effect that an ar- riving spike has on the post-synaptic neuron depends on the detailed properties of the synapse: ◦ If the synapse is of the excitatory type, the post-synaptic membrane po-",The+Shallow+and+the+Deep.pdf "of the synapse: ◦ If the synapse is of the excitatory type, the post-synaptic membrane po- tential increases upon arrival of the pre-synaptic spike, ◦ When a spike arrives at an inhibitory synapse, the post-synaptic mem- brane potential decreases. Both excitatory and inhibitory synapses can have varying strengths, as reflected 2 Note that also so-called gap junctions exist which can function as bi-directional electrical synapses, see e.g. [CL04] for further information and references.",The+Shallow+and+the+Deep.pdf "4 1. FROM NEURONS TO NETWORKS Figure 1.1: Schematic illustration of neurons (pyramidal cells) and their con- nections. Left: Pre-synaptic and post-synaptic neurons with soma, dendritic tree, axon, and axonic branches. Right: The synaptic cleft with vesicles releas- ing neuro-transmitters and corresponding receptors on the post-synaptic side. Redrawn after [Kat66]. in the magnitude of the change that a spike imposes on the post-synaptic mem- brane potential. Consequently, the membrane potential of a particular cell will vary over time, depending on the actual activities of the neurons it receives spikes from through excitatory and inhibitory synapses. When the threshold for spike generation is reached, the neuron fires itself and, thus, influences the potential and activity of all its post-synaptic neighbors. All in all, a set of interconnected neurons forms a complex dynamical system of threshold units which influence each other’s",The+Shallow+and+the+Deep.pdf "a complex dynamical system of threshold units which influence each other’s activity through generation and synaptic transmission of action potentials. The origin of a very successful approach to the modelling of neuronal ac- tivity dates back to Louis Lapicque in 1907. In the framework of the so-called Integrate-and-Fire (IaF) model, electro-chemical details accounted for in the Hodgkin-Huxley type of models are omitted (and were probably not known at the time). The membrane is simply represented by its conductance and ohmic resistance. All charge transport phenomena are combined in one effective elec- tric current, which summarizes the individual contributions of changing ion concentrations as well as leak currents through the membrane. Similarly, the precise form of spikes and details of their generation and transport are ignored. Instead, the firing is modelled as an all-or-nothing threshold process, which re-",The+Shallow+and+the+Deep.pdf "Instead, the firing is modelled as an all-or-nothing threshold process, which re- sults in an instantaneous discharge. A spike is represented by a structureless Dirac delta function which defines the time point of the event. Despite its sim- plicity compared to more realistic electro-chemical models, the IaF model can be fitted to physiological data and yields a fairly realistic description of neuronal activity.",The+Shallow+and+the+Deep.pdf "1.2. FIRING RATE MODELS 5 time [ms] Figure 1.2: Left (upper): Schematic illustration of an action potential, i.e. a short pulse on mV - and ms-scale. Left (lower): Spikes travel along the axon through saltatory conduction via gaps in the insulating myelin sheath. Right: Schematic illustration of how mean firing rates are derived from a temporal spike pattern. 1.2 Firing rate models In another step of abstraction, the description of neural activity is simplified by taking into account only the mean firing rate, e.g. obtained as the average number of spikes per unit time; the concept is illustrated in Fig. 1.2 (right panel). The implicit assumption is that most of the information in neural process- ing is contained in the mean activity and frequency of spikes of the neurons. Hence, the precise timing of individual action potentials is completely disre- garded. While the role of individual spike timing appears to be the topic of",The+Shallow+and+the+Deep.pdf "garded. While the role of individual spike timing appears to be the topic of ongoing debate in the neurosciences3, the simplification clearly facilitates effi- cient simulations of very large networks of neurons and can be seen as the basis of virtually all artificial neural networks and learning systems considered in this text. 1.2.1 Neural activity and synaptic interaction The firing rate picture allows for a simple mathematical description of neural activity and synaptic interaction. Consider the mean activity Si of neuron i, which receives input from a set J of neurons with j ∕= i. Taking into account the fact that the firing rate of a biological neuron cannot exceed a certain maximum due to physiological and bio-chemical constraints, we can limit Si to a range of values 0 ≤ Si where the upper limit 1 is given in arbitrary units. The resting state Si = 0 obviously corresponds to the absence of any spike generation.",The+Shallow+and+the+Deep.pdf "state Si = 0 obviously corresponds to the absence of any spike generation. The activity of neuron i is given as a (non-linear) response of incoming spikes, which are - however - also represented only by the mean activities Sj: in Si = h(xi) with xi = 󰁛 j∈J wij Sj. (1.1) 3See, e.g., http://romainbrette.fr/category/blog/rate-vs-timing/ for further references.",The+Shallow+and+the+Deep.pdf "6 1. FROM NEURONS TO NETWORKS Here, the quantities wij ∈ R represent the strength of the synapse connecting one neuron j ∈ J with neuron i. Positive wij > 0 increase the so-called local potential xi if neuron j is active (Sj > 0), while wij < 0 contribute negative terms to the weighted sum. Note that real world chemical synapses are strictly uni-directional: even if connections wij and wji exist for a given pair of neurons, they would be physiologically separate, independent entities. 1.2.2 Sigmoidal activation functions A variety of different activation functions h(x) have been employed in artificial neural networks. A few specific types of functions will be introduced in a later chapter. Here we restrict the discussion to the by now classical sigmoidal acti- vation which arguably captures important characteristics of biological systems. It is plausible to assume the following mathematical properties of the acti-",The+Shallow+and+the+Deep.pdf "It is plausible to assume the following mathematical properties of the acti- vation function h(x) of a given neuron (subscript i omitted) with local potential x as in Eq. (1.1): lim x→−∞ h(x) = 0 (resting state, absence of spike generation) h′(x) ≥ 0 (monotonic increase of the excitation) lim x→+∞ h(x) = 1 (maximum possible firing rate), (1.2) which takes into account the limitations of individual neural activity discussed in the previous section. Various activation or transfer functions have been suggested and considered in the literature. In the context of feed-forward neural networks, we will discuss several options in Sec. 5.4. A very important class of plausible activations is given by so-called sigmoidal functions, one prominent4 example being h(x) = 1 2 󰀕 1 + tanh 󰀅 γ(x − θ) 󰀆󰀖 (1.3) which clearly satisfies the conditions given above. The two important param- eters are the threshold θ, which localizes the steepest increase of activity, and",The+Shallow+and+the+Deep.pdf "eters are the threshold θ, which localizes the steepest increase of activity, and the gain parameter γ, which quantifies the slope. It is important to note that θ does not directly correspond to the previously discussed threshold of the all- or-nothing generation of individual spikes: it marks the characteristic value of h at which the activation function is centered. 4Its popularity is partly due to the fact that the relation tanh′ = 1 − tanh2 facilitates a very efficient computation of the derivative, see also Chapter 5.",The+Shallow+and+the+Deep.pdf "1.2. FIRING RATE MODELS 7 Si γ θ xi = 󰁓 j wijSj Si θ xi = 󰁓 j wijSj Figure 1.3: Schematic illustration of symmetrized activation functions. Left: A sigmoidal transfer function with gain γ and threshold θ in the symmetrized representation, cf. Eq. (1.6). Right: The binary McCulloch Pitts activation as obtained in the limit γ → ∞. Symmetrized representation of activity We will frequently consider a symmetrized description of neural activity in terms of modified activation functions: lim x→−∞ g(x) = −1 (resting state, absence of spike generation) g′(x) ≥ 0 (monotonic increase of the excitation) lim x→+∞ g(x) = 1 (maximum possible firing rate). (1.4) An example activation analogous to Eq. (1.3) is g(x) = tanh 󰀅 γ(x − θ) 󰀄 . (1.5) At first sight, this appears to be just an alternative assignment of a value S = −1 to the resting state. Note that in the original description with 0 < Sj < 1, a quiescent neuron does not influence its postsynaptic neurons explicitly. However, keeping the",The+Shallow+and+the+Deep.pdf "Note that in the original description with 0 < Sj < 1, a quiescent neuron does not influence its postsynaptic neurons explicitly. However, keeping the form of the activation as Si = g(xi) with xi = 󰁛 j∈J wij Sj (1.6) implies that the absence of activity (Sj = −1) in neuron j can now increase the firing rate of neuron i if connected through an inhibitory synapse wij < 0. This and other mathematical subtleties are clearly biologically implausible which is due to the somewhat artificial introduction of – in a sense – negative and positive activities which are treated in a symmetrized fashion. However, as we do not aim at describing biological reality, the above dis- cussed symmetrization can be justified. In fact, it simplifies the mathematical and computational treatment, and has contributed to, for instance, the fruitful popularization of neural networks in the statistical physics community in the 1980s and 1990s.",The+Shallow+and+the+Deep.pdf "8 1. FROM NEURONS TO NETWORKS McCulloch Pitts neurons Quite frequently, an even more drastic modification is considered: for infinite gain γ → ∞ the sigmoidal activation becomes a step function, see Fig. 1.3 (right panel) for an illustration. Eq. (1.5) for instance yields in this limit g(x) = sign(x − θ) = 󰀝 +1 if x ≥ θ −1 if x < θ. (1.7) In this symmetrized version of a binary activation function, only two possible states are considered: either the model neuron is totally quiescent (S = −1) or it fires at maximum frequency, which is represented by S = +1. The extreme abstraction to binary activation states without the flexibility of a graded response was first discussed by McCulloch and Pitts in 1943, who originally denoted the quiescent state by S = 0. The persisting popularity of this model is due to its simplicity as well as its similarity to Boolean concepts in conventional computing. In the following, we will frequently resort to binary",The+Shallow+and+the+Deep.pdf "in conventional computing. In the following, we will frequently resort to binary model neurons in the symmetrized version (1.7). In fact, the so-called percep- tron, as discussed in Chapter 3, can be interpreted as a single McCulloch Pitts unit which is connected to N input neurons. 1.2.3 Hebbian learning Probably the most intriguing property of biological neural networks is their abil- ity to learn. Instead of realizing only pre-wired functionalities, brains adapt to their environment or - in higher level terms - they can learn from experience. Many potential forms of plasticity and memory representation have been dis- cussed in the literature, including the chemical storage of information or learning through neurogenesis, i.e. the growth of new neurons. A very popular and plausible paradigm of learning is synaptic plasticity. A key mechanism, Hebbian Learning, is named after psychologist Donald Hebb, who published his work The Organization of Behavior in 1949 [Heb49]. The",The+Shallow+and+the+Deep.pdf "key mechanism, Hebbian Learning, is named after psychologist Donald Hebb, who published his work The Organization of Behavior in 1949 [Heb49]. The original hypothesis was formulated in terms of a pair of neurons, which are con- nected through an excitatory synapse: “When an axon of cell A is near enough to excite cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A’s efficiency, as one of the cells firing B, is increased.” This is known as Hebb’s law and sometimes rephrased as “Neurons that fire together, wire together.” Hebbian Learning results in a memory effect which favors the simultaneous activity of neurons A and B in the future. Hence, it constitutes a form of learning through synaptic plasticity. The question to which extent the Hebbian paradigm reflects the biological reality of learning is subject of on-going debate. Alternative or complementing",The+Shallow+and+the+Deep.pdf "reality of learning is subject of on-going debate. Alternative or complementing mechanisms have been suggested, see [SVG+18] for a recent example. In the",The+Shallow+and+the+Deep.pdf "1.3. NETWORK ARCHITECTURES 9 context of artificial neural networks, Hebbian synaptic plasticity provides a very plausible basis for the representation of learning in the models. In the mathematical framework of firing rate models presented in the previ- ous section, we can express Hebbian Learning quite elegantly, assuming that the synaptic change is simply proportional to the pre- and post-synaptic activity: ∆wAB ∝ SASB. (1.8) Hence, the change ∆wAB of a particular synapse wAB depends only on locally available information: the activities of the pre-synaptic (SB) and the post- synaptic neuron (SA). For SA, SB > 0 this is quite close to the actual Hebbian hypothesis. The symmetrization with −1 < SA,B < +1 adds some biologically implau- sible aspects to the picture. For instance, an excitatory synapse connecting A and B would also be strengthened according to Eq. (1.8) if both neurons are quiescent at the same time, since in this case SASB > 0. Similarly, high activ-",The+Shallow+and+the+Deep.pdf "quiescent at the same time, since in this case SASB > 0. Similarly, high activ- ity in A and low activity in B (or vice versa) with SASB < 0 would weaken an excitatory or strengthen an inhibitory synapse. In Hebb’s original formulation, however, only the presence of simultaneous activity should trigger changes of the involved synapse. Moreover, the mathematical formalism in (1.8) facilitates the possibility that an individual excitatory synapse can become inhibitory or vice versa, which is also questionable from the biological point of view. Many learning paradigms in artificial neural networks and other adaptive systems can be interpreted as Hebbian Learning in the sense of the above dis- cussion. Examples can be found in a variety of contexts, including supervised and unsupervised learning, see Sec. 2 for working definitions of these terms. Note that the actual interpretation of the term Hebbian Learning varies a",The+Shallow+and+the+Deep.pdf "Note that the actual interpretation of the term Hebbian Learning varies a lot in the literature. Occasionally, it is employed only in the context of unsuper- vised learning, since feedback from the environment is quite generally assumed to constitute non-local information. Here, we follow the wide-spread, rather relaxed use of the term for learning processes which depend on the states of the pre- and post-synaptic units as in Eq. (1.8). Frequently, learning can be seen as the optimization of suitable costs which are interpreted as a function of the network parameters, i.e. the synaptic strengths or weights. As we will see, in many cases numerical optimization procedures, which are for instance based on gradient descent, lead to update rules for the weights that resemble Hebbian Learning to a large extent. 1.3 Network architectures In the previous section we have considered types of model neurons which retain certain aspects of their biological counterparts and allow for a mathematical",The+Shallow+and+the+Deep.pdf "certain aspects of their biological counterparts and allow for a mathematical formulation of neural activity, synaptic interactions, and learning. This enables us to construct networks from, for instance, sigmoidal or McCulloch Pitts neu- rons, and model or simulate the dynamics of neurons and/or learning processes concerning the synaptic connections.",The+Shallow+and+the+Deep.pdf "10 1. FROM NEURONS TO NETWORKS In the following, only the most basic and clear-cut types of network architec- tures are introduced and discussed, namely fully connected recurrent networks and feed-forward layered networks. The possibilities for modifications of these networks, as well as for hybrid and intermediate types are nearly endless. Some more specific architectures will be introduced briefly later; in Section 5.5 and Chapter 6 various shallow and deep networks will be addressed. 1.3.1 Attractor networks and the Hopfield model Networks with very high or unstructured connectivity form dynamical systems of neurons which influence each other through synaptic interaction. In a network as shown in Figure 1.4 (left panel) the activity of a particular neuron depends on its synaptic input. Considering discrete timesteps t one obtains an update of the form Si(t + 1) = g 󰀳 󰁃󰁛 j∈J wij Sj(t) 󰀴 󰁄, (1.9) where the sum is taken over all units j ∈ J which n euron i receives input from",The+Shallow+and+the+Deep.pdf "of the form Si(t + 1) = g 󰀳 󰁃󰁛 j∈J wij Sj(t) 󰀴 󰁄, (1.9) where the sum is taken over all units j ∈ J which n euron i receives input from through a synapse wij ∕= 0. Eq. (1.9) can be interpreted as an update of all neurons in parallel. Alternatively, units could be visited in a deterministic or randomized sequential order. We will not discuss the subtle, yet important, differences between parallel and sequential dynamics here and refer the reader to the literature, e.g. [HKP91]. From an initial configuration S(0) at time t = 0 which comprises the indi- vidual activities S(0) = (S1(0), S2(0), . . . , SN (0))⊤, the dynamics generates a sequence of states S(t) which can be considered the system’s response to the initial stimulus. The term recurrent networks has been coined for this type of dynamical system. One of the most extreme, clear-cut example of a recurrent architecture is the fully connected Hopfield or Little-Hopfield model [Hop82,Lit74,HKP91]. A",The+Shallow+and+the+Deep.pdf "One of the most extreme, clear-cut example of a recurrent architecture is the fully connected Hopfield or Little-Hopfield model [Hop82,Lit74,HKP91]. A Hopfield network comprises N neurons of the McCulloch Pitts type which are fully connected by bi-directional synapses wij = wji ∈ R (i, j = 1, 2, . . . N) with wii = 0 for all i. (1.10) While the exclusion of explicit, non-zero self-interactions wii appears plausible, the assumption of symmetric, bi-directional interactions clearly constitutes yet another serious deviation from biological reality. The dynamics of the binary units is given by Si(t + 1) = sign 󰀳 󰁅󰁅󰁃 N󰁛 j=1 j∕=i wijSj(t) 󰀴 󰁆󰁆󰁄. (1.11) John Hopfield [Hop82] realized that the corresponding random sequential update can be seen as a zero temperature Metropolis Monte Carlo dynamics which is",The+Shallow+and+the+Deep.pdf "1.3. NETWORK ARCHITECTURES 11 ⇒ S(t = 0) S(t ≫ 1) Figure 1.4: Recurrent neural networks. Left: A network of N = 5 neurons with partial connectivity and uni-directional synapses. Right: Pattern retrieval from a noisy initial configuration in a Hopfield network of 2500 units, storing 100 activity patterns. Activities Sj = ±1 are shown as black and white ’pixels’, respectively. Initially, 40% of the Sj are flipped with respect to the pattern. The rightmost figure displays the system shortly before perfect retrieval is achieved. governed by an energy function of the form H(S(t)) = − N󰁛 i,j=1 i