text:
# HOC Keywords¶↑

Note

This is a page about HOC syntax; it is not directly applicable to Python-based simulations. A HOC-based version of the NEURON documentation is also available.

help

invokes the help system

Syntax:

help

help word

Description:
Help word sends a word to the help system. The word is looked up in the nrn/lib/helpdict file and if found Netscape is sent the appropriate URL to display the help text. If the word is not found, the URL for the table of contents is sent. Netscape must be running for the help system to work.

return

Syntax:

return

return expr

return objref

Description:

The return command will immediately exit from a procedure without returning a value.

The return expr command will immediately exit from a function which must return a value. This command must also be the last executable statement of a function. It is possible for a function to contain more than one return command, for instance in a series of if else statements; however, not more than one of the return commands may return a value at any given time.

The return objref command must be used to return from an obfunc.

Example:

func max(){
if ($1 >$2){
return $1 } else { return$2
}
}

returns the maximum of two arguments which are read into the function. Eg. max(3,6), where $1 is the first argument (3) and$2 is the second argument (6). This use of max would return the value 6.

Warning

See restriction of the break statement.

break

Syntax:
break
Description:
Immediately exit from a loop. Control transfers to the next statement after the loop statement.

Warning

This statement, as well as “return”, “continue”, and “stop” cannot occur within the scope of a statement that modifies the section stack such as

section { statement }

or the stack will not be properly popped. Also it should not be placed on a line that contains object syntax but should be placed on a line by itself. eg.

    x.p() break

should be written

    x.p()
break

Example:

while(1) {
x = fscan()
if (x < 0) {
break;
}
print sqrt(x)
}

continue

Syntax:
continue
Description:
Inside a compound statement of a loop, transfers control to the next iteration of the loop statement.

Example:

for i=1,10{
if(i==6){
continue
}
print i
}

prints the numbers: 1,2,3,4,5,7,8,9,10. 6 is left out because when i==6, the control is passed beyond the print statement to the next iteration of the loop.

You can accomplish the same thing with the following syntax:

for i=1,10{
if(i<6 || i>6){
print i
}
}

Warning

See restriction of the break statement.

stop

Syntax:
stop
Description:
Return control to the command level of the interpreter. This is a useful safety device for stopping the current execution of your program. Eg. you may wish to stop the program and print out an error message that lets you know if you have entered unacceptable arguments.

Warning

See restriction of the break statement.

if

Syntax:

if (expr) stmt1

if (expr) stmt1 else stmt2

Description:
Conditional statement. When the expr evaluates to a nonzero number (true) stmt1 is executed. With the else form, if the expression evaluates to zero (false) stm2 is executed.

Example:

i = 0   //initialize i
j = 0   //initialize j
if(vec.x[i] <= 10 && i < vec.size()){   //if the value of the ith element in vec
//is less than or equal to 10, and
//if i is an index within vec
vec1.x[j] = vec.x[i]        //set the jth element of vec1 equal to that
//ith element of vec
i = i+1             //increment i by 1
j = j+1             //increment j by 1
} else{                 //otherwise (This must be on the same line as the closing brace of
//the previous statement in order to indicate that the compound
//statement has not ended.)
i = i+1             //simply go to the next element of vec
}

float_epsilon, ifsec

else

if

while

Syntax:
while (expr) stmt
Description:
Iteration statement. Repeatedly execute the statement as long as the expr evaluates to true.

Example:

numelements = 20
i = 0
while (i < numelements){
print(cos(vec.x[i]))
print(sin(vec.x[i]))
i += 1
}

prints the cosines and the sines of the vec elements up to numelements, which in this case = 20.

for

Syntax:

for(stmt1; expr2; stmt3) stmt

for var=expr1, expr2  stmt

for (var) stmt

for (var, expr) stmt

for iterator (args) stmt

Description:

Iteration statement. The for statement is similar to while in that it iterates over a statement. However, the for statement is more compact and contains within its parentheses the command to advance to the next iteration. Statements 1 and 3 may be empty.

This command also has a short form which always increments the iterations by one.

for *var*=*expr1*, *expr2*  stmt

is equivalent to

for(*var*=*expr1*; *var* <= *expr2*; *var*=*var*+1) stmt

However, expr1 and expr2 are evaluated only once at the beginning of the for.

for (var) stmt

Loops over all segments of the currently accessed section. var begins at 0 and ends at 1. In between var is set to the center position of each segment. Ie. stmt is executed nseg+2 times.

for (var, expr) stmt

If the expression evaluates to a non-zero value, it is exactly equivalent to for (var) stmt If it evaluates to 0 (within float_epsilon ) then the iteration does not include the 0 or 1 points. Thus for(x, 0) { print x } is exactly equivalent to for (x) if (x > 0 && x < 1) { print x }

The iterator form of the for loop executes the statement with a looping construct defined by the user.

Example:

for(i=0; i<=9; i=i+1){
print i*2
}

is equivalent to

for i=0, 9 {
print i*2
}

create axon
access axon
{nseg = 5  L=1000  diam=50  insert hh }
for (x) print x, L*x
for (x) if (x > 0 && x < 1) { print x, gnabar_hh(x) }

iterator, break, continue, while, forall, forsec

print

Syntax:
print expr, string, ...
Description:
Any number of expressions and/or strings may be printed. A newline is printed at the end.

Example:

x=2
y=3
print x, "hello", "good-bye", y, 7

prints

x hello good-bye 3 7

and then moves to the next line.

delete

Syntax:
delete varname
Description:
Deletes the variable name from the global namespace. Allows the varname to be declared as another type. It is up to the user to make sure it is safe to execute this statement since the variable may be used in an existing function.

Syntax:
read(var)
Description:
var is assigned the number input by the user, or the next number in the standard input, or the file opened with ropen. read(var) returns 0 on end of file and 1 otherwise.

Example:

for i=1, 5 {
print x*x
}

will await input from the user or from a file, and will print the square of each value typed in by the user, or read from the file, for the first five values.

debug

A toggle for parser debugging purposes. Prints the stack machine commands resulting from parsing a statement. Not useful to the user.

double

Syntax:

double var1[expr]

double var2[expr1][expr2]

double varn[expr1][expr2]...[exprn]

Description:

Declares a one-dimensional, a two-dimensional or an n-dimensional array of doubles. This is reminiscent of the command which creates an array in C, however, HOC does not demand that you specify whether or not numbers are integers. All numbers in all arrays will be doubles.

The index for each dimension ranges from 0 to expr-1. Arrays may be redeclared at any time, including within procedures. Thus arrays may have different lengths in different objects.

The Vector class for the ivoc interpreter provides convenient and powerful methods for manipulating arrays.

Example:

double vec[40]

declares an array with 40 elements, whereas

objref vec
vec = new Vector(40)

creates a vector (which is an array by a different name) with 40 elements which you can manipulate using the commands of the Vector class.

em

Syntax:
em
Description:

microemacs editor

This is a reasonably complete editor with many commands. These commands are listed in emacs. A tutorial is also available at emacstut.

When called from the interpreter, the command ^C immediately returns to the interpreter and the current buffer is interpreted. Other commands follow:

^X^F
reads a file into a new buffer.
^X^B
changes buffers.
^X^W filename
saves (writes) a file under a specific name.
^X^S
saves a file under the last specified name.

depvar

Syntax:
depvar
Description:
Declare a variable to be a dependent variable for the purpose of solving simultaneous equations.

Example:

depvar x, y, z
proc equations() {
eqn x:: x + 2*y + z =  6
eqn y:: x - y + z   =  2
eqn z:: 2*x + y -z  = -3
}
equations()
solve()
print x,y,z

prints the values of x, y and z.

eqn

Syntax:

eqn var:: expr = expr

eqn var: expr =

eqn var: = expr

Description:
Introduce a simultaneous equation. The single colon forms add the expressions to the indicated sides. This is convenient for breaking long equations down into more manageable parts which can be added together.

Example:

eqinit()
depvar x, y, z
proc equations() {
eqn x:: x + 2*y + z =  6
eqn y:: x - y + z   =  2
eqn z:: 2*x + y -z  = -3
eqn z: = 5 + 4y
}
equations()
solve()
print x,y,z

makes the right hand side of the z equation “2 + 4y” and solves for the values x, y, and z.

local

Syntax:
local var
Description:
Declare a list of local variables within a procedure or function Must be the first statement on the same line as the function declaration.

Example:

func count() {local i, x
x = 0
for i=0,40 {
if (vec.x[i] == 7) {
x = x+1
}
}
return x
}

returns the number of elements which have the value of 7 in the first 40 elements of vec. i and x are local variables, and their usage here will not affect variables of the same name in other functions and procedures of the same program.

localobj

Syntax:
localobj var
Description:
Declare a list, comma separated, of local objrefs within a proc, func, iterator, or obfunc. Must be after the local statement (if that exists) on the same line as the function declaration

Example:

func sum() { local i, j  localobj tobj // sum from $1 to$2
i = $1 j =$2
tobj = new Vector()
tobj.indgen(i, j ,1)
}
sum(5, 10) == 45

strdef

Syntax:
strdef stringname
Description:

Declare a comma separated list of string variables. String variables cannot be arrays.

Strings can be passed as arguments to functions.

Example:

strdef a, b, c
a = "Hello, "
b = "how are you?"
c = "What is your name?"
print a, b
print c

will print to the screen:

Hello, how are you?

setpointer

Syntax:
setpointer pvar, var
Description:

Connects pointer variables in membrane mechanisms to the address of var. eg. If \$NEURONHOME/examples/nmodl/synpre.mod is linked into NEURON, then:

soma1 syn1=new synp(.5)
setpointer syn1.vpre, axon2.v(1)

would enable the synapse in soma1 to observe the axon2 membrane potential.

insert

Syntax:
insert mechanism
Description:
Insert the density mechanism in the currently accessed section. Not used for point processes–they are inserted with a different syntax.

uninsert

Syntax:
uninsert mechanism
Description:
Delete the indicated mechanism from the currently accessed section. Not for point processes.


text:
# Calcium floats over water during the reaction with water.

##### Updated On: 27-06-2022

Text Solution

