text:
Attention

HELP WANTED
Please start by reading the guide to contributing to the Brightway documentation.

Warning

NEEDS WORK
It is either a rough draft or has been copied over from the legacy documentation.

# LCA#

## Specifying a functional unit#

The functional unit for any LCA calculation is a dictionary of keys and amounts:

{
("a database", "pi"): 3.14159265358979
}

However, you can also use a Activity proxy:

In [1]: from brightway2 import *

In [2]: activity = Database("ecoinvent 3.2 cutoff").random()

In [3]: type(activity), activity
Out[3]:
(bw2data.backends.peewee.proxies.Activity,
'quicklime production, milled, packed' (kilogram, CH, None))

In [4]: lca = LCA({activity: 1})

In [5]: lca.demand
Out[5]: {'quicklime production, milled, packed' (kilogram, CH, None): 1}

How does this work? It is quite simple - the Activity proxy knows how to pretend to be a key tuple:

In [7]: activity[0], activity[1]
Out[7]: ('ecoinvent 3.2 cutoff', 'ab2f7a551a06a59de9191065128233e4')

In [8]: activity == ('ecoinvent 3.2 cutoff', 'ab2f7a551a06a59de9191065128233e4')
Out[8]: True

This is an instance of duck typing - if it walks like a duck and quacks like a duck, then we can treat it like a duck.

If you are interested in the details, see how bw2data.proxies.ActivityProxyBase defines __getitem__ and other __ magic methods.

## Turning processed data arrays in matrices {#building-matrices}#

A parameter array is a NumPy structured or record array, where each column has a label and data type. Here is an sample of the parameter array for the US LCI:

input output row col type amount

9829 9829 4294967295 4294967295 0 1.0 9708 9708 4294967295 4294967295 0 1.0 9633 9633 4294967295 4294967295 0 1.0 9276 9276 4294967295 4294967295 0 3.0999 8778 8778 4294967295 4294967295 0 1.0 9349 9349 4294967295 4294967295 0 1000.0 5685 9349 4294967295 4294967295 2 14.895 9516 9349 4294967295 4294967295 1 1032.7 9433 9349 4294967295 4294967295 1 4.4287 8838 9349 4294967295 4294967295 1 1.5490

There are also some columns for uncertainty information, but these would only be a distraction for now. The complete spec for the uncertainty fields is given in the stats_arrays documentation.

We notice several things:

• Both the input and output columns have numbers, but we don’t know what they mean yet

• Both the row and col columns are filled with a large number

• The type column has only a few values, but they are also mysterious

• The amount column is the only one that seems reasonable, and gives the values that should be inserted into the matrix

### Input and Output#

The input and output columns gives values for biosphere flows or transforming activity data sets. The mapping{.interpreted-text role=”ref”} is used to translate keys like ("Douglas Adams", 42) into integer values. So, each mapping number uniquely identifies an activity dataset.

If the input and output values are the same, then this is a production exchange - it describes how much product is produced by the transforming activity dataset.

::: title
Warning

Integer mapping ids are not transferable from machine to machine or installation to installation, as the order of insertion (and hence the integer id) is more or less at random. Always .process() datasets on a new machine.

### Rows and columns

The row and col columns have the data type *unsigned integer, 32
bit*, and the maximum value is therefore $2^{32} - 1$, i.e. 4294967295.
This is just a dummy value telling Brightway2 to insert better data.

The method MatrixBuilder.build_dictionary is used to take input and
output values, respectively, and figure out which rows and columns
they correspond to. The actual code is succinct - only one line - but
what it does is:

> 1.  Get all unique values, as each value will appear multiple times
> 2.  Sort these values
> 3.  Give them integer indices, starting with zero

For our example parameter array, the dictionary from input values to
row would be:

 python
{5685: 0,
8778: 1,
8838: 2,
9276: 3,
9349: 4,
9433: 5,
9516: 6,
9633: 7,
9708: 8,
9829: 9}

And the dictionary from output to col would be:

 python
{8778: 0,
9276: 1,
9349: 2,
9633: 3,
9708: 4,
9829: 5}

The method MatrixBuilder.add_matrix_indices would replace the
4294967295 values with dictionary values based on input and output.
At this point, we have enough to build a sparse matrix using
MatrixBuilder.build_matrix:

row   col   amount
----- ----- --------
9     5     1.0
8     4     1.0
7     3     1.0
3     1     3.0999
1     0     1.0
4     2     1000.0
0     2     14.895
6     2     1032.7
5     2     4.4287
2     2     1.5490

Indeed, the [coordinate (coo)
matrix](http://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.coo_matrix.html)
takes as inputs exactly the row and column indices, and the values to
insert.

Of course, there are some details for specific matrices - technosphere
matrices need to be square, and should have ones by default on the
diagonal, etc. etc., but this is the general idea.

### Types

The type column indicates whether a value should be in the
technosphere or biosphere matrix: 0 is a transforming activity
production amount, 1 is a technosphere exchange, and 2 is a
biosphere exchange.

## Brightway2 LCA Reports

The Brightway2 report data format is evolving, and this section should
not be understood as definitive.

LCA reports calculated with bw2analyzer.report.SerializedLCAReport are written as a JSON file to disk. It has the following data format:

{
"monte carlo": {
"statistics": {
"interval": [lower, upper values],
"median": median,
"mean": mean
},
"smoothed": [  ## This is smoothed values for drawing empirical PDF
[x, y],
],
"histogram": [  ## This are point coordinates for each point when drawing histogram bins
[x, y],
]
},
"score": LCA score,
"activity": [
[name, amount, unit],
],
"contribution": {
"hinton": {
"xlabels": [
label,
],
"ylabels": [
label,
],
"total": LCA score,
"results": [
[x index, y index, score], ## See hinton JS implementation in bw2ui source code
],
},
"treemap": {
"size:" LCA score,
"name": "LCA result",
"children": [
{
"name": activity name,
"size": activity LCA score
},
]
}
"herfindahl": herfindahl score,
"concentration": concentration score
},
"method": {
"name": method name,
"unit": method unit
},
"version": report data format version number (this is 1),
"type": "Brightway2 serialized LCA report",
"uuid": the UUID of this report,
"online": URL where this report can be accessed. Optional.
}
}

## Graph traversal#

To generate graphs of impact like supply chain or Sankey diagrams, we need to traverse the graph of the supply chain. The GraphTraversal class does this in a relatively intelligent way, assessing each inventory activity only once regardless of how many times it is used, and prioritizing activities based on their LCA score. It is usually possible to create a reduced graph of the supply chain, with only the most relevant pathways and flows included, in a few seconds.

### Illustration of graph traversal#

It’s easiest to understand how graph traversal is implemented with a simple example. Take this system:

• This system has four nodes, which are LCI processes, also called transforming activities. Each node has one reference product, and a set of zero or more technosphere inputs. By convention, node A produces one unit of product A.

• This system has four edges which define the inputs of each node. An edge has a start, an end, and an amount.

• We consider solving this system for a functional unit of one unit of A.

As we traverse this supply chain, we will keep different data for the nodes and the edges. For nodes, we are interested in the following:

• amount: The total amount of this node needed to produce the functional unit.

• cum: The cumulative LCA impact score attributable to the needed amount of this node, including its specific supply chain.

• ind: The individual LCA impact score directly attributable to one unit of this node, i.e. the score from the direct emissions and resource consumption of this node.

For edges, we want to know:

• to: The row index of the node consuming the product.

• from: The row index of the node producing the product.

• amount: The total amount of product from needed for the amount of to needed.

• exc_amount: The amount of from needed for one unit of to, i.e. the value given in the technosphere matrix.

• impact: The total LCA impact score embodied in this edge, i.e. the individual score of from times amount.

Our functional unit is one unit of A. Before starting any calculations, we need to set up our data structures. First, we have an empty list of edges. We also have a heap, a list which is automatically sorted, and keeps track of the nodes we need to examine. nodes are identified by their row index in the technosphere matrix. Finally, we have a dictionary of nodes, which looks up nodes by their row indices.

nodes, edges, heap = {}, [], []

We create a special node, the functional unit, and insert it into the nodes dictionary:

nodes[-1] = {
'amount': 1,
'cum': total_lca_score,
'ind': 1e-6 * total_lca_score
}

The cumulative LCA impact score is obviously the total LCA score; we set the individual LCA score to some small but non-zero value so that it isn’t deleted in graph simplification later on.

We next start building our list of edges. We start with all the inputs to the functional unit, which in this case is only one unit of A. Note that the functional unit can have multiple inputs.

for node_id, amount in functional_unit:
edges.append({
"to": -1,  ## Special id of functional unit
"from": node_id,
"amount": amount,
"exc_amount": amount,
"impact": LCA(node_id, amount).score,  ## Evaluate LCA impact score for node_id/amount
})

Finally, we push each node to the heap:

for node_id, amount in functional_unit:
heappush(heap, (abs(1 / LCA(node_id, amount).score), node_id))

This is not so easy to understand at first glance. What is 1 / LCA(node_id, amount).score? Why the absolute value? What is this heappush thing?

We want one divided by the LCA impact score for node A because our heap is sorted in ascending order, and we want the highest score to be first.

We take the absolute value because we are interested in the magnitude of node scores in deciding which node to process next, not the sign of the score - leaving out the absolute value would put all negative scores at the top of the heap (which is sorted in ascending order).

heappush is just a call to push something on to the heap, which is our automatically sorted list of nodes to examine.

After this first iteration, we have the following nodes and edges in our graph traversal:

nodes = {-1: {'amount': 1, 'cum': some number, 'ind': some small number}}
edges = [{
'to': -1,
'from': 0,  ## Assuming A is 0
'amount': 1,
'exc_amount': 1,
'impact': some number
}]
heap = [(some number, 0)]

After this, it is rather simple: pull off the next node from the heap, add it to the list of nodes, construct its edges, and add its inputs to the heap. Iterate until no new nodes are found.

Because the heap is automatically sorted, at each iteration we will take the node with the highest impact that hasn’t yet been assessed.

There are two more things to keep in mind:

• We use a cutoff criteria to stop traversing the supply chain - any node whose cumulative LCA impact score is too small is not added to the heap.

• We only visit each node once. The is functionality in bw2analyzer to “unroll” the supply chain so that afterwards each process can occur more than once.


text:
# Discontinuity of functions: Avoidable, Jump and Essential discontinuity

The functions that are not continuous can present different types of discontinuities.

First, however, we will define a discontinuous function as any function that does not satisfy the definition of continuity. In other words, if we can find a point of discontinuity we will say that the function is not continuous:

$$f(x)$$ is not continuous if exists $$x=a$$ belonging to $$Dom(f)$$ such that $$\displaystyle \lim_{x \to a^{ \pm}}f(x) \neq f(a)$$

Let's see an example of function that is not continuous:

Let's take the function $$f(x)=\left\{ \begin{array}{rcl} 1 & \mbox{ if } & x\leq 0 \\ 2 & \mbox{ if } & x>0 \end{array} \right.$$.

