text:
Distributions of Topological Observables in Inclusive Three- and Four-Jet Events in pp Collisions at sqrt(s) = 7 TeV

The collaboration
Eur.Phys.J.C 75 (2015) 302, 2015.

Abstract (data abstract)
CERN-LHC. This paper presents distributions of topological observables in inclusive three- and four-jet events produced in pp collisions at a centre-of-mass energy of 7 TeV with a data sample collected by the CMS experiment corresponding to a luminosity of 5.1 inverse femtobarns. The distributions are corrected for detector effects, and compared with several event generators based on two- and multi-parton matrix elements at leading order. Among the considered calculations, MADGRAPH interfaced with PYTHIA6 displays the best overall agreement with data.

• #### Table 1

Data from Figure 5 (a)

10.17182/hepdata.75115.v1/t1

CORRECTED NORMALIZED DISTRIBUTION OF THREE-JET MASS IN THE INCLUSIVE THREE-JET SAMPLE.

• #### Table 2

Data from Figure 6 (a)

10.17182/hepdata.75115.v1/t2

CORRECTED NORMALIZED DISTRIBUTION OF SCALED ENERGY OF THE LEADING-JET IN THE INCLUSIVE THREE-JET SAMPLE.

• #### Table 3

Data from Figure 7 (a)

10.17182/hepdata.75115.v1/t3

CORRECTED NORMALIZED DISTRIBUTION OF SCALED ENERGY OF THE SECOND-LEADING-JET IN THE INCLUSIVE THREE-JET SAMPLE.

• #### Table 4

Data from Figure 8 (a)

10.17182/hepdata.75115.v1/t4

CORRECTED NORMALIZED DISTRIBUTION OF FOUR-JET MASS IN THE INCLUSIVE FOUR-JET SAMPLE.

• #### Table 5

Data from Figure 9 (a)

10.17182/hepdata.75115.v1/t5

CORRECTED NORMALIZED DISTRIBUTION OF THE BENGTSSON-ZERWAS ANGLE IN THE INCLUSIVE FOUR-JET SAMPLE.

• #### Table 6

Data from Figure 10 (a)

10.17182/hepdata.75115.v1/t6

CORRECTED NORMALIZED DISTRIBUTION OF THE COSINE OF THE NACHTMANN-REITER ANGLE IN THE INCLUSIVE FOUR-JET SAMPLE.

• #### Table 7

Data from Figure 5 (b)

10.17182/hepdata.75115.v1/t7

DISTRIBUTION OF THE THREE-JET MASS UNFOLDED FROM DETECTOR EFFECTS.

• #### Table 8

Data from Figure 6 (b)

10.17182/hepdata.75115.v1/t8

CORRECTED NORMALIZED DISTRIBUTION OF SCALED ENERGY OF THE LEADING-JET IN THE INCLUSIVE THREE-JET SAMPLE.

• #### Table 9

Data from Figure 7 (b)

10.17182/hepdata.75115.v1/t9

CORRECTED NORMALIZED DISTRIBUTION OF SCALED ENERGY OF THE SECOND-LEADING-JET IN THE INCLUSIVE THREE-JET SAMPLE.

• #### Table 10

Data from Figure 8 (b)

10.17182/hepdata.75115.v1/t10

CORRECTED NORMALIZED DISTRIBUTION OF FOUR-JET MASS IN THE INCLUSIVE FOUR-JET SAMPLE.

• #### Table 11

Data from Figure 9 (b)

10.17182/hepdata.75115.v1/t11

CORRECTED NORMALIZED DISTRIBUTION OF THE BENGTSSON-ZERWAS ANGLE IN THE INCLUSIVE FOUR-JET SAMPLE.

• #### Table 12

Data from Figure 10 (b)

10.17182/hepdata.75115.v1/t12

CORRECTED NORMALIZED DISTRIBUTION OF THE COSINE OF THE NACHTMANN-REITER ANGLE IN THE INCLUSIVE FOUR-JET SAMPLE.


text:
# How do you write an equation in point slope form given slope 5, (-2, 8)?

May 19, 2017

See a solution process below:

#### Explanation:

The point-slope formula states: $\left(y - \textcolor{red}{{y}_{1}}\right) = \textcolor{b l u e}{m} \left(x - \textcolor{red}{{x}_{1}}\right)$

Where $\textcolor{b l u e}{m}$ is the slope and $\textcolor{red}{\left(\left({x}_{1} , {y}_{1}\right)\right)}$ is a point the line passes through.

Substituting the slope and values from the point from the problem gives:

$\left(y - \textcolor{red}{8}\right) = \textcolor{b l u e}{5} \left(x - \textcolor{red}{- 2}\right)$

$\left(y - \textcolor{red}{8}\right) = \textcolor{b l u e}{5} \left(x + \textcolor{red}{2}\right)$

format: plain


text:
Algebra Level 4

The quadratic equation $$p(x)=0$$ with real coefficients has purely imaginary roots. Then the equation

$p\big(p(x)\big)=0$

has $$\text{__________}.$$

×


text:
# Dymo LabelWriter Print Server User Manual

2.67 Mb

®

Print Server

User Guide

No part of this document or the software may be reproduced or transmitted in any form or by any means or translated into another language without the prior written consent of Sanford, L.P.

DYMO and LabelWriter are registered trademarks of Sanford, L.P. All other trademarks are the property of their respective holders.

Contents

About the LabelWriter Print Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Print Server Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Using this Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Installing the LabelWriter Print Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Connecting the Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Installing the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Installing the Software in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Installing the Software in Mac OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Configuring the Print Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

 Adding a Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Adding a Printer in Windows XP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Adding a Printer in Windows Vista . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Adding a Printer in Mac OS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Adding a Printer in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Printing a Test Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Managing the LabelWriter Print Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

About the Control Center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

About the Print Server Web Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Viewing the Print Server Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Configuring the Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Changing the Server Name and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Changing the TCP/IP Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Changing the Administrator Name and Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Upgrading the Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Status Lights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Restoring the Print Server to the Factory Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Limited Warranty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Obtaining Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

iii

Technical and Certification Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Technical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Device Certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Declaration of Conformity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Documentation Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

iv

Chapter 1

## About the LabelWriter Print Server

Congratulations on purchasing a DYMO LabelWriter print server. Your print server will give you years of reliable service. We encourage you to take a few minutes to review how to use and care for your print server.

Using the print server, you can connect your LabelWriter 400 or later series printer directly to your network, without dedicating a computer to printer sharing. Now everyone connected to your network can print to a single LabelWriter printer. We have no doubt that the LabelWriter print server will make your job easier and more efficient.

### Print Server Features

Your LabelWriter print server can be used to share any LabelWriter 400 or later series printer, including the LabelWriter Twin Turbo and LabelWriter Duo.

The print server connects to your network using a standard Ethernet connection. Become familiar with the major components of the print server.

 Init. LAN USB Ethernet Power Init/Reset USB connector button connector (to network) connector (to printer)

Status lights

The status lights visually show the current state of the print server. See "Status Lights" on page 25 for a description of the status lights.

1

### System Requirements

The print server requires a standard Ethernet connection and one of the following:

Windows® XP 32-bit

Windows Vista® 32 or 64-bit

Windows® 7

Mac OS® X v10.4 or later (LabelWriter Duo requires Mac OS X v10.5 or later)

Linux (Linux is not officially supported. See "Adding a Printer in Linux" on page 16 for more information)

### Using this Guide

This User Guide provides instructions for the DYMO LabelWriter print server on the Windows, Macintosh, and Linux platforms. For the most part, the software operates in the same way on all platforms. Any differences in features, procedures, or commands are noted within the text.

This User Guide includes information for installing and using the print server with a DYMO LabelWriter printer. Depending on the model of DYMO printer you are using, some sections of this User Guide may not apply to you. The following table provides a summary of the contents.

 User Guide Chapter Description
 About the LabelWriter This chapter gives an overview of the print server. Print Server Installing the This chapter describes how to install and configure the print server, install LabelWriter Print the Print Server Control Center software, and add a LabelWriter printer to Server your computer. Managing the This chapter includes information about the Print Server Control Center LabelWriter Print software. This includes information on changing the server configuration and Server upgrading the firmware. This chapter offers suggestions for resolving problems that can occur when Getting Help using the print server. If you are unable to solve a problem, this chapter also describes how to contact DYMO Technical Support. Technical and This chapter contains technical and certification information for the print server. Certification Information

2

Chapter 2

## Installing the LabelWriter Print Server

This chapter describes how to install and configure the print server.

To install the print server

1Make sure that you have everything you need to get started.

2Connect the cables.

3Install the LabelWriter Control Center software.

4Configure the print server.

See Chapter 3, Adding a Printer for instructions on adding a printer on your specific operating system.

### Getting Started

Once you have unpacked your print server, make sure that you have all of the items shown here.

CD-ROM

LabelWriter Print Server

In addition to the items that come with the print server, you will need the following:

A LabelWriter 400 or later series printer, with power adapter and USB cable

Installed LabelWriter printer drivers (included in the DYMO Label Software installation)

A standard Ethernet cable (available from your local office supply and other retailers)

A working Ethernet connection to your Local Area Network

3

Installing the LabelWriter Print Server

### Connecting the Cables

The print server connects directly to your network using a standard Ethernet connection.

To connect the cables

1Plug the Ethernet cable into the right side of the print server.

2Plug the other end of the Ethernet cable into an available Ethernet connection on your network.

3Plug the USB cable from your LabelWriter printer into the right side of the print server.

Make sure that the USB cable is connected to your printer and that your printer is plugged in.

4Plug the print server power

adapter into the left side of the print server.

5 Plug the other end of the power adapter into a power outlet.

### Installing the Software

The Control Center software included with your print server gives you quick access to everything that you need to configure and manage your print server. You can install the software on any computer that is connected to your network.

#### Installing the Software in Windows

You can install the Control Center software in Windows.

To install the software in Windows

1Insert the LabelWriter Print Server CD into your CD-ROM drive. After a few seconds, the installation screen appears.

If the installation screen does not appear:

a.Click Start, then Run on the Windows taskbar. The Run dialog box appears.

b.Enter D:\install.exe (where D is the letter assigned to the CD-ROM drive) and click OK.

2Click Install Application and follow the instructions in the installer.

3On the final page of the installer, make sure that the Launch LabelWriter Print Server Control Center check box is selected, and then click Finish.

The LabelWriter Control Center starts.

4

### Configuring the Print Server

#### Installing the Software in Mac OS

To install the software in Mac OS

1Insert the LabelWriter Print Server CD into your CD-ROM drive. The CD icon appears on your desktop.

2Double-click the CD icon, and then double-click the Mac folder.

3Double-click Dymo LabelWriter Print Server Control Center.dmg. The DYMO LabelWriter Print Server folder opens.