Solution
(1) Calcium reacts with water slowly and less vigorously.
2Ca(s)+2H2Ol2Ca(OH2)(as)+H2g
(2) The hydrogen gas relesed in this reaction gets collected on the surface of the metal in the form of bubbles, to which the metal floats on water.

format: plain


text:
2:00 PM
yeah, I looked up what the tensor product is, I'm confused about its relation with the exterior one

@AkivaWeinberger I simply used the Leibniz rule for differentiation. It worked after some toil :)

Hey everyone, quick question. If $A \subset X$ for some topological space $X$, does $A$, not $Cl(A)$, contain any limit points of $X - A$?

because they seem to be operations defined on different spaces to me

If $T_1$ and $T_2$ are $k$ and $\ell$-multilinear maps, instead of the exterior/wedge product there's a much easier tensor product operation which spits out a $k+\ell$ multilinear form $T_1 \otimes T_2$

@anonymous The problem is that you've got an $x$ in the limits and in the integral
so you have to account for both of them

2:01 PM
Defined by $T_1 \otimes T_2(v_1, \cdots, v_k, v_{k+1}, \cdots, v_{k+\ell}) = T_1(v_1, \cdots, v_k) \cdot T_2(v_{k+1}, \cdots, v_{k+\ell})$

@AlessandroCodenotti What's the context, out of curiousity?

@anonymous Oh, never mind -
the Leibniz rule is more general than I thought it was.
You should be fine, then.

Hamiltonian mechanics. The Poincaré-Cartan differential form I was wondering about a few days ago to be precise

Ahh.

@Akiva Yeah, it just occurred to me
You could have functions of $x$ on the limits

2:02 PM
$$\phi'\left(x\right)=-\sin\left(x\right)-\int_{0}^{x}\phi\left(t\right)dt$$

By the way, today is the AMC

@anonymous why?

@AlessandroCodenotti You've probably noticed, but there is this question on MO: mathoverflow.net/questions/96992/…

@AkivaWeinberger IMO, Leibniz almost follows from chain rule. You can clearly see it.

In fact, now is the AMC. So, bye

2:03 PM
@DHMO It is just Leibniz rule of differentiation. You didn't know it ?

@SimplyBeautifulArt The case where there's an $x$ in the limits and in the integral is harder to show from the chain rule, though
unless you use the multivariable chain rule.

@Semiclassical I didn't, I'm looking at the references provided there right now, thanks!

@Alessandro Anyway, now you've got the tensor algebra with the tensor product operation. What you can do now is construct the exterior algebra $\Lambda^k V^*$ as a quotient $\bigotimes^k V^*/\sim$ where $T \sim T'$ if $T(v_1, \cdots, v_i, v_j, \cdots, v_k) = T'(v_1, \cdots, v_j, v_i, \cdots, v_k)$.

@anonymous I see

2:05 PM
Huzzah for integral equations :/

@DHMO integral?

One way to approach that, I'd say, is to first note that $\cos x$ is a solution to $\phi+\phi''=0$. So all that one needs is the second term.

@SimplyBeautifulArt no time

:-) ok
I too am busy

And under this quotient the tensor product can indeed be made into the exterior product, but there's a small subtlety there. If $A_1$ and $A_2$ are two alt. mult. forms, then $A_1 \wedge A_2$ is defined as the "average" of all expressions of the form $T_1 \otimes T_2$ where $T_i$ are the multilinear forms which represent $A_i$'s.

2:08 PM
And that second term is a convolution $-(f\star g)(x)$ with $f(x)=x,g(x)=\phi(x)$.

This is described in detail in G&P, chapter 4

Hey

@SimplyBeautifulArt @DHMO May I ask you something? Is a function like $\int_{f(x)}^{g(x)} h(x) dx$ legit? Does it make sense? f(x), g(x) and h(x) are all suppose linear functions of $x$.

No, it doesn't make sense.

2:10 PM
@anonymous no

You can't have integration variables in the limits of integration.

Nope. The integrand should be $h(x,t)$ and you should integrate with respect to $t$.
That's the usual form

It's fine to have independent variables in the integrand and the limits of integration, but you can't have integration variables in the limits.

@DHMO @SimplyBeautifulArt @Semiclassical I get it now. That was a confusion bugging me for past few days. Thanks a lot :)

2:12 PM
Consider what the limits of integration tell you: Integrate $x'$ from $x'=f(x)$ to $x'=g(x)$.

If $x'$ appeared there, then neither statement would be well-defined.

@Semiclassical If they use the same variable in the limit and the integrand aren't they supposed to mean a different variable? Like writing $x \mapsto \int_0 ^x f(x) dx$ is considered abuse of notation as it actually means $x \mapsto \int_0^x f(y) dy$.

I'll look at GP and ask you if I have more precise doubts, thanks for your help @Balarka

Sure thing

2:13 PM

Right. So $\int_0^x f(x')\,dx'$ is fine, but it wouldn't if both were $x$.

@Semiclassical Agreed!

That's one abuse of notation I refuse to consider myself.
It's vital to distinguish between the function being integrated and the limits of integration.

But if they can never be the same variable there is no room for ambiguity.

Meh.
One is a dummy variable, the other isn't.
No reason to treat them notationally as though they're the same thing.

2:16 PM
@BalarkaSen Let's say I define a map between (almost) complex manifolds $f:(M,J)\to (N,J')$ to be holomorphic if $Df\circ J=J'\circ Df$. Then do you know how to prove that this is equivalent to $J'(Tf(M))\subset Tf(M)$? One direction is trivial. The other... I don't know.

And when you're doing stuff like convolutions, you definitely need to distinguish them.

Good point

Semi ^ any idea?

@Danu What's $Tf(M)$?

Basically why is a (smooth) submanifold a complex submanifold iff the complex structure stabilizes its tangent bundle?

2:17 PM
Noooope.

@BalarkaSen Tangent bundle of the image

The image may not be a manifold?

Right, let the image be a submanifold

Got it.

I was hoping this would just be some kind of linear algebra exercise
But I don't see any easy solution

2:20 PM
In what field do you study manifolds? I still haven't encountered them.

Right now, I study almost complex manifolds and in particular their Chern classes

@Danu That sounds almost trivial. Why not identify $f(M)$ with $M$ and $f$ with the inclusion of the submanifold?
So you have the inclusion $i : M \to N$

Sure
Now I assume $J$ stabilizes the tangent bundle
Hmm lol
that's kind of almost circular
I think I slightly messed up the wording
Let me go back and check
Right, no actually
I think I'm okay

Can't find any mention to manifolds in any of my books. :I

so assume $J$ stabilizes the tangent bundle---then can you show me how that square commutes?
Take the map to be the inclusion, no problem

2:25 PM
Ok, so $Di$ is the inclusion $TM \to TN$

Yeah

$J'(Ti(M))$ is precisely $J' \circ Di$

And $J'\circ Di(v)=Di(w)$ for some $w$
Now can you show me why $w=Jv$?

Well, $J$ is an anti-involution of $TN$, right? So let $v = -Jw$

...yes, and then?

2:31 PM
@Danu Sorry, was afk for a while. Ignore that, I misunderstood what you wrote up there.
Hmm, right, that's what we want to show

It's such a stupid little exercise
But maybe it's not as trivial as it looks?

@Danu Yes, it shouldn't be trivial. For 1 dimension it seems like the claiming Cauchy-Riemann equations => holomorphic
Sorry, that's not true. I am thinking of the wrong converse.

Hello!
Do you know where could I find English translation for Grothendieck's EGA?
I have been reading Eisenbud and Shafarevich for a while, and they mention some interesting papers from EGA.

2:47 PM
@MathWanderer Don't exist, AFAIK.

@Danu Really?
Wy?

10

I have always wondered whether there is an English translation of Grothendieck's EGA (Elements de Geometrie Algebrique) available. Does anyone know whether there is and if so where I can find it? If not, are there English texts that cover similar material to the EGA that you would recommend? (My ...

The consensus seems to be: Learn enough French to read it.

Dang!

You probably need more than French to read it!

2:48 PM
Does EGA provide any insight that cannot gain from Shafarvich or Hartshorne?

Shafarevich's BAG is just classical algebraic geometry; I think Hartshorne covers a lot but I have never read it

@MathWanderer Probably.
50

That fact that EGA and SGA have played mayor roles is uncontroversial. But they contain many volumes/chapters and going through them would take a lot of time, especially if you do not speak French. This raises the question if a student, like me, should even bother reading EGA. There must nowada...

I see. Since my current research in machine learning will involve tools from the algebraic geometry, I decided to study it. Since I do not have strong background in commutative algebra, I actually started with Eisenbud and Shafarevich.
I only heard that EGA offers a lot of useful theorems

@Danu Haha, I knew that buying all my mathematics textbooks in French was going to be worth it.

You definitely need a lot of commutative algebra to read EGA, or even Hartshorne.

2:53 PM
Yeah, that is why I started with Eisenbud. He does also incorporates some concepts from algebraic geometry. Strangely, Shafarevich did not require much background.
Hold on, what do you mean by "classical" AG?

Algebraic geometry of varieties, mostly.

There's quite a range of opinions in that question

I see. And I believe AG through scheme is "modern"?

What sort of tools from algebraic geometry do you intend to apply?

Not particularly, but schemes are a major part of algebraic geometry
@Danu I can't seem to prove that fact :(

2:57 PM
Me neither.
I guess it's passed the "am I being stupid" check
so I can ask my supervisor

You see, current machine learning started to ask questions about estimating a learning function with polynomials. My interest is how we could find optimal input set, which corresponds to varieties from different estimated polynomials .
To be honest, I am not sure which tools I could apply since I do not know enough theorems about AG.
All I know is that the main structures involve varieties and several-variable polynomials.
I decided to pick up Hartshorne first since I heard that it has vast amount of theorems and results, but it was not readable past first few pages.
Then I switched to books I mentioned. Some colleagues mentioned EGA as great source to pick up results.

hey
what do you guys think of my argument. Let R be a ring and $S \subset R$ be a subset consisting of all elements which are not zero divisors. Prove that every element in $S^{-1}R$ is either a zero divisor or a unit.
Suppose [x/s] is not a zero divisor or the 0 element of the ring. This means x neq 0. Also, we have that property that for all [k/m] neq [0/1] we have $[x/s][k/m] \neq [0/1]$. [x/s][s/x] = [xs / sx]. Let us test if they are in the same class or not xs/sx ~ 1/1 iff there exists t in S such that t(xs - sx) = t(xs - xs) =0 so it is indeed true thus we are done.
@BalarkaSen what do you think of my argument ?

