text:
# Solid State

## InText Solution 2

Question: 1.13 - Explain how much portion of an atom located at (i) corner and (ii) bodycentre of a cubic unit cell is part of its neighbouring unit cell.

1. Atom located at the corner is shared among eight adjacent unit cell, thus only 1/8 th portion of the atom is located at corner.
2. Atom located at body center does not share any part of its neighbouring unit cell, thus whole portion of atom is located at body center of cubic unit cell.

Question: 1.14 - What is the two dimensional coordination number of a molecule in square close-packed layer?

Answer: The coordination number of a molecule in two dimensions in square close packed layer is 4.

Question: 1.15 - A compound forms hexagonal close-packed structure. What is the total number of voids in 0.5 mol of it? How many of these are tetrahedral voids?

Answer: Since number of particles present in 1 mol of compound =6.022xx10^(23)
Hence, number of particles in 0.5 mol =0.5xx6.022xx10^(23)=3.01
We know that number of octahedral voids = Number of atoms or particles
And number of tetrahedral voids =2xx Number of particles
Therefore, number of octahedral in the given compound =3.011xx10^23
Number of tetrahedral voids = 2xx3.011xx10^(23)=6.022xx10^(23)
Thus total number of voids =3.011xx10^(23)+6.022xx10^(23)=9.033xx10^(23)
And number of tetrahedral voids =6.022xx10^(23)

Question: 1.16 A compound is formed by two elements M and N. The element N forms ccp and atoms of M occupy 1/3rd of tetrahedral voids. What is the formula of the compound?

Answer: Let the number of octahedral voids occupied by element N = a

Therefore total number of tetrahedral voids = 2a

Since element M occupies 1/3 of tetrahedral voids

So, number of tetrahedral voids occupied by M=2a\xx1/3=(2a)/3

So, ratio of M and N =(2a)/3:a=2:3

Therefore, formula of compound wil be M2N2

Question: 1.17 Which of the following lattices has the highest packing efficiency (i) simple cubic (ii) body-centred cubic and (iii) hexagonal close-packed lattice?

Answer: The packing efficiency of simple cubic lattice is 52.4%, body centered is 68% and that of hexagonal close packed lattice is 74%.

Therefore, (iii) hexagonal close packed lattice has highest packing efficiency, i.e. 74%.

Question: 1.18 - An element with molar mass 2.7 xx 10-2 kg mol-1 forms a cubic unit cell with edge length 405 pm. If its density is 2.7 xx 103 kg m-3, what is the nature of the cubic unit cell?

Answer: By knowing the number of atom in the cubic unit cell of given lattice, its nature can be determined.

Given density (d) =2.7xx10^3 text(kg)m^(-3)

Molar mass (M) =2.7xx10^(-3)kg

Edge (a) =405 text(pm)=(405)/(10^(12))

=405xx10^(-12) m

Therefore, number of atom = ?

We know that d=(z\xx\M)/(a^3xx\N_A)

Or, 2.7xx10^3text(kg)m^(-3)=(z\xx2.7xx10^(-2) kg\text(mol)^(-1))

Or, z=(2.7xx10^3text(kgm)^(-3)xx(405xx10^(-12)m)^3xx6.022xx10^(23))/(2.7xx10^(-2) kg\text(mol)^(-1))

Since number of atoms in unit cell of the given element = 4

Thus lattice is cubic close packed (ccp)


text:
Find the minimum integral value of n such that the division 55n/124 leaves no remainder

1. 124
2. 123
3. 31
4. 62

format: plain


text:
On linux first install

install eclipse C++ and then add cdt from the eclipse help > software installation

or use:

sudo apt-get install eclipse eclipse-cdt g++

first build and then run, otherwise the error binary not found will show.

You can use either Microsoft Visual Studio or Eclipse C++

For Eclipse I installed CGYWIN. You need to choose c++ to be installed. Use the following links for this purposes:

https://www.cygwin.com/

Good codes for setting the environment variables in windows.

https://www3.ntu.edu.sg/home/ehchua/programming/howto/Cygwin_HowTo.html#cygwin

In c++ I had a problem with debugging. While debugging the counters in loops wouldn't show their values and I changed a property option and set it to no optimization.


text:
Mathematics
OpenStudy (anonymous):

This is a very simple question

OpenStudy (anonymous):

Where is the question?

OpenStudy (anonymous):

$\sqrt{sinx +\sqrt{sinx+\sqrt{sinx+....\to \infty}}}$ what is its derivative

OpenStudy (anonymous):

Mani I know you can solve this sum in a sec so just give the answer not the steps

OpenStudy (mani_jha):

cosx, I guess

OpenStudy (anonymous):

Mani I didn't expect this from you

OpenStudy (mani_jha):

Oh wait, cosx/(2S-1) where S is the above function

OpenStudy (anonymous):

Why did you fail in the first try

OpenStudy (mani_jha):

I did the calculation in my mind; because you asked not to do the steps. So, I made a mistake :\

OpenStudy (anonymous):

Cheers!!!!!

OpenStudy (anonymous):

$y = \sqrt{sinx +\sqrt{sinx + ...}}$ so $y ^{2}=sinx+y$ differentiating implicitly gives 2yy' = cosx + y'. Solving for y' gives y'=cosx/(2y-1), where y is the function described above.

OpenStudy (anonymous):

love these types of problems...

OpenStudy (anonymous):

I know they look huge but actually the are so little its almost too easy


text:
Biblioteca

Música » City of Caterpillar »

When Was the Last Time We Painted Over the Blood On the Walls? [Live]

13 execuções | Ir para página da faixa

Faixas (13)
Faixa Álbum Duração Data
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 27 2010, 19h15
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 27 2010, 19h11
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 4 2010, 20h21
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 4 2010, 20h21
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 4 2010, 20h21
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 4 2010, 20h21
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 4 2010, 20h21
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 4 2010, 20h21
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Fev 4 2010, 20h16
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Jan 24 2010, 11h35
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Jan 24 2010, 11h31
When Was the Last Time We Painted Over the Blood On the Walls? [Live] 4:05 Jan 5 2010, 17h23
When Was the Last Time We Painted Over the Blood On the Walls? [Live]
4:05 Mar 17 2005, 11h54


text:
### Designing and Building My Own Keyboard

#### June 5, 2015 // Tom - design , electronics

Disclaimer: This post is a retrospective. I originally wrote about this on thomasmoll.co, which is now defunct.

Q-bit | Custom 60% Keyboard build

# The Setup

I started this project after my sophomore year of college at Iowa State University. I was a few weeks in to my second internship at Garmin on the Automotive OEM team and I was getting more and more into mechanical keyboards. I had seen some people designing and building their own from scratch, so I decided to try my hand at it. Unfortunately I’m typing this on a Pok3r, a keyboard which is much, much better than the one I made.

I knew I wanted a 60% keyboard, a type of keyboard which lacks the navigation arrows and number pad. Instead of moving your hand from one section of the keyboard to another, you simply use macros to “shift” into a different mode. For instance, right now I have the CAPS LOCK key mapped as my meta key, holding it turns the keys I J K and L into the arrow keys Up, Left, Down and Right respectively. Perfect for long days at a terminal when you don’t want to be constantly readjusting your fingers. I’m a touch typer, meaning I don’t look at the keyboard when I’m typing / programming. It also means you have less distance to move your arm when using the mouse again.

The first step to any hardware gadget design: what the hell is going to hold all my electronics? For typical keyboards they’ll have a plastic or metal clam shell which encapsulates a PCB (printed circuit board) which has either mechanical switches or rubber domes layered on top. Then the keycaps fit onto the plastic stems on the switches.

For my keyboard I went with a basic top plate to hold the switches, and a bottom plate to keep it all in place. I found a neat website to auto-generate CAD layouts called swillkb. That summer I was fortunate enough to have a family friend named Gary who does consulting work as a master machinist in retirement. In his garage he has a Personal CNC, Rotary Lathe, 3d Printer and all the tools you could ask for. I told him about the job I wanted to do and he helped me setup the toolpath, walked me through how to setup my work piece, select an endmill and kept tabs on the machine for any chattering.

I can’t thank Gary enough, he took a Saturday to mentor me and pass down some really important skills I wish I used more often. We were able to mill the front and back plates with relative ease, after all I had a master mechanical engineer looking over my shoulder. In hindsight, this is really a better task for a plasma cutter or even better a water jet cutter. The CNC machine uses rotary bits to cut away material, and we had to use three different passes with smaller and smaller bits to carve out the corners. Typically you’d use an 1/4th inch bit, then a 1/8th inch and so on until the work piece was finished.

# Getting Wired

On to the next step, hand wiring. Since I didn’t feel like getting into PCB production for this build, I decided to hand wire each row. The electrical layout uses 5 rows and around 14 columns to make a 2d matrix of possible key presses. The microcontroller sends a pulse out on each row, detecting which column connects the circuit. It does so with a relatively simple diode setup, preventing current from flowing backwards.

I originally live streamed this on Twitch.TV, fortunately for me, some viewers pointed out that I was soldering the plate backwards, meaning I had to desolder the entire thing and flip the switches to the opposite side… Anyways, 6 hours later I had the thing soldered up to my microcontroller of choice, the Teensy. Had this been in 2018, I could have soldered a Raspberry PI Zero W to it and had a portable linux computer, it’s really amazing how times change.

Programming was done via TMC, fortunately configuration is relatively simple, debugging is a bit hard, since you’re testing the hardware AND software together. I had a few keys stuck on, making it hard to test on the same computer you’re programming on when your rogue keyboard is typing “ggggggggggg” 20 times a second.

TMK makes keymaps easy with a GIANT macro:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  #define KEYMAP( \ K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ K35, K36, K37, K57, K56 \ ) \ { \ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_NO }, \ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \ { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_NO }, \ { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \ { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_NO }, \ { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_NO } \ }

Due to the bespoke design, troubleshooting was easy, yet fixing involved desoldering and unwinding a beautiful spiderweb of signal wire.

After a few hours and a few soldering iron burns later, my keyboard was in a working state.

# Action shots

I actually did end up using the keyboard, unfortunately due to some shift key problems, it was never my daily driver. For a first attempt, I think it turned out pretty good! The project overall was a vehicle to learn something new and build on my Computer Engineering skills from school.


text:
# Simplifying Square Roots

We now learn how to simplify square roots of numbers. Our objective, by the end of this section will be to know how to simplify radical expresssions looking like either of the following:

$$\sqrt{108}$$, or $$\sqrt{\frac{72}{75}}$$, or even $$2\sqrt{18}+3\sqrt{50} - 5 \sqrt{12}$$.

We start by learning how to simplify a square root, by looking for square number factors of the radicand (remember the radicand is the number inside the square root) as well as by using the fact that the square root of a product of two numbers equals the product of the square roots of those numbers, $$\sqrt{a\times b} = \sqrt{a} \times \sqrt{b}$$.
Tutorials and exercises with solutions will help us along the way.

## Method - Simplifying Roots

Given a square root, we can simplify it using the following three steps:
• Step 1: write a list of the first few square numbers: $1,\ 4, \ 9, \ 16, \ 25, \ 36, \ 49, \ \dots$

• Step 2: look for largest factor of the radicand in the list of square numbers, from step 1.

• Step 3: use the fact that: $\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$ to simplify the root.

## Exercise 1

Simplify each of the following:

1. $$\sqrt{12}$$

2. $$\sqrt{32}$$

3. $$\sqrt{108}$$

4. $$\sqrt{75}$$

5. $$\sqrt{80}$$