4Drag the DYMO LabelWriter Print Server Control Center icon into the Applications folder on your computer.

5Double-click DYMO LabelWriter Print Server Control Center in the Applications folder to open the Print Server Control Center.

Configuring the Print Server

When you first install the print server, the server is automatically assigned an IP address. Every time the software is launched, the IP address is displayed next to the server name in the Control Center window.

By default, the server is configured to automatically get an IP address. If you are using the print server on a small office or home network, we recommend that you configure the server to use a static IP address. This will ensure that the computers connected to your network will always be able to locate the print server.

By default, the static IP address for the print server is 192.168.1.100. You only need to change the last three numbers. When assigning a static IP address, check your router to be sure that the IP address you choose is not already in use. Refer to your router documentation for information on how to do this. A good practice when adding a print server or other shared network device to a network is to start with a number toward the top of the range, for example 192.168.1.250, and work down from there.

Note If you do not set a static IP address, write down the IP address that appears next to the server name in the Control Center window. You will need this IP address to add the printer to your computer.

5

Installing the LabelWriter Print Server

To set a static IP address

1If the Control Center is not already open, double-click on your desktop (Windows) or in the Applications folder (Mac OS).

2Click Configure Server on the Control Center toolbar. The Login to LW Print Server dialog box appears.

Note These are the default settings. See "Changing the Administrator Name and Password" on page 22 for information on how to change the administrator name and password.

The Set TCP/IP Configuration dialog box appears.

5Select Static IP.

6Enter the IP address you want to use in the IP Address field, and then click Apply.

7Click Yes when prompted to save the TCP/IP configuration

8After the server restarts, click Close to close the TCP/IP Configuration dialog box. The IP address is now displayed next to the server name in the Control Center window.

6

Chapter 3

In order to print to the LabelWriter printer that is connected to the print server, you must first add the printer to your computer. You can add the printer to any or all of the computers connected to your network.

You must have the LabelWriter printer drivers installed on your local computer to add a printer. The printer drivers are included in the DYMO Label Software installation.

Note Because the LabelWriter Duo printer is actually two printers in one, you need to add both the label printer and the tape printer to your computer. These two printers show up separately in the printer list.

This chapter describes how to add a printer in Windows XP, Windows Vista, Mac, and Linux.

### Adding a Printer in Windows XP

This section describes how to add a LabelWriter printer in Windows XP.

When adding a LabelWriter Duo printer, you will need to create separate ports for the Label printer and the Tape printer. Each port must have a unique name.

1Click Start, and then click Printers and Faxes.


text:
Generate prediction of a component bayes factor

Description

This does not include the log prior odds, so will be off by a constant

Usage

predictBF(BF, x, log = TRUE)

Arguments

 BF bayes factor data.frame from getBF x vector of new predictor values log (logical) if TRUE, return the log bayes factor estimate

Value

estimated (log) bayes factor from a single predictor

Examples

# See vignette: "Statistical Methods for Crime Series Linkage" for usage.


text:
# Calculate the acceleration

1. Oct 15, 2004

### tman

A rock tied to a string is swung around in a circle at a constant speed of 25 ft/sec. The length of the string is 1.765 ft. Calculate the acceleration. (Round to nearest whole number.)

acceleration = ________ft/sec2

2. Oct 15, 2004

### NateTG

You know, there is a homework help forum. You might post questions of that nature there.

That said, centripetal acceleration is equal to $$\frac{v^2}{r}$$.


text:
## Basic College Mathematics (9th Edition)

His age is $30$ years old while his sister's age is $21$ years old.
1. Finding the person's age Let $x =$ the person's age (person's age) + (sister's age) $= 51$ $(x) + (x - 9) = 51$ $2x - 9 = 51$ $2x = 60$ $x = \frac{60}{2}$ $x = 30$ years old 2. Finding his sister's age Let $S =$ his sister's age $S = x - 9$ $S = 30 - 9$ $S = 21$ years old


text:
# Method of images: two conducting planes

Required math: calculus

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Sec 3.2, Problem 3.10.

Another example of the method of images is the problem of a point charge ${+q}$ located at point ${\left(x,y\right)=\left(a,b\right)}$ in the first quadrant (at ${z=0}$), between two conducting planes that cover the ${xz}$ and ${yz}$ planes, thus these two conducting planes meet at right angles.

Following the procedure for the simpler problem of an image charge next to a single conducting plane, we can first place images of ${-q}$ at locations ${\left(x,y\right)=\left(-a,b\right)}$ and ${\left(a,-b\right)}$. If we stopped there, the potential would be

$\displaystyle V=\frac{q}{4\pi\epsilon_{0}}\left[\frac{1}{\sqrt{\left(x-a\right)^{2}+\left(y-b\right)^{2}+z^{2}}}-\frac{1}{\sqrt{\left(x+a\right)^{2}+\left(y-b\right)^{2}+z^{2}}}-\frac{1}{\sqrt{\left(x-a\right)^{2}+\left(y+b\right)^{2}+z^{2}}}\right] \ \ \ \ \ (1)$

This clearly isn’t zero on either of the conducting planes, so we need to add another image. If we try an image of ${+q}$ at ${\left(x,y\right)=\left(-a,-b\right)}$ then the potential is

$\displaystyle V=\frac{q}{4\pi\epsilon_{0}}\left[\frac{1}{\sqrt{\left(x-a\right)^{2}+\left(y-b\right)^{2}+z^{2}}}-\frac{1}{\sqrt{\left(x+a\right)^{2}+\left(y-b\right)^{2}+z^{2}}}-\frac{1}{\sqrt{\left(x-a\right)^{2}+\left(y+b\right)^{2}+z^{2}}}+\frac{1}{\sqrt{\left(x+a\right)^{2}+\left(y+b\right)^{2}+z^{2}}}\right] \ \ \ \ \ (2)$

Now ${V=0}$ on both the planes ${x=0}$ and ${y=0}$ as can be seen by direct substitution.

The force on the original charge can be found from the force from the 3 images:

$\displaystyle \mathbf{F}=\frac{q^{2}}{4\pi\epsilon_{0}}\left(-\frac{1}{4a^{2}}\hat{\mathbf{x}}-\frac{1}{4b^{2}}\hat{\mathbf{y}}+\frac{1}{4\left(a^{2}+b^{2}\right)^{3/2}}\left(a\hat{\mathbf{x}}+b\hat{\mathbf{y}}\right)\right) \ \ \ \ \ (3)$

The third term is the force between the actual charge and the image at ${\left(x,y\right)=\left(-a,-b\right)}$. The magnitude of this force is ${q^{2}/\left[4\pi\epsilon_{0}\left(4a^{2}+4b^{2}\right)\right]}$ and we’ve resolved this along the two coordinate axes.

The work required to bring in ${q}$ from infinity can be found from the general formula for work applied to the images:

$\displaystyle W=\frac{1}{2}\sum_{i=1}^{n}q_{i}V(\mathbf{r}_{i}) \ \ \ \ \ (4)$

where ${V\left(\mathbf{r}_{i}\right)}$ is the potential due to all the charges in the collection except ${q_{i}}$. However, this work assumes that we’re looking at all space, whereas the conducting planes cut the space under consideration down to a quarter of all space, so we need to divide the result by 4.

Plugging in the values we get

 $\displaystyle V(a,b)$ $\displaystyle =$ $\displaystyle \frac{q}{4\pi\epsilon_{0}}\left[-\frac{1}{2a}-\frac{1}{2b}+\frac{1}{2\sqrt{a^{2}+b^{2}}}\right]\ \ \ \ \ (5)$ $\displaystyle V\left(-a,b\right)$ $\displaystyle =$ $\displaystyle \frac{q}{4\pi\epsilon_{0}}\left[\frac{1}{2a}+\frac{1}{2b}-\frac{1}{2\sqrt{a^{2}+b^{2}}}\right]\ \ \ \ \ (6)$ $\displaystyle V\left(-a,-b\right)$ $\displaystyle =$ $\displaystyle \frac{q}{4\pi\epsilon_{0}}\left[-\frac{1}{2a}-\frac{1}{2b}+\frac{1}{2\sqrt{a^{2}+b^{2}}}\right]\ \ \ \ \ (7)$ $\displaystyle V\left(a,-b\right)$ $\displaystyle =$ $\displaystyle \frac{q}{4\pi\epsilon_{0}}\left[\frac{1}{2a}+\frac{1}{2b}-\frac{1}{2\sqrt{a^{2}+b^{2}}}\right] \ \ \ \ \ (8)$

Thus

 $\displaystyle W$ $\displaystyle =$ $\displaystyle \frac{1}{4}\frac{1}{2}\frac{q^{2}}{4\pi\epsilon_{0}}4\left[-\frac{1}{2a}-\frac{1}{2b}+\frac{1}{2\sqrt{a^{2}+b^{2}}}\right]\ \ \ \ \ (9)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{q^{2}}{8\pi\epsilon_{0}}\left[-\frac{1}{2a}-\frac{1}{2b}+\frac{1}{2\sqrt{a^{2}+b^{2}}}\right] \ \ \ \ \ (10)$

This technique can actually be applied to a configuration where we have two conducting planes meeting at other angles. Since the image charges have to cancel in pairs, we can derive a formula for the case where we can divide up space into an even number ${n}$ of sectors. We’ve just seen how it works for ${n=4}$, but for general even ${n}$ the argument would go like this.

Suppose the sector bounded by the planes has one plane at ${y=0}$ (that is, the ${xz}$ plane) and the other at an angle of ${2\pi/n}$. Let’s place the test charge at a location ${\left(x,y\right)=d\left(\cos\alpha,\sin\alpha\right)}$ where ${\alpha}$ is the angle the radius vector to the charge makes with the plane ${y=0}$ and ${d}$ is the distance of the charge from the origin. We can then place the first image by drawing a line from the charge perpendicular to the plane at angle ${2\pi/n}$ and extending it an equal distance on the other side. This image will have charge ${-q}$ and be at an angle of ${2\times\frac{2\pi}{n}-\alpha=\frac{4\pi}{n}-\alpha}$. The next image is found by drawing a line from the first image perpendicular to the plane at angle ${4\pi/n}$ and extending it an equal distance on the other side. This charge is ${+q}$ and is at angle ${\frac{4\pi}{n}+\alpha}$. We continue in this fashion until we arrive at a charge of ${-q}$ at angle ${2\pi-\alpha}$, which is the image of the original charge in the ${y=0}$ plane. This will give a total of ${n}$ charges (one is the test charge and the other ${n-1}$ are the images). The potential is then

 $\displaystyle \frac{4\pi\epsilon_{0}}{q}V$ $\displaystyle =$ $\displaystyle \sum_{m=0}^{\frac{n}{2}-1}\frac{1}{\sqrt{\left(x-d\cos\left(\frac{4\pi m}{n}+\alpha\right)\right)^{2}+\left(y-d\sin\left(\frac{4\pi m}{n}+\alpha\right)\right)^{2}+z^{2}}}-\ \ \ \ \ (11)$ $\displaystyle$ $\displaystyle$ $\displaystyle \sum_{m=1}^{\frac{n}{2}}\frac{1}{\sqrt{\left(x-d\cos\left(\frac{4\pi m}{n}-\alpha\right)\right)^{2}+\left(y-d\sin\left(\frac{4\pi m}{n}-\alpha\right)\right)^{2}+z^{2}}} \ \ \ \ \ (12)$