I forget. If an element of a ring isn't a zero divisor, must it be invertible?

no

Then how is $S^{-1}$ well-defined?

3:08 PM
$S^{-1}R$ is the ring of fractions for the multiplicative set S @Semiclassical

I have a formula to show that a given set of i.i.ds are normally distributed then I want to show a concrete example, however I am stuck on which variables to choose. I have tried splitting up the fraction to define the constants, but that leads me no where. This is what I am facing: mathb.in/126115 So I need to determine c_0 and c_1. I can only picture c_0 = 0, as this will give 0 + c_1*mu = 0 (since mu is 0), but I don't see how that is determined

3:36 PM
Now reaching: Munkres Section 9: AoC

Nvm that's too easy I guess

Answered 20 of 25 questions on the AMC 12. My understanding is that right answers are 6 points, wrong answers are 0 points, and answers left blank are 1.5 points; a score of 100 points or higher is needed to get to the next round.
Assuming I made at most four mistakes, am I guaranteed to pass?

Weird that blank answers can get more marks than attempted ones.

It's to discourage random guesses.
They don't want people passing because of chance.

Oh, is this an MCQ?

3:44 PM
A what?

((20-4)*6+1.5*5)/(25*6)*100=69

Multiple Choice Q

Yeah, it's a multiple choice test

Ok, then that makes more sense

Lowest raw mark: ((20-4)*6+1.5*5)=103.5, a bare pass

3:46 PM
I realized towards the end that there were like three questions I forgot about.

@anonymous you know, sin^-1 (cos x) = sqrt(1-x^2) right
but d/dx ln(tan^-1 x) = 1/[(tan^-1 x)(1+x^2)]
and I don't actually know how to continue

@BalarkaSen I was wondering if you could check my argument ?

@Adeek I don't think I want to

oh ok

4:18 PM
@BalarkaSen So I think the "fact" is not true.
A professor pointed out to me that the stability under $J'$ does not depend on $J$ so it would be weird if this is equivalent to a condition involving $J$

@Danu I'm angry at you now!
But good to hear that

It was stated so matter-of-factly in Salamon's paper that I didn't think it would ijnvolve any specifics
he made it sound like a well-known easy result
I guess it has to come from the specifics of my map

4:34 PM
@Danu That makes sense. What's true is that if the almost complex structure on the ambient manifold preserves the tangent bundle of the submanifold, then the submanifold admits an almost complex structure under which it's an almost complex submanifold of the ambient manifold.
But that's obvious.

@DHMO No, it is much simpler than what you think
Remember than arcsin(y)+arccos(y)=pi/2
And $e^{\ln(\tan^{-1}x)}=\tan^{-1}(x)$
Can you do it after this ?
@DHMO

@anonymous oh god i didnt notice this
I think it's trivial then

Same with me. I deleted the problem coz I thought it will be too easy for you :)
I have some more problems...if you are interested I can give you
(On definite integration)
Can you find the reduction formula for this $I_n$^ ?
@DHMO

4:49 PM
what is ln^n x?

log(x) raised to the power n
Integration by reduction formula in integral calculus is a technique of integration, in the form of a recurrence relation. It is used when an expression containing an integer parameter, usually in the form of powers of elementary functions, or products of transcendental functions and polynomials of arbitrary degree, can't be integrated directly. But using other methods of integration a reduction formula can be set up to obtain the integral of the same or similar expression with a lower integer parameter, progressively simplifying the integral until it can be evaluated. This method of integration...

simple integration by part
bye

yes, okay bye :)

So basically, no choice if the sets in the collection has nontrivial intersections

AC for pairwise disjoint families of sets is equivalent to AC over ZF

5:01 PM
ok

5:14 PM
AC proofs are often nonconstructive, is it because the choice function is hard to specify explicitly in general?

If you can write it explicitely then you don't need AC to prove that this family of sets admits a choice function

I see

@Secret if $F$ is your family of sets you can take $F'=\{A\times\{A\},A\in F\}$ as a new disjoint family, use that version of AC to get a choice function and then construct one on $F$ using the one on $F'$
(While AC$\implies$ AC for pairwise disjoint families is obvious)

yeah munkres use similar ways to define something similar to the set $F'$ by using order pairs of one of the set in the collection and its elements in order to "partition" each element in the sets in the collection in terms of which set they belong, even if there are two sets that are not disjoint
I am not used to thinking in that path of logic though probably because my thinking level is too focused on the elements in each set in the collection, and thus don't realise we can group them up by using distinct ordered pairs

5:30 PM
@DanielFischer Hi, If we take $\Bbb{R}$ with the usual topology then $\{x_n, n\ge 1\}\cup \{l\}$ where $x_n$ converges to $l$ is compact. I was wondering if the same property hold for $\Bbb{R}$ with the topology generated by the intervals $[a,b)$. For exemple $\{1/n, n\ge 1\}\cup \{0\}$ is not compact. But can we prove that is never compact for any sequence ?

Hi.
Is this proof correct? texpaste.com/n/ftgmk2pt
I can copy it here, but is a bit long.

I suspect the proofs on the chain of length $\mathfrak{c}$ that we all went through last week might be actually a case we found some explicit choice function for $\mathscr{P}$(countable).
That is, whether it is the dedekind cut on the rationals or the 10-adic like construction on the naturals (to produce one of the sets of supernatural numbers) to map every real to every subset, each infinite subset in the collection seemed to be indiced uniquely by the aforementioned two constructions, thus acting as a choice function for $\mathscr{P}$(countable)

@Topologicalife I don't understand your "then", second line

@BalarkaSen Agreed on both counts.

@JeSuis there is only one 'then' and it is on the first line.
What do you not understand?
I show that $f(2^a + 2^b) = f(2^b(2^{a-b} +1)) = (-1)^b [(-1)^{a-b}+1] = (-1)^a + (-1)^b$

5:43 PM
the second equality $f(2^b(2^{a-b} +1)) = (-1)^b [(-1)^{a-b}+1]$

From the definition, it follows that $f(2^a) = (-1)^a$

yeah I agree, but why did you get the equality ? ok $f(2^{a-b}+1)=(-1)^{a-b}+1$ but are you using somethinf as $f(mn)=f(m)f(n)$ ?

@Secret you don't need AC to get a choice function on $P(\Bbb N)$ or any other family of well ordered sets, just pick the minimum from each

Hi

but the rationals are not well ordered as there are subsets of them that decreases indefinitely?

5:49 PM
Is $w = e^{y ln(z) }$ equivalent to $f(x,y,w) = e^{ y ln(z) } - w$ ?

? @Maks

Or do you mean the powerset of Q is well ordered?

Every set in the powerset of N is well ordered

@JeSuis I'm practicing partial derivatives
All the exercises have f(x,y) = ... or f(x,y,z) = ...
And I have two which say differentiate w = ...
How am I supposed to differentiate $w = e^{y ln(z)}$ ?

@Maks You want to differentiate as the function of which variables ?

5:54 PM
y,z and I guess w
But I dont know, I know it has 3 variables

so you get a function from $\Bbb{R}^3$ to $\Bbb{R}$

That's what I did
On top, with f(x,y,w)

No wait, there are uncountably many sets with indefinitely decreasing sequences, and they are of order type $\omega$ in the rationals, thus P(Q) cannot be well ordered in the standard ordering

so what is the problem ? Just write the derivative as matrix ?

@JeSuis yes, cause it holds.
Just skip that step, I still have to prove it, but it holds.

6:08 PM
I was just doing some basic number theory questions and I can't quickly see how to prove that for every prime number p >3 it holds that 24 | p^2 - 1. How does one prove that again?

@Helios Every prime number p>3 is of the form $6n+1$ or $6n-1$. Use it.

Ah yep! Thank! :)
*Thanks

Welcome :)