6. $$\sqrt{28}$$

7. $$\sqrt{147}$$

1. $$\sqrt{12} = 2\sqrt{3}$$

2. $$\sqrt{32} = 3 \sqrt{2}$$

3. $$\sqrt{108} = 6 \sqrt{3}$$

4. $$\sqrt{75} = 5\sqrt{3}$$

5. $$\sqrt{80} = 4\sqrt{5}$$

6. $$\sqrt{28} = 2 \sqrt{7}$$

7. $$\sqrt{147} = 7 \sqrt{3}$$

## Solution With Working

1. To simplify $$\sqrt{12}$$ we follow our three steps:
• Step 1: list the first few square numbers: $1,4,9,16,25, \dots$

• Step 2: look for the largest factor of $$12$$ from the list, written in step 1.

The largest factor is $$4$$, indeed: $12 = 4\times 3$

• Step 3: We now use the fact that $$\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$$ to simplify the square root: \begin{aligned} \sqrt{12} & = \sqrt{4 \times 3} \\ & = \sqrt{4} \times \sqrt{3} \\ & = 2 \times \sqrt{3} \\ \sqrt{12} = 2\sqrt{3} \end{aligned}

2. We simplify $$\sqrt{32}$$ as follows:
• Step 1: list the first few square numbers: $1,4,9,16,25, \dots$

• Step 2: look for the largest factor of $$32$$ from the list, written in step 1.

The largest factor is $$16$$, indeed: $32 = 16\times 2$

• Step 3: We now use the fact that $$\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$$ to simplify the square root: \begin{aligned} \sqrt{32} & = \sqrt{16\times 2} \\ & = \sqrt{16}\times \sqrt{2} \\ & = 4 \times \sqrt{2} \\ \sqrt{32} &= 4\sqrt{2} \end{aligned}

3. We simplify $$\sqrt{108}$$ as follows:
• Step 1: list the first few square numbers: $1,4,9,16,25, 36, 49, 64, \dots$

• Step 2: look for the largest factor of $$108$$ from the list, written in step 1.

The largest factor is $$36$$, indeed: $108 = 36\times 3$

• Step 3: We now use the fact that $$\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$$ to simplify the square root: \begin{aligned} \sqrt{108} & = \sqrt{36\times 3} \\ & = \sqrt{36} \times \sqrt{3} \\ & = 6 \times \sqrt{3} \\ \sqrt{108} & = 6 \sqrt{3} \end{aligned}

4. We simplify $$\sqrt{75}$$ as follows:
• Step 1: list the first few square numbers: $1,4,9,16,25, 36, 49, \dots$

• Step 2: look for the largest factor of $$75$$ from the list, written in step 1.

The largest factor is $$25$$, indeed: $75 = 25\times 3$

• Step 3: We now use the fact that $$\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$$ to simplify the square root: \begin{aligned} \sqrt{75} & = \sqrt{25 \times 3} \\ & = \sqrt{25} \times \sqrt{3} \\ & = 5 \times \sqrt{3} \\ \sqrt{75} & = 5\sqrt{3} \end{aligned}

5. We simplify $$\sqrt{80}$$ as follows:
• Step 1: list the first few square numbers: $1,4,9,16,25, 36, 49, \dots$

• Step 2: look for the largest factor of $$80$$ from the list, written in step 1.

The largest factor is $$16$$, indeed: $80 = 16\times 5$

• Step 3: We now use the fact that $$\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$$ to simplify the square root: \begin{aligned} \sqrt{80} & = \sqrt{16 \times 5} \\ & = \sqrt{16} \times \sqrt{5} \\ & = 4 \times \sqrt{5} \\ \sqrt{80} & = 4 \sqrt{5} \end{aligned}

6. We simplify $$\sqrt{28}$$ as follows:
• Step 1: list the first few square numbers: $1,4,9,16,25, \dots$

• Step 2: look for the largest factor of $$28$$ from the list, written in step 1.

The largest factor is $$4$$, indeed: $28 = 4\times 7$

• Step 3: We now use the fact that $$\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$$ to simplify the square root: \begin{aligned} \sqrt{28} & = \sqrt{4 \times 7} \\ & = \sqrt{4} \times \sqrt{7} \\ & = 2 \times \sqrt{7} \\ \sqrt{28} & = 2 \sqrt{7} \end{aligned}

7. We simplify $$\sqrt{147}$$ as follows:
• Step 1: list the first few square numbers: $1,4,9,16,25, 36, 49, \dots$

• Step 2: look for the largest factor of $$147$$ from the list, written in step 1.

The largest factor is $$49$$, indeed: $147 = 49 \times 3$

• Step 3: We now use the fact that $$\sqrt{a\times b} = \sqrt{a}\times \sqrt{b}$$ to simplify the square root: \begin{aligned} \sqrt{147} & = \sqrt{49 \times 3} \\ & = \sqrt{49}\times \sqrt{3} \\ & = 7 \times \sqrt{3} \\ \sqrt{147} & = 7 \sqrt{3} \end{aligned}

## Method - Simplifying Square Roots of Fractions

At times we may be faced with expressions involving fractions under a square root.
To deal with such expressions the rule that should always be kept in mind is: $\sqrt{\frac{a}{b}} = \frac{\sqrt{a}}{\sqrt{b}}$ For instance we may need to simplify: $\sqrt{\frac{16}{9}}$ The trick, therefore, is to write this as: $\frac{\sqrt{16}}{\sqrt{9}} = \frac{4}{3}$ This is further explained in tutorial 2, below, watch it now to learn exactly how to deal with such square roots.

## Exercise 2

Simplify each of the following:

1. $$\sqrt{\frac{25}{9}}$$

2. $$\sqrt{\frac{4}{49}}$$

3. $$\sqrt{\frac{72}{75}}$$

4. $$\sqrt{\frac{27}{128}}$$

5. $$\sqrt{\frac{48}{81}}$$

6. $$\frac{\sqrt{32}}{\sqrt{2}}$$

7. $$\frac{\sqrt{150}}{\sqrt{3}}$$

8. $$\frac{\sqrt{225}}{\sqrt{75}}$$

## Solution Without Working

1. $$\sqrt{\frac{25}{9}} = \frac{5}{3}$$

2. $$\sqrt{\frac{4}{49}} = \frac{2}{7}$$

3. $$\sqrt{\frac{72}{75}} = \frac{6\sqrt{2}}{5\sqrt{3}}$$

4. $$\sqrt{\frac{27}{128}} = \frac{3\sqrt{3}}{8\sqrt{2}}$$

5. $$\sqrt{\frac{48}{81}} = \frac{4\sqrt{3}}{9}$$

6. $$\frac{\sqrt{32}}{\sqrt{2}} = 4$$

7. $$\frac{\sqrt{150}}{\sqrt{3}} = 5\sqrt{2}$$

8. $$\frac{\sqrt{225}}{\sqrt{75}} = \sqrt{3}$$

## Solution With Working

1. We simplify $$\sqrt{\frac{25}{9}}$$ as follows: \begin{aligned} \sqrt{\frac{25}{9}} & = \frac{\sqrt{25}}{\sqrt{9}} \\ & = \frac{5}{3} \end{aligned}

2. We simplify $$\sqrt{\frac{4}{49}}$$ as follows: \begin{aligned} \sqrt{\frac{4}{49}} & = \frac{\sqrt{4}}{\sqrt{49}} \\ & = \frac{2}{7} \end{aligned}

3. We simplify $$\sqrt{\frac{72}{75}}$$ as follows: \begin{aligned} \sqrt{\frac{72}{75}} & = \frac{\sqrt{72}}{\sqrt{75}} \\ & = \frac{\sqrt{36\times 2}}{\sqrt{25\times 3}} \\ & = \frac{\sqrt{36}\times \sqrt{2}}{\sqrt{25} \times \sqrt{3}} \\ \sqrt{\frac{72}{75}} & = \frac{6 \sqrt{2}}{5\sqrt{3}} \end{aligned}

4. We simplify $$\sqrt{\frac{27}{128}}$$ as follows: \begin{aligned} \sqrt{\frac{27}{128}} & = \frac{\sqrt{27}}{\sqrt{128}} \\ & = \frac{\sqrt{9\times 3}}{\sqrt{64\times 2}} \\ & = \frac{\sqrt{9}\times \sqrt{3}}{\sqrt{64}\times \sqrt{2}} \\ \sqrt{\frac{27}{128}} & = \frac{3\sqrt{3}}{8\sqrt{2}} \end{aligned}

5. We simplify $$\sqrt{\frac{48}{81}}$$ as follows: \begin{aligned} \sqrt{\frac{48}{81}} &= \frac{\sqrt{48}}{\sqrt{81}} \\ & = \frac{\sqrt{16\times 3}}{9} \\ & = \frac{\sqrt{16}\times \sqrt{3}}{9}\\ \sqrt{\frac{48}{81}} & = \frac{4\sqrt{3}}{9} \end{aligned}

6. We simplify $$\frac{\sqrt{32}}{\sqrt{2}}$$ as follows: \begin{aligned} \frac{\sqrt{32}}{\sqrt{2}} & = \sqrt{\frac{32}{2}} \\ & = \sqrt{16} \\ \frac{\sqrt{32}}{\sqrt{2}} & = 4 \end{aligned}

7. We simplify $$\frac{\sqrt{150}}{\sqrt{3}}$$ as follows: \begin{aligned} \frac{\sqrt{150}}{\sqrt{3}} & = \sqrt{\frac{150}{3}} \\ & = \sqrt{50} \\ & = \sqrt{25\times 2}\\ & = \sqrt{25} \times \sqrt{2} \\ \frac{\sqrt{150}}{\sqrt{3}} & = 5\sqrt{2} \end{aligned}

8. We simplify $$\frac{\sqrt{225}}{\sqrt{75}}$$ as follows: \begin{aligned} \frac{\sqrt{225}}{\sqrt{75}} & = \sqrt{\frac{225}{75}} \\ & = \sqrt{3} \end{aligned}

## Simplifying Entire Expressions

We'll often be required to simplify entire expressions such as: $2\sqrt{18} + 3\sqrt{50} - 5 \sqrt{12}$ To simplify such expressions we treat each radical (square root) as though it was on its own, using the techniques we learnt above.

We must also keep the following important rules in mind: $\sqrt{a}+\sqrt{b} \neq \sqrt{a+b}$ We can only gather roots if the radicands (the number inside the root) are the same. For example: $2\sqrt{3}+5\sqrt{3} = 7\sqrt{3}$ But $$2\sqrt{3}+5\sqrt{5}$$ cannot be siimplified any further.

Watch tutorial 3 to see a few examples, then work through exercise 3.

## Exercise 3

Simplify each of the following as much as possible:

1. $$2\sqrt{18} + 3 \sqrt{50}$$

2. $$3\sqrt{5}-2\sqrt{45}+8\sqrt{20}$$

3. $$\sqrt{200} - \sqrt{8} + 3\sqrt{32}$$

4. $$5\sqrt{12}-5\sqrt{72} + \sqrt{48}$$

5. $$3\sqrt{\frac{8}{27}} + 6 \sqrt{\frac{32}{75}}$$

## Solutions Without Working

1. $$2\sqrt{18} + 3 \sqrt{50} = 21\sqrt{2}$$

2. $$3\sqrt{5} - 2\sqrt{45} + 8 \sqrt{20} = 13\sqrt{5}$$

3. $$\sqrt{200} - \sqrt{8} + 3 \sqrt{32} = 20\sqrt{2}$$