text:
# What makes Common Lisp so great a language?

I’ve recently come to a somewhat real use of Common Lisp for a project I work on. I’ve always been attracted to somewhat esoterical and not-so-commonly-used languages, because they have always given me insights on programming that are so hard to realize anywhere else.

You don’t usually understand functional programming until you are forced out of side effects, and you may not fully comprehend side effects until you meet Haskell’s Monads, or the importance of referencial transparency until you write a functional language compiler.

With Common Lisp, it’s all about homoiconicity (from Greek: homo=same + icon=representation). Briefly, this refers to the fact that in lisp dialects code is first-order.

Well, in Common Lisp there are so many first order things, but let’s start with code.

# Homoiconicity

As said before, code and data homoiconicity refer to the property that they are represented the same. Both are represented in a syntax called Symbolic expressions (S-expressions or sexps for short). Sexps are very simple pieces of syntax: they are either symbols, or they are lists.

• symbol
• (sub-sexp1 sub-sexp2 …)

So, the symbolic expression:

Is the list of three elements, which are the symbols floor, 5 and 2. That is data. But that data is also code.

## Data as code

If we evaluate that previous expression, it returns two values (because, yes, Common Lisp can return multiple values, and that is not the same as returning tuples), the first one being the division 5/2 and the second one being the remainder.

That list can be generated from the following code:

That function, list, builds a list with the rest of the elements. As CL is a call-by-value language, the quote in floor will avoid it being evaluated as a variable.

However, entering the first value directly on the REPL (how the interactive loop is called) will compute 5/2, so it is fundamentally code.

But lisp data can be turned into lisp code easily, via eval.

Not only that, lisp code can be manipulated as if it were lisp data, by using macros.

Macros in lisp have nothing to do with C macros.

## Code as data

That’s the other part of the equation. Fortunately, it is a quite symmetric relationship: code can be manipulated as if it were a regular sexp.

How so? Well, in Common Lisp, when a file is loaded into the evaluator, three stages happen:
The file is read into s-expressions, and several intricate things may happen, due to something called reader-macros
compile
The read expressions are macroexpand-ed and compiled into a bytecode or object code for later evaluation
evaluation
The compiled expressions are evaluated

In the first stage, the environment makes sense of the input stream data (e.g., characters) as s-expressions, so here we can influence the lexer (i.e., the reader algorithm) in order to extend our syntax beyond s-expressions.

But it is the second stage the one that allows code to be manipulated as data. As we already have read the file, we now have s-expressions representing our code which are in their way to being compiled.

Thus, macros in lisp can be semantic macros, and not just lexical macros, e.g., the textual substitutions that happen with the C Preprocessor and similar.

Besides, the Common Lisp compiler is first-order itself, which means that during compilation, the full Common Lisp runtime is accessible. That means that regular functions can be called inside macros, therefore a macro is a compile-time run function operating on your program’s AST, and which should return another AST for compilation. Effectively, by using macros in Common Lisp, you are writing programs that write other programs at compile time.

This macro mechanism is so flexible and extensible that the language continuously encourages you to write your own mini-DSLsDomain-Specific Language for every problem. Because it is so easy and straightforward.

## The meta level

The project I’m using Common Lisp with at the time involves writing some code that can mean two different things, depending on how the code is reached. As I can introduce definitions for a DSL on-demand, I can give different semantics to my data by directly writing macros for each case, instead of me manually interpreting the code. That is, instead of writing my own two interpreters for the code, I leverage the existing Common Lisp EVAL function, and I just introduce the needed definitions into the EVAL environment in each case.

# Why is Lisp still useful when we have X?

Well, consider the language features of your recent X.

Let’s consider if it is up to par with a language designed in the late 1950s.

• Does it have a function type? (i.e., functions as first-class objects)
• recursion? (how about tail-call optimization?)
• garbage collection?
• programs composed of expressions? (i.e., no distinction with statements?)
• a symbol type? (symbols are not strings, and can be tested for equality by comparing pointers)
• a notation for code using trees for symbols?
• the whole language always available? (at read-time/compile-time/eval-time?)
• a multiple-inheritance multiple-dispatch class-based object oriented mechanism? (Common Lisp has the CLOS, or Common Lisp Object System)
• A MetaObject Protocol (MOP)?
• First-order continuations?
• Non-local exits?
• Constructors and destructors?
• dynamic variables?

I’m going to leave this post here, but if you have some time and curiosity, give Common Lisp a look. I have yet to encounter a more expressive language.


text:
# How explain this perturbing equation about the 43 arcseconds?

The planetary orbits have been studied as ellipses but the solar system is in motion in relation to the distant stars. Their path is along the tip of an helix and the ecliptic plane is a convenient plane of projection. I think that the studies were never conducted under this viewpoint.

The sunlight we see now was emitted more than 8 minutes ago when the Sun was ‘below’ the ecliptic but we see it centered in the plane. I wonder why we do not see any consequence of this.

I’m following a line of reasoning that the motion can have consequences and I revisited the anomalous precession of the perihelion of Mercury, settled long time ago by Einstein, and I found this perturbing equation:

$$\frac{43}{5557} = 2\pi\frac{369.2\ \text{km}\ \text{s}^{−1}}{299792.458\ \text{km}\ \text{s}^{−1}}$$

Where 5557 is the predicted theoretical value (in mathpages) for the advance and the 43 is the anomaly.

The simplicity of the formula $$\text{error}/\text{theoric}=2\pi\ V/c$$ and because $V$ is 0.054% off the central measured value of the speed of solar system - $369(\pm0.9$) - makes me wonder if this can be more than a coincidence.

Any kind of reasoning on the why's will be helpful.

The 5557 for the expected precession of Mercury includes 5025 arising from Earth's precession. As I understand it, the true expected (excluding GR) precession of Mercury, ie relative to the fixed stars, is 532. I think that would be a better denominator in your formula.

Also if you applied your approach to Venus, it would give a GR effect similar to that for Mercury, which does not agree with observation.

