Numerical Calculations in Clifford Algebra - Andrew Seagar - E-Book

Numerical Calculations in Clifford Algebra E-Book

Andrew Seagar

0,0
96,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

NUMERICAL CALCULATIONS IN CLIFFORD ALGEBRA An intuitive combination of the theory of Clifford algebra with numerous worked and computed examples and calculations Numerical Calculations in Clifford Algebra: A Practical Guide for Engineers and Scientists is an accessible and practical introduction to Clifford algebra, with comprehensive coverage of the theory and calculations. The book offers many worked and computed examples at a variety of levels of complexity and over a range of different applications making extensive use of diagrams to maintain clarity. The author introduces and documents the Clifford Numerical Suite, developed to overcome the limitations of existing computational packages and to enable the rapid creation and deployment of sophisticated and efficient code. Applications of the suite include Fourier transforms for arrays of any types of Clifford numbers and the solution of linear systems in which the coefficients are Clifford numbers of particular types, including scalars, bicomplex numbers, quaternions, Pauli matrices, and extended electromagnetic fields. Readers will find: * A thorough introduction to Clifford algebra, with a combination of theory and practical implementation in a range of engineering problems * Comprehensive explorations of a variety of worked and computed examples at various levels of complexity * Practical discussions of the conceptual and computational tools for solving common engineering problems * Detailed documentation on the deployment and application of the Clifford Numerical Suite Perfect for engineers, researchers, and academics with an interest in Clifford algebra, Numerical Calculations in Clifford Algebra: A Practical Guide for Engineers and Scientists will particularly benefit professionals in the areas of antenna design, digital image processing, theoretical physics, and geometry.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 470

Veröffentlichungsjahr: 2023

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Cover

Title Page

Copyright

Dedication

List of Figures

List of Tables

Preface

Notes

Part I: Entities and Operations

1 Introduction

1.1 Operations

1.2 History

1.3 Alternative Forms

1.4 Naming

1.5 Structure

1.6 Entities

References

Notes

2 Input

2.1 Syntax

2.2 Constants

2.3 Variables

Reference

Notes

3 Output

3.1 Tree Format

3.2 Numeric Formats

3.3 Extended Formats

3.4 Selected Components

3.5 Primitive Formats

3.6 Recovered Values

4 Unary Operations

4.1 Theory

4.2 Practice

Note

5 Binary Operations

5.1 Geometric Origins

5.2 Multiplication of Units

5.3 Central Multiplication

5.4 Practice

References

Notes

6 Vectors and Geometry

6.1 Theory

6.2 Practice

7 Quaternions

7.1 Theory

7.2 Practice

References

Notes

8 Pauli Matrices

8.1 Theory

8.2 Practice

Reference

Notes

9 Bicomplex Numbers

9.1 Theory

9.2 Practice

Reference

Note

10 Electromagnetic Fields

10.1 Theory

10.2 Practice

10.3 Field Arithmetic

References

Notes

11 Arrays of Clifford Numbers

11.1 Theory

11.2 Practice

Reference

12 Power Series

12.1 Theory

12.2 Practice

References

13 Matrices of Clifford Numbers

13.1 Background

13.2 Inversion

13.3 Practice

Reference

Notes

Part II: Customisation

14 Memory

14.1 Memory Usage

14.2 Examples

Reference

15 Errors

15.1 User Errors

15.2 System Errors

15.3 Recovery

15.4 Beneficial Usage

Reference

Notes

16 Extension

16.1 Accumulation

16.2 Multiplication

16.3 Transformation

16.4 Filtration

Part III: Application

17 Verification

17.1 Identities

17.2 Tests

Reference

Note

18 Lines Not Parallel

18.1 Theory

18.2 Practice

Reference

Notes

19 Perspective Projection

19.1 Theory

19.2 Practice

Reference

20 Linear Systems

20.1 Theory

20.2 Practice

References

Notes

21 Fast Fourier Transform

21.1 Theory

21.2 Practice

References

Notes

22 Hertzian Dipole

22.1 Theory

22.2 Practice

Reference

Notes

23 Finite Difference Time Domain

23.1 Theory

23.2 Practice

References

Note

24 Cauchy Extension

24.1 Background

24.2 Theory

24.3 Practice

References

Notes

25 Electromagnetic Scattering

25.1 Background

25.2 Theory

25.3 Practice

References

Notes

Part IV: Programming

26 Interfaces

26.1 Configuration and Observation

26.2 Simple Entities

26.3 Higher Entities

26.4 Multiple Entities

Reference

27 Descriptions

27.1 Arguments

27.2 Data types

27.3 Formats

27.4 Manual Pages

27.5 Quick Reference

Reference

A Key to Example Code and Results

Index

End User License Agreement

List of Tables

Chapter 1

Table 1.1 Basic unary and binary operations.

Table 1.2 Equivalence between notations.

Table 1.3 Conversion of operations between Clifford and other algebras.

Table 1.4 Examples of Clifford numbers.

Table 1.5 Basic mathematical entities.

Chapter 2

Table 2.1 Syntax for constants.

Chapter 4

Table 4.1 Unary operations.

Chapter 5

Table 5.1 Elementary binary operations.

Table 5.2 Rules for progressive () and regressive () multiplication.

Table 5.3 Rules for central multiplication between units.

Table 5.4 Rules for multiplication by a scalar.

Table 5.5 Rules for central multiplication between primal units and scala...

Table 5.6 Multiplication of evolved and other Clifford units and .

Table 5.7 Multiplication tables for positive signatures.

Table 5.8 Multiplication tables for negative signatures.

Chapter 6

Table 6.1 Geometric operations on vectors.

Chapter 7

Table 7.1 Geometric operations on quaternions.

Chapter 8

Table 8.1 Geometric operations on Pauli matrices.

Chapter 9

Table 9.1 Geometric operations on bicomplex numbers.

Chapter 10

Table 10.1 Electromagnetic entities in time and frequency domain.

