text:
# 1.2: Vector Algebra

Now that we know what vectors are, we can start to perform some of the usual algebraic operations on them (e.g. addition, subtraction).  Before doing that, we will introduce the notion of a scalar.

Definition 1.3

A scalar is a quantity that can be represented by a single number.

For our purposes, scalars will always be real numbers. The term scalar was invented by $$19^{th}$$ century Irish mathematician, physicist and astronomer William Rowan Hamilton, to convey the sense of something that could be represented by a point on a scale or graduated ruler.  The word vector comes from Latin, where it means "carrier''. Examples of scalar quantities are mass, electric charge, and speed (not velocity). We can now define scalar multiplication of a vector.

Definition 1.4

For a scalar $$k$$ and a nonzero vector $$\textbf{v}$$, the $$\textbf{scalar multiple}$$ of $$\textbf{v}$$ by $$k$$, denoted by $$k\textbf{v}$$, is the vector whose magnitude is $$|k| \,\norm{\textbf{v}}$$, points in the same direction as $$\textbf{v}$$ if $$k > 0$$, points in the opposite direction as $$\textbf{v}$$ if $$k < 0$$, and is the zero vector $$\textbf{0}$$ if $$k = 0$$. For the zero vector $$\textbf{0}$$, we define $$k \textbf{0} = \textbf{0}$$ for any scalar $$k$$.

Two vectors $$\textbf{v}$$ and $$\textbf{w}$$ are $$\textbf{parallel}$$ (denoted by $$\textbf{v} \parallel \textbf{w}$$) if one is a scalar multiple of the other. You can think of scalar multiplication of a vector as stretching or shrinking the vector, and as flipping the vector in the opposite direction if the scalar is a negative number (Figure 1.2.1).

Figure 1.2.1

Recall that $$\textbf{translating}$$ a nonzero vector means that the initial point of the vector is changed but the magnitude and direction are preserved. We are now ready to define the $$\textit{sum}$$ of two vectors.

Definition 1.5

The $$\textbf{sum}$$ of vectors $$\textbf{v}$$ and $$\textbf{w}$$, denoted by $$\textbf{v} + \textbf{w}$$, is obtained by translating $$\textbf{w}$$ so that its initial point is at the terminal point of $$\textbf{v}$$; the initial point of $$\textbf{v} + \textbf{w}$$ is the initial point of $$\textbf{v}$$, and its terminal point is the new terminal point of $$\textbf{w}$$.

Intuitively, adding $$\textbf{w}$$ to $$\textbf{v}$$ means tacking on $$\textbf{w}$$ to the end of $$\textbf{v}$$ (see Figure 1.2.2).

Figure 1.2.2 Adding vectors v and w

Notice that our definition is valid for the zero vector (which is just a point, and hence can be translated), and so we see that $$\textbf{v} + \textbf{0} = \textbf{v} = \textbf{0} + \textbf{v}$$ for any vector $$\textbf{v}$$. In particular, $$\textbf{0} + \textbf{0} = \textbf{0}$$.  Also, it is easy to see that $$\textbf{v} + (-\textbf{v}) = \textbf{0}$$, as we would expect. In general, since the scalar multiple $$-\textbf{v} = -1 \,\textbf{v}$$ is a well-defined vector, we can define $$\textbf{vector subtraction}$$ as follows: $$\textbf{v} - \textbf{w} = \textbf{v} + (-\textbf{w})$$ (Figure 1.2.3).

Figure 1.2.3 Subtracting vectors v and w

Figure 1.2.4 shows the use of "geometric proofs'' of various laws of vector algebra, that is, it uses laws from elementary geometry to prove statements about vectors.  For example, (a) shows that $$\textbf{v} + \textbf{w} = \textbf{w} + \textbf{v}$$ for any vectors $$\textbf{v}$$, $$\textbf{w}$$.  And (c) shows how you can think of $$\textbf{v} - \textbf{w}$$ as the vector that is tacked on to the end of
$$\textbf{w}$$ to add up to $$\textbf{v}$$.

Figure 1.2.4 “Geometric” vector algebra

Notice that we have temporarily abandoned the practice of starting vectors at the origin.  In fact, we have not even mentioned coordinates in this section so far. Since we will deal mostly with Cartesian coordinates in this book, the following two theorems are useful for performing vector algebra on vectors in $$\mathbb{R}^{2}$$ and $$\mathbb{R}^{3}$$ starting at the origin.

Theorem 1.3

Let $$\textbf{v} = (v_{1}, v_{2})$$, $$\textbf{w} = (w_{1}, w_{2})$$ be vectors in $$\mathbb{R}^{2}$$, and let $$k$$ be a scalar.  Then

(a) $$k\textbf{v} = (kv_{1}, kv_{2})$$

(b) $$\textbf{v + w} = (v_{1} + w_{1}, v_{2} + w_{2})$$

Proof: (a) Without loss of generality, we assume that $$v_{1}, v_{2} > 0$$ (the other possibilities are handled in a similar manner).  If $$k = 0$$ then $$k\textbf{v} = 0\textbf{v} = \textbf{0} = (0,0) = (0v_{1}, 0v_{2}) = (kv_{1}, kv_{2})$$, which is what we needed to show.  If $$k \ne 0$$, then $$(kv_{1}, kv_{2})$$ lies on a line with slope $$\frac{kv_{2}}{kv_{1}} = \frac{v_{2}}{v_{1}}$$, which is the same as the slope of the line on which $$\textbf{v}$$ (and hence $$k\textbf{v}$$) lies, and $$(kv_{1}, kv_{2})$$ points in the same direction on that line as $$k\textbf{v}$$.  Also, by formula (1.3) the magnitude of $$(kv_{1}, kv_{2})$$ is $$\sqrt{(kv_{1})^{2} + (kv_{2})^{2}} = \sqrt{k^{2} v_{1}^{2} + k^{2} v_{2}^{2}} = \sqrt{k^{2} (v_{1}^{2} + v_{2}^{2})} = |k| \,\sqrt{v_{1}^{2} + v_{2}^{2}} = |k| \,\norm{\textbf{v}}$$.  So $$k\textbf{v}$$ and $$(kv_{1}, kv_{2})$$ have the same magnitude and direction.  This proves (a).

(b) Without loss of generality, we assume that $$v_{1}, v_{2}, w_{1}, w_{2} > 0$$ (the other possibilities are handled in a similar manner).  From Figure 1.2.5, we see that when translating $$\textbf{w}$$ to start at the end of $$\textbf{v}$$, the new terminal point of $$\textbf{w}$$ is $$(v_{1} + w_{1}, v_{2} + w_{2})$$, so by the definition of $$\textbf{v} + \textbf{w}$$ this must be the terminal point of $$\textbf{v} + \textbf{w}$$.  This proves (b).

Figure 1.2.5

Theorem 1.4

Let $$\textbf{v} = (v_{1}, v_{2}, v_{3})$$, $$\textbf{w} = (w_{1}, w_{2}, w_{3})$$ be vectors in $$\mathbb{R}^{3}$$, let $$k$$ be a scalar.  Then

1. $$k\textbf{v} = (kv_{1}, kv_{2}, kv_{3})$$
2. $$\textbf{v + w} = (v_{1} + w_{1}, v_{2} + w_{2}, v_{3} + w_{3})$$

The following theorem summarizes the basic laws of vector algebra.

Theorem 1.5

For any vectors $$\textbf{u}, \textbf{v}, \textbf{w}$$, and scalars $$k, l$$,
we have

1. $$\textbf{v} + \textbf{w} = \textbf{w} + \textbf{v}$$   Commutative Law
2. $$\textbf{u} + (\textbf{v} + \textbf{w}) = (\textbf{u} + \textbf{v}) + \textbf{w}$$   Associative Law
3. $$\textbf{v} + \textbf{0} = \textbf{v} = \textbf{0} + \textbf{v}$$   Additive Identity
4. $$\textbf{v} + (-\textbf{v}) = \textbf{0}$$   Additive Inverse
5. $$k(l\textbf{v}) = (kl)\textbf{v}$$   Associative Law
6. $$k(\textbf{v} + \textbf{w}) = k\textbf{v} + k\textbf{w}$$   Distributive Law
7. $$(k + l)\textbf{v} = k\textbf{v} + l\textbf{v}$$   Distributive Law

(a) We already presented a geometric proof of this in Figure 1.2.4 (a).

(b) To illustrate the difference between analytic proofs and geometric proofs in vector algebra, we will present both types here.  For the analytic proof, we will use vectors in $$\mathbb{R}^{3}$$ (the proof for $$\mathbb{R}^{2}$$ is similar).

Let $$\textbf{u} = (u_{1}, u_{2}, u_{3})$$, $$\textbf{v} = (v_{1}, v_{2}, v_{3})$$, $$\textbf{w} = (w_{1}, w_{2}, w_{3})$$ be vectors in $$\mathbb{R}^{3}$$.  Then