4. $$5\sqrt{12} - 5\sqrt{72} + \sqrt{48} = 14\sqrt{3} - 30\sqrt{2}$$

5. $$3\sqrt{\frac{8}{27}} + 6 \sqrt{\frac{32}{75}} = \frac{10\sqrt{2}}{\sqrt{3}}$$

## Solution With Working

1. We simplify $$2\sqrt{18}+3\sqrt{50}$$ as follows: \begin{aligned} 2\sqrt{18}+3\sqrt{50} & = 2\sqrt{9\times 2} + 3 \sqrt{25\times 2} \\ & = 2\sqrt{9}\times \sqrt{2} + 3\sqrt{25}\times \sqrt{2} \\ & = 2\times 3 \times \sqrt{2} + 3 \times 5 \times \sqrt{2} \\ & = 6\sqrt{2} + 15 \sqrt{2} \\ 2\sqrt{18}+3\sqrt{50} & = 21\sqrt{2} \end{aligned}

2. We simplify $$3\sqrt{5} - 2\sqrt{45}+ 8 \sqrt{20}$$ as follows: \begin{aligned} 3\sqrt{5} - 2\sqrt{45}+ 8 \sqrt{20} & = 3\sqrt{5} - 2\sqrt{9\times 5} + 8 \sqrt{4\times 5} \\ & = 3\sqrt{5} - 2\times \sqrt{9} \times \sqrt{5} + 8 \times \sqrt{4} \times \sqrt{5} \\ & = 3\sqrt{5} - 2\times 3 \times \sqrt{5} + 8 \times 2 \times \sqrt{5} \\ & = 3\sqrt{5} - 6 \times \sqrt{5} + 16 \times \sqrt{5} \\ & = 3\sqrt{5} - 6 \sqrt{5} + 16 \sqrt{5} \\ & = -3\sqrt{5} + 16 \sqrt{5} \\ 3\sqrt{5} - 2\sqrt{45}+ 8 \sqrt{20} & = 13 \sqrt{5} \end{aligned}

3. We simplify $$\sqrt{200} - \sqrt{8} + 3\sqrt{32}$$ as follows: \begin{aligned} \sqrt{200} - \sqrt{8} + 3\sqrt{32} & = \sqrt{100\times 2} - \sqrt{4\times 2} + 3\sqrt{16\times 2} \\ & = \sqrt{100} \times \sqrt{2} - \sqrt{4} \times \sqrt{2} + 3\times \sqrt{16} \times \sqrt{2} \\ & = 10 \times \sqrt{2} - 2 \times \sqrt{2} + 3\times 4 \times \sqrt{2} \\ & = 10\sqrt{2} - 2\sqrt{2} + 12\sqrt{2} \\ & = 8\sqrt{2} + 12\sqrt{2} \\ \sqrt{200} - \sqrt{8} + 3\sqrt{32} & = 20\sqrt{2} \end{aligned}

4. We simplify $$5\sqrt{12} - 5 \sqrt{72} + \sqrt{48}$$ as follows: \begin{aligned} 5\sqrt{12} - 5 \sqrt{72} + \sqrt{48} & = 5\sqrt{4\times 3} - 5\sqrt{36\times 2} + \sqrt{16\times 3} \\ & = 5\times \sqrt{4} \times \sqrt{ 3} - 5\times \sqrt{36} \times \sqrt{2} + \sqrt{16} \times \sqrt{3} \\ & = 5\times 2 \times \sqrt{ 3} - 5\times 6 \times \sqrt{2} + 4 \times \sqrt{3} \\ & = 10 \times \sqrt{ 3} - 30 \times \sqrt{2} + 4 \times \sqrt{3} \\ & = 10\sqrt{ 3} - 30 \sqrt{2} + 4 \sqrt{3} \\ & = 10\sqrt{ 3} + 4 \sqrt{3} - 30 \sqrt{2} \\ 5\sqrt{12} - 5 \sqrt{72} + \sqrt{48} & = 14\sqrt{3} - 30\sqrt{2} \end{aligned}

5. We simplify $$3\sqrt{\frac{8}{27}} + 6 \sqrt{\frac{32}{75}}$$ as follows: \begin{aligned} 3\sqrt{\frac{8}{27}} + 6 \sqrt{\frac{32}{75}} & = 3 \times \frac{\sqrt{8}}{\sqrt{27}} + 6 \times \frac{\sqrt{32}}{\sqrt{75}} \\ & = 3 \times \frac{\sqrt{4\times 2}}{\sqrt{9\times 3}} + 6 \times \frac{\sqrt{16\times 2}}{\sqrt{25 \times 3}} \\ & = 3 \times \frac{\sqrt{4} \times \sqrt{2}}{\sqrt{9} \times \sqrt{3}} + 6 \times \frac{\sqrt{16} \times \sqrt{2}}{\sqrt{25} \times \sqrt{3}} \\ & = 3 \times \frac{2\sqrt{2}}{3\sqrt{3}} + 6 \times \frac{4\sqrt{2}}{5\sqrt{3}} \\ & = \frac{3\times 2\sqrt{2}}{3\sqrt{3}} + \frac{6 \times 4\sqrt{2}}{5\sqrt{3}} \\ & = \frac{2\sqrt{2}}{\sqrt{3}} + \frac{24\sqrt{2}}{5\sqrt{3}} \\ & = \frac{5}{5} \times \frac{2\sqrt{2}}{\sqrt{3}} + \frac{24\sqrt{2}}{5\sqrt{3}} \\ & = \frac{10 \sqrt{2} + 24\sqrt{2}}{5\sqrt{3}} \\ 3\sqrt{\frac{8}{27}} + 6 \sqrt{\frac{32}{75}} & = \frac{34\sqrt{2}}{5\sqrt{3}} \end{aligned} We can also write the final answer as: $3\sqrt{\frac{8}{27}} + 6 \sqrt{\frac{32}{75}} = \frac{34}{5} \sqrt{\frac{2}{3}}$


text:
NULL
Countries | Regions
Countries | Regions
Article Types
Article Types
Year
Volume
Issue
Pages
IMR Press / JOMH / Volume 18 / Issue 7 / DOI: 10.31083/j.jomh1807142
Open Access Original Research
Age Difference in Relationships between Depression and Sleep among Young Adult Men
Show Less
1 School of Social Welfare, Inha University, 22212 Incheon, Republic of Korea
2 School of Social Work, Michigan State University, MI 48824, USA
*Correspondence: j343@inha.ac.kr (Jaewon Lee)
J. Mens. Health 2022, 18(7), 142; https://doi.org/10.31083/j.jomh1807142
Submitted: 14 March 2022 | Revised: 20 April 2022 | Accepted: 25 May 2022 | Published: 28 June 2022
This is an open access article under the CC BY 4.0 license.
Abstract

Background: There has been little evidence regarding how age influences the association between depression and sleep among young adult men. Thus, the current study explores the relationship between depression and sleep among young adult men and the moderating effect of age on the association. Methods: The present research employed a secondary analysis of the National Longitudinal Survey of Youth 1979 for Children and Young Adults. A total of 2777 men were selected for the final sample. A moderation model was used to identify the moderating effect of age on the relationship between depression and sleep. Results: Depression was negatively related to hours of sleep among young adult men and age was negatively associated with hours of sleep. An interaction effect was found, indicating that age significantly moderated the association between depression and hours of sleep among young adult men. Conclusions: Free educational programs on the importance of quality of sleep and adequate sleep should be provided to young adult men before they enter their thirties. This study implies that improving sleep among young adult men as well as identifying what particular age span in young adulthood is important and should be given more attention when accounting for young adult men’s depression.

Keywords
depression
sleep
age differences
1. Introduction

Depression and sleep issues, such as poor sleep quality and sleep disorders, are common health issues among young adult men [1, 2]. Between 2013 and 2016, 5.5% of men aged 20–39 years in the United States reported depression [1]. Moreover, in a sample of young Australian men, more than one-quarter had obstructive sleep apnea, 10.6% had chronic insomnia, 1.9% had restless leg syndrome, and 9.6% reported abnormal periodic leg movements during sleep [3]. Overall, 42.3% of the young men had at least one sleep disorder [3]. Depression and sleep issues have also been found to be related to one another, with depression influencing sleep issues [4, 5], and sleep issues influencing depression [6]. The Centers for Disease Control and Prevention reported that people who reported short sleep, defined as fewer than seven hours of sleep per night, were more likely to be depressed than those who slept more than seven hours per night [7]. Additionally, in a longitudinal study, insomnia that lasted at least two weeks predicted later major depressive episodes and major depressive disorder [6].

Research has also shown that the prevalence of depression and sleep issues differs by age among men. In a longitudinal study of twins in Norway, 4.4% of the men reported major depressive disorder when they were in their twenties, compared to 3.3% when they were in their thirties and forties, suggesting that major depressive disorder prevalence decreases with age among men [8]. In a sample of men aged 20 to 100 years, researchers also found that age influenced likelihood of a sleep apnea diagnosis, with the prevalence of sleep apnea increasing in age, while the severity (indicated by number of sleep apnea events and minimum oxygen saturation) decreased with age [9]. In data from the Behavioral Risk Factor and Surveillance System survey, the likelihood of men reporting trouble falling asleep or sleeping too much decreased over time from ages 18–54 years [10]. However, there has been little evidence regarding how age influences the association between depression and sleep, particularly among young adult men. Chen et al. [11] examined the moderating effect of age on the relationship between insomnia and depression (measured as one item, “feeling blue”) among men from young adulthood into late adulthood, and they found that the effect size of insomnia on depression decreased with age, with the age groups 35–44 years and 55–64 years having the smallest effect sizes. These findings can tell us about age differences between young, middle and older adult men, but it does not distinguish by age among young adult men. Therefore, the current study explores the relationship between depression and sleep among young adult men and the moderating effect of age on the association.

2. Methods
2.1 Participants and Sampling

The present research employed a secondary analysis of the National Longitudinal Survey of Youth 1979 for Children and Young Adults (NLSY79 CY). This data set was administered by the U.S. Bureau of Labor Statistics to American young adults. This study utilizes data collected in 2014, and this data includes health information related to depression and sleep. Respondents who were not interviewed or who declined to answer how many hours they slept on average were excluded from analysis. From 5716 respondents, 2777 men were selected for the final sample as this study only focused on men.

2.2 Measures
2.2.1 Hours of Sleep

Young adult men were asked to report how many hours they sleep on average. The exact question is as follows: “On a typical weeknight, how many hours of sleep do you usually get?” Thus, a higher score on this variable indicates that respondents slept more hours on average.

2.2.2 Depression

The Center for Epidemiologic Studies Depression Scale (CES-D), which is one of the most prevalent scales to measure depression, was used to examine levels of depression among young adult men [12]. We used the short-form with eleven items and a four-point Likert-type scale. The specific response options range from “rarely or none of the time (1 day a week)” to “most or all of the time (5–7 days)”. Questions included, “I felt I could not shake off the blues, even with help from family or friends”; “I had troubles keeping my mind on what I was doing”; “I felt depressed”; “I felt lonely”; and “I felt life was not worth living”. One of the eleven items assessed happiness, so that item was reverse-coded. All items were summed, and a higher total score indicated higher levels of depression.

2.2.3 Age

Age was assessed by having respondents indicate their current age in years in 2014, when the data was collected. Two age groups were used to identify the moderating effect of age on the association between depression and sleep: those younger than thirty years and those older than thirty years. The range of age is from 18 to 45.

2.3 Other Socio-Demographic Variables