Chapter 12

Table 12.1 Power series for Bessel–Clifford function of order .

Table 12.2 Pre‐defined power series.

Table 12.3 Evaluation of logarithm and binomial functions as a product of s...

Chapter 13

Table 13.1 Function prototype of routine to declare function for inversion ...

Table 13.2 Pre‐defined functions for matrix inversion.

Chapter 14

Table 14.1 Forks, branches, and leaves of binary tree.

Table 14.2 Binary tree for full Clifford number of three dimensions.

Chapter 15

Table 15.1 User errors, A–Z.

Table 15.2 Syntax errors.

Table 15.3 Syntax messages.

Table 15.4 System errors.

Chapter 16

Table 16.1 Function prototype of worker routine to merge components into tr...

Table 16.2 Predefined unary and binary operations for merging components in...

Table 16.3 Function prototypes of worker routines to multiply numbers and c...

Table 16.4 Pre‐defined operations for multiplying two components.

Table 16.5 Function prototypes of worker routines to apply transformations ...

Table 16.6 Pre‐defined functions for transforming numbers (a) ignores unit ...

Table 16.7 Function prototypes of worker routines to apply filters to numbe...

Table 16.8 Pre‐defined tests for filtering numbers.

Chapter 17

Table 17.1 Identities for Clifford numbers and vector .

Chapter 21

Table 21.1 Limits on frequencies and periods for signal in terms of samplin...

Chapter 25

Table 25.1 Computational effort for alternative methods of matrix solution ...

Chapter 27

Table 27.1 Argument types.

Table 27.2 New data types.

Table 27.3 Printing formats.

A Key to Example Code and Results

Table A.1 General application code and results.

Table A.2 Surface and Cauchy application code and results.

Table A.3 Demonstration code and results.

List of Illustrations

Chapter 4

Figure 4.1 Negation.

Figure 4.2 Involution.

Figure 4.3 Pair exchange.

Figure 4.4 Reversion.

Figure 4.5 Supplement.

Figure 4.6 Pseudo‐scalar for dimension .

Chapter 5

Figure 5.1 Outer multiplication of unequal vectors.

Figure 5.2 Outer multiplication of equal vectors.

Figure 5.3 Left to right distribution of outer multiplication over addition....

Figure 5.4 Right to left distribution of outer multiplication over addition....

Figure 5.5 Anti‐commutativity of outer multiplication.

Figure 5.6 Outer multiplication using orthogonal components.

Figure 5.7 Outer and inner multiplication of vectors.

Figure 5.8 Geometric behaviour of inner and outer multiplication for vectors...

Figure 5.9 Pictorial representation of progressive () and regressive () mu...

Figure 5.10 Pictorial representation of central multiplication.

Figure 5.11 Pictorial representation of multiplication by a scalar.

Figure 5.12 Multiplication of fixed vector and variable vector supported...

Figure 5.13 Identification of territory covered by different types of multip...

Chapter 6

Figure 6.1 Reflection of vector, in context with negative signature .

Figure 6.2 Orthogonal projections of vector, in context with negative signat...

Figure 6.3 Rotation of vector.

Chapter 7

Figure 7.1 Geometric interpretation of unit quaternions as bivectors.

Figure 7.2 Construction of vector factors of quaternion in plane perpendicul...

Chapter 11

Figure 11.1 Triangular pulse.

Figure 11.2 Spectrum of triangular pulse.

Chapter 12

Figure 12.1 Clifford–Bessel function with scalar argument for orders and...

Figure 12.2 Clifford–Bessel function with non‐scalar argument for orders

Chapter 13

Figure 13.1 Matrix with five rows and seven columns containing a sub‐matrix ...

Chapter 17

Figure 17.1 Numerical error as function of dimension for full Clifford numbe...

Figure 17.2 Numerical error as function of dimension for vectors.

Figure 17.3 Computational time as function of dimension for full Clifford nu...

Figure 17.4 Computational time as function of dimension for vectors.

Chapter 18

Figure 18.1 Point closest to two lines and (a) with common plane, (b) ...

Figure 18.2 Intersection of two lines in dimensions at point .

Figure 18.3 Solution for scalar parameter as ratio of two areas (a) as per...

Figure 18.4 Solution for scalar parameter as a ratio of two areas (a) as p...

Figure 18.5 Minimum separation of two lines in dimensions at points and

Chapter 19

Figure 19.1 Shadow‐plane , onto which points in space are projected by ra...

Figure 19.2 Dodecahedron with perspective projection.

Chapter 21

Figure 21.1 Sampled periodic signal.

Figure 21.2 Periodic spectrum of periodic signal.

Chapter 22

Figure 22.1 Vertical current source within region of length and cross‐...

Figure 22.2 Components of Hertzian dipole field.

Figure 22.3 Magnitude of Hertzian dipole field.

Figure 22.4 Hertzian dipole field in vertical plane.

Figure 22.5 Inverse of Hertzian dipole field in vertical plane.

Chapter 23

Figure 23.1 Sinusoidal waveform.

Figure 23.2 Observation window to for infinite series of travelling puls...

Figure 23.3 Gaussian pulse travelling one cycle.

Figure 23.4 Triangular pulse travelling one cycle.

Figure 23.5 Square pulse travelling one cycle.

Figure 23.6 Gaussian pulse travelling 2048 cycles.

Figure 23.7 Triangular pulse travelling 2048 cycles.

Figure 23.8 Square pulse travelling 2048 cycles.

Figure 23.9 Square pulse shape after 1024 cycles.

Chapter 24

Figure 24.1 Cuboctahedron with Cauchy extension of the electromagnetic field...

Figure 24.2 Variable of integration passes point of evaluation close to ...

Figure 24.3 Dipole field and error in Cauchy extension.

Figure 24.4 Error in Cauchy extension as ratio.

Figure 24.5 Error in Cauchy extension as function of resolution.

Figure 24.6 Tamed (continuous with symbols) and untamed (dashed) errors for ...