$\nonumber \begin{split}\textbf{u} + (\textbf{v} + \textbf{w}) &= (u_{1}, u_{2}, u_{3}) + ((v_{1}, v_{2}, v_{3}) + (w_{1}, w_{2}, w_{3})) \\ &= (u_{1}, u_{2}, u_{3}) + (v_{1} + w_{1}, v_{2} + w_{2}, v_{3} + w_{3}) \qquad \qquad &&\text{by Theorem 1.4 (b)} \\ &= (u_{1} + (v_{1} + w_{1}), u_{2} + (v_{2} + w_{2}), u_{3} + (v_{3} + w_{3})) &&\text{by Theorem 1.4 (b)} \\ &= ((u_{1} + v_{1}) + w_{1}, (u_{2} + v_{2}) + w_{2}, (u_{3} + v_{3}) + w_{3}) &&\text{by properties of real numbers} \\ &= (u_{1} + v_{1}, u_{2} + v_{2}, u_{3} + v_{3}) + (w_{1}, w_{2}, w_{3}) &&\text{by Theorem 1.4 (b)} \\ &= (\textbf{u} + \textbf{v}) + \textbf{w} \\ \end{split}$

This completes the analytic proof of (b). Figure 1.2.6 provides the geometric proof.

Figure 1.2.6 Associative Law for vector addition

(c) We already discussed this on p.10.

(d) We already discussed this on p.10.

(e) We will prove this for a vector $$\textbf{v} = (v_{1}, v_{2}, v_{3})$$ in $$\mathbb{R}^{3}$$ (the proof for $$\mathbb{R}^{2}$$ is similar):

$\nonumber \begin{split} k(l\textbf{v}) &= k(lv_{1}, lv_{2}, lv_{3}) \qquad & \text{by Theorem 1.4 (a)} \\ &= (klv_{1}, klv_{2}, klv_{3}) & \text{by Theorem 1.4 (a)} \\ &= (kl)(v_{1}, v_{2}, v_{3}) & \text{by Theorem 1.4 (a)} \\ &= (kl)\textbf{v} \\ \end{split}$

(f) and (g): Left as exercises for the reader.

A $$\textbf{unit vector}$$ is a vector with magnitude 1.  Notice that for any nonzero vector $$\textbf{v}$$, the vector $$\frac{\textbf{v}}{\norm{\textbf{v}}}$$ is a unit vector which points in the same direction as $$\textbf{v}$$, since $$\frac{1}{\norm{\textbf{v}}} > 0$$ and
$$\norm{\frac{\textbf{v}}{\norm{\textbf{v}}}} = \frac{\norm{\textbf{v}}}{\norm{\textbf{v}}} = 1$$.  Dividing a nonzero vector $$\textbf{v}$$ by $$\norm{\textbf{v}}$$ is often called $$\textit{normalizing}$$ $$\textbf{v}$$.

There are specific unit vectors which we will often use, called the $$\textbf{basis vectors}$$: $$\textbf{i} = (1,0,0)$$, $$\textbf{j} = (0,1,0)$$, and $$\textbf{k} = (0,0,1)$$ in $$\mathbb{R}^{3}$$; $$\textbf{i} = (1,0)$$ and $$\textbf{j} = (0,1)$$ in $$\mathbb{R}^{2}$$.  These are useful for several reasons: they are mutually perpendicular, since they lie on distinct coordinate axes; they are all unit vectors: $$\norm{\textbf{i}} = \norm{\textbf{j}} = \norm{\textbf{k}} = 1$$; every vector can be written as a unique scalar combination of the basis vectors: $$\textbf{v} = (a,b) = a\,\textbf{i} + b\,\textbf{j}$$ in $$\mathbb{R}^{2}$$, $$\textbf{v} = (a,b,c) = a\,\textbf{i} + b\,\textbf{j} + c\,\textbf{k}$$ in $$\mathbb{R}^{3}$$. See Figure 1.2.7.

Figure 1.2.7 Basis vectors in different dimensions

When a vector $$\textbf{v} = (a,b,c)$$ is written as $$\textbf{v} = a\,\textbf{i} + b\,\textbf{j} + c\,\textbf{k}$$, we say that $$\textbf{v}$$ is in $$\textit{component form}$$, and that $$a$$, $$b$$, and $$c$$ are the $$\textbf{i}$$, $$\textbf{j}$$, and $$\textbf{k}$$ components, respectively, of $$\textbf{v}$$. We have:

\begin{align*}
\textbf{v} = v_{1}\textbf{i} + v_{2}\textbf{j} + v_{3}\textbf{k}, k \text{ a scalar} &\Longrightarrow k\textbf{v} = kv_{1}\textbf{i} + kv_{2}\textbf{j} + kv_{3}\textbf{k}\\
\textbf{v} = v_{1}\textbf{i} + v_{2}\textbf{j} + v_{3}\textbf{k}, \textbf{w} = w_{1}\textbf{i} + w_{2}\textbf{j} + w_{3}\textbf{k} &\Longrightarrow \textbf{v} + \textbf{w} =
(v_{1}w_{1})\textbf{i} + (v_{2}w_{2})\textbf{j} + (v_{3}w_{3})\textbf{k}\\
\textbf{v} = v_{1}\textbf{i} + v_{2}\textbf{j} + v_{3}\textbf{k} &\Longrightarrow \norm{\textbf{v}} =
\sqrt{v_{1}^{2} + v_{2}^{2} + v_{3}^{2}}
\end{align*}

Example 1.4

Let $$\textbf{v} = (2,1,-1)$$ and $$\textbf{w} = (3,-4,2)$$ in $$\mathbb{R}^{3}$$.

1. Find $$\textbf{v} - \textbf{w}$$.
$$\textit{Solution:}$$ $$\textbf{v} - \textbf{w} = (2 - 3,1 - (-4), -1 - 2) = (-1,5,-3)$$
2. Find $$3\textbf{v} + 2\textbf{w}$$.
$$\textit{Solution:}$$ $$3\textbf{v} + 2\textbf{w} = (6,3,-3) + (6,-8,4) = (12,-5,1)$$
3. Write $$\textbf{v}$$ and $$\textbf{w}$$ in component form.
$$\textit{Solution:}$$ $$\textbf{v} = 2\,\textbf{i} + \textbf{j} - \textbf{k}$$, $$\textbf{w} = 3\,\textbf{i} - 4\,\textbf{j} + 2\,\textbf{k}$$
4. Find the vector $$\textbf{u}$$ such that $$\textbf{u} + \textbf{v} = \textbf{w}$$.
$$\textit{Solution:}$$ By Theorem 1.5, $$\textbf{u} = \textbf{w} - \textbf{v} = -(\textbf{v} - \textbf{w}) = -(-1,5,-3) = (1,-5,3)$$, by part(a).
5. Find the vector $$\textbf{u}$$ such that $$\textbf{u} + \textbf{v} + \textbf{w} = \textbf{0}$$.
$$\textit{Solution:}$$ By Theorem 1.5, $$\textbf{u} = -\textbf{w} - \textbf{v} = -(3,-4,2) - (2,1,-1) = (-5,3,-1)$$.
6. Find the vector $$\textbf{u}$$ such that $$2\textbf{u} + \textbf{i} - 2\,\textbf{j} = \textbf{k}$$.
$$\textit{Solution:}$$ $$2\textbf{u} = -\textbf{i} + 2\,\textbf{j} + \textbf{k} \Longrightarrow \textbf{u} = -\frac{1}{2}\,\textbf{i} + \textbf{j} + \frac{1}{2}\,\textbf{k}$$
7. Find the unit vector $$\frac{\textbf{v}}{\norm{\textbf{v}}}$$.
$$\textit{Solution:}$$ $$\frac{\textbf{v}}{\norm{\textbf{v}}} = \frac{1}{\sqrt{2^{2} + 1^{2} + (-1)^{2}}} \,(2,1,-1) = \left(\frac{2}{\sqrt{6}},\frac{1}{\sqrt{6}},\frac{-1}{\sqrt{6}}\right)$$

We can now easily prove Theorem 1.1 from the previous section.  The distance $$d$$ between two points $$P = (x_{1}, y_{1}, z_{1})$$ and $$Q = (x_{2}, y_{2}, z_{2})$$ in $$\mathbb{R}^{3}$$ is the same as the length of the vector $$\textbf{w} - \textbf{v}$$, where the vectors $$\textbf{v}$$ and $$\textbf{w}$$ are defined as $$\textbf{v} = (x_{1}, y_{1}, z_{1})$$ and $$\textbf{w} = (x_{2}, y_{2}, z_{2})$$ (see Figure 1.2.8).  So since $$\textbf{w} - \textbf{v} = (x_{2} - x_{1}, y_{2} - y_{1}, z_{2} - z_{1})$$, then $$d = \norm{\textbf{w} - \textbf{v}} = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}}$$ by Theorem 1.2.

Figure 1.2.8 Proof of Theorem 1.2: $$d = \norm{\textbf{w}−\textbf{v}}$$


text:
# What is the narrowest interval I=[a,b] such that there are infinitely prime gaps of size in I?

Polymath8b project allowed, building on Zhang's 2013 breakthrough, to prove that there are infinitely prime gaps of size less or equal to 600. Under the generalized Elliott-Halberstam conjecture, one can reach the upper bound 6.

My question is: in early August 2016, what is the narrowest interval $I=[a,b]$ such that we know that there are infinitely many prime gaps whose size belongs to $I$?

I'm essentially interested in unconditional results, but those obtained under very plausible conjectures such as (G)EH and or (G)RH can be of some interest too.

format: plain


text:
# How Can I Improve This Card-Game AI?