6:47 PM
Fun fact: $\int_0^\pi\frac{x^n(\pi-x)^n}{n!}\sin(x)\operatorname d\!x$ is in $\Bbb Z_n[\pi]$
(meaning, it's of the form $a_0+a_1\pi+\dotsb+a_n\pi^n$ for integers $a_i$.)

@PVAL I don't know.

It's bounded below by $0$ and above by $\frac{{\rm constant}^n}{n!}$.
That's enough to prove that $\pi$ is irrational, after not too much further work.
(I think ${\rm constant}=\pi/4$, actually)
(I mean, it's strictly bounded below by $0$. It's positive.)

7:02 PM
You could easily fit Niven's proof into an exercise at the end of a textbook chapter.

Hey. I need help with a cardinality proof.
0

If $A$ is finite with $|A|=n \geq 1$ and $x \in A$, I need to prove that $A - \{x\}$ is finite with $|A-\{x\}| = n-1$, where $|\cdot|$ is the cardinality. I know that there are proofs for $|A-\{x\}| = n-1$ which rely on the result $A = (A-\{x\})\cup \{x\}$, but I was wondering if there was a wa...

I don't fully understand your restrictions, if you have a bijection $f: \{1,..,n\}\to A$ and $f^{-1}(x)=i$, let $\tau: \{1,..,n\}\to\{1,..,n\}$ be the map that swaps $i$ and $n$, then the inclusion $\{1,...,n-1\}\to\{1,..,n\}$ followed by $\tau$ and then $f$ is an injection into $A$ as a composition of injections, then you can verify that any $y\in A$, $y\neq x$ has a preimage that lies in $\{1,..,n-1\}$ under these maps

7:18 PM
@PaulPlummer You just internalize it eventually. Eg it's not inherently obvious that $\alpha \wedge d\alpha = 0$ means integrable, so you do the computation, but after that the intuition about why $\alpha \wedge d\alpha \neq 0$ pointwise means "completely non-integrable" makes more sense.

I was asked to prove that if p_1, ..., p_t are different primes then these are linear independent given that the coefficients are rational.
Excuse me that message got sent accidentally, It was supposed to be longer

I was asked to prove that if p_1, ..., p_t are different primes then these are linear independent given that the coefficients are rational. Now, I know that if for every x in Q, there exists a sequence of primes n_p such that
x= sign(x) \product p^{n_p}. I know I can use this here, yet I am not sure how to start the proof.

@MikeMiller @BalarkaSen I will probably be participating in a seminar going through Milnor's book on Morse theory next semester. I may have to choose what part to present on tomorrow. What would you recommend?

I dunno.
The really cool thing in that book is the application to loop spaces.

Is that in part IV?

I dunno.

7:33 PM
So how do you know it's in there? :P

@s.harp were you talking to me?

yea

@s.harp I am so confused by what Omnomnom is saying.
I don't know what explicit bijection to pick to map $A$ to $\mathbb{N}_{n}$. Apparently I'm supposed to explicitly define one.
There is nothing like this in my notes, we did nothing like this in class, and I'm so incredibly confused.

What does it mean for a set $A$ to have cardinality $n$?

It means that you can find a bijection between $A$ and the first $n$ natural numbers.

7:39 PM
strictly speaking that there exists such a bijection
So if $|A|=n$ there exists a bijection $f: A\to \Bbb N_n$, and you can work with that

Well, we're told that $A$ is finite and $|A|=n \geq 1$, and we're told that that's what cardinaoty means, so I don't see that we don't know that there is one.
Yes, I know, but he's making it sound like I need to come up with some explicit function! And I don't know how to do that.
If I know that there exists $f:A\to \mathbb{N}_{n}$, how do I know that there exists either of those other two bijections he mentions, and how can I even prove that they are bijections??

You don't need to come up with an explicit function, because you do not know what $A$ looks like, $A$ could be $\{\text{apples},\text{bananas},\text{monkey}\}$

Ok, so the first bijection he mentions is $g: \Bbb N_n -\{f(x)\} \to \Bbb N_{n-1}$
Consider the map $\Bbb N_{n}\to \Bbb N_{n}$ that switches $n$ with $f(x)$

@s.harp $\mathbb{N}_{n} \to \mathbb{N}_{n}$ just maps the first n integers to the first n integers. It doesn't "switch" anything.

7:44 PM
Call this map $\tau$, if you restrict $\tau$ to $\Bbb N_n -\{f(x)\}$ you find it is a bijection onto $\{1,..,n-1\}$

How do I prove that though?

$\tau(k)=\begin{cases}n & k= f(x)\\ f(x) & k=n \\ k&\text{else}\end{cases}$

@Danu Because I read the book but don't remember what the parts are.

@s.harp why didn' you just say so?

Thats what I meant with $\tau$ switches $n$ and $f(x)$

7:46 PM
@MikeMiller OK. Thanks anyways :)

Can you explain how that map works with specific numbers?

Well, it depends specifically on what $f(x)$ is and what $n$ is
For example if you have $n=10$ and $f(x)=7$, $\tau(1)=1,..,\tau(6)=6, \tau(7)=10,\tau(8)=8,\tau(9)=9,\tau(10)=7$

Oooh.

@Danu: There are all sorts of good things in there for you. You could do the Lefschetz Theorem. You could do section 4 with symmetric spaces and Bott periodicity. Plus Jacobi fields and relations between topology and curvature in section 3.

So now I'm trying to figure out how all of this fits back in terms of A and $\mathbb{N}_{n}$

7:53 PM
If $|A|=n$ there exists a bijection from $A$ to $\Bbb N_n$. Let $f$ be such a bijection, let $\tau: \Bbb N_n\to \Bbb N_n$ be the bijection that swaps $n$ with $f(x)$. If you denote the inclusion $I:\Bbb N_{n-1}\to\Bbb N_n$, then the map
$$f^{-1}\circ \tau\circ I: \Bbb N_{n-1}\to A-\{f(x)\}$$
is well defined and a bijection

@s.harp what is the inclusion $I$?

$I(k)=k$

So, it's the identity

so $I:\{1,...,n-1\}\to\{1,..,n\}$
no because the codomain is not the same as the domain

gotcha
I've never heard that terminology before

7:54 PM
what terminology?

inclusion

If you have a set $X$ and a subset $Y\subset X$ there is an "obvious" map from $Y\to X$ that sends every element to itself, this is called the inclusion

$I$ is not a bijection, though.

No, it is an injection

So, the composition of an injection and a bijection is a bijection?

7:58 PM
One needs to verify that the map up there is a surjection
No, it isn't in general. But for these specific maps it will be the case

Okay

The composition of injections is always an injection, so the map up there is an injection


text:
# Are there "small" machines which can efficiently match regular expressions?

It's well-known that a regular expression can be recognized by a nondeterministic finite automaton of size proportional to the regular expression, or by a deterministic FA which is potentially exponentially larger. Furthermore, given a string $s$ and a regular expression $r$, the NFA can test membership in time proportional to $|s| \cdot |r|$, and the DFA can test membership in time proportional to $|s|$. The slowdown for the NFA arises from the fact that essentially we need to track the sets of possible states the automaton could be in, and the exponentially blowup for the DFA arises from the fact that its states are elements of the powerset of the states of the NFA.

Is it possible to efficiently (ie, in time better than $O(|r| \cdot |s|)$, and space better than $O(2^{|r|})$) recognize regular expressions, if we allow using more powerful machines than finite automata? (For example, are there succinctness gains to recognizing regular languages with pushdown automata, or counter machines?)

• When you say that the "NFA can test membership in time proportional to $|s|\cdot|r|$" you mean that a (deterministic) RAM machine that simulates the NFA in the obvious way takes so much time? Or is there some other way to define the "run time of an NFA" that does not refer to another computational model? (Apart from the sensible but not very useful definition that says that the runtime of any NFA for the string $s$ is $|s|$.) Sep 10 '10 at 11:57
• Yes, that's the right interpretation of my question. Sep 10 '10 at 12:04
• Then it seems to me more natural to simply ask this: Is there an algorithm (on a RAM machine) that decides if a string $s$ is in the language defined by the regular expression $r$ that works in $o(|s|\cdot|r|)$ time and $o(2^{|r|})$ space? (Especially if you define the runtime of a pushdown automata also in terms of a RAM machine.) Sep 10 '10 at 13:01
• I don't understand the problem exactly. Is the input a string s and a regular expression r, and the problem is to decide whether s is in the language defined by the regular expression r? Sep 12 '10 at 22:55
• @Robin: yes, that's it. I would like to know if you can match regular expressions more efficiently than finite automata can by using more computational power, or if extra features (e.g. stack, RAM) simply don't help. Sep 13 '10 at 8:01

It's easy enough to trade off time for space, as follows.

Convert the regular expression to an NFA — for concreteness in comparing algorithms, we'll assume that $r$ is the number of NFA states, so that your $O(rs)$ time bound for directly simulating the NFA is valid and your $O(2^r)$ space bound for running the converted DFA are also valid whenever you're working in a RAM that can address that much memory.

Now, partition the states of the NFA (arbitrarily) into $k$ subsets $S_i$ of at most $\lceil r/k\rceil$ states each. Within each subset $S_i$, we can index subsets $A_i$ of $S_i$ by numbers from $0$ to $2^{\lceil r/k\rceil}-1$.

Build a table $T[i,j,c,A_i]$ where $i$ and $j$ are in the range from 0 to $k-1$, $c$ is an input symbol, and $A_i$ is (the numerical index of) a subset of $S_i$. The value stored in the table is (the numerical index of) a subset of $S_j$: a state $y$ is in $T[i,j,c,A_i]$ if and only if $y$ belongs to $S_j$ and there is a state in $A_i$ that transitions to $y$ on input symbol $c$.

To simulate the NFA, maintain $k$ indices, one for each $S_i$, specifying the subset $A_i$ of the states in $S_i$ that can be reached by some prefix of the input. For each input symbol $c$, use the tables to look up, for each pair $i,j$, the set of states in $S_j$ that can be reached from a state in $A_i$ by a transition on $c$, and then use a bitwise binary or operation on the numerical indices of these sets of states to combine them into a single subset of states of $S_j$. So, each step of the simulation takes time $O(k^2)$, and the total time for the simulation is $O(sk^2)$.

The space required is the space for all the tables, which is $O(k^2 2^{r/k})$. The time and space analysis is valid on any RAM that can address that much memory and that can do binary operations on words that are large enough to address that much memory.

The time-space tradeoff you get from this doesn't perfectly match the NFA simulation, because of the quadratic dependence on $k$. But then, I'm skeptical that $O(rs)$ is the right time bound for the NFA simulation: how do you simulate a single step of the NFA faster than looking at all of the (possibly quadratically many) transitions allowed from a currently active state to another state? Shouldn't it be $O(r^2 s)$?

In any case by letting $k$ vary you can get time bounds on a continuum between the DFA and NFA bounds, with less space than the DFA.

• I think your correction is correct, and your answer does answer my asked question. However, the question I wanted to ask is how much additional computational power helps. (Eg, with a counter you can match a string $a^k$ in O(1) space.) If you don't mind, I'll leave the question open for a little while longer to see if anyone knows the answer to that.... Sep 14 '10 at 10:33
• @Neel: If David's solution is the best a RAM machine can do, then stacks, counters, etc. won't help. (But, of course, he only gave upper bounds, not lower bounds.) Sep 14 '10 at 15:18
• As far as I can tell, my solution does use "additional power": it is based on table lookups and integer indices, something that is not available in the DFA or NFA models. So I don't really understand how it's not answering that part of the question. Sep 15 '10 at 20:03
• Here is an alternative way to parametrize this. Suppose we are on a RAM machine with word width $w$, where $w \ge \lg r$. Then the NFA simulation takes $O(s r^2)$ time and $O(r/w)$ space. The DFA simulation isn't possible if $r \ge w$ (not enough space available). The construction in this answer sets $k \approx \lceil r/w \rceil$ and takes $O(sr^2/w^2)$ time and uses all the space available (i.e., something in the vicinity of $2^w$ space). It is basically exploiting the bit-parallelism available in a RAM machine to do the NFA simulation faster.
– D.W.
Apr 20 '17 at 20:19

This is not an answer, but too long for a comment. I'm trying to explain why the question, as posed, may be hard to understand.

There are two ways to define computational complexity for a device X.