Figure 24.7 Tamed (continuous with symbols) and untamed (dashed) errors for ...

Chapter 25

Figure 25.1 Relative error in reduced matrix normalised against the number o...

Figure 25.2 Relative error in product of matrix and inverse normalised again...

Figure 25.3 Inversion time normalised against the cube of the number of fiel...

Figure 25.4 Relative error in reduced matrix normalised against the number o...

Figure 25.5 Relative error in product of matrix and inverse normalised again...

Figure 25.6 Inversion time normalised against the cube of the number of fiel...

Guide

Cover

Table of Contents

Title Page

Copyright

Dedication

List of Figures

List of Tables

Preface

Begin Reading

A Key to Example Code and Results

Index

End User License Agreement

Pages

iii

iv

v

xv

xvi

xvii

xix

xx

xxi

xxii

xxiii

xxiv

1

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

79

80

81

82

83

84

85

86

87

89

90

91

92

93

94

95

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

161

163

164

165

166

167

168

169

170

171

172

173

174

175

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

193

194

195

196

197

198

199

200

201

203

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

295

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

Numerical Calculations in Clifford Algebra

A Practical Guide for Engineers and Scientists

 

Andrew SeagarPO Box 192Griffith University Post OfficeQLD 4222, Australia

 

 

 

 

This edition first publishd 2023© 2023 John Wiley & Sons Ltd.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by law. Advice on how to obtain permission to reuse material from this title is available at http://www.wiley.com/go/permissions.

The right of Andrew Seagar to be identified as the author of this work has been asserted in accordance with law.

Registered OfficesJohn Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USAJohn Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, UK

For details of our global editorial offices, customer services, and more information about Wiley products visit us at www.wiley.com.

Wiley also publishes its books in a variety of electronic formats and by print‐on‐demand. Some content that appears in standard print versions of this book may not be available in other formats.

Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United States and other countries and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

Limit of Liability/Disclaimer of WarrantyWhile the publisher and authors have used their best efforts in preparing this work, they make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives, written sales materials or promotional statements for this work. This work is sold with the understanding that the publisher is not engaged in rendering professional services. The advice and strategies contained herein may not be suitable for your situation. You should consult with a specialist where appropriate. The fact that an organization, website, or product is referred to in this work as a citation and/or potential source of further information does not mean that the publisher and authors endorse the information or services the organization, website, or product may provide or recommendations it may make. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read. Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.

Library of Congress Cataloging‐in‐Publication Data:

Names: Seagar, Andrew, author. | John Wiley & Sons, publisher.Title: Numerical calculations in Clifford algebra : a practical guide for   engineers and scientists / Andrew Seagar.Description: Hoboken, NJ : Wiley, 2023. | Includes index.Identifiers: LCCN 2022053609 (print) | LCCN 2022053610 (ebook) | ISBN   9781394173242 (hardback) | ISBN 9781394173266 (adobe pdf) | ISBN   9781394173259 (epub)Subjects: LCSH: Clifford algebras. | Algebra--Data processing.Classification: LCC QA199 .S43 2023 (print) | LCC QA199 (ebook) | DDC   512/.57--dc23/eng20230203LC record available at https://lccn.loc.gov/2022053609LC ebook record available at https://lccn.loc.gov/2022053610

Cover design: WileyCover image: © J Studios/Getty Images

 

 

 

To Cathy, Laura, Jon and Axil

List of Figures

Figure 4.1

 Negation

Figure 4.2

 Involution

Figure 4.3

 Pair exchange

Figure 4.4

 Reversion

Figure 4.5

 Supplement

Figure 4.6

 Pseudo‐scalar for dimension

Figure 5.1

 Outer multiplication of unequal vectors

Figure 5.2

 Outer multiplication of equal vectors

Figure 5.3

 Left to right distribution of outer multiplication over addition

Figure 5.4

 Right to left distribution of outer multiplication over addition

Figure 5.5

 Anti‐commutativity of outer multiplication

Figure 5.6

 Outer multiplication using orthogonal components

Figure 5.7

 Outer and inner multiplication of vectors

Figure 5.8

 Geometric behaviour of inner and outer multiplication for vectors

Figure 5.9

 Pictorial representation of progressive () and regressive () multiplication

Figure 5.10

 Pictorial representation of central multiplication

Figure 5.11

 Pictorial representation of multiplication by a scalar

Figure 5.12

 Multiplication of fixed vector and variable vector supported as inner

7

and outer multiplication at two ends of central span

Figure 5.13

 Identification of territory covered by different types of multiplication

Figure 6.1

 Reflection of vector, in context with negative signature

Figure 6.2

 Orthogonal projections of vector, in context with negative signature

Figure 6.3

 Rotation of vector

Figure 7.1

 Geometric interpretation of unit quaternions as bivectors

Figure 7.2

 Construction of vector factors of quaternion in plane perpendicular to vector

Figure 11.1

 Triangular pulse

Figure 11.2

 Spectrum of triangular pulse

Figure 12.1

 Clifford–Bessel function with scalar argument for orders and 1

Figure 12.2

 Clifford–Bessel function with non‐scalar argument for orders and 1

Figure 13.1

 Matrix with five rows and seven columns containing a sub‐matrix of three rows and four columns

Figure 17.1

 Numerical error as function of dimension for full Clifford numbers.

Figure 17.2

 Numerical error as function of dimension for vectors

Figure 17.3

 Computational time as function of dimension for full Clifford numbers

Figure 17.4

 Computational time as function of dimension for vectors

Figure 18.1

 Point closest to two lines and (a) with common plane, (b) with no common plane

Figure 18.2

 Intersection of two lines in dimensions at point

Figure 18.3

 Solution for scalar parameter as ratio of two areas (a) as per equation, (b) geometrically reconfigured

Figure 18.4

 Solution for scalar parameter as a ratio of two areas (a) as per equation, (b) geometrically reconfigured