Additional socio-demographic variables were controlled. Race/ethnicity, marital status, educational attainment, and employment were included as control variables. Race/ethnicity included three groups: White, Black, and Hispanic. Marital status was categorized into two groups: Married and non-married. Educational attainment was also categorized into two groups: Higher education and non-higher education. Employment status was divided into employed and unemployed groups.

2.4 Analysis Strategies

An Ordinary Linear Regression was used to explore the relationship between depression and sleep and to investigate the moderating effect of age on the association between depression and sleep among young adult men. The Statistical Package for the Social Sciences (SPSS) version 22.0 (IBM Corp., Chicago, IL, USA) was employed to see whether the associations were statistically significant. The moderation model suggested by Baron and Kenny and Kraemer and colleagues was utilized for analyses [13, 14]. In these models, a moderator is an independent variable that impacts the strength or direction of associations between an independent variable and the dependent variable [15]. Thus, we analyzed three associations to test the moderating effect of age on the relationship between depression and sleep. To be specific, we tested the following three relationships: (a) the relationship between depression and sleep; (b) the relationship between age and sleep; and (c) the interaction effect of age on sleep. These were shown in Fig. 1.

Fig. 1.

Moderation analysis.

3. Results

Young adult men’s average hours of sleep per day was 6.85 hours and their average depression score was 6.80. Participants’ average age was 29.21 years old. Less than 20% of the young adult men were married (18.3%), while more than 20% had received higher education (22.9%). In addition, 85.1% of the respondents were employed. Regarding race/ethnicity, the largest proportion of respondents was White (47.6%), followed by Black (30.9%) and Hispanic (21.5%).

Table 1 shows the relationship between depression and sleep as well as the interaction effect. Depression was negatively related to hours of sleep among young adult men (p $<$ 0.01). Further, age was negatively associated with hours of sleep (p $<$ 0.001). An interaction effect was found, indicating that age significantly moderated the association between depression and hours of sleep among young adult men (p $<$ 0.01). Fig. 2 demonstrates the interaction effect of age on the association. Regardless of the effect of age, both the older and younger age groups slept for fewer hours if they were at greater risk of depression. However, men in the younger age group slept for more hours on average compared to those in the older age group, regardless of depression. In other words, men in the older age group with both higher and lower depression scores slept for fewer hours than men in the younger age group. Further, the effect of depression on sleep was greater for men in the older age group than for men in the younger age group (0.532 hours of sleep for the older group vs. 0.159 hours of sleep for the younger group). Additionally, higher education was positively related to hours of sleep (p $<$ 0.05), while employment was negatively associated with hours of sleep (p $<$ 0.001).

Table 1.Regression results of unstandardized coefficients (standard error) predicting men’s sleep.
 Variables Sleep (Constant) 9.16 (0.38) Depression –0.04 (0.01) ** Marriage 0.18 (0.15) Higher education 0.25 (0.12) * Race/Ethnicity Blacks –0.11 (0.13) Hispanics –0.11 (0.13) Employment –0.49 (0.14) *** Moderators Age –0.06 (0.01) *** Moderating effect Depression*Age –0.01 (0.00) ** Note. *p $<$ 0.05. **p $<$ 0.01. ***p $<$ 0.001.
Fig. 2.

Depression and age on hours of sleep across young adult men.

4. Discussion

The findings in the current study show the importance of young adult men’s psychological and physical health. The relationship between depression and sleep was statistically significant, and this indicates that young adult men who are at higher risk for depression slept for fewer hours on average. Older age was also inversely related to hours of sleep, so that hours of sleep decreased as men aged. Furthermore, an interaction effect of age was found, in that age moderated the association between depression and sleep among young adult men.

Affirming previous findings, this study also revealed that older age negatively influenced hours of sleep and quality of sleep [6]. As individuals age, their quality of sleep might decrease due to physical changes [20]. This phenomenon may be due to natural changes in the body, but it may greatly impact physical health, leading to a weaker immune system and difficulties in daily life [21]. Given that sleep is one of our most basic needs, young adults over the age of thirty, even though they are regarded as young adults, may encounter challenges in their workplace or in socializing with others due to lack of sleep. Young adult men are mainly regarded as being very healthy compared to other gender and generations. For this reason, young adult men’s sleep, which is one critical factor influencing one’s health, has been given less attention and little is known about men’s sleep during young adulthood. However, most people who are older might face low quality of sleep because of reduced hours of sleep. Therefore, older young adults, such as those in their thirties, should be provided with higher accessibility to sleep clinics and information and knowledge about sleep disorders.

Moreover, the present study revealed that age moderated the relationship between depression and sleep among young adult men. As depressed individuals age, they sleep fewer hours compared to younger and less depressed individuals, which is consistent with previous research [7, 22]. In other words, age and depression primarily serve as buffers against enough sleep. This study demonstrated that depression among younger young-adult men, such as those in their twenties, was not greatly influenced by age. This might be because they are still young enough to not be influenced by age in the context of mental health problems and hours of sleep. However, for comparatively older young adult men in their thirties, higher depression greatly affected how many hours they slept. Older young adult men, compared to younger young-adult men, might be in a stage of reduced physical functions, which are related to fewer hours of sleep. Along with this, older age is associated with depression [13]. That is, men in their thirties are at increased risk of depression than men in their twenties, and this is also associated with fewer hours of sleep. In other words, during young adulthood, men in their thirties sleep for fewer hours than men in their twenties, but they are able to sleep for more hours if they do not experience depression. Therefore, extensive mental health services should be provided to young adult men in their thirties for them to have enough sleep.

Although this study pointed out the importance of the role of age on the relationship between depression and sleep among young adult men, the results should be interpreted in the context of limitations. First, as the current study was conducted based on a cross-sectional data, it is not reasonable to explain a cause and effect relationship. Thus, we recommend that longitudinal approaches are needed in future research to more deeply understand the relationship between sleep and depression among young adult men. Second, due to the use of pre-existing data, we were not able to consider other potential variables which may influence sleep. We suggest that future studies account for other covariates that may produce another interpretation.

5. Conclusions

This study sheds light on a new framework to understand young adult men’s sleep by considering their depression. Free educational programs that teach about quality of sleep and adequate sleep should be provided to young adult men before they enter their thirties. Despite the importance of sleep among young adult men, young adult men’s sleep has been given less attention as they are regarded as a healthy group because they are young and men. However, it is necessary to change the previous perspective by considering men’s quality of sleep. This study implies that improving sleep among young adult men as well as identifying what particular age span in young adulthood should be given more attention in the literature while also accounting for young adult men’s depression.

Author Contributions

Study Design—JL. Data Analysis—JL. Writing Original Draft—JL, JA. Manuscript Review and Editing—JL, JA. All authors contributed to editorial changes in the manuscript. All authors read and approved the final manuscript.

Ethics Approval and Consent to Participate

Not applicable.

Acknowledgment

Not applicable.

Funding

This research received no external funding.

Conflict of Interest

The authors declare no conflict of interest.

Publisher’s Note: IMR Press stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Publisher’s Note: IMR Press stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Share


text:
# Ex.1.2 Q2 Integers - NCERT Maths Class 7

Go back to  'Ex.1.2'

a) Write the pair of negative integers whose difference gives $$8.$$

b) Write a negative integer and a positive integer whose sum is $$–5.$$

c) Write a negative integer and a positive integer whose difference is $$–3.$$

What is known?

The two integers whose sum and difference is given.

What is unknown?

Sum and difference of a pair of integers.

Reasoning:

Add or subtract the two values.

Steps:

a) Let us have $$-2$$ and $$-10$$

\begin{align}\therefore{\rm{Difference}}& = (-2)\,-(-10) \\&=- 2 + 10\\&= 8\end{align}

b) Let us have $$-10$$ and $$5$$

\begin{align}\therefore\rm{Sum} &= -10\,+\,5 \\&=\,-5\end{align}

c) Let us have $$-2$$ and $$1$$

\begin{align}\therefore\rm{Difference} &= -2\,-\,1\\&=\,-3\end{align}

Ex 1.2 | Question 2
This video solutions covers Class 7 NCERT Maths chapter 1 (Integers, exercise 1.2 Question 2)

Related Sections
Related Sections


text:
Jump to content
• Advertisement

#### Archived

This topic is now archived and is closed to further replies.

# [java] Efficiency question

This topic is 6127 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

Im pretty new to Java programming and Im trying to think up of more efficient programming techniques. What Id like to know is what is actually going on behind something such as this: int total, numb1; numb1 = 3*3; total = numb1 * 2; total = numb1 * 4; as opposed to this: int total; total = 3*3*2; total = 3*3*4; What Im assuming is that in the first example, 9 is calculated once and stored in main memory for repeated use. In the second example, 9 is calculated multiple times. So that the first example will use up more RAM and the second will use up more processor power. Am I correct in those assumptions? If I am not can someone explain to me what is actually going on and which would be better to use for efficiency? Thanks to all who reply =)

#### Share this post

##### Share on other sites
Advertisement
In this case, you should use the second one. A smart compiler will multiply things that never change during run time (like 3*3*2) during the compile, so your program would really do something like:

total = 18;
total = 36;

Of course, the actual speed difference here is virtually zero.

#### Share this post

##### Share on other sites
What *should* be going on if you have a semi-decent compiler is this:
  numb1 = 3*3;//Compiler would read/compile asnumb1 = 9;//Compiler should/may take this line out complete!total = 9*2;//Since it''s not doing anything...//Will calculate like thistotal = 9*4;//Using the numb1 variable.

Your second example should be like so:
  //The compiler *should* remove this line completely!total=3*3*2;//Since it''s nto being used!total=3*3*4;//This line would get converted like so:total=36;

The second version would be compiled better because while running, it would just be like doing this:
  int total;total = 36;

Which sets the total to a number without ANY calculations.

Billy - BillyB@mrsnj.com.

ps. Some compilers aren''t smart enough to omit lines that do nothing, so they may stay in there.

#### Share this post

##### Share on other sites
The compilers are quite smart. Getting things coded in the first place is hard. Program with the way that it should work and then decide after profiling your code if you need to make it faster with tricks. Don''t start with optimizations, it''s the surest way to spin your wheels forever.

#### Share this post

##### Share on other sites
Thanks for the great replies everyone!!

Im starting to understand what is actually going on but I do have another question...actually just correct me if this is wrong, I like to make sure that I have the right idea:

From what I''m getting, good compilers will do many of the one time operations for you such as total = 3*3*4, before even converting it to machine code. They will even go as far as excluding lines that are not used for anything such as my first
total = 3*3*2 line. But they will not do automatic calculations including variables but will simply convert the variable names into the actual constants. Those calculations will then be taken care of in real time. But then, its all depending on how the compiler is written in the first place.

O and snowmoon, thanks for the tip =). I know what you mean and I admit I do have a problem with trying to make things efficient which is ridiculous considering the size of the applications that I have coded thus far =P. Im trying to fight the urge hehe. Despite this, I think its a good idea for me to know whats going on behind the scenes.

Please let me know if my above explanation is accurate.

Thanks again for all your help =)

#### Share this post

##### Share on other sites
Hi!

First of all, since you have an example, try to decompile the java code. There are a lot of them decompilers out there on the net. I remember one called JAD. There is also the javap tool included with Sun''s JDK, which you can use.

Second; there is a great way to optimize your code. Use the Jopt (Java OPTimizer). You can find it at;
http://www-i2.informatik.rwth-aachen.de/~markusj/jopt/index.html

Regards
Johan

