text:
Categories

# [CTF] P’Hack – RAID dead redemption (forensics)

I took part in the P’Hack CTF with the Arn’Hack Team. It was a beginner friendly CTF, with a lot of easy challenges. I wanted to write about this forensic challenge “RAID dead redemption”. The goal was to recover data from a RAID partition composed of  3 disks, in which one of them was completely deleted.

Contents

## The challenge

Vous travaillez à la brigade spéciale du service cyberdéfense de la gendarmerie de Montargis.

Les disques dur  d'une femme ont été saisis et viennent de vous être transmis. Elle est  suspectée d'avoir téléchargé de nombreux fichiers PNG et JPG dont elle  n'avait pas la propriété intellectuelle. Mais il semblerait qu'elle ait  eu le temps de supprimer une partie des preuves avant l'intervention.  Faites de votre mieux pour en extraire le maximum !

Le  manuel d'un logiciel suspect tournant sur l'ordinateur a également été  retrouvé et vous a été transmis pour vous guider dans votre enquête.
You are working for the gendarmerie cybersecurity division in Montargis.

A woman’s hard drives were seized and were transfered to you. She is suspected of having downloaded a lot of PNG and JPG files of which she hadn’t the intellectual property. It seems she had enough time to delete a part of the evidence before your colleagues grabed her. Do your best to recover as much as possible !

A suspicious software’s user manual was also recoverd on the computer, and was send to your department to help you in your investigation.

Here are the files that were attached to the challenge :

If we take a look at the three files, DISK1.bin and DISK3.bin are exactly the same size, and DISK2.bin is completely empty. It’s probably the disk that was purged. Let’s take a look at this user manual :

So the backup system is using RAID 5, in left-asynchronous mode, with the data written from left to right. The chunk size is 1 byte.

## A word on RAID 5

RAID 5 is a backup system using at least 3 disks. It’s made for integrity. Build on a distributed parity system, RAID 5 allows you to recover the entire data from a partial or complete data loss on one single drive. It reaches his limit when more than one drive is corrupted.

Each drive is divided  in fix sized chunks. When considering two drives, the xor of two equally indexed chunks results in the value of the third drives chuck.

The previous image is very close to the structure offered by the challenge. The parity block starts on the last drive, and form a diagonal. The data is written from left to right (A1 > A2 > A3 > B1 > ...).
This all means that our job is actually pretty easy. We have to xor the two files to recover the missing drive, and then just put the data back in right order for us to read it.

## Solving the challenge

As I was scripting at the same time as I was trying to figure out how this RAID 5 implementation worked, I have to different scripts. A very simple one, to xor the two files (byte per byte), and the second one to put the data back together.

# XOR DISK1 and DISK3 into DISK2

disk2 = open("DISK2.bin", "wb")

toWrite = bytearray()
for i in range(0,len(disk1)):
toWrite.append(disk1[i] ^ disk3[i])

disk2.write(toWrite)

Now let's check if our xor was successful.

647 KiB   DISK1.bin
647 KiB   DISK2.bin
647 KiB   DISK3.bin

The size of our newly created DISK2 is exactly the same as the two others. It's encouraging.