Figure 18.5

 Minimum separation of two lines in dimensions at points and

Figure 19.1

 Shadow‐plane , onto which points in space are projected by rays from the sun

Figure 19.2

 Dodecahedron with perspective projection

Figure 21.1

 Sampled periodic signal

Figure 21.2

 Periodic spectrum of periodic signal

Figure 22.1

 Vertical current source within region of length and cross‐sectional area , standing vertically at the origin, capped at the ends with charge reservoirs ,

Figure 22.2

 Components of Hertzian dipole field

Figure 22.3

 Magnitude of Hertzian dipole field

Figure 22.4

 Hertzian dipole field in vertical plane

Figure 22.5

 Inverse of Hertzian dipole field in vertical plane

Figure 23.1

 Sinusoidal waveform

Figure 23.2

 Observation window to for infinite series of travelling pulses

Figure 23.3

 Gaussian pulse travelling one cycle

Figure 23.4

 Triangular pulse travelling one cycle

Figure 23.5

 Square pulse travelling one cycle

Figure 23.6

 Gaussian pulse travelling 2048 cycles

Figure 23.7

 Triangular pulse travelling 2048 cycles

Figure 23.8

 Square pulse travelling 2048 cycles

Figure 23.9

 Square pulse shape after 1024 cycles

Figure 24.1

 Cuboctahedron with Cauchy extension of the electromagnetic field from points on the surface to points outside

Figure 24.2

 Variable of integration passes point of evaluation close to boundary

Figure 24.3

 Dipole field and error in Cauchy extension

Figure 24.4

 Error in Cauchy extension as ratio

Figure 24.5

 Error in Cauchy extension as function of resolution

Figure 24.6

 Tamed (continuous with symbols) and untamed (dashed) errors for Hertzian taming source

Figure 24.7

 Tamed (continuous with symbols) and untamed (dashed) errors for Dirac delta taming source

Figure 25.1

 Relative error in reduced matrix for extended electromagnetic field

Figure 25.2

 Relative error in product of matrix and inverse of extended electromagnetic field

Figure 25.3

 Inversion time for matrix of extended electromagnetic field

Figure 25.4

 Relative error in reduced matrix for quaternion and Pauli matrix

Figure 25.5

 Relative error in product of matrix and inverse for quaternion and Pauli matrix

Figure 25.6

 Inversion time for matrix of quaternions and Pauli matrices

List of Tables

Table 1.1

 Basic unary and binary operations.

Table 1.2

 Equivalence between notations.

Table 1.3

 Conversion of operations between Clifford and other algebras.

Table 1.4

 Examples of Clifford numbers.

Table 1.5

 Basic mathematical entities.

Table 2.1

 Syntax for constants.

Table 4.1

 Unary operations.

Table 5.1

 Elementary binary operations.

Table 5.2

 Rules for progressive () and regressive () multiplication.

Table 5.3

 Rules for central multiplication between units.

Table 5.4

 Rules for multiplication by a scalar.

Table 5.5

 Rules for central multiplication between primal units and scalars.

Table 5.6

 Multiplication of evolved and other Clifford units and .

Table 5.7

 Multiplication tables for positive signatures.

Table 5.8

 Multiplication tables for negative signatures.

Table 6.1

 Geometric operations on vectors.

Table 7.1

 Geometric operations on quaternions.

Table 8.1

 Geometric operations on Pauli matrices.

Table 9.1

 Geometric operations on bicomplex numbers.

Table 10.1

 Electromagnetic entities in time and frequency domain.

Table 12.1

 Power series for Bessel–Clifford function of order .

Table 12.2

 Pre‐defined power series.

Table 12.3

 Evaluation of logarithm and binomial functions as a product of scalar and non‐scalar parts.

Table 13.1

 Function prototype of routine to declare function for inversion of matrix elements.

Table 13.2

 Pre‐defined functions for matrix inversion.

Table 14.1

 Forks, branches, and leaves of binary tree.

Table 14.2

 Binary tree for full Clifford number of three dimensions.

Table 15.1

 User errors, A–Z.

Table 15.2

 Syntax errors.

Table 15.3

 Syntax messages.

Table 15.4

 System errors.

Table 16.1

 Function prototype of worker routine to merge components into trees.

Table 16.2

 Predefined unary and binary operations for merging components into trees.

Table 16.3

 Function prototypes of worker routines to multiply numbers and components by applying the distribution of multiplication over addition.

Table 16.4

 Pre‐defined operations for multiplying two components.

Table 16.5

 Function prototypes of worker routines to apply transformations to numbers.

Table 16.6

 Pre‐defined functions for transforming numbers (a) ignores unit (b) scalars only.

Table 16.7

 Function prototypes of worker routines to apply filters to numbers.

Table 16.8

 Pre‐defined tests for filtering numbers.

Table 17.1

 Identities for Clifford numbers and vector .

Table 21.1

 Limits on frequencies and periods for signal in terms of sampling parameters.

Table 25.1

 Computational effort for alternative methods of matrix solution for electromagnetic field problems.

Table 27.1

 Argument types.

Table 27.2

 New data types.

Table 27.3

 Printing formats.

Table A.1

 General application code and results.

Table A.2

 Surface and Cauchy application code and results.

Table A.3

 Demonstration code and results.

Preface

Clifford algebra is a tool, and like all tools should only be used for tasks to which it is well suited. One sign that a tool is well suited to a task is that by using the tool the task is simpler than by using a different tool. However, like most tools, with Clifford algebra there is the need to invest some time to develop properly the skill to use it.

Clifford developed his algebra with a particular task in mind, namely the solution of Maxwell's equations of classical electromagnetism. At the time two other tools were in use, Cartesian components and quaternions. Vector calculus came later, out of quaternions.