#### Share this post

##### Share on other sites
Hi!

First of all, since you have an example, try to decompile the java code. There are a lot of them decompilers out there on the net. I remember one called JAD. There is also the javap tool included with Sun''s JDK, which you can use.

Second; there is a great way to optimize your code. Use the Jopt (Java OPTimizer). You can find it at;
http://www-i2.informatik.rwth-aachen.de/~markusj/jopt/index.html

Regards
Johan

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5
• Advertisement

• 11
• 9
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632988
• Total Posts
3009738
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!


text:
## Saturday, April 12, 2008

### [MT 3] Differential Discrete White Noise

Assume a white noise discrete time series (sampled at intervalls of dt) with variance sigma^2, here interpreted as a fluctuating position variable:

$C_{xx}(m)=&space;\left<&space;x_n&space;x_{n+m}&space;\right>_n&space;=&space;\sigma^2&space;\delta_{m,0}$

The discrete velocity is defined as:

$v_n&space;=&space;\frac{x_{n+1}-x_n}{\Delta&space;t}$

Its autocorrelation yields (using the Cxx(m) above):

$C_{vv}(m)=\left<&space;v_n&space;v_{n+m}&space;\right>_n&space;=&space;\frac{\sigma^2}{\Delta&space;t^2}\left\{&space;&space;2\delta_{m,0}&space;-&space;\delta_{m,-1}&space;-&space;\delta_{m,+1}&space;\right\}$

The PSD of the velocity fluctuations is given by the Fourier transform of Cvv. We have to use the Discrete Fourier Transform (DFT) here:

$\mbox{DFT}_k\left\{&space;g_m&space;\right\}=\sum_{m=-N/2+1}^{N/2}&space;g_m\;e^{-(2\pi&space;i/N)mk}$

The DFT is based on discrete times

$t_m=m\Delta&space;t$

and the corresponding frequencies

$f_k=\frac{k}{N\Delta&space;t}$

where the indices run as follows:

$m,k&space;\in&space;\left\{&space;-(N/2)\!+\!1,\ldots,0,\ldots,+(N/2)&space;&space;\right\}$

One obtains the following PSD of the velocity fluctuations:

$\mbox{DFT}_k\left\{&space;C_{vv}(m)\right\}=|v(f_k)|^2=\frac{2\sigma^2}{\Delta&space;t^2}&space;\left[&space;1-\cos&space;(2\pi\Delta&space;t&space;f_k)&space;\right]$

In a log-log plot, this looks as shown in this figure. The slope is always 2. So in the case of the experimental bead PSD, the apparent fractional slope of the high frequency wing comes from the superposition with the low frequency fractional powerlaw.

For a detailed derivation of the above formulae, see
SharedDocuments/Notes/DifferentialDiscreteWhiteNoise.pdf

The following figure shows a comparison between the above theoretical PSD and experimental data, measured for a purely noisy bead with a flat MSD:


text:
## Encyclopedia > Progressive rock

Article Content

# Progressive rock

Progressive rock is a style of rock music that arose in the late 1960s, reaching the peak of its popularity in the 1970s, but continuing to this day.

Progressive rock artists sought to move forward, or progress, the rock genre from its simple roots to a higher level. The music is often complex and elaborate, frequently requiring a high level of musicianship from the artists. Elements of progressive rock include:

• Long pieces, in some cases over 20 minutes. (An extreme example is "Karn Evil 9" by Emerson Lake and Palmer, which was too long to fit on a single LP album side but seems ideally suited to CD).
• Pieces that are subdivided into sub-pieces, in the manner of a classical symphony. (An example is the four-part song "Close to the Edge" on the three-track album of the same name by Yes).
• Lyrics that are complex and sometimes impenetrable, but usually carefully crafted, covering such themes as science fiction, fantasy, religion, war, love, madness and history.
• Melodies and harmonies that are intricate and lengthy, often requiring repeated listening to grasp.
• Concept albums, where a theme or set of themes is explored throughout an entire album. (Extreme examples are the double concept albums, The Lamb Lies Down on Broadway by Genesis, Tales from Topographic Oceans by Yes, From Planet Daelthesya To Planet Earth by Master Sound and Dark Side of the Moon by Pink Floyd).
• Unusual vocal styles and use of multi-part vocal harmonies.
• Use of both classical and electronic instruments (particularly keyboards), in addition to the usual rock combination of electric guitar, bass and drums.
• Inclusion of elements from disparate other musical genres, particularly hard rock, classical music and jazz.
• Use of syncopation, unusual time signatures, scales or tunings. Some pieces use multiple time signatures and/or tempos, sometimes overlaid. King Crimson often combined several of these aspects in the same song.
• Solo passages of great speed, subtlety, complexity and/or difficulty, demonstrating the virtuosity of the player.
• Inclusion of classical pieces on albums. For example, Yes start their concerts with a taped extract of Stravinsky's Firebird suite[?], and Emerson Lake and Palmer have included pieces by Copland, Moussorgsky, Parry[?]. Marillion once started concerts with Rossini's La Gazza Ladra, and named their third live album the same.

Progressive rock can be closely identified with the term art rock. Symphonic rock can be considered a significant subset of progressive rock.

Progressive rock's popularity peaked in the mid 1970s, when progressive rock artists regularly topped readers' votes in mainstream popular music magazines. With the advent of punk rock in the late 1970s, and its earlier precursor pub rock, popular and critical opinion moved toward a simpler and more aggressive style of rock, with the words "pretentious", "pompous", and "overblown" often being used to describe progressive rock.

The early 1980s saw something of a revival of the genre, led by groups such as Marillion. Groups that arose during this time are sometimes labelled neo-progressive. At the same time, some progressive rock stalwarts modified themselves to some extent, simplifying their music and including more obviously electronic elements. In 1983, Genesis achieved international success with the song "Mama", with its heavy emphasis on a drum machine riff. In 1984, Yes had a surprise number one hit with the song "Owner of a Lonely Heart", which contained modern (for the time) electronic effects, yet was accessable enough to be played at discos.

The genre received another minor surge of popularity in the 1990s with a wave of new bands, many of which played harder-edged music known as progressive metal. Today, progressive rock continues to be created and admired by a solid core of enthusiasts, but cannot convincingly claim to be progressing rock music in the way it once did. However, the work of contemporary artists such as Godspeed You! Black Emperor could be said to incorporate some of the more experimental elements of progresive rock, combined with the aesthetic sensibilities of punk rock to produce music which many find at once challenging, inovative and imaginative.

All Wikipedia text is available under the terms of the GNU Free Documentation License

Search Encyclopedia
 Search over one million articles, find something about almost anything!

Featured Article
 Quadratic formula ... + \left( \frac{b}{a} \right) x + \frac{c}{a}=0 [/itex] which is equivalent to $x^2+\frac{b}{a}x=-\frac{c}{a}.$ The equation is now ...

This page was created in 27.8 ms


text:
## Cryptocurrency

• 12k
And also easy losses of money.

It's OK, I won't do that.
• 11.3k
It's OK, I won't do that.
I have yet to meet a man who says he will do that.
• 2.6k
Gonna try again with CodeBase tonight. Had an issue yesterday where the photos of my ID weren't high enough quality so they were rejected, and that placed a 24 hour block before I could try again. Hopefully I'll have more luck this time.

That's the crazy thing. How is the price going up if nobody can actually manage to buy it? It's possible that there's a lot of price manipulation by the insiders at the exchanges. Nobody knows. It's a mystery though. Every exchange is collapsing under the weight of the transaction volume, yet the price keeps going up.
• 1.9k
An acquaintance of mine was trying to explain to me why he thought bitcoin will exceed 40k-50k per unit by this time next year.

"It's about trust" he said. "No other currency can be trusted like Bitcoin can, America can just print as many American dollars as it pleases. Everyone can just use bitcoin, we have no need for other currencies. Fractional lending. Visa! They're all bad!".

I tried to explain the hurtles facing bitcoin (authentication times, power consumption, possible unforeseen digital vulnerabilities) and the realities of currency (especially what makes the American dollar so secure/the global reserve currency) but nothing would land and he just kept coming back to the idea that every other form of currency is a bull-shit lie put on by corrupt governments and banks.

