text:
Notebooks

Tubal-Cain

16 Mar 1995 04:50

According to Genesis 4:22, instructor of every artificer in brass and iron.'' The whole chapter is one of those which make you wonder what, exactly, they were thinking there in Canaan when they wrote this...

1. And Adam knew Eve his wife; and she conceived, and bare Cain, and said, I have gotten a man from the LORD.
2. And she again bare his brother Abel. And Abel was a keeper of sheep, but Cain was a tiller of the ground.
3. And in process of time it came to pass, that Cain brought of the fruit of the ground an offering unto the LORD.
4. And Abel, he also brought of the firstlings of his flock and of the fat thereof. And the LORD had respect unto Abel and to his offering:
5. But unto Cain and to his offering he had not respect. And Cain was very wroth, and his countenance fell.
6. And the LORD said unto Cain, Why art thou wroth? and why is thy countenance fallen?
7. If thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him.
8. And Cain talked with Abel his brother: and it came to pass, when they were in the field, that Cain rose up against Abel his brother, and slew him.
9. And the LORD said unto Cain, Where is Abel thy brother? And he said, I know not: Am I my brother's keeper?
10. And he said, What hast thou done? the voice of thy brother's blood crieth unto me from the ground.
11. And now art thou cursed from the earth, which hath opened her mouth to receive thy brother's blood from thy hand;
12. When thou tillest the ground, it shall not henceforth yield unto thee her strength; a fugitive and a vagabond shalt thou be in the earth.
13. And Cain said unto the LORD, My punishment is greater than I can bear.
14. Behold, thou hast driven me out this day from the face of the earth; and from thy face shall I be hid; and I shall be a fugitive and a vagabond in the earth; and it shall come to pass, that every one that findeth me shall slay me.
15. And the LORD said unto him, Therefore whosoever slayeth Cain, vengeance shall be taken on him sevenfold. And the LORD set a mark upon Cain, lest any finding him should kill him.
16. And Cain went out from the presence of the LORD, and dwelt in the land of Nod, on the east of Eden.
17. And Cain knew his wife; and she conceived, and bare Enoch: and he builded a city, and called the name of the city, after the name of his son, Enoch.
18. And unto Enoch was born Irad: and Irad begat Mehujael: and Mehujael begat Methusael: and Methusael begat Lamech.
19. And Lamech took unto him two wives: the name of the one was Adah, and the name of the other Zillah.
20. And Adah bare Jabal: he was the father of such as dwell in tents, and of such as have cattle.
21. And his brother's name was Jubal: he was the father of all such as handle the harp and organ.
22. And Zillah, she also bare Tubalcain, an instructor of every artificer in brass and iron: and the sister of Tubalcain was Naamah.
23. And Lamech said unto his wives, Adah and Zillah, Hear my voice; ye wives of Lamech, hearken unto my speech: for I have slain a man to my wounding, and a young man to my hurt.
24. If Cain shall be avenged sevenfold, truly Lamech seventy and sevenfold.
25. And Adam knew his wife again; and she bare a son, and called his name Seth: For God, said she, hath appointed me another seed instead of Abel, whom Cain slew.
26. And to Seth, to him also there was born a son; and he called his name Enos: then began men to call upon the name of the LORD.
Here we have the Lord not knowing what had happened, until Abel's blood told him; a city built by, apparently, two people, of the second generation; and a real problem with tempers. (Is it not strange that the farmer was made a vagabond, whereupon he builds a city, and becomes the ancestor of such as dwell in tents?)

And while we are on the subject of odd bits of a very odd book, do please consider this, from Chapter 6:

1. And it came to pass, when men began to multiply on the face of the earth, and daughters were born unto them,
2. That the sons of God saw the daughters of men that they were fair; and they took them wives of all which they chose.
3. And the LORD said, My spirit shall not always strive with man, for that he also is flesh: yet his days shall be an hundred and twenty years.
4. There were giants in the earth in those days; and also after that, when the sons of God came in unto the daughters of men, and they bare children to them, the same became mighty men which were of old, men of renown.
I should very much like to know how the Church tip-toed through this mine-field, which, taken literally, implies that God had grandchildren (and ones who wouldn't make a poor showing in the Divine Wallet either), and how it is taken by the fundamentalists today. But there's more: according to the apocryphal book Enoch, the sons of God taught people the use of metals; which would seem to imply that Tubal-cain was a direct descendant of the Almighty, and that God's children had a thing for girls from the wrong side of the tracks.


text:
When molecules adsorb at an interface, the surface tension will change. This means that surface tension can be used as an indicator for the amount of an analyte at the interface. Most solutes will prefer the interface to the bulk, and will as a result decrease the surface tension, in what’s called positive adsorption. Some species, such as sucrose prefer the bulk over the surface and will increase the surface tension, in what’s known as negative adsorption.

If the surface tension of the system is easily measurable (liquid/vapour or liquid/liquid), we can use the Gibb’s adsorption equation to quantify the surface concentration $$\Gamma$$. It’s similar to the excess surface concentration, with an added activity term ($$a_B$$): $$\Gamma_B^{(A)}=-\frac{1}{RT}\frac{d\gamma}{d\ln a_B}$$ By measuring the surface tension at different concentrations of $$B$$, we can determine the degree of adsorption at the interface. The above equation only applies for two component systems (e.g. $$\gamma_{L/V}$$ of the bulk, with a surfactant). Given that activity is being used, we can only use the relationship $$a_B\approx [B]$$ in low concentrations

We can tell if there is negative or positive adsorption, by looking at the sign. If $$\frac{d\gamma}{d\ln a_B}$$ is negative ($$\gamma$$ decreases with respect to $$a_B$$), then the adsorption is positive, and vice versa for negative adsorption.

Example 1 - Calculate the surface excess concentration and area per molecule of n-pentanol in 0.04 M aqueous solution at 25°C. The surface tension varies with concentration as shown in the following table:

Concentration (M) 0.00 0.02 0.04 0.06 0.08 0.10
$$\gamma$$ ($$mN\cdot m^{-1}$$) 72.6 60.0 54.3 49.8 46.0 43.0

We can use the Gibb’s equation and treat $$a_B\approx C_B$$, to use the equation:

$\Gamma_{\ce{ROH}}^{\ce{H2O}}=-\frac{1}{RT}\frac{d\gamma}{d\ln \ce{ROH}}$

If we plot $$\gamma$$ vs $$\ln C$$ we can obtain a line with gradient $$\frac{d\gamma}{d\ln \ce{ROH}}$$

Concentration (M) - -3.91 -3.22 -2.81 -2.53 -2.30
$$\gamma$$ ($$mN\cdot m^{-1}$$) 72.6 60.0 54.3 49.8 46.0 43.0

Plugging this back into the Gibb’s equation, we get:

\begin{align} \Gamma_{\ce{ROH}}^{\ce{H2O}}&=-\frac{1}{RT}\frac{d\gamma}{d\ln \ce{ROH}}\\ &=\frac{-1}{(8.314)(298)}(-10.54\e{-3})\\ &=4.25\e{-6}\:mol\cdot m^{-2} \end{align}

From here we can calculate the area per molecule by inverting $$\Gamma$$:

\begin{align} \Gamma_{\ce{ROH}}^{\ce{H2O}}&=4.25\e{-6}\:mol\cdot m^{-2}\\ \frac{1}{\Gamma_{\ce{ROH}}^{\ce{H2O}}}&=\frac{1}{4.25\e{-6}\:mol\cdot m^{-2}}=2.351\e{5}\:m^2\cdot mol^{-1}\\ A/molecule&=\frac{1}{\Gamma_{\ce{ROH}}^{\ce{H2O}}N_A}\\ &=3.922\e{-19}\:m^2\\ &=39.2\:\AA^2 \end{align}

## Area Per Molecule¶

It’s been found that long chain aliphatic molecules have a similar packing density and area/molecule, with variation only really coming from any methylations and double bonds. that would reduce the packing density. This is also largely in part due to the fact that only the head is within the liquid phase.

## Dissociating Solutes¶

For cases where the solute dissociates, we need to add an extra term to account for this. For a 1:1 dissociation: $$\Gamma_B^{(A)}=-\frac{1}{\color{red}2\color{black}RT}\frac{d\gamma}{d\ln a_B}$$ This value should effectively be the sum of the dissociating components, so a 1:2 dissociation would be $$3$$.

While we expect $$\frac{d\gamma}{d\ln a_B}$$ to be linear, we may not always get this, so we might need to find the gradient at a specific point

Example 2 - The surface tensions of aqueous solutions of sodium dodecyl sulphate (SDS) were obtained at 20°C and plotted (on the next slide) as a function of ln C, where C is the bulk concentration of this strong electrolyte.

(a) Give the Gibbs adsorption equation for this strong electrolyte solution.

SDS dissociates as a 1:1 salt, so the equation would be:

$\Gamma_B^{(A)}=-\frac{1}{2RT}\frac{d\gamma}{d\ln a_B}$

(b) Calculate the area occupied by each adsorbed molecule of SDS when the adsorption rate is at maximum, at 20 °C. $$\frac{d\gamma}{d\ln a_b}=-16.5\e{-3}$$.

\begin{align} \Gamma_{\ce{SDS}}^{\ce{H2O}}&=-\frac{1}{2RT}\frac{d\gamma}{d\ln a_{\ce{SDS}}}\\ &=-\frac{1}{2(8.314)(293)}(-16.5\e{-3})\\ &=3.39\e{-6}\:mol\cdot m^{-2}\\ A/molecule&=\frac{1}{\Gamma_{\ce{ROH}}^{\ce{H2O}}N_A}\\ &=\frac{1}{(3.39\e{-6}\:mol\cdot m^{-2})(6.022\e{23})}\\ &=4.89\e{-19}\:m^2\\ &=48.9\:\AA^2 \end{align}

format: plain


text:
## Pooled Testing

Pooled testing increases the efficiency of virus testing, given that only a limited number of tests is available. The idea is to pool samples taken from several subjects and test the combined sample with a single test. If the test is negative all subjects are negative. If the test is positive all individuals are tested to find the infected ones. The optimal size depends on the fraction of infected in the population and the rates of false positives and false negatives of the tests in use. I derive the formula for the optimal pooling size, the effective number of tested persons per test, and the false negatives for the pooled test and provide python code for the simulations.

## Model

### Assumptions

1. a fraction $\lambda$ of infected people in the population,
2. tests have a false positive rate of $\gamma_+$ and a false negative rate of $\gamma_-$. It is assumed that testing a pooled
3. sample does not change the false positive and false negative rates of the test,
4. Samples are pooled into groups of size $\omega$
5. to control false negatives each pooled test is replicated $r$ times. If the majority of the $r$ replicates are positive, the pooled sample is declared positive,
6. if the pooled test is positive, each individual in the group tested separately.

## Output

Under these assumptions the following will be derived

1. the optimal group size $\omega^{opt}$
2. the effective number of persons that can be tested with one test, $PPT$ (persons per test)
3. an estimate for the upper bound for the fraction of infected individuals that are missed by the pooled
4. testing procedure (applied to the population). We call it the false negative factor for pooled testing and denote it by $FNPT$
5. the false negative rate, $FNR$, of pooled testing, which is the fraction of infected individuals the pooled test will miss.

### Persons Per Test (PPT)

A group is positive if at least one of its members is positive. The probability of a group having at least one positive member

$$$$p = 1 - (1 - \lambda)^{\omega}$$$$

where $(1 - \lambda)^{\omega}$ gives the probability of all $\omega$ members in the group being negative. Here we are assuming that event of any person in the group testing positive/negative is independent of the others in the group.

Probability of false positive test i.e. the test showing positive in spite of no one in the group being positive is given by

$$$$(1 - \lambda)^{\omega} \gamma_+ = (1-p)\gamma_+$$$$

Similarly probability of a false negative test i.e. the test showing negative in spite of at least one person in the group being positive is given by $p \gamma^-$.

False positives do not decrease the chances to capture a true positive but only decrease the efficiency in using the available tests. More importantly, tests will miss positive individuals in $p\gamma_-$ cases on average.

Hence, the probability, $P_+$, that a test shows positive i.e. when the pooled sample is actually positive and the test shows positive (false negative cases are missed in this case) or the pooled sample is negative and the test shows positive is given by

\begin{align} P_+ &= p(1-\gamma_-)+(1-p)\gamma_+ \ &= p(1-\gamma_–\gamma_+)+\gamma_+ \end{align}

To see how replicates effect the false negatives of the pooled test we take $r$ replications and then apply the majority rule. The probability $P_+^*$ that the majority of $r$ replicates identifies the group as positive becomes

$$$$P_+^* = \sum_{i > r/2}^r{r \choose i} P_+^i (1-P_+)^{(r-i)}$$$$

The expected number of tests per group is given by

$$$$r\cdot(1 - P_+^*) + (r +\omega) P_+^* = r + \omega P_+^*$$$$

We would have carried out a total of $r$ tests when the group turns out to be a negative and $r+ \omega$ tests when the group turns out to be a positive after the initial $r$ tests. We carry out additional $\omega$ tests, i.e. one additional test for each person in the group when the group tests positive after the initial $r$ tests.

The expected number of tests per person $Q$ is given by

$$$$Q = \frac{1}{\omega}(r + \omega P_+^*) = \frac{r}{\omega} + P_+^*$$$$

The persons per test is simply, $PPT = 1/Q$.

### False Negative Rate (FNR)

A person who actually has the infection is not caught in the following cases:

1. The majority of the $r$ tests performed on the group the person belongs to are false negatives
2. The group turns out to be positive after $r$ tests but the person tests negative because of an individual false negative test

The probability of missing the infection present in a tested person is given by the \emph{False Negative Rate}

$$$$FNR = \gamma_-^* + (1-\gamma_-^*)\gamma_-$$$$

where $\gamma_-^*$ is given by

$$$$\gamma_-^* = \left(\sum_{i \geq r/2}^r{r \choose i} \gamma_- (1-\gamma_-)^{(r-i)}\right)$$$$

This is the number of individuals one expects to miss in pooled testing on \emph{average} per infected person.

For $r=1$, we have $\gamma_-^*= \gamma_-$ and for small $\gamma_-$, we have $FNR = 2\gamma_- - \gamma_-^2 \sim 2\gamma_-$.

If there are no biases or correlations within or between groups, we get that the number of missed infections will be $\lambda FNR \sim 2\lambda \gamma_-$ which is independent of pooling size.

### False Negative Factor Per Pooled Test (FNPT)

The upper bound for the fraction of infected individuals that are missed by the pooled testing procedure $FNPT$ is

$$$$FNPT \equiv p \cdot FNR = p(\gamma_-^* + (1-\gamma_-^*)\gamma_-)$$$$

This is the expected number of missed infections per tested person.

\begin{align*} FNPT = p FNR &= (1-(1-\lambda)^{\omega})FNR \ &\sim (1-(1-\omega\lambda))FNR \ &= \omega\lambda FNR. \end{align*}

for small $\lambda$.

### FNPT vs FNR

The advantage of $FNPT$ over $FNR$ is that in testings of biased groups one can be confronted with correlated cases with an increased chance of multiple infections within a group, w.r.t. the entire population. $FNPT$ therefore captures this situation by considering the upper bound rather than the average.

## Simulation

from math import ceil, pow
from scipy.special import comb
import altair as alt
import pandas as pd

alt.renderers.enable('default')

def pooling_model(ps, r, lambd, gamma_neg, gamma_pos):
p = 1 - pow(1-lambd, ps)
tst_pos = p*(1-gamma_neg-gamma_pos) + gamma_pos
rep_pos = sum([comb(r, i)*pow(tst_pos, i)*pow(1-tst_pos, r-i)
for i in range(ceil(r/2), r + 1)])
Q = rep_pos + r/ps
PPT = 1/Q
gamma_star = sum([comb(r, i)*pow(gamma_neg, i)*pow(1-gamma_neg, r-i)
for i in range(ceil(r/2), r + 1)])
FNPT = p*(gamma_star + (1-gamma_star)*gamma_neg)
return {"Pool Size": ps, "PPT": PPT, "FNPT": FNPT,
"Infection Rate": lambd, "r": "r=" + str(r)}

def model_run(pool_sizes,  rep_sizes, infection_levels, gamma_neg, gamma_pos):
out = pd.DataFrame()
for lambd in infection_levels:
for ps in pool_sizes:
for r in rep_sizes:
out = out.append([pooling_model(ps, r, lambd,
gamma_neg, gamma_pos)])
return out

def pool_size_ppt_fnpt_chart(source):
chart = alt.hconcat(data=source)
for y_encoding in ['PPT:Q', 'FNPT:Q']:
chart |= alt.Chart(source).mark_line().encode(
x='Pool Size',
y=y_encoding,
color=alt.Color('r',
legend=alt.Legend(title="Replication"),
scale=alt.Scale(scheme='dark2')
)
)
return chart

"""Model params"""

pool_sizes = range(1, 100)
rep_sizes = [1, 3, 5]
infection_levels = [0.01]
gamma_neg = 0.02
gamma_pos = 0.0012

model1_output = model_run(pool_sizes, rep_sizes, infection_levels,
gamma_neg, gamma_pos)
pool_size_ppt_fnpt_chart(model1_output)

## Results

(a) Increase of test efficiency in persons per test, $PPT$. The maximum of this curve indicates the optimal pool size, $\omega^{opt}$ for a given infection rate, and given false negative and positive rates of the test.The maximum efficiency gain is naturally found for $r=1$ and is about $5.1$ persons per test.

(b) False negative factor for the pooled sample, $FNPT$. The result shows that taking more replicates decreases the false negatives. However, note that this also decreases the efficiency to $4.3 PPT$. $\gamma_+ = 0.0012$ and $\gamma_− = 0.02$.

Results for the optimal pooling size, $\omega^{opt}$, and persons per test, $PPT$, are shown in figure (a) for a populationwide infection level of 1%. In figure (b) the increase of $FNPT$ with pooling size is seen. Here we use a false negative rate of $\gamma_- = 0.02$ and a false positive rate of $\gamma_+ = 0.0012$.

## References

Boosting test-efficiency by pooled testing strategies for SARS-CoV-2, Rudolf Hanel and Stefan Thurner,2020


text:
Enemy shooting delay

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

Recommended Posts

Hey everyone, I am currently coding a 2d shooter for a school project, and am wondering what kind of code I can use to delay a function that I have set up to shoot bullets by say .5 seconds between shots. My current implementation isn't working very well and I am looking for some insight. Thanks in advance. EDIT: Should probably add that I am using Visual C++ and Direct X to code this.

Share on other sites
It's hard to help without the code you're using, but I can suggest one way to achieve it.

Every time a shot is performed, store the current time, or current ticks. Then when the next shot is requested, check this "last shot" time against the current time or ticks. If the difference is less than what ever delay you're after then do nothing, otherwise the shot is performed again and the time stored once again.

Hope this isn't too vague.

Share on other sites
It would help if you post your previous implementation so we can see what you're doing wrong.

Share on other sites
ok I know this code isn't anywhere near correct but here it is, broken up from the file so you can get an idea of what i am doing. As of right now the bullet spawns at the correct location, but sort of gets stuck there moving back and forth for a few seconds before moving down the screen. Thank you very much for looking at my code.

the time declaration...
static int currTime = time(NULL);

where its used...

if (currTime >= 800){
PlaySound(sound_hit);
for (int i = 0; i <= 5; i ++){
enbullet.y = (float)enemyArray.y + 30;
enbullet.x = (float)enemyArray.x + 30;}

and in the draw function...

for(int i=0; i<=5; i++){
RECT enbulletRect;
int bcolumns = 8;
enbulletRect.left = (enbullet.curframe % bcolumns) * enbullet.width;
enbulletRect.top = (enbullet.curframe / bcolumns) * enbullet.height;
enbulletRect.right = enbulletRect.left + enbullet.width;
enbulletRect.bottom = enbulletRect.top + enbullet.height;

epos.x = enbullet.x;
epos.y = enbullet.y;
sprite_handler->Draw(
enbullet_image,
&enbulletRect,
NULL,
&epos,
D3DCOLOR_XRGB(255,255,255));

//move the bullet
enbullet.y -= enbullet.movey;}

Share on other sites
I wrote up a quick method for you.

/****************************************************//*****NOTE: THIS IS NOT THE EXACT AND PROPER WAY*****//*****TO SET THUS UP. THIS IS MEANT FOR EXAMPLE *****//*****AND BASIC STRUCTURE OUTLINE. Thank you.   *****//****************************************************///first we create the delays and delay holdersconst int TICK_DELAY = 5;int _tick = 0;/*Check to see if _tick is passed TICK_DELAY, if so, return that you can shoot*/bool ifEnemyShoot(int TickDelay, int currentTick){if(currentTick > TickDelay){return true;}else {return false;}}//....//void EnemyShoot(){//If we can shoot then we obviously have passed TICK_DELAY_tick=0;/*Shooting functions like launching the attack goes here*/}//..../*In game phases. This Handles the Enemy so we won't have a big messy block of code*/void HandleEnemy(){//blah... stuff for enemy goes here//Go through methods to see if you can shoot, if so, Shoot.if(ifEnemyShoot(TICK_DELAY, _tick){EnemyShoot();}}//....//GameEngine section, this is not the correct way to set this up, but...void Update_Game(){_tick+=1;HandleEnemy();}

There you have it, a basic layout for you to have fun with. =D
Insert me in credits if used at all. <You know, I like credits; I go by Axesor>
Also, if you need anymore help [with this pr anything] PM me


text:
# Generator question

1. Dec 16, 2008

### Meseria

Hey,

I am looking to build a generator that goes on a bike stand so when i ride my bike on the stand it will produce electricity.

Im planning on having a copper coil with magnets inside spinning. This is a dc generator right? Well, anyways... i know if i spin the magnets faster it will produce more electricity. Can i increase the amount of copper in the coil in order to produce more electricity? Like if my coil is 500 ft long and i have 2 1" x 3" x 1" rectangle magnets spinning at 100 rpm i should produce x electricity. If i spin faster will i get a higher voltage or amperage? How much more electricity can i produce if my coil is 1000 ft long and i use the same magnets and same 100 rpm?

2. Dec 16, 2008

### minger

I would think that its a function of the inductance of the coils, which isn't necessarily a simple equation as a function of coils and length. A quick google gives for a circular loop:

$$r\cdot \left(ln \frac{8r}{a} - 2 + Y \right)$$

Where r is the loop radius, a is the wire radius, and I have no idea what Y is.

3. Dec 16, 2008

### Topher925

First: Don't ever attempt a project like this that could potential produce fatal voltages if you don't know what you are doing. You obviously do not have the skills or knowledge to attempt a project like this so I suggest you just go buy something that is commercially available.

Second: What you described is not a DC generator, but a permanent magnet synchronous machine. In order to get DC you will need to rectify the output.

Third: You can't model a generators power output with speed alone. Voltage is a function of speed, torque a function of current, and power a function of both. In the case of double-fed machines its also a function of the input electrical work.

What do you plan to do with this power anyway? Charge a car battery?

4. Dec 16, 2008

### Meseria

its like a simple generator but larger. I had made one before in class a long time ago where we wound some copper around a plastic bottle, then spun a magnet inside and had the two ends of the wire connected to a small light bulb and when you spun the magnet it would light up the bulb. Its called induction right? Well all i want to do is build a larger one that can charge batteries, make my tv turn on and other stuff like that.

5. Dec 22, 2008

### Naty1

Unless you have a better reason than you have described, save some time and money and buy a commercially available unit. If this is a "relearning exercise" for instruction go for it!!!,.

Even if you were able to build a generator which produced the voltage and current you require, it would be a miracle if it lasted a week. Without close tolerances and proper bearings it will wear out fast. A used alternator from a junkyard would be a far better source than anything you can make. Commercially available gens and alts are the result of tens of thousands of designs, manufacturing techniques, wire coatings, diode size tests,etc,fan size for cooling,etc,etc.

6. Dec 22, 2008


text:
# An elementary equation manipulation in CFT

1. Nov 13, 2015

### Lapidus

A presumably basic introductory equation manipulation in 2-d conformal field theory. How does from

(when the metric is Euclidean) follow

The right equation is clear (the metric is zero for different indices). But how do i get to the first equation on the left?

thank you

2. Nov 13, 2015

### Staff: Mentor

set μ = ν = 0 and calculate, then μ = ν = 1 and compare the results

3. Nov 14, 2015

### Lapidus

Thanks for the reply! But I don't understand what you mean. If I set zero or one, then RHS and LHS do not add up, in either case.

0ε0 + ∂0ε0 = ∂0ε0

??

4. Nov 14, 2015

### Staff: Mentor

I do not know for sure how $η$ is defined. Since you did not explain it and I'm too lazy to search what you might have meant, I supposed $η$ to be the Kronecker symbol according to your calculation above.
If I then first compute $δ_0 ε_0 = ...$ and next $δ_1 ε_1 = ...$ then I get the same result, i.e. they are equal.

5. Nov 14, 2015

### fzero

Since presumably $\partial\cdot \epsilon = \partial_0 \epsilon_0+\partial_1 \epsilon_1$ in your conventions, you should have found $2\partial_0 \epsilon_0 = \partial_0 \epsilon_0+\partial_1 \epsilon_1$ for the 00 component.

6. Nov 15, 2015

### Lapidus

Ahaa. I did not understand that ∂⋅ε is a sum. (or an inner product)

Thanks everybody!


text:
# Minimum area of the convex hull of the union of a parallelogram and a triangle

This question is somewhat dual to my previously stated question about Maximum area of the intersection of a parallelogram and a triangle, where the triangle and parallelogram each is assumed to be of unit area.

Question. Suppose a parallelogram is of area 1 (say, the unit square if you prefer) and a triangle is of area $$1$$ as well, then what is the minimum area of the convex hull of the union of the parallelogram and the triangle?

It is obvious that the minimum exists and is greater than $$1$$. The best I can do is $$\sqrt{2}$$ $$-$$ is this the minimum?

My example is: the unit square and the right triangle with legs of length $$\sqrt2$$ each, the triangle's right angle coinciding with the square's corner. (Added by Joe's request.)

In fact, there is a continuous cyclic family of examples, each producing the same area of the convex hull:

An analogous question can be asked in three dimensions, replacing parallelogram with parallelepiped (or cube, if you prefer) and triangle with simplex or pyramid with a parallelogram base, each of unit volume.

• are the triangle and parallelogram variables in the question, or given? – Yaakov Baruch Apr 10 at 11:14
• Could you describe your $\sqrt{2}$ example? – Joseph O'Rourke Apr 10 at 11:56
• @JosephO'Rourke: done. – Wlodek Kuperberg Apr 10 at 16:05
• One way I see to make this more tractable is to show that, if the unit square is $\{\pm\frac12, \pm\frac12\}$, then up to rotations there must be one triangle corner each with $x\le-\frac12, y\ge-\frac12;$ and with $x\ge-\frac12,y\ge\frac12;$ and with $x\ge\frac12, y\le\frac12$. – Matt F. Apr 11 at 16:32
• A $\sqrt{2}$ example is also achieved by a unit a square and an isosceles triangle of base and height $\sqrt{2}$, with the base centered on that of the square. – Yaakov Baruch Apr 11 at 20:43

This isn't a full answer, just an algebraic simplification.

Let a square have vertices $$(\pm \frac12, \pm \frac12)$$. Suppose a triangle has vertices $$(a,b),(c,d),(e,f)$$ satisfying:

$$c \le -1/2 \le e \le 1/2 \le a$$ $$f \le -1/2 \le d \le 1/2 \le b$$

Then the convex hull of the square and triangle has area

$$\phantom{+}\max(a-c+b-d,\ 2ad-2bc)\,/\,4\\+\max(a-e+b-f,\ 2be-2af)\,/\,4\\+\max(e-c+d-f,\ 2cf-2de)\,/\,4$$

This surprisingly simple formula is the result of summing the area of the square, the four white triangles bordering it, and any positive areas for the gray triangles.

For instance, the contribution of the triangle on $$(a,b),(c,d),(-1/2,1/2)$$ is \max(0,\left| \begin{align} a\ \ \ \ &\ \ \ \ b &\!1\\ c\ \ \ \ &\ \ \ \ d &\!1\\ -1/2\ \ &\ \ 1/2 &\!1 \end{align} \right|/2) If the triangle has a positive signed area, then the line between $$(a,b)$$ and $$(c,d)$$ is above the corner of the square, and the triangle area should be included in the convex hull.

If the triangle has a negative signed area, then the line is below the corner, and the triangle area should not be included in the convex hull.

I'd welcome an explanation for the overall area formula that doesn't go through a bunch of determinants and algebraic simplification. In any case, the formula is simple enough that we can reasonably ask a computer algebra system to minimize it subject to the inequalities and the area constraint on the triangle.

Furthermore, I think these inequalities hold generically for all minimizing answers to the original problem. If the triangle has vertices $$(a,b),(c,d),(e,f)$$, then one of them is highest, one of them is lowest, one of them is leftmost and one of them is rightmost. By the pigeonhole principle, two of those designations must coincide. So we can assume without loss of generality that $$(a,b)$$ is highest and rightmost, $$(c,d)$$ is leftmost and $$(e,f)$$ is lowest. Thus at a minimum we have $$c \le e \le a$$ $$f \le d \le b$$ and I think the other inequalities follow too.


text:
## From elongated spanning trees to vicious random walks    [PDF]

A. Gorsky, S. Nechaev, V. S. Poghosyan, V. B. Priezzhev
Given a spanning forest on a large square lattice, we consider by combinatorial methods a correlation function of $k$ paths ($k$ is odd) along branches of trees or, equivalently, $k$ loop--erased random walks. Starting and ending points of the paths are grouped in a fashion a $k$--leg watermelon. For large distance $r$ between groups of starting and ending points, the ratio of the number of watermelon configurations to the total number of spanning trees behaves as $r^{-\nu} \log r$ with $\nu = (k^2-1)/2$. Considering the spanning forest stretched along the meridian of this watermelon, we see that the two--dimensional $k$--leg loop--erased watermelon exponent $\nu$ is converting into the scaling exponent for the reunion probability (at a given point) of $k$ (1+1)--dimensional vicious walkers, $\tilde{\nu} = k^2/2$. Also, we express the conjectures about the possible relation to integrable systems.
View original: http://arxiv.org/abs/1206.3147


text:
# Defining Material Conditional

Defining the conditional statement "$\phi \implies \psi$" so as to capture what is meant by implication requires that we ignore the issue of causation.

From Keith Devlin's Introduction to Mathematical Thinking:

$\quad$The truth or falsity of a conditional will be defined entirely in terms of the truth or falsity of the antecedent and the consequent. That is to say, whether or not the conditional expression $\phi \implies \psi$ is true will depend entirely upon the truth or falsity of $\phi$ and $\psi$, taking no account of whether or not there is any meaningful connection between $\phi$ and $\psi$.
$\quad$The reason this approach turns out to be a useful one, is that in all cases where there is a meaningful and genuine implication $\phi$ implies $\psi$, the conditional $\phi \implies \psi$ does accord with that implication.
...
$$\begin{array}{ccc} \phi & \psi & \phi \implies \psi \\ \hline T & T & T \\ T & F & F \\ F & T & ? \\ F & F & ? \\ \end{array}$$ ...
$\quad$Once we get used to ignoring all questions of causality, the truth-values of the conditional seem straightforward enough when the antecedent is true...[b]ut what about when the antecedent is false?

Intuitively, we can see that $\phi$ implies $\psi$ means that it does not happen that $\phi$ is true and $\psi$ is false, as this captures the hypothetical aspect of implication, since we would like to consider an implication as true when the consequent does follow from the antecedent, even if the antecedent turns out to be false. Consider the following conditionals in each of which the antecedent is false:

$\quad$If it is true that polygamy is legal in New York, then marriage laws in New York are not identical$\quad$with those in Nevada. (Here the consequent is true).

$\quad$If it is true that polygamy is legal in New York, then a man living in New York can legally have $\quad$three wives. (Here the consequent is false).

Few would deny the truth of the preceding conditionals. From Introduction to Logic by P. Suppes:

Although we have already admitted that the notion of connection or dependence being appealed to here is too vague to be a formal concept of logic, in choosing examples which will force upon us, within our truth-functional framework, a truth value for implications with false antecedents it is reasonable to pick an example...for which our intuitive feeling of dependence is strong rather than an example...for which it is weak.

And the reason why this is a reasonable thing to do is because there is a hypothetical aspect of implication that we would like to capture in our defining the conditional. Thus, we can agree that the truth table for $\phi \implies \psi$ and $\lnot (\phi \land \lnot \psi )$ should have the same truth-value for each particular combination of truth-values for $\phi$ and $\psi$. $$\begin{array}{cccc} \phi & \psi & \lnot (\phi \land \lnot \psi) & \phi \implies \psi \\ \hline T & T & T & T \\ T & F & F & F \\ F & T & T & T \\ F & F & T & T \\ \end{array}$$

First question: Is this convincing and appropriate to use as an explanation for the definition of the conditional? Also please provide your own approach.

Again from P. Suppes:

The truth functional demand...has no undesirable effects, since conditional sentences whose antecedents and consequents are unrelated and whose antecedents are false play no serious role in systematic arguments.

Even though this is the case, I feel that it is important for 1) the conditional to be defined in all cases and 2) to provide an explanation for this definition. However, it is often said that the assignment of truth values for the case when $\phi$ is false is arbitrary, but that this produces a useful logic. This seems to imply that the conditional could have a different truth table and that we need not provide an explanation that appeals to our intuition of how implies should work. Second question: Is this true?

Response to Derek Elkins:
At this point in my self education (I am looking at Modern Introductory Analysis by Dolciani, a precalculus text) I am looking for a solid explanation about implication and how we come to define the conditional. Most of your answer contains material that is currently out of my depth, and I am seeking an answer that will put to rest my doubts about my understanding of implication in propositional logic. In fact, I'm only even aware of first-order logic and propositional logic not as theories, but more as a way to make communicating about mathematics precise. Given your extensive knowledge and my lack thereof, and bearing in mind that I am self-studying mathematics at the precalculus level, can you provide me with an explanation that you found satisfying when you were at this level? Also, can you please share with me online resources, or books, that helped you in your education? Thank you.

• Apologies for the long post.
– user185744
Feb 13 '16 at 3:22
• See my previous answer on a similar topic at: math.stackexchange.com/questions/1551320/… Feb 13 '16 at 4:04
• Also see my previous post on a similar topic, which makes a few points complementary to those made by Devlin & Suppes: math.stackexchange.com/questions/1474054/… Feb 13 '16 at 8:05
• @DerekElkins Thank you for your answer. Please see my response above.
– user185744
Feb 18 '16 at 19:15
• You may be find my recent posting here helpful math.stackexchange.com/questions/2685415/… Mar 13 '18 at 14:54

A definition doesn't have to be convincing or appropriate; you can define things however you want. Of course, it is better to have a convincing argument on why a definition is appropriate and corresponds to what is being modeled. You can definitely have good and bad definitions. If we did change the result for $\phi$ false, you'd get logical equivalence.

If you define your logical connectives in terms of truth tables, then you don't have the choice of not defining implication for all inputs. However, truth tables are a semantics for propositional logic and just because a proposition is satisfiable doesn't mean that it is (syntactically) entailed. Of course, for the standard rules of propositional logic we have soundness and completeness theorems that state exactly that these two notions coincide. If we change the rules of logic, though, we can formulate a logic where $\phi \implies \psi$ is not provable (i.e. not syntactically entailed) when $\phi$ is false, for example relevance logic. This is roughly what "not defining implication for false antecedents" would mean at the syntactic level.

To directly answer your first question: within the context of standard propositional logic the answer is unambiguously "yes". Soundness requires that two logically equivalent formulas have the same truth table. However, this just pushes the problem back to "should those two formulas be logically equivalent?" To which many people, including me, say "no, not in general". This is (one of) the difference(s) between classical and non-classical (and in particular constructive) logic. Ironically, that logical equivalence that you present as a possible justification for $\phi \implies \psi$ is true when $\phi$ is false and $\psi$ is true, doesn't hold in (non-classical) constructive logics, but the statement itself does hold in most constructive logics (particularly in ones that are not substructural [note that relevance logic is a non-classical, substructural logic.]) Since classical logic is just a special case of a constructive logic, this means that there is a better, more fundamental reason why implication should behave the way it does. The BHK interpretation provides one approach to this. If we think of propositions as true when we have a proof object for them, then logical connectives like implication are operations on these proof objects. In particular, in the BHK interpretation implication is interpreted as a function that takes proof objects of $\phi$ and produces proof objects of $\psi$. With this interpretation, the fact that implication can be true when its antecedent is false is merely the fact that functions can ignore some of their arguments. Indeed the analog of the BHK interpretation for relevance logic is exactly a lambda calculus where functions are not allowed to ignore their arguments. The Curry-Howard correspondence, by grounding logic in computation, provides, for me, the real explanation and justification for logical notions. Admittedly, this is a fairly radical view.

• Thank you for your answer. Please see my response above.
– user185744
Feb 18 '16 at 19:21
• You haven't stated your overall goal so what answer is most appropriate is not clear. For example, if your goal is merely to verify your understanding of standard propositional logic, then if you understand truth tables, you understand everything. If learning about formal logic is your goal, then much can be said but it requires a broader perspective than propositional logic. If you are interested in mathematical reasoning, then you might be taking an approach akin to learning a natural language by reading dictionaries and grammar texts when you could be having conversations. Feb 19 '16 at 0:43
• Well, specifically, how do you think of the conditional when the antecedent is false? Do you consider it true because it's reasonable to consider conditionals in which there is some connection and the consequent really does follow from the antecedent. Or, do you consider it true because it cannot be falsified? (i.e., it is not the case that $\phi$ is true but $\psi$ is false.) These two options are very different. Or is this something that I shouldn't even be concerned with?
– user185744
Feb 19 '16 at 2:13
• As Carl says, by choosing a "truth-functional framework" as the references you cite do, they've already eliminated much room for nuance. The question is then just a matter of choosing names for Boolean functions. The way I, personally, think of it is essentially the BHK interpretation I gave. Another perspective is the semantics of first-order logic, where a proposition is represented by a set of things for which it holds. $P\Rightarrow Q$ means $P\subseteq Q$ and False implies True is just the fact that the empty set is the subset of any set. Feb 20 '16 at 5:53
• The principle of explosion is a purely logical reason for it, albeit it is not much more than a statement of it. It can be shown, for a very broad class of "logics", that if implication behaves like "normal", then the principle of explosion holds. (For the technically minded, it corresponds to $A^0\cong 1$ which holds in any monoidally closed category with an initial object.) Paraconsistent logics, including relevance logic, don't have the principle of explosion. In many cases, the principle of explosion is the definition of falsity. Feb 20 '16 at 6:17

This seems to imply that the conditional could have a different truth table and that we need not provide an explanation that appeals to our intuition of how implies should work. Second question: Is this true?

The first issue is that treating $\Rightarrow$ as a truth function already removes much of our intuition about implications, because now the truth of the implication can only depend on the truth or falsity of the sentences involved, not on their actual meaning.

In any case, if we accept that $T \Rightarrow T$ is true and $T \Rightarrow F$ is false, there are four possible truth tables for $\Rightarrow$, which I will list with ugly formatting.

$$1.\quad \begin{matrix} & T & F \\ T & T & F \\ F & T & T \end{matrix}\\ 2. \quad \begin{matrix} & T & F \\ T & T & F \\ F & T & F \end{matrix} \\ 3. \quad \begin{matrix} & T & F \\ T & T & F \\ F & F & T \end{matrix} \\ 4. \quad \begin{matrix} & T & F \\ T & T & F \\ F & F & F \end{matrix}$$

• Option 1 is the usual definition of $P \Rightarrow Q$
• Option 2 would make $P \Rightarrow Q$ be the same as just $Q$
• Option 3 would make $P \Rightarrow Q$ be the same as $P \Leftrightarrow Q$
• Option 4 would make $P \Rightarrow Q$ be the same as $(P \text{ and } Q)$.

As you can see, there are already names for the other three options, and none of them acts like our intuition says that implication should act. The truth table we use may not seem ideal, but it turns out to be better than the alternatives.

• Although not explicitly stated in my post, I too, agree that the truth table is better than the alternatives. In fact, I think it captures a whole lot about genuine implication. However, I am interested in being confident in my explanation of why we should consider a conditional statement as true whenever the antecedent is false. What was the thinking behind this? Was it because it captures the hypothetical aspect of implication, or because it is not the case that the antecedent is true and the antecedent false?
– user185744
Feb 19 '16 at 4:05