Clifford called his algebra a ‘geometric algebra’. He constructed it from quaternions, pinning their behaviour at a fundamental level on the algebra of the orthogonal elementary vector units introduced earlier by Grassmann. As a consequence, in addition to the multiplication of quaternions, Clifford's geometric algebra inherits the many and varied multiplications and other operations supported by Grassmann's extensive1 algebra. The list includes (as named by Grassmann at the time) inner and outer multiplication, progressive and regressive multiplication, central multiplication, and the unary supplement operation.

Today, other names are also used. Grassmann himself changed outer multiplication to progressive multiplication when attempting to combine different types of multiplication within a single framework2. That name was not adopted generally, with exterior multiplication now as another alternative.

Regressive multiplication may be found in the form of the ‘meet’ operation within the context of computer graphics, where it is used to formulate the intersection between geometric descriptions of objects. Central (or middle) multiplication is currently called Clifford multiplication somewhat losing sight of Clifford's algebra as supporting many kinds of multiplication, not just one. Grassmann's supplement operation is now called the Hodge star (or Hodge's dual) operation.

As have the names changed over time, so have the notations. Grassmann himself used different notations at different times for the same operations as his works matured. Take as example inner multiplication, defined by Grassmann as the outer multiplication of one number by the supplement of another. At the time, Grassmann used (square) brackets  to indicate the outer multiplication of the numbers in between, and a vertical bar to represent the supplement of the number following. Thus, the notation denotes inner multiplication as the outer multiplication of number by the supplement of number .

Today, the inner multiplication of two numbers is written in at least two notations. The first notation is , where Grassmann's brackets have been replaced by parentheses and the vertical bar has withered to a comma. With this notation, sight of the underlying outer multiplication and supplement is lost.

The second notation is , where the brackets have been replaced by the infix wedge operator3 to indicate the outer multiplication of the numbers on either side, and the vertical bar has been replaced by the Hodge star operator. This notation is more in keeping with Grassmann's original.

Some works on geometric algebra focus more on the algebra than on the geometry and more on the theory than the practice. It is a mistake to concentrate wholly on the algebra because that loses sight of the geometrical application. It is equally a mistake to consider only vectors because they are too simple, by themselves being insufficient to represent the full geometry of two or higher dimensional spaces. Both the algebra and the vectors are necessary; however, singly or together, they provide an incomplete picture.

It is also a mistake to treat the algebra wholly as an abstraction. It is important to examine concrete examples. My own view is that application means nothing less than conception at an abstract level, design at a system level, calculation at a numerical level, and construction at a physical level of some actual apparatus intended to perform some useful function such as a microwave antenna to transmit and receive electromagnetic radiation for the purpose of communication.

For the committed beginner to the application of Clifford algebra, there are two obstacles to overcome. First, it is necessary to acquire a working knowledge of some of the abstract concepts (which I much prefer to call tools) in order to be able to formulate problems and their solutions. For anyone familiar with vector calculus, that serves as a good starting point.

Moving from vector calculus to Clifford algebra involves a paradigm shift in which problems in multiple dimensions are no longer treated as a system of partial differential equations in a multiplicity of single‐dimensional scalar variables, but rather as a single ordinary differential equation in a single multi‐dimensional, non‐scalar variable.

It is not necessary to become familiar with all of the tools. For classical electromagnetism, Grassmann's central (now Clifford) multiplication plays the leading role, with most of the other kinds of multiplication seldom or never used. Combining central multiplication with the Cauchy integral, reincarnated in multiple dimensions using Clifford algebra, provides new tools which are sufficient in many practical cases to serve as effective replacements to the vector calculus, the Helmholtz equation, and the Green's functions.

Second is the knotty obstacle of numerical calculation. This has to be convenient (or at least not too inconvenient), efficient enough to allow the solution of meaningful problems within acceptable time frames, and most importantly, written largely by someone else.

The work here attempts to provide a bridge spanning both of these obstacles. Equal importance is given to fundamental theory, practical (geometrical) application, and software implementation. These three components are presented in the forms of written text, some equations, many figures, and extensive examples of computer code and the corresponding output.

Software implementations are based on computer program source code (written in the ‘c’ computer programming language) invoking individual routines, specifically constructed to do all of the actual calculation, from a suite4 provided and distributed openly for that very purpose. When the user finds they need to do something not already provided, there is no significant obstacle to progress because the code is open for inspection, modification, and extension.

Chapters 1, 4, and 5 introduce the theory of Grassmann's multiplications and Clifford's algebra with a strong reliance on diagrams and pictograms to visually portray the various operations and instil a conceptual insight to the underlying mechanisms. Recourse to equations, which may well prove results but which can often fail to provide enlightenment, is avoided where possible.

Chapters 6–11 and 13 describe the mechanisms provided within the Clifford numerical suite (CNS) for representing different entities as Clifford numbers. These include vectors, quaternions, Pauli matrices, bicomplex numbers, electromagnetic fields, and arrays or matrices of any of those.

Chapters 12 and 18–25 present practical applications as examples showing how to implement numerical calculations for the various operations, on a variety of numerical data types. The applications progress from the simpler and perhaps somewhat contrived to the more advanced and realistic. The majority of the applications deal with problems having a geometrical nature or interpretation.

Chapter 12 demonstrates the evaluation of functions with a Clifford argument using power series expansions. Chapters 18 and 19 provide examples for finding the closest points on lines which may or may not intersect and the perspective projection of an object onto an oriented plane.

Chapters 13, 20, 21, and 25 deal with the solution of various linear systems of equations. Chapter 13 demonstrates the solution of linear systems in which the variables are bicomplex numbers using Gaussian elimination, whereas Chapter 25 does the same for variables which are extended electromagnetic fields. In Chapter 20, Grassmann's own method of elimination is used with scalars as variables. Grassmann's solution has a geometric interpretation as the ratio of hyper‐volumes rather than the usual concept as the intersection of hyper‐planes. Chapter 21 demonstrates a recursive implementation of the fast Fourier transform (FFT) for arbitrary Clifford numbers. The length of the transforms is limited to powers of 2.

Chapters 22–25 give examples involving electromagnetic fields. The simplest in Chapter 22 is the calculation of the electromagnetic field from a Hertzian dipole. More challenging in Chapter 23 is an implementation for the simulation of electromagnetic wave propagation using the finite difference time domain (FDTD) method. This is only in one dimension. The next application is in Chapter 24, where the Cauchy integral is used to extend the electromagnetic field measured on a closed surface to points away from the surface. This implementation is in three dimensions. Lastly, Chapter 25 demonstrates the effectiveness of solving electromagnetic scattering problems using Clifford numbers representing those fields as single whole entities rather than separated into scalar components.

In addition to the implementations themselves and the examples of the output they produce, the chapter for each application reviews the theory or equations on which they are based.

Extensive examples for the implementation of software are interspersed where appropriate amongst the other material. Chapters 2 and 3 cover mechanisms provided for the input and output of numbers. Chapters 14–17 provide details on memory usage, errors and how to recover from them, methods for extending the software by writing your own small fragments of code and coupling them into the existing framework, and on Clifford identities which can be used to check the consistency of some of the different operations.

Chapters 26 and 27 give details of every individual routine5 as a list organised by function, cross‐referenced to detailed descriptions in alphabetical order.

As a consequence of providing the suite in the form of source code, all calculations compile to native machine code, and there is no need for any slow interpretive mechanisms or conversion of data types at the time of execution. This leads to comparatively little administrative overhead so that most of the computational time is spent directly on the numerical calculations.

The suite is able to handle Clifford numbers of up to dimensions, storing only components which have non‐zero value to make efficient use of memory. Calculations with dimensions in the double digits with full Clifford numbers (all non‐zero components) can be slow, largely because there are many components which have to be multiplied in all combinations. For 31 dimensions that can be more than complex multiplications. In contrast, there is no such issue when numbers are sparse, as with vectors, or of low dimension, as with electromagnetic fields.

As a tool, the CNS is well suited to the rapid development and testing of algorithms which rely on Clifford algebra or the algebra of Grassmann's other multiplication operations. The rapidity is a consequence of removing from the developer the need to delve into the minuscule detail, freeing them to operate at a higher level, much closer to the phenomenon of immediate interest. As an example, the electromagnetic field is treated as a single entity (Clifford number) rather than as two parts each with three components.

This work serves as both a resource for developing an understanding of the theory and principles behind the solution of problems within Clifford algebra, as well as a source of examples and a reference guide for the practical implementation of solutions in numerical code.

 

March 17, 2023

Andrew Seagar

Gold Coast

Notes

1

The meaning of ‘extensive algebra’ is in the sense that the algebra supports the extension from any particular dimensional space to the next higher‐dimensional space.

2

For now, Clifford algebra does that for us.

3

Not dissimilar to the inverted ‘u’ symbol used earlier by Grassmann for the same purpose.

4

Referred to as the Clifford Numerical Suite, or CNS for short.

5

Over 300 routines.

Part IEntities and Operations

 

1Introduction

The purpose of the suite of routines described here, the Clifford numerical suite (CNS), is to provide a platform for the implementation of applications which require numerical evaluation of the various mathematical operations offered within the context of Clifford algebra. The routines are designed to allow the user to ignore most of the internal details of data structures and memory management if so desired.

The suite is constructed using the ‘c’ computer programming language (Kernighan & Ritchie 1978, King 2008) so that it can be embedded into, compiled with, and invoked directly from the user's code. This avoids the overheads of copying data associated with the call mechanisms involved in implementations underneath interpretive meta‐languages1 and consequently offers an overall higher speed of code execution. That in turn admits the possibility of solving problems which are more realistic and less trivial. The intention is to provide most users with a viable environment for the development of their own applications.

Providing the source code also allows the user to enhance and tailor it to best suit their own purposes. In cases where ultimate speed and memory efficiency is required, the suite can be used in the formative development phase, and substituted with the user's own hard‐coded replacements in the end application phase.

1.1 Operations

The basic mathematical operations which are supported by the CNS are listed in Table 1.1 and described with examples in Chapters 4 and 5. Higher level and geometric operations such as inversion, reflection, projection, and rotation of vectors and other entities are also supported, as described in Chapters 6–10. The set of application programmer interfaces (API's) for accessing the suite is described in Chapters 26 and 27.

Table 1.1 Basic unary and binary operations.

Case

Unary operation

Notation

Binary operation

Notation

General

Negation

Addition

Involution

Subtraction

Reversion

Outer product

Clifford conjugation

Inner product

Complex conjugation

Regressive product

Central product

Left interior product

Right interior product

Special

Hodge dual

Scalar product

(Star, supplement)

Interior derivative

1.2 History

In his books of 1844 and 1862, Grassmann (1995, 2000) introduces his anti‐commutative outer multiplication and unary supplement operation , using that pair to generate his commutative inner multiplication , as listed in the central column of Table 1.2. In later times, notation for the outer multiplication has changed to , the supplement operator has changed to the Hodge dual star operator , and the inner multiplication has changed notation to .

Table 1.2 Equivalence between notations.

Exterior algebra various

a)

Extension theory Grassmann

Geometric algebra Clifford

Wedge product

Outer product

Outer product

Hodge dual

Supplement

Hodge dual

Inner product (Pseudo‐scalar)

Inner product (Conflated)

Inner product (Grade 0)

a) Peano, Cartan, Hodge.