Let me get this out there before anything else: this is a learning exercise for me. I am not a game developer by trade or hobby (at least, not seriously) and am purely delving into some AI- and 3D-related topics to broaden my horizons a bit.

As part of the learning experience, I thought I'd have a go at developing a basic card game AI. I selected Pit as the card game I was going to attempt to emulate (specifically, the 'bull and bear' variation of the game as mentioned in the link above). Unfortunately, the rule-set that I'm used to playing with (an older version of the game) isn't described. The basics of it are:

• The number of commodities played with is equal to the number of players.
• The bull and bear cards are included.
• All but two players receive 8 cards, two receive 9 cards.
• A player can win the round with 7 + bull, 8, or 8 + bull (receiving double points).
• The bear is a penalty card.
• You can trade up to a maximum of 4 cards at a time. They must all be of the same type, but can optionally include the bull or bear (so, you could trade A, A, A, Bull - but not A, B, A, Bull).

For those who have played the card game, it will probably have been as obvious to you as it was to me that given the nature of the game, gameplay would seem to resemble a greedy algorithm. With this in mind, I thought it might simplify my AI experience somewhat.

So, here's what I've come up with for a basic AI player to play Pit... and I'd really just like any form of suggestion (from improvements to reading materials) relating to it.

Here it is in something vaguely pseudo-code-ish ;)

While AI does not hold 7 similar + bull, 8 similar, or 8 similar + bull, do:
1. Establish 'target' hand, by seeing which card AI holds the most of.
2. Prepare to trade next-most-numerous card type in a trade (max. held, or 4, whichever is fewer)
3. If holding the bear, add to (if trading <=3 cards) or replace in (if trading 4 cards) hand.
5. If cards are accepted for trade within X turns, continue (clearing 'failed card types').
Otherwise:
a. If only one card remains in the trade, go to #6.
Otherwise:
i. Remove one non-penalty card from the trade.
6. Add card type to temporary list of failed card types.
7. Repeat from #2 (excluding 'failed card types').

I'm aware this is likely to be a sub-optimal way of solving the problem, but that's why I'm posting this question. Are there any AI- or algorithm-related concepts that I've missed and should be incorporating to make a better AI? Additionally, what are the flaws with my AI at present (I'm well aware it's probably far from complete)?


text:
# Favorite operating systems

Homework Helper
Gold Member
Maybe I should have presented this as a poll: But what are the favorite computer operating systems among Mathematics, Physics, and Engineering enthusiasts (students, professionals, teachers, researchers)? Any particular or general reasons why?

Homework Helper
Do you really want to know? :tongue:

Well, MS-DOS is one of my favourites. Nostalgy, I guess.

Gold Member
As a student I use linux based systems in my computer engineering courses for hardware based programming in assembly and C/C++. The reason is becuase it comes with all the needed libraries right from the install so there is no need to go looking for them. And also there are no licensing issues to worry about.

Gold Member
All the *nix flavors.....

Anttech
IOS... But it was actually made from Unix I believe.

I use *nix at home along with xp and osX. My preference depends on what I am trying to do.. I use osx the most however, and I like the interface, and even more so I like what is under the hood... For Buisness application I prefer Unix or Solaris.

Last edited:
Homework Helper
Gold Member
I like a cygwin-windows combination.

neutrino
I've been sticking to Linux for the past few months. I've not tried out all the flavours, so I'm still a newbie. I still have XP sitting for a few things. Once I find apps that can do stuff that I rely XP for, then I will bid farewell to Windows. (Actually, the rest of the world would do that too, if they can find the suitable programs that run on Linux )

Gold Member
I've been sticking to Linux for the past few months. I've not tried out all the flavours, so I'm still a newbie. I still have XP sitting for a few things. Once I find apps that can do stuff that I rely XP for, then I will bid farewell to Windows. (Actually, the rest of the world would do that too, if they can find the suitable programs that run on Linux )

If you want to try all the flavors, you have a long way to go. There are over 350 distros out there ;) If you are looking for win32 equivalent apps, you can look through this list for some suggestion.

neutrino
I don't want to go through all the distros, at least not right now...I'm not that adventurous. May be the most popular ones, with a large user base and support, in the near future, say FC, openSUSE, et.al. In fact, new ones are popping up like mushrooms on a daily basis. There's one distro, and there are two others, which are same excpet for desktop environments, and the one with closed-source stuff pre-installed, and one with no closed-source stuff at all, and then there's one with a religious bias!

Gold Member
...and one with a religious bias!

Could this be Ubuntu for Christians (Ubuntu Christian Edition)? :rofl:

I tend to stick with the only open source software (even games!). I dislike having any closed source software on my [linux] machine. IMHO, it goes against the philosophy of GNU/Linux. I tend to limit myself to rpm and pkg based distros only. It helps in the decision process of figuring out what new distro to use next.

Last edited:
neutrino
Could this be Ubuntu for Christians (Ubuntu Christian Edition)? :rofl:

Actually, I listed all the off-shoots of Ubuntu there, including Ubuntu CE. K/X/Ubuntu, Linux Mint, gNewSense and Ubuntu CE.

I tend to stick with the only open source software (even games!). I dislike having any closed source software on my [linux] machine. IMHO, it goes against the philosophy of GNU/Linux. I tend to limit myself to rpm and pkg based distros only. It helps in the decision process of figuring out what new distro to use next.

I just have a few proprietary software on borad (Ubuntu 6.10). Acrobat Reader, Opera, although I Firefox is my browser of choice.

Last edited:
Moridin
My opinion is that Windows is the worlds best operating system based on the fact that even though it has its downs, it is still designed to be usable for a variety of users ranging from retired to beginners and it isn't that shameful for programming either.

However, as a not-so-generic computer user, I would have to say any open source (ish) system designed for programming, modeling and overall computations. Take your pick.

Anttech
My opinion is that Windows is the worlds best operating system based on the fact that even though it has its downs,
Actually it really does depend on what systems you want to operate, right? Windows wouldnt be the worlds best operating system for a fridge or perhaps a space shuttle now would it

Anyway I disaggree and would say that a Mac is far easier to use than windows, (for a desktop pc)... But easy of use for me doesnt equate with best

Moridin
Actually it really does depend on what systems you want to operate, right? Windows wouldnt be the worlds best operating system for a fridge or perhaps a space shuttle now would it

Anyway I disaggree and would say that a Mac is far easier to use than windows, (for a desktop pc)... But easy of use for me doesnt equate with best

True.

What I meant to say was that Windows is one of the most all around versatile operating systems.

Gold Member
True.

What I meant to say was that Windows is one of the most all around versatile operating systems.

It depends on your perception of "all around versatile".

Gold Member
Waiting on my dual boot Fedora Core--XP laptop right now......

Homework Helper
It depends on your perception of "all around versatile".
:rofl: Versatile is what's available that gets the job done with the least amount of aggavation on my part.

In the case of uPs there is no OS, you write your own.

I might note that MS DOS could be considered a variant of UNIX. :tongue2:

Anttech
I might note that MS DOS could be considered a variant of UNIX.
Why?............................

Gold Member
Here's several pictures of my new laptop that will run my "preferred" operating system -- Solaris.

http://www.flickr.com/photos/85894987@N00/sets/72157594511620201/ [Broken]

Last edited by a moderator:
neutrino
And now we have distros working together
http://www.desktoplinux.com/news/NS7103672739.html [Broken]

Last edited by a moderator:
Gold Member
I might note that MS DOS could be considered a variant of UNIX.

Not really though. A command line based OS is not like Unix just becuase of the command line. Its methodology is far different. The only OS that comes close to Unix is Linux (not sure about OSX).

Homework Helper
Not really though. A command line based OS is not like Unix just becuase of the command line. Its methodology is far different. The only OS that comes close to Unix is Linux (not sure about OSX).

With the exception of multitasking, I don't think the methadology is all that different.
Having worked with both, many of the commands and internal functions seem much the same.

Somewhere along the line I seem to recall that UNIX(LINUX), CPM(obsolete for years) and DOS all have roots in IBMs VM operating system.

Gold Member
With the exception of multitasking, I don't think the methadology is all that different.
Having worked with both, many of the commands and internal functions seem much the same.

Somewhere along the line I seem to recall that UNIX(LINUX), CPM(obsolete for years) and DOS all have roots in IBMs VM operating system.

I'll counter that by saying, having worked with both, the internal functions and commands arent the same Just a quick example, Unix manages its physical devices and hardware components in a different way than DOS- things such as mounting, the /dev directory, physical storage mediums treated as "real" directories.