This function is not continuous since at the point $$x=0$$ we observe that: $$\displaystyle \lim_{x \to 0^+} f(x)=\lim_{x \to 0} 2=2 \\ f(0)=1$$$and thus the side limit from the right does not coincide with the value of the function, we conclude that the function cannot be continuous. We can see the graphic representation next: It is necessary to bear in mind that a discontinuity is defined on points at the domain of a function. If the function was not defined in a point, although it has behavior similar to that of a discontinuity it would not be a discontinous function, since that would not have satisfied the definition given here. ## Avoidable discontinuity An avoidable discontinuity in a point $$x=a$$ occurs when the side limits coincide, but the value of the function at this point is not, that is to say: $$\displaystyle \lim_{x \to a^-}f(x)=\lim_{x \to a^+}=L \\ f(a) \neq L$$$ It is reasonable that we call this type of discontinuity avoidable since the function in the discontinuity point seems continuous, but the point in particular does not satisfy the definition of continuity, so only by adding this point to the definition of the function, can we obtain a continuous function.

Let's see an example:

Let's take the function $$\displaystyle \left \{\begin{array}{rcl} \frac{x^2-4}{x+2} & \mbox{ if } & x\neq -2 \\ 0 & \mbox{ if } & x=-2 \end{array} \right.$$$We can see quickly that at the point $$x =-2$$ the function does not match correctly. Let's observe the continuity at this point: $$\displaystyle \begin{array}{l} \lim_{x \to -2^-}f(x)=\lim_{x \to -2^-} \frac{x^2-4}{x+2}=\lim_{x \to -2^-}\frac{(x+2)(x-2)}{x+2}=\lim_{x \to -2^-}x-2=-4 \\ \lim_{x \to -2^+}f(x)=\lim_{x \to -2^+} \frac{x^2-4}{x+2}=\lim_{x \to -2^+}\frac{(x+2)(x-2)}{x+2}=\lim_{x \to -2^+}x-2=-4 \\ f(-2)=0\end{array}$$$

Consequently, $$f (x)$$ has an avoidable discontinuity at the point $$x =-2$$.

Let's take the function $$\displaystyle f(x)=\left\{ \begin{array} {rcl} e^x & \mbox{ if } & x < 0 \\ 0 & \mbox{ if } & x=0 \\ x+1 & \mbox{ if } & x>0 \end{array} \right.$$$We observe quickly that the subfunctions that define our function are continuous. Therefore the function will be continuous if its subfunctions match correctly. It can be seen that we have problems at point $$x=0$$. Let's see what happens exactly: $$\begin{array}{l} \lim_{x \to 0^-} f(x) = \lim_{x \to 0^-}e^x=e^0=1 \\ \lim_{x \to 0^+}f(x)=\lim_{x \to 0^+}x+1 =0+1=1 \\ f(0)=0 \end{array}$$$

Consequently, $$f (x)$$ has an avoidable discontinuity at the point $$x=0$$.

## Jump discontinuity

A function $$f(x)$$ has an jump discontinuity at the point $$x=a$$ if the side limits of the function at this point do not coincide (and they are finite) that is: $$\displaystyle \begin{array} {l} \lim_{x \to a^-}f(x) \neq \lim_{x \to a^+}f(x) \\ f(a)=L \end{array}$$$independently of the value of the function at $$x=a$$ (of the value of $$f(a)$$). If we denote this discontinuity with the name of "jump", it is also in contrast to the avoidable discontinuities. In this case we can not give the appropriate value to the discontinuity point since the side limits do not coincide. The following example will show clearly what we mean: Let's take the function $$f(x)=\left \{ \begin{array}{rcl} x+1 & \mbox{ if } & x \leq 0 \\ x-1 &\mbox{ if } & x>0 \end{array}\right.$$$

we can see that in the zero we have: $$\displaystyle \begin{array}{l} \lim_{x \to 0^-}f(x)=\lim_{x \to 0} x+1=1 \\ \lim_{x \to 0+}f(x)=\lim_{x \to 0}x-1=-1 \\ f(0)=1\end{array}$$$and since the limits do not coincide, we have an jump discontinuity (even though $$f (0) =1$$, which coincides with the limit from the left). We can see the graphic representation of the function: Let's take the function $$f(x)=\left \{ \begin{array}{rcl} e^x & \mbox{ if } & x < 1 \\ x^2 & \mbox{ if } & x \geq 1 \end{array}\right.$$$