It is straightforward by simple substitution of notation to write three equivalent forms for Grassmann's inner multiplication . Some care is needed in interpreting these ‘equalities’ because the product of the scalar inner multiplication without the is a proper scalar, whereas the corresponding products of the other two inner multiplications as formulated are strictly pseudo‐scalars.

However, in defining his inner multiplication , Grassmann added an extra provision to ensure that the product is a scalar rather than a pseudo‐scalar. To do this, he conflated the unit pseudo‐scalar of dimension , where found within the result, with the unit scalar 12. In that case, the product of his inner multiplication is by definition a scalar. Grassmann could do this because he did not admit the unit scalar 1 within the basis of his algebra. However, that means his inner multiplication gives products outside his algebra.

The inner multiplication within Clifford algebra is defined3 without appealing to Hodge's star or Grassmann's supplement. The result is a scalar, not a pseudo‐scalar, so there is no need to introduce any special provisions. Since Clifford's algebra admits scalars with unit as part of the lowest grade of the algebra (grade 0) it is possible, by placing the product in grade 0, to keep the algebra closed under inner multiplication. As a consequence, the form of the inner multiplication in Clifford algebra adopted here shows the unit , explicitly, and the conventional scalar product  – with the factor absent – produces only the scalar coefficient of the Clifford inner product. The numerical values (coefficients) of all three inner products in Table 1.2 are the same. They just have different units attached: or 1 or .