Unix (1970's) was developed in Bell Labs(AT&T) using the C programming language. Linux was developed in 1991 (independent of IBM). I can only recall that MS DOS, OS/2, and Windows being developed as a result of IBM. IBM had nothing to do with Unix and Linux.

Last edited:
mattmns
Ubuntu for Christians? Ubuntu has gone a long way since the "porn distro" or was it "nude distro," I can't remember. Ahh, those great ubuntu wallpapers, best time of the month

Gold Member
Ubuntu for Christians? Ubuntu has gone a long way since the "porn distro" or was it "nude distro," I can't remember. Ahh, those great ubuntu wallpapers, best time of the month

They had a "porn distro"? wow! (And I promise I wont go looking for it). They also have Ubuntu Satanic Edition :surprised

mattmns
:rofl: Nah, it was a monthly wallpaper that featured semi-nude models. They stopped using it 2 years ago or so. Because of this some people jokingly called Ubuntu the "porn distro"

*cough* search google for "ubuntu calendar" and you can find some of the wallpapers.

Homework Helper
I'll counter that by saying, having worked with both, the internal functions and commands arent the same Just a quick example, Unix manages its physical devices and hardware components in a different way than DOS- things such as mounting, the /dev directory, physical storage mediums treated as "real" directories.

Unix (1970's) was developed in Bell Labs(AT&T) using the C programming language. Linux was developed in 1991 (independent of IBM). I can only recall that MS DOS, OS/2, and Windows being developed as a result of IBM. IBM had nothing to do with Unix and Linux.

I did find this
ironically enough, DOS 2.0 eclipsed CP/M largely because Microsoft's co-founder Paul Allen merged in Unix features including subdirectories and pipes).

Gold Member
IBM was, indeed, fairly late to the UNIX game. They stayed true to the mainframe way until the mid 80s, when they decided to hire several UNIX vendors (Bull and INTERACTIVE UNIX Systems) to integrate various bits of SVR3 and BSD 4.2 and 4.3, where the end result was AIX.

Last edited:
Gold Member
Not really though. A command line based OS is not like Unix just becuase of the command line. Its methodology is far different. The only OS that comes close to Unix is Linux (not sure about OSX).

OS X is actually much closer to UNIX than Linux is. OS X derives from NeXTSTEP, which was essentially Mach plus various bits from BSD 4.2 or 4.3, and thus can be traced back to one of the Bell Labs' releases of UNIX. Linux, on the other hand, shares no code with any of the derivatives of Bell Labs' UNIX.

neutrino
*cough* search google for "ubuntu calendar" and you can find some of the wallpapers.
coughr search the top-rated wallpapers at gnome-look.org:cough

Anttech
Not really though. A command line based OS is not like Unix just becuase of the command line. Its methodology is far different. The only OS that comes close to Unix is Linux (not sure about OSX).

Mac OSX is Unix, so it is closer than Linux. The windowing system is aqua, but under the hood it is a Unix, in fact it is open sourced Darwin.

http://developer.apple.com/opensource/index.html

Last edited:
Anttech
With the exception of multitasking, I don't think the methadology is all that different.
Having worked with both, many of the commands and internal functions seem much the same.

Somewhere along the line I seem to recall that UNIX(LINUX), CPM(obsolete for years) and DOS all have roots in IBMs VM operating system.

Sorry that isnt true, you still have crossover now with some of the shell command, like cd for example. The whole file system is structured different, the kernal is different, Dos is not a mulituser enviroment, Unix is, security wasnt implemeted in dos, it was in Unix.

Yes M$stole some part of the Unix code, but its a far streach from saying its a variant of Unix. Science Advisor Homework Helper Sorry that isnt true, you still have crossover now with some of the shell command, like cd for example. The whole file system is structured different, the kernal is different, Dos is not a mulituser enviroment, Unix is, security wasnt implemeted in dos, it was in Unix. Yes M$ stole some part of the Unix code, but its a far streach from saying its a variant of Unix.
It's my opinion is that if it walks like a duck and talks like a duck....

In the sense that you mean, that actual original code was imported then ok.
Under your concept the generic Intel machine bears no relation to the original IBM PC since the BIOS was developed independently to avoid copywrite restrictions.
The new BIOS was, however, developed to work identically.

As far as the file system goes.
When DOS 2.0 was released a 5meg HDD cost as much as a new car.
That they added the UNIX structures to the existing floppy drive access system for some compatibility, was IMO, more of a concession to the existing user base.

Anttech
It's my opinion is that if it walks like a duck and talks like a duck....
Its a cow pretending to be a duck?


text:
scroll identifier for mobile
main-content

## Über dieses Buch

The LNCS journal Transactions on Large-Scale Data- and Knowledge-Centered Systems focuses on data management, knowledge discovery, and knowledge processing, which are core and hot topics in computer science. Since the 1990s, the Internet has become the main driving force behind application development in all domains. An increase in the demand for resource sharing across different sites connected through networks has led to an evolution of data- and knowledge-management systems from centralized systems to decentralized systems enabling large-scale distributed applications providing high scalability. Current decentralized systems still focus on data and knowledge as their main resource. Feasibility of these systems relies basically on P2P (peer-to-peer) techniques and the support of agent systems with scaling and decentralized control. Synergy between grids, P2P systems, and agent technologies is the key to data- and knowledge-centered systems in large-scale environments. This, the ninth issue of Transactions on Large-Scale Data- and Knowledge-Centered Systems, contains five revised selected regular papers focusing on the following topics: top-k query processing in P2P systems, self-stabilizing consensus average algorithms in distributed sensor networks, recoverable encryption schemes, xml data in a multi-system environment, and pairwise similarity for cluster ensemble problems.

## Inhaltsverzeichnis

### As-Soon-As-Possible Top-k Query Processing in P2P Systems

Top-k query processing techniques provide two main advantages for unstructured peer-to-peer (P2P) systems. First they avoid overwhelming users with too many results. Second they reduce significantly network resources consumption. However, existing approaches suffer from long waiting times. This is because top-k results are returned only when all queried peers have finished processing the query. As a result, query response time is dominated by the slowest queried peer. In this paper, we address this users’ waiting time problem. For this, we revisit top-k query processing in P2P systems by introducing two novel notions in addition to response time: the stabilization time and the cumulative quality gap. Using these notions, we formally define the as-soon-as-possible (ASAP) top-k processing problem. Then, we propose a family of algorithms called ASAP to deal with this problem. We validate our solution through implementation and extensive experimentation. The results show that ASAP significantly outperforms baseline algorithms by returning final top-k result to users in much better times.
William Kokou Dédzoé, Philippe Lamarre, Reza Akbarinia, Patrick Valduriez

### Self-stabilizing Consensus Average Algorithm in Distributed Sensor Networks

One important issue in sensor networks that has received renewed interest recently is average consensus, i.e., computing the average of n sensor measurements, where nodes iteratively exchange data with their neighbors and update their own data accordingly until reaching convergence to the right parameters estimate. In this paper, we introduce an efficient self-stabilizing algorithm to achieve/ensure the convergence of node states to the average of the initial measurements of the network. We prove that the convergence of the fusion process is finite and express an upper bound of the actual number of moves/iterations required by the algorithm. This means that our algorithm is guaranteed to reach a stable situation where no load will be sent from one sensor node to another. We also prove that the load difference between any two sensor nodes in the network is within $$\frac{\varepsilon}{D}\times\left\lfloor\frac{D+1}{2}\right\rfloor<\varepsilon,$$ where ε is the prescribed global equilibrium threshold (this threshold is given by the system) and D is the diameter of the network.

### Recoverable Encryption through a Noised Secret over a Large Cloud

The safety of keys is the Achilles’ heel of cryptography. A key backup at an escrow service lowers the risk of loosing the key, but increases the danger of key disclosure. We propose Recoverable Encryption (RE) schemes that alleviate the dilemma. RE encrypts a backup of the key in a manner that restricts practical recovery by an escrow service to one using a large cloud. For example, a cloud with ten thousand nodes could recover a key in at most 10 minutes with an average recovery time of five minutes. A recovery attempt at the escrow agency, using a small cluster, would require seventy days with an average of thirty five days. Large clouds have become available even to private persons, but their pay-for-use structure makes their use for illegal purposes too dangerous. We show the feaibility of two RE schemes and give conditions for their deployment.
Sushil Jajodia, Witold Litwin, Thomas Schwarz SJ

### Conservative Type Extensions for XML Data

We introduce a method for building a minimal XML type (belonging to standard class of regular tree grammars) as an extension of other given types. Not only do we propose an easy-to-handle XML type evolution method, but we prove that this method computes the smallest extension of a given tree grammar, respecting pre-established constraints. We also adapt our technique to an interactive context, where an advised user is guided to build a new XML type from existing ones. A basic prototype of our tool is implemented.
Jacques Chabin, Mirian Halfeld Ferrari, Martin A. Musicante, Pierre Réty

### Pairwise Similarity for Cluster Ensemble Problem: Link-Based and Approximate Approaches

Cluster ensemble methods have emerged as powerful techniques, aggregating several input data clusterings to generate a single output clustering, with improved robustness and stability. In particular, link-based similarity techniques have recently been introduced with superior performance to the conventional co-association method. Their potential and applicability are, however limited due to the underlying time complexity. In light of such shortcoming, this paper presents two approximate approaches that mitigate the problem of time complexity: the approximate algorithm approach (Approximate SimRank Based Similarity matrix) and the approximate data approach (Prototype-based cluster ensemble model). The first approach involves decreasing the computational requirement of the existing link-based technique; the second reduces the size of the problem by finding a smaller, representative, approximate dataset, derived by a density-biased sampling technique. The advantages of both approximate approaches are empirically demonstrated over 22 datasets (both artificial and real data) and statistical comparisons of performance (with 95% confidence level) with three well-known validity criteria. Results obtained from these experiments suggest that approximate techniques can efficiently help scaling up the application of link-based similarity methods to wider range of data sizes.
Natthakan Iam-On, Tossapon Boongoen

### Backmatter

Weitere Informationen

## BranchenIndex Online

Die B2B-Firmensuche für Industrie und Wirtschaft: Kostenfrei in Firmenprofilen nach Lieferanten, Herstellern, Dienstleistern und Händlern recherchieren.

## Whitepaper

- ANZEIGE -

### Best Practices für die Mitarbeiter-Partizipation in der Produktentwicklung

Unternehmen haben das Innovationspotenzial der eigenen Mitarbeiter auch außerhalb der F&E-Abteilung erkannt. Viele Initiativen zur Partizipation scheitern in der Praxis jedoch häufig. Lesen Sie hier  - basierend auf einer qualitativ-explorativen Expertenstudie - mehr über die wesentlichen Problemfelder der mitarbeiterzentrierten Produktentwicklung und profitieren Sie von konkreten Handlungsempfehlungen aus der Praxis.


text:
What's new
Frozen In Carbonite

Welcome to FIC! Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

# How would you make NieR: Automata a better game?

#### Recycler

##### Member
I'm not saying it's bad, because by all means it isn't, there are just some things I personally would improve about it.

Technical:

Improve the graphics so that they're more hi-res, instead of what we see in unmodified versions of the game. Get rid of the invisible walls and have natural-feeling barriers telling the player where they can and cannot go. Make the environments more varied, and have the physical areas of the map be significantly larger, so that it isn't jarring to go from a barren desert to a lush temperate forest to coastal ruins in only a few thousand feet.

Have the enemies level up with the player, so that people who grind to Level 99 aren't replaying the game and getting bored as hell killing everything in one hit. In fact, get rid of leveling altogether, and have how much damage the player does be based on their gear and skillset, as well as the type of enemies they're fighting. Also, improve the difficulty settings so that Hard isn't so hard and Normal isn't so easy. Maybe have Hard be that enemies do 200% more damage and have 200% more health, instead of doing 400% more damage and nothing else.

Find a balance between having Autosave and not; Maybe give the player the chance to save at the beginning of every sub-chapter, with an "Are you sure you don't want to save?" message if they choose no, and if they choose yes, have them dropped in where they left off instead of an Access Point when they load up the game again.

Storytelling:

My biggest gripe with Yoko Taro is that he put so much interesting content into mediums that most players will never see, like side novellas and stage plays, and even an optional in-game text adventure that could have been a phenomenal DLC. Put this stuff in the center view instead of on the side so that the story is more complete and players aren't left with so many questions.

Get rid of the joke endings. They're pointless, and they don't even have any cutscenes, not even Ending Y.

Make it as stupidly obvious as possible that Ending A isn't the end of the game. Don't just have a text blurb after the credits telling players that there's more stuff to see; give them a "Start Route B and continue the story?" option as well, so that they have no excuse to think it's the end.

So, yeah. Those are my two cents, and I hope this thread encourages others to share theirs' as well.

#### Eliar

##### Well-known member
More robot waifus and make wearing panties or thongs optional. More fetish gear. Blindfolds and chokers are well and good but to attract the discerning player, ropes, hot wax and handcuffs are a must.

Last edited:

Author
Less clothing

#### Recycler

##### Member
More robot waifus and make wearing panties or thongs optional. More fetish gear. Blindfolds and chokers are well and good but to attract the discerning player, ropes, hot wax and handcuffs are a must.
Less clothing
Not that kind of thread, mates. I'm kind of hoping for serious, non-pervy answers here.

#### Arcanist

##### Incognito
Not that kind of thread, mates. I'm kind of hoping for serious, non-pervy answers here.
To be honest, most of your complaints are kind of part of the charm of the game to me. :/

#### Recycler

##### Member
To be honest, most of your complaints are kind of part of the charm of the game to me. :/
Could you elaborate?

#### Arcanist

##### Incognito
Could you elaborate?
Maybe the way he went about it wasn't optimal but I appreciate that your exploration is rewarded with infos, stories and so on. Even the swords you use all have their stories and tales to tell if you take the time to improve them. To me it makes it all so much more compelling than simply getting a lore dump like so many games tend to do.

The joke endings themselves have the added benefit of enticing the players to discover more of the world, to see what kind of crazy or funny endings the developpers may have thought of. (And discover more of the world at the same time)

I also thought the way they handled saves rather creative in how they incorporated it into the gameplay.

#### Recycler

##### Member
@NotArcanist Thank you for your honesty. What about my post do you agree with, if I may ask?

#### Arcanist

##### Incognito
@NotArcanist Thank you for your honesty. What about my post do you agree with, if I may ask?
The environment was repetitive and a bit dull in some places. Especially the desert. The way environment changed so quickly too was a bit weird and there were a lot of places that were missing a "je-ne-sais-quoi' to really feel post-apocalyptic.

But considering the limited budget they had, that's understandable, it wasn't exactly expected to succeed as much as it did.

#### Rufus Shinra

##### Well-known member
The environment was repetitive and a bit dull in some places. Especially the desert. The way environment changed so quickly too was a bit weird and there were a lot of places that were missing a "je-ne-sais-quoi' to really feel post-apocalyptic.

But considering the limited budget they had, that's understandable, it wasn't exactly expected to succeed as much as it did.
The quick change of environment was weird, yep, but I really appreciated the Pripyat feel of an abandoned place the city had. Considering the background story, it felt adequate to me.

#### Arcanist

##### Incognito
The quick change of environment was weird, yep, but I really appreciated the Pripyat feel of an abandoned place the city had. Considering the background story, it felt adequate to me.
It is more places like the desert that were dull outside of a few locations like the ruined apartments. I also found the Castle of the Forest part a bit... yeah. It really didn't feel like the ruin of an old world/remnant of a cultural heritage that somehow survived and more like a strange fake simile of one. Maybe the Machines were the ones to built it but why is it in ruins then?

#### Rufus Shinra

##### Well-known member
It is more places like the desert that were dull outside of a few locations like the ruined apartments. I also found the Castle of the Forest part a bit... yeah. It really didn't feel like the ruin of an old world/remnant of a cultural heritage that somehow survived and more like a strange fake simile of one. Maybe the Machines were the ones to built it but why is it in ruins then?
If it feels like a fake simile, then it is good. A very large part of the theme of the game is about machines trying and stumbling at understanding and copying what they believed humanity was. I wouldn't be surprised that the amusement park was just as fake and machine-built as the castle likely is. That game is about... cargo-cult by the cargo itself. It makes the machines so much more human than any human-looking body could.

Hell, they could have built the castle as a ruin from Day 1 because that's how they found other castles in archives and didn't understand the function of it. They mimic, they fail at understanding, but they try, and what is not to admire in this perseverance at trying to understand this strange mystery. Everything is fake in this game. That's the point.

#### Recycler

##### Member
I also found the Castle of the Forest part a bit... yeah. It really didn't feel like the ruin of an old world/remnant of a cultural heritage that somehow survived and more like a strange fake simile of one. Maybe the Machines were the ones to built it but why is it in ruins then?
Hell, they could have built the castle as a ruin from Day 1 because that's how they found other castles in archives and didn't understand the function of it.

This is apparently the backstory of the castle. In all likelihood it was rebuilt by androids that grossly misplaced where a 15th Century German castle should go.

#### Recycler

##### Member
Sorry for the double-post, but I thought of something.

But considering the limited budget they had, that's understandable, it wasn't exactly expected to succeed as much as it did.
What sort of budget would a game like Automata have? The most I ever heard was that it was "under $20 million". #### Rabe ##### I identfy as a 9000 series intelligences Not that kind of thread, mates. I'm kind of hoping for serious, non-pervy answers here. Well jonny did you ever pick the wrong bunch. all O-types get virgin killer sweaters? #### Arcanist ##### Incognito What sort of budget would a game like Automata have? The most I ever heard was that it was "under$20 million".
I don't think they disclosed it but it wasn't that big considering he didn't have any money or manpower left for DLCs when the game came out in 2017.

With such an insane success though, he is likely to get more resources for the next iteration.

#### Rufus Shinra

##### Well-known member
I don't think they disclosed it but it wasn't that big considering he didn't have any money or manpower left for DLCs when the game came out in 2017.

With such an insane success though, he is likely to get more resources for the next iteration.
Dunno if more money will make things better. The quality came mainly from the writing and the concepts at hand.

#### 50 Icy Spear Mends Space

##### Well-known member
Temp Banned
Being able to see 2B's anus around her thong, like in real life.

#### Recycler

##### Member
Being able to see 2B's anus around her thong, like in real life.
...Yoko Taro made a horrible, horrible mistake when he spread that shitty "perfectly rendered butthole" meme like the flu...

Like, I'm sorry if I'm being rude, but I can't stand it when all people think about when they look at NieR is "that game where you blow up a girl to look at her panties". I'm not saying that you, @50 Icy Spear Mends Space are like that, and I apologize in advance if this is rude, but I feel that that comment highlights a problem the fandom has.

It's frustrating as hell, to put it mildly.

#### 50 Icy Spear Mends Space

##### Well-known member
Temp Banned
...Yoko Taro made a horrible, horrible mistake when he spread that shitty "perfectly rendered butthole" meme like the flu...

Like, I'm sorry if I'm being rude, but I can't stand it when all people think about when they look at NieR is "that game where you blow up a girl to look at her panties". I'm not saying that you, @50 Icy Spear Mends Space are like that, and I apologize in advance if this is rude, but I feel that that comment highlights a problem the fandom has.

It's frustrating as hell, to put it mildly.
Why do you have a problem with that? Curious to hear about it. God knows I've cranked it to more than a few images & videos of futa tubby banging nunez.

#### Rufus Shinra

##### Well-known member
Why do you have a problem with that? Curious to hear about it. God knows I've cranked it to more than a few images & videos of futa tubby banging nunez.
It's unnecessary and unwelcome in a game which value lies in the concept and meta-narration. The loli part is necessary to the narration in that it makes the characterization a complete uncanny valley, all three main characters being doll-like in contrast to the blunt machines while both groups are undergoing a narrative process that is deliberately unsettling in their search for humanity. Going too far however with stupid kink makes it much easier to miss the entire point of the story.

It'd be like adding huge gunfights in Tarkovsky's Stalker or space battles in Kubrick's 2001.

Take Blade Runner 2049: the sex scene was designed to be unsettling, to reach that moment of uncanny valley that disturbs the viewer on the multiple implications of a biological android getting it with his virtual waifu through a human prostitute. The disturbing nature of the scene is key to its strength. Going with porn or stuff kills the value of the work. I'm happy to actually have learned of this in this thread rather than before or during my playthrough.

Last edited:

#### Vyor

##### Well-known member
It's unnecessary and unwelcome in a game which value lies in the concept and meta-narration. The loli part is necessary to the narration in that it makes the characterization a complete uncanny valley, all three main characters being doll-like in contrast to the blunt machines while both groups are undergoing a narrative process that is deliberately unsettling in their search for humanity. Going too far however with stupid kink makes it much easier to miss the entire point of the story.

It'd be like adding huge gunfights in Tarkovsky's Stalker or space battles in Kubrick's 2001.

Take Blade Runner 2049: the sex scene was designed to be unsettling, to reach that moment of uncanny valley that disturbs the viewer on the multiple implications of a biological android getting it with his virtual waifu through a human prostitute. The disturbing nature of the scene is key to its strength. Going with porn or stuff kills the value of the work. I'm happy to actually have learned of this in this thread rather than before or during my playthrough.
That's just you being pretentious.

On the thread topic: make it run better than shit. I should not get stuttering when there is nothing about but dirt and sandy robots; not when I can run Doom 2016 on ultra and get 45FPS.

The difficulty spikes need smoothing out too, if I do every side quest before progressing the story, the next story mission should not have a mob that 2 shots me. I'm good at video games, I ain't that good.

#### Rufus Shinra

##### Well-known member
That's just you being pretentious.
Sorry if you can't actually take a step back and look a bit further at the narration. But don't worry, you have many Call of Duty games to enjoy for their story. Or you could try Serious Sam, it should fit you well too.
The difficulty spikes need smoothing out too, if I do every side quest before progressing the story, the next story mission should not have a mob that 2 shots me. I'm good at video games, I ain't that good.
The only difficult part of the game is the Touhou-level nightmare at the end to unlock the final ending. Everything else is pretty easy if you take a few minutes to understand the mechanics and get decent chips for your characters. Don't blame the game design when it's pretty well done by people known for their experience in the field.

#### Vyor

##### Well-known member
Sorry if you can't actually take a step back and look a bit further at the narration. But don't worry, you have many Call of Duty games to enjoy for their story. Or you could try Serious Sam, it should fit you well too.
I enjoy story in games and quite liked Nier's. All of the series has quite good storytelling, though it's often rather nihilistic in nature, leading me to prefer Automata's more. It falls flat on environmental storytelling however, with the set being relegated to background detail and the whole "earth is dead" thing being outright told to you up front.

I can just enjoy porn as well as getting the full experience of the game and neither one affects the other. Because I can separate them. Like most rational people.

The only difficult part of the game is the Touhou-level nightmare at the end to unlock the final ending. Everything else is pretty easy if you take a few minutes to understand the mechanics and get decent chips for your characters. Don't blame the game design when it's pretty well done by people known for their experience in the field.
They place an extremely high level quest right near a story mission. Where you have to track down an awol android specifically. Doesn't help that for me said tracking mission broke and was uncompletable forcing me to restart, but walking along and suddenly being 2 shot by a miniboss mob while going to a different quest was not in any way pleasant. But sure, blame my playing.

#### Recycler

##### Member
Why do you have a problem with that? Curious to hear about it. God knows I've cranked it to more than a few images & videos of futa tubby banging nunez.
@Rufus Shinra summed up things rather nicely in the post after yours. I'm fine with sexualization in video games (otherwise I would loathe the original NieR game for featuring Kainé and her even-more-revealing outfit), I just want it to mean something other than fan service.

The difficulty spikes need smoothing out too, if I do every side quest before progressing the story, the next story mission should not have a mob that 2 shots me. I'm good at video games, I ain't that good.
Maybe it's because I only played on Easy Mode with the auto-chips equipped until my latest playthrough, but I personally had the opposite problem; Do too many side-quests in Route A and you're fairly over-leveled in Route B. When I fought Simone it was a cakewalk, despite me being something like 5 levels below her.


text:
# About free quarks and confinement

I simply know that a single free quark does not exist. What is the reason that we can not get a free quark?

If we can't get a free quark then what is single-top-quark?

A free quark is like the free end of a rubber band. If you want to make the ends of a rubber band free you have to pull them apart, however the farther apart you pull them the more energy you have to put in. If you wanted to make the ends of the rubber band truly free you'd have to make the separation between them infinite, and that would require infinite energy. What actually happens is that the rubber band snaps and you get four ends instead of the two you started with.

Similarly, if you take two quarks and try and pull them apart the force between them is approximately independent of distance, so to pull them apart to infinity would take infinite energy. What actually happens is that at some distance the energy stored in the field between them gets high enough to create more quarks, and in stead of two separated quarks you get two pairs of quarks.

This doesn't happen when you pull apart a proton and electron because the force between them falls according to the inverse square law. The difference between the electron/proton pair and a pair of quarks is that the force between the quarks doesn't fall according to the inverse square law. Instead at sufficiently long distances it becomes roughly constant.

I don't think this is fully understood (it certainly isn't fully understood by me :-), but it's thought to be because the lines of force in the quark-quark field represent virtual gluons, and gluons attract each other. This means the lines of force collect together to form a flux tube. By contrast the electron-proton force is transmitted by virtual photons and photons do not attract each other.

Finally, top quarks are usually produced as a top anti-top pair. It is possible to create a single top quark, but it's always paired with a quark of a different type so you aren't creating a free quark.

John Rennie's answer is good, just a few words to add on 'single top quarks'. The mental image of rubber bands works fine at low energies. Maybe you've heard about mesons or baryons, or simply particles like the pion. These are 'bound states of quarks', i.e. what happens when you break the rubber band and create a new pair of quarks. Then a quark + anti-quark form a pair together.

At accelerators, you can get beyond this description: collision energies at modern accelerators as the LHC are (roughly) 100-1000 times higher than the energy that binds quarks together. So in the middle of a collision you can forget about rubber bands and imagine that quarks behave just like single electrons. But then quarks lose energy (for example due to radiation), so inevitably they'll go to the phase where they form bound states and you're back at the rubber band-description. This process is called hadronisation.

Finally a word on 'colour confinement' (the term people use to explain why free quarks don't exist). Each quark or gluon has a 'color charge' (which is just a quantum number). To get a colour-neutral object, you need at least two quarks in a bound state, but you can have more. (This is just $SU(3)$ group theory.) So if you assume that all physical (asymptotic) states need to have no net colour charge, then you can explain why free quarks don't exists. But even though this hypothesis is true experimentally, there is no mathematical reason for it.

As J. Rennie points out, none of this is completely understood and a full mathematical description of confinement would be the biggest breakthrough in quantum theory in decades.


text:
# Concurrency and Typeclass Laws

Note: This is using (at the time of writing) the latest developmental version of Deja Fu, which is not yet on hackage. It will be soon! But until then, if you want to replicate this, clone from git.

I recently implemented async-dejafu, a version of the async library using Deja Fu so programs written with it can be tested, and I was curious about checking the relevant typeclass laws automatically.

Checking typeclass laws has been done with QuickCheck before, but the difference here is that async uses concurrency! If only we had some way to test concurrent Haskell code! Oh, wait…

## The set-up

Specifically, I want to test the laws for the Concurrently type. Concurrently is a monad for expressing IO actions which should be run concurrently.

Firstly, we need some language extensions and imports:

{-# LANGUAGE RankNTypes          #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns        #-}

module Concurrently where

import Control.Applicative
import Control.Exception (SomeException)
import Control.Monad ((>=>), ap, liftM, forever)
import Data.Maybe (isJust)
import Data.Set (Set, fromList)
import Test.DejaFu (Failure(..), defaultMemType)
import Test.DejaFu.Deterministic (ConcST, Trace)
import Test.DejaFu.SCT (sctBound, defaultBounds)
import Test.QuickCheck (Arbitrary(..))
import Test.QuickCheck.Function (Fun, apply)
import Unsafe.Coerce (unsafeCoerce)

I have sadly not managed to eliminate that unsafeCoerce, it shows up because of the use of higher-ranked types, and makes me very sad. If anyone knows how I can get rid of it, I would be very happy!

Now we need our Concurrently type. The original just uses IO, so we have to parameterise ours over the underlying monad:

newtype Concurrently m a = Concurrently { runConcurrently :: m a }

We’ll also be using a ConcST variant for testing a lot, so here’s a type synonym for that:

type CST t = Concurrently (ConcST t)

We also need some instances for Concurrently in order to make QuickCheck happy, but these aren’t terribly important:

instance Show (Concurrently m a) where
show _ = "<concurrently>"

instance (Arbitrary a, Applicative m) => Arbitrary (Concurrently m a) where
arbitrary = Concurrently . pure <$> arbitrary  Ok, let’s get started! ## Functor Functor lets you apply a pure function to a value in a context. class Functor f where fmap :: (a -> b) -> f a -> f b  A Functor should satisfy the identity law: fmap id = id  And the composition law: fmap f . fmap g = fmap (f . g)  The Functor instance for Concurrently just delegates the work to the instance for the underlying monad: instance MonadConc m => Functor (Concurrently m) where fmap f (Concurrently a) = Concurrently$ f <$> a  The composition law is a little awkward to express in a way that QuickCheck can deal with, as it involves arbitrary functions. QuickCheck has a Fun type, representing functions which can be serialised to a string. Bearing that in mind, here is how we can express those two laws as tests: prop_functor_id :: Ord a => CST t a -> Bool prop_functor_id ca = ca eq (id <$> ca)

prop_functor_comp :: Ord c => CST t a -> Fun a b -> Fun b c -> Bool
prop_functor_comp ca (apply -> f) (apply -> g) = (g . f <$> ca) eq (g <$> (f <$> ca))  We’re using view patterns here to extract the actual function from the Fun value. let’s see if the laws hold! λ> quickCheck (prop_functor_id :: CST t Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_functor_comp :: CST t Int -> Fun Int Integer -> Fun Integer String -> Bool) +++ OK, passed 100 tests.  Cool! Wait, what’s that eq function? ### Equality and concurrency? I’ve decided to treat two concurrent computations as equal if the sets of values that they can produce are equal: eq :: Ord a => CST t a -> CST t a -> Bool eq left right = runConcurrently left eq' runConcurrently right eq' :: forall t a. Ord a => ConcST t a -> ConcST t a -> Bool eq' left right = results left == results right where results cst = fromList . map fst$ sctBound' cst

sctBound' :: ConcST t a -> [(Either Failure a, Trace)]
sctBound' = unsafeCoerce $sctBound defaultMemType defaultBounds  This is where the unfortunate unsafeCoerce comes in. The definition of sctBound' there doesn’t type-check without it, which is a shame. If anyone could offer a solution, I would be very grateful. ## Applicative Applicative extends Functor with the ability to inject a value into a context without introducing any effects, and to apply a function in a context to a value in a context. class Functor f => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b  An Applicative should satisfy the identity law: pure id <*> a = a  The homomorphism law, which says that applying a pure function to a pure value in a context is the same as just applying the function to the value and injecting the entire result into a context: pure (f a) = pure f <*> pure a  The interchange law, which says that when applying a function in a context to a pure value, the order in which each is evaluated doesn’t matter: u <*> pure y = pure ($ y) <*> u

And the composition law, which is a sort of associativity property:

u <*> (v <*> w) = pure (.) <*> u <*> v <*> w

Finally, there is a law relating Applicative to Functor, that says we can decompose fmap into two steps, injecting a function into a context, and then application within that context:

f <$> x = pure f <*> x  This is where Concurrently gets its concurrency. (<*>) runs its two arguments concurrently, killing the other if one throws an exception. instance MonadConc m => Applicative (Concurrently m) where pure = Concurrently . pure Concurrently fs <*> Concurrently as = Concurrently$
(\(f, a) -> f a) <$> concurrently fs as concurrently :: MonadConc m => m a -> m b -> m (a, b) concurrently = ...  Armed with the knowledge of how to generate arbitrary functions, these are all fairly straight-forward to test prop_applicative_id :: Ord a => CST t a -> Bool prop_applicative_id ca = ca eq (pure id <*> ca) prop_applicative_homo :: Ord b => a -> Fun a b -> Bool prop_applicative_homo a (apply -> f) = (pure$ f a) eq (pure f <*> pure a)

prop_applicative_inter :: Ord b => CST t (Fun a b) -> a -> Bool
prop_applicative_inter u y = (u' <*> pure y) eq (pure ($y) <*> u') where u' = apply <$> u

prop_applicative_comp :: Ord c => CST t (Fun b c) -> CST t (Fun a b) -> CST t a -> Bool
prop_applicative_comp u v w = (u' <*> (v' <*> w)) eq (pure (.) <*> u' <*> v' <*> w) where
u' = apply <$> u v' = apply <$> v

prop_applicative_fmap :: Ord b => Fun a b -> CST t a -> Bool
prop_applicative_fmap (apply -> f) a = (f <$> a) eq (pure f <*> a)  And indeed we see that the laws hold: λ> quickCheck (prop_applicative_id :: CST t Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_applicative_homo :: String -> Fun String Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_applicative_inter :: CST t (Fun Int String) -> Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_applicative_comp :: CST t (Fun Int String) -> CST t (Fun Char Int) -> CST t Char -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_applicative_fmap :: Fun Int String -> CST t Int -> Bool) +++ OK, passed 100 tests.  ## Alternative Alternative is a kind of monoid over Applicative. class Applicative f => Alternative f where empty :: f a (<|>) :: f a -> f a -> f a -- These both have default definitions some :: f a -> f [a] many :: f a -> f [a]  An Alternative should satisfy the monoid laws. Namely, left and right identity: empty <|> x = x x <|> empty = x  And associativity: (x <|> y) <|> z = x <|> (y <|> z)  The Alternative instance for Concurrently is used to express races, with (<|>) executing both of its arguments concurrently and returning the first to finish: instance MonadConc m => Alternative (Concurrently m) where empty = Concurrently$ forever yield

Concurrently as <|> Concurrently bs =
Concurrently $either id id <$> race as bs

race :: MonadConc m => m a -> m b -> m (Either a b)
race = ...

Once again, the translation into QuickCheck properties is quite simple:

prop_alternative_right_id :: Ord a => CST t a -> Bool
prop_alternative_right_id x = x eq (x <|> empty)

prop_alternative_left_id :: Ord a => CST t a -> Bool
prop_alternative_left_id x = x eq (empty <|> x)

prop_alternative_assoc :: Ord a => CST t a -> CST t a -> CST t a -> Bool
prop_alternative_assoc x y z = (x <|> (y <|> z)) eq ((x <|> y) <|> z)

And the laws hold!

λ> quickCheck (prop_alternative_right_id :: CST t Int -> Bool)
+++ OK, passed 100 tests.
λ> quickCheck (prop_alternative_left_id :: CST t Int -> Bool)
+++ OK, passed 100 tests.
λ> quickCheck (prop_alternative_assoc :: CST t Int -> CST t Int -> CST t Int -> Bool)
+++ OK, passed 100 tests.

There are also some laws relating Alternative to Applicative, but these are expressed in terms of some and many, which have default law-satisfying definitions.

Monad extends Applicative with the ability to squash nested monadic values together, and are commonly used to express sequencing.

class Applicative m => Monad m where
return :: a -> m a
(>>=)  :: m a -> (a -> m b) -> m b

There are a few different formulations of the Monad laws, I prefer the one in terms of (>=>) (the fish operator), which is defined as:

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
f >=> g = \x -> f x >>= g

Using this function the laws become simply the monoid laws:

return >=> f = f
f >=> return = f
(f >=> g) >=> h = f >=> (g >=> h)

There are also a few laws relating Monad to Applicative and Functor:

f <$> a = f liftM a return = pure (<*>) = ap  As with the Functor, the Monad instance just delegates the work: instance MonadConc m => Monad (Concurrently m) where return = pure Concurrently a >>= f = Concurrently$ a >>= runConcurrently . f

As these laws are mostly about function equality, a helper function to express that is used:

eqf :: Ord b => (a -> CST t b) -> (a -> CST t b) -> a -> Bool
eqf left right a = left a eq right a

Given that, the translation is simple:

prop_monad_left_id :: Ord b => Fun a (CST t b) -> a -> Bool
prop_monad_left_id (apply -> f) = f eqf (return >=> f)

prop_monad_right_id :: Ord b => Fun a (CST t b) -> a -> Bool
prop_monad_right_id (apply -> f) = f eqf (f >=> return)

prop_monad_comp :: Ord d => Fun a (CST t b) -> Fun b (CST t c) -> Fun c (CST t d) -> a -> Bool
prop_monad_comp (apply -> f) (apply -> g) (apply -> h) = ((f >=> g) >=> h) eqf (f >=> (g >=> h))

prop_monad_fmap :: Ord b => Fun a b -> CST t a -> Bool
prop_monad_fmap (apply -> f) a = (f <$> a) eq (f liftM a) prop_monad_pure :: Ord a => a -> Bool prop_monad_pure = pure eqf return prop_monad_ap :: Ord b => Fun a b -> a -> Bool prop_monad_ap (apply -> f) a = (pure f <*> pure a) eq (return f ap return a)  Are there any counterexamples? No there aren’t! λ> quickCheck (prop_monad_left_id :: Fun Int (CST t String) -> Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_monad_right_id :: Fun Int (CST t String) -> Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_monad_comp :: Fun Int (CST t String) -> Fun String (CST t Bool) -> Fun Bool (CST t Int) -> Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_monad_fmap :: Fun Int String -> CST t Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_monad_pure :: Int -> Bool) +++ OK, passed 100 tests. λ> quickCheck (prop_monad_ap :: Fun Int String -> Int -> Bool) +++ OK, passed 100 tests.  So, it certainly looks like all the laws hold! Yay! ## What about effects? Consider the eq' function. This sort of “value-level” equality is good enough for most types, where any type of effect is a value, but it doesn’t work so well when concurrency (or any sort of IO) is involved, as there effects do not directly correspond to values. There’s one type of effect we particularly care about for the case of Concurrently: namely, the amount of concurrency going on! To test this, we need to write our tests such that different amounts of concurrency can produce different results, which means our current Arbitrary instance for Concurrently isn’t good enough. We need interaction between different concurrent inputs. So let’s try writing a test case for the (<*>) = ap law, but explicitly testing the amount of concurrency: prop_monad_ap2 :: forall a b. Ord b => Fun a b -> Fun a b -> a -> Bool prop_monad_ap2 (apply -> f) (apply -> g) a = go (<*>) eq' go ap where go :: (CST t (a -> b) -> CST t a -> CST t b) -> ConcST t b go combine = do var <- newEmptyCVar let cf = do { res <- tryTakeCVar var; pure$ if isJust res then f else g }
let ca = do { putCVar var (); pure a }
runConcurrently $Concurrently cf combine Concurrently ca  Here we have two functions, f and g, and are using whether a CVar is full or empty to choose between them. If the combining function executes its arguments concurrently, then we will see both cases; otherwise we’ll only see the g case. If the law holds, and (<*>) = ap, then we will see both cases for both of them! λ> quickCheck (prop_monad_ap2 :: Fun Int String -> Fun Int String -> Int -> Bool) *** Failed! Falsifiable (after 3 tests and 8 shrinks): {_->""} {_->"a"} 0  Oops! We found a counterexample! Let’s see what’s happening: λ> results$ go (<*>) (\_ -> "") (\_ -> "a") 0
fromList [Right "",Right "a"]
λ> results \$ go ap (\_ -> "") (\_ -> "a") 0
fromList [Right "a"]

If we look at the definition of ap, the problem becomes clear:

ap :: Monad m => m (a -> b) -> m a -> m b
ap mf ma =
mf >>= \f ->
ma >>= \a ->
return (f a)

The issue is that our definiton of (>>=) is sequential, whereas (<*>) is concurrent. The Monad instance is not consistent with that Applicative when there is interaction between actions, as this shows!

So what’s the problem? It’s close enough, right? Well, close enough isn’t good enough, when it comes to laws. This very issue caused breakage, and is the reason that the Monad instance for Concurrently got removed!

## So what?

So what’s the point of this? Big deal, laws are important.

Well, that is the point. Laws are important, but often we don’t bother to test them. That’s possibly fine if the instances are simple, and you can check the laws by just juggling definitions in your head, but when IO is involved, the situation becomes a bit more murky.

Code involving IO and concurrency is easy to get wrong, so when building up a monad or whatever based on it, why not actually test the laws, rather than just assume they’re right? Because if, as a library author, your assumption is wrong, your users will suffer for it.


text:
BiLinearForm.hpp 5.14 KB
 Praetorius, Simon committed Sep 27, 2019 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #pragma once #include #include #include #include #include #include #include namespace AMDiS { /** * Basis implementation of DOFMatrix, i.e. a sparse matrix storing all the * assembled Operators indexed with DOF indices. The matrix data is associated * to a row and column global basis. * * \tparam RB Basis of the matrix rows * \tparam CB Basis of matrix columns * \tparam T Coefficient type to store in the matrix **/  Praetorius, Simon committed Dec 30, 2019 23  template >  Praetorius, Simon committed Sep 27, 2019 24  class BiLinearForm  Praetorius, Simon committed Dec 30, 2019 25  : public MatrixFacade  Praetorius, Simon committed Sep 27, 2019 26 27  { using Self = BiLinearForm;  Praetorius, Simon committed Dec 30, 2019 28  using Super = MatrixFacade;  Praetorius, Simon committed Sep 27, 2019 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45  public: /// The type of the finite element space / basis of the row using RowBasis = RB; using RowLocalView = typename RowBasis::LocalView; /// The type of the finite element space / basis of the column using ColBasis = CB; using ColLocalView = typename ColBasis::LocalView; /// The type of the elements of the DOFVector using CoefficientType = typename Traits::CoefficientType; /// The type of the matrix filled on an element with local contributions using ElementMatrix = FlatMatrix; public:  Müller, Felix committed Oct 09, 2019 46 47  /// Constructor. Wraps the reference into a non-destroying shared_ptr or moves the basis into /// a new shared_ptr.  Praetorius, Simon committed Dec 30, 2019 48 49 50 51  BiLinearForm(std::shared_ptr const& rowBasis, std::shared_ptr const& colBasis) : Super(*rowBasis, *colBasis) , rowBasis_(rowBasis) , colBasis_(colBasis)  Praetorius, Simon committed Sep 27, 2019 52  {  Praetorius, Simon committed Dec 30, 2019 53  operators_.init(*rowBasis, *colBasis);  Praetorius, Simon committed Sep 27, 2019 54   Praetorius, Simon committed Dec 30, 2019 55 56  auto const rowSize = rowBasis->localView().maxSize(); auto const colSize = colBasis->localView().maxSize();  Praetorius, Simon committed Sep 27, 2019 57 58 59  elementMatrix_.resize(rowSize, colSize); }  Praetorius, Simon committed Dec 30, 2019 60 61 62  std::shared_ptr const& rowBasis() const { return rowBasis_; } std::shared_ptr const& colBasis() const { return colBasis_; }  63  /// \brief Associate a local operator with this BiLinearForm  Praetorius, Simon committed Sep 27, 2019 64 65 66 67 68 69 70 71  /** * Stores an operator in a list that gets assembled during a call to \ref assemble(). * The operator may be assigned to a specific context, i.e. either an element * operator, an intersection operator, or a boundary operator. * The \p row and \p col tree paths specify the sub-basis for test and trial * functions the operator is applied to. * * \tparam ContextTag One of \ref tag::element_operator, \ref tag::intersection_operator  Praetorius, Simon committed Sep 30, 2019 72 73  * or \ref tag::boundary_operator indicating where to assemble * this operator.  Praetorius, Simon committed Sep 27, 2019 74  * \tparam Expr An pre-operator that can be bound to a gridView, or a valid  Praetorius, Simon committed Sep 30, 2019 75 76 77  * GridOperator. * \tparam row A tree-path for the RowBasis * \tparam col A tree-path for the ColBasis  Praetorius, Simon committed Sep 27, 2019 78 79 80  * * [[expects: row is valid tree-path in RowBasis]] * [[expects: col is valid tree-path in ColBasis]]  81  * @{  Praetorius, Simon committed Sep 27, 2019 82  **/  Praetorius, Simon committed Sep 30, 2019 83 84  template void addOperator(ContextTag contextTag, Expr const& expr, Row row, Col col);  85 86  // Add an operator to be assembled on the elements of the grid  Praetorius, Simon committed Sep 30, 2019 87 88  template void addOperator(Expr const& expr, Row row = {}, Col col = {})  89 90 91 92 93 94  { using E = typename RowLocalView::Element; addOperator(tag::element_operator{}, expr, row, col); } // Add an operator to be assembled on the intersections of the grid  Praetorius, Simon committed Sep 30, 2019 95 96  template void addIntersectionOperator(Expr const& expr, Row row = {}, Col col = {})  97 98 99 100 101  { using I = typename RowLocalView::GridView::Intersection; addOperator(tag::intersection_operator{}, expr, row, col); } /// @}  Praetorius, Simon committed Sep 27, 2019 102 103 104 105 106  /// Assemble the matrix operators on the bound element. void assemble(RowLocalView const& rowLocalView, ColLocalView const& colLocalView);  Praetorius, Simon committed Sep 27, 2019 107  /// Assemble all matrix operators, TODO: incorporate boundary conditions  Praetorius, Simon committed Sep 27, 2019 108 109 110 111 112 113 114 115 116  void assemble(SymmetryStructure symmetry = SymmetryStructure::unknown); protected: /// Dense matrix to store coefficients during \ref assemble() ElementMatrix elementMatrix_; /// List of operators associated to row/col node MatrixOperators operators_;  Praetorius, Simon committed Dec 30, 2019 117 118 119  std::shared_ptr rowBasis_; std::shared_ptr colBasis_;  Praetorius, Simon committed Sep 27, 2019 120 121  };  122 123  #if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION  Müller, Felix committed Oct 09, 2019 124 125  template BiLinearForm(RB&&, CB&&)  126 127 128 129  -> BiLinearForm, Underlying_t>; #endif template  Müller, Felix committed Oct 09, 2019 130  auto makeBiLinearForm(RB&& rowBasis, CB&& colBasis)  131 132  { using BLF = BiLinearForm, Underlying_t>;  Müller, Felix committed Oct 09, 2019 133  return BLF{FWD(rowBasis), FWD(colBasis)};  134 135  }  Praetorius, Simon committed Sep 27, 2019 136 137 138 } // end namespace AMDiS #include