The first and most natural way is intrinsic. One needs to say how the device X uses the input, so that we may later look at how the size n of the input affects the run time of the device. One also needs to say what counts as an operation (or step). Then we simply let the device run on the input and count operations.

The second is extrinsic. We define computational complexity for another device Y and then we program Y to act as a simulator for X. Since there may be multiple ways for Y to simulate X, we need to add that we are supposed to use the best one. Let me say the same with other words: We say that X takes $O(f(n))$ time on an input of size n if there exists a simulator of X implemented on machine Y that takes $f(n)$ time.

For example, an intrinsic definition for NFA says that it takes n steps to process a string of length n; an extrinsic definition that uses a RAM machine as device Y says that the best known upper bound is probably what David Eppstein answered. (Otherwise it would be strange that (1) the best practical implementation pointed in the other answer does not use the better alternative and (2) no one here indicated a better alternative.) Note also that strictly speaking your device X is the regular expression, but since the NFA has the same size it is safe to take it as being the device X you are looking at.

Now, when you use the second kind of definition it makes little sense to ask how restricting the features of device X affects the running time. It does however make sense to ask how restricting the features of device Y affects the running time. Obviously, allowing more powerful machines Y might allow us to simulate X faster. So, if we assume one of the most powerful machines that could be implemented (this rules out nondeterministic machines, for example) and come up with a lower bound $\Omega(f(n))$, then we know that no less powerful machine could do better.