Grassmann further generalised his outer multiplication in two complementary forms: progressive multiplication, operating with the outer multiplication on two factors as given; and regressive multiplication, operating with the outer multiplication on the supplements of the factors, and taking the inverse supplement of that result as the final product.

With Grassmann's definition, non‐zero components of the progressive and regressive multiplications never coincide. Using this property, Grassmann took the sum of the two to create a more general multiplication and dropped any formal distinction between progressive and regressive multiplications. Grassmann's progressive and regressive multiplications find application today within the context of computer graphics in the form of the join and meet operators.

1.3 Alternative Forms

The different unary and binary operations supported within Clifford algebra are not all independent. Table 1.3 lists each operation and gives where possible the formulæ needed to calculate it using other operations under the conditions listed in the leftmost column. The conditions refer to the sets and of units from which the numbers and are constructed. If the conditions are not met, the result of that particular operation is zero. See Section 5.3.2 for details.

Table 1.3 Conversion of operations between Clifford and other algebras.

Notation

Outer

Hodge

Regressive

Scalar

Clifford

Condition

Operation

None

Outer product

Any

Supplement

Any

Inverse of supplement

Regressive product

a)

Grade 0 inner product

Pseudo‐scalar inner product

Scalar inner product

Any

Central product

a) Grassmann imposed an additional condition which maintained closure of his regressive multiplication. Here, with support for scalars in grade 0, closure is maintained without the extra condition.

Most of the operations are calculated in a straightforward manner within the context of Clifford's algebra, using only Clifford (central) multiplication, reversion, and scalar division. The Hodge star operator and regressive product, difficult to calculate within some algebraic frameworks, are particularly easy to calculate within Clifford algebra as the central multiplication of either two or three simple factors. The product in both the grade 0 and pseudo‐scalar inner products can equally well be calculated4 as , , or , because under the constraint , only the products of those components in and which have the same units are taken into the result.

1.4 Naming

There is some ambiguity in the naming in English of Grassmann's first two kinds of multiplication operation. The concepts of ‘inner’ and ‘outer’ may be distinguished by two different distances in the same direction from a single reference point (called the centre), whereas ‘interior’ and ‘exterior’ may be distinguished by two equal distances in opposite directions from a single reference point (called the interface). Grassmann (1877) wrote in German innere (inner) and äußere (outer), and in French Grassmann (1855) wrote extérieur (exterior) and intérieur (interior). Here the alternatives used in Grassmann's native language are adopted. Following a suggestion by Sylvester, Clifford (1878) referred to Grassmann's inner and outer multiplications as ‘scalar’ and ‘polar’ noting the rationale that these terms describe the nature of the multiplications themselves under exchange of terms (commutative or anti‐commutative) rather than the geometrical circumstances to which they apply. Clifford's usage has not been adopted. Grassmann also changed ‘outer’ to ‘progressive’, but that didn't take hold either.

Grassmann used the term ‘product’ for the result of a variety of operations, with ‘multiplication’ being just one of the variety. The outer product is the result of the outer multiplication of two numbers. The sum is the product of the addition of two numbers. Rather than adhering strictly to Grassmann's usage of the term ‘multiplication’ for the operation and the term ‘product’ for the result, here ‘the xxx product …’ will often be used as a contraction for ‘the product of the xxx multiplication …’, because the latter is altogether too clumsy in many cases.

1.5 Structure

1.5.1 Algebraic

Clifford numbers are constructed as a sum of multiple linearly independent components, as shown in Table 1.4 (Seagar 2016). The components are formed by multiplying a numeric coefficient with a Clifford unit. A sum of different Clifford units has no algebraic simplification and thereby supports the linear independence.

Table 1.4 Examples of Clifford numbers.

Clifford units provide a mechanism to specify geometric entities of different types (such as points or scalars, lines or vectors, areas or bivectors, and volumes or trivectors) in any number of dimensions. Geometric entities of these different types are identified as being within different grades of the algebra: grade 0 for scalars, grade 1 for vectors, and so on.

Notationally5 Clifford units are written as the symbol ‘’ with a subscript which is either a non‐negative integer (such as 2), a lowercase letter (such as ) representing a non‐negative integer, an uppercase letter (such as ) representing a set of non‐negative integers, or the symbol ‘’ for the empty set.

The unit of grade 0, with the empty set as subscript, behaves much like the unit scalar ‘1’ and is often omitted. The unit of scalars was called the ‘absolute unit’ by Grassmann. Units of grade 1, with single integers as subscripts, are called primal units. They cannot be reduced by factorisation into non‐trivial products of other more elemental entities.

Units in grades higher than 1 can be constructed by multiplying together units in lower grades. These are called evolved units after Grassmann's abstract concept of evolution, through which higher‐ dimensional entities are constructed by extension from lower‐ dimensional entities. Grassmann's evolution is achieved using his outer multiplication for distinct vectors which are not orthogonal, or equally by central (Clifford) multiplication in the case of orthogonal vectors. The primal Clifford units are orthogonal6 so that the product of distinct primal units by central or outer multiplication yields the same evolved result.

1.5.2 Numeric