With this kind of widespread radical distrust of government and radical faith in bitcoin, ironically, it might actually be able to get that high one day. (that would mean all 21 million bitcoins once they're mined, would be worth around 1 trillion dollars altogether).
• 17.4k
This is on my watchlist for tonight https://www.netflix.com/au/title/80154500
• 2.6k
The only case where it makes sense really is for illegal activities. Drugs, arms trading, etc.

This is actually not true. Bitcoin is not as anonymous as people think Every transaction is tracked forever. For example that NiceHash $62M theft, those bitcoin are sitting in a wallet whose ID everyone knows. If the thief tried to convert it to cash, they'd be found out. You need to give your real-world identification to the exchanges in order to open an account. It turns out that there are cryptos that are completely anonymous. The biggest one is called Monero. It's built on a version of the blockchain that's designed for true anonymity. They mix up each transaction with others so that you can't trace the coins back to any particular account. As I understand it, discerning criminals use Monero now, not bitcoin. • 12.6k Disregard • 11.3k I tried to explain the hurtles facing bitcoin (authentication times, power consumption, possible unforeseen digital vulnerabilities) and the realities of currency (especially what makes the American dollar so secure/the global reserve currency) but nothing would land and he just kept coming back to the idea that every other form of currency is a bull-shit lie put on by corrupt governments and banks. Market crazes (& speculative bubbles) are always marked by people dogmatically sticking to one idea, and greedily chasing it, thinking that they too can earn. They are generally unable to provide even one single rational idea behind their actions. Funnily enough, in this thread, some reputable atheists are doing exactly this, backed by absolutely no rationale or reason, except that the price is going up, and they want in. They are behaving much like the crazed cultists who strap bombs to their chest and blow themselves up thinking that it's the will of God. Generally, market crazes are created. Those with money can buy strategically placed media assets to inseminate such ideas in people. They can also create the necessary fluctuations in price. And people bite the bait because of their greed (or fear). However, once created and on the way, like now, they're entirely irrational and uncontrollable. So one has to be careful when they cash out. With this kind of widespread radical distrust of government and radical faith in bitcoin, ironically, it might actually be able to get that high one day. (that would mean all 21 million bitcoins once they're mined, would be worth around 1 trillion dollars altogether). It will never reach that high. By New Years' Eve or Christmas, it will have tanked, that's my prediction. Until then, it may reach 20-30K. Or it may tank sooner. The reason I'm saying that is that most people want to cash out for the holidays ;) - they don't want to be playing stocks on Christmas Eve. • 11.3k You need to give your real-world identification to the exchanges in order to open an account. So large criminal organisations sifting through millions upon millions of dollars cannot get fake identification, or steal other people's identification, etc.? They cannot make the money lost by transferring it through a network of different accounts, before re-directing all of it to one main account? • 17.4k I mean really, as much as the entire US? There was a story in the last few days that if Bitcoin's growth were to continue at this exponential rate, it would be using ALL the world's energy resources by 2022. So who would have thought that a completely imaginary digital invention, that has no physical counterpart aside from digital code, would have an enormous carbon footprint? https://www.wired.com/story/bitcoin-mining-guzzles-energyand-its-carbon-footprint-just-keeps-growing/ • 12k I have yet to meet a man who says he will do that. Yeah, but I have a bulletproof plan. I'll only buy into the currencies that increase in value. • 12.6k Yeah, I was referring to that report, but I edited my post because I couldn't find it. • 11.3k Yeah, but I have a bulletproof plan. I'll only buy into the currencies that increase in value. They all do >:O • 17.4k So this could actually transform from an interesting speculative bubble, and 'gee I wish I had bought some of them in 2010', to an actual economic AND environmental crisis. Today, each bitcoin transaction requires the same amount of energy used to power nine homes in the US for one day. And miners are constantly installing more and faster computers. Already, the aggregate computing power of the bitcoin network is nearly 100,000 times larger than the world’s 500 fastest supercomputers combined. And it's all growing exponentially. Now there's a Black Swan event that nobody would have thought of a year ago. • 11.3k And how can we profit from it? What should we be shorting? • 17.4k Don't know, I've always been totally crap with investments. I'm just one of the punters who missed out and is now watching the news with incredulity. But this 'energy resource hit' is, I think, a 'Black Swan event' - a chaotic unintended consequence of an ingenious scheme. • 11.3k I guess their big consumption is of electricity, so if anything fails it will be the electricity providers not being capable to keep up with demand, therefore raising prices to lower demand. And if they raise prices... what will happen? Bitcoin miners will have to depend on higher bitcoin prices to maintain the economics of their operations. If the market tanks, they'd be screwed. Are there any publically traded bitcoin miners? Anyone know? If Bitcoin prices don't fall, I don't think electricity providers will be allowed by the governments of the world not to provide to consumers because they have to provide to Bitcoin miners instead who are more profitable. So then the question is will electricity providers be able to keep up with the demand? • 11.3k For those unable to buy Bitcoins, this looks like a good alternative. Less risky too (no risk of your bitcoins getting stolen). https://www.marketwatch.com/investing/stock/gbtc In the past month, Bitcoin rose 130% and GBTC 100%. So quite close. If I were to risk investing in either, it would certainly be through an investment fund. • 4.9k "It's about trust" he said. "No other currency can be trusted like Bitcoin can, America can just print as many American dollars as it pleases. This is such an accurate perspective on those investing in Cryptocurrency. Which is why I asked what the USA dollar was backed by because it USED to be backed by Gold bullion but that is no longer the case and as you suggest, we can keep printing it as we need it but eventually it will become worthless on the world stage. • 11.3k This is such an accurate perspective on those investing in Cryptocurrency. Which is why I asked what the USA dollar was backed by because it USED to be backed by Gold bullion but that is no longer the case and as you suggest, we can keep printing it as we need it but eventually it will become worthless on the world stage. It's backed by the might of the US government ;) - the dollar that is. • 1.9k This is such an accurate perspective on those investing in Cryptocurrency. Which is why I asked what the USA dollar was backed by because it USED to be backed by Gold bullion but that is no longer the case and as you suggest, we can keep printing it as we need it but eventually it will become worthless on the world stage The Federal Reserve is like a fiduciary decision maker when it comes to printing money; they're only supposed to print dollars as the wealth of the economy grows. The whole reason the FED doesn't take direct orders from the federal government is precisely because nobody trusts a king who manages their own finances (if "the king" is backed by a bank who has their own reserves then everyone feels confident when lending and dealing with said king because the they act like a guiding force against bad financial decision making and will/can actually pony-up should things go sour). If the American government really was allowed to print their own fiat they would never have any budget deficits, and the American dollar would have long since hyper-inflated. What Aug says is also true. The American government (it's ability to sanction and otherwise fuck up it's opponents) and military is like an on-going threat of reprisal for any entity that could damage or destroy the value of the American dollar and the strength of the American economy. The American dollar may be fiat, but it is physically and speculatively held in place with brick, mortar, and mortars. The fact that it's the global reserve currency means every other nation of note lives or dies by the success of the dollar along with the American economy, even nations like China, Russia, and North Korea. We're too interdependent on the dollar for it to fail unless we're prepared to deal with global recession and decades of setback regarding technological (and therefore medicinal, environmental, and economic) progress. • 4.9k @Agustino @VagabondSpectre Thank you for sharing your knowledge with me. It gives me a sense of comfort knowing I am around people smarter than I. (Y) • 207 Invest in Moroccan solar energy projects instead! (not sure if this kind of thing is even viable) http://www.invest.gov.ma/?Id=24&lang=en&RefCat=2&Ref=145 • 14.4k • 14.4k So we're on what, delusion? Or new paradigm? • 11.3k So we're on what, delusion? Or new paradigm? We're at about the right time to short-sell gbtc I think >:) • 14.4k Down 7% on the hour. Fun to watch. • 6.8k So this could actually transform from an interesting speculative bubble, and 'gee I wish I had bought some of them in 2010' This whole thread is a clear sign of a very large bubble. Because this is a Philosophy Forum. When you have ads about apps Trading bitcoin coming up if you play some silly smartphone game, you know that loonie time is here. This is the time "when taxidrivers are giving stock tips"-moment. Classical moment when it very likely bursts. Enjoy the moment with popcorn. And anyway, this bubble bursting isn't so serious as the housing market: people need a home to live, but they don't have to use cryptocurrencies. At least yet. Perhaps when money as something physical is taken out of circulation. • 17.4k From the Wired article: By July 2019, the bitcoin network will require more electricity than the entire United States currently uses. By February 2020, it will use as much electricity as the entire world does today. So, something plainly has to give. • 2.6k So, something plainly has to give. Bitcoin's already dead IMO. It may go to a million US first, but it's going to zero. It has unsolvable scaling problem, electricity usage being one of them. The centralization of miners is another. Their network's already congested and inefficient. Transaction costs are rising and settlement times are lengthening. Their protocol is designed to get worse the more people use it. To put bitcoin's performance in perspective, the bitcoin network can handle up to 7 transactions per second. By comparison, Visa handles a constant stream of several thousand transactions per second and up to 50K/sec at peak, using orders of magnitude less electricity per transaction. Many delusional bitcoin enthusiasts think bitcoin's going to replace the world's financial system. This is not going to happen. Some other crypto might. And there is a technical revolution based on blockchain and other distributed ledger technologies that may end up being bigger than the Internet. But bitcoin itself is already over. If someone gets in at$15k and out at \$20k more power to them. But someone's gong to be that last fool.
bold
italic
underline
strike
code
quote
ulist
image
url
mention
reveal


text:
# The most important (default) GMSE data structures

The default sub-models of GMSE (resource, observation, manager, and user) use a small number of default data structures to hold the information needed in simulations. While these default sub-models do not necessarily need to be used in every run in GMSE (see use of gmse_apply), they will be used in any run of the gmse function, and in any call of the gmse_apply function that does not run with entirely custom sub-models. Simulation and model inference do not require an understanding of the default data structures, but such an understanding can be especially useful when running gmse_apply if there is a need to extract uncommonly used information, change key simulated values (e.g., landscape properties, agent budgets, or resource movement rules, as in SI4), or build custom individual-based sub-models. Here we provide a brief explanation of the following key data structures (each name below is listed as it is named in the output gmse_apply when get_res = "Full").

1. AGENTS
2. resource_array (or RESOURCES)
3. observation_array (or OBSERVATION)
4. manager_array (or COST)
5. user_array (or ACTION)
6. LAND

Note that these are not the only data structures used in GMSE, but they are the only ones that can be easily modified in GMSE v0.4.0.3 (see, e.g., SI4), so they are the ones that we focus on here. Additionally, any custom subfunction that returns an array rather than a single value should adhere to the same structure as these defaults if any default GMSE functions are to be used in gmse_apply. We can investigate each data structure by running a single simulation of gmse_apply.

sim <- gmse_apply(get_res = "Full");

The full list output of sim holds each structure by name (in the case where two names are used, e.g., resource_array and RESOURCES, both are identical, but the lower case resource_array takes precedence in case of a change). Each data structure can be examined, changed, and incorporated into a new simulation (e.g., new_sim <- gmse_apply(old_list = sim)).

# 1. AGENTS

The AGENTS data structure is a two dimensional array with a fixed number of 17 columns and a number of rows that is always equal to the sum of the number of manager and users (i.e., each row is an individual agent).

print(sim$resource_array[1:8,]); ## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] ## [1,] 1 1 0 0 91 88 20 1 0 0.3 0 4 0 ## [2,] 2 1 0 0 29 38 20 1 0 0.3 0 3 0 ## [3,] 3 1 0 0 49 43 20 1 0 0.3 1 4 0 ## [4,] 4 1 0 0 13 78 20 1 0 0.3 0 3 0 ## [5,] 6 1 0 0 69 24 20 1 0 0.3 0 5 0 ## [6,] 9 1 0 0 2 13 20 1 0 0.3 0 4 0 ## [7,] 10 1 0 0 24 64 20 1 0 0.3 0 5 0 ## [8,] 11 1 0 0 79 48 20 1 0 0.3 0 4 0 ## [,14] [,15] [,16] [,17] [,18] [,19] [,20] ## [1,] 0 0.5 0 0 0 0 0 ## [2,] 0 0.5 0 0 0 0 0 ## [3,] 0 0.5 0 0 0 0 0 ## [4,] 0 0.5 0 0 0 0 0 ## [5,] 0 0.5 0 0 0 0 0 ## [6,] 0 0.5 0 0 0 0 0 ## [7,] 0 0.5 0 5 0 0 0 ## [8,] 0 0.5 0 0 0 0 0 Columns in the resource array represent the individual resource traits listed below. 1. ID (each resource gets a unique number) 2. Type 1 (currently all resources are of type 1) 3. Type 2 (currently unused) 4. Type 3 (currently unused) 5. x-location on the landscape 6. y-location on the landscape 7. Movement distance 8. Time parameter (typically ignored) 9. Density-independent removal (i.e., death) probability 10. Growth (i.e., birth) probability 11. Offspring produced 12. Age (initial resources are given a random age between 1 and the maximum age sampled from a uniform distribution; offspring always start at age zero in their time step of birth) 13. Marking indicator (used in the observation function) 14. Tallying indicator (used in the observation function) 15. Proportion of a landscape cell the resource consumes in a time step 16. Has the resource been scared by an agent? 17. Has the resource been culled by an agent? 18. Has the resource been castrated by an agent? 19. Has the resource’s growth rate been increased by an agent? 20. Has the resource’s offspring production been increased by an agent? In the case of columns 16-20, the value is either zero (if no action has occurred), or some positive integer that matches the ID of the agent that has performed the act (e.g., if column 17 equals 3, then that means that the agent with ID = 3 culled the resource in the corresponding row; where more than one agent’s action is possible per time step – as in scaring – the integer reflects the most recently acting agent). We anticipate that future versions of gmse will contain multiple resource types, and might add columns to include additional resource traits. # 3. observation_array The observation_array (also accessible as OBSERVATION) is a two dimensional array, the number of rows and columns of which depend on the type of observation being made (i.e., observe_type, which can take integer values from 0-3; see the GMSE reference manual for more information about built-in observation types that are available in GMSE). The first 20 columns of observation_array contain the same individual resource traits as in resource_array, while any additional columns provide information about how and when a resource was observed. The number of rows in observation_array is always equal to or less than that of resource_array; each resource that is observed at least once is placed into one unique row, while unobserved resources are not included as rows in the observation_array. In sim, there are 47 rows, meaning that 1032 resources were not observed at all in this time step. Below, we print out the first eight rows of the observation array. print(sim$observation_array[1:8,]);
##      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
## [1,]   13    1    0    0   94   55   20    1    0   0.3     0     3     1
## [2,]   30    1    0    0    1   60   20    1    0   0.3     0     3     1
## [3,]  113    1    0    0   96   56   20    1    0   0.3     0     2     1
## [4,]  127    1    0    0    3   60   20    1    0   0.3     1     5     1
## [5,]  148    1    0    0   10   66   20    1    0   0.3     0     2     1
## [6,]  195    1    0    0   95   56   20    1    0   0.3     0     5     1
## [7,]  249    1    0    0    9   56   20    1    0   0.3     0     3     1
## [8,]  256    1    0    0   97   58   20    1    0   0.3     1     5     1
##      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22]
## [1,]     0   0.5     0     0     0     0     0     0     1
## [2,]     0   0.5     0     0     0     0     0     0     1
## [3,]     0   0.5     0     0     0     0     0     0     1
## [4,]     0   0.5     0     0     0     0     0     0     1
## [5,]     0   0.5     0     0     0     0     0     0     1
## [6,]     0   0.5     0     0     0     0     0     0     1
## [7,]     0   0.5     0     0     0     0     0     0     1
## [8,]     0   0.5     0     0     0     0     0     0     1

In the case of the default parameters, the observation array has only two additional columns; the first added column 21 is currently unused, and all values in this column are zero. The second added column 22 contains a value of 1 confirming that the resource was observed. Additional options will add different numbers of columns with different values. For example, when observe_type = 0 (managers observe all resources on a random subset of the landscape, the size of which is determined by their distance of vision) but times_observe > 1, managers sample more than one random subset of the landscape. A new column is added for each sampled subset, and a 1 is placed in the relevant column if the resource is observed (these collected data are then used to estimate population size). An example where times_observe = 4 is shown below.

sim_t0_4 <- gmse_apply(get_res = "Full", times_observe = 4);
print(sim_t0_4$observation_array[1:8,]); ## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] ## [1,] 3 1 0 0 0 23 20 1 0 0.3 0 2 1 ## [2,] 16 1 0 0 89 25 20 1 0 0.3 0 4 1 ## [3,] 22 1 0 0 77 78 20 1 0 0.3 0 5 1 ## [4,] 26 1 0 0 3 14 20 1 0 0.3 0 3 1 ## [5,] 29 1 0 0 90 77 20 1 0 0.3 0 5 1 ## [6,] 34 1 0 0 54 32 20 1 0 0.3 1 2 1 ## [7,] 64 1 0 0 86 98 20 1 0 0.3 1 4 1 ## [8,] 76 1 0 0 94 83 20 1 0 0.3 0 4 2 ## [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] ## [1,] 0 0.5 0 0 0 0 0 0 0 1 0 ## [2,] 0 0.5 0 0 0 0 0 0 0 1 0 ## [3,] 0 0.5 0 0 0 0 0 0 1 0 0 ## [4,] 0 0.5 0 0 0 0 0 0 0 1 0 ## [5,] 0 0.5 0 0 0 0 0 0 1 0 0 ## [6,] 0 0.5 0 0 0 0 0 0 0 0 0 ## [7,] 0 0.5 0 0 0 0 0 0 0 0 1 ## [8,] 0 0.5 0 0 0 0 0 0 1 0 1 ## [,25] ## [1,] 0 ## [2,] 0 ## [3,] 0 ## [4,] 0 ## [5,] 0 ## [6,] 1 ## [7,] 0 ## [8,] 0 This process simulates the data collection of resources (and potentially resource trait measurement) as might be performed by observers within the system. It therefore takes a virtual ecologist approach; this enables the integration of theory and empirical work and can improve the mechanistic understanding of social-ecological systems (Zurell et al. 2010). # 4. manager_array For context, it might be easier to understand manager_array after reading about user_array below. The manager_array (also accessible as COST) is a three dimensional array, each layer of which corresponds to a unique agent (rows in AGENT correpond to layers in manager_array). Hence, in the simulation output sim$manager_array, there are 5 layers. Each layer in manager_array has 13 columns, and a number of rows that varies depending on the number of agents and resource types. As of GMSE v0.4.0.3, only the first three rows are used. Two layers of sim$manager_array are shown below, the first being that of the manager and the second being that of the first user. print(sim$manager_array[,,1:2]);
## , , 1
##
##        [,1]   [,2]   [,3]   [,4]   [,5]   [,6]   [,7]   [,8]   [,9]  [,10]
## [1,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [2,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [3,] 100001 100001 100001 100001 100001 100001 100001 100001     10 100001
## [4,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [5,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [6,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [7,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
##       [,11]  [,12]  [,13]
## [1,] 100001 100001     10
## [2,] 100001 100001     10
## [3,] 100001 100001     10
## [4,] 100001 100001 100001
## [5,] 100001 100001 100001
## [6,] 100001 100001 100001
## [7,] 100001 100001 100001
##
## , , 2
##
##        [,1]   [,2]   [,3]   [,4]   [,5]   [,6]   [,7]   [,8]   [,9]  [,10]
## [1,] 100001 100001 100001 100001 100001 100001 100001 100001     56 100001
## [2,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [3,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [4,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [5,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [6,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
## [7,] 100001 100001 100001 100001 100001 100001 100001 100001 100001 100001
##       [,11]  [,12]  [,13]
## [1,] 100001 100001     10
## [2,] 100001 100001     10
## [3,] 100001 100001 100001
## [4,] 100001 100001 100001
## [5,] 100001 100001 100001
## [6,] 100001 100001 100001
## [7,] 100001 100001 100001

Each element in the array indicates the cost of performing a particular action. In the code, this is the cost of changing an element in user_array (which has the same dimensions as manager_array). The minimum value in sim$manager_array is therefore 10, reflecting the default minimum_cost value of 10. The maximum value is 100001, which is one higher than the maximum allowed manager or user budget. Where a cost is 100001, actions can therefore never be performed. An explanation of the rows and columns of manager_array is provided below in the description of user_array. # 5. user_array The user_array (also accessible as ACTION) is a three dimensional array, each layer of which corresponds to a unique agent. When considering the three dimensional user_array, it is helpful to keep in mind that each layer corresponds to the actions of a particular agent, that each column corresponds to a particular type of action, and that each row corresponds to a particular resource, agent, or group that the action will affect. The cost of performing any action in this array is held in manager_array, wherein an action’s cost in manager_array is held in the same array element as the action itself in user_array. Recall from the manager array that the first layer of user_array corresponds to the manager actions, and that remaining layers correspond to user actions; there are therefore as many layers in user_array as there are agents in the model, and each row of AGENTS corresponds to equivalent layer of user_array (e.g., the manager agent, ID = 1, is in the first row of AGENTS and the first layer of user_array). The first two layers of user_array are shown below. print(sim$user_array[,,1:2]);
## , , 1
##
##      [,1] [,2] [,3] [,4]       [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
## [1,]   -2    1    0    0 1000.00000    0    0    0    0     0     0     0
## [2,]   -1    1    0    0    0.00000    0    0    0    0     0     0     0
## [3,]    1    1    0    0  -65.75964    0    0   10   56    10    10    10
## [4,]    2    1    0    0    0.00000    0    0    0    0     0     0     0
## [5,]    3    1    0    0    0.00000    0    0    0    0     0     0     0
## [6,]    4    1    0    0    0.00000    0    0    0    0     0     0     0
## [7,]    5    1    0    0    0.00000    0    0    0    0     0     0     0
##      [,13]
## [1,]     0
## [2,]     0
## [3,]    64
## [4,]     0
## [5,]     0
## [6,]     0
## [7,]     0
##
## , , 2
##
##      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
## [1,]   -2    1    0    0   -1    0    0    0   17     0     0     0     3
## [2,]   -1    1    0    0    0    0    0    0    0     0     0     0     0
## [3,]    1    1    0    0    0    0    0    0    0     0     0     0     0
## [4,]    2    1    0    0    0    0    0    0    0     0     0     0     0
## [5,]    3    1    0    0    0    0    0    0    0     0     0     0     0
## [6,]    4    1    0    0    0    0    0    0    0     0     0     0     0
## [7,]    5    1    0    0    0    0    0    0    0     0     0     0     0

Note that there are more columns in this array than there are possible actions in GMSE. This is because there are several columns that do not map to actions per se, but properties of agents. As of GMSE v0.4.0.3, these properties cannot be changed by other agents. Column of user_array are as follows.

1. The type of agent or resource being affected by an action. A value of -2 indicates that actions have a direct effect on a resource (e.g., scaring, culling, etc.). A value of -1 indicates that actions have a direct effect on a landscape layer. Positive integer values indicate actions that affect other agents, where each integer corresponds to the agents’ IDs. Where the integer value is identical with the agent’s own ID (e.g., row 3 in layer 1 where the element sim$user_array[3, 1, 1] = 1), actions affect all other agents in the model. As of GMSE v0.4.0.3, all rows except 1-3 are unused because agents do not affect one anothers actions individually; they either affect all other agents’ actions indiscriminately (in the case of the manager setting policy) or do not (directly) affect other agents’ actions at all (in the case of users). This data structure, however, is designed so that future versions of GMSE will allow users to affect one another directly (representing, e.g., different groups of agents lobbying for different interests, among-user conflict, etc.). 2. Type 1 of the agent or resource of interest (in practice, this is currently unused). 3. Type 2 of the agent or resource of interest (currently unused). 4. Type 3 of the agent or resource of interest (currently unused). 5. Utility associated with the recipient of the action. For example, in the case of the resource (row 1), positive values indicate that the agent wants more of these resources, while negative values indicate that the agent wants fewer. In the case of the manager (layer 1), the value in the first row equals manage_target, while the value in the third row is the change in resource number needed to achieve the target value (i.e., manage_target = 1000, and the manager’s estimate is sim$observation_vector = 1065.7596372. The former minus the latter is -65.75964).
6. Whether or not the utility associated with the recipient of the action is dependent upon that recipient being on land owned by the actor (e.g., if users only care about resources on landscape cells that they own, then this value is 1 instead of 0).
7. Whether or not actions on the recipient are possible if the recipient is not on land owned by the actor (e.g., if users cannot cull resources that are not on their own land, then this value is 1 instead of 0).
8. The number of actions performed for scaring, which in row 3 of the manager layer 1 is interpreted as the scaring cost set by the manager for users.
9. The number of actions performed for culling, which in row 3 of the manager layer 1 is interpreted as the culling cost set by the manager for users.
10. The number of actions performed for castration, which in row 3 of the manager’s layer 1 is interpreted as the castration cost set by the manager for users. Further, in row 2 for users (where column 1 equals -1), this value is instead the number of tend_crop actions (the number of cells on which crops are tended by users, which always is perfomed on users’ own land, cannot be affected by the manager, and always equals minimum_cost).
11. The number of actions performed for feeding resources (increasing their growth rate, lambda), which in row 3 of the manager’s layer 1 is interpreted as the feeding cost set by the manager for users. Further, in row 2 for users (where column 1 equals -1), this value is instead the number of kill_crop actions (the number of cells on which crops are destroyed by users, which always is perfomed on users’ own land, cannot be affected by the manager, and always equals minimum_cost)
12. The number of actions performed for helping resource offspring (directly increasing offspring production), which in row 3 of the manager’s layer 1 is interpreted as the helping offspring cost set by the manager for users.
13. The number of actions unspent by the user or manager; any actions allocated to this row do nothing. These may be used when any action would lead the agent to a less than desirable outcome, such as if only culling exists as a policy option (default), but managers do not want to increase the cost of culling because resource density is above manage_target.

In the genetic algorithm, values in elements of a user_array layer are potentially modified according to each agent’s objective, as constrained by costs in manager_array.

# 6. LAND

Events in default GMSE sub-models occur on a spatially-explicit landscape LAND, which is stored as a three dimensional array. The size of this landscape is specified with the land_dim_1 and land_dim_2 arguments of GMSE, which determine the length, in cells, of the y and x dimensions of the landscape, respectively (e.g., if land_dim_1 = 10 and land_dim_2 = 1000, then the landscape will be one very long horizontal transect). The total number of landscape cells on which resources and agents can interact is therefore the product of land_dim_1 and land_dim_2. In addition, all landscapes have three layers, which hold three separate values of information for each x-y location. The first layer is unused in GMSE v0.4.0.3; the second layer holds crop production on a cell, and the third layer holds the owner of the cell (corresponding to the ID of an agent, where the manager’s ID = 0 defines public land). An $$8 \times 8$$ portion of the landscape from sim is shown below.

print(sim$LAND[1:8,1:8,]); ## , , 1 ## ## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] ## [1,] 1 1 1 1 1 1 1 1 ## [2,] 1 1 1 1 1 1 1 1 ## [3,] 1 1 1 1 1 1 1 1 ## [4,] 1 1 1 1 1 1 1 1 ## [5,] 1 1 1 1 1 1 1 1 ## [6,] 1 1 1 1 1 1 1 1 ## [7,] 1 1 1 1 1 1 1 1 ## [8,] 1 1 1 1 1 1 1 1 ## ## , , 2 ## ## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] ## [1,] 1 1 1 1 1 1 1.0 1 ## [2,] 1 1 1 1 1 1 1.0 1 ## [3,] 1 1 1 1 1 1 1.0 1 ## [4,] 1 1 1 1 1 1 1.0 1 ## [5,] 1 1 1 1 1 1 1.0 1 ## [6,] 1 1 1 1 1 1 0.5 1 ## [7,] 1 1 1 1 1 1 1.0 1 ## [8,] 1 1 1 1 1 1 1.0 1 ## ## , , 3 ## ## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] ## [1,] 1 1 1 1 1 1 1 1 ## [2,] 1 1 1 1 1 1 1 1 ## [3,] 1 1 1 1 1 1 1 1 ## [4,] 1 1 1 1 1 1 1 1 ## [5,] 1 1 1 1 1 1 1 1 ## [6,] 1 1 1 1 1 1 1 1 ## [7,] 1 1 1 1 1 1 1 1 ## [8,] 1 1 1 1 1 1 1 1 In the case of the above, all of the cells in this square patch of landscape are owned by agent 1 (i.e., the manager; see sim$LAND[,,3]), and we can see that crop production on this patch of land has been decreased from 1 in several cells as a consequence of consumption by resources (see sim\$LAND[„2]). In SI4, we show how landscape cell values can be manipulated to customise the placement of land ownership.

# Conclusions

We have focused on the data structures AGENTS, resource_array, observation_array, manager_array, user_array, and LAND because these are the data structures that can be most readily manipulated to customise GMSE simulations. An example of how to do this within a loop using gmse_apply can be found in SI4. While other data structures exist within GMSE (e.g., see the output of gmse_apply when get_res = Full), we do not recommend manipulating these structures for custom simulations.

Many data structures contain elements that are unused in GMSE v0.4.0.3, and in all cases this is designed for ease of ongoing development of new GMSE features. Requests for new features can be made on GitHub using the GMSE Wiki or the GMSE Issues page.

Zurell, Damaris, Uta Berger, Juliano S Cabral, Florian Jeltsch, Christine N Meynard, Tamara Münkemüller, Nana Nehrbass, et al. 2010. “The virtual ecologist approach: Simulating data and observers.” Oikos 119 (4): 622–35. doi:10.1111/j.1600-0706.2009.18284.x.


text:
# Different Solutions to British Maths Olympiad (BMO) 1995 Round 1 Question 5, another dwarf combinatorics question

The question states:

The seven dwarfs walk to work each morning in single file. As they go, they sing their famous song, “High - low - high -low, it’s off to work we go . . . ” Each day they line up so that no three successive dwarfs are either increasing or decreasing in height. Thus, the line-up must go up-down-up-down- · · · or down-up-down-up- · · ·. If they all have different heights, for how many days they go to work like this if they insist on using a different order each day? What if Snow White always came along too?

My solution focuses on building up from smaller cases. What other elementary solutions exist?

• It's a little difficult to avoid your solution if we don't know what it is. :-) – Theo Bendit Sep 27 '18 at 4:28
• @TheoBendit I think the OP is asking whether there's a solution method that doesn't depend on building up the solution from smaller cases. – saulspatz Sep 27 '18 at 4:37
• You can just list the $5040$ permutations and sort out the unacceptable ones. – Ross Millikan Sep 27 '18 at 5:05