╭─leo@precision ~/Downloads
╰─$xxd DISK1.bin| head 00000000: 894e 071a 000d 4944 0002 00f3 0800 ff59 .N….ID…….Y 00000010: 5c03 004c baff 84a5 6eb4 b370 978b 6f00 ..L….n..p..o. 00000020: 0100 84b1 718d b16e 981e 048f 754f ffb0 ….q..n….uO.. 00000030: 5a86 a76b 8a86 3793 af39 958c 7096 846e Z..k..7..9..p..n 00000040: 8db0 7031 0c5c 8340 7835 c771 783d 6172 ..p1..@x5.qx=ar 00000050: 463a 9029 4964 3451 fab3 5596 3437 3e51 F:.)Id4Q..U.47>Q 00000060: 4541 e469 840a 3573 187e 8474 3ab7 2809 EA.i..5s.~.t:.(. 00000070: 861b 3329 f43a 6f31 728e 7168 4221 5d2e ..3).:o1r.qhB!]. 00000080: 5068 2eb6 e98e 6c77 cba0 6f6a d16a 8b63 Ph….lw..oj.j.c 00000090: 5146 ec6c 612d 7f92 d451 907f 6e66 c96c QF.la-…Q..nf.l ╭─leo@precision ~/Downloads ╰─$ xxd DISK2.bin| head
00000000: 5009 0d0a 0000 4816 00a9 0001 0300 00a7  P…..H………
00000010: 5c00 5018 45ff ea37 1583 2016 e518 1800  .P.E..7.. …..
00000020: 0002 eb34 35ff 3637 eb1a 06fb 3769 00fe  …45.67….7i..
00000030: 6cf4 361a fa37 1ffd 1d23 e418 1be6 1619  l.6..7…#……
00000040: fd38 3a0f 596b e836 6977 5d17 036d 6f07  .8:.Yk.6iw]..mo.
00000050: 6855 fc15 630d 726b 00f9 69e7 1d53 7068  hU..c.rk..i..Sph
00000060: 5f0c 643b e83b 3405 6370 e842 3780 210a  .d;.;4.cp.B7.!.
00000070: eb3d 4f12 5a22 1d5e 64e1 1458 116c 711e  .=O.Z".^d..X.lq.
00000080: 2f42 6e5f e9e1 1a76 00cb 6107 5c18 fb33  /Bn…v..a...3
00000090: 5210 6e32 0456 6c00 9264 e11c 780f 5c1f  R.n2.Vl..d..x..
00000000: d947 0a10 000d 0152 00ab 00f2 0b00 fffe  .G…..R……..
00000010: 0003 5054 ff00 6e92 7b37 9366 7293 7700  ..PT..n.{7.fr.w.
00000020: 0102 6f85 4472 8759 7304 0274 4226 ff4e  ..o.Dr.Ys..tB&.N
00000030: 3672 9171 70b1 286e b21a 7194 6b70 9277  6r.qp.(n..q.kp.w
00000040: 7088 4a3e 5537 6b76 1142 9a66 7b50 0e75  p.J>U7kv.B.f{P.u
00000050: 2e6f 6c3c 2a69 463a fa4a 3c71 2964 4e39  .oliF:.J@..ov..k.m.rpP
00000090: 0356 825e 657b 1392 4635 7163 1669 9573  .V.^e{..F5qc.i.s

Here I noticed the letters P, N and G, so I looked for the PNG header :

89 50 4E 47 0D 0A 1A 0A

If we look closely, we can recover this header by reading the DISKS in this order : D1, D2, p_D3, D1, p_D2, D3, p_D1, D2, D3, ...
With D1-D3 being DISK1-DISK3 and the p_ prefix meaning the byte is ignored since it's parity. If you compare the reading order to get a PNG header with this illustration, it's a match.

All we have to do, is reconstruct the data :

disk1 = bytearray(open("DISK1.bin", "rb").read())

out = open("reconstructed.png", "wb")

def shift_partity(p):
p = p - 1
if p == 0:
p = 3
return p

toWrite = bytearray()
p = 0
for i in range(0,len(disk1)):
p = shift_partity(p)
if p == 3:
toWrite.append(disk1[i])
toWrite.append(disk2[i])
elif p == 2:
toWrite.append(disk1[i])
toWrite.append(disk3[i])
else:
toWrite.append(disk2[i])
toWrite.append(disk3[i])

out.write(toWrite)

Here we go but... were is the flag ?

On last step is required before claiming our points. Let's upload our image to https://aperisolve.fr, to discover hidden data. If you download the binwalk result, and extract it you'll get a bunch of images.

Here we go 😉

format: plain


text:
# Simple Linear Regression-----How to make my model more efficient??

I am working on a simple linear regression model,

This is my Python code :

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

X=dataset.iloc[:,:-1].values
Y=dataset.iloc[:,1].values

from sklearn.model_selection import train_test_split
X_train,X_test,Y_train,Y_test=train_test_split(X,Y,test_size=1/3)

from sklearn.linear_model import LinearRegression
regressor=LinearRegression()
regressor.fit(X_train,Y_train)

plt.scatter(X_train,Y_train,color='red')
plt.plot(X_train,regressor.predict(X_train),color='blue')
plt.title('X vs Y(Training Set)')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()

plt.scatter(X_test,Y_test,color='red')
plt.plot(X_train,regressor.predict(X_train),color='blue')
plt.title('X vs Y(Test Set)')
plt.xlabel('X')[enter image description here][1]
plt.ylabel('Y')
plt.show()

This is my plot of Training Set Training Set This is my plot of Test Set Test Set

How can I increase the efficiency of my ML model??? This is my first ML model, so all suggestions are welcome. Thanks in Advance

• You can add images directly too... – Aditya May 28 '18 at 8:16
• Can you host the data somewhere so that we can access it please? – JahKnows May 28 '18 at 9:30

You cannot really do much: the fit of the regressor is optimum, therefore it is the best that the algorithm can do given these points. What you can do, is change the weights of individual points of the dataset using the sample weight parameter of

LinearRegression.fit(X, y, sample_weight)
`

method, to "attract" the line towards them and see how this affects the accuracy.

I would not expect notable difference because your data do not follow a linear pattern.

Your data does not follow a linear trend. For this reason, your linear model has clear limitations. In order to overcome them, you can build a nonlinear model. With the few data that you have, I advise you to do LOESS. As your training data seems to be able to follow a cubic trend, you can also try with polynomial regression of degree 3.

Bear in mind that the distribution of your train and test data is very different, so you are very likely to overfit. For this reason, it might not be the best data to get started with ML.

• Did I answer your question? – David Masip May 29 '18 at 7:32


text:
Article Text

Uncertainties in the determination of the cortisol-binding capacity' of plasma and their removal
1. C. W. Burke


text:
1.6k views

The probability that it will rain today is $0.5$. The probability that it will rain tomorrow is $0.6$. The probability that it will rain either today or tomorrow is $0.7$. What is the probability that it will rain today and tomorrow?

1. $0.3$
2. $0.25$
3. $0.35$
4. $0.4$
edited | 1.6k views
0
Inclusion-Exclusion Principle (2 Sets)

Answer: $D$

$P$(it will rain today either today or tomorrow) = $P$(it will rain today) $+ P$(it will rain tomorrow) $- P$(it will rain today and tomorrow)

So, $0.7 = 0.5 + 0.6 - P$(it will rain today and tomorrow)

$\Rightarrow P$ (it will rain today and tomorrow) =$0.4$
answered by Boss (34.1k points)
edited
+1
Here Events are independent events .If A is event :"Rains Today" and B is event :"Rains Tomorrow" then Raining tomorrow doesn't depend on raining today.So A and B are independent events and for independent events P(A and B ) is given by P(A)* P(B).

Answer would be 0.5*0.6=0.3.

So answer is option A
0

@vivek  ... I agree with you. But then The probability that it will rain either today or tomorrow should be - It rains today but not tomorrow + It does not rain today but rains tomorrow = (0.5) * (0.4) + (0.5) * (0.6) =( 0.5 ) , but in the question it is given 0.7

Can any one please make it clear ... ?

+5
@Vijay - yes, and that shows that the events are not independent. If it rains today, the probability of it raining tomorrow increases- may be showing that it is Monsoon season :)
0

Sir... What if The probability that it will rain either today or tomorrow is (0.7) not given ??

+3
In that case we cant say the events are dependent or otherwise and usually have to consider real world scenario. I would say consider "events as independent" is its surely the case - as throwing dice 2 times, or if we need to use the independent event formula- no other data given.
0

@vivek  ... I agree with you. But then The probability that it will rain either today or tomorrow should be - It rains today but not tomorrow + It does not rain today but rains tomorrow = (0.5) * (0.4) + (0.5) * (0.6) =( 0.5 ) , but in the question it is given 0.7

If we consider Events are independent then

P(A U B) = P(A) + P(B) - P(A)*P(B)

P(it will rain today either today or tomorrow) = P(it will rain today) +P(it will rain tomorrow) −P(it will rain today)*P(it will rain tomorrow) ==> 0.8

how you got 0.5 ..where i am wrong above ??

0

@jatin khachane 1

You are correct, it will be 0.8 only.

@vijaycs has calculated it wrongly for $p(A \oplus B) = p(A \cap \overline{B}) + p(B \cap \overline{A} ) - 2p(A \cap B)$

0.7 = 0.5 + 0.6 - p(today and tomorrow) = 0.40
answered by Boss (14.4k points)
edited
+3
p(today and tomorrow) should be subtracted instead of being added

1
2


text:
5 added 4 characters in body

This is one of my all time favourites (quoted from Problems and Theorems in Analysis by Polya and Szego).

The 3D domain $\mathcal D$ is defined by the inequalities $$-1\leq x,y,z\leq 1,\quad -\sigma\leq x+y+z\leq \sigma.$$ Show that the volume of $\mathcal D$ is $$\iiint\limits_{\mathcal D}dx\, dy\, dz=\frac{8}{\pi}\int\limits_{-\infty}^{\infty} \left(\frac{\sin t}{t}\right)^3\frac{\sin \sigma t}{t} dt.$$

Hint. Show first that the number of integer lattice points that satisfy the conditions $$-n\leq x,y,z\leq n,\quad -s\leq x+y+z\leq s$$ for some $n$, $s\in\mathbb N$, is equal to $$\frac{1}{2\pi}\int\limits_{-\pi}^{\pi}\left(\frac{\sin \frac{2n+1}{2}t}{sin\frac {t}{2}}\right)^3\frac{\sin \frac{2s+1}{2}t}{\sin \frac{t}{2}} dt.$$

Edit. Check out also the lecture notes by Oliver Knill for some classical examples of volume computations computation and fabulous illustrations.

4 added 10 characters in body
3 added 235 characters in body

This is one of my all time favourites (quoted from Problems and Theorems in Analysis by Polya and Szego).

The 3D domain $\mathcal D$ is defined by the inequalities $$-1\leq x,y,z\leq 1,\quad -\sigma\leq x+y+z\leq \sigma.$$ Show that the volume of $\mathcal D$ is $$\iiint\limits_{\mathcal D}dx\, dy\, dz=\frac{8}{\pi}\int\limits_{-\infty}^{\infty} \left(\frac{\sin t}{t}\right)^3\frac{\sin \sigma t}{t} dt.$$

Hint. Show first that the number of integer lattice points that satisfy the conditions $$-n\leq x,y,z\leq n,\quad -s\leq x+y+z\leq s$$ for some $n$, $s\in\mathbb N$, is equal to $$\frac{1}{2\pi}\int\limits_{-\pi}^{\pi}\left(\frac{\sin \frac{2n+1}{2}t}{sin\frac {t}{2}}\right)^3\frac{\sin \frac{2s+1}{2}t}{\sin \frac{t}{2}} dt.$$

Edit. Check out the lecture notes by Oliver Knill for some classical examples of volume computations and fabulous illustrations.

2 added 342 characters in body
1


text:
# Group Theory

• September 28th 2011, 08:05 PM
H12504106
Group Theory
I have the following problem which i have no idea how to proceed.

Let G be a finite group with odd number of elements. Show that for every $g \in G$, there exists an element $h \in G$ such that $g=h^2$.

I have tried to construct a subgroup H of G defined by $H=\{h\in G \mid g=h^2, \forall g \in G \}.$ However, I cant proceed on after that. Perhaps someone can guide me on how to proceed on with this problem. Thank You.
• September 28th 2011, 08:10 PM
Deveno
Re: Group Theory
hint: use lagrange's theorem, to show that the order of every element of G is odd. now show that <g> = <g^2> for every g in G.

why can we use this to find h?
• September 28th 2011, 08:57 PM
H12504106
Re: Group Theory
let me try the solution with the help of ur hint.

Let K = <g>. Since K is cyclic, the order of K = order of g. Also, K is a subgroup of G. By lagrange theorem, $\left\vert K \right\vert$ divides $\left\vert G \right\vert$. Since $\left\vert G \right\vert$ is odd, therefore $\left\vert K \right\vert$ is also odd. Hence, order of any elements in G is odd.

Next to show: < $g$> = < $g^2$>.
For this part i am not very sure but i will try:
<g> = { $1, g, g^2, g^3, g^4$, ...} and < $g^2$> = { $1, g^2, g^4, g^6$, ...}. Since order of g is odd, therefore, g^(2m+1) = 1, where 1 is the identity of G. Hence, <g> reduces to <g> = { $1, g^2, g^4,$ ...}. Thus <g> = <g^2>.

Is the above reasoning correct?
However I dont really know how this allows us to find h.
• September 28th 2011, 09:12 PM
Deveno
Re: Group Theory
for the second part, since the powers of g^2 "go up by 2's", and since |G| = 2m+1, when we get to g^(2m+2), we wind up back at g.

now surely <g^2> is a subgroup of <g> (every even power of g is also a power of g).

but since g is in <g^2>, <g> must be a subgroup of <g^2>, so.... (fill in the blank).

but this means that g = g^(2m+2) = [g^(m+1)]^2, so what do you think we should choose for h?
• September 28th 2011, 09:34 PM
H12504106
Re: Group Theory
Choose h= g^(m+1) ?
• September 28th 2011, 10:31 PM
Deveno
Re: Group Theory
and does h^2 = g then? if so, you're done.


text:
# 2.1.2 Kinematic Graphs

The variation with time of a, v and s for a rectilinear motion are often plotted on graphs. The resulting graphs are called the a-tv-t and s-t graphs respectively.

Remember that v is the rate of change of displacement.

$\displaystyle v=\frac{{ds}}{{dt}}$

anda is the rate of change of velocity.

$\displaystyle a=\frac{{dv}}{{dt}}$

If we reverse the differentiation by integrating in the opposite direction, we can see that Δv is the time integral of a,

$\displaystyle \int_{{{{t}_{1}}}}^{{{{t}_{2}}}}{{a\text{ }}}dt=\int_{{{{t}_{1}}}}^{{{{t}_{2}}}}{{\frac{{dv}}{{dt}}\text{ }}}dt=\int_{{{{v}_{1}}}}^{{{{v}_{2}}}}{{\text{1 }}}dv=\left[ v \right]_{{{{v}_{1}}}}^{{{{v}_{2}}}}={{v}_{2}}-{{v}_{1}}$

and Δs is the time integral of v.

$\displaystyle \int_{{{{t}_{1}}}}^{{{{t}_{2}}}}{{v\text{ }}}dt=\int_{{{{t}_{1}}}}^{{{{t}_{2}}}}{{\frac{{ds}}{{dt}}\text{ }}}dt=\int_{{{{s}_{1}}}}^{{{{s}_{2}}}}{{\text{1 }}}ds=\left[ s \right]_{{{{s}_{1}}}}^{{{{s}_{2}}}}={{s}_{2}}-{{s}_{1}}$

Never mind the calculus if it intimidates you. The A-level only tests these concepts graphically. All you need to know is that

s-t graph

• The gradient of a s-t graph (at a particular instant) represents the velocity (at that instant).

v-t graph

• The gradient of a v-t graph (at a particular instant) represents the acceleration (at that instant).
• The area under the v-t graph (between two instants in time) represents the change in displacement (during that time interval).

a-t graph

• The area under the a-t graph (between two instants in time) represents the change in velocity (during that time interval).

Example

Given the v-t graph for the motion of a ball over 5 seconds, derive the corresponding s-t and a-t graphs. (Assume “rightward is positive” sign convention.)

Solution

Video Explanation

s-t v-t a-t Example


text:
# XYZ Company was formed on December 1, 2013. The following information is available from Twain's i...

XYZ Company was formed on December 1, 2013. The following information is available from Twain's inventory records for Product BAP. A physical inventory on March 31, 2014, shows 1, 600 units on hand. Instructions Prepare schedules to compute the ending inventory at March 31, 2014, under each of the following inventory methods. (a) FIFO. (b) LIFO. During 2010, DMF Corporation spent $170,000 in research and development costs. As a result, a new product called the New Age Piano was patented. The patent was obtained on October 1, 2010, and had a legal life of 20 years and a useful life of 10 years. Legal costs of$18,000 related to the patent were incurred as of October 1, 2010. Instructions (a) Prepare all journal entries required in 2010 and 2011 as a result of the transactions above. (b) On June 1, 2012, DMF spent \$9, 480 to successfully prosecute a patent infringement suit. As a result, the estimate of useful life was extended to 12 years from June 1, 2012. Prepare all journal entries required in 2012.


text:
# Semi-Direct Product & Non-Abelian Groups

1. Jul 28, 2011

### OMM!

1. The problem statement, all variables and given/known data

Let p, q be distinct primes s.t. p $\equiv$ 1 (mod q). Prove that there exists a non-Abelian group of order pq and calculate the character table.

2. Relevant equations

Semi-Direct Product: Let H = < Y | S > and N = < X | R > be groups and let $\phi$ : H $\rightarrow$ Aut (N) be a homomorphism. Then the SDP has the presentation:

N x H = < X, Y | R, S, $y^{-1}xyw_{x,y}^{-1}$ >

With x in X, y in Y, $w_{x,y}$ = ($\phi$(y(x))) (i.e. $\phi$ of y and then $\phi$ of y of x etc.) in < Y > = N

3. The attempt at a solution

I've done a specific example where p=7 and q=3 and found a group of order 21, using the semi-direct product of 2 cyclic groups $C_{7}$ and $C_{3}$.

But can't see how to prove that there exists a group more generally. So far I have.

If N = $C_{p}$ = < x > and H = $C_{q}$ = < y >, then $\phi$ : $C_{q}$ $\rightarrow$ Aut ($C_{p}$) = $C_{p-1}$ = < $\alpha$ >, then we have y $\mapsto$ $\phi$(y) too.

When p=7 and q=3

I had that $\phi$(y) = {1, $\alpha^{2}$, $\alpha^{4}$}

If $\phi$(y) = 1, then we'd have that the SDP of $C_{7}$ and $C_{3}$ would be ismorphic to $C_{7}$ x $C_{3}$.

If $\phi$(y) = $\alpha^{2}$, then the SDP of $C_{7}$ and $C_{3}$ would be equal to < x, y >

Then by the relation in the SDP, we'd have: yx$y^{-1}$ = $\alpha^{2}$(x) = x^{t}

And we have that: t = {1, 2, 3, 4, 5, 6}, with p=7 and q=3, then: t^{3} $\equiv$ 1 (mod 7), and so: t = 1 and t = 2 and t = 4, thus we have groups:

G = < X, Y | $x^{7} = y^{3} = 1$, $yxy^{-1} = x$ > = $C_{7}$ x $C_{3}$

G = < X, Y | $x^{7} = y^{3} = 1$, $yxy^{-1} = x^{2}$ >

G = < X, Y | $x^{7} = y^{3} = 1$, $yxy^{-1} = x^{4}$ >

But how would I get to this stage more generally?! Thanks for any help!

2. Jul 28, 2011

### micromass

Hi OMM!

I think it's clear that you will want to form the group $C_p\rtimes C_q$. The first thing you will want to do is check if there exists a suitable homomorphism

$$\phi:C_q\rightarrow Aut(C_p)$$

3. Jul 28, 2011

### OMM!

Hi micromass, thanks for your help once again!

So if we say, < y > = $C_{q}$, then we need to show there is a homomorphism $\phi$ that sends y to $\phi$(y) which is an element of Aut $C_{p}$ = $C_{p-1}$.

And since p $\equiv$ 1 (mod q), then $C_{p-1}$ isomorphic to $C_{q}$?

And clearly there exists a homomorphism from one group to itself (endomorphism?).

Am I on the right track?!

4. Jul 28, 2011

### micromass

You're certainly on the right track, but there is a small mistake. You say that $C_q$ is isomorphic to $C_{p-1}$, but this is not true.

All you know is that p-1=0 (mod q), but this does not imply that q=p-1. It merely implies that q divides p-1.

5. Jul 28, 2011

### OMM!

So for y in $C_{q}$, we have $y^{q}$ = 1

And if q divides p-1, then $y^{p-1}$ = 1?

Does the order of the element $\phi$(y) divide p-1? Or does it divide q?

(Sorry, probably obvious, but having a mental moment!)

Then to find the possible element for $\phi$(y) for $C_{p-1}$ = < $\alpha$ >

$\phi$(y) in {1, $\alpha$, $\alpha^{2}$, .... , $\alpha^{p-1}$}

Show which powers of $\alpha$, when put to the power of q, give a power 1 (mod p)? (i.e. yx$y^{-1}$ = $x^{t}$, we need $t^{q} \equiv$ 1 (mod p))

Am I missing something out here or is it just a case now of showing that basically t = 1 is one of these values of t, thus getting the non-abelian cyclic group $C_{p}$ x $C_{q}$ of order pq?

6. Jul 28, 2011

### micromass

Hmm, I think you're making it a bit too hard on yourself.

We know that q divides p-1, does that mean that we can always find an element of order q in $C_{p-1}$?

7. Jul 28, 2011

### OMM!

I'd say yes (With very little conviction! Haha)

As I said in the last post, if we have an element y in $C_{q}$ which is obviously of order q, then y is also in $C_{p-1}$?

8. Jul 28, 2011

### micromass

Aah, yes. I seem to be a bit confused with the notation. You are identifying $C_q$ with elements on the unit circle of $\mathbb{C}$ yes??

9. Jul 28, 2011

### OMM!

I'm not entirely sure!

I am basically saying that C_{q} is the cyclic group of order q, thus is generated by < y >.

In other words: C_{q} = < y | y^{q} = 1 >

The elements of which are: {1, y, y^{2}, .... , y^{q-1}}

10. Jul 28, 2011

### micromass

Yes, that's what I thought.

There are several methods to prove the existance of an element of order q in $C_{p-1}$, the easiest makes use of the fundamental theorem of abelian groups.

However, you seem to want to do another method (which is also fine): you want to say that if y is an element of $C_q$, then it is an element of $C_{p-1}$. Unfortunately, this does not make much sense: the elements in the cyclic group might look quite different from eachother!
However, every cyclic group is isomorphic to a part of the unit circle by

$$\Phi:C^q\rightarrow S^1:y^k\rightarrow e^{2\pi i k/q}$$

this is an group monomorphism. So now you can indeed say that an element of $C_q$ is also an element of $C_{p-1}$!!

11. Jul 28, 2011

### OMM!

And the order of that element divides q?

It can't be 1, else the group would be Abelian i.e. yxy^{-1} = x ===> yx = xy

So the order must be q, as q is prime?

12. Jul 28, 2011

### micromass

Well, you can choose that element such that the order is q!

13. Jul 28, 2011

### OMM!

Thanks for your help, I'll give it another shot in the morning. Found a bit on Frobenius Groups which seems quite related, which I think may be my bed-time reading!

Thanks again, you're a great help!


text:
Sharing files among CÉCI users¶

As scientists work in teams, it is often necessary to share files (be it data or code) among several CÉCI users. Access to files is governed by the UNIX file permission system so you will need to get familiar with it to share files. A general introduction can be found on Wikipedia. Actually, sharing files with every one else is easy. It is when you need to give some people access to you files and not to others that things become a bit more convoluted.

Sharing with every one is easy: you simply need to set the correct UNIX permissions on your home directory and the files/directories you want to share. Sharing with only certain people through hiding is also easy (access by unauthorized parties is possible but improbable). Sharing with only certain people through real enforcement requires our intervention (access by unauthorized parties is then impossible).

Sharing with everyone¶

To share with everyone you need to make sure that your home directory has read and execute permission for others (e.g. rwxr-xr-x or 755 in octal form). Then, everyone can list the content of your home directory and access any file in there that has read access for others. The reasoning applies recursively to sub-directories.

To find which permissions apply to your home directory, run the ls command (remember that ~ is the home directory of the current user, the -l options is used to show permissions, the -d option is to list the directory itself rather than its content, and the -L option is necessary because on most CÉCI systems, the home directory is a symbolic link):

ceciuser1@cecicluster:~ $ls -dlL ~ drwxr-xr-x 56 ceciuser1 ceciuser1 8192 Aug 12 16:20 /home/ceciuser1 Here, the home directory of the ceciuser1 user on cecicluster is readable and accessible by everyone. Should the above command return something like the following: ceciuser1@cecicluster:~$ ls -dlL ~
drwxr-x--- 56 ceciuser1 ceciuser1 8192 Aug 12 16:20 /home/ceciuser1

another user (for instance here ceciuser2) would not be able to see the contents:

ceciuser2@cecicluster:~ $ls -l ~ceciuser1 ls: cannot open directory /home/ceciuser1: Permission denied Then the chmod command must be used to give access to others. The manual of the chmod command can be found by issuing the man chmod command. ceciuser1@cecicluster:~$ chmod o=rx ~
ceciuser1@cecicluster:~ $ls -dlL ~ drwxr-xr-x 56 ceciuser1 ceciuser1 8192 Aug 12 16:20 /home/ceciuser1 The above chmod command reads, in plain English, Change the permissions of my home directory so that others have (=) read and execute access to it., so that other users will be able to see its contents. Indeed, user ceciuser2 now can list the content of the home directory of user ceciuser1. ceciuser2@cecicluster:~$ ls -l ~ceciuser1
drwxr-xr-x ceciuser1 ceciuser1 Aug 12 16:20 shared_dir
drwxr-x--- ceciuser1 ceciuser1 Aug 12 16:20 private_dir
-rw-r--r-- ceciuser1 ceciuser1 Aug 12 16:20 fileA
-rw-r----- ceciuser1 ceciuser1 Aug 12 16:20 fileB

What we see is that other (all other) users have read access to shared_dir and fileA, but not to fileB for instance:

ceciuser2@cecicluster:~ $cat ~ceciuser1/fileA Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ceciuser2@cecicluster:~$ cat ~ceciuser1/fileB
cat: /home/ceciuser1/fileB: Permission denied

Restricting access through hiding¶

Sometimes you do not want to share your files with all other users, though.

To share with only a restricted list of users, one option is to remove the read permission on your home directory. Then, other users won’t be able to list the content of your home directory, but if they know exactly the name of the file they need, and that file has read permission for others, they will be able to read it. If the name is not trivially guessable, that file is actually hidden but accessible to those who know it exists.

To reach this state, use the chmod command this way:

ceciuser1@cecicluster:~ $chmod o=x ~ ceciuser1@cecicluster:~$ ls -dlL ~
drwxr-x--x ceciuser1 ceciuser1 Aug 12 16:20 /home/ceciuser1

We see that the permissions are now drwxr-x–x rather than drwxr-xr-x, and other users can’t see what’s inside the directory:

ceciuser2@cecicluster:~ $ls -l ~ceciuser1 ls: cannot open directory /home/ceciuser1: Permission denied Nevertheless, if ceciuser2 knows that ceciuser1 has a file named fileA, in his home directory, he can read its contents. ceciuser2@cecicluster:~$ cat ~ceciuser1/fileA
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Using this settings, ceciuser1 can decide with whom he shares a file. Setting the file or directory name to an unguessable character string, and giving that string to ceciuser2, is roughly equivalent to giving ceciuser2 a password to access the file. Note though that anyone who knows the ‘password’ (i.e. the secret file/directory name) will be able to access it.

ceciuser1@cecicluster:~ $ls -l ~ drwxr-xr-x ceciuser1 ceciuser1 Aug 12 16:20 shared_dir_&aqw1AQW drwxr-x--- ceciuser1 ceciuser1 Aug 12 16:20 private_dir -rw-r--r-- ceciuser1 ceciuser1 Aug 12 16:20 fileA -rw-r----- ceciuser1 ceciuser1 Aug 12 16:20 fileB Everyone who knows about shared_dir_&aqw1AQW will be able to access it but it won’t be discoverable by others. Enforcing the restricted access (one to many)¶ The above solution is sufficient in most cases. But if you want to guarantee that only a specific set of users have access to your file even if they know its name, the CÉCI system administrators need to be involved. To share with only a limited restricted list of users in a ‘one to many’ fashion (for instance you are installing software for all people in your research group, or you have all your group’s data in your home directory), and enforce that others cannot access the data, one option is to add each authorized parties to your group. Then, the above reasoning applies to the members of your group provided you replace every occurrence of others with group in the above paragraphs. Users not in your group will not be able to access your data at all (as long as your home directory has no execute permission for others of course.) Assuming the CÉCI system administrators have included ceciuser2 in ceciuser1‘s group: ceciuser2@cecicluster:~$ id
uid=3000014(ceciuser2) gid=3000014(ceciuser2) groups=3000014(ceciuser2),3000003(ceciuser1)

then ceciuser2 has access to any file/directory that is group-readable. Beware, that means most often all of ceciuser1‘s files under the default settings!

Enforcing the restricted access (many to many)¶

To share with a larger group, allow everyone in the group to share as well, and still enforce that others cannot access the data, the most convenient option is to create a UNIX group specifically for that group. Then, the reasoning in the previous paragraph applies provided you first change the group to which the data belong.

Assuming the CÉCI system administrators have created a group ourgroup with ceciuser1 and ceciuser2,

ceciuser1@cecicluster:~ $getent group ourgroup ourgroup:*:4999998:ceciuser1,ceciuser2 then ceciuser1 can share the shared_dir directory with chgrp ceciuser1@cecicluster:~$ chgrp ourgroup shared_dir
ceciuser1@cecicluster:~ $ls -l ~ drwxr-x--- ceciuser1 ourgroup Aug 12 16:20 shared_dir drwxr-x--- ceciuser1 ceciuser1 Aug 12 16:20 private_dir -rw-r--r-- ceciuser1 ceciuser1 Aug 12 16:20 fileA -rw-r----- ceciuser1 ceciuser1 Aug 12 16:20 fileB Note that the permissions of shared_dir allow here read access to shared_dir by a member of the ourgroup group, but no write access, and also no read access to users not in the ourgroup group. Should ceciuser1 want other users in the group to be able to write files in his directory, that can be done easily: ceciuser1@cecicluster:~$ chmod g+w shared_dir
ceciuser1@cecicluster:~ \$ ls -l ~
drwxrwx--- ceciuser1 ourgroup Aug 12 16:20 shared_dir
drwxr-x--- ceciuser1 ceciuser1      Aug 12 16:20 private_dir
-rw-r--r-- ceciuser1 ceciuser1      Aug 12 16:20 fileA
-rw-r----- ceciuser1 ceciuser1      Aug 12 16:20 fileB

The above chmod command reads, in plain English, Add (+) write permission to members of the group owning shared_dir

Concluding remarks¶

• UNIX groups corresponding to TIER1 project are also created on the CÉCI clusters and can be used there.
• on the clusters, the umask – the configuration setting that dictates the permissions set to newly created files – is set to 0002 or 0022, meaning that by default, your files are created with permission 664 or 644 respectively.


text:
speed {depmix} R Documentation

## Speed Accuracy Switching Data

### Description

This data set is a bivariate series of reaction times and accuracy scores of a single subject switching between slow and accurate responding and fast guessing on a lexical decision task. The slow and accurate responding, and the fast guessing can be modelled using two states, with a switching regime between them. The dataset further contains a third variable called Pacc, representing the relative pay-off for accurate responding, which is on a scale of zero to one. The value of Pacc was varied during the experiment to induce the switching. This data set is a subset of data from experiment 2 in Van der Maas et al, 2005.

### Usage

data(speed)

### Format

An object of class markovdata.

### Source

Han L. J. Van der Maas, Conor V. Dolan and Peter C. M. Molenaar (2005), Phase Transitions in the Trade-Off between Speed and Accuracy in Choice Reaction Time Tasks. Manuscript in revision.

[Package depmix version 0.9.16 Index]


text:
# Question on motion of a boat 2

1. Jul 8, 2009

### leena19

1. The problem statement, all variables and given/known data

An empty boat floats in water with 10% of its volume submerged,and when it's loaded with 1200kg,the volume submerged will increase to 70% of the total volume.

(1) Calculate the mass of the empty boat
(2) If a leak develops and water starts to enter the boat which is loaded with 1200kg at a constant (average)rate of 100kg per minute,for how long the boat can float before sinking?
(3) what is the minimum force required to lift the sunken boat(without the load )upto the surface of water.Average density of the material of the boat is 2500kgm-3 and the density of water is 1000 kgm^-3
4) The mended boat with another load of 1200kg on board ,while sailing suddenly enters a region where water is uniformly mixed with air bubbles,.If the average vol. of an airbubble is1mm3 & the air bubble concentration is 3.5 *108 m-3,find the effective density of water.Neglect the mass of air.Hence show that the boat will sink.State any assuptions you make
5) Use the effects described in (4) to explainthe danger in the foll. act
'there's a deep pool at the foot of a tall waterfall,.A person starts to swim closer to the foot of the fall'

2. Relevant equations

3. The attempt at a solution

1) U = V$$\rho$$g
mg = 1/10 V$$\rho$$g --------------1
1200g=6/10 V$$\rho$$g--------------2

1/2,
m=mass of boat=200kg ?

2) V= 1200/0.6*10-3
= 2m3

3/10 V$$\rho$$g = m'g
m'=600kg, the amount of water needed to sink the boat

therefore,timetaken= 6 minutes ?

3)min.force required to lift the sunken boat,
R = mg - V$$\rho$$g
=Vg(d-$$\rho$$)
=2*10(2500-1000)
=30,000N, i really hope i got this right ?

4) I'm not sure how I'm supposed to find the effective density,
tot. volume of air bubbles = 3.5*108*10-9
= 0.35 m3

effective density??? what does it mean really?

The density of boat should be more than density of water to sink

For the assumption part,does it have to do with the surface tension of water being reduced???
or neglecting the increase in density of water as the depth increases???

I hope someone can help
.
Thank you

2. Jul 8, 2009

### dotman

I only have a minute, and I haven't looked at your previous steps at all. But I wanted to say that by effective density, they mean the density of the water/air mixture taken together as a single unit. Whatever the initial density of the water is, when you have so many air bubbles (0.35m3 you calculate, I didn't check), these air bubbles are going to replace the same volume of water.

Since your neglecting the mass of the air, this means effectively you will have in, say, where you originally had 1m3 of water with some density, you will now have only 0.65 percent of that water mass contributing to the density in the same 1m3 volume. So the density will drop, and you can calculate that.

As for assumptions, well, if you want to use numbers, you need to know the temperature of the water; the density varies slightly based on temperature. Whether or not the water is fresh water or saltwater will also affect the density; I don't get the impression they're asking about this, except for the fact that when I think of a boat in the water, I think of the ocean, not a lake. But I live near an ocean.

Hope this helps, good luck!

3. Jul 8, 2009

### LowlyPion

2 is the Volume of the material of the boat? If the average density is 2500 kg/m3 and its mass is 200 kg ... it's volume is ...?

4. Jul 8, 2009

### leena19

Thank you,dotman
Thank you,LowlyPion

Thank you so much for your help!

2/25 or 0.08m3.
I messed up again :(
then,R would be = 2/25*10*1500= 1200N ?

so now the volume of water(without air bubbles)would be,
1-0.35=0.65m3
which would mean the density of water/air mixture=1000*0.65 = 650kgm-3?

As for the density of the boat,
do I divide the total mass of (1200+200) by 2? or by 0.08?
I have a strong feeling it's by 2,but I'm not very sure,
(dividing by 2 ,gives me the density of the boat as 700kgm-3,so since the density of the boat is more than that of water,the boat sinks?)

I like this assumption too,which would be to neglect the change in density of water and the boat due to changes in temperature?

If the density of the water mixture is less than the density of the person,
the guy would drown


text:
Check GMAT Club Decision Tracker for the Latest School Decision Releases https://gmatclub.com/AppTrack

 It is currently 30 May 2017, 04:14

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# Barron's Gmat: How to Prepare for the Graduate for the Gradu

Author Message
Founder
Joined: 04 Dec 2002
Posts: 14970
Location: United States (WA)
GMAT 1: 750 Q49 V42
GPA: 3.5
Followers: 3964

Kudos [?]: 25225 [1] , given: 4767

### Show Tags

04 Jun 2004, 01:57
1
KUDOS
Expert's post

	   	:: reviews home » Black List

Barron's Gmat: How to Prepare for the Graduate for the Graduate Management Admission Text (Barron's How to Prepare for the Graduate Management Admission Test (Gmat)(bOok and Cd-Rom), 11th Ed)
Eugene D. Jaffe; Stephen Hilbert;
Price: $29.95; Used:$7.98

Not a winner and won't make you one either - has many practice questions, but plagued by mistakes, lacking explanations, and shortage of strategies

_________________

Founder of GMAT Club

US News Rankings progression - last 10 years in a snapshot - New!
Just starting out with GMAT? Start here...
Need GMAT Book Recommendations? Best GMAT Books

Co-author of the GMAT Club tests

GMAT Club Legend
Joined: 15 Dec 2003
Posts: 4288
Followers: 44

Kudos [?]: 469 [0], given: 0

### Show Tags

03 Jul 2004, 00:37
Agree with BB on this one. It is awful.
_________________

Best Regards,

Paul

Intern
Joined: 07 Dec 2005
Posts: 3
Followers: 0

Kudos [?]: 1 [1] , given: 0

### Show Tags

08 Dec 2005, 21:33
1
KUDOS
Unfortunately, not much progress has been made in the 12th edition.

Lack of explanations, and still plagued with errors. I find it very frustrating when you're questioning the source that's supposed to be giving you the right answers.
Senior Manager
Joined: 02 Sep 2006
Posts: 254
Followers: 1

Kudos [?]: 65 [0], given: 0

### Show Tags

23 Sep 2006, 21:21
I am using the 13th edition...the book has it's pros and cons. I like how the content of the book is structured. It has more questions than theory, which is what I like. I can look up test strategies and theories on the forum so it's not a problem for me.

But the cons is that it doesn't have essay samples and lack of probablity theories. I ended up looking for it on gmat club. The reason I bought this book was that I used the Barrons TOEFL bk and I liked it. So I decide to buy the GMAT book.
23 Sep 2006, 21:21
Similar topics Replies Last post
Similar
Topics:
GMAT Preparation and time to apply to Graduate school? 1 16 May 2014, 21:38
How to start GMAT preparation 2 08 Aug 2012, 02:41
Barrons Gmat CD-Exams 4 30 Sep 2010, 09:04
How to Start Gmat preparation 3 23 Apr 2009, 23:36
How to prepare for GMAT?? 2 24 Oct 2007, 22:59
Display posts from previous: Sort by

# Barron's Gmat: How to Prepare for the Graduate for the Gradu

Moderator: HiLine

 Powered by phpBB © phpBB Group and phpBB SEO Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.


text:
## The Rankin-Selberg method for automorphic distributions.(English)Zbl 1302.11033

Kobayashi, Toshiyuki (ed.) et al., Representation theory and automorphic forms. Based on the symposium, Seoul, Korea, February 14–17, 2005. Basel: Birkhäuser (ISBN 978-0-8176-4505-2/hbk). Progress in Mathematics 255, 111-150 (2008).
Summary: This paper describes our method of pairing automorphic distributions.We present a third technique for obtaining the analytic properties of automorphic $$L$$-functions, in addition to the existing methods of integral representations (Rankin-Selberg) and Fourier coefficients of Eisenstein series (Langlands-Shahidi). We recently used this technique to establish new cases of the full analytic continuation of the exterior square $$L$$-functions. The paper here gives an exposition of our method in two special, yet representative cases: the Rankin-Selberg tensor product $$L$$-functions for $$\mathrm{PGL}\setminus \mathrm{PGL}(2,\mathbb R)$$, as well as for the exterior square $$L$$-functions for $$\mathrm{GL}(4,\mathbb Z)\setminus \mathrm{GL}(4,\mathbb R)$$.
For the entire collection see [Zbl 1124.11004].

### MSC:

 11F70 Representation-theoretic methods; automorphic representations over local and global fields 11F66 Langlands $$L$$-functions; one variable Dirichlet series and functional equations 22E30 Analysis on real and complex Lie groups
Full Text:


text:
## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Re: New fix-cm contains a fix for floats

From:

Mailing list for the LaTeX3 project <[log in to unmask]>

Date:

Sun, 1 Jun 2014 22:06:33 +0200

Content-Type:

text/plain

Parts/Attachments:

 text/plain (28 lines)
 Ulrike Fischer wrote: > Am Sun, 1 Jun 2014 21:48:10 +0200 schrieb Arno Trautmann: >>> Imho fixltx2e should be loaded like fix-cm before documentclass to >>> avoid such problems. > >> How would you then treat packages that require fixltx2e and are loaded >> at a later point? (As in your code example?) > > Where is the problem? If fixltx2e has already been loaded then it > won't be loaded again. Yes, an experienced user will always find a way to get the code working. I'm thinking about the normal user who cannot understand why his table won't compile when he loads fontspec … > Try it out: > > \RequirePackage{fixltx2e} > \documentclass{article} > \usepackage{float} > \usepackage{fontspec} > \begin{document} > \begin{figure}[H] > blub > \end{figure} > \end{document} > >


text:
# Weighing with electronic bathroom scales?

### Help Support Homebuilt Aircraft & Kit Plane Forum:

#### karmarepair

##### Well-Known Member
Supporting Member
I will soon weigh my Sonex and I'm wondering if anybody has used the currently common electronic bathroom scales that have you tap the scale, so it zeros itself, then it tells you how fat you've gotten, then it shuts off. I THINK I can use them by lifting the wing, touching it back down, waiting till it zeroes, putting the wheel back down, reading it. Repeat on the other side.

Has anyone done this?

I do have ONE mechanical bathroom scale, but my EAA chapters scales have disappeared, and the local thrift stores only have the electronic scales, albeit at low, low prices.

My Sonex empty should only be about 650 lbs, so 3 bathroom scales should be enough.

#### Tiger Tim

##### Well-Known Member
I’d want to calibrate the scale first, a jug with a measured amount of water close to the weight you expect would probably be a good idea. That or see if there’s a local A&P who can hire out their scales for a day.

##### Well-Known Member
Supporting Member
You can get analog bathroom scales for about $20 each, and 50 lb kettlebells or weight plates for about for$30 if you have a local source (shipping sucks); I would definitely calibrate around your measured value and not assume the scale is within 10%, but it should be pretty close if you can bracket it within 50 lbs (even 10% nonlinearity in a 50 lb window isn't that bad).

#### D Hillberg

##### Well-Known Member
Most bathroom scales don't go high enough.... Usually 350 odd lbs

Am I shopping at the wrong thrift store?

#### karmarepair

##### Well-Known Member
Supporting Member
Most bathroom scales don't go high enough.... Usually 350 odd lbs

Am I shopping at the wrong thrift store?
Sonex empty weight should be less than 700 lbs. Nose wheel might have 50#.
At the one Goodwill that had any scales, I saw 4 electronic scales, \$5 each.
I got a DM from somebody who TRIED electronic bathroom scales and declared it a new low in not fun. So I'll keep looking. I haven't hit every thrift store in the county, yet.
No A&P on the field I'm at, so that's out.

#### Marc Zeitlin

##### Exalted Grand Poobah
Has anyone done this?
Sure.

But that's not the right question. The right question is "is it acceptable to perform a safety critical aerodynamic procedure on my airplane, in which an error could kill me, with one or more uncalibrated devices that are not made for the purpose and have no known accuracy".

When you ask the right question, you can get the appropriate answer, which is "use calibrated aircraft or car scales".

#### Stolch

##### Well-Known Member
My first flight was going to be from my property where I built the aircraft and I had no access to aircraft scales either and I was not about to partially disassemble the aircraft and transport it to an airport just to weigh it. So after a thorough search of the builders forums and NTSB database for my kit plane, I could not find a single issue, incident, or accident where the probable cause finding was the aircraft configuration as-built exceeded the kit manufacturer’s CG limits. If building something rare or never built before, or deviating significantly from the plans, I’d use aircraft scales. However, after completing my little Zenith 701 from factory kit number 1,001 without deviation, with a Rotax 912 hanging on the nose, so a configuration well documented with hundreds flying, I used three new 350 pound mechanical bathroom scales. I calibrated them to my weight, which has not deviated but by a pound or two over the last 20 years, is reasonably close to what I estimated the mains should weigh, and recently confirmed at the doctors office during my annual physical. For good measure I asked my wife to step on each one and verify if they were acccurate to her weight, and trust me, my wife knows exactly what she weighs. They all passed that check as well. Weighed the airplane three times, moving and leveling each scale each time so all three were used at each wheel once, then averaged the numbers, which did not vary but by a pound or two each weighment.

Last edited:

#### thompsonbb

##### Member
I used a set of automotive wheel jacks and a livestock scales kit (basically, just the load cells and a readout unit) to build my own set of aircraft scales. I did end up having to modify them a bit to account for the much smaller tire diameter common on aircraft, but they work pretty well. I made 3 of them, so I can just roll up to the airplane and get a weight in under 10 minutes.

#### Attachments

• IMG_4923.jpg
1.2 MB · Views: 1

#### crackle

##### New Member
I will soon weigh my Sonex and I'm wondering if anybody has used the currently common electronic bathroom scales that have you tap the scale, so it zeros itself, then it tells you how fat you've gotten, then it shuts off. I THINK I can use them by lifting the wing, touching it back down, waiting till it zeroes, putting the wheel back down, reading it. Repeat on the other side.

Has anyone done this?

I do have ONE mechanical bathroom scale, but my EAA chapters scales have disappeared, and the local thrift stores only have the electronic scales, albeit at low, low prices.

My Sonex empty should only be about 650 lbs, so 3 bathroom scales should be enough.
For the purposes of monitoring changes, I bought a trio of digital bathroom scales on eBay that were enough to take the weight of my Champ and check calibrated them with water tanks. I jacked up the wheels and inserted the scales. I got very excited when the total weight was nice and low. However, when it was professionally weighed a little later the difference as about 100lbs. I'm told the error is caused by the lateral forces of the expanding undercarriage. So next time I will try making ramps to wheel the Champ onto the scales.

#### Toobuilder

##### Well-Known Member
Supporting Member
One can also place the wheel on a beam of known length between two points of contact, one point being the earth and one point being the scale, then calculate from there. If the beam is 2 feet long and the 500 pound wheel load is located at the 1 foot mark, the scale will see 250 pounds.

The trouble with this is that you have to calculate tare, the setup is a *****, and bathroom scales are horribly inaccurate.

#### BJC

##### Well-Known Member
Supporting Member
Bought a digital bathroom scale with great reviews on the www. Repeatability was about +/- 15 pounds out of 225. Returned it. Got a different brand. Repeatability is about +/- 0.05 pounds. It matches the balance scales and the digital scales at doctors’ offices.

BJC

#### Marc Zeitlin

##### Exalted Grand Poobah
My first flight was going to be from my property where I built the aircraft and I had no access to aircraft scales either and I was not about to partially disassemble the aircraft and transport it to an airport just to weigh it. So after a thorough search of the builders forums and NTSB database for my kit plane, I could not find a single issue, incident, or accident where the probable cause finding was the aircraft configuration as-built exceeded the kit manufacturer’s CG limits...
So the fact that something is inconvenient (scales can be rented or borrowed, and they're easily moved) is not a reason not to do the right thing.

And I know (off the top of my head - might be able to come up with more with a bit of thought) of at least two fatal accidents and one non-fatal of very common aircraft that were caused by CG being out of range. Maybe for a Zenith, it's never happened. And maybe for a Sonex, it's never happened. But every plane is different - folks make modifications, changes, and do things that can cause weight/CG issues. I would not trust any W&B performed on bathroom scales.

#### FinnFlyer

##### Well-Known Member
Bought two 400 pound low profile glass bathroom scales. less than 1.5 pound difference between them. Yes I used them (ganged them up and weighed one wheel at a time).
A real pain to use. Roll plane off them, lift and set down and roll plane back on and hurry to read before turned off.
Repeated multiple time and confident within a few pounds.
Weighing an RV-4 the tail weight is much much more critical.

Finn

#### Attachments

• W&B1.jpg
65.7 KB · Views: 0
• W&B2.jpg
67.4 KB · Views: 0

#### karmarepair

##### Well-Known Member
Supporting Member
Thank you Marc for pointing out the risks.

I'm looking into having a "circuit riding" A&P weigh the plane.

And I've been pleasantly surprised at the price of the 400 kg postal scales on Amazon/Ebay. It looks like 3 scales, suitable for commerce, and of the proper capacity for my plane can be had for less than 2 Benjamins.

And the "Group Mind" has confirmed that using the digital bathroom scales is do-able, but not desirable.

#### Stolch

##### Well-Known Member
Marc,
No problem, trust is important. If you don’t want to ride in my bathroom scale airplane, it won’t offend me. With regard to your memory citing aircraft accidents caused by an out of CG condition (these were first flight, post build EAB kit planes right? That would be in the context of my post. Anything else would be disingenuous), show me the data. I just couldn’t find anything and I‘m partial to weighing risks (pun intended) based on data. Can you post a link to the NTSB report or Kathryn’s Report or Aviation Safety Network or a Builders Forum? I just want to do the right thing.

#### rv7charlie

##### Well-Known Member
Supporting Member
The “designer” / builder / pilot rejected constructive input on several occasions.
I suspect that this data point is far more important than the issue of uncertified scales.
I suspect that it would be a safe bet that over the last 70 years or so, more homebuilts have been weighed on non-cert scales than cert scales. IMO, the bigger issue is whether you do your due diligence. As others have said, calibration checks matter, and understanding *how* to weigh an a/c is critical too (reference the errors due to sideload mentioned above). Then there's the issue of leveling the plane; it wouldn't surprise me if planes have been weighed tail-down or otherwise unlevel, in which case the most accurate scales in the world couldn't help.

#### ClaudeR

##### Well-Known Member
Supporting Member
I bought a shipping scale off of Amazon and then was able to take it to my local county weights and measures office where the gentleman whom tests the accuracy of business scales was nice enough to check the calibration of my scale with different weights. We found that the error was between 1 to 2/3 percent at different weights from 25 pounds to 300 pounds (330 pound capacity scale). I made up a chart showing scale weight reading and the actual weight that I use when doing a W&B on my Hornet airplane.

My main points are that I chose to have the scale tested and validated rather than just assume it was okay, and it may be possible to have an expert test and validate your scale too.

But, each to his own.

#### BJC

##### Well-Known Member
Supporting Member
I suspect that this data point is far more important than the issue of uncertified scales.
Agree. The question
With regard to your memory citing aircraft accidents caused by an out of CG condition (these were first flight, post build EAB kit planes right?
seemed to be about out-of-CG crashes.

BJC

#### rv7charlie

##### Well-Known Member
Supporting Member
I understood that, but my point was that with less arrogance and more conscientious attention to detail, the out of of cg issue would have been detected before flight. Scales didn't cause the crash; mental and attitude inadequacies did.


text:
# Bug triaging and issue curation¶

The issue tracker is important to the communication in the project: it helps developers identify major projects to work on, as well as to discuss priorities. For this reason, it is important to curate it, adding labels to issues and closing issues that are not necessary.

## Working on issues to improve them¶

Improving issues increases their chances of being successfully resolved. Guidelines on submitting good issues can be found here. A third party can give useful feedback or even add comments on the issue. The following actions are typically useful:

• documenting issues that are missing elements to reproduce the problem such as code samples

• suggesting better use of code formatting

• suggesting to reformulate the title and description to make them more explicit about the problem to be solved

• linking to related issues or discussions while briefly describing how they are related, for instance “See also #xyz for a similar attempt at this” or “See also #xyz where the same thing happened in SomeEstimator” provides context and helps the discussion.

## Working on PRs to help review¶

Reviewing code is also encouraged. Contributors and users are welcome to participate to the review process following our review guidelines.

## Triaging operations for members of the core and contributor experience teams¶

In addition to the above, members of the core team and the contributor experience team can do the following important tasks:

• Update labels for issues and PRs: see the list of the available github labels.

• Determine if a PR must be relabeled as stalled or needs help (this is typically very important in the context of sprints, where the risk is to create many unfinished PRs)

• If a stalled PR is taken over by a newer PR, then label the stalled PR as “Superseded”, leave a comment on the stalled PR linking to the new PR, and likely close the stalled PR.

• Triage issues:

• close usage questions and politely point the reporter to use Stack Overflow instead.

• close duplicate issues, after checking that they are indeed duplicate. Ideally, the original submitter moves the discussion to the older, duplicate issue

• close issues that cannot be replicated, after leaving time (at least a week) to add extra information

Saved replies are useful to gain time and yet be welcoming and polite when triaging.

See the github description for roles in the organization.

## A typical workflow for triaging issues¶

The following workflow [1] is a good way to approach issue triaging:

1. Thank the reporter for opening an issue

The issue tracker is many people’s first interaction with the scikit-learn project itself, beyond just using the library. As such, we want it to be a welcoming, pleasant experience.

2. Is this a usage question? If so close it with a polite message (here is an example).

3. Is the necessary information provided?

If crucial information (like the version of scikit-learn used), is missing feel free to ask for that and label the issue with “Needs info”.

4. Is this a duplicate issue?

We have many open issues. If a new issue seems to be a duplicate, point to the original issue. If it is a clear duplicate, or consensus is that it is redundant, close it. Make sure to still thank the reporter, and encourage them to chime in on the original issue, and perhaps try to fix it.

If the new issue provides relevant information, such as a better or slightly different example, add it to the original issue as a comment or an edit to the original post.

5. Make sure that the title accurately reflects the issue. If you have the necessary permissions edit it yourself if it’s not clear.

6. Is the issue minimal and reproducible?

For bug reports, we ask that the reporter provide a minimal reproducible example. See this useful post by Matthew Rocklin for a good explanation. If the example is not reproducible, or if it’s clearly not minimal, feel free to ask the reporter if they can provide and example or simplify the provided one. Do acknowledge that writing minimal reproducible examples is hard work. If the reporter is struggling, you can try to write one yourself.

If a reproducible example is provided, but you see a simplification, add your simpler reproducible example.

7. Add the relevant labels, such as “Documentation” when the issue is about documentation, “Bug” if it is clearly a bug, “Enhancement” if it is an enhancement request, …

If the issue is clearly defined and the fix seems relatively straightforward, label the issue as “Good first issue”.

An additional useful step can be to tag the corresponding module e.g. sklearn.linear_models when relevant.

8. Remove the “Needs Triage” label from the issue if the label exists.


text:
# Laplace transform

1. Mar 27, 2009

### marmot

1. The problem statement, all variables and given/known data
(1 pt) Given that

L(cos(5t)/(pi*t)^.5)=exp(-5/s)/sqrt(s)

find the Laplace transform of .

sqrt(t/pi)cos(5t)

2. Relevant equations
I honestly have no idea. There is the integral of f(t)exp(-st) though

3. The attempt at a solution

Ive tried many reasonings. One, I thought that maybe finding the laplace trans of sqrt(t/pi) and replace 1/sqrt(s) with that because I know 1/sqrt(s) is the transform pof 1/sqrt(pi*t). However this is wrong. Can someone give me any pointers? this is the only problem i cant solve in my set!!

2. Mar 27, 2009

### djeitnstine

Try using the convolution theorem


text:
# 11a.6. Abstract vectors: comparing non-parallel vectors

We first make a brief digression to look at equations from three other topics: \begin{align} x^3 + bx^2 + 3x - 2 &\equiv ax^3 + 4x^2 + 3x + c \tag{1} \\ 1 + b \sqrt{2} &= a + 4 \sqrt{2} \tag{2} \\ a + 4i &= 1 + bi \tag{3} \end{align}

For equation (1), when we work with identical polynomials, we can compare coefficients. This gives us $a=1, b=4$ and $c=-2$.
For equation (2), when working with surds, we can compare as well, provided $a$ and $b$ are integers/rational numbers.
Meanwhile, for equation (3), when working with complex numbers, we can compare the real and imaginary parts if $a$ and $b$ are real numbers.

Do discuss with me/your teacher if you are interested in why such comparisons work for each of the cases. As it turns out, a justification of all 3 cases can be explained at higher levels in (abstract) algebra in the study of rings and fields.

Now back to vectors. It turns out we can do a similar comparison procedure for two vectors $\mathbf{a}$ and $\mathbf{b}$, provided that $\mathbf{a}$ and $\mathbf{b}$ are non-parallel. This is illustrated in the example below, and is a very useful tool in solving questions when vectors are defined abstractly and not given in column vector form (or $\mathbf{ijk}$ notation).

### Solution to example:

Since $O,X$ and $Y$ are collinear, $\overrightarrow{OX} = k\overrightarrow{OY}$.
$\lambda \mathbf{a} + \frac{1-\lambda}{2} \mathbf{b} = \frac{k}{2} \mathbf{a} + \frac{k}{2} \mathbf{b}$.
Comparing, since $\mathbf{a}$ and $\mathbf{b}$ are non-parallel, $\lambda = \frac{k}{2}$ and $\frac{1-\lambda}{2} = \frac{k}{2}$.
Solving the two equations simultaneously gives


text:
Springe direkt zu Inhalt

# Cremona groups and their subgroups.

27.10.2011 | 17:00 c.t.

Abstract:   The Cremona group of degree $n$ is the group of rational substitutions of  $n$ variables. More precisely, it is the group  $Cr_F(n) = Aut_FF(x_1, ..., x_n)$  of automorphisms of the field of rational functions  $F(x_1, ..., x_n)$  in  $n$  variables with coefficients in a field  $F$  which are identical on constant functions. In the case  $n = 1$,  the group  $Cr_F(1)$  consists of fractional-linear transformations  $x\mapsto {ax+b \over cx+d}$  with  $ad-bc\ne 0$.  It is isomorphic to the group  $PGL(2,F)$   of  $F$-rational points of the algebraic group  $PGL_F(2)$.  In the case  $n > 1$,  the group is very big, it is not isomorphic to any algebraic group and contains the group  $PGL_F(n+1,F)$  as its proper subgroup. In geometric language, the Cremona group  $Cr_F(n)$  is equal to the group of birational automorphisms of the projective space  $P_F^n$  or of any algebraic variety birationally isomorphic to the projective space. The  Cremona groups were studied  for over 150 years, however the main problems are still unsolved. In my talk I will review some old and new results on this subject with emphasis on the classification of algebraic subgroups of  $Cr_F(n)$.

Tee/Kaffee/Gebäck
ab  16:45 Uhr,
Arnimallee 3,  Raum 006

-------------------------------

Koordinator:  Prof. Dr. Alexander Schmitt

-------------------------------

### Zeit & Ort

27.10.2011 | 17:00 c.t.

Institut für Mathematik<br> Arnimallee 3, Hörsaal 001


text:
At the time of our first post on linear types, we were fresh out of the design phase to extend GHC with linear types. We had a prototype implementation, but it was just a proof of concept: there was precious little you could do with it.

A few months down the line, we are now in a very different place. We have pushed out a new paper, rewritten top to bottom. This one is chock-full of example applications of linear types. Today and in my next post in this series on linear types, I'd like to touch on two nifty uses of linear types from the paper.

But before I get started - I want to point out some recent progress on the linear-types branch in GHC. This branch is now a usable playground to experiment with linear types. Most of the basic features are there, but do expect some very rough edges and keep in mind that error messages still need to be improved. We provide a ready-made Docker image, so you don't have to compile GHC yourself just to play with linear types. It's all in the README: check it out!

# I/O states, in your types

Say you want to communicate across a network. You use the socket library. You open the documentation and find that to use a TCP socket, on a server, you first need to bind the socket to an address. At this point the socket isn't doing anything: you need to listen for incoming traffic. Now the socket receives messages from the network, specifically connection requests, which you must accept. An accept call returns a new socket which can receive a TCP stream.

That's a bit of a headache! And you've got no safety net: the (simplified) type of bind is:

bind ::  Socket -> SocketAddress -> IO ()

The type of listen is:

listen :: Socket -> IO ()

These types are really not that helpful. In Haskell, we like our types to tell us what we can do with a value. But when I have a Socket, I can maybe bind it or listen to it, but certainly not both.

What we really need is that the type of a socket be indexed by the kind of things we can do with it. Something along the lines of:

data State = Unbound | Bound | Listening | …
data Socket (s :: State)

bind :: Socket Unbound -> IO ()
listen :: Socket Bound -> IO ()
…

Good! Now, what is the type of s in bind s? It must be Socket Unbound so that I can apply bind. Wait! When the bind call returns, s must not be Unbound anymore. It must be Bound. So… the type of s seems to change over time. This is the idea of typestates.

To implement a typestate for socket, maybe I could simply return a socket with its type changed like so:

bind :: Socket Unbound -> IO (Socket Bound)

do { s' <- bind s; … }

I can then use s' as evidence that the socket has been bound. But I also have the old s still hanging about. And s claims to be unbound: we can go back in time. One has to be careful not to use s ever again to avoid ill effects: types have failed us once again.

What we need is the ability to consume the old s, to make it inaccessible. Which, coincidentally, is exactly what linear types enable. We just need to make IO a little bit more general, so that it can return both linear and non-linear values:

data IOL p a

-- An old friend, redefined.
type IO = IOL ω

-- a ->_1 b = a ⊸ b and a ->_ω b = a -> b
return :: a ->_p IOL p a
(>>=) :: IO p a ⊸ (a ->_p IO q b) ⊸ IO q b

and we can now have sockets with typestates:

socket :: IOL 1 (Socket Unbound)
bind   :: Socket Unbound ⊸ SocketAddress -> IOL 1 (Socket Bound)
listen :: Socket Bound ⊸ IOL 1 (Socket Listening)
…

What we've done here is precisely and safely captured the state of the socket at the type-level. The type tells you exactly what to do next with a socket. And GHC won't let you reuse old states by accident. This is a prototypical example, demonstrating how linear types help us to be more precise about the use of resources, so that the type checker assists us in avoiding faulty resource use.

In the next post in the series, we'll take a look at how linear types can pave the way towards safe zero-copy packed data exchange across clusters.


text:
# Page:Popular Science Monthly Volume 17.djvu/859

would therefore be 671·4${\displaystyle -}$491·4671·4, 27 per cent, nearly.
Heat-engines are often spoken of as very inefficient machines, because they transform into mechanical effect but a small proportion of the heat used. The inefficiency is not so much the fault of the machine as of the conditions under which it is worked. Consider the case of a condensing engine with a boiler pressure of 45 pounds and a vacuum of 25 inches of mercury. The temperature of the source is here about 294° and of the refrigerator 140° Fahr. The possible efficiency under these conditions is about 20 per cent., that is, a perfect engine working between those temperatures could give in mechanical effect no more than one fifth the energy of the heat. The best steam-engines would, under these circumstances, give one-horse power for something less than two pounds of coal per hour. This is an efficiency of 10 or 12 per cent., or more than half the possible efficiency. The engine, as a machine, is not so very imperfect. In speaking of the engine, I of course include the boiler as a part of the machine. Any great improvement must come from an increased range of temperature between the source and refrigerator. The temperature of the refrigerator can not well be lower than the general temperature of surrounding objects, and there are great practical difficulties in the way of a very high temperature of the source. Suppose an engine could be worked with a source at a temperature of 1250° of the absolute scale, or nearly 800° Fahr., and a refrigerator at 500° of the absolute scale, or nearly 40° Fahr., the possible efficiency would be 1${\displaystyle -}$5001250, or only 60 per cent. It appears, then, that there is not much hope that any large percentage of the energy of heat can, by any practical means, be converted into mechanical effect. But are we, for this reason, to continue wasting the energy of fuel as it is wasted now? Is there no other way in which the energy of chemical separation of carbon from oxygen can be converted into mechanical effect except by first converting it into heat? Why may not the union of carbon with oxygen be made to generate electric currents instead of heat? Electric energies have been made that convert into mechanical effect 60 to 70 per cent, of the energy of the electric current, and a much higher efficiency might, no doubt, be obtained. Already something has been done toward the generation of electric currents by the union of carbon and oxygen; but, so far, no means has been discovered by which such a union can be effected, except at a high temperature, and this involves a great waste of energy in the form of heat. A discovery that would enable us to convert the energy of fuel into electric currents directly and completely would revolutionize, not only the methods of obtaining power, but the methods of obtaining light and distributing heat as well. I have shown elsewhere that, if a Brayton oil-engine is used to


text:
# Neighbourhood system

In topology and related areas of mathematics, the neighbourhood system, complete system of neighbourhoods,[1] or neighbourhood filter for a point x is the collection of all neighbourhoods for the point x.

## Basis

A neighbourhood basis or local basis for a point x is a filter base of the neighbourhood filter, i.e. a subset

such that

.

That is, for any neighbourhood we can find a neighbourhood in the neighbourhood basis that is contained in .

Conversely, as with any filter base, the local basis allows to get back the corresponding neighbourhood filter as .[2]

## Examples

• Trivially the neighbourhood system for a point is also a neighbourhood basis for the point.
• Given a space X with the indiscrete topology the neighbourhood system for any point x only contains the whole space,
• In a metric space, for any point x, the sequence of open balls around x with radius 1/n form a countable neighbourhood basis . This means every metric space is first-countable.
• In the weak topology on the space of measures on a space E, a neighbourhood base about is given by
where are continuous bounded functions from E to the real numbers.

## Properties

In a semi normed space, that is a vector space with the topology induced by a semi norm, all neighbourhood systems can be constructed by translation of the neighbourhood system for the point 0,

This is because, by assumption, vector addition is separate continuous in the induced topology. Therefore, the topology is determined by its neighbourhood system at the origin. More generally, this remains true whenever the topology is defined by a translation invariant metric or pseudometric.

Every neighbourhood system for a non empty set A is a filter called the neighbourhood filter for A.


text:
# Taming the Font of the Gods

Legend has it that the Font of the Gods could be used for coding, but so far no one has been able to wield its power due to the wildness of its letter spacing:

However, one brave hero took it upon him to take it to the Forge of Fonts and apply the magic formula, so he could use it as a weapon and inflict horror on his enemies…

But beware! As one of the most important philosophers of our time once said: With great power comes great responsibility:

Powered by Hydejack v6.6.1


text:
# PVS-Studio Impressed by the Code Quality of ABBYY NeoML

ABBYY has recently opened the source code of their NeoML framework. Someone suggested that we check this library with PVS-Studio. We liked the idea and got down to work without further delay. This article won't take long to read because the project has proved to be pretty high-quality :).

The source code of NeoML can be downloaded from GitHub. This is a cross-platform framework designed for implementing machine learning models. It is used by ABBYY engineers for computer vision and natural language processing tasks, including image preprocessing, document layout analysis, and so on. It currently supports C++, Java, and Objective-C, with Python support coming soon. The framework itself is mainly written in C++.

## Starting analysis

Starting the analysis on this framework was easy. Once I had the Visual Studio project generated in CMake, I ran PVS-Studio from Visual Studio on the projects in that solution, except for third-party libraries. Besides NeoML itself, the solution also included ABBYY libraries such as NeoOnnx and NeoMathEngine, which I also included in the list of projects to be analyzed.

## Analysis results

Needless to say, I was hoping to find some bad bugs, but… the code turned out to be pretty clean, and I had to settle for just a few warnings. It's very likely that the project was already checked with some static analysis tool during development. Many of the warnings were produced by the same diagnostics on similar code fragments.

For example, calling a virtual method in a constructor is very common in this project, though it's generally an unsafe practice. Such cases are detected by the V1053 diagnostic: Calling the 'foo' virtual function in the constructor/destructor may lead to unexpected result at runtime. I got a total of 10 warnings of this type. To learn more about why this practice is unsafe and what issues it leads to, see the article "Never Call Virtual Functions during Construction or Destruction" by Scott Meyers. But the NeoML developers seem to understand what they are doing, so those warnings can be ignored.

There were also 11 warnings issued by the medium-level diagnostic V803, which deals with micro-optimizations. This diagnostic recommends replacing postfix increments with prefix ones when the iterator's previous value is not used. With a postfix increment, an unnecessary temporary object is created. It's not a bug, of course – just a minor detail. If this diagnostic is irrelevant, you can simply turn it off. Actually, the "micro-optimizations" set is turned off by default.

You must have already guessed that me talking about trifles like iterator increment means the code is fine and I'm just looking for something to pick on.

Certain diagnostics are very often irrelevant or inapplicable to a given project, so we recommend that you spend some time configuring the analyzer before analysis rather than put up with the pain of working with non-optimal settings. If you want to get to the most interesting warnings right off, follow the steps described in our article "How to quickly check out interesting warnings given by the PVS-Studio analyzer for C and C++ code?"

A few interesting warnings related to "micro-optimizations" were produced by diagnostic V802, which recommends rearranging a structure's fields by type size in decreasing order, thus reducing the structure's overall size.

V802 On 64-bit platform, structure size can be reduced from 24 to 16 bytes by rearranging the fields according to their sizes in decreasing order. HierarchicalClustering.h 31

struct CParam {
TDistanceFunc DistanceType;
double MaxClustersDistance;
int MinClustersCount;
};

By simply swapping the MaxClustersDistance field of type double and the enumerator DistanceType field, we can reduce the structure's size from 24 to 16 bytes.

struct CParam {
double MaxClustersDistance;
int MinClustersCount;
TDistanceFunc DistanceType;
};

TDistanceFunc is enum, so its size is the same as that of int or smaller, which means we should move it to the bottom of the structure.

Again, that's not a bug, but if you want to have micro-optimizations just for the sake of it or if they are objectively crucial to your project, warnings like the ones shown above will help you quickly find spots in your code that could use at least some basic refactoring.

Overall, the code of NeoML is neat and clear, but the V807 diagnostic pointed out a couple of lines that could be optimized and made somewhat clearer. Here's one example:

V807 Decreased performance. Consider creating a reference to avoid using the same expression repeatedly. GradientBoostFullTreeBuilder.cpp 469

The chain curLevelStatistics[i]->ThreadStatistics[j] can be replaced with a call to an individual variable. There are no calls to any complex methods in this chain, so this optimization wouldn't give any noticeable boost, but it would still make this fragment clearer and shorter, I believe. Besides, it would indicate to any future maintainers that the original developer meant to address these exact indexes and there's no error here. This is the version with the suggested fix applied:

auto threadStatistics = curLevelStatistics[i]->ThreadStatistics[j];

|| ( .... ))
{
}
}

## Conclusion

As you can see, the code base of the NeoML framework turns out to be very clean.

One thing you should keep in mind is that a single run of a static analyzer on an intensely developing project doesn't say much in favor of adopting static analysis because many of the bugs, especially grave ones, have already been found and fixed using other – more time- and resource-intensive – means. The article "Errors that static code analysis does not find because it is not used" elaborates on this topic.

But even with that fact considered, PVS-Studio issued particularly few warnings on NeoML and I give credit to the developers for the quality of their code, no matter if they used static analysis or not.
PVS-Studio
Static Code Analysis for C, C++, C# and Java


text:
Matrix Identify involving Diagonal Matrix

1. Nov 15, 2008

hotvette

If V is diagonal, it is easy to show:

$(V + V^{-1})^{-1} = V(V^2 + I)^{-1}$

by multiplying both sides by:

$(V + V^{-1})$

But, I'm wondering if there is a way to derive the RHS from the LHS. Since diagonal matrices behave like scalars, I used a scalar analogy:

$(x + 1/x)^{-1} = ((x^2 + 1)/x)^{-1} = x(x^2 + 1)^{-1}$

But I'd like to show it using matrix terminology. If there is something simple, I'm missing it. Any ideas?

2. Nov 15, 2008

morphism

V doesn't even have to be diagonal, only invertible (and we also need V^2+I to be invertible - if we're working with real matrices, this is automatic).

$$(V + V^{-1})^{-1} = ((V^2 + I)V^{-1})^{-1} = V(V^2 + I)^{-1},$$

where in the middle step I'm pulling out the "common factor" $V^{-1}$, and in the last step I'm using the fact that $(AB)^{-1} = B^{-1}A^{-1}$.

Last edited: Nov 15, 2008
3. Nov 15, 2008

hotvette

I knew it had to be simple. Just didn't see it....

Thanks.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?


text:
Five more than 4 times a number is 33. Which of the following would be the correct equation to use to solve this problem?

1 Answer
Jan 11, 2016

the equation is :color(blue)(5 + 4x=33

the number is $= 7$

Explanation:

Let the number be $x$

Five more than $4$ times the number is $33$

The equation can be written as

$5 + \textcolor{b l u e}{4} \times x = 33$

$5 + 4 x = 33$

$4 x = 28$

$x = \frac{28}{4}$

color(blue)(x=7


text:
# Estimate errors during integration of interpolated data

I am interested into calculating the errors associated with an integration over interpolated data. Suppose I have something like this:

inc=Pi/10;
ord=1;
data=Table[N[{x,Sin[x]}],{x,0,Pi,inc}];
Integrate[Interpolation[data,InterpolationOrder->ord][x],{x,0,Pi/2}]

The output is 0.991762, so that is some error associated with the inc size and the interpolation order. Making ord=3, I get 0.999891. Is there a way to calculate such error? I looked up this question, but it's for NIntegrate and I'm more interested on the interpolation effects on the final result.

Edit: The data that I am trying to use comes from an experiment, so there's no analytic expression to go by. I just need to estimate how accurate is the result of Integrate[Interpolation[data,InterpolationOrder->ord][x],{x,a,b}] given the length of data and the interpolation order.

Edit 2: Maybe it could be done by doing a Spline fit, finding the errors for each point and then making a numerical integral propagating those errors?

• If you approximate $f(x)$ by a polynomial $p(x)$, then the error $\int_a^b f(x)\,dx - \int_a^b p(x) \, dx$ is given by $K \, (b-a)^{2+d} f^{(1+d)}(\xi)$, where $K$ is a constant depending on $p$, $\xi$ is between $a$ and $b$, and $d$ is the degree of precision (DOP, sometimes also called the order). The DOP $d$ is at least the interpolatory order ord. For instance, Simpson's Rule has interpolatory order $2$ and DOP $3$. A Gaussian-Legendre rule with interpolatory order $n$ has DOP $2n+1$.... Aug 5 '20 at 13:22
• ...For Interpolation, you're using a different polynomial for each subinterval, so $K$ and $f^{(1+d)}(\xi)$ can vary. The error is just the sum over the subintervals of the errors given above. $K$ really just depends on the interpolation nodes that determine $p(x)$, so it is often the same for regular interpolation schemes. For the trapezoidal rule (your ord = 1), the DOP is $1$ and $K = -1/12$ (on all subintervals). Often the different derivative values $f^{(1+d)}(\xi)$ can be replaced by single one with $\xi$ somewhere in the integration interval.... Aug 5 '20 at 13:29
• ...This can be done for standard integration rules like the trapezoidal rule, for instance. For ord = 1, you have different values of $K$ for the first and last subinterval than for the interior subintervals. This is because Interpolation has different interpolation schemes for the exterior subintervals. Probably the derivative values $f^{(1+d)}(\xi)$ can be replaced by single one, but the lack of a consistent interpolation scheme probably makes the analysis more difficult. I have neither done it nor seen it done. In any case this seems more a mathematics question than a Mathematica Q. Aug 5 '20 at 13:37
• I was careless in my first comment: $p(x)$ should be an interpolatory polynomial, interpolating $f(x)$ at some nodes $x_0,\dots,x_n$. Then $\xi$ in $f^{(1+d)}(\xi)$ will lie in the interval containing the nodes $x_j$ and the end points $a$ and $b$. Aug 5 '20 at 13:44
• I should point out that the data that I am trying to use comes from an experiment, so there's no analytic expression to go by. I just need to estimate how accurate is the result of Integrate[Interpolation[data,InterpolationOrder->ord][x],{x,a,b}] given the length of data and the interpolation order. Aug 5 '20 at 13:56

Here is a method for estimating the error of integration. By sampling at two different rates, one can compare the integrals and estimate the error from the degree of precision of the integral (equals the InterpolationOrder in the cases at hand). If we interpolate $$f(x)$$ by a polynomial $$p(x)$$, then the error $$\int_a^b f(x)\,dx - \int_a^b p(x) \, dx$$ is given by $$K \, (b-a)^{2+d} f^{(1+d)}(\xi) \, ,$$ where $$K$$ is a constant depending on $$p$$, $$\xi$$ is in the interval containing the interpolation nodes, $$a$$ and $$b$$, and $$d$$ is the degree of precision (DOP, sometimes also called the order). The DOP $$d$$ is at least the interpolatory order ord. In the cases at hand, $$d$$ equals ord.

In the case of piecewise polynomial interpolation over uniformly spaced nodes, the error is the sum of such errors above. It will probably have a form like the following (I don't know for a fact in all cases): $$K^* \, (b-a)\,h^{1+d} f^{(1+d)}(\xi) \, ,$$ where $$h$$ is the spacing between the nodes, the same as inc in the OP's code. Here $$K^*$$ will depend on $$h$$ because of the way Interpolation works. A question I didn't bother to investigate is whether there is a $$\xi$$ such that the formula for the error is exactly equal to the error of integration. It may be well known, but I don't know it. In most cases either there is a $$\xi$$ or there is one that gets close enough.

If $$f^{(1+d)}(\xi)$$ does not vary in magnitude too much, then the error for a spacing of $$2h$$ will have an error approximately $$2^{1+d}$$ times the error for a spacing of $$h$$. The difference of the integrals therefore would be $$2^{1+d}-1$$ times the error of the $$h$$ integral.

The condition, "$$f^{(1+d)}(\xi)$$ does not vary in magnitude too much," is important. If the sampling rate is too low ($$h$$ is too big), then as it increases and $$h$$ decreases, the error will bounce around for while. After that, we enter a "convergent phase," in which the error decreases as $$h^{1+d}$$. For the estimate to be accurate we should be in the convergent phase. The bouncing around is explained by the formula in terms of the derivative factor varying greatly in magnitude. Often it can also be explained by offsetting errors or symmetry in the integrals over the subintervals. (This is a well-known feature of the trapezoidal rule on periodic functions.) In the pre-convergent phase, the estimate below may be unreliable.

### Example that works

inc = Pi/10;
ord = 1;
data = Table[N[{x, Sin[x]}], {x, 0, Pi, inc}];
ifn = Interpolation[data, InterpolationOrder -> ord];
ifn2 = Interpolation[data[[;; ;; 2]], InterpolationOrder -> ord];
(Integrate[ifn2[x], {x, 0, Pi/2}] -
Integrate[ifn[x], {x, 0, Pi/2}]) /
(2^(1 + ord) - 1) // ScientificForm
(* for comparison purposes *)
Integrate[Interpolation[ifn[x], {x, 0, Pi/2}] - 1 // ScientificForm

### Pre-convergent-phase example

Change the order, change the interpolation, and you change the convergence behavior. The spacing inc = Pi/10 cannot really be considered small, and perhaps the previous example was lucky. It's not good enough for order 3.

inc = Pi/10;
ord = 3;
ifn = Interpolation[data, InterpolationOrder -> ord];
ifn2 = Interpolation[data[[;; ;; 2]], InterpolationOrder -> ord];
(Integrate[ifn2[x], {x, 0, Pi/2}] -
Integrate[ifn[x], {x, 0, Pi/2}]) /
(2^(1 + ord) - 1) // ScientificForm
(* for comparison purposes *)
Integrate[Interpolation[ifn[x], {x, 0, Pi/2}] - 1 // ScientificForm

The estimate is a couple of orders of magnitude less than the actual error.

It's a very symmetric example. Maybe if we skip one of the interpolation nodes, we won't get the cancellation:

(Integrate[ifn2[x], {x, data[[3, 1]], Pi/2}] -
Integrate[ifn[x], {x, data[[3, 1]], Pi/2}]) /
(2^(1 + ord) - 1) // ScientificForm
(* for comparison purposes *)
Integrate[ifn[x], {x, data[[3, 1]], Pi/2}] -
Integrate[Sin[x], {x, data[[3, 1]], Pi/2}] // ScientificForm

That's a much closer estimate (but it estimates the error of a slightly different integral). I assume one cannot (easily) change the sampling rate of experimental data. So one might drop the first or the last point and compute an error for each, and take the maximum to the overall estimate.

### Dependence on the sampling rate

Just to show the effect of the sampling rate, we'll double it:

inc = Pi/20;
ord = 3;
ifn = Interpolation[data, InterpolationOrder -> ord];
ifn2 = Interpolation[data[[;; ;; 2]], InterpolationOrder -> ord];
(Integrate[ifn2[x], {x, 0, Pi/2}] -
Integrate[ifn[x], {x, 0, Pi/2}]) /
(2^(1 + ord) - 1) // ScientificForm
(* for comparison purposes *)
Integrate[Interpolation[ifn[x], {x, 0, Pi/2}] - 1 // ScientificForm

That estimate is a much closer to the error.

## Other considerations

• The higher the interpolatory order, the less stable. See the Runge phenomenon and Newton-Cotes rules.

• Likewise, higher-order derivatives are harder to estimate from data.

• Probably the most common choices are orders 1 and 3 and Method -> "Spline" (cubic splines).

• Noise in experimental data might be more significant than interpolation or integration error. Integration is generally less sensitive to perturbation than differentiation. But I'm unfamiliar with any theory about the error of numerical integration for perturbed data.

• If the data is noisy anyway, the OP has no business trying out high-order polynomial interpolation or anything derived from it, as it will only make things numerically worse. Aug 5 '20 at 23:51


text:
Shirts pigalle

Andere gebruikers zochten ook naar: Blousejurken pigalle, Pumps pigalle, Zomerjassen pigalle

150 resultatenSorteer op:
L€ 4
L€ 4,50
L€ 0,90
XS€ 5,99
M€ 10
S€ 1,50
S€ 7,99
S€ 5
S€ 6
S€ 5
S€ 9,99
XS€ 7
XS€ 9,99
L€ 6,50
S€ 4,99
XS€ 13
S€ 4,50
S€ 13,49
12345

Gerelateerde zoekopdrachten

(8)(7)(4)(16)(8)(4)(5)(10)(62)(40)(4)(31)(7)(8)(15)(33)(25)(4)(6)(3)(4)


text:
Hardcover | $35.00 Short | £24.95 | ISBN: 9780262016889 | 284 pp. | 6 x 9 in | | March 2012 ebook |$25.00 Short | ISBN: 9780262302425 | 284 pp. | 6 x 9 in | | March 2012

Imposters

A Study of Pronominal Agreement

Overview

Normally, a speaker uses a first person singular pronoun (in English, I, me, mine, myself) to refer to himself or herself. To refer to a single addressee, a speaker uses second person pronouns (you, yours, yourself). But sometimes third person nonpronominal DPs are used to refer to the speaker--for example, this reporter, yours truly--or to the addressee--my lord, the baroness, Madam (Is Madam not feeling well?). Chris Collins and Paul Postal refer to these DPs as imposters because their third person exterior hides a first or second person core.

In this book they study the interactions of imposters with a range of grammatical phenomena, including pronominal agreement, coordinate structures, Principle C phenomena, epithets, fake indexicals, and a property of pronominal agreement they call homogeneity.

Collins and Postal conclude that traditional ideas about pronominal features (person, number, gender), which countenance only agreement with an antecedent or the relation of the pronoun to its referent, are much too simple. They sketch elements of a more sophisticated view and argue for its relevance and explanatory power in several data realms. The fundamental proposal of the book is that a pronoun agrees with what they call a source, where its antecedent constitutes only one type of source. They argue that the study of imposters (and closely related camouflage DPs) has far-reaching consequences that are inconsistent with many current theories of anaphora.