Within the CNS numbers are constructed, and the basic operations listed in Table 1.1 are carried numerically, using various data types and structures defined according to the ‘c’ computer programming language (King 2008). There are only two data types which need be of any concern, described briefly here and with greater detail in Chapter 27.

At the lowest level is the data type ‘cliff_comp’ for Clifford components, which use the structure shown in Example 1.1:

Example 1.1 

1: /* single component of Clifford number */

2: typedef struct{

3: bitmap unit; /* evolved unit */

4: double coef[2]; /* real and imaginary parts */

5: } cliff_comp;

to associate each complex numeric value with its own symbolic Clifford unit. The Clifford unit is stored as an unsigned integer with each bit representing one dimension. This limits the number of dimensions to the number of bits in the default integer data type for any particular compiler, often 32. A single full Clifford number of 32 dimensions would require sufficient memory to contain complex numbers (more than 64 G bytes).

At the highest level is the data type ‘number’ for Clifford numbers, which uses a type definition to provide a special name to the signed integer data type, as shown in Example 1.2:

Example 1.2 

1: /* token for a Clifford number */

2: typedef int number;

Clifford numbers are constructed in the form of a tree from a pair of singly linked lists; one list for the branching internal skeletal structure of the tree and one list for the leaves at the extremities of the structure, where the actual data values reside. The numbers are referenced using the data type ‘number’, which is effectively an index to the location of the root of the tree in one or other of the linked lists. Management of the tree structure and linked lists is handled internally and is of little concern.

The tree structure is sparse so that a Clifford number of 32 dimensions does not need 64 G bytes of memory unless every component is non‐zero. For example, a Clifford vector of 32 dimensions would require sufficient memory to contain only 32 complex numbers. If some of the vectorial components are zero, it requires even less than that.

Clifford numbers which are no longer required may be recycled. This returns the memory allocated to their tree back to the linked lists so that it may be used to construct other numbers. Memory structure and management are described in detail in Chapter 14.

For many purposes, it is only necessary to deal with the data type ‘number’. For more sophisticated effects, it may be necessary to operate directly on the data type ‘cliff_comp’. For example, extension of the source code to incorporate custom‐built functions is possible by writing sub‐routines which operate numerically on one or two Clifford components using arguments consisting of pointers to the data type ‘cliff_comp’ and returning the result as the same data type. See Chapter 16 for details.

The code shown in Example 1.3a gives a minimal example of constructing a Clifford number and managing the associated memory. Line 4 declares a Clifford number ‘u’. Line 6 establishes a trap handler for errors which prints some diagnostic information then cleanly terminates the code when errors are detected. Details on errors and more sophisticated usages of trap handlers are covered in Chapter 15.

Line 7 pre‐allocates, from the ‘c’ program's operating environment to the internal linked lists, enough memory to contain 50 components. It doesn't matter too much if the amount allocated is insufficient, because memory expands automatically if required. However, when that occurs, the automatic expansion does temporarily pause the execution of code while data are copied from one range of memory addresses to another.

Example 1.3(a)

1: void demo0() /* minimal */

2: {

3: int lambda[3];

4: number u;

5:

6: recovery_level(0,0,0); /* abort on all errors */

7: create_cliffmem(50);

8: declare_primal(3,pack_signature(3,lambda,-1));

9: print_signature();

10:

11: u=scalar_number(1.0,2.0);

12: print_number(u,8);

13: recycle_number(u);

14:

15: free_cliffmem(1);

16: }

Line 8 establishes the Clifford context for numerical operations as being three‐dimensional with negative signature for all three dimensions. If a mixed signature is required, that can be written into the array ‘lambda[3]’ manually rather than invoking the sub‐routine pack_signature() to put three equal values in place.

Line 11 assigns memory, initialised to the (scalar) complex value , from the linked lists to the Clifford number. At this stage, there is one component used and 49 components free. Line 12 prints the number and line 13 returns the memory assigned to the number ‘u’, back to the linked lists for use in other Clifford numbers. As a consequence, there are once again 50 components free. Line 15 de‐allocates all 50 components from the linked lists, returning the ownership of the memory back to the ‘c’ program's operating environment, and prints some information showing how much memory has been used and how much is currently in use. If the value zero rather than one is passed as the argument to the sub‐routine free_cliffmem() on line 15, then the information is not printed. Printing the information can be useful in order to determine how to adjust the amount of memory allocated on line 7 so that the automatic expansion of memory is avoided. That improves the speed of execution.

Detailed descriptions of the functionality of all the sub‐routines invoked in Example 1.3a are provided in Chapters 26 and 27.

The results produced by executing the code in Example 1.3a are shown in Example 1.3b. As a check, the signature associated with the numerical context is printed in line 2. The number of dimensions is determined by counting the number of values.

Example 1.3(b)

1: demo0()

2: [-1,-1,-1]

3: (1.00000e+00+i2.00000e+00)e{}

4: statistics for structural heap:

5: initial size (50)

6: peak size (0), as % of initial size (0%)

7: full size (50), expansion count (0)

8: free count (50), free start (0)

9: statistics for data heap:

10: initial size (50)

11: peak size (1), as % of initial size (2%)

12: full size (50), expansion count (0)

13: free count (50), free start (0)

The value of the Clifford number is printed in default format on line 3. In this case, it is simply a complex value, contained in the parentheses, post‐multiplied by a Clifford unit. The Clifford unit is represented by the letter ‘e’ followed by a set in braces {…}. In this case, the Clifford number is a scalar so the set is the empty set, and the braces are empty. For non‐scalar numbers, the braces contain integer values.

Memory usage information is printed on lines 4–8 for the skeletal structure of the tree, and lines 9–13 for the data values themselves. In this case, the 50 components allocated are established as two lists of 50 structures, one for the tree's skeletal structure (branches) and one for the data values (leaves). The trees for Clifford numbers usually require about the same number of each. Since the initial allocation here greatly exceeded the eventual usage, there was no need to ex