• As implyed in my own answer (I'm hoping that my reasoning is clearly stated) the effect is due to an error in the measure procedure, thus the total observer-object value is the one that must be considered, imo. The true gravitational distance to Mercury is larger than the one attributed along the ecliptic. The net effect of GR gives an equivalent larger effective radius. May 25 '14 at 10:20

IMO, the relation may be justified by the way we make measures, a la Einstein: a mean value of a two-way ligth ray path procedure, that is not used in any natural process. This is a human invention.

To illustrate the error in our measures of distance I will make clear the distinction between ‘gravitational distance’ and the ‘Einstein measure’ with the Earth-Moon system with the help of this image .

At the space position $E_0$, and time $t_0$, a laser light is emitted, that propagates with spherical waves in the medium at $c_0$ speed. It is reflected at $M_1$ (Moon’s position at time $t_1$) and, because the Earth is in motion, is received back at position $E_2$ and time $t_2$.
The solar system, hence the Earth and the Moon, is in motion in the direction $\overline{E_0 E_2}$ . The Einstein distance measure is a mean value $d_E= c\cdot (t_2-t_0)/2$ and it reports the same distance when the Moon is located at any point in the red curve at moment $t_1$ (a notable property of ellipses).
At the moment of reception the Moon is at the gravitational distance $r= \overline{E_2 M_1}$ and this is the value that must be used in the inverse square law. The factor of conversion between the Einstein measure $d_E$ and the effective gravitational distance $d_g$ is dependent on the angle of the light ray at reception $\theta$ and obeys the relation $\frac{1-e^2}{1-e\cos\theta}$ where $e$ is the eccentricity. $d_E$ is equal to $d_g$ only for $e=0$, i.e. $V=0$ . This error in the distance measure, or light speed, must have consequences.
I'm not taking in account the light aberration nor the clock rate correction.
Measuring correctly distances is fulcral in energy balance, orbit determination (flyby/pioneers).

Can it be the case that we have bad distances or bad speed of light measures?

! downvote iznogud without a critique, or post an answer !


text:
Topology

# Welcome to Mathematics

## Commutative Algebra and Algebraic Geometry

You are here : Home Topology
 Contenus

 Topology and Algebraic Topology
Topology

Topology (from the Greek TOPO , "place", and LOGY, "study") is the mathematical study of shapes and spaces. It is a major area of mathematics concerned with the most basic properties of space, such as connectedness, continuity and boundary. It is the study of properties that are preserved under continuous deformations including stretching and bending, but not tearing or gluing. The exact mathematical definition is given below. Topology developed as a field of study out of geometry and set theory, through analysis of such concepts as space, dimension, and transformation.

Ideas that are now classified as topological were expressed as early as 1736. Toward the end of the 19th century, a distinct discipline developed, referred to in Latin as the geometric situs ("geometry of place") or analysis situs (Greek-Latin for "picking apart of place"). This later acquired the name topology. By the middle of the 20th century, topology had become an important area of study within mathematics.

Definition: Let $X$ be a set, and $\tau$ be a family of subsets of $X$ (i.e $\tau\subseteq \mathcal{P}(X)$ ). Then $\tau$ is called a topology of $X$ if
• Both the empty set and $X$ are elements of $\tau$,
• Any union of elements of $\tau$ is an element of $\tau$, and
• Any intersection of finitely many elements of $\tau$ is an element of $\tau$.
If $\tau$ is a topology on $X$ , then the pair $(X,\tau)$ is called a topological space. The elements of $\tau$ are called open sets of $X$,

Topology has many subfields.
• Point-set topology establishes the foundational aspects of topology and investigates concepts inherent to topological spaces (examples include compactness and connectedness).
• Algebraic topology tries to measure degrees of connectivity using algebraic constructs such as homology and homotopy groups.
• Geometric topology primarily studies manifolds and their embeddings (placements) in other manifolds. A particularly active area is low dimensional topology, which studies manifolds of four or fewer dimensions. This includes knot theory, the study of mathematical knots

 Calendare
 Articles
Exercice

 Mohamed AQALMOUN Professeur de l'enseignement supérieur ENS-Fès


text:
# Computing prime factorization of ideals?

I want to compute the prime factorizations of the ideals $\langle 4\sqrt{-14}\rangle$, $\langle 6\sqrt{-6} \rangle$ and $\langle 4\sqrt{-5} \rangle$ in the ring of algebraic integers of $\mathbb{Q}(\sqrt{-14})$,$\mathbb{Q}(\sqrt{-6})$ and $\mathbb{Q}(\sqrt{-5})$. How can I do that?

Also, is there any way to prove every prime ideal in prime factorization of the ideals above is stable under complex conjugation?

• It is not true that prime ideals are stable under conjugation. – Crostul Apr 25 '16 at 17:48
• The prime ideals in your factorizations are all (completely) ramified and therefore invariant under the Galois group (i.e. ambiguous). – franz lemmermeyer Apr 25 '16 at 19:14
• Hello @franzlemmermeyer, thank you very much for the comment. Is there any way to prove that prime ideals in my factorization are stable under conjugation without actually computing the prime factorization? – grok Apr 25 '16 at 19:51
• I had this problem myself a while ago and I still don't know the answer. It seems a little circular that (I think) we can only compute decomposition and inertia groups of an ideal $\mathfrak{P}$ above $\mathfrak{p}$ when we already know what its prime decomposition is. So, or I'm wrong, or I guessing that it is not a computation tool and it is more like a theorical thing, saying that the Galois group is the invisible hand behind the things that happen in the arithmetic of the ring. Not sure the person asking is asking in this context, though. – Shoutre Apr 25 '16 at 20:08

As an example, take $I = \langle 4\sqrt{-14}\rangle\subset\mathbb Q(\sqrt{-14})$. It's clear that $I = \langle 2\rangle^2\cdot\langle \sqrt{-14}\rangle$. To factorise $I$, it is sufficient to factorise $\langle2\rangle$ and $\langle \sqrt{-14}\rangle$ separately.
To factorise $\langle 2\rangle$ we can use the Kummer-Dedekind theorem: $\mathcal O_{\mathbb Q(\sqrt{-14})}=\mathbb Z[\sqrt{-14}]$, and $$X^2+14\equiv X^2\pmod 2$$ so $\langle 2\rangle = \langle2,\sqrt{-14}\rangle^2$.
To factorise $\langle \sqrt{-14}\rangle$, observe that $\langle \sqrt{-14}\rangle\cap\mathbb Z = 14\mathbb Z$, so $\langle \sqrt{-14}\rangle$ is not prime, and it has norm $14$, so it should factorise as a product of a prime above $2$ and a prime above $7$. Using the Kummer-Dedekind theorem, we see that $7\mathcal O_{\mathbb Q(\sqrt{-14})} = \langle 7,\sqrt{-14}\rangle^2$, and it is simple to check that $\langle\sqrt{-14}\rangle=\langle 2,\sqrt{-14}\rangle\cdot\langle 7,\sqrt{-14}\rangle$.
To illustrate this, consider $J=\langle 4\sqrt{-5}\rangle\subset \mathbb Q(\sqrt{-5})$. Suppose that $\mathfrak p$ is a prime ideal dividing $J$, which is not stable under complex conjugation. Since $J$ is stable under complex conjugation, it follows that $\overline{\mathfrak p}$ also divides $J$, and therefore $\mathfrak p\overline{\mathfrak p} = p\mathcal O_{\mathbb Q(\sqrt{-5})}$ divides $J$, where $p = \mathfrak p\cap\mathbb Z$. In this case $p$ must therefore be $2$. It is simple to check that $2$ is totally ramified in $\mathbb Q(\sqrt{-5})$, which rules out this case.
More generally, if $I$ is an ideal in an imaginary quadratic field that is stable under conjugation, and for every rational prime $p$ such that $p\mathcal O\mid I$, there is a unique prime ideal of $\mathcal O$ lying above $p$ (i.e. $p$ is totally ramified or inert), then the prime ideals dividing $I$ are stable under complex conjugation.


text:
### Sidebar

Add a new page:

formulas:maxwell_relations

# Maxwell Relations

## Intuitive

Explanations in this section should contain no formulas, but instead colloquial things like you would hear them during a coffee break or at a cocktail party.

## Concrete

Derivation

The Maxwell relations follow directly from the fact that partial derivatives commute: $\partial_x \partial_y = \partial_y \partial_x$.

If we have some function $U(S,V)$ (called the internal energy) that depends on the entropy $S$ and the volume $V$, the total change of it is given by

$$dU = \frac{\partial U}{\partial S} \big |_V dS + \frac{\partial U}{\partial V} \big |_S dV,$$

where $\big |_V$ means that we keep $V$ fixed.

Then, we introduce two definitions:

$$\frac{\partial U}{\partial S} \big |_V \equiv T , \quad -\frac{\partial U}{\partial V} \big |_S \equiv P.$$

The minus sign here is just a convention and can be understood as follows: The internal energy usually gets smaller when we increase the volume. Thus, if we want to work with positive pressure $P$ in most situations, we need to include the minus sign here.

Using these definitions equation reads

$$dU = T dS - P dV,$$

which is the fundamental thermodynamic relation.

Next, we use that partial derivative commute:

$$\frac{\partial^2 U}{\partial V\partial S} = \frac{\partial^2 U}{\partial S\partial V}$$

and put in our two definitions from above:

$$\frac{\partial T}{\partial S} \big |_V = -\frac{\partial P}{\partial V}\big |_S$$

This is one of the Maxwell relations.

The other Maxwell relations follow completely analogous, but with different functions instead of the internal energy $U$.

For example, if we start with the Helmholtz free energy $A(T,V)$:

$$A = U -TS$$

and follow exactly the same steps ($dA= dU-d(TS) = (Tds-PdV)-(SdT+TdS)=-SdT-PdV$), we can derive

$$\frac{\partial S}{\partial V} \big |_T = \frac{\partial P}{\partial T} \big |_V$$

The other Maxwell relations follow by starting with the enthalpy $H(S,P)$ or the Gibbs free energy $G(T,P)$.

(These notions appear, since:

• a system with fixed entropy and volume will choose the state with minimum internal energy $U$,
• a system with fixed temperature and volume will choose the state with minimum enthalpy $H$,
• a system with fixed entropy and pressure will choose the state with minimum Helmholtz free energy $A$,
• a system with fixed temperature and pressure will choose the state with minimum Gibbs free energy $G$.)

For a great explanation, why the Maxwell relations are "just a sneaky way of saying that the mixed partial derivatives of the function U commute". see https://johncarlosbaez.wordpress.com/2012/01/19/classical-mechanics-versus-thermodynamics-part-1/

(The fact that partial derivatives commute is known as Schwarz' theorem (see https://en.wikipedia.org/wiki/Maxwell_relations . Schwarz' theorem is simply a way of stating "the fact that a function S doesn’t change when we go around a parallelogram" https://johncarlosbaez.wordpress.com/2012/01/23/classical-mechanics-versus-thermodynamics-part-2/)

## Abstract

The motto in this section is: the higher the level of abstraction, the better.

## Why is it interesting?

The Maxwell relations encode useful relationships between notions of thermodynamics.

formulas/maxwell_relations.txt · Last modified: 2018/12/19 11:01 by jakobadmin


text:
# Computing Visibility Polygons

## TL;DR

I discuss the gist and limitations of my implementation of Joe and Simpson’s visibility polygon algortihm, that is, an asymptotically optimal algorithm for computing the visibility polygon from a point inside of a simple polygon.

## The Problem

Recently, I took a course on computational geometry and got interested in the notion of visibility. Besides its applications in hidden surface removal (HSR) algorithms and exact robot motion planning, it received a great amount of attention through the art gallery problem. The first application I could think of when thinking about visibility were video games that incorporated a fog of war, that is, the computation of a player’s surroundings that is visible to him as he navigates a map. Unfortunately, the algorithm we will be talking about doesn’t work with obstacles, making it of limited use in games.

There are many different types of visibility problems, some deal with finding viewpoints to illuminate certain parts of the environment, while others deal with computing visible parts of the environment for a given viewpoint. Some of them consider a single viewpoint, some consider multiple viewpoints, and yet others consider different types of view elements than a point—the list goes on and on. In this post we will focus our attention on the following variant.

Problem Statement. Given a viewpoint $z$ inside of a simple polygon $P$ with $n$ vertices, we want to compute the visibility polygon $VP(P, z)$, which consists of all points in $P$ visible from the viewpoint $z$. We say that point $p$ is visible from point $q$ (and conversely, $q$ is visible from $p$) if and only if the line segment $\overline{pq}$ lies completely in $P$.

## Background

The visibility polygon from a single viewpoint $z$ can be computed naively in $\mathcal{O}(n^2)$ time. Simply cast a ray from $z$ towards every vertex of the polygon $P$ in, let’s say, counter-clockwise order. For each ray we iterate through all edges and store the closest (Euclidian distance to $z$) intersection as a vertex of the visibility polygon. Correctness follows from the observation that the visibility polygon’s boundary changes its shape only due to vertices of the polygon.

The above approach is simple yet computationally inefficient for large polygons. Fortunately, more efficient algorithms have been published. For example Asano’s $\mathcal{O}(nlogn)$ time sweeping algorithm and Joe and Simpson’s $\mathcal{O}(n)$ time algorithm (yes, those are the ones used by CGAL).

Quick Background of Joe and Simpson’s algorithm. Linear time algorithms have been shown to be optimal for computing the visibility polygon from a single viewpoint inside of a simple polygon. Such an algorithm was first proposed by ElGindy and Avis, it requires three stacks and is quite complicated. Then, a conceptually simpler algorithm requiring only one stack was proposed by Lee. Later, Joe and Simpson showed that both algorithms return wrong results for polygons that wind sufficiently, they published a correction of Lee’s algorithm. It is their algorithm that we’ll take a look at.

## The Algorithm

Instead of a futile attempt to try and capture the algorithm in more detail than Joe & Simpson did, I’ll present to you an overview that will be enough to understand the main idea. We’ll also take a closer look at parts of the algorithm for which there is no pseudocode in the paper—the pre- and post-processing.

The algorithm runs in $\mathcal{O}(n)$ time and space. It makes assumptions on the input which we establish in the preprocessing step—this produces a list of vertices $V = v_0, v_1, \cdots, v_n$ that represents the boundary of $P$ in a specific order, depending on the position of viewpoint $z$ as described in the paper (section two, first two paragraphs).

### Preprocessing

The preprocessing will shift the polygon such that the viewpoint $z$ becomes the new origin and it will rotate the polygon such that the closest vertex $v_0$ lies on the x-axis next to $z$—this ensures a line of sight between the first vertex in $V$ and our point of reference $z$ which makes the algorithm’s subsequent design simpler. We’ll make rotations simpler by working with coordinates in polar form.

	private static Pair<VsRep, Double> preprocess(CCWPolygon pol, Point2D z) {
// shift polygon such that z is origin
pol = pol.shiftToOrigin(z);

// determines the closest vertex to z
boolean zIsVertex = pol.vertices.contains(CommonUtils.origin2D);
PolarPoint2D v0 = getInitialVertex(pol, zIsVertex);

// converts the polygon's vertices from Cartesian to polar
List<PolarPoint2D> V = pol.vertices.stream().map(x -> new PolarPoint2D(x)).collect(Collectors.toList());

// adjusts list V such that v0 is at the beginning
placeV0First(V, v0);

// if z is on boundary then [v0, v1, ..., vk, z] -> [z, v0, v1, ..., vk]

// rotate all points of the shifted polygon clockwise such that v0 lies on the x axis
for (PolarPoint2D curr : V) {
if (!curr.isOrigin())
curr.rotateClockWise(v0.theta);
}
// return the preprocessed vertices and the angle of rotation
return new Pair(new VsRep(V, zIsVertex), v0.theta);
}

### Main Idea

Then the algorithm proceeds towards its three main procedures—Advance, Retard, and Scan—that handle the three different scenarios that can occur during the monotone scan of $V$—that is, of $P’s$ boundary. While iterating through $V$, a stack $S = s_0, s_1, \cdots, s_t$ of vertices is maintained—it represents a possible subset of vertices of the final visibility polygon. Note that vertices in $S$ are not necessarily vertices of the final visibility polygon. The three procedures are responsible for handling vertices while iterating through $V$ such that the final content of $S$ is all the information necessary for the postprocessing step to construct the final visibility polygon. Advance is responsible for pushing vertices from $V$ onto the stack $S$, retard for popping vertices from the $S$, and scan for skipping vertices in $V$ that have no business modifying $S$. Assume that $V$ is being scanned with $v_j, v_{j+1}$ as the current edge, and that $v_j$ is visible—for $v_{j+1}$ one of the following three cases can occur:

• $v_{j+1}$ is visible so that the newly discovered edge doesn’t obstruct previous vertices $\implies$ Advance is called—it pushes $v_{j+1}$ onto $S$.
• $v_{j+1}$ is visible and the newly discovered edge obstructs previous vertices $\implies$ Retard is called—it pops obstructed vertices from $S$ and pushes $v_{j+1}$.
• $v_{j+1}$ is invisible, it’s obstructed by previous vertices $\implies$ Scan is called—it doesn’t modify $S$ and keeps iterating through $V$ until it reaches a visible vertex.

The algorithm switches between the three procedures until $V$ is scanned completely—at this point $S$ contains all the necessary information to construct the final visibility polygon. The switching between procedures depends on the cumulative angular displacement of scanned vertices with respect to the viewpoint $z$—it is modified upon handling a new vertex from $V$, exactly how is described in the paper.

### Postprocessing

The preprocessing step modified the original input polygon $P$ in order to establish assumptions made by the rest of the algorithm—mainly that the first vertex $v_{0}$ that we process is visible which eliminates the need for subsequent special cases. The main algorithm therefore worked on a modified input polygon $P’$ and viewpoint $z’$ and therefore produced $VP(P’, z’)$ whose coordinates correspond to $P’$ and not to our original input polygon $P$.

The postprocessing converts $VP(P’, z’)$ to the corresponding visibility polygon in $P$ by taking $VP(P’, z’)$ and applying “inverse” operations to the ones applied to $P$ and $z$ during the preprocessing. Before shifting and rotating $VP(P’, z’)$ to obtain $VP(P, z)$ we have to reverse the stack’s content to establish counterclockwise order—we pushed vertices onto the stack while iterating in counterclockwise order, just popping them would give us $VP(P’, z’)$ in clockwise order.

	private static CCWPolygon postprocess(List<VertDispl> pre_s, VsRep V, Point2D z, double initAngle) {
if (V.zIsVertex)

// reverse order of stack to establish CCW order of final visibility polygon
Collections.reverse(pre_s);

// convert VertDispl to PolarPoint2D
List<PolarPoint2D> rotatedPol = pre_s.stream().map(v -> v.p).collect(Collectors.toList());

// rotates points back to original position before the rotation in preprocess()
for (PolarPoint2D curr : rotatedPol) {
curr.rotateClockWise(-initAngle);
}

// convert PolarPoint2D to Point2D
List<Point2D> shiftedPol = rotatedPol.stream().map(v -> v.toCartesian()).collect(Collectors.toList());

// shifts points back to their position before the shift in preprocess()
for (Point2D curr : shiftedPol)
curr.setLocation(curr.getX() + z.getX(), curr.getY() + z.getY());

return new CCWPolygon(shiftedPol);
}

Time and space complexity. Each vertex is scanned just once, at most two vertices are pushed onto the stack $S$ at each iteration, and popped vertices are never pushed again. This implies that $V$ and $S$ contain a linear number of vertices with respect to the input polygon’s size $n$. Hence, the algorithm runs in $\mathcal{O}(n)$ time and space.

What I left out. The degenerate cases and intricacies regarding the angular displacement and how this affects the switching between advance, scan, and retard with a detailed example on how exactly this algorithm avoids errors made by previously published algorithms is contained in the paper. It also contains the rationale that justifies the use of angular displacements and of course a proof of the algorithm’s correctness.

## Tests

I included tests of the pre- and post-processing steps, see TestPreprocessing.java and TestVisibilityPol.java for details. All of the following visualizations can be reproduced via the DrawVisibilityPolygons.java file.

Given the input polygon $P$ and a viewpoint $z$ I created tests for the following six scenarios. The polygon can be either convex or concave, for both types $z$ can be in $P$’s interior, or on an edge of $P$’s boundary, or on one of $P$’s vertices. The following figures are visualizations of those six scenarios.

The algorithm can also be used to create the illusion of computing the visibility region from multiple viewpoints, that is, all points in $P$ visible from at least one of the viewpoints. I say illusion because the algorithm actually computes the visibility polygon for each of the viewpoints individually and unions them by drawing them onto the same plane. This points to a natural approach to actually compute the visibility region, we could use Joe and Simpson’s algorithm to compute the visibility polygons individually and union them with, say, Martinez et al.’s algorithm.

## Usage

The VisibilityPolygon class can be used to compute the visibility polygon from a point inside of a simple polygon (given as n vertices in counterclockwise order) in O(n) time and space. Here is an example:

    // initialize polygon vertices in CCW order
List<Point2D> vertices = new ArrayList<>();

// initialize polygon
CCWPolygon pol = new CCWPolygon(vertices);

// initialize viewpoint
Point2D z = new Point2D.Double(4, 4);

// VP contains the visibility polygon from z in pol in CCW order.
CCWPolygon VP = VisibilityPolygon.computeVisPol(pol, z);

## Robustness Issues

Substituting floating-point arithmetic for the real arithmetic assumed in the paper doesn’t go unpunished. My implementation will fail for certain inputs due to round-off errors cause by the inherent limitations of floating-point arithmetic. A straightforward solution would be to make use of some library that allows for arbitrary-precision arithmetic such as Apfloat or JScience.

Another approach for obtaining a less robust but presumably more efficient implementation would be to modify the predicates and experimentally assess the improvement in robustness. In order to implement the above algorithm in a robust manner, it is necessary to robustly implement the predicates upon which it relies. The algorithm repeatedly runs a two dimensional orientation test to determine whether a point lies to the left of, to the right of, or on a line defined by two other points. It also computes intersections between lines and segments, half-lines and segments, and between two segments. We will see that all the predicates can be reduced to orientation tests.

For the orientation test we use the determinant approach—it’s fast and immediately applicable to double precision floating-point inputs.

The orientation test is performed by evaluating the sign of $orientation(A, B, C)$:

orientation(A, B, C) = \begin{vmatrix} a_x & a_y & 1 \\ b_x & b_y & 1 \
c_x & c_y & 1 \end{vmatrix} = \begin{vmatrix} a_x - c_x & a_y - c_y \\ b_x - c_x & b_y - c_y \end{vmatrix}

If $orientation(A, B, C)$ is less than 0 then $C$ lies to the right of the line that goes through $A$ and $B$, if greater than 0 then $C$ is to the left of, and if equal to 0 then $C$ lies on the line.

Next we’ll take a look at the connection between the orientation test and other geometric predicates that my implementation uses. The problem of testing whether a line and a segment intersect can be reduced to two orientation tests. To test whether a line $l$ and a line segment $ls$ intersect we test whether an endpoint of $ls$ lies on $l$ or whether the interior of $ls$ intersects $l$. For the former we simply test whether endpoints of $ls$ lie on $l$ with the line equation in point-slope form. Testing whether the interior of $ls$ intersects $l$ is equivalent to testing whether the endpoints of $ls$ lie on opposite sides of $l$—can be determined with two orientation tests. The other tests can be reduced similarly—they have more special cases, see the provided implementation for details. The fact that all predicates are reducible to orientation tests makes me believe that implementing the orientation test in a robust manner could significantly improve the algorithm’s robustness.

At this point I’ll quote Schirra’s advice that is directly applicable to our problem:

The straightforward approach to implement geometric algorithms reliably is to use exact rational arithmetic instead of inherently imprecise floating-point arithmetic. Unfortunately, this slows down the code by orders of magnitude. As suggested by the exact geometric computation paradigm a better approach is to combine exact rational arithmetic with floating-point filters, e.g. interval arithmetic, in order to save most of the efficiency of floating-point arithmetic for nondegenerate cases. This approach is implemented in the exact geometry kernels of CGAL and LEDA. The use of adaptive predicates `a la Shewchuck is highly recommended.

Therefore, the algorithm’s robustness issues could be partially resolved by replacing the current naive implementation of the orientation test by Shewchuk’s adaptive approach. It would be interesting to compare the impact on robustness and running time when substituting the current orientation test for Shewchuk’s more robust but presumably slower approach. Note that my implementation would still fail after the substitution because of round-off errors—even if all orientation tests are performed flawlessly—due to comparisons between doubles that are sprinkled all over the code.

### Summary

In this post we discussed the gist behind Joe and Simpson’s algorithm for computing the visibility polygon from a viewpoint inside of a simple polygon and concluded by taking a look at the robustness issues of my implementation. We saw how to establish assumptions about the input that were made in the paper—the preprocessing step. Then, we discussed the main idea behind the three routines—Advance, Retard and Scan—and in what manner they modify the stack. We took a look at how the final visibility polygon is constructed using the stack’s content left by the three subroutines after the algorithm finished iterating through the polygon’s boundary—the postprocessing step. We concluded with a discussion on robustness issues where we mentioned an approach to resolve them—arbitrary-precision arithmetic —and an idea for future work that makes use of adaptive predicates.


text:
# SDKs generation

This section demonstrates the generation and use of SDKs through a simple example in the following programming languages:

We assume you are somewhat familiar with the development environment of your chosen language above (node and npm for Typescript, opam for OCaml, etc.).

Before going into more details, let's introduce the example: we will use a contract we deployed on Ghostnet to illustrate the use of the various SDKs generated by Factori. Its address is KT1Fjiwsmo49yM7jch6KG4ETLFkatF3Qj8of.

All you need to know about the smart contract is that it has two entrypoints:

• hello: it takes a string and puts it in the contract's storage, in addition to some other updates;
• ping: is a NOP, as it doesn't update the contract's storage.

For reference, the corresponding Camligo code is provided below. Note that you don't need to read or understand it to be able to play with the SDKs.

#![allow(unused)]
fn main() {
(* This the contract's storage type. It is made of:
- a [count] field of type nat;
- a [date] field of type timestamp;
- a [msg] field of type string. *)
type storage = {
count : nat;
date : timestamp;
msg: string;
}

(* The type action has two cases, from which two entrypoints
for the contract are derived:
- A [ping] entrypoint, that takes a unit parameter;
- A [hello] entrpypoint, that takes a string parameter. *)
type action = Ping | Hello of string

(* This is the main entry of the smart contract. *)
let main (param, storage : action * storage) =
let ops =  ([] : operation list) in
match param with
| Ping -> (* [ping] enptrypoint is a NOP. *)
ops, storage
| Hello msg ->
(*  [hello] entrypoint puts the message in the storage,
and updates the counter and the date. *)
ops, { count = storage.count + 1n; msg = msg; date = Tezos.get_now () }
}

The corresponding Michelson code is:

{ parameter (or (string %hello) (unit %ping)) ;
storage (pair (pair (nat %count) (timestamp %date)) (string %msg)) ;
code { UNPAIR ;
NIL operation ;
SWAP ;
IF_LEFT
{ NOW ; PUSH nat 1 ; DIG 4 ; CAR ; CAR ; ADD ; PAIR ; PAIR }
{ DROP ; SWAP } ;
SWAP ;
PAIR } }

For a more complete documentation, go to the features > SDK generation section.


text:
<meta http-equiv="refresh" content="1; url=/nojavascript/"> Friends of the Indian | CK-12 Foundation
You are reading an older version of this FlexBook® textbook: U.S. History Sourcebook - Basic Go to the latest version.

# 6.3: Friends of the Indian

Created by: CK-12
0  0  0

Some Americans tried to remove Native Americans from their land, but others wanted to help “civilize” them. One group founded to accomplish this, the Friends of the Indian, opened schools to educate and Europeanize the Indians. As you read these documents, think about whether members of the group were truly “friends” to the Indians they helped. Were they well-intentioned? Did their work make the Indians better off?

## Diaries of Alice Fletcher

Source: Alice Fletcher was an ethnologist (someone who studies and compares the language, religion, customs, and culture of groups of people). In the $1880\mathrm{s}$ she lived among a number of Native American tribes to learn about their customs. She became a founder of the “Friends of the Indians.” In the diary entries below, she writes about her experiences on the Sioux Reservation in 1881.

October 5, 1881

Wednesday A.M. Rainy again and we can’t get on. Buffalo-chip is a Medicine man, has little positive humor, rather sober and dignified. A queer childish consciousness. This morning he took a stick and with queer mumblings, he raised it to and fro. This was to gain better weather. It is a strange thing to sit and witness actual heathen performances. One realizes the power and gift of spiritual life by the blessed Lord. I needed to see all this to realize the truth of “I am the way, the truth and the life”. The darkness and poverty of their mental life is pitiful….

This A.M. I have been teaching Wajapa more arithmetic, trying to make the figures clear to him. One feels so sorry for them, so longs to broaden and deepen and brighten their life.

October 15, 1881

An old Indian sat there and when we came in, said, “How you do?” and extended his hand. Quite polite to give his sole English.

White Thunder was on the bed. He was not very friendly toward me, I thought. We all sat on chairs. Several other Indians there, two young men and an old man. Swift Bear came in and stayed.

While we sat there, White Thunder’s wife began to cook. She made bread and baked it, terrible stuff, heavy and poor. Coffee and some sort of stripped and dried meat boiled with pork. A cloth was put on the floor between White Thunder’s bed and the stove and the meal served on china plates and cups and saucers.

A young pretty girl came in, brought in meat and looked bright and pleasing. This was the wife’s younger sister, had been at Carlisle school. She is about eighteen years old.

I understand that White Thunder wants to marry this girl as his second wife. She declines. It is rather startling and unpleasant to think about this woman’s future. I hope she will hold out.

After the meal, White Thunder began his speech. It seemed to me that the speech lacked in friendliness. He wanted to know what we were here for.

I said that I had their good at heart. I had heard that this summer many of the children were coming home from the eastern schools. These children can all speak English and understand figures. Now what I propose is that the chiefs and the leading men will spend a part of every day with some of the children and learn the meaning and use of figures and master as much English as possible. If they can learn but little, that little will help them to protect themselves against the white men who wish to cheat them.

Swift Bear received this with interest. White Thunder did not say a word. This visit was rather uninteresting. I felt the influence of White Thunder to be less single and noble, in some ways.

They want to go to work but have nothing to go to work with - want cattle, chickens, hogs to raise as on a farm. They have nothing - they want to go to work, &c. &c.

October 27, 1881

Called on Sitting Bull Oct. 27, 1881, about 12.30 P.M. He received me with much state, sitting at the left of his tent. Some $13$ of his men came in, several old ones.

Sitting Bull explained that has thrown away the old ways and desires to make his way toward civilization. He wants for the sake of the women, to turn away from the old ways. The game [buffalo] gone, he wants to walk in the way of work. For themselves, they can’t change but for their children and the future they want to change their life.

They want to go to work but have nothing to go to work with - want cattle, chickens, hogs, to raise on a farm.

### Questions:

1. Sourcing: Who wrote this doucment? What is her perspective? Who is the audience?
2. Contextualization: How does Alice Fletcher see the world? What was happening to Native Americans at this time?
3. Do you trust the document? Why or why not?

## “School Days of an Indian Girl” – Zitkala-Sa

Source: The excerpt below was written by Zitkala-Sa, or Red Bird, a Sioux from a reservation in South Dakota. (Her English name was Gertrude Simmons Bonnin). She describes her experiences at age $8$ in a school for Native Americans. She ultimately attended college and then began a lifetime of work to improve the lives of Native Americans. The excerpt below was published in the Atlantic Monthly in 1900.

Late in the morning, my friend said she had overhead the paleface woman talk about cutting our long, heavy hear. Our mothers had taught us that only unskilled warriors who were captured had their hair cut by the enemy. Among our people, short hair was worn by mourners and by cowards!

I watched my chance and when no one noticed I disappeared....On my hands and knees I crawled under the bed and cuddled myself in a dark corner.

Women and girls entered the room. I held my breath and watched them open closet doors and peep behind large trunks. What caused them to snoop and look under the bed I do not know. I remember being dragged out, though I resisted by kicking and scratching wildly. In spite of myself, I was carried downstairs and tied fast in a chair.

I cried aloud, shaking my head all the while until I felt the cold blades of the scissors against my neck, and heard them gnaw off one of my thick braids.

Then I lost my spirit. Since the day I was taken from my mother I had suffered extreme indignities. In my anguish I moaned for my mother, but no one came to comfort me. Not a soul reasoned quietly with me, as my own mother used to do; for now I was only one of many little animals driven by a herder.

### Question:

1. Sourcing: Who wrote this document? What was their audience? How trustworthy is it?

## Section Question:

1. Based on both documents, were the Friends of the Indian well-intentioned? Were they truly “friends of the Indian?”

Feb 23, 2012

Aug 22, 2014


text:
# Progress on Maatkit bounty, part 3

This is the last day I’m taking off work to hack on mk-table-sync, and I thought it was time for (yet another) progress report. Here’s what I have done so far:

• All the code, except for a tiny bit of “glue” and “setup” code, is in modules.
• Lots more tests for the modules.
• A new sync algorithm (I still haven’t rewritten the top-down and bottom-up, which are designed for network efficiency more than MySQL efficiency, and are very complicated). This algorithm is called “Chunk” and is based on the chunking module I’m re-using from two of the other tools. This allows syncing the table a bit at a time to avoid locking it so much.
• The tool chooses its own parameters, including choosing the sync algorithm automatically by examining indexes.
• Proper exit codes, as well as several other smaller issues requested via bug reports.
• The tool now syncs entire servers. That is, you don’t have to specify a table. It’ll find all the tables and just sync them.
• The tool can sync many servers. You give it five servers, it will treat the first as the source, and sync every table in the source to each of the four remaining servers in turn.
• It can work via replication. It can discover a master’s replicas via SHOW SLAVE HOSTS and sync each replica to the master. You can also point it at a replica and it’ll discover the master, connect to it, and sync the replica to the master.
• It integrates with mk-table-checksum’s results. If you’ve given the –replicate option to mk-table-checksum, the replica’s results are stored in a table. It can read that table and sync anything marked as different. This can be combined with sync-to-master and auto-discover-slaves functionality.
• Lots of other bugs and problems are gone simply because I’m using the modules I wrote for other tools. This includes issues with table parsing, identifier quoting, etc etc. As an aside, I have to roll my own for almost everything, because I can’t rely on things like DBI’s quote_identifier() function – it does not work in earlier versions, which are amazingly common in the real world.

Whew! So what isn’t done yet?

• Bi-directional syncing.
• The Nibble sync algorithm. It will be preferred over Chunk and can be used in more cases.
• Documentation.
• Full support for wide characters. (This is non-trivial in Perl. I need to research it. A partial solution might not be hard, but I’m worried about the versions included in, for example, RHEL 3, which is very widely used.)
• Updating other tools to work right with the changes to shared code.
• Locking and transaction code. The tool will ultimately use FOR UPDATE/LOCK IN SHARE MODE automatically on InnoDB tables instead of locking them, for example.

Here’s a sample of what it can do, using a replication sandbox I set up with Giuseppe’s MySQL Sandbox. The sandbox contains a copy of the Sakila sample database. I’ll just mangle a few films on the replicas:

baron@kanga:~$cd rsandbox_5_0_45/ baron@kanga:~/rsandbox_5_0_45$ ./s1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.45-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

replica1 [localhost] {msandbox} ((none)) > update sakila.film set title='academy dinosaur2' limit 12;
Query OK, 12 rows affected, 12 warnings (0.07 sec)
Rows matched: 12  Changed: 12  Warnings: 0

replica1 [localhost] {msandbox} ((none)) > Bye
baron@kanga:~/rsandbox_5_0_45$./s2 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.0.45-log MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. replica2 [localhost] {msandbox} ((none)) > update sakila.film set title='academy dinosaur2' limit 1; Query OK, 1 row affected, 1 warning (0.05 sec) Rows matched: 1 Changed: 1 Warnings: 0 replica2 [localhost] {msandbox} ((none)) > Bye OK, now I’ve messed up the first 12 films on one replica, and the first 1 on another. I could just go ahead and sync them right away, but first I’ll do a table checksum to demonstrate that functionality: baron@kanga:~/rsandbox_5_0_45$ mk-table-checksum --replicate=test.checksum --port=16045 127.0.0.1 -q

And now I’ll tell the sync tool to go fix the differences the checksum revealed:

baron@kanga:~/rsandbox_5_0_45$mk-table-sync --replicate=test.checksum h=127.0.0.1,P=16045 -vx # Syncing P=16046,h=127.0.0.1 # DELETE INSERT UPDATE ALGORITHM DATABASE.TABLE # 0 0 12 Chunk sakila.film # 0 0 0 Chunk sakila.film_text # Syncing P=16047,h=127.0.0.1 # DELETE INSERT UPDATE ALGORITHM DATABASE.TABLE # 0 0 0 Chunk sakila.film # 0 0 0 Chunk sakila.film_text baron@kanga:~/rsandbox_5_0_45$

Pretty easy, huh? Take a look at the output: the first thing it did was fix the 12 films I changed. sakila.film has a trigger that updates sakila.film_text, so that table got changed too. The checksum tool caught this difference, but the differences were gone by the time the sync tool examined them, again due to the trigger. On the second replica, no differences were found at all, because the changes to the first replica were made on the master, automatically fixing the second replica. (This won’t always be the case, but it worked in this example).

While I’d love to continue building the perfect beast, I’m going to have to call it quits around noon today and start cleaning up, writing the documentation, and getting ready to release the code. I’m not sure how much I’ll finish in that time.

By the way, anyone who wants to is welcome to get the code from the Maatkit SVN repository! I never make a big deal out of that because I generally assume people want to run released code, but SVN is there if you want it…

I'm Baron Schwartz, the founder and CEO of VividCortex. I am the author of High Performance MySQL and lots of open-source software for performance analysis, monitoring, and system administration. I contribute to various database communities such as Oracle, PostgreSQL, Redis and MongoDB. More about me.


text:
# 2.10. Statements and Expressions¶

Video: (expression_vid)

A statement is an instruction that the Python interpreter can execute. You have only seen the assignment statement so far. Some other kinds of statements that you’ll see in future chapters are while statements, for statements, if statements, and import statements. (There are other kinds too!)

An expression is a combination of literals, variable names, operators, and calls to functions. Expressions need to be evaluated. The result of evaluating an expression is a value or object.

If you ask Python to print an expression, the interpreter evaluates the expression and displays the result.

In this example len is a built-in Python function that returns the number of characters in a string.

The evaluation of an expression produces a value, which is why expressions can appear on the right hand side of assignment statements. A literal all by itself is a simple expression, and so is a variable.

In a program, anywhere that a literal value (a string or a number) is acceptable, a more complicated expression is also acceptable. Here are all the kinds of expressions we’ve seen so far:

literal

e.g., “Hello” or 3.14

variable name

e.g., x or len

operator expression

<expression> operator-name <expression>

function call expressions

<expression>(<expressions separated by commas>)

Notice that operator expressions (like + and *) have sub-expressions before and after the operator. Each of these can themselves be simple or complex expressions. In that way, you can build up to having pretty complicated expressions.

Similarly, when calling a function, instead of putting a literal inside the parentheses, a complex expression can be placed inside the parentheses. (Again, we provide some hidden code that defines the functions square and sub).

With a function call, it’s even possible to have a complex expression before the left parenthesis, as long as that expression evaluates to a function object. For now, though, we will just use variable names (like square, sub, and len) that are directly bound to function objects.

It is important to start learning to read code that contains complex expressions. The Python interpreter examines any line of code and parses it into components. For example, if it sees an = symbol, it will try to treat the whole line as an assignment statement. It will expect to see a valid variable name to the left of the =, and will parse everything to the right of the = as an expression. It will try to figure out whether the right side is a literal, a variable name, an operator expression, or a function call expression. If it’s an operator expression, it will further try to parse the sub-expressions before and after the operator. And so on. You should learn to parse lines of code in the same way.

In order to evaluate an operator expression, the Python interpreter first completely evaluates the expression before the operator, then the one after, then combines the two resulting values using the operator. In order to evaluate a function call expression, the interpreter evaluates the expression before the parentheses (i.e., it looks up the name of the function). Then it tries to evaluate each of the expressions inside the parentheses. There may be more than one, separated by commas. The values of those expressions are passed as inputs to the function when the function is called.

If a function call expression is a sub-expression of some more complicated expression, as square(x) is in sub(square(y), square(x)), then the return value from square(x) is passed as an input to the sub function. This is one of the tricky things that you will have to get used to working out when you read (or write) code. In this example, the square function is called (twice) before the sub function is called, even though the sub function comes first when reading the code from left to right. In the following example we will use the notation of -add- to indicate that Python has looked up the name add and determined that it is a function object.

x = 5
y = 7

To start giving you some practice in reading and understanding complicated expressions, try doing the Parsons problem below. Be careful not to indent any of the lines of code; that’s something that will come later in the course.

        : Please order the code fragments in the order in which the Python interpreter would evaluate them. x is 2 and y is 3. Now the interpreter is executing square(x + sub(square(y), 2 *x)).
look up the variable square to get the function object
---
look up the variable x to get 2
---
look up the variable sub to get the function object
---
look up the variable square, again, to get the function object
---
look up the variable y to get 3
---
run the square function on input 3, returning the value 9
---
look up the variable x, again, to get 2
---
multiply 2 * 2 to get 4
---
run the sub function, passing inputs 9 and 4, returning the value 5
---
add 2 and 5 to get 7
---
run the square function, again, on input 7, returning the value 49


text:
# Is there a fundamental difference in LIFO and FIFO entropy coding?

The top two competing entropy coders at the moment are Arithmetic Coding (AC) and Asymmetrical Number Systems (ANS).

A very interesting difference between the two is that AC is FIFO and ANS is LIFO. That is, in AC the first symbol you encode into the bitstream is also the first symbol you decode. However with ANS the last symbol you encode is the first symbol you decode.

Is there a fundamental difference between these approaches? Could one be converted into the other? What are the advantages/disadvantages of the two approaches?

• Exercise: Show that the $k$-th order empirical entropy of a string is equal to that of the reversed string. – Pseudonym Jul 5 '19 at 4:38

# LIFO and FIFO encoders with adaptive models are equally capable, with minor implementation differences.

## Reverse encoding

As mentioned above, ANS coders are LIFO: whatever order you encode symbols in, the decoder will produce them in the opposite order. All my ANS coders (including the public ryg_rans) use the convention that the encoder processes the data in reverse (working from the end towards the beginning), whereas the decoder works forwards (beginning towards end).

With a static model, this is odd, but not especially problematic. With an adaptive model, decoder and model have to process data in the same direction, since the decoder updates the model as it goes along and needs current model probabilities to even know what to read next. So the decoder and the model want to process data in the same direction (forward being the natural choice), and the rANS encoder needs to be processing symbols in the opposite order.

To reiterate, in a FIFO coder,

• Run the model forwards on the data to obtain intervals corresponding to estimated probabilities
• Run the encoder forwards on this list of intervals.
• Run the decoder, generating the decompressed data in its original order.

In a LIFO coder:

• Run the model forwards on the data to obtain intervals
• Run the encoder in reverse on this list of intervals. Streaming is done by encoding in blocks, which can be as large as your memory capacity.
• Run the decoder, generating the decompressed data in its original order.


text:
# Differential of the Torelli morphism at the boundary

Let consider the Torelli morphism $T:\mathcal{M}_g \rightarrow \mathcal{A}_g$, from the moduli space of curves of genus $g$ to the moduli space of principal polarized abelian varieties of dimension $g$, that maps a curve to its Jacobian. The differential of $T$ at a point $[C]$ is the natural map $$H^1(C, T_C) \rightarrow Sym^2H^1(C, \mathcal{O}_C).$$ I know that $T$ can be extended to a map $$T:\bar{\mathcal{M}_g} \rightarrow \bar{\mathcal{A}_g}$$ from the Deligne-Mumford compactification of $\mathcal{M}_g$ to some compactification of $\mathcal{A}_g$.

I would like to know if there is a way to describe the differential of $T$ at a point representing a nodal curve. More specifically, how can we describe the deformations space of a semi-abelian variety and in particular of a generalized Jacobian variety? Over $\mathbb{C}$, by computing the period matrix, one can show that the differential of $T$ has maximal rank at each point representing a nodal curve with non-hyperelliptic normalization. I'm wondering if, perhaps, there is a more algebraic way to see it.

• The answer to this question seems to depend on your choice of compactification of $A_g$. You might want to consider log structures on your nodal curves, together with the moduli problem given in section 4.6 of Olsson's book Compactifying Moduli Spaces of Abelian Varieties. – S. Carnahan Jun 14 '10 at 6:19
• I'm sorry for my late reply. I think you are right, though that book is not really clear to me (I think I will need some more time to understand it). In the complex case I'm thinking to the Voronoi compactification of the moduli space of abelian variety. I know this is not canonical but this is not a real problem for my purposes. I'm wondering what is the right analogous in the non-complex case. – V M Jul 23 '10 at 13:30


text:
MathSciNet bibliographic data MR2372964 (2009c:60261) 60K35 (60F10 60J55 82C22) Asselah, Amine Large deviations estimates for self-intersection local times for simple random walk in \$\Bbb Z\sp 3\$$\Bbb Z\sp 3$. Probab. Theory Related Fields 141 (2008), no. 1-2, 19–45. Article

For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.


text:
# zbMATH — the first resource for mathematics

##### Examples
 Geometry Search for the term Geometry in any field. Queries are case-independent. Funct* Wildcard queries are specified by * (e.g. functions, functorial, etc.). Otherwise the search is exact. "Topological group" Phrases (multi-words) should be set in "straight quotation marks". au: Bourbaki & ti: Algebra Search for author and title. The and-operator & is default and can be omitted. Chebyshev | Tschebyscheff The or-operator | allows to search for Chebyshev or Tschebyscheff. "Quasi* map*" py: 1989 The resulting documents have publication year 1989. so: Eur* J* Mat* Soc* cc: 14 Search for publications in a particular source with a Mathematics Subject Classification code (cc) in 14. "Partial diff* eq*" ! elliptic The not-operator ! eliminates all results containing the word elliptic. dt: b & au: Hilbert The document type is set to books; alternatively: j for journal articles, a for book articles. py: 2000-2015 cc: (94A | 11T) Number ranges are accepted. Terms can be grouped within (parentheses). la: chinese Find documents in a given language. ISO 639-1 language codes can also be used.

##### Operators
 a & b logic and a | b logic or !ab logic not abc* right wildcard "ab c" phrase (ab c) parentheses
##### Fields
 any anywhere an internal document identifier au author, editor ai internal author identifier ti title la language so source ab review, abstract py publication year rv reviewer cc MSC code ut uncontrolled term dt document type (j: journal article; b: book; a: book article)
Pattern formations in two-dimensional Gray-Scott model: Existence of single-spot solutions and their stability. (English) Zbl 0981.35026

In this paper the pair of coupled reaction-diffusion equations $\alpha {v}_{t}={\epsilon }^{2}{\Delta }v-v+Au{v}^{2}$, ${u}_{t}={\Delta }u-uv+\left(1-u\right)$ in ${ℝ}^{2}×ℝ$ is considered, where $\alpha$, $\epsilon$, and $A$ are parameters, $0<\alpha \le 1$, $0<\epsilon \ll 1$. The above system represents a model of chemical reaction $U+2V\to 3V$, $V\to P$ in gel reactor, where $U$ and $V$ are two chemical species, $V$ catalyzes its own reaction with $U$ and $P$ an inert product. The author first constructs two single-spot solutions and then investigates their stability and instability in terms of the parameters involved. The characteristic parameters $L$ and ${L}_{0}$ are defined in the following way: let $w$ be (unique) radially symmetric solution to the problem

${\Delta }w-w+{w}^{2}=0,\phantom{\rule{1.em}{0ex}}w>0,\phantom{\rule{1.em}{0ex}}w\left(0\right)=\underset{y\in {ℝ}^{2}}{max}w\left(y\right),\phantom{\rule{1.em}{0ex}}w\left(y\right)\to 0,\phantom{\rule{1.em}{0ex}}|y|\to \infty ,$

and

$L=\left(1/2\pi {A}^{2}\right){\epsilon }^{2}log\left(1/\epsilon \right){\int }_{{ℝ}^{2}}{w}^{2}\left(y\right)dy,{L}_{0}=\underset{\epsilon \to 0}{lim}L·$

Roughly speaking, the basic result can be described as follows: if $1/log\left(1/\epsilon \right)\ll L$ and ${L}_{0}<1/4$, then the system has two single-spot solutions; if ${L}_{0}>1/4$, then there are no single-spot solutions.

In the case $\alpha \sim {\epsilon }^{\gamma }$, $0\le \gamma <2$ linear instability of single-spot solutions can be described in terms of the parameters $\gamma$ and ${L}_{0}$.

##### MSC:
 35K57 Reaction-diffusion equations 35B25 Singular perturbations (PDE) 35B35 Stability of solutions of PDE 35B10 Periodic solutions of PDE 35J40 Higher order elliptic equations, boundary value problems 35Q80 Appl. of PDE in areas other than physics (MSC2000) 92E20 Classical flows, reactions, etc.
self-replication


text:
## Precalculus: Mathematics for Calculus, 7th Edition

$2x^{3}-7x^{2}+7x-5$
Multiply: $2x^{3}-2x^{2}+2x-5x^{2}+5x-5$ Collect like terms: $2x^{3}-(2x^{2}+5x^{2})+(5x+2x)-5$ Simplify: $2x^{3}-7x^{2}+7x-5$


text:
Courses
Courses for Kids
Free study material
Free LIVE classes
More

## What are Vectors?

Last updated date: 14th Mar 2023
Total views: 263.1k
Views today: 4.43k

We cannot add two vectors directly like numbers to get the result as they have magnitude as well as direction. The addition of the scalar quantity is very simple, but it requires a different process to follow in the case of vectors.

To know the difference and for better learning, let’s assume that a car is moving 10 miles to the north and then 10 miles to the south. We can easily evaluate the total distance traveled by car by adding these two numbers like 20 miles. But in the case of vector addition, the result is zero.

The reason is that the north and south directions are opposite to each other, which is why they cancel out, and so the vector sum will be zero. This article provides a clear inference of the addition of 2 vectors, or we can say that “vector sum.”

### Sum of Two Vectors

Let’s consider the two vectors $\underset{u}{\rightarrow} + \underset{v}{\rightarrow}$. We are going to add the corresponding components. Let’s write about the components of the vectors:

$\underset{u}{\rightarrow} = (u_{1}, u_{2}) and \underset{v}{\rightarrow} = (v_{1}, v_{2})$

When we do a summation of the above vectors, the result will be:

$\underset{u}{\rightarrow} + \underset{v}{\rightarrow} = (u_{1} + v_{1}, u_{2} + v_{2})$

The summation of two vectors can be called the resultant.

There are two types of vector addition methods, they are:

1. Triangle Law of Vectors

2. Parallelogram Law of Vectors

### How do you Add Two Vectors?

Do you still wonder how to add vectors?

Here are some tips to remember for vector addition:

• The addition of vectors is accomplished geometrically but not algebraically.

• Vector quantities should behave as independent of each other quantities before the addition.

• From the vector addition, we only conclude the resultant of a number of vectors propagated on a body.

• From vector addition, we obtain the resultant vector, which is not dependent on order of the summation of vectors as $\underset{A}{\rightarrow} + \underset{B}{\rightarrow} = \underset{B}{\rightarrow} + \underset{A}{\rightarrow}$

### Triangle Law of Vector Addition

The vector addition is dependent when triangles are considered. Now, we need to find out how it works.

Let’s assume that $\underset{a}{\rightarrow}~and~\underset{b}{\rightarrow}$ are the two vectors.

Here, you ought to draw a line AB, which is called a tail with A and B with the head. Let’s draw a line BC, which allocates with B as the end and C as the head.

Let’s finish the triangle by drawing the line AC with A as the end and C as the crown. The sum of two vectors $\underset{a}{\rightarrow}~and~\underset{b}{\rightarrow}$ is represented by the line AC.

Mathematically,

AC line =  $\underset{a}{\rightarrow} + \underset{b}{\rightarrow}$

We can calculate the magnitude of the AC line ($\underset{a}{\rightarrow} + \underset{b}{\rightarrow}$)

$\sqrt{a^{2} + b^{2} + 2ab cos \theta}$

Here,

The magnitude of the vector $\underset{a}{\rightarrow} = a$

The magnitude of the vector $\underset{b}{\rightarrow} = b$

θ is the angle covered by vector $\underset{a}{\rightarrow} and ~Vector~\underset{b}{\rightarrow}$.

Consider that the resultant of the vectors make an angle of $\Phi$ with $\underset{a}{\rightarrow}$, then the expression will be:

$tan \phi = \frac{b sin\theta}{a + b cos\theta} = tan\frac{\theta}{2}$

We need to learn this with the help of an example. Consider that we have two vectors with equal magnitude A, and θ is the angle between these two vectors.

One can work out this formula to find the magnitude as well as the direction of the resultant. Suppose, B is the magnitude of the resultant, then the expression for this is:

$B = \sqrt{A^{2} + A^{2} + 2AAcos \theta} = 2A cos \frac{\theta}{2}$

Consider that the resultant of the vectors make an angle of ф with  a; then the expression will be:

$tan \phi = \frac{A sin\theta}{A + A cos\theta} = tan\frac{\theta}{2}$

Then, $\phi = \frac{\theta}{2}$

### Parallelogram Law of Vector Addition

We can also understand the concept of vector addition by using the law of parallelogram.

The law of parallelogram states that “when two vectors are acting concurrently at a place (indicated by both sides of a parallelogram being marked from a point), then the result is given by the diagonal of that parallelogram with magnitude and direction passing through that same point.”

To make the law easier for understanding, consider two vector $\underset{P}{\rightarrow} and \underset{Q}{\rightarrow}$

These vectors are denoted by two adjacent sides of a parallelogram. They are indicated away from the point as per the figure given below.

The magnitude of the resultant can be stated as per the parallelogram law of vector addition.

$(AC)^{2} = (AE)^{2} + (EC)^{2}$

or ,$R^{2} = (P+Qcosθ)^{2} (Qsinθ)^{2}$

or, $R = \sqrt{P^{2} + Q^{2} + 2PQcos\theta}$

Also, we need to determine the direction of the resultant vector:

$tan \phi = \frac{CE}{AE} = \frac{Q sin\theta}{P + Q cos\theta}$

$\phi = tan^{-1}\frac{Q sin\theta}{P + Q cos\theta}$

### Vector Subtraction

The subtraction of two vectors is very much identical to addition. We need to assume that vector a is going to be subtracted from vector b.

$\underset{a}{\rightarrow} - \underset{b}{\rightarrow}$, We can write the expression like this.

We can also say that it is the addition of $\underset{a}{\rightarrow} and \underset{-b}{\rightarrow}$. That is why we can apply the same formula to calculate the resultant vector.

Vector Subtraction Formula is:

$R = \overrightarrow{a} - \overrightarrow{b} = \sqrt{a^{2} + b^{2} - 2abcos\theta}$

## FAQs on Addition of Vectors

1. Can a vector have more than one direction?

No, a vector cannot have more than one direction. A vector can only have one direction and one magnitude.

2. If the vector addition of two vectors is zero, then what can you say about the direction of the two vectors?

The sum of two vectors will be zero only if the two vectors have equal magnitude and opposite direction. Therefore, we can say that one vector is the negative of another vector.

3. What is the Parallelogram law of Vector Addition?

The law of parallelogram states that “when two vectors are acting concurrently at a place (indicated by both sides of a parallelogram being marked from a point), then the result is given by the diagonal of that parallelogram with magnitude and direction passing through that same point.”

4. How do you define the term used for the summation of two vectors?

The summation of two vectors is known as the resultant. Here, we notice that the two vectors are the same in magnitude and direction to each other. When the magnitude and direction of two vectors are different, then they are parallel to each other.

5. What is the possibility of adding three vectors?

Yes, we can add three vectors. As a result, we will get a unit vector. The answer will be ‘no’ when two unit vectors are along the coordinate axes. This is because the magnitude of the unit vectors is identical but possess dissimilar directions.

6. Is it possible that a vector can have zero components?

Yes. Along a line, a vector can have zero components. It is also possible that the vector possesses a non-zero magnitude. A vector can have a non-zero x-component along with the zero y-component.

7. How can a student get help from Vedantu in Physics?

Students are most welcome to join Vedantu classes. We help our students with genuine and qualitative Physics content to make the learning easier. Students of Vedantu can have the freedom to enjoy their lessons and practice the questions as much as possible to secure good marks in the board exam.