Denote the number of admissible orderings of $$n$$ dwarfs by $$a_n$$. Let $$n\geq2$$. If $$\gamma:\>[n]\to[n]$$ is an admissible ordering then $$\bar\gamma(k):=n+1-\gamma(k)\qquad(1\leq k\leq n)$$ is an admissible ordering as well. The map $$\gamma\mapsto\bar\gamma$$ is in fact a fixed point free involution of the set of admissible orderings. Among $$\gamma$$, $$\bar\gamma$$ exactly one ends with a downward slope of the zigzag, and exactly one starts with an upward slope of the zigzag.
Assume there are $$n+1$$ dwarfs. The largest among them (the boss) can range himself at $$n+1$$ different places in the row. For a given choice there are $$0\leq k\leq n$$ free places ahead of the boss and $$n-k$$ free places behind the boss. We can choose the $$k$$ dwarfs marching in front of the boss in $${n\choose k}$$ ways. If $$k=0$$ or $$k=1$$ we can arrange these $$k$$ dwarfs in one way, and if $$k\geq2$$ we can arrange them in $${1\over2}a_k$$ ways such that their zigzag ends with a downward slope. Similarly, if $$k=n-1$$ or $$k=n$$ we can arrange the remaining $$n-k$$ dwarfs to the right of the boss in one way, and if $$k\leq n-2$$ we can arrange these dwarfs in $${1\over2}a_{n-k}$$ ways such that their zigzag begins with an upward slope.
We therefore obtain the following recursion: $$a_0=a_1=1,\quad a_2=2,\quad a_3=4\ ,$$ $$a_{n+1}={1\over2}a_n+{n\over2}a_{n-1}+{1\over4}\sum_{k=2}^{n-2}{n\choose k}a_ka_{n-k}+{n\over2}a_{n-1}+{1\over2}a_n\quad(n\geq3)\ .$$ This recursion produces the following table: $$\bigl(a_n\bigr)_{n\geq0}=\bigl(1, 1, 2, 4, 10, 32, 122, 544, 2770, 15872, 101042,\ldots\bigr)\ .$$ This is sequence A001250 at OEIS, where they refer to the greek word $$\beta\omicron\upsilon\sigma\tau\rho\omicron\phi\eta\delta\omicron\nu$$, meaning going back and forth.