So, in a sense, the best answer you could hope for is a proof in something like the cell probe model that simulating an NFA needs a certain amount of time. (Note that if you take into account the conversion NFA to DFA you need time to write down the big DFA, so memory isn't the only issue there.)

Even if you believe that there's nothing new or old to be learned about regular expression matching, check out one of the most beautiful papers I've come across for a long time: A play on regular expressions by S Fischer, F Huch, and T Wilke, ICFP 2010.

(MMT Chakravarty deserves the credit for recommending this paper.)

EDIT: The reason why this paper is relevant is that it describes a new technique (based on Glushkov's from the 60ies) that avoids constructing the full NFA (let alone the DFA) corresponding to the RE. What is done instead resembles running a marking algorithm similar to the well-known one for deciding acceptance of a word by an NFA on the syntax tree of the RE. Performance measurements suggest that this is competitive, even with google's recently published re2 library.

• A nice paper to read!! Feb 6 '11 at 10:02

Take a look at this article by Russ Cox. It describes an NFA-based approach, first employed by Ken Thompson, by which an input string s can be matched to a regular expression r in time O(|s|.c) and space O(|r|.d), where c and d are upper-bound constants. The article also details a C implementation of the technique.

• I'm not convinced that's an accurate description of the article. It appears to be building the DFA from the NFA on an as-needed basis and caching the results. But the cache size could be exponential in r. Sep 13 '10 at 21:17


text:
# Opacity (optics)

Opacity is the measure of impenetrability to electromagnetic or other kinds of radiation, especially visible light. In radiative transfer, it describes the absorption and scattering of radiation in a medium, such as a plasma, dielectric, shielding material, glass, etc. An opaque object is neither transparent (allowing all light to pass through) nor translucent (allowing some light to pass through). When light strikes an interface between two substances, in general some may be reflected, some absorbed, some scattered, and the rest transmitted (also see refraction). An opaque substance transmits very little light, and therefore reflects, scatters, or absorbs most of it. Both mirrors and carbon black are opaque. Opacity depends on the frequency of the light being considered. For instance, some kinds of glass, while transparent in the visual range, are largely opaque to ultraviolet light. More extreme frequency-dependence is visible in the absorption lines of cold gases. In general, a material tends to emit different colors in the same proportions as it absorbs it.

## Definition

The opacity ${\displaystyle \kappa _{\nu }}$ gives the rate of absorption (or extinction), which is the fraction of the intensity ${\displaystyle I_{\nu }}$, of the radiation that is absorbed or scattered per unit distance along a ray of propagation:

${\displaystyle {\partial I_{\nu } \over \partial x}=-I_{\nu }\kappa _{\nu }}$.

For a given medium it has a numerical value that may range between 0 and infinity. It is also called the absorption coefficient (see also extinction coefficient). In general ${\displaystyle \kappa _{\nu }}$ depends on the frequency ${\displaystyle \nu }$ of the radiation, as well as the density, temperature, and composition of the medium. The mean free path is the distance a photon travels in the medium before absorption or scattering is defined as ${\displaystyle 1/(\kappa _{\nu }\rho )}$, where ${\displaystyle \rho }$ is the density of the material. The notation ${\displaystyle \kappa _{\lambda }}$ is the opacity described as a function of wavelength ${\displaystyle \lambda }$. While many materials are very opaque (steel in visible light having near-infinite opacity), and others very transparent (air in visible light having near-zero opacity), so that opacity often seems to be a boolean property, many others (such as water) have intermediate opacity.

In astronomy and planetary imaging fields, tau, the optical depth, defines the opacity: zero indicates transparent and higher numbers indicate more and more opaque in an inverse exponential fashion, for example a tau of 1 indicates 36 percent of the light passes (e-1 = 0.36), and a Tau of 5 indicates less than 1 percent passes (e -5 = 0.0067).[1]

In astrophysics and plasma physics "opacity", or absorption coefficient, ${\displaystyle \kappa _{\nu }}$ is defined so that ${\displaystyle \kappa _{\nu }\rho I_{\nu }d\nu d\Omega }$ gives the corresponding energy absorbed per unit volume per unit time from a beam of given intensity ${\displaystyle I_{\nu }}$ in a medium of density ${\displaystyle \rho }$ (thus ${\displaystyle \kappa _{\nu }}$ is measured in ${\displaystyle {\rm {cm}}^{2}{\rm {g}}^{-1}}$). The optical depth ${\displaystyle \tau _{\nu }}$ along the propagation direction is then ${\displaystyle d\tau _{\nu }=\kappa _{\nu }\rho ds}$, where ${\displaystyle ds}$ is the distance along this direction. It is customary to define the average opacity, calculated using a certain weighting scheme. Planck opacity uses normalized Planck black body radiation energy density distribution as the weighting function, and averages ${\displaystyle \kappa _{\nu }}$ directly. Rosseland opacity, on the other hand, uses a temperature derivative of Planck distribution (normalized) as the weighting function, and averages ${\displaystyle \kappa _{\nu }^{-1}}$,

${\displaystyle {\frac {1}{\kappa }}={\frac {\int _{0}^{\infty }\kappa _{\nu }^{-1}u(\nu ,T)d\nu }{\int _{0}^{\infty }u(\nu ,T)d\nu }}}$.

The photon mean free path is ${\displaystyle \lambda _{\nu }=(\kappa _{\nu }\rho )^{-1}}$. The Rosseland opacity is derived in the diffusion approximation to the radiative transport equation. It is valid whenever the radiation field is isotropic over distances comparable to or less than a radiation mean free path, such as in local thermal equilibrium. In practice, the mean opacity for Thomson electron scattering is ${\displaystyle \kappa _{\rm {es}}=0.40{\rm {cm}}^{2}{\rm {g}}^{-1}}$ and for nonrelativistic thermal bremsstrahlung, or free-free transitions, it is ${\displaystyle \kappa _{\rm {ff}}(\rho ,T)=0.64\times 10^{23}(\rho [{\rm {g}}~{\rm {cm}}^{-3}])(T[{\rm {K}}])^{-7/2}{\rm {cm}}^{2}{\rm {g}}^{-1}}$.[2] The Rosseland mean absorption coefficient including both scattering and absorption (also called the extinction coefficient) is

${\displaystyle {\frac {1}{\kappa }}={\frac {\int _{0}^{\infty }(\kappa _{\nu ,{\rm {es}}}+\kappa _{\nu ,{\rm {ff}}})^{-1}u(\nu ,T)d\nu }{\int _{0}^{\infty }u(\nu ,T)d\nu }}}$.[3]

## Applications

In astrophysics, the variations in opacity within a star are important to the understanding of radiation transfer in stellar atmospheres and the spectra we observe.

In several types of chemical analysis, the concentration of a sample in a transparent medium (typically air or water) is determined via measuring its opacity or absorbance. In spectrophotometry the device identifies the sample's constituent substances from their absorbances.

Opacity is also used as a measurement of particulate emissions.

## Extinction coefficient

The extinction coefficient for a particular substance is a measure of how well it scatters and absorbs electromagnetic radiation (EM waves). If the EM wave can pass through very easily, the material has a low extinction coefficient. Conversely, if the radiation hardly penetrates the material, but rather quickly becomes "extinct" within it, the extinction coefficient is high.

A material can behave differently for different wavelengths of electromagnetic radiation. Glass is transparent to visible light, but many types of glass are opaque to ultra-violet wavelengths. In general, the extinction coefficient for any material is a function of the incident wavelength. The extinction coefficient is used widely in ultraviolet-visible spectroscopy.

## Physical definitions

The parameter used to describe the interaction of electromagnetic radiation with matter is the complex index of refraction, ñ, which is a combination of a real part and an imaginary part:

${\displaystyle {\tilde {n}}=n-ik.}$

Here, n is also called the index of refraction, which sometimes leads to confusion. k is the extinction coefficient, which represents the damping of an EM wave inside the material. Both depend on the wavelength.

An EM wave travels in the material with velocity ${\displaystyle v}$ and angular frequency ${\displaystyle \omega }$. The time-varying electric field of the wave is described by

${\displaystyle \mathbf {E} (z,t)=\mathbf {E} _{0}e^{i\omega (t-{\frac {z}{v}})},}$

where only the real part of ${\displaystyle \mathbf {E} }$ has physical significance. For simplicity, the radiation is assumed to be a plane wave, and its direction of propagation is denoted ${\displaystyle z}$.

The index of refraction is defined to be the ratio of the speed of light in a vacuum to the speed of the EM wave in the medium:

${\displaystyle {\tilde {n}}={\frac {c}{v}}.}$

Substituting for ${\displaystyle {\tilde {n}}}$ in the expression above gives

${\displaystyle {\frac {1}{v}}={\frac {n}{c}}-i{\frac {k}{c}}.}$

Substituting this in the expression for the EM wave's electric field gives

${\displaystyle \mathbf {E} (z,t)=\mathbf {E} _{0}e^{i\omega (t-z({\frac {n}{c}}))}e^{-({\frac {k\omega }{c}})z}.}$

This expression describes a propagating electromagnetic wave with an exponentially damped amplitude due to the ${\displaystyle k}$ term. This term causes the EM wave to "die out" as it travels further into the material. The intensity of the wave, which corresponds to the energy it carries with it, is simply the square of the magnitude of the wave's electric field. The intensity of the wave is therefore

${\displaystyle I(z)=I_{0}e^{-{\frac {2\omega k}{c}}z}.}$

A law called the Beer-Lambert law states that in any medium that is absorbing light, the decrease in intensity ${\displaystyle I}$ per unit length ${\displaystyle z}$ is proportional to the instantaneous value of ${\displaystyle I}$. In mathematical form this is

${\displaystyle {\frac {dI\left(z\right)}{dz}}={-\alpha I\left(z\right)},}$

where ${\displaystyle \alpha }$ is the absorption coefficient of the material for that wavelength of EM radiation. This equation has the solution

${\displaystyle {I\left(z\right)}={I_{0}e^{-\alpha z}}}$ ,

where ${\displaystyle I_{0}}$ is the intensity of the electromagnetic radiation at the surface of the absorbing medium. Comparing the two expressions for intensity obtained above gives

${\displaystyle \alpha ={\frac {2\omega k}{c}}.}$

Since ${\displaystyle c}$ here denotes the speed of the EM wave in vacuum,

${\displaystyle c={\frac {\omega }{2\pi }}\lambda }$.

Substituting this in the expression above and rearranging shows that the extinction coefficient and the absorption coefficient are related by

${\displaystyle k={\frac {\lambda }{4\pi }}\alpha }$ ,

where λ is the vacuum wavelength (not the wavelength of the EM wave in the material).


text:
Home > Error Bars > Standard Error Bars Overlap

# Standard Error Bars Overlap

## Contents

Even though the error bars do not overlap in experiment 1, the difference is not statistically significant (P=0.09 by unpaired t test). Why does Deep Space Nine spin? What would you call "razor blade"? This is also true when you compare proportions with a chi-square test. my review here

Treatment A showed a significant benefit over placebo, while treatment B had no statistically significant benefit. and 95% CI error bars for common P values. On average, CI% of intervals are expected to span the mean—about 19 in 20 times for 95% CI. (a) Means and 95% CIs of 20 samples (n = 10) drawn from Therefore you can conclude that the P value for the comparison must be less than 0.05 and that the difference must be statistically significant (using the traditional 0.05 cutoff).

## How To Interpret Error Bars

Instead of independently comparing each drug to the placebo, we should compare them against each other. Only one figure2 used bars based on the 95% CI. Here is a simpler rule: If two SEM error bars do overlap, and the sample sizes are equal or nearly equal, then you know that the P value is (much) greater For those of us who would like to go one step further and play with our Minitab, could I safely assume that the Cognitive daily team is open to share their

By standard error margin, I am referring to ($SE_\bar x = SD/\sqrt N$). Although these three data pairs and their error bars are visually identical, each represents a different data scenario with a different P value. This rule works for both paired and unpaired t tests. What Do Small Error Bars Mean They did the opposite with the SE error bars, which they put too close together yielding placements corresponding to p = 0.109.

The former is a statement of frequentist probability representing the results of repeated sampling, and the latter is a statement of Bayesian probability based on a degree of belief. Large Error Bars In each experiment, control and treatment measurements were obtained. Then you have only one variable: difference scores. http://www.graphpad.com/support/faqid/1362/ Please upload a file larger than 100x100 pixels We are experiencing some problems, please try again.

And someone in a talk recently at 99% confidence error bars, which rather changed the interpretation of some of his data. How To Calculate Error Bars He commented that "the large overlapping error bars of the control and drug groups makes me unconvinced that the data is significant". That's splitting hairs, and might be relevant if you actually need a precise answer. I was quite confident that they wouldn't succeed.

## Large Error Bars

This figure depicts two experiments, A and B. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed How To Interpret Error Bars An alternative is to select a value of CI% for which the bars touch at a desired P value (e.g., 83% CI bars touch at P = 0.05). Sem Error Bars It is not correct to say that there is a 5% chance the true mean is outside of the error bars we generated from this one sample.

For example, when n = 10 and s.e.m. http://askmetips.com/error-bars/standard-error-bars-powerpoint.php Only a small portion of them could demonstrate accurate knowledge of how error bars relate to significance. bars only indirectly support visual assessment of differences in values, if you use them, be ready to help your reader understand that the s.d. Confidence Intervals First off, we need to know the correct answer to the problem, which requires a bit of explanation. What Are Error Bars In Excel

Sample 1: Mean=0, SD=1, n=10 Sample 2: Mean=3, SD=10, n=100 The confidence intervals do not overlap, but the P value is high (0.35). Error Bars Standard Deviation Or Standard Error I just couldn't logically figure out how the information I was working with could possibly answer that question… #22 Xan Gregg October 1, 2008 Thanks for rerunning a great article -- how would you report the data?

## In this case, $$p< 0.05$$.

If the samples were larger with the same means and same standard deviations, the P value would be much smaller. J Cell Biol (2007) vol. 177 (1) pp. 7-11 Lanzante. is compared to the 95% CI in Figure 2b. How To Draw Error Bars When error bars don't apply The final third of the group was given a "trick" question.

I may post a question later. –Deep North Aug 5 '15 at 1:44 To give an example : suppose I have 10 adults and I want to measure their In many disciplines, standard error is much more commonly used. bars just touch, P = 0.17 (Fig. 1a). useful reference From the pre-drug blood sugar data, we see a wide variation in the scores from the 10 ppl and thus the SE of the control data is large.

If 95% CI error bars do not overlap, you can be sure the difference is statistically significant (P < 0.05). The 95% confidence interval in experiment B includes zero, so the P value must be greater than 0.05, and you can conclude that the difference is not statistically significant.


text: Figure 2: Cholesterol depletion reduces the amplitude of RA currents in sensory neurons. | Nature Communications


text:
## Introduction

Aphasia is the most common speech and language disorder that affects the bilingual adult population seeking language rehabilitation after brain injury (e.g., stroke). Bilinguals with aphasia (BWA) frequently present with varying degrees and patterns of impairment and recovery in their two languages1,2, which reflects the complex interplay between their unique prestroke bilingual experience and the effects of neurological damage to their bilingual language processing system. While there is evidence that treatment in either language can induce recovery3, most individuals show therapy effects in the treated language, while others may also show varying degrees of cross-language generalization in the untreated language4,5. These valuable findings, however, result from single case reports and studies with small heterogeneous samples, making it difficult to predict reliably the extent to which treatment gains will be observed across languages in BWA. Hence, identifying the optimal language for treatment, i.e., the one that leads to maximum therapy gains across both languages, remains an essential open question for bilingual aphasia rehabilitation research6, and one that has vast clinical service delivery implications. Importantly, the large individual variation in bilingual experience and post-stroke impairment in BWA poses two critical methodological challenges for behavioral studies: (i) how to include enough individuals with similar linguistic backgrounds and deficits so that factors that influence rehabilitation outcomes can be examined systematically, and (ii) how to generalize the findings to broader populations of BWA.

Because large-scale behavioral clinical studies are often unfeasible, computational modeling can provide an alternative method to predict the optimal language of treatment by simulating therapy outcomes in both languages, while accounting for both individual history of bilingualism and impairment in each language. Computational modeling can help characterize crucial mechanisms and relevant factors that underlie language acquisition, representation and processing7,8, and disentangle the role of variables that often become confounded in behavioral research9. Such modeling has been used to examine multiple aspects of language learning and processing in healthy bilinguals10,11,12,13,14,15,16,17 as well as a wide range of language processing deficits in aphasia18,19,20,21 and semantic dementia22,23,24. Notably, computational models can help simulate lesion effects by altering various aspects of the model’s cognitive architecture and processes and subsequently comparing the model’s performance with individual cases of impairment25,26, and have the potential to simulate recovery by retraining its computations affected by the simulated lesion.

Our prior work with the DISLEX computational model27 examined the feasibility of this approach and demonstrated preliminary support for accurate simulations of both (i) lexical access impairments in the native (L1) and the second language (L2) in Spanish-English BWA28 and (ii) response to therapy focused on word retrieval deficits regardless of the treatment language29. These previous simulations set the foundation for the current work, which aims to expand our computational modeling approach and validate its capacity to predict the optimal treatment language, leading to maximum therapy gains in both languages in BWA with varying prestroke bilingual backgrounds and varying L1 and L2 impairment profiles30.

As a first step towards this overarching goal, we developed BiLex31, a neural network model based on Self-Organizing Maps (SOMs)32, that accurately simulates L1 and L2 lexical access in picture naming in Spanish-English healthy bilinguals, while accounting for individual differences in their bilingual language learning history. Importantly, a cross-validation procedure demonstrated that the simulation capacity of BiLex generalized to predict L1 and L2 lexical access performance in other participants excluded from model training, thus validating its use to simulate prestroke naming ability in Spanish-English BWA.

The present study reports on the next step of this approach: the development and cross-validation of BiLex as a model that captures treatment outcomes in the treated and the untreated language in BWA while accounting for factors known to determine post-stroke language impairment and recovery33. These factors include demographics (i.e., age), prestroke bilingual background (i.e., L2 age of acquisition, prestroke lifetime language exposure and use of each language), poststroke language use, and language impairment (i.e., poststroke semantic processing and picture naming performance). To this aim, we employed a retrospective dataset of Spanish-English BWA who had received therapy in one or the other language, and conducted three experimental simulations: (i) modelling prestroke L1 and L2 naming ability for each BWA (ii), modelling their L1 and L2 poststroke impairment through damage to the semantic and phonetic subsystems of the neural network model, and (iii) retraining the neural network model to simulate the effects of treatment in either language (e.g.: English) in both the treated (e.g.: English) and the untreated language (e.g.: Spanish).

## Methods

### Model architecture

Following theoretical accounts of the bilingual mental lexicon34, the BiLex model is composed of a single shared semantic system and separate components for storing phonetic representations in the two languages. Each of the three components is implemented as a SOM32, and all three maps are connected via bidirectional associative connections that vary in strength depending on relative language dominance (Fig. 1).

BiLex is trained using feature-based semantic representations for 638 concrete nouns, along with their phonetic representations in English and Spanish. A standard SOM algorithm is used to train two maps at a time (e.g. training semantic and Spanish phonetic maps corresponds to exposure to a word in Spanish). Associative connections between the semantic and trained phonetic map are adjusted at the same time, increasing the connection strength between co-activated neurons using Hebbian learning. Additionally, activation flows from the semantic to the untrained phonetic map through associative connections, and is then used to train connections between phonetic maps. By varying the proportion of English vs. Spanish words trained over time, the model can approximate individual bilingual background profiles, capturing how lexical access in both languages varies with past language exposure31. The present study used the same modeling procedure to create a prestroke BiLex model for each BWA based on the patient’s past bilingual exposure, serving as the basis for individual simulations of stroke damage and treatment effects.

### Participants

A retrospective dataset of 13 Spanish-English bilinguals with post-stroke aphasia (eight females, mean age = $$56.31 \pm 17.72$$ years; mean time post-onset = $$3.61 \pm 4.91$$ years) was employed to optimize and validate BiLex treatment simulations. All were native Spanish speakers, reported normal or corrected-to-normal vision and hearing, and no history of psychiatric or neurological illness other than stroke (Table 1). All research was performed following relevant guidelines approved by the Boston University Charles River Campus Institutional Review Board, and all patients provided informed consent. All patients completed a Language Use Questionnaire (LUQ)36, providing detailed information on their individual history of language exposure, as well as comprehensive language testing37, including the Boston Naming Test (BNT)38,39 to assess picture naming ability in each language, and the Pyramids and Palm Trees test (PAPT)40 to evaluate language-independent semantic knowledge.

### Language treatment

Patients received a semantic feature analysis-based treatment for word-retrieval deficits41 in either English or Spanish (7–18 treatment sessions). Therapy involved training different types of semantic features (e.g.: “is sweet”, “can fly”) for target words, as well as training word retrieval in the target language. Naming accuracy on treatment words was tested in both languages preceding each treatment session, and treatment was discontinued when naming accuracy in the treated language either exceeded 80% or showed no significant improvement for three successive sessions. The results of naming probes before, during, and after treatment were used as target data for treatment simulations.

Patients were treated on 10–17 individually selected words that they previously failed to name in both languages. In cases where not enough such words were available, words the patient failed to name in only one language were used, leading to initial naming scores on the treatment set that were not always zero. To ensure that patients’ symptoms were stable before the start of treatment, these baseline scores were determined by averaging three to five naming probes in both languages.

### Simulating lexical access in BiLex

Lexical access in BiLex is simulated by presenting the semantic map with a semantic representation of a word (a binary vector encoding semantic features). The resulting map activation is transferred to the target phonetic map, and a word is counted as correctly named if the most highly activated phonetic unit is associated with the same input word. The naming accuracy of the model on a set of words is the proportion of words correctly named in this way.

The PAPT40 is a test of semantic processing that consists of 52 trials of word triplets. It requires selecting between two options (e.g.: a palm tree and a fir tree), the concept that is more closely related to the target (e.g.: a pyramid). For the BiLex semantic simulation, triplets included two word options (e.g.,“hood”, “pants”) that were similar (e.g.: things to wear) but differed in one defining feature (e.g.: worn on the head) shared with the target word (e.g.: “hat”) which could be used to determine the correct choice. To simulate each test trial, all three words were presented to the semantic map. The feature vectors of the winner neurons were used to determine the distinguishing feature (worn on head), and the map representation of the first word was then used to determine the correct choice. Fully trained and undamaged BiLex models scored about 96% on the simulated test, consistent with human data40.

### Simulating stroke damage and language impairment

Post-stroke models for each patient were created by training individual BiLex models up to the age of stroke onset, and then systematically lesioning (i.e., damaging) each model to match the patient’s impairment profile. Stroke-induced damage was simulated by deleting neurons along with their associative connections from the semantic and phonetic maps. Different lesion patterns for the model’s maps were evaluated (Fig. 2). In preliminary experiments, damaging a circular map area (bottom row) led to higher-quality treatment models; this type of lesion damage was therefore used in the rest of the experiments.

Increasing levels of damage were applied to the semantic map until the simulated PAPT score matched the patient’s score as closely as possible. Figure 3a illustrates this process for a specific patient model (P8). Figure 3b shows how semantic damage affects the model’s naming scores in both languages. In most cases, the amount of damage that reproduced the PAPT score did not by itself explain the target naming impairment. Thus, additional damage was applied to each model’s phonetic maps until naming performance matched that patient’s in both languages (Fig. 3c).

For many patients, significant time passed between stroke onset and treatment (up to 14 years; Table 1). The lesioned models were therefore trained further after lesioning, and the fit of PAPT and naming scores was evaluated when the models matched the patient’s age at treatment.

### Treatment simulations

To simulate the effects of treatment observed in each patient, post-stroke models were retrained on a subset of 30 words, individually chosen from the entire training corpus. Treatment words for each patient model were selected randomly, but matching the patient’s average baseline probe score. The treatment simulation itself was designed to mirror the actual treatment protocol used for patients:

1. 1.

In order to replicate the semantic feature-based portion of treatment, the model’s semantic map was retrained using the 30 treatment words as inputs.

2. 2.

To simulate repeated exposure to the treatment words in the treated language, the treated-language phonetic map, the semantic map, and the associative connections between them were retrained on the set of treatment words.

3. 3.

To give the BiLex model an opportunity to recover correct word associations in the untreated language,

1. (a)

Activation from the treated-language phonetic map was transferred to the untreated map through associative connections, and was then used to retrain connections between semantic and untreated phonetic maps.

2. (b)

Activation from the semantic map was transferred to the untreated map through associative connections, and was then used to retrain connections between the two phonetic maps.

After each retraining cycle, simulated naming performance was tested in each language to measure single-session effects in both languages that could be then compared with the actual treatment effects for each patient. Additionally, to account for the effects of language exposure over the course of treatment, the model was trained between treatment sessions for the equivalent of one week.

Each component of the treatment simulation was governed by parameters adjusting the intensity of retraining for SOMs and associative connections (i.e., learning rates). Additionally, Steps 3a and 3b could be applied conditionally, i.e. (i) only for words that were correctly named in the treatment language, (ii) only for words that the lesioned model can correctly translate between languages, or (iii) for all treatment words. Overall, a set of six parameters needed to be adjusted, including four parameters encoding learning rates, and two selecting the conditions for steps 3a and 3b.

An evolutionary algorithm (EA)42 was used to find parameter settings that optimally fit the treatment response across the training set of available patients. EAs are optimization algorithms inspired by biological evolution, that maintain a population of candidate solutions to a specific problem. By successively selecting higher-quality candidates and recombining them to form the next generation, EAs are often able to find near-optimal solutions to large nonlinear optimization problems such as the present one. The population consisted of 30 parameter sets, initially chosen at random. Each candidate was used to run a treatment simulation for all patients, using the individual poststroke BiLex models as a starting point. To evaluate the fitness of a candidate C, the model’s error was computed as the mean-squared difference between simulation and patient data across both languages and all patients in the training set T:

\begin{aligned} {\text {err}}(C) = \frac{1}{|T|} \sum \limits _{i \in T} \frac{1}{n_i}\sum \limits _{j=0}^{n_i}{((E_{ij} - \hat{E}^c_{ij})^2 + (S_{ij} - \hat{S}^c_{ij})^2)}, \end{aligned}

where $$n_i$$ is the number of treatment sessions for patient i, $$E_{ij}$$ and $$S_{ij}$$ are the English and Spanish naming scores for patient i after j treatment sessions, and $$\hat{E}^c_{ij}$$ and $$\hat{S}^c_{ij}$$ are the model’s estimates for these scores, using the parameter set C.

Based on current-generation errors, high-quality models were selected, and then recombined and mutated (subjected to a small amount of random noise) to form the next generation candidates. Evolution continued in this way for 100 generations, but restarting from a new random population if no new best-fit candidate was found for 20 successive generations.

To evaluate the accuracy of predicted treatment responses, a leave-one-out cross-validation experiment was conducted, with a different patient left out of the training set T for each separate EA optimization run. Each time, the treatment models that fit the training set best were then used to predict the treatment response for the left out patient, ensuring that predictions were based on previously unseen patient data.

## Results

### Actual and simulated language impairment

Figure 4 shows real vs. simulated poststroke performance for all patients on the PAPT (N=13; $$R^2=0.956$$; $$p \ll 0.0001$$), as well as English ($$N=13$$; $$R^2=0.974$$; $$p \ll 0.0001$$) and Spanish ($$N=13$$; $$R^2=0.974$$; $$p \ll 0.0001$$) naming. These results indicate that lesioned patient models were able to match poststroke semantic impairment, as well as naming impairment in both languages reliably. In patients with semantic deficits, damage to the semantic map alone affected both semantic and naming performance, but damage to all three maps was required in most patients (10/13). Importantly, damage to the semantic map alone never led to naming impairments that were more severe than those seen in patients, suggesting that the damage model is indeed able to capture how underlying lesion damage leads to the impairment patterns seen in patients.

### Actual and simulated treatment outcomes in the treated and the untreated language

Figure 5 shows simulated responses for the best-fit treatment models, with a different patient left out in each row. The plots on the diagonal show predictions for patients that were not part of the training set. Figure 6 shows a more detailed view for a representative subset of patients on the diagonal. Each simulation was run 10 times; median predictions are shown in both figures, with shaded areas denoting the range in Fig. 6. In sum, the simulations were able to (i) capture treatment effects in the treated language over time in most cases (P1, P2, P5, P7, P8, P12) and at the end of treatment in others (P6, P9, P13); (ii) capture treatment effects in the untreated language both when the effects were large (P2, P7, P9) and when they were small (P3, P6, P13), (iii) demonstrate little effect for patients with a severe aphasia (P10, P11), and (iv) generalize these effects to previously unseen patients.

More specifically, to evaluate the quality of fit to the target data across all patients and treatment sessions, a mixed-effects model analysis was conducted, with patient treatment response in the treated language as the independent variable, predicted response and number of sessions as fixed effects, and patient as a repeated measure ($$N=157$$, 13 groups). For the treated language, the mixed model revealed significant dependence on predicted response ($$p \ll 0.0001$$), as well as the number of sessions received ($$p \ll 0.0001$$). The mixed model was superior to another using number of sessions received and baseline score as fixed effects ($$p \ll 0.0001$$), demonstrating that BiLex is able to capture treated-language effects in patients.

The same analysis was conducted for the untreated language, with one patient (P7) excluded because pre-treatment baseline probes showed consistent improvement (3-5-6 items out of 15 correctly named) in the untreated language, indicating that cross-language treatment effects could not be reliably separated from recovery unrelated to treatment. The mixed model ($$N=146$$, 12 groups) revealed that despite low cross-language patient responses overall, simulations were nevertheless predictive of actual outcomes. The mixed model was superior to one using baseline scores instead of model predictions ($$p \ll 0.0001$$). Further, predicted responses were accurate for seven patients showing low or no cross-language effect, and at least some cross-language effect was predicted in four of the remaining five cases. Thus, the results suggest that cross-language simulations may be useful in predicting whether the untreated language is likely to improve or not.

Simple regression analyses were conducted to evaluate whether simulated treatment response predicted actual patient treatment outcomes over the first 10 treatment sessions, for which there was sufficient patient data. Figure 7 shows actual versus model responses for all 13 patients. After four treatment sessions, the models predicted patient response in the treated language with significant accuracy, with $$R^2$$ values ranging between 0.54 and 0.82 (Fig. 7a). While still predictive, the models were less accurate for the untreated language (Fig. 7b, again excluding P7), generally underestimating the effects of cross-language transfer. Some possible reasons are discussed in the next section.

The best-fit discovered parameters for each of the mechanism underlying the treatment model are provided in Supplementary Table S1 online, and are further discussed in the supplement.

## Discussion

The present study employed the BiLex computational model31 to simulate language therapy effects in Spanish-English BWA. The patients’ prestroke naming ability was modeled in each language, a lesion component was implemented to imitate the effects of brain insult on the bilingual language system, and the lesioned models were retrained to simulate individual responses to language treatment provided in either language. The results indicate that BiLex can simulate therapy outcomes in BWA, achieving accurate and robust predictions of treatment effects in the treated language, while partially capturing different degrees of cross-language generalization effects in the untreated language. The cross-validation approach demonstrated that the EA is successful in optimizing training parameters for individual BiLex patient models. The resulting models predicted treatment effects accurately, and generalized to patients whose data were not used in model training. These findings highlight the potential of BiLex to capture treatment response in patients with different profiles of bilingualism and language impairment, making it possible to cope with the large inter-individual variability often reported in behavioral studies with small samples3,4,5.

The simulations of individual therapy outcomes in the treated language showed the closest approximation to actual patient performance on naming probes throughout treatment, with nearly identical simulated and actual treatment response curves for most patients (P1, P2, P5, P7, P8, P12). The models for other patients reflected final treatment outcomes, but were less accurate in predicting initial response to therapy (P6, P9, P13). In these cases, the model did not always fully capture the trajectory of change in naming ability during treatment, possibly reflecting intra-subject variability in lexical access often observed in aphasia due to post-stroke cognitive slowing and aphasia severity, word lexical properties, and lexical competition in the same language43 and across languages44. Overall, the results suggest that the BiLex model can successfully simulate language improvements in the treated language and capture central factors that modulate individual response to language therapy in BWA, including prestroke bilingual language learning history and poststroke impairment as suggested by bilingual aphasia research45.

Several patients did not show significant cross-language generalization, and these results were resonant with the corresponding computational predictions, thereby reflecting overall treatment benefits in the treated language only37,46,47. The findings in patients with significant cross-language effects are less conclusive. Simulations do predict such effects in four out of six such patients, suggesting that the involved mechanisms were at least partially captured by the model. Overall, however, the model tends to underestimate the effect. A likely reason is that the amount of available patient data used to train the EA was insufficient to fully characterize cross-language generalization. In line with prior studies showing that not all BWA show cross-language generalization effects3,4,5, only three patients in the present study showed significant cross-language therapy effects (P3, P6, P13), and three more patients showed isolated instances of improvement in the untreated language (P2, P7, P9). A second possible reason is architectural. The current model incorporated the training of cross-language associative connections between the phonetic maps of each patient model to reflect facilitation as a potential mechanism of cross-language transfer effects37. It is possible that alternative or additional mechanisms exist, including transfer through the semantic system48. Third, given the difference in magnitude and consistency between treatment effects in the treated versus the untreated language, it is possible that the evolutionary model-fitting procedure converged primarily on the much stronger signal of treated-language effects. Future research with BiLex will require larger patient datasets to improve simulations of cross-language transfer in bilingual aphasia and provide a more fine-grained characterization of the mechanisms that may account for these therapy effects.

Another important contribution of this work is the accurate simulation of the relative severity in the bilingual language system. Simulated PAPT and BNT scores strongly predicted patients’ actual language performance across different lesion approaches, capturing varying degrees of impairment in semantic processing and naming ability in each language. Moreover, by gradually adjusting the amounts of lesion damage in the semantic and phonetic maps, the model was able to capture qualitatively different profiles of (i) patients with minimal semantic impairment and predominant lexical access deficits and (ii) patients with both semantic and lexical deficits. These findings are in line with computational models that account for disruptions at different levels of word production in order to capture word retrieval deficits in monolinguals18,23,24 and bilinguals28,29, as well as behavioral evidence of both performance profiles in post-stroke aphasia49,50. The severity of language deficits has been strongly associated with early and long-term post-stroke aphasia outcomes51,52, and these effects are generally well-captured by the model. Importantly, the model’s ability to accurately capture varying degrees of severity and impairment was reflected in the absence of improvement in patients with severe language dysfunction (P10, P11). Only in two cases (P3, P4), with low but relatively stable response to treatment, the patient models predicted no treatment response. In these cases, the simulated lesions that best matched the impairments required deleting almost all neurons from either the semantic or the treated phonetic map, thus preventing any recovery in the model. Future versions of BiLex, with larger maps and vocabulary sizes, will likely make more fine-grained damage models possible.

Although the architecture of BiLex and its main training algorithm are similar to the previous DISLEX model29, BiLex incorporates several technical advances. First, BiLex uses a larger corpus of 638 words with much more detailed semantic and phonetic presentations for SOM training. Second, the current prestroke patient models are based on healthy bilingual performance on standardized language tests as well as fine-grained data on factors that determine prestroke bilingual profiles. They share the same EA-optimized training schedule, leading to simulations that can predict naming performance in healthy bilinguals across different ages and profiles of bilingualism more accurately than before31. Third, post-stroke models employ more fine-grained lesion mechanisms that distinguish semantic impairment from phonetic damage. Fourth, treatment simulation is governed by a set of training parameters optimized to match human treatment effects. These improvements relative to the prior DISLEX model enable BiLex to produce more principled and accurate simulations of impairment and treatment effects.

These advances also lead to promising avenues of future research. For instance, a version of BiLex trained on all 13 patients is currently used to make a priori predictions about the optimal treatment language for BWA in a randomized controlled trial30. In this study, the optimal treatment language is defined for each patient by comparing simulated effects in both languages when treatment is provided in one versus the other language. Experimental patients receive the model-prescribed optimal language of treatment while control patients receive therapy in the model non-prescribed language, and the goal is to validate BiLex predictions by contrasting simulated versus actual treatment outcomes in patients receiving therapy in the language defined as optimal by the model and patients receiving therapy in the language opposite to the model’s recommendation. Also, future versions of BiLex could incorporate additional parameters to account for other factors that may influence treatment outcomes in BWA, including lesion location45, deficits in cognitive control53, and patterns of language switching and mixing6,54, as well as therapy-related factors such as type of therapy, duration, and intensity52. Finally, inconsistencies in naming ability at the individual item level are common in aphasia and could play an important role in characterizing patterns of impairment and recovery. Future work with BiLex could account for within-subject fluctuations in naming performance and different types of errors at the individual patient and item level.

In conclusion, BiLex provides a useful framework to understand different sources of language deficits in BWA and to generate predictions of treatment outcomes, accounting for relevant factors that modulate treatment-induced recovery in aphasia. In the future, improved BiLex patient models could be used to inform therapy and tailor individual treatment schedules to the patient’s unique bilingual profile, deficits and communication needs.


text:
# Infinite sum/difference of ratios of products

$1 - \frac{ 3 } { 4 } + \frac{3 \times 5 } { 4 \times 8 } - \frac{ 3 \times 5 \times 7 } { 4 \times 8 \times 12 } + \frac{ 3 \times 5 \times 7 \times 9 } { 4 \times 8 \times 12 \times 16 } - \cdots \, ?$

What is the exact value of the expression above?

Give your answer to 3 decimal places.

×


text:
### Number Detective

Follow the clues to find the mystery number.

### Six Is the Sum

What do the digits in the number fifteen add up to? How many other numbers have digits with the same total but no zeros?

### ABC

In the multiplication calculation, some of the digits have been replaced by letters and others by asterisks. Can you reconstruct the original multiplication?

# One Million to Seven

##### Age 7 to 11 Challenge Level:

Start by putting one million ($1 000 000$) into the display of your calculator.

Can you reduce this to $7$ using just these six buttons - the $7$ key and add, subtract, multiply, divide and equals as many times as you like?

What is the shortest way can you find to do it?


text:
# Virtual work

In mechanics, virtual work arises in the application of the principle of least action to the study of forces and movement of a mechanical system. The work of a force acting on a particle as it moves along a displacement is different for different displacements. Among all the possible displacements that a particle may follow, called virtual displacements, one will minimize the action. This displacement is therefore the displacement followed by the particle according to the principle of least action. The work of a force on a particle along a virtual displacement is known as the virtual work.

Historically, virtual work and the associated calculus of variations were formulated to analyze systems of rigid bodies,[1] but they have also been developed for the study of the mechanics of deformable bodies.[2]