The function will be continuous at the point $$x=1$$ if the side limits and the function coincide. Let's see its behavior: $$\displaystyle \begin{array} {l} \lim_{x \to 1^-}f(x)=\lim_{x \to 1^-}e^x=e \\ \lim_{x \to 1^+}f(x)=\lim_{x \to 1^+}x^2= 1 \\ f(1)=(1)^2=1 \end{array}$$$Consequently, we have an jump discontinuity. ## Essential discontinuity A function $$f(x)$$ has an essential discontinuity at point $$x=a$$ if some of the following cases are satisfied: 1. The side limits do not coincide. 2. Some of the side limits or both are infinity. Let's see exactly every point: 1. We might be in the previous case, inevitable discontinuity. 2. But if we have : $$\displaystyle \lim_{x \to a^-}f(x)= \pm \infty$$ and/or $$\displaystyle \lim_{x \to a^+}f(x)= \pm \infty$$ and the function is defined in $$x=a$$ (independently of its value). In these cases we say that we have a vertical asymptote. For more on this issue it may be worth looking at the unit on graphic representation. Let's see an example: Let's take the function $$\displaystyle f(x)=\left \{ \begin{array}{rcl} \frac{1}{x} & \mbox{ if } x \neq 0 \\ 1 & \mbox{ if } & x=0 \end{array} \right.$$$ we can see that at zero we have some problem of continuity, so we look at what happens with the continuity of the function at this point: $$\displaystyle \begin{array}{l} \lim_{x \to 0^-} f(x)= \lim_{x \to 0^-} \frac{1}{x}=\frac{1}{0^-}=-\infty \\ \lim_{x \to 0^+}f(x)=\lim_{x \to 0^+}\frac{1}{x}=\frac{1}{0⁺}= \infty \\ f(0)=1 \end{array}$$\$ Therefore we have an essential discontinuity at point $$x=0$$.

We can see a graphic representation of the function:

Attention! The function $$\displaystyle f(x)=\frac{1}{x}$$ does not present essential discontinuity since the function is continuous.

We would have the discontinuity at the point $$x=0$$, but it is not of the domian of the function, so it is not possible to define the discontinuity.

Nevertheless, the function has a vertical asymptote at $$x=0$$ and has similar behavior to that of essential discontinuity.

format: plain


text:
Double Integrals – Definition, Formula, and Examples

The double integral allows us to extend our understanding of areas under the curve from the two-dimensional coordinate system to volumes under the surfaces in a three-dimensional coordinate system. Double integrals allow us to calculate mass densities and estimate probability density functions – just two of the many functions of double integrals!

The double integral allows us to calculate the volume under the space bounded by the region, $\boldsymbol{R}$. We can evaluate double integrals by evaluating integrals with respect to one variable and keeping the rest of the variable constant.

This article covers all the key concepts we need to understand what double integrals represent. By the end of the discussion, we want you to feel confident when solving problems that involve double integrals.

What Is a Double Integral?

The double integral represents the integral of the function, $f(x, y)$ over a given region, $R$. Suppose that for a region, $R$, is defined by $x \in [a, b]$ and $y \in [c, d]$, we can define the double integral of the function, $f(x, y)$, in the region ($R$) is given by the expressions below.

\begin{aligned}\int \int_{R} f(x, y) \phantom{dx}dA\\\int_{c}^{d} \int_{b}^{a} f(x, y) \phantom{x}dxdy\end{aligned}

The double integral is also an important example of iterated integrals. Its general form alone highlights this – we integrate the double variable function with respect to one variable then the next. We’ll explore more about the process of evaluating double integrals later, but for now, we’ll need to understand what double integrals represent and how we’ve established its rules.

Through double integrals, we can now calculate the surface area of curves like the one shown above and projected at different planes. We begin our understanding of double integrals by reviewing what we know of definite integrals. Recall that through the fundamental theorem of calculus, we can define definite integrals as shown below.

\begin{aligned}\int_{a}^{b} f(x) \phantom{x}dx &= \lim_{n \rightarrow  \infty}[f(x_1)\Delta x + f(x_2)\Delta x + …+ f(x_n)\Delta x]\\\Delta x &= \dfrac{b – a}{n}\end{aligned}

As we have learned in the past, $\Delta x$ represents the width of the rectangles and $\{x_1, x_2, x_3, …, x_n\}$ are the endpoints formed by the subintervals within the interval, $[a, b]$. Now, how does this relate to double integrals?

Interpreting Double Integrals Using Riemann Sum

Suppose that we have the region, $R$, bounded by the intervals, $[a, b] \times [c, d]$ across the intervals along the $x$ and $y$-axis, respectively. This means that we can divide the length and width into smaller subintervals and rectangles as shown by the image above. The rectangle contains $mn$ rectangles where each smaller rectangle has an area of $\Delta x \Delta y$, where $\Delta x = \dfrac{b – a}{m}$ and $\Delta y = \dfrac{c – d}{n}$. We can define double integrals in terms of the sum of the areas of the rectangles formed by the graph – similar to how we established the definition for definite integrals before.

 \begin{aligned}\int \int_R f(x, y)\phantom{x}dA &= \lim_{m, n \rightarrow \infty} [f(x_1, y_1)\Delta A + f(x_1,y_2)\Delta A + … + f(x_m,y_n)\Delta A]\end{aligned}

Now, let’s extend this understanding by interpreting $f(x_i, y_j)$ as the height of a rectangular prism that has a base area of $A$.

This means that the double integral representing the sum of the rectangular columns will actually represent the volume of the series with a base area bound by the intervals, $[a, b] \times [c, d]$. This is how we define the double integral of the function, $f$, over the rectangular region, $R$.

 When $f(x, y) \geq 0$, the double integral shown below defines the volume formed by the region, $R$, under the surface, $z = f(x, y)$.\begin{aligned}\int \int_{R} f(x, y) \phantom{dx}dA\\\int_{c}^{d} \int_{b}^{a} f(x, y) \phantom{x}dxdy\end{aligned}

Hence, the double integral represents the volume found under our surface. This is one way for us to interpret double integrals. Now, let’s view double integrals as iterated integrals.

Interpreting Double Integrals as Iterated Integrals

As we have mentioned earlier, double integrals are essential examples of iterated integrals.

 \begin{aligned}\int_{a}^{b} \int_{c}^{d} A(y) \phantom{x}dy  &= \int_{a}^{b} \left[ \int_{c}^{d} f(x, y) \phantom{x}dy\right]\phantom{x}dx\\ \int_{c}^{d}\int_{a}^{b} A(x) \phantom{x}dx  &= \int_{c}^{d}\left[\int_{a}^{b}   f(x, y) \phantom{x}dx\right]\phantom{x}dy\end{aligned}

Iterated integrals are integrals of multivariable functions where we evaluate the definite integrals of the function with respect to one variable first then integrate on the next variable. Let’s look back into our expression for the double integral by going back to our function, $f$, defined by two variables and can be integrated within the rectangular region, $R = [a, b] \times [c, d]$. This means that we can integrate $f(x, y)$ with respect to $x$ from $x = a$ to $x = b$ and treat $y$ as a constant.

\begin{aligned}A(y) &= \int_{a}^{b} f(x, y) \phantom{x}dx \end{aligned}

Now, let’s integrate the resulting function, $A(x)$, with respect to $y$ from $y = c$ to $y = d$. This time, we’ll treat $x$ as a constant.

\begin{aligned}\int_{c}^{d} A(y) \phantom{x}dy &=\int_{c}^{d}  \left[\int_{a}^{b} f(x, y) \phantom{x}dx \right] \phantom{x}dy \end{aligned}

Let’s use the original expression for $A(y) = \int_{a}^{b} f(x, y) \phantom{x}dx$ on the left-hand side of the equation.

\begin{aligned}\int_{c}^{d} \int_{a}^{b} f(x, y) \phantom{x}dx \phantom{x}dy &=\int_{c}^{d}  \left[\int_{a}^{b} f(x, y) \phantom{x}dx \right] \phantom{x}dy \end{aligned}

We can rewrite the double integral by integrating $f(x, y)$ with respect to $x$ from $a$ to $b$ then with respect to $y$ from $c$ to $d$.

\begin{aligned}\int_{a}^{b} \int_{c}^{d} f(x, y) \phantom{x}dy \phantom{x}dx &=\int_{a}^{b}  \left[\int_{c}^{d} f(x, y) \phantom{x}dy \right] \phantom{x}dx \end{aligned}

Hence, we‘ve shown how double integrals can be interpreted as iterated integrals. We’ll use this interpretation to solve double integrals in the section shown below.

Interpreting Double Integrals as an Area of General Regions

There are instances when the area of the surface we’re working on does not form a rectangle. Let’s now observe two examples of regions that are not rectangular in shape.

This means that we can now work with surfaces with irregular regions and the two graphs shown above are great examples. The first graph shows a region formed by two curves in terms of $x$ while the second graph shows a region formed by curves in terms of $y$.

\begin{aligned}R &= \{(x, y)| a \leq x \leq b,g_1(x) \leq y \leq g_2(x)\}\\\\R &= \{(x, y)| h_1(y) \leq x \leq h_2(y), c \leq y \leq d\}\end{aligned}

These are the set builder notations that describe the two regions – the first equation describes the region of the leftmost graph and the second set builder notation represents the right graph. We can calculate double integral bounded by the regions shown below.

\begin{aligned}\textbf{Case 1:}\phantom{xxxxxx}\\R = \{(x, y)| a &\leq x \leq b, g_1(x) \leq y \leq g_2(x)\}\\\int \int_R f(x, y) \phantom{x}dA &=\int_{a}^{b} \int_{g_1(x)}^{g_2(x)} f(x, y) dy\phantom{x} dx\\\\\textbf{Case 2:}\phantom{xxxxxx}\\R =\{(x, y)| h_1&(y) \leq x \leq h_2(y), c \leq y \leq d\}\\\int \int_R f(x, y) \phantom{x}dA &=\int_{c}^{d} \int_{h_1(y)}^{h_2(y)} f(x, y) dx\phantom{x} dy\end{aligned}

We’ve shown how to double integrals work for more general regions. Let’s now move on to applying what we’ve learned so far to evaluate double integrals.

How To Solve Double Integrals?

We can solve problems involving double integrals by applying the appropriate interpretations of double integrals. The fastest way to evaluate double integrals is by using the fact that they are iterated integrals.

• Determine the limits of integration of the function in terms of two variables (normally $x$ and $y$).
• Evaluate the inner integral by working on one variable while treating the other as constant.
• Now, work out the outer integral using the resulting expression.

There are also some properties of double integrals that can help you in evaluating double integrals. Let’s go over some of these properties first!

Properties of double integrals

Given that the functions, $f(x, y)$ and $g(x, y)$, can be integrated throughout the regions, $R$ and $S$, they satisfy the following equations:

1. $\int \int_{R} [f(x, y) \pm g(x, y)]\phantom{x}dA = \int \int_{R} f(x, y) \phantom{x}dA \pm \int \int_{R} g(x, y) \phantom{x}dA$
2. $\int \int_{R} f(x, y) \phantom{x} dA = k \int \int_{R} f(x, y) \phantom{x}dA$, where $k$ is constant
3. When $f(x, y) \leq g(x, y)$ within the region, $R$, the inequality, $\int \int_{R} f(x, y) \phantom{x}dA \leq \int \int_{R} g(x, y) \phantom{x}dA$.
4. If $f(x, y) \geq 0$ within $R$ and the regions $R$ and $S$ are not overlapping each other, then we can write $\int \int_{R \cup S} f(x, y)\phantom{x} dA$ as shown below.

\begin{aligned} \int \int_{R \cup S} f(x, y)\phantom{x} dA  = \int \int_{R} f(x, y) \phantom{x} dA + \int \int_{S} f(x, y) \phantom{x}dA\end{aligned}

Now that you know the different properties of double integrals, it’s time for us to show you an example of solving double integrals.

\begin{aligned}\int_{y = 1}^{4} \int_{x = 0}^{2} 2(1 – xy) \phantom{x}dxdy\end{aligned}

To evaluate the integral shown above, we first factor out $2$ from the double integral. We then integrate the function with respect to $x$ from $x =0$ to $x = 2$ and treat $y$ as if it’s a constant.

\begin{aligned}\int_{y = 1}^{4} \int_{x = 0}^{2} 2(1 – xy) \phantom{x}dxdy &= 2\int_{y = 1}^{4} \left[\int_{x = 0}^{2} (1 – xy) \phantom{x}dx \right ]dy\\&= 2\int_{y = 1}^{4} \left[x – \dfrac{x^2}{2} \cdot y \right ]_{0}^{2} \phantom{x}dy\\&= 2\int_{y = 1}^{4} \left[\left(2- \dfrac{2^2y}{2}\right) – \left(0 – \dfrac{0^2y}{2}\right) \right ]\phantom{x}dy\\&= 2\int_{y = 1}^{4} (2 – 2y) \phantom{x}dy\end{aligned}

We now evaluate the resulting integral with respect to $y$ from $y = 1$ to $y = 4$.

\begin{aligned}\int_{y = 1}^{4} \int_{x = 0}^{2} 2(1 – xy) \phantom{x}dxdy &=2\int_{y = 1}^{4} (2 – 2y)\phantom{x}dy \\&=2\left[2y – 2 \cdot \dfrac{y^2}{2} \right ]_{1}^{4}\\&= 2\left[2y – y^2 \right ]_{1}^{4}\\&= 2[(8 – 16) – (2 – 1)]\\&= -18\end{aligned}

This means that $\int_{y = 1}^{4} \int_{x = 0}^{2} 2(1 – xy) \phantom{x}dxdy$ is equal to $-18$. Getting the hang of it? Don’t worry, we’ve prepared more examples for you! Review the article then test your knowledge with our sample problems shown below.

Example 1

Determine the volume, $V$, found right below the plane, $z = 4x + 2y$ over the rectangular region, $R = [0, 2]\times [0, 4]$.

Solution

Let’s first identify the limits of the double integral: we want to evaluate the double integral of $z = 4x + 2y$ with respect to $x$ from $x = 0$ to $x = 2$. We can then evaluate the expression with respect to $y$ from $y = 0$ to $y = 4$.

\begin{aligned}V &= \int_{y = 0}^{4}\int_{x = 0}^{2} (4x + 2y) \phantom{x}dxdy\end{aligned}

We can factor out $2$ from the double integral then integrate the function with respect to $x$ by treating $2y$ like a constant.

\begin{aligned}V &= \int_{y = 0}^{4} \int_{x = 0}^{2} 2(2x + y) \phantom{x}dxdy\\&= 2\int_{y = 0}^{4} \left[\int_{x = 0}^{2} (2x + y) \phantom{x}dx \right ]dy \\&= 2\int_{y = 0}^{4} \left[2 \cdot \dfrac{x^2}{2} + xy\right ]_{0}^{2} \phantom{x}dy\\&= 2\int_{y = 0}^{4} \left[x^2 + xy\right ]_{0}^{2} \phantom{x}dy\\&= 2\int_{y = 0}^{4} [(2^2 + 2y) – (0^2 + 0)]\phantom{x}dy\\&= 2\int_{y = 0}^{4} (4 + 2y )\phantom{x}dy\end{aligned}

We’re now working with the outer integral, so evaluate the resulting expression with respect to $y$ from $y = 0$ to $y = 4$.

\begin{aligned}V &= 2\int_{y = 0}^{4} (2y + 4)\phantom{x}dy\\&= 2 \left[2 \cdot \dfrac{y^2}{2} + 4y \right ]_{0}^{4}\\&= 2[y^2 + 4y]_{0}^{4}\\&= 2[(4^2 + 4\cdot 4) -(0 + 0)]\\&= 2(32)\\&= 64\end{aligned}

This means that the volume, $V$, under the plane is equal to $64$. Try switching the order of integration and you should be able to come up with the same value!

Example 2

Determine the volume, $V$, found right below the plane, $z = e^{2x – y}$ over the rectangular region, $R =[1, 4]\times [1, 2]$.

Solution

We have $f(x, y) = e^{2x – y}$ which will always be greater than zero throughout $x$ and $y$. We’re evaluating the double integral so that $x \in [1, 4]$ and $y \in [1, 2]$.

\begin{aligned}V &= \int_{y = 1}^{4} \int_{x =1}^{2} e^{2x – y} \phantom{x}dxdy\end{aligned}

Let’s first integrate the plane with respect to $x$ and treat $y$ as a constant variable. We’ll have to apply the u-substitution method to integrate $\int e^{2x – y} \phantom{x}dx$.

\begin{aligned}u = 2x – y &\Rightarrow du = 2\phantom{x}dx\\\int e^{2x – y} \phantom{x}dx &= \dfrac{1}{2}\int e^u \phantom{x}du\\&= \dfrac{1}{2}e^u\\&= \dfrac{1}{2}e^{2x – y}\end{aligned}

Now, use this expression to evaluate the integral from $x = 1$ to $x = 4$.

\begin{aligned}V &= \int_{y = 1}^{4} \left[\int_{x =1}^{2} e^{2x – y} \phantom{x}dx \right ]dy\\&= \int_{y = 1}^{4} \left[\dfrac{1}{2}e^{2x – y}\right ]_{1}^{2} \phantom{x}dy\\&= \dfrac{1}{2}\int_{y = 1}^{4}\left[e^{2x – y}\right ]_{1}^{2} \phantom{x}dy\\&= \dfrac{1}{2}\int_{y = 1}^{4}\left(e^{4- y} + e^{2 – y}\right) \phantom{x}dy\end{aligned}

Apply a similar process to integrate the outer integral from $y = 1$ to $y = 2$ as shown below.

\begin{aligned}V &= \dfrac{1}{2}\int_{y = 1}^{4}\left(e^{4- y} + e^{2 – y}\right) \phantom{x}dy\\&= \dfrac{1}{2}\left[-e^{4 – y} – e^{2- y}  \right ]_{1}^{4}\\&= \dfrac{1}{2}[(-e^{4 – 4} – e^{2 -4}) – (-e^{4 – 1} – e^{2 -1})]\\&= \dfrac{1}{2}(-e^0 – e^{-2} + e^3 – e)\\&= \dfrac{e^3  – e – 1- e^{-2}}{2}\\&= \dfrac{e^5 – e^{3} – e^2 – 1}{2e^2}\end{aligned}

Hence, we have $V = \dfrac{e^5 – e^{3} – e^2 – 1}{2e^2}$ or approximately equal to $8.25$.

Practice Questions

1. Determine the volume, $V$, found right below the plane, $z = 3x – 6y$ over the rectangular region, $R =[0, 3] \times [0, 1]$.
2. Determine the volume, $V$, found right below the plane, $z = e^{3x + y}$ over the rectangular region, $R =[1, 3]\times [1, 4]$.

1.$V = \int_{y = 0}^{1}\int_{x = 0}^{3} (3x – 6y) \phantom{x}dxdy = 4.5$
2. $V = \int_{y = 1}^{4}\int_{x = 1}^{3} e^{3x\:+\:y}\phantom{x}dxdy = \dfrac{e^{13}-e^{10}-e^7+e^4}{3}$


text:
TITLE

# Homoclinics for a Hamiltonian with wells at different levels

AUTHOR(S)
Bisgard, James
PUB. DATE
May 2007
SOURCE
Calculus of Variations & Partial Differential Equations;May2007, Vol. 29 Issue 1, p1
SOURCE TYPE
DOC. TYPE
Article
ABSTRACT
We consider a Hamiltonian equation of the form (HS) $$\ddot{q}(t) = -V_q(t, q(t))$$ for which V has two distinct non-degenerate maxima at different levels: 0 is a local maximum and $$\xi \neq 0$$ is an absolute maximum. Under standard non-degeneracy conditions on V, our main result is that there is a solution of (HS) homoclinic to 0. Then, supposing that another geometric condition holds, we show the existence of infinitely many solutions of (HS) homoclinic to 0 that are distinguished from one another by the number of times and regions where the solutions stay away from 0. As a corollary, we show that if there is a solution of (HS) homoclinic to $$\xi$$ , then there are infinitely many solutions of (HS) homoclinic to 0, distinguished by the number and position of intersections with 1/2.
ACCESSION #
24152093

## Related Articles

• Bifurcations of Invariant Tori and Subharmonic Solutions of Singularly Perturbed System*. Zhiyong Ye; Maoan Han // Chinese Annals of Mathematics;Apr2007, Vol. 28 Issue 2, p135

This paper deals with bifurcations of subharmonic solutions and invariant tori generated from limit cycles in the fast dynamics for a nonautonomous singularly perturbed system. Based on PoincarÃ© map, a series of blow-up transformations and the theory of integral manifold, the conditions for...

• Univalent Functions and Integrable Systems. Prokhorov, Dmitri; Vasil'ev, Alexander // Communications in Mathematical Physics;Feb2006, Vol. 262 Issue 2, p393

We study one-parameter expanding evolution families of simply connected domains in the complex plane described by infinite systems of evolution parameters. These evolution parameters in some cases admit Hamiltonian formulation and lead to integrable systems. One example of such parameters is...

• Singularities of Integrable and Near-Integrable Hamiltonian Systems. Bau, T.; Zung, N.T. // Journal of Nonlinear Science;Jan/Feb97, Vol. 7 Issue 1, p1

The aim of this Letter is to show that the singularities of integrable Hamil-tonian systems, besides being important for such systems themselves, also have many applications in the study of near-integrable systems. In particular, we will show how they are related to Kolmogorov' nondegeneracy...

• Reversible maps in two-degrees of freedom Hamiltonian systems. Zare, K.; Tanikawa, K. // Chaos;Sep2002, Vol. 12 Issue 3, p699

It has been shown that a sub-class of two-degrees of freedom Hamiltonian systems possesses a reversing symmetry discovered by Birkhoff in the restricted problem of three bodies. This mixed space-time reversing symmetry, which is different from the classical time reversal symmetry, can be shared...

• A class of integrable Hamiltonian systems whose solutions are (perhaps) all completely periodic. Calogero, F. // Journal of Mathematical Physics;Nov97, Vol. 38 Issue 11, p5711

Reports on a class of integrable Hamiltonian systems whose solutions are completely periodic. Evidence that the Hamiltonian system has a period that is a finite integral multiple of T+2(pie)/ohm; Hamiltonian equations of motion; Possibility in recasting the equations of motion in the modified...

• Adler-Konstant-Symes construction, bi-Hamiltonian manifolds, and KdV equations. Guha, Partha // Journal of Mathematical Physics;Oct97, Vol. 38 Issue 10, p5167

Focuses on a relation between Adler-Konstant-Symes theory applied to Fordy-Kulish scheme and bi-Hamiltonian manifolds. Relation to Casati-Magri-Pedroni work on Hamiltonian formulation of the KP equation; Construction of an integrable equation associated with symmetric spaces.

• Irreversible weak limits of classical dynamical systems. Gentili, F.; Morchio, G. // Journal of Mathematical Physics;Sep99, Vol. 40 Issue 9, p4400

Studies the irreversible weak limits of classical dynamical systems. Role of weak limits in simple Hamiltonian systems; Development of positive bistochastic maps characterized in terms of convergence properties of the corresponding automorphisms of the observable algebra; Definition of a...

• The reaction volume Hamiltonian model: Further development and application. Koch, A.; Billing, G.D. // Journal of Chemical Physics;11/8/1997, Vol. 107 Issue 18, p7242

Studies the reaction volume Hamiltonian model. Calculation of the minimum energy path; Computation of vibrational coupling coefficients; Application of the Hamiltonian model to a four-atomic system.

• A completely integrable Hamiltonia system. Calogero, F.; Francoise, J.-P. // Journal of Mathematical Physics;Jun96, Vol. 37 Issue 6, p2863

Examines a dynamical system characterized by a Hamiltonian that is completely integrable. Evolution of coordinates entailed by the Hamiltonian; Equations of motion coinciding with the Hamiltonian; Proof that the constants of motion are in involution; Reformulation of the problem via a...

Share

Courtesy of VIRGINIA BEACH PUBLIC LIBRARY AND SYSTEM

Sign out of this library


text:
# graph with some complex roots

• Mar 12th 2006, 05:36 PM
squidget_4
graph with some complex roots
Can someone explain to me the nature of a graph which has some complex roots?
• Mar 12th 2006, 06:13 PM
ThePerfectHacker
Quote:

Originally Posted by squidget_4
Can someone explain to me the nature of a graph which has some complex roots?

Not sure I understand the question, but let me give an example, the graph $f(x)=x^2+1$ has not real solutions, namely its solutions are $\pm i$. Thus, it cannot intersect the x-axis otherwise that would imply that it has real solutions
• Mar 16th 2006, 07:55 PM
squidget_4
Thanks, that makes some sense to me, I was uncertain of what was being asked as well.


text:
# Exact inversion of matrix complexity (by Gaussian elimination)

• October 29th 2013, 06:34 AM
abscissa
Exact inversion of matrix complexity (by Gaussian elimination)
I would like to check if what I have done is correct. Please, any input is appreciated.

**Problem statement:** Consider a non-singular matrix $A_{nxn}$. Construct an algorithm using Gaussian elimination to find $A^{-1}.$ Provide the operation counts for this algorithm.

**My attempted algorithm and operations count:**

Let $[A|I]$ be an augmented $n$ x $2n$ matrix.

INPUT: number of unknowns and equations n, augmented matrix

OUTPUT: $A^{-1}$, provided that the inverse exists

STEP 1: For $i=1,\dots,n-1$ do STEPS 2-4

STEP 2: Let $p$ be the smallest integer with $i \leq p \leq n$ such that $a_{pi} \neq 0$. If no integer $p$ exists then output ('no unique solution exists'); STOP

STEP 3: If $p \neq i$ then perform $E_p \leftrightarrow E_i
$

STEP 4: For $j=i+1, \dots, n$ do STEPS 5-6

STEP 5: Set $m_{ji}=a_{ji}/a_{ii}$.

STEP 6: Perform $(E_j - m_{ji}E_i) \rightarrow (E_j)
$

STEP 7: If $a_{nn}=0$ then output NO UNIQUE SOLUTION EXISTS and STOP

STEP 8: For $i=n-1,n-2,\dots ,1$,
For $j=i+1,i,\dots ,1$ do STEPS 9 and 10

STEP 9: Set $m_{ij}=a_{ij}/a_{jj}
$

STEP 10: Perform $(E_i - m_{ij}E_j) \rightarrow (E_i)
$

STEP 11: for $i=1, ldots, n, do E_i/a_{ii} \rightarrow E_i
$

STEP 12: OUTPUT $A^{-1}$ and STOP.

**I am getting the operations count as follows:** A total of $(2n^3+9n^2+n)/3$ multiplications and divisions and a total of $(2n^3+6n^2-8n)/3$ additions and subtractions for a grand total of $4n^3/3 + 5n^2 - 7n/3$ operations. **Does this sound about right?**

Thanks for any help.


text:
# NAG Library Routine Document

## 1Purpose

g13agf accepts a series of new observations of a time series, the model of which is already fully specified, and updates the ‘state set’ information for use in constructing further forecasts. The previous specifications of the time series model should have been obtained by using g13aef or g13aff to estimate the relevant parameters. The supplied state set will originally have been produced by g13aef or g13aff, but may since have been updated by earlier calls to g13agf.
A set of residuals corresponding to the new observations is returned. These may be of use in checking that the new observations conform to the previously fitted model.

## 2Specification

Fortran Interface
 Subroutine g13agf ( st, nst, mr, par, npar, c, anx, nuv, wa, nwa,
 Integer, Intent (In) :: nst, mr(7), npar, nuv, nwa Integer, Intent (Inout) :: ifail Real (Kind=nag_wp), Intent (In) :: par(npar), c, anx(nuv) Real (Kind=nag_wp), Intent (Inout) :: st(nst) Real (Kind=nag_wp), Intent (Out) :: anexr(nuv), wa(nwa)
#include <nagmk26.h>
 void g13agf_ (double st[], const Integer *nst, const Integer mr[], const double par[], const Integer *npar, const double *c, const double anx[], const Integer *nuv, double anexr[], double wa[], const Integer *nwa, Integer *ifail)

## 3Description

The time series model is specified as outlined in Section 3 in g13aef or g13aff. This also describes how the state set, which contains the minimum amount of time series information needed to construct forecasts, is made up of
 (i) the differenced series ${w}_{t}$ (uncorrected for the constant $c$), for $\left(N-P×s\right), (ii) the ${d}^{\prime }$ values required to reconstitute the original series ${x}_{t}$ from the differenced series ${w}_{t}$, (iii) the intermediate series ${e}_{t}$, for $\left(N-\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(p,Q×s\right)\right), and (iv) the residual series ${a}_{t}$, for $\left(N-q\right).
If the number of original undifferenced observations was $n$, then ${d}^{\prime }=d+\left(D×s\right)$ and $N=n-{d}^{\prime }$.
To update the state set, given a number of new undifferenced observations ${x}_{t}$, $t=n+1,n+2,\dots ,n+k$, the four series above are first reconstituted.
Differencing and residual calculation operations are then applied to the new observations and $k$ new values of ${w}_{t},{e}_{t}$ and ${a}_{t}$ are derived.
The first $k$ values in these three series are then discarded and a new state set is obtained.
The residuals in the ${a}_{t}$ series corresponding to the $k$ new observations are preserved in an output array. The parameters of the time series model are not changed in this routine.

None.

## 5Arguments

1:     $\mathbf{st}\left({\mathbf{nst}}\right)$ – Real (Kind=nag_wp) arrayInput/Output
On entry: the state set derived from g13aef or g13aff, or as modified using earlier calls of g13agf.
On exit: the updated values of the state set.
2:     $\mathbf{nst}$ – IntegerInput
On entry: the number of values in the state set array st.
Constraint: ${\mathbf{nst}}=P×s+D×s+d+q+\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(p,Q×s\right)$. (As returned by g13aef or g13aff).
3:     $\mathbf{mr}\left(7\right)$ – Integer arrayInput
On entry: the orders vector $\left(p,d,q,P,D,Q,s\right)$ of the ARIMA model, in the usual notation.
Constraints:
• $p,d,q,P,D,Q,s\ge 0$;
• $p+q+P+Q>0$;
• $s\ne 1$;
• if $s=0$, $P+D+Q=0$;
• if $s>1$, $P+D+Q>0$.
4:     $\mathbf{par}\left({\mathbf{npar}}\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the estimates of the $p$ values of the $\varphi$ parameters, the $q$ values of the $\theta$ parameters, the $P$ values of the $\Phi$ parameters and the $Q$ values of the $\Theta$ parameters in the model – in that order, using the usual notation.
5:     $\mathbf{npar}$ – IntegerInput
On entry: the number of $\varphi$, $\theta$, $\Phi$ and $\Theta$ parameters in the model.
Constraint: ${\mathbf{npar}}=p+q+P+Q$.
6:     $\mathbf{c}$ – Real (Kind=nag_wp)Input
On entry: the constant to be subtracted from the differenced data.
7:     $\mathbf{anx}\left({\mathbf{nuv}}\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the new undifferenced observations which are to be used to update st.
8:     $\mathbf{nuv}$ – IntegerInput
On entry: $k$, the number of new observations in anx.
9:     $\mathbf{anexr}\left({\mathbf{nuv}}\right)$ – Real (Kind=nag_wp) arrayOutput
On exit: the residuals corresponding to the new observations in anx.
10:   $\mathbf{wa}\left({\mathbf{nwa}}\right)$ – Real (Kind=nag_wp) arrayWorkspace
11:   $\mathbf{nwa}$ – IntegerInput
On entry: the dimension of the array wa as declared in the (sub)program from which g13agf is called.
Constraint: ${\mathbf{nwa}}\ge \left(4×{\mathbf{npar}}+3×{\mathbf{nst}}\right)$.
12:   $\mathbf{ifail}$ – IntegerInput/Output
On entry: ifail must be set to $0$, . If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value  is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this argument, the recommended value is $0$. When the value  is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=1$
On entry, ${\mathbf{npar}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{npar}}=p+q+P+Q$.
The orders vector mr is invalid.
${\mathbf{ifail}}=2$
On entry, ${\mathbf{nst}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{nst}}=P×s+D×s+d+q+\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(Q×s,p\right)$.
${\mathbf{ifail}}=3$
On entry, ${\mathbf{nuv}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{nuv}}>0$.
${\mathbf{ifail}}=4$
On entry, ${\mathbf{nwa}}=〈\mathit{\text{value}}〉$ and the minimum size $\text{required}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{nwa}}\ge 4×{\mathbf{npar}}+3×{\mathbf{nst}}$.
${\mathbf{ifail}}=-99$
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

## 7Accuracy

The computations are believed to be stable.

## 8Parallelism and Performance

g13agf is not threaded in any implementation.

The time taken by g13agf is approximately proportional to ${\mathbf{nuv}}×{\mathbf{npar}}$.

## 10Example

The following program is based on data derived from a study of monthly airline passenger totals (in thousands) to which a logarithmic transformation had been applied. The time series model was based on seasonal and non-seasonal differencing both of order $1$, with seasonal period $12$. The number of parameters estimated was two: a non-seasonal moving average parameter ${\theta }_{1}$ with value $0.327$ and a seasonal moving average parameter ${\Theta }_{1}$ with value $0.6270$. There was no constant correction. These, together with the state set array, were obtained using g13aef.
Twelve new observations are supplied. The routine updates the state set and outputs a set of residuals corresponding to the new observations.

### 10.1Program Text

Program Text (g13agfe.f90)

### 10.2Program Data

Program Data (g13agfe.d)

### 10.3Program Results

Program Results (g13agfe.r)


text:
## Archive for the ‘Computer Science’ Category

### Evidence for Power Laws – “…I work scientifically!”

Saturday, February 17th, 2018

Scant Evidence of Power Laws Found in Real-World Networks by Erica Klarreich.

From the post:

A paper posted online last month has reignited a debate about one of the oldest, most startling claims in the modern era of network science: the proposition that most complex networks in the real world — from the World Wide Web to interacting proteins in a cell — are “scale-free.” Roughly speaking, that means that a few of their nodes should have many more connections than others, following a mathematical formula called a power law, so that there’s no one scale that characterizes the network.

Purely random networks do not obey power laws, so when the early proponents of the scale-free paradigm started seeing power laws in real-world networks in the late 1990s, they viewed them as evidence of a universal organizing principle underlying the formation of these diverse networks. The architecture of scale-freeness, researchers argued, could provide insight into fundamental questions such as how likely a virus is to cause an epidemic, or how easily hackers can disable a network.

An informative and highly entertaining read that reminds me of an exchange between in The Never Ending Story between Atreyu and Engywook.

Engywook’s “scientific specie-ality” is the Southern Oracle. From the transcript:

Atreyu: Have you ever been to the Southern Oracle?

Engywook: Eh… what do YOU think? I work scientifically!

In the context of the movie, Engywook’s answer is deeply ambiguous.

Where do you land on the power law question?

### Unfairness By Algorithm

Monday, February 5th, 2018

From the post:

Analysis of personal data can be used to improve services, advance research, and combat discrimination. However, such analysis can also create valid concerns about differential treatment of individuals or harmful impacts on vulnerable communities. These concerns can be amplified when automated decision-making uses sensitive data (such as race, gender, or familial status), impacts protected classes, or affects individuals’ eligibility for housing, employment, or other core services. When seeking to identify harms, it is important to appreciate the context of interactions between individuals, companies, and governments—including the benefits provided by automated decision-making frameworks, and the fallibility of human decision-making.

Recent discussions have highlighted legal and ethical issues raised by the use of sensitive data for hiring, policing, benefits determinations, marketing, and other purposes. These conversations can become mired in definitional challenges that make progress towards solutions difficult. There are few easy ways to navigate these issues, but if stakeholders hold frank discussions, we can do more to promote fairness, encourage responsible data use, and combat discrimination.

To facilitate these discussions, the Future of Privacy Forum (FPF) attempted to identify, articulate, and categorize the types of harm that may result from automated decision-making. To inform this effort, FPF reviewed leading books, articles, and advocacy pieces on the topic of algorithmic discrimination. We distilled both the harms and potential mitigation strategies identified in the literature into two charts. We hope you will suggest revisions, identify challenges, and help improve the document by contacting lsmith@fpf.org. In addition to presenting this document for consideration for the FTC Informational Injury workshop, we anticipate it will be useful in assessing fairness, transparency and accountability for artificial intelligence, as well as methodologies to assess impacts on rights and freedoms under the EU General Data Protection Regulation.

The primary attraction are two tables, Potential Harms from Automated Decision-Making and Potential Mitigation Sets.

Take the tables as a starting point for analysis.

Some “unfair” practices, such as increased auto insurance prices for night-shift workers, which results in differential access to insurance, is an actuarial question. Insurers are not public charities and can legally discriminate based on perceived risk.

### GraphDBLP [“dblp computer science bibliography” as a graph]

Wednesday, January 31st, 2018

GraphDBLP: a system for analysing networks of computer scientists through graph databases by Mario Mezzanzanica, et al.

Abstract:

This paper presents GraphDBLP, a system that models the DBLP bibliography as a graph database for performing graph-based queries and social network analyses. GraphDBLP also enriches the DBLP data through semantic keyword similarities computed via word-embedding. In this paper, we discuss how the system was formalized as a multi-graph, and how similarity relations were identified through word2vec. We also provide three meaningful queries for exploring the DBLP community to (i) investigate author profiles by analysing their publication records; (ii) identify the most prolific authors on a given topic, and (iii) perform social network analyses over the whole community. To date, GraphDBLP contains 5+ million nodes and 24+ million relationships, enabling users to explore the DBLP data by referencing more than 3.3 million publications, 1.7 million authors, and more than 5 thousand publication venues. Through the use of word-embedding, more than 7.5 thousand keywords and related similarity values were collected. GraphDBLP was implemented on top of the Neo4j graph database. The whole dataset and the source code are publicly available to foster the improvement of GraphDBLP in the whole computer science community.

Although the article is behind a paywall, GraphDBLP as a tool is not! https://github.com/fabiomercorio/GraphDBLP.

From the webpage:

GraphDBLP is a tool that models the DBLP bibliography as a graph database for performing graph-based queries and social network analyses.

GraphDBLP also enriches the DBLP data through semantic keyword similarities computed via word-embedding.

GraphDBLP provides to users three meaningful queries for exploring the DBLP community:

1. investigate author profiles by analysing their publication records;
2. identify the most prolific authors on a given topic;
3. perform social network analyses over the whole community;
4. perform shortest-paths over DBLP (e.g., the shortest-path between authors, the analysis of co-author networks, etc.)

… (emphasis in original)

Sorry to see author, title, venue, publication, keyword all as flat strings but that’s not uncommon. Disappointing but not uncommon.

Viewing these flat strings as parts of structured representatives will be in addition to this default.

Not to minimize the importance of improving the usefulness of the dblp, but imagine integrating the GraphDBLP into your local library system. Without a massive data mapping project. That’s what lies just beyond the reach of this data project.

### Don Knuth Needs Your Help

Monday, January 22nd, 2018

Donald Knuth Turns 80, Seeks Problem-Solvers For TAOCP

From the post:

When 24-year-old Donald Knuth began writing The Art of Computer Programming, he had no idea that he’d still be working on it 56 years later. This month he also celebrated his 80th birthday in Sweden with the world premier of Knuth’s Fantasia Apocalyptica, a multimedia work for pipe organ and video based on the bible’s Book of Revelations, which Knuth describes as “50 years in the making.”

But Knuth also points to the recent publication of “one of the most important sections of The Art of Computer Programming” in preliminary paperback form: Volume 4, Fascicle 6: Satisfiability. (“Given a Boolean function, can its variables be set to at least one pattern of 0s and 1 that will make the function true?”)

Here’s an excerpt from its back cover:

Revolutionary methods for solving such problems emerged at the beginning of the twenty-first century, and they’ve led to game-changing applications in industry. These so-called “SAT solvers” can now routinely find solutions to practical problems that involve millions of variables and were thought until very recently to be hopelessly difficult.

“in several noteworthy cases, nobody has yet pointed out any errors…” Knuth writes on his site, adding “I fear that the most probable hypothesis is that nobody has been sufficiently motivated to check these things out carefully as yet.” He’s uncomfortable printing a hardcover edition that hasn’t been fully vetted, and “I would like to enter here a plea for some readers to tell me explicitly, ‘Dear Don, I have read exercise N and its answer very carefully, and I believe that it is 100% correct,'” where N is one of the exercises listed on his web site.

Elsewhere he writes that two “pre-fascicles” — 5a and 5B — are also available for alpha-testing. “I’ve put them online primarily so that experts in the field can check the contents before I inflict them on a wider audience. But if you want to help debug them, please go right ahead.”

Do you have some other leisure project for 2018 that is more important?

😉

### Weird machines, exploitability, and provable unexploitability

Thursday, December 21st, 2017

Weird machines, exploitability, and provable unexploitability by Thomas Dullien (IEEE pre-print, to appear IEEE Transactions on Emerging Topics in Computing)

Abstract:

The concept of exploit is central to computer security, particularly in the context of memory corruptions. Yet, in spite of the centrality of the concept and voluminous descriptions of various exploitation techniques or countermeasures, a good theoretical framework for describing and reasoning about exploitation has not yet been put forward.

A body of concepts and folk theorems exists in the community of exploitation practitioners; unfortunately, these concepts are rarely written down or made sufficiently precise for people outside of this community to benefit from them.

This paper clarifies a number of these concepts, provides a clear definition of exploit, a clear definition of the concept of a weird machine, and how programming of a weird machine leads to exploitation. The papers also shows, somewhat counterintuitively, that it is feasible to design some software in a way that even powerful attackers – with the ability to corrupt memory once – cannot gain an advantage.

The approach in this paper is focused on memory corruptions. While it can be applied to many security vulnerabilities introduced by other programming mistakes, it does not address side channel attacks, protocol weaknesses, or security problems that are present by design.

A common vocabulary to bridge the gap between ‘Exploit practitioners’ (EPs) and academic researchers. Whether it will in fact bridge that gap remains to be seen. Even the attempt will prove to be useful.

Tracing the use/propagation of Dullien’s vocabulary across Google’s Project Zero reports and papers would provide a unique data set on the spread (or not) of a new vocabulary in computer science.

Not to mention being a way to map back into earlier literature with the newer vocabulary, via a topic map.

BTW, Dullien’s statement “is is feasible to design some software in a way that even powerful attackers … cannot gain an advantage,” is speculation and should not dampen your holiday spirits. (I root for the hare and not the hounds as a rule.)

### Lisp at the Frontier of Computation

Saturday, December 9th, 2017

Abstract:

Since the 1950s, Lisp has been used to describe and calculate in cutting-edge fields like artificial intelligence, robotics, symbolic mathematics, and advanced optimizing compilers. It is no surprise that Lisp has also found relevance in quantum computation, both in academia and industry. Hosted at Rigetti Computing, a quantum computing startup in Berkeley, Robert Smith will provide a pragmatic view of the technical, sociological, and psychological aspects of working with an interdisciplinary team, writing Lisp, to build the next generation of technology resource: the quantum computer.

ABOUT THE SPEAKER: Robert has been using Lisp for over decade, and has been fortunate to work with and manage expert teams of Lisp programmers to build embedded fingerprint analysis systems, machine learning-based product recommendation software, metamaterial phased-array antennas, discrete differential geometric computer graphics software, and now quantum computers. As Director of Software Engineering, Robert is responsible for building the publicly available Rigetti Forest platform, powered by both a real quantum computer and one of the fastest single-node quantum computer simulators in the world.

Video notes mention “poor audio quality.” Not the best but clear and audible to me.

The coverage of the quantum computer work is great but mostly a general promotion of Lisp.

Forest (beta) Forest provides development access to our 30-qubit simulator the Quantum Virtual Machine ™ and limited access to our quantum hardware systems for select partners. Workshop video plus numerous other resources.

A Practical Quantum Instruction Set Architecture by Robert S. Smith, Michael J. Curtis, William J. Zeng. (speaker plus two of his colleagues)

### The Computer Science behind a modern distributed data store

Thursday, December 7th, 2017

From the description:

What we see in the modern data store world is a race between different approaches to achieve a distributed and resilient storage of data. Every application needs a stateful layer which holds the data. There are at least three necessary ingredients which are everything else than trivial to combine and of course even more challenging when heading for an acceptable performance.

Over the past years there has been significant progress in respect in both the science and practical implementations of such data stores. In his talk Max Neunhöffer will introduce the audience to some of the needed ingredients, address the difficulties of their interplay and show four modern approaches of distributed open-source data stores.

Topics are:

• Challenges in developing a distributed, resilient data store
• Consensus, distributed transactions, distributed query optimization and execution
• The inner workings of ArangoDB, Cassandra, Cockroach and RethinkDB

The talk will touch complex and difficult computer science, but will at the same time be accessible to and enjoyable by a wide range of developers.

I haven’t found the slides for this presentation but did stumble across ArangoDB Tech Talks and Slides.

Neunhöffer’s presentation will make you look at ArangoDB more closely.

### So You Want to be a WIZARD [Spoiler Alert: It Requires Work]

Monday, November 20th, 2017

I avoid using terms like inspirational, transforming, etc. because it is so rare that software, projects, presentations merit merit those terms.

Today I am making an exception to that rule to say:

So You Want to be a Wizard by Julia Evans can transform your work in computer science.

Notice the use of “can” in that sentence. No guarantees because unlike many promised solutions, Julia says up front that hard work is required to use her suggestions successfully.

That’s right. If these methods don’t work for you it will be because you did not apply them. (full stop)

No guarantees you will get praise, promotions, recognition, etc., as a result of using Julia’s techniques, but you will be a wizard none the less.

One consolation is that wizards rarely notice back-biters, office sycophants, and a range of other toxic co-workers. They are too busy preparing themselves to answer the next technical issue that requires a wizard.

### 10 Papers Every Developer Should Read (At Least Twice) [With Hyperlinks]

Thursday, November 16th, 2017

Feathers omits hyperlinks for the 10 papers every developer should read, at least twice.

Hyperlinks eliminate searches by every reader, saving them time and load on their favorite search engine, not to mention providing access more quickly. Feathers’ list with hyperlinks follows.

Most are easy to read but some are rough going – they drop off into math after the first few pages. Take the math to tolerance and then move on. The ideas are the important thing.

See Feather’s post for his comments on each paper.

Even a shallow web composed of hyperlinks is better than no web at all.

### A Primer for Computational Biology

Thursday, November 9th, 2017

From the webpage:

A Primer for Computational Biology aims to provide life scientists and students the skills necessary for research in a data-rich world. The text covers accessing and using remote servers via the command-line, writing programs and pipelines for data analysis, and provides useful vocabulary for interdisciplinary work. The book is broken into three parts:

1. Introduction to Unix/Linux: The command-line is the “natural environment” of scientific computing, and this part covers a wide range of topics, including logging in, working with files and directories, installing programs and writing scripts, and the powerful “pipe” operator for file and data manipulation.
2. Programming in Python: Python is both a premier language for learning and a common choice in scientific software development. This part covers the basic concepts in programming (data types, if-statements and loops, functions) via examples of DNA-sequence analysis. This part also covers more complex subjects in software development such as objects and classes, modules, and APIs.
3. Programming in R: The R language specializes in statistical data analysis, and is also quite useful for visualizing large datasets. This third part covers the basics of R as a programming language (data types, if-statements, functions, loops and when to use them) as well as techniques for large-scale, multi-test analyses. Other topics include S3 classes and data visualization with ggplot2.

Pass along to life scientists and students.

This isn’t the primer that separates the CS material from domain specific examples and prose. Adaptation to another domain is a question of re-writing.

I assume an adaptable primer wasn’t the author’s intention and so that isn’t a criticism but an observation that basic material is written over and over again, needlessly.

I first saw this in a tweet by Christophe Lalanne.

### 3 Reasons to Read: Algorithms to Live By

Monday, April 24th, 2017

How Algorithms can untangle Human Questions. Interview with Brian Christian by Roberto V. Zican.

The entire interview is worth your study but the first question and answer establish why you should read Algorithms to Live By:

Q1. You have worked with cognitive scientist Tom Griffiths (professor of psychology and cognitive science at UC Berkeley) to show how algorithms used by computers can also untangle very human questions. What are the main lessons learned from such a joint work?

Brian Christian: I think ultimately there are three sets of insights that come out of the exploration of human decision-making from the perspective of computer science.

The first, quite simply, is that identifying the parallels between the problems we face in everyday life and some of the canonical problems of computer science can give us explicit strategies for real-life situations. So-called “explore/exploit” algorithms tell us when to go to our favorite restaurant and when to try something new; caching algorithms suggest — counterintuitively — that the messy pile of papers on your desk may in fact be the optimal structure for that information.

Second is that even in cases where there is no straightforward algorithm or easy answer, computer science offers us both a vocabulary for making sense of the problem, and strategies — using randomness, relaxing constraints — for making headway even when we can’t guarantee we’ll get the right answer every time.

Lastly and most broadly, computer science offers us a radically different picture of rationality than the one we’re used to seeing in, say, behavioral economics, where humans are portrayed as error-prone and irrational. Computer science shows us that being rational means taking the costs of computation — the costs of decision-making itself — into account. This leads to a much more human, and much more achievable picture of rationality: one that includes making mistakes and taking chances.
… (emphasis in original)

After the 2016 U.S. presidential election, I thought the verdict that humans are error-prone and irrational was unassailable.

Looking forward to the use of a human constructed lens (computer science) to view “human questions.” There are answers to “human questions” baked into computer science so watching the authors unpack those will be an interesting read. (Waiting for my copy to arrive.)

Just so you know, the Picador edition is a reprint. It was originally published by William Collins, 21/04/2016 in hardcover, see: Algorithms to Live By, a short review by Roberto Zicari, October 24, 2016.

### Sci Hub It!

Friday, April 7th, 2017

Sci Hub It!

Simple add-on to make it easier to use Sci-Hub.

If you aren’t already using this plug-in for Firefox you should be.

Quite handy!

Enjoy!

### Notes to (NUS) Computer Science Freshmen…

Monday, March 13th, 2017

Notes to (NUS) Computer Science Freshmen, From The Future

From the intro:

Early into the AY12/13 academic year, Prof Tay Yong Chiang organized a supper for Computer Science freshmen at Tembusu College. The bunch of seniors who were gathered there put together a document for NUS computing freshmen. This is that document.

Feel free to create a pull request to edit or add to it, and share it with other freshmen you know.

The Art of Computer Programming (a review of everything in Computer Science; pretty much nobody, save Knuth, has finished reading this)

When you think about the amount of time Knuth has spent researching, writing and editing The Art of Computer Programming (TAOCP), it doesn’t sound unreasonable to expect others, a significant number of others, to have read it.

Any online reading groups focused on TAOCP?

### New Spaceship Speed in Conway’s Game of Life

Saturday, January 14th, 2017

From the post:

In this article, I assume that you have basic familiarity with Conway’s Game of Life. If this is not the case, you can try reading an explanatory article but you will still struggle to understand much of the following content.

The day before yesterday ConwayLife.com forums saw a new member named zdr. When we the lifenthusiasts meet a newcomer, we expect to see things like “brand new” 30-cell 700-gen methuselah and then have to explain why it is not notable. However, what zdr showed us made our jaws drop.

It was a 28-cell c/10 orthogonal spaceship:

… (emphasis in the original)

The mentioned introduction isn’t sufficient to digest the material in this post.

There is a wealth of material available on cellular automata (the Game of Life is one).

LifeWiki is one and Complex Cellular Automata is another. While not exhaustive of all there is to know about cellular automata, familiarity with take some time and skill.

Still, I offer this as encouragement that fundamental discoveries remain to be made.

But if and only if you reject conventional wisdom that prevents you from looking.

### D-Wave Just Open-Sourced Quantum Computing [DC Beltway Parking Lot Distraction]

Friday, January 13th, 2017

D-Wave Just Open-Sourced Quantum Computing by Dom Galeon.

D-Wave has just released a welcome distraction for CS types sitting in the DC Beltway Parking Lot on January 20-21, 2017. (I assuming you brought extra batteries for your laptop.) After you run out of gas, your laptop will be running on battery power alone.

Just remember to grab a copy of Qbsolv before you leave for the tailgate/parking lot party on the Beltway.

A software tool known as Qbsolv allows developers to program D-Wave’s quantum computers even without knowledge of quantum computing. It has already made it possible for D-Wave to work with a bunch of partners, but the company wants more. “D-Wave is driving the hardware forward,” Bo Ewald, president of D-Wave International, told Wired. “But we need more smart people thinking about applications, and another set thinking about software tools.”

To that end, D-Wave has open-sourced Qbsolv, making it possible for anyone to freely share and modify the software. D-Wave hopes to build an open source community of sorts for quantum computing. Of course, to actually run this software, you’d need access to a piece of hardware that uses quantum particles, like one of D-Wave’s quantum computers. However, for the many who don’t have that access, the company is making it possible to download a D-Wave simulator that can be used to test Qbsolv on other types of computers.

This open-source Qbsolv joins an already-existing free software tool called Qmasm, which was developed by one of Qbsolv’s first users, Scott Pakin of Los Alamos National Laboratory. “Not everyone in the computer science community realizes the potential impact of quantum computing,” said mathematician Fred Glover, who’s been working with Qbsolv. “Qbsolv offers a tool that can make this impact graphically visible, by getting researchers and practitioners involved in charting the future directions of quantum computing developments.”

D-Wave’s machines might still be limited to solving optimization problems, but it’s a good place to start with quantum computers. Together with D-Wave, IBM has managed to develop its own working quantum computer in 2000, while Google teamed up with NASA to make their own. Eventually, we’ll have a quantum computer that’s capable of performing all kinds of advanced computing problems, and now you can help make that happen.

From the github page:

qbsolv is a metaheuristic or partitioning solver that solves a potentially large quadratic unconstrained binary optimization (QUBO) problem by splitting it into pieces that are solved either on a D-Wave system or via a classical tabu solver.

The phrase, “…might still be limited to solving optimization problems…” isn’t as limiting as it might appear.

A recent (2014) survey of quadratic unconstrained binary optimization (QUBO), The Unconstrained Binary Quadratic Programming Problem: A Survey runs some thirty-three pages and should keep you occupied however long you sit on the DC Beltway.

From page 10 of the survey:

Kochenberger, Glover, Alidaee, and Wang (2005) examine the use of UBQP as a tool for clustering microarray data into groups with high degrees of similarity.

Where I read one person’s “similarity” to be another person’s test of “subject identity.”

PS: Enjoy the DC Beltway. You may never see it motionless ever again.

### OpenTOC (ACM SIG Proceedings – Free)

Sunday, January 1st, 2017

OpenTOC

From the webpage:

ACM OpenTOC is a unique service that enables Special Interest Groups to generate and post Tables of Contents for proceedings of their conferences enabling visitors to download the definitive version of the contents from the ACM Digital Library at no charge.

Downloads of these articles are captured in official ACM statistics, improving the accuracy of usage and impact measurements. Consistently linking to definitive versions of ACM articles should reduce user confusion over article versioning.

Conferences are listed by year, 2014 – 2016 and by event.

A step in the right direction.

It didn’t the last time I had a digital library subscription. Contacting the secret ACM committee that decides on web features was verboten.

Enjoy this improvement in access while waiting for ACM access bottlenecks to wither and die.

### Continuous Unix commit history from 1970 until today

Thursday, December 29th, 2016

Continuous Unix commit history from 1970 until today

From the webpage:

The history and evolution of the Unix operating system is made available as a revision management repository, covering the period from its inception in 1970 as a 2.5 thousand line kernel and 26 commands, to 2016 as a widely-used 27 million line system. The 1.1GB repository contains about half a million commits and more than two thousand merges. The repository employs Git system for its storage and is hosted on GitHub. It has been created by synthesizing with custom software 24 snapshots of systems developed at Bell Labs, the University of California at Berkeley, and the 386BSD team, two legacy repositories, and the modern repository of the open source FreeBSD system. In total, about one thousand individual contributors are identified, the early ones through primary research. The data set can be used for empirical research in software engineering, information systems, and software archaeology.

You can read more details about the contents, creation, and uses of this repository through this link.

Two repositories are associated with the project:

• unix-history-repo is a repository representing a reconstructed version of the Unix history, based on the currently available data. This repository will be often automatically regenerated from scratch, so this is not a place to make contributions. To ensure replicability its users are encouraged to fork it or archive it.
• unix-history-make is a repository containing code and metadata used to build the above repository. Contributions to this repository are welcomed.

Not everyone will find this exciting but this rocks as a resource for:

empirical research in software engineering, information systems, and software archaeology

Need to think seriously about putting this on a low-end laptop and sealing it up in a Faraday cage.

Just in case. 😉

### Low fat computing

Thursday, December 22nd, 2016

A summary of the presentation by Schmidt by Malcolm Sparks, along with the presentation itself.

Lots of strange and 3-D printable eye candy for the first 15 minutes or so with Schmidt’s background. Starts to really rock around 20 minutes in with Forth code and very low level coding.

To get a better idea of what Schmidt has been doing, see his website: thi.ng, or his Forth repl in Javascript, http://forth.thi.ng/, or his GitHub repository or at: Github: thi.ng

Stop by at http://toxiclibs.org/ although the material there looks dated.

### Operating Systems Design and Implementation (12th USENIX Symposium)

Thursday, November 17th, 2016

Operating Systems Design and Implementation (12th USENIX Symposium) – Savannah, GA, USA, November 2-4, 2016.

Message from the OSDI ’16 Program Co-Chairs:

We are delighted to welcome to you to the 12th USENIX Symposium on Operating Systems Design and Implementation, held in Savannah, GA, USA! This year’s program includes a record high 47 papers that represent the strength of our community and cover a wide range of topics, including security, cloud computing, transaction support, storage, networking, formal verification of systems, graph processing, system support for machine learning, programming languages, troubleshooting, and operating systems design and implementation.

Weighing in at seven hundred and ninety-seven (797) pages, this tome will prove more than sufficient to avoid annual family arguments during the holiday season.

Not to mention this is an opportunity to hone your skills to a fine edge.

### Understanding the fundamentals of attacks (Theory of Exploitation)

Thursday, November 3rd, 2016

Understanding the fundamentals of attacks – What is happening when someone writes an exploit? by Halvar Flake / Thomas Dullien.

The common “bag of tricks” as Halvar refers to them for hacking, does cover all the major data breaches for the last 24 months.

No zero-day exploits.

Certainly none of the deep analysis offered by Halvar here.

Still, you owe it to yourself and your future on one side or the other of computer security, to review these slides and references carefully.

Even though Halvar concludes (in part)

Exploitation is programming emergent weird machines.

It does not require EIP/RIP, and is not a bad of tricks.

Theory of exploitation is still in embryonic stage.

Imagine the advantages of having mastered the art of exploitation theory at its inception.

In an increasingly digital world, you may be worth your own weight in gold. 😉

PS: Specifying the subject identity properties of exploits will assist in organizing them for future use/defense.

One expert hacker is like a highly skilled warrior.

Making exploits easy to discover/use by average hackers is like a skilled warrior facing a company of average fighters.

The outcome will be bloody, but never in doubt.

### The Hanselminutes Podcast

Friday, August 26th, 2016

I went looking for Felienne’s podcast on code smells and discovered along with it, The Hanselminutes Podcast: Fresh Air for Developers!

Felienne’s podcast is #542 so there is a lot of content to enjoy! (I checked the archive. Yes, there really are 542 episodes as of today.)

### Exploring Code Smells in code written by Children

Friday, August 26th, 2016

From the description:

Felienne is always learning. In exploring her PhD dissertation and her public speaking experience it’s clear that she has no intent on stopping! Most recently she’s been exploring a large corpus of Scratch programs looking for Code Smells. How do children learn how to code, and when they do, does their code “smell?” Is there something we can do when teaching to promote cleaner, more maintainable code?

Felienne discusses a paper due to appear in September on analysis of 250K Scratch programs for code smells.

Thoughts on teaching programmers to detect bug smells?

### If You Believe In OpenAccess, Do You Practice OpenAccess?

Wednesday, June 15th, 2016

CSC-OpenAccess LIBRARY

From the webpage:

CSC Open-Access Library aim to maintain and develop access to journal publication collections as a research resource for students, teaching staff, researchers and industrialists.

You can see a complete listing of the journals here.

Before you protest these are not Science or Nature, remember that Science and Nature did not always have the reputations they do today.

Let the quality of your work bolster the reputations of open access publications and attract others to them.

### How to Run a Russian Hacking Ring [Just like Amway, Mary Kay … + Career Advice]

Sunday, June 12th, 2016

From the post:

A man with intense eyes crouches over a laptop in a darkened room, his face and hands hidden by a black ski mask and gloves. The scene is lit only by the computer screen’s eerie glow.

Exaggerated portraits of malicious hackers just like this keep popping up in movies and TV, despite the best efforts of shows like Mr. Robot to depict hackers in a more realistic way. Add a cacophony of news about data breaches that have shaken the U.S. government, taken entire hospital systems hostage, and defrauded the international banking system, and hackers start to sound like omnipotent super-villains.

But the reality is, as usual, less dramatic. While some of the largest cyberattacks have been the work of state-sponsored hackers—the OPM data breach that affected millions of Americans last year, for example, or the Sony hack that revealed Hollywood’s intimate secrets—the vast majority of the world’s quotidian digital malice comes from garden-variety hackers.

What a downer this would be at career day at the local high school.

Yes, you too can be a hacker but it’s as dull as anything you have seen in Dilbert.

Your location plays an important role in whether Russian hacking ring employment is in your future. Kaveh reports:

Even the boss’s affiliates, who get less than half of each ransom that they extract, make a decent wage. They earned an average of 600 dollars a month, or about 40 percent more than the average Russian worker.

$600/month is ok, if you are living in Russia, not so hot if you aspire to Venice Beach. (It’s too bad the beach cam doesn’t pan and zoom.) The level of technical skills required for low-lying fruit hacking is falling, meaning more competitors for the low-end. Potential profits are going to fall even further. The no liability for buggy software will fall sooner rather than later and skilled hackers (I mean security researchers) will find themselves in demand by both plaintiffs and defendants. You will earn more money if you can appear in court, some expert witnesses make$600/hour or more. (Compare the $600/month in Russia.) Even if you can’t appear in court, for reasons that seem good to you, fleshing out the details of hacks is going to be on demand from all sides. You may start at the shallow end of the pool but resolve to not stay there. Read deeply, practice everyday, start current on new developments and opportunities, contribute to online communities. ### “This guy’s arrogance takes your breath away” Tuesday, May 31st, 2016 From the post: Item No. 155: Correspondence with Edsger Dijkstra. 1979 At the time of this correspondence, Backus had just won the 1977 Turing Award and had chosen to talk about his then-current research on functional programming (FP) for his award lecture in Seattle. See this pdf of the published version, noting that Backus himself described “significant differences” with the talk that was actually given. Indeed, the transcript at the LoC was much more casual and easier to follow. Dijkstra, in his characteristically acerbic and hyperbolic style, wrote a scathing public review (EWD 692) and some private critical remarks in what looks like a series of letters with Backus. From what I can tell, these letters are not part of the E. W. Dijkstra archives at UT Austin, nor are they available online anywhere else. So here they are for posterity. You won’t find Long form exchanges such as these in present-day near instant bait-reply cycles of email messages. That’s unfortunate. Chen has created a Github repository if you are interested in transcribing pre-email documents. You can help create better access to the history of computer science and see how to craft a cutting remark, as opposed to blurting out the first insult that comes to mind. Enjoy! ### Tip #20: Play with Racket [Computer Science for Everyone?] Saturday, January 30th, 2016 From the post: Racket is a programming language in the Lisp tradition that is different from other programming languages in a few important ways. It can be any language you want – because Racket is heavily used for pedagogy, it has evolved into a suite of languages and tools that you can use to explore as many different programming paradigms as you can think of. You can also download it and play with it right now, without installing anything else, or knowing anything at all about computers or programming. Watching Matthias Felleisen’s “big-bang: the world, universe, and network in the programming language” talk will give you an idea of how Racket can be used to help people learn how to think about mathematics, computation, and more. Try it out even if you “hate Lisp” or “don’t know how to program” – it’s really a lot of fun. Aaron and Michael scooped President Obama’s computer science skills for everyone by a day: President Barack Obama said Saturday he will ask Congress for billions of dollars to help students learn computer science skills and prepare for jobs in a changing economy. “In the new economy, computer science isn’t an optional skill. It’s a basic skill, right along with the three R’s,” Obama said in his weekly radio and Internet address….(Obama Wants$4B to Help Students Learn Computer Science)

The “computer science for everyone” is a popular chant but consider the Insecure Internet of Things (IIoT).

Will minimal computer science skills increase or decrease the level of security for the IIoT?

That’s what I think too.

Removal of IoT components is the only real defense. Expect a vibrant cottage industry to grow up around removing IoT components.

### Everything You Know About Latency Is Wrong

Thursday, December 24th, 2015

From the post:

Okay, maybe not everything you know about latency is wrong. But now that I have your attention, we can talk about why the tools and methodologies you use to measure and reason about latency are likely horribly flawed. In fact, they’re not just flawed, they’re probably lying to your face.

When I went to Strange Loop in September, I attended a workshop called “Understanding Latency and Application Responsiveness” by Gil Tene. Gil is the CTO of Azul Systems, which is most renowned for its C4 pauseless garbage collector and associated Zing Java runtime. While the workshop was four and a half hours long, Gil also gave a 40-minute talk called “How NOT to Measure Latency” which was basically an abbreviated, less interactive version of the workshop. If you ever get the opportunity to see Gil speak or attend his workshop, I recommend you do. At the very least, do yourself a favor and watch one of his recorded talks or find his slide decks online.

The remainder of this post is primarily a summarization of that talk. You may not get anything out of it that you wouldn’t get out of the talk, but I think it can be helpful to absorb some of these ideas in written form. Plus, for my own benefit, writing about them helps solidify it in my head.

Great post, not only for the discussion of latency but for two extensions to the admonition (Moon is a Harsh Mistress) “Always cut cards:”

• Always understand the nature of your data.
• Always understand the nature your methodology.

If you fail at either of those, the results presented to you or that you present to others may or may not be true, false or irrelevant.

Treat’s post is just one example in a vast sea of data and methodologies which are just as misleading if not more so.

If you need motivation to put in the work, how’s your comfort level with being embarrassed in public? Like someone demonstrating your numbers are BS.

### Readings in Database Systems, 5th Edition (Kindle Stuffer)

Tuesday, December 15th, 2015

Readings in Database Systems, 5th Edition, Peter Bailis, Joseph M. Hellerstein, Michael Stonebraker, editors.

From the webpage:

1. Preface [HTML] [PDF]
2. Background introduced by Michael Stonebraker [HTML] [PDF]
3. Traditional RDBMS Systems introduced by Michael Stonebraker [HTML] [PDF]
4. Techniques Everyone Should Know introduced by Peter Bailis [HTML] [PDF]
5. New DBMS Architectures introduced by Michael Stonebraker [HTML] [PDF]
6. Large-Scale Dataflow Engines introduced by Peter Bailis [HTML] [PDF]
7. Weak Isolation and Distribution introduced by Peter Bailis [HTML] [PDF]
8. Query Optimization introduced by Joe Hellerstein [HTML] [PDF]
9. Interactive Analytics introduced by Joe Hellerstein [HTML] [PDF]
10. Languages introduced by Joe Hellerstein [HTML] [PDF]
11. Web Data introduced by Peter Bailis [HTML] [PDF]
12. A Biased Take on a Moving Target: Complex Analytics
by Michael Stonebraker [HTML] [PDF]
13. A Biased Take on a Moving Target: Data Integration
by Michael Stonebraker [HTML] [PDF]

Complete Book: [HTML] [PDF]

Previous Editions: [HTML]

Citations to the “reading” do not present themselves as hyperlinks but they are.

If you are giving someone a Kindle this Christmas, consider pre-loading Readings in Database Systems, along with the readings as a Kindle stuffer.

### The Moral Failure of Computer Scientists [Warning: Scam Alert!]

Sunday, December 13th, 2015

From the post:

Computer scientists and cryptographers occupy some of the ivory tower’s highest floors. Among academics, their work is prestigious and celebrated. To the average observer, much of it is too technical to comprehend. The field’s problems can sometimes seem remote from reality.

But computer science has quite a bit to do with reality. Its practitioners devise the surveillance systems that watch over nearly every space, public or otherwise—and they design the tools that allow for privacy in the digital realm. Computer science is political, by its very nature.

That’s at least according to Phillip Rogaway, a professor of computer science at the University of California, Davis, who has helped create some of the most important tools that secure the Internet today. Last week, Rogaway took his case directly to a roomful of cryptographers at a conference in Auckland, New Zealand. He accused them of a moral failure: By allowing the government to construct a massive surveillance apparatus, the field had abused the public trust. Rogaway said the scientists had a duty to pursue social good in their work.

He likened the danger posed by modern governments’ growing surveillance capabilities to the threat of nuclear warfare in the 1950s, and called upon scientists to step up and speak out today, as they did then.

I spoke to Rogaway about why cryptographers fail to see their work in moral terms, and the emerging link between encryption and terrorism in the national conversation. A transcript of our conversation appears below, lightly edited for concision and clarity.

I don’t disagree with Rogaway that all science and technology is political. I might use the term social instead but I agree, there are no neutral choices.

Having said that, I do disagree that Rogaway has the standing to pre-package a political stance colored as “morals” and denounce others as “immoral” if they disagree.

It is one of the oldest tricks in rhetoric but quite often effective, which is why people keep using it.

If Rogaway is correct that CS and technology are political, then his stance for a particular take on government, surveillance and cryptography is equally political.

Not that I disagree with his stance, but I don’t consider it be a moral choice.

Anything you can do to impede, disrupt or interfere with any government surveillance is fine by me. I won’t complain. But that’s because government surveillance, the high-tech kind, is a waste of time and effort.

Rogaway uses scientists who spoke out in the 1950’s about the threat of nuclear warfare as an example. Some example.

The Federation of American Scientists estimates that as of September 2015, there are approximately 15,800 nuclear weapons in the world.

Hmmm, doesn’t sound like their moral outrage was very effective does it?

There will be sessions, presentations, conferences, along with comped travel and lodging, publications for tenure, etc., but the sum of the discussion of morality in computer science with be largely the same.

The reason for the sameness of result is that discussions, papers, resolutions and the rest, aren’t nearly as important as the ethical/moral choices you make in the day to day practice as a computer scientist.

Choices in the practice of computer science make a difference, discussions of fictional choices don’t. It’s really that simple.*

*That’s not entirely fair. The industry of discussing moral choices without making any of them is quite lucrative and it depletes the bank accounts of those snared by it. So in that sense it does make a difference.

### Order of Requirements Matter

Tuesday, December 8th, 2015

Sam Lightstone posted a great illustration of why the order of requirements can matter to Twitter:

Visualizations rarely get much clearer.

You could argue that Minard’s map of Napoleon’s invasion of Russia is equally clear:

But Minard drew with the benefit of hindsight, not foresight.

The Laws of Robotics, on the other hand, have predictive value for the different orders of requirements.

I don’t know how many requirements Honeywell had for the Midas and Midas Black Gas Detectors but you can bet IP security was near the end of the list, if explicit at all.

IP security should be #1 with a bullet, especially for devices that detect Ammonia (caustic, hazarous), Arsine (highly toxic, flammable), Chlorine (extremely dangerous, poisonous for all living organisms), Hydrogen cyanide, and Hydrogen flouride (“Hydrogen fluoride is a highly dangerous gas, forming corrosive and penetrating hydrofluoric acid upon contact with living tissue. The gas can also cause blindness by rapid destruction of the corneas.”)

When IP security is not the first requirement, it’s not hard to foresee the outcome, an Insecure Internet of Things.

Is that what we want?