text:
Thread: Feynman Diagram View Single Post

## Feynman Diagram

1. The problem statement, all variables and given/known data
Draw the Feynman diagram for:
e$$^{-}$$ + p $$\rightarrow$$ n + $$\upsilon$$$$_{e}$$

Sorry, I dunno how to make everything even but you should get the gist.

2. Relevant equations

3. The attempt at a solution

Well, what I have is the electron and proton annihilating(and this is what confuses me) into a Z$$^{o}$$ which in turn becomes the neutron and electron neutrino. Is this correct?

 PhysOrg.com science news on PhysOrg.com >> 'Whodunnit' of Irish potato famine solved>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change>> Curiosity Mars rover drills second rock target


text:
# Setting precision and machine underflow

As is well known, Mathematica changed how it handles numbers smaller than $MinMachineNumber in recent versions. I'm running Mathematica 12 on a Mac, and I cannot figure out why it's treating these differently: Exp[-N[2695, $$MachinePrecision]] Exp[-N[2695.0,$$MachinePrecision]] The top line returns 3.77... times 10^-1171 while the bottom line gives the "too small to represent as a normalized machine number" error and returns zero. Since both numbers are set to MachinePrecision I'd think that the fact that the bottom one has the added .0 is irrelevant, but obviously my understanding is wrong. Running N[Precision[-N[2695, $$MachinePrecision]]] N[Precision[-N[2695.0,$$MachinePrecision]]] confirms both exponents have the same precision. I'd greatly appreciate it if someone could explain why Mathematica is treating these differently to me. • Removing the outer N[...] from both will show that they are in fact different. Sep 26 '19 at 20:56 ## 1 Answer Indeed, that is somewhat odd. The reason is this: Precision[N[2695, $$MachinePrecision]] Precision[N[2695.0,$$MachinePrecision]] 15.9546 MachinePrecision In fact, one has to be careful with the subtle difference between the following two:$MachinePrecision
MachinePrecision

15.9546

MachinePrecision

That is, N[2695, $MachinePrecision] is actually not a machine number but an arbitrary precision number with as many digits as a machine number. Thus, over- and underflows in numerical computations will be treated differently. In the case of N[2695.0,$MachinePrecision], one has to keep in mind that N can never increase the precision (one had to use SetPrecision for that). And MachinePrecision is always treated as smaller precision than any arbitrary precision. So, curiously one has MachinePrecision < $MachinePrecision and N[2695.0,$MachinePrecision] does not change 2695.0 from a machine number to an arbitrary precision number with 15.9546 digits.

In a nutshell:

N[2695, $MachinePrecision] is an arbitrary precision number because (i) 2695 is exact and (ii)$MachinePrecision evaluates to 15.9546.

N[2695.0, $MachinePrecision] is a machine number because (i) 2695.0is a machine number, because (ii)$MachinePrecision evaluates to 15.9546 which is treated by Mathematica as a higher precision than MachinePrecision, and because (iii) N cannot increase the Precision of its input.

• That clarifies a lot, although I still don't understand why Mathematica isn't doing the same thing to both. Why is one an arbitrary precision number but not the other? Sep 26 '19 at 21:35
• @LaurenPearce In the first case, you end up with an exact number being reduced to an arbitrary precision number with a precision of 15.9546. In the second case, you start out with a machine precision number. To switch it to an arbitrary precision number with precision of 15.9546 is considered by Mathematica to be more precision, and it does not want to increase the precision without an explicit command. You can also try Precision[N[2695, MachinePrecision]]. Using \$MachinePrecision with the dollar sign is the same as typing Precision[N[2695, 15.9546]]. Sep 26 '19 at 23:13


text:
A numeric parameter function representing parameters for the spike-and-slab prior used by embed::step_pca_sparse_bayes().

Usage

prior_slab_dispersion(range = c(-1/2, log10(3)), trans = log10_trans())

prior_mixture_threshold(range = c(0, 1), trans = NULL)

Arguments

range

A two-element vector holding the defaults for the smallest and largest possible values, respectively. If a transformation is specified, these values should be in the transformed units.

trans

A trans object from the scales package, such as scales::log10_trans() or scales::reciprocal_trans(). If not provided, the default is used which matches the units used in range. If no transformation, NULL.

Details

prior_slab_dispersion() is related to the prior for the case where a PCA loading is selected (i.e. non-zero). Smaller values result in an increase in zero coefficients.

prior_mixture_threshold() is used to threshold the prior to determine which parameters are non-zero or zero. Increasing this parameter increases the number of zero coefficients.

Examples

mixture()
#> Proportion of Lasso Penalty (quantitative)
#> Range: [0, 1]