text:
## Does polymorph and power word kill instakill? [duplicate]

I have read that the polymorph and power word kill combo can be annoying for DM’s but I’m confused on why it works. In the description for polymorph it states:

The transformation lasts for the Duration, or until the target drops to 0 Hit Points or dies.

Shouldn’t when it dies from power word kill it should revert back to it’s normal form with it’s normal hit points?

## What does it mean to isolate a field in a word?

I have been reading in the ‘computer organization and design’ book and I encountered this section:

what operations isolate a field in a word

I know that the answer is logic operations and shift instructions from the book but. I want to know what does it even mean to isolate a field

## Machine has 64 bit architecture and two word long instruction

A machine has a 64-bit architecture, with 2-word long instructions. It has 128 registers, each of which is 32 bits long. It needs to support 49 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is a signed integer, the maximum value of the immediate operand is that can be stored is?

edit: would 1 word long instruction for this case be of 64 bit and 2 word long instruction be of 128 bits? Also do we have to add an extra bit while calculating the total bits required for 49 instructions?

## Finding longest word without help of library functions or regex?

Have the function LongestWord(sen) take the sen parameter being passed and return the largest word in the string. If there are two or more words that are the same length, return the first word from the string with that length. Ignore punctuation and assume sen will not be empty.

Taken from here https://coderbyte.com/information/Longest%20Word

Every single solution that came across in Javascript or C# are the ones which use regex. Is it possible to solve this without regex?

I gave it a shot but could not make it work:

function LongestWord(sen) {   let word = [];   let longestword = "";   let longestwordlen = 0;   let wordlen = 0;   for (let i = 0; i < sen.length - 1; i++) {      if (isAlphabet(sen[i]) && !isInvalidChar(sen[i + 1])) {       wordlen++;       word.push(sen[i]);     }     if (isSpace(sen[i + 1])) {       if (wordlen > longestwordlen) {         longestwordlen = wordlen;         longestword = word.join('')       }       wordlen = 0;       word = [];     }    }    return longestword; }  function isSpace(char) {   if (char.charCodeAt(0) == 32) return true   else return false } function isInvalidChar(char) {   if (!isSpace(char) && !isAlphabet(char)) return true   else return false } function isAlphabet(char) {   if ((char.charCodeAt(0) >= 65 && char.charCodeAt(0) <= 90) || (char.charCodeAt(0) >= 97 && char.charCodeAt(0) <= 122)) return true   else return false }  LongestWord("I am going to kill youeeeeee ")

## Pull eMail ONLY if key word exists on page ?

Is it possible in Scrapebox to pull emails or links from a harvested page, ONLY if the page contains a keyword?  For example, what I am trying to do is get Football Coach Names from high schools.  I can pull every link from a school website, but I need scrape box to only pull emails from pages that contain the word “Football”

Is that possible?

## Is a language regular if a word is in a regular language but the reverse is not?

A1 = { $$x|x \in A , x^R \not\in B$$}

A and B are regular over $$\sum$$

Is A1 regular?

## Is this malware Gen:Variant.Fugrafa.15976 (B) [krnl.xmd] detected on NJStar Chinese word processor a false alarm?

I found this malware Gen:Variant.Fugrafa.15976 (B) [krnl.xmd] on NJStar Chinese word processor using Emisoft Emergency Kit to scan for malware. I have been using NJStar Chinese word processor for a long time and today is the first time I see this malware appearing during scan. I did a recent update of the virus definition.

I tried to google for more information on this malware but could not find anything. Could it be a false alarm?

Extracted from report;

C:\Program Files (x86)\NJStar Chinese WP6\update.dll    detected: Gen:Variant.Fugrafa.15976 (B) [krnl.xmd]

## Is there a word for the fact that all data representations are equal?

For programming languages, we have the concept of Turing completeness which expresses the fact that all computers and all languages are equal in their ability to represent any algorithm so long as we ignore the capacity of the storage medium. Is there a similar word for data encodings/representations?

For example, any number can be represented in unary, binary, ternary form. So long as all the data structures have the same “data capacity” between any given 2 structures A and B there exist functions:

to :: A → B from :: B → A

Where from ∘ to == id.

This is obviously true for any (context insensitive) data structure that exists in a computer because they are literally all just strings of bits. But what is the word for this?

## Arbitrary Turing machine run time analysis on the empty word

Consider $$L = \{ \langle M,n \rangle : M$$ accpets $$\epsilon$$ in less than $$T(n)$$ steps$$\}$$

This language is decidable because we can simulate $$M$$ on $$\epsilon$$ and accept if it accepts and reject if it rejects or passed more than $$T(n)$$ steps.

I am interested in the time bounds of a decider of $$L$$, can we find a decider to do so in $$o(T(n))$$ time? $$O(T(n)log(n))$$ is achieved by simulation time bounds (and maybe even $$O(T(n))$$, I’ve seen somewhere that a linear time simulation can be achieved) but is it possible to do so in some $$o(T(n))$$ time? since we are dealing with a constant word, it might have a better time complexity than a general simulation time.

## Associative mapped cache, word addressable

I have an associative mapped cache with 10 tag bits and an offset of 7bits.

What is the size of each main memory block in words(word addressable) and main memory size in words?

i worked it out as: block size would 2^7bits. main memory would be 2^17bits.

the issue I am facing is, how do I get them to be word addressable with this much information given. I have managed to get the above result in byte-addressable. Please correct me if i am wrong.


text:
GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 20 Feb 2019, 15:50

### GMAT Club Daily Prep

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

Customized
for You

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

Track

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

Practice
Pays

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

## Events & Promotions

###### Events & Promotions in February
PrevNext
SuMoTuWeThFrSa
272829303112
3456789
10111213141516
17181920212223
242526272812
Open Detailed Calendar
• ### Free GMAT Prep Hour

February 20, 2019

February 20, 2019

08:00 PM EST

09:00 PM EST

Strategies and techniques for approaching featured GMAT topics. Wednesday, February 20th at 8 PM EST

February 21, 2019

February 21, 2019

10:00 PM PST

11:00 PM PST

Kick off your 2019 GMAT prep with a free 7-day boot camp that includes free online lessons, webinars, and a full GMAT course access. Limited for the first 99 registrants! Feb. 21st until the 27th.

# The product of the positive 4-digit integer 118A and 25847 is 4758 uni

Author Message
TAGS:

### Hide Tags

GMATH Teacher
Status: GMATH founder
Joined: 12 Oct 2010
Posts: 763
The product of the positive 4-digit integer 118A and 25847 is 4758 uni  [#permalink]

### Show Tags

07 Feb 2019, 10:49
00:00

Difficulty:

(N/A)

Question Stats:

67% (03:37) correct 33% (03:37) wrong based on 3 sessions

### HideShow timer Statistics

GMATH practice exercise (Quant Class 16)

The product of the positive 4-digit integer 118A and 25847 is 4758 units less than a number that leaves remainder 1 when divided by 5. How many values are possible for the digit A?

(A) None
(B) Only 1
(C) Only 2
(D) Only 3
(E) More than 3

_________________

Fabio Skilnik :: GMATH method creator (Math for the GMAT)
Our high-level "quant" preparation starts here: https://gmath.net

Math Expert
Joined: 02 Aug 2009
Posts: 7334
Re: The product of the positive 4-digit integer 118A and 25847 is 4758 uni  [#permalink]

### Show Tags

07 Feb 2019, 21:40
fskilnik wrote:
GMATH practice exercise (Quant Class 16)

The product of the positive 4-digit integer 118A and 25847 is 4758 units less than a number that leaves remainder 1 when divided by 5. How many values are possible for the digit A?

(A) None
(B) Only 1
(C) Only 2
(D) Only 3
(E) More than 3

Let us work on the unit's digit..
For remainder to be 1 when divided by 5, the units digit should be either 1 or 1+5=6..
two cases..
1) units digit as 1..
118A*258477=xyz1-4758..........A*7=s1-8=t3....
Multiplication of 7 by 9 gives a units digit 3..
SO A can be 9..

2) units digit as 6..
118A*258477=xyz6-4758..........A*7=s6-8=t8....
Multiplication of 7 by 4 gives a units digit 8..
SO A can be 4..

Thus 2 values..

C
_________________

1) Absolute modulus : http://gmatclub.com/forum/absolute-modulus-a-better-understanding-210849.html#p1622372
2)Combination of similar and dissimilar things : http://gmatclub.com/forum/topic215915.html
3) effects of arithmetic operations : https://gmatclub.com/forum/effects-of-arithmetic-operations-on-fractions-269413.html
4) Base while finding % increase and % decrease : https://gmatclub.com/forum/percentage-increase-decrease-what-should-be-the-denominator-287528.html

GMAT Expert

GMATH Teacher
Status: GMATH founder
Joined: 12 Oct 2010
Posts: 763
The product of the positive 4-digit integer 118A and 25847 is 4758 uni  [#permalink]

### Show Tags

08 Feb 2019, 05:30
fskilnik wrote:
GMATH practice exercise (Quant Class 16)

The product of the positive 4-digit integer 118A and 25847 is 4758 units less than a number that leaves remainder 1 when divided by 5. How many values are possible for the digit A?

(A) None
(B) Only 1
(C) Only 2
(D) Only 3
(E) More than 3

Hi, chetan2u ! Thanks for joining and for your nice contribution!

Let me offer our "official solution":

$$\left\langle {118A} \right\rangle \cdot 25847 + 4758 = 5M + 1\,\,\,,\,\,\,M \ge 1\,\,{\mathop{\rm int}}$$

$$?\,\,\,:\,\,\,\# \,\,A\,\,{\rm{possibilities}}$$

$$\left[ N \right] = units\,\,digit\,\,of\,\,N\,\,\,\,\,\left( * \right)$$

$$\left\langle {118A} \right\rangle \cdot 25847 + 4757 = 5M\,\,\,\,\,{\rm{AND}}\,\,\,\,\,\left( * \right)\,\,\,\left\{ \matrix{ \,\,\left[ {\left\langle {118A} \right\rangle \cdot 25847} \right] = \left[ {7 \cdot A} \right] \hfill \cr \,\,\left[ {4757} \right] = 7 \hfill \cr \,\,\left[ {5M} \right] = 0 \hfill \cr} \right.\,\,\,\,\,\,\, \Rightarrow \,\,\,\,\,\,\left[ {7 \cdot A + 7} \right]\,\,\,{\rm{equals}}\,\,\,0\,\,{\rm{or}}\,\,5$$

$$\Rightarrow \,\,\,\,\,7 \cdot \left( {A + 1} \right)\,\,\,{\rm{multiple}}\,\,{\rm{of}}\,\,5\,\,\,\,\mathop \Rightarrow \limits^{GCD\left( {7,5} \right)\,\, = \,\,1} \,\,\,\,\,\left[ {A + 1} \right]\,\,\,{\rm{equals}}\,\,\,0\,\,{\rm{or}}\,\,5\,\,\,\,\, \Rightarrow \,\,\,A\,\,\,{\rm{equals}}\,\,{\rm{4}}\,\,{\rm{or}}\,\,{\rm{9}}$$

The correct answer is therefore (C).

We follow the notations and rationale taught in the GMATH method.

Regards,
Fabio.
_________________

Fabio Skilnik :: GMATH method creator (Math for the GMAT)
Our high-level "quant" preparation starts here: https://gmath.net

The product of the positive 4-digit integer 118A and 25847 is 4758 uni   [#permalink] 08 Feb 2019, 05:30
Display posts from previous: Sort by

format: plain


text:
Law of Mass Action

The law of mass action only rigorously applies to elementary reactions (in that otherwise the exponents do not match stoichiometric coefficients). These are reactions whose equations match which particles are colliding on the microscopic scale. Consider the reaction

$\ce{r_1R1 + $$r_2R2 + \ldots + \(r_nR_n <=> \(p_1P1 + \(p_2P2 + \ldots + \(p_mP_m} } \label {1}.$ Reaction \((1)$$ is elementary if and only if it proceeds in a single step. At some time $$t = t_c$$ all reactant particles $$\ce{R1, R2, \ldots, R_n}$$ collide. Quantum mechanically this collision is not too well defined, so view it to be Newtonian in essence. Not to mention: the probability $$P$$ of the simultaneous collision goes to zero as $$n \to \infty. This is why in actuality most elementary steps involve at most three individual constituents. We therefore sacrifice some generality and instead consider the easier to handle $\ce{R1(g) + R2(g) <=> P1(g) + P2(g)} \label {1'}.$ The reactant molecules must collide in order for a reaction to take place. Therefore we must know the collision frequency in order to determine the reaction rate. This rate must be the product of some probability and the collision frequency. Collision Theory gives a way to calculate this collision frequency. In doing so Maxwell-Boltzmann distributions are used to calculate the ratio of atoms that can react within a given concentration. Most of this 'stuff' gets swept up in the reaction rate constant. Energies Collision theory postulates that particles only initiate a transformation when they have enough energy. This is called activation energy and denoted by \(E_a$$. Maxwell-Boltzmann distribution

$\frac{\mathrm{d}N_v}{N} = 4\pi\left(\frac{m}{2\pi k_bT}\right)^{3/2}v^2\exp\left(-\frac{mv^2}{2k_bT}\right)\mathrm{d}v\label{2}$

allows us to estimate the fraction of particles that have the required amount of movement. Note we are technically assuming $$\mathrm{total\ energy} = \mathrm{kinetic\ energy}. Similarly relativistic effects are ignored, and no cap is placed on maximum velocity. With these simplifications, the fraction of interesting particles is $f = \frac{N^*}{N} = \frac{1}{k_bT}\int_{E_a}^\infty\exp\left(-\frac{E}{k_bT}\right)\mathrm{d}E\label{3}$ which evaluates to f = \exp\left(-\frac{E_a}{k_bT}\right)\label{3'}. Number of interesting collisions Say \(Z^*$$ is the number of collisions that matter. We will look for a function $$Z$$ such that

$Z^* = Z\cdot f. \label {4}$

The Maxwell-Boltzmann distribution (Equation $$\ref{2}$$) gives for a single kind of particle (say two $$\ce{R1}$$'s) that there are

$Z = 2N^2 \left( \sigma_{\ce{R1}} \right)^2 \sqrt{\dfrac{\pi RT}{M_{\ce{R1}}}} \label{5}$

collisions in $$1$$ second per $$1\ \mathrm{cm^3}$$ if $$N$$ is the number of particles per square centimeter. (This is the traditional starting point unit.) Hence the rate of such a reaction would be

$v_r = \frac{2Z^*}{N_A} \cdot 10^3\ \ \ \left(\frac{\mathrm{mol}}{\mathrm{s\cdot dm^3}}\right). \label{6}$

Reaction rate $$v_r$$

If you like, you are now able to substitute $$f$$ from Equation $$\ref{3'}$$ and $$Z$$ via Equation $$\ref{5}$$ into Equation $$\ref{4}$$. Then insert Equation $$\ref{4}$$ into Equation $$\ref{6}$$. After necessary manipulation, this yields Equation $$\ref{7}$$.

$v_r = \underbrace{4 \times 10^{-3} N_A \left(\sigma_{\ce{R1}} \right)^2\sqrt{\frac{\pi RT}{M_{\ce{R1}}}}\exp\left(-\frac{E_a}{k_bT}\right) }_k \cdot \overbrace{\left(\frac{N}{N_A}\cdot 10^3\right)^2}^{c^2}. \label{7}$

Coming back to our actual reaction (Equation $$\ref{1'}$$) involves more relative quantities. For example, $$\sigma_{\ce{R1}}$$ becomes

$\sigma_{\text{aver}} = 0.5\left(d_{\ce{R1}} + d_{\ce{R2}} \right).$

So it is a bit more difficult. But the result is analogous to Equation $$\ref{7}$$.

$v_r = \underbrace{2\sqrt{2} \cdot 10^{-3} N_A\left(\sigma_\text{aver}\right)^2\sqrt{\pi RT\left(\frac{1}{M_{\ce{R1}}} + \frac{1}{M_{\ce{R2}}}\right)}\exp\left(-\frac{E_a}{k_bT}\right)}_k \cdot c_{\ce{R1}} \cdot c_{\ce{R2}}$

More compactly, if $$\ce{R1} = A$$ and $$\ce{R2} = B$$

$v_r = k[A][B]\label{8}$

which is what we set out to prove.

• This derivation assumes that every active collision leads to a reaction. When theoretically computed $$k$$ were compared to experimental, an extra factor was introduced, $$P$$. This is called the steric factor, and in classical collision theory $$P$$ remains empirical in essence.

Collision theory is for elementary steps

As your quote suggests, collision theory is a first theoretical explanation for the proportionality to products of concentrations. It does not generally explain various exponentiation. It does not have to either. The higher (or non-integer or negative) exponents usually derive from the mechanism itself. In other words, the fact that common reactions are not elementary comes into play.

For instance, the transition

$$\ce{2Br- + H2O2 + 2H+ -> Br2 + H2O}$$

is experimentally found to follow

$$v_r = k\ce{[H2O2][H+][Br^{-}]}\label {a}.$$

Mathematically, we can verify that one possible mechanism is

$\ce{H+ + H2O2 <=>[K] H2O+-OH,} \tag{fast equilibrium}$

$\ce{H2O+-OH + Br- ->[k_2] HOBr + H2O,}\tag{slow}$

$\ce{HOBr + H+ + Br- ->[k_3] Br2 + H2O.}\tag{fast}$

Indeed,

$K_c = \frac{\ce{[H2O+-OH]}}{\ce{[H+]}\ce{[H2O2]}} \implies \ce{[H2O+-OH]} = K_c\ce{[H+]}\ce{[H2O2]}\label {b}.$

Applying the method of stationary concentration gives

$v\left(\ce{HOBr}\right) = 0 \implies k_2\ce{[H2O+-OH]}\ce{[Br-]} = k_3\ce{[H2O2]}\ce{[H+]}\ce{[Br-]}\label {c}.$

The overall rate of the reaction is characterised by the rate of formation of bromine $$\ce{Br2}$$. So,

$v_r = v\left(\ce{Br2}\right) = k_3\ce{[H2O2]}\ce{[H+]}\ce{[Br-]} \overset{(c)}{=} k_2\ce{[H2O+-OH]}\ce{[Br-]} \overset{(b)}{=} k_2K_c\ce{[H+][H2O2]}\ce{[Br-]}$

or more briefly using $$k_2K_c = k$$

$v_r = k\ce{[H2O2][H+]}\ce{[Br-]}\label {d}.$

This only shows that it might be a valid mechanism, not that the reaction actually follows such a pathway. Therefore, while we can use collision theory to derive the law of mass action as a first approximation, the exponents for non-elementary reactions are determined via experiment.


text:
Math Help - Need help for Express monthly electricity cost

1. Need help for Express monthly electricity cost

Electricity company charges customers a base rate of $10 a month, plus 6 cents per kWh for the first 1200 kWh and 7 cents per kWh for all usage over 1200 kWh. Express the monthly cost amount of electricity used. My understanding is as below, but not sure if it is correct. Please help! Let C as monthly cost, x as electricity usage. C(x)=↗ 10+0.06x if x<=1200 ........↘ 10+0.06x+0.07(x-1200) if x>1200 2. Originally Posted by Fanlai Electricity company charges customers a base rate of$10 a month, plus 6 cents per kWh for the first 1200 kWh and 7 cents per kWh for all usage over 1200 kWh. Express the monthly cost amount of electricity used.

Let C as monthly cost, x as electricity usage.

C(x)=↗ 10+0.06x if x<=1200
........↘ 10+0.06x+0.07(x-1200) if x>1200
C(x) = 10 + 0.06x ; x < 1200

C(x) = 82 + 0.07(x-1200) ; x > 1200

3. Thanks a lot!

4. Notice that the only difference is that you have "0.06x" still in the second formula. skeeter replaced that with 0.06 times the entire first 1200 kw hours: .06*12000= $72 which he then added to the base$10 to get $80. 5. Originally Posted by HallsofIvy Notice that the only difference is that you have "0.06x" still in the second formula. skeeter replaced that with 0.06 times the entire first 1200 kw hours: .06*12000=$72 which he then added to the base $10 to get$80.
Thanks again!


text:
# Tag Archives: NTP2

## Some counterexamples for forking, dividing, invariance

At the end of my paper with Itay Kaplan “Forking and dividing in NTP2 theories” we had asked several questions, admittedly without giving them much thought. Since 2008 when the paper went in circulation, some people had actually shown interest in those questions. By now two of them are known to have negative answers, one due to Gabriel Conant and one by myself, with very easy examples. I’d like to have them written down for a reference somewhere, so I’ve thought this might be an appropriate place.

Question 1. (rephrased as more elaborate latex is not available here): Is it true that in a simple theory, every type has a global Lascar-invariant extension.

I recall that a complete global type ${p\left(x\right)\in S\left(\mathbb{M}\right)}$ is Lascar-invariant over a small set ${A}$ if whenever ${\phi\left(x,a\right)\in p}$ and ${b}$ has the same Lascar strong type over ${A}$ as ${a}$, then ${\phi\left(x,b\right)\in p}$. Having the same Lascar strong type means that ${a}$ is equivalent to ${b}$ with respect to every equivalence relation with boundedly many classes which is ${\mbox{Aut}\left(\mathbb{M}/A\right)}$-invariant.

This property is true in the random graph, for example – any type can be extended to a global one without adding any new edges. This is also true in any extensible NIP theory, say in any stalbe theory, any ${o}$-minimal theory (e.g. real closed fields) or any ${C}$-minimal theory (e.g. algebraically closed valued fields), as well as in any theory with definable Skolem functions (e.g. ${p}$-adics). A theory is extensible if every type does not fork over its domain. However, the crucial point is that this property need not be preserved in reducts of the theory, which immediately gives an easy simple counterexample.

Example. Let ${T}$ be the reduct of the random graph given by the ternary relation ${R(x,y,z)}$ which holds if and only if ${x\neq y\neq z}$ and the number of edges between vertices in the set ${\left\{ x,y,z\right\} }$ is odd.

Claim.

1. ${T}$ is supersimple of ${SU}$-rank ${1}$. Thus, Lascar strong type is determined by the strong type.
2. For any set ${A}$, ${\mbox{acl}(A)=A}$.
3. All pairs of different elements have the same type over ${\emptyset}$.
4. Let ${M\models T}$ and ${p\in S(M)}$. Then ${p}$ is not Lascar-invariant over ${\emptyset}$.

Proof: (1) is because ${T}$ is definable on the set of singletons in the random graph, which is supersimple of ${SU}$-rank 1. Now it is a well-known fact that Lascar strong type is determined by the strong type in supersimple theories.

(2) is easy to see, and (3) is by back-and-forth.

(4) Assume ${p}$ is Lascar-invariant over ${\emptyset}$, thus invariant over it by (1) and (2). Let ${a\models p}$, then by (3) either ${\models R(a,b,c)}$ for all ${b\neq c\in M}$ or ${\models\neg R(a,b,c)}$ for all ${b\ne c\in M}$. In the first case, let ${b\neq c\neq d\in M}$ satisfy ${\neg R(b,c,d)}$. Then it is easy to see that ${\not\models R(a,b,c)\land R(a,c,d)\land R(a,b,d)}$ — a contradiction. In the other case, take ${b,c,d}$ satisfying ${R(b,c,d)}$ and check that ${\not\models\neg R(a,b,c)\land\neg R(a,c,d)\land\neg R(a,b,d)}$ — a contradiction again. $\Box$

Thus, by (4) the unique type over the empty set has no global Lascar-invariant extension.

There are various modifications of the question which still make sense, and also one can ask if this property holds in particular algebraic structures of interest. I have some things to say about it, but not this time.

Question 2. “Can similar results be proved for NSOP theories?”

Here “similar results” refers to the main result of the paper, that is that in an NTP2 theory a formula divides over an extension base if and only if it forks over it. Now, Gabe shows in “Forking and dividing in Henson graphs” that it is not the case for the triangle-free random graph. From my own experience, triangle-free random graph seems to demonstrate the failure of all the phenomena which holds for NTP2 theories.

Example. Let ${T}$ be the theory of the triangle-free random graph, and let ${b_{0}\neq b_{1}\neq b_{2}\neq b_{3}}$. Let ${\phi\left(x,b_{0}b_{1}b_{2}b_{3}\right)=\bigvee_{i.

Claim.

1. ${xRb_{i}\land xRb_{j}}$ divides over ${\emptyset}$ for any ${i.
2. ${\phi\left(x,b_{0}b_{1}b_{2}b_{3}\right)}$ does not divide over ${\emptyset}$.
3. ${\emptyset}$ is an extension base.
4. ${T}$ is ${\mbox{SOP}_{3}}$ but ${\mbox{NSOP}_{4}}$.
5. However, forking and dividing are the same for complete types.

See Gabe’s article for details and for the general case of Henson graphs.

Still the following part of the question remains open:

Problem.

1. Is forking=dividing for complete types?
2. Is forking equal to dividing for formulas in NTP1 over models?

## On the SOPn hierarchy inside NTP2

In this post I would like to popularize a certain question around Shelah’s classification theory of unstable (and even non-simple) theories.

1. Tree properties of the first and second kind, ${\mbox{NTP}_{1}}$ and ${\mbox{NTP}_{2}}$

As usual we are in a very big and saturated monster model ${\mathbb{M}}$ of a complete first-order theory ${T}$.

Definition. A formula ${\phi(x,y)}$ has ${\mbox{TP}_{1}}$ if there is a tree ${\left(a_{\eta}\right)_{\eta\in\omega^{<\omega}}}$ of tuples and ${k\in\omega}$ such that:
${\left\{ \phi(x,a_{\eta|i})\right\} _{i\in\omega}}$ is consistent for any ${\eta\in\omega^{\omega}}$
${\left\{ \phi(x,a_{\eta_{i}})\right\} _{i is inconsistent for any mutually incomparable ${\eta_{0},...,\eta_{k-1}\in\omega^{<\omega}}$.
Otherwise we say that ${\phi(x,y)}$ is ${\mbox{NTP}_{1}}$, and ${T}$ is ${\mbox{NTP}_{1}}$ if every formula is.

Definition. A formula ${\phi(x,y)}$ has ${\mbox{TP}_{2}}$ if there is an array ${\left(a_{\alpha,i}\right)_{\alpha,i<\omega}}$ of tuples such that ${\left\{ \phi(x,a_{\alpha,i})\right\} _{i<\omega}}$ is ${2}$-inconsistent for every ${\alpha<\omega}$ and ${\left\{ \phi(x,a_{\alpha,f(\alpha)})\right\} _{\alpha<\omega}}$ is consistent for any ${f:\,\omega\rightarrow\omega}$. Otherwise we say that ${\phi(x,y)}$ is ${\mbox{NTP}_{2}}$, and ${T}$ is ${\mbox{NTP}_{2}}$ if every formula is.

It is an easy exercise to see that each of this properties implies the usual tree property, that is the failure of simplicity. An important insight of Shelah is that failure of simplicity always occurs in one of these two explicit ways.

Theorem. ${T}$ is simple if and only if it is both ${\mbox{NTP}_{1}}$ and ${\mbox{NTP}_{2}}$.

These tree properties were introduced and studied by Shelah in [1] and [2]. ${\mbox{NTP}_{2}}$ re-appeared on the scene after it arose in the work on forking and dividing in NIP theories in [3] and was studied further in [4] and [5]. ${\mbox{NTP}_{1}}$ re-appears in [6]. I will probably return to these in future postings.

2. On the ${\mbox{NSOP}_{n}}$ hierarchy inside ${\mbox{NTP}_{2}}$

We recall the definition of ${\mbox{SOP}_{n}}$ for ${n\geq2}$ from [7,Definition 2.5], another hierarchy introduced by Shelah in order to study non-simple theories without the strict order property:

Definition. 1. Let ${n\geq3}$. A formula ${\phi\left(x,y\right)}$ has ${\mbox{SOP}_{n}}$ if there are tuples ${\left(a_{i}\right)_{i\in\omega}}$ such that:

• There is an infinite chain: ${\models\phi\left(a_{i},a_{j}\right)}$ for all ${i
• There are no cycles of length ${n}$: ${\models\neg\exists x_{0}\ldots x_{n-1}\bigwedge_{j=i+1\left(\mod n\right)}\phi\left(x_{i},x_{j}\right)}$.

2. ${\phi\left(x,y\right)}$ has ${\mbox{SOP}_{2}}$ if and only if it has ${\mbox{TP}_{1}}$.
3. ${\mbox{SOP}\Rightarrow \mbox{SOP}_{n+1}\Rightarrow \mbox{SOP}_{n}\Rightarrow\ldots\Rightarrow\mbox{SOP}_{3}\Rightarrow\mbox{SOP}_{2}\Rightarrow \mbox{not simple}}$.
4. By Shelah’s theorem we see that restricting to ${\mbox{NTP}_{2}}$ theories, the last 2 items coincide.

The following are standard examples showing that the ${\mbox{SOP}_{n}}$ hierarchy is strict for ${n\geq3}$:

Example. [7, Claim 2.8]
1. The usual example of a theory which is not-simple and ${\mbox{NSOP}_{3}}$ is the model companion of the theory of a parametrized family of equivalence relations with infinitely many infinite classes (see [8]).
2. For ${n\geq3}$, let ${T_{n}}$ be the model completion of the theory of directed graphs (no self-loops or multiple edges) with no directed cycles of length ${\leq n}$. Then it has ${\mbox{SOP}_{n}}$ but not ${\mbox{SOP}_{n+1}}$.
3. For odd ${n\geq3}$, the model completion of the theory of graphs with no odd cycles of length ${\leq n}$, has ${\mbox{SOP}_{n}}$ but not ${\mbox{SOP}_{n+1}}$.
4. Consider the model companion of a theory in the language ${\left(<_{n,l}\right)_{l\leq n}}$ saying:

• ${x<_{n,m-1}y\rightarrow x<_{n,m}y}$,
• ${x<_{n,n}y}$,
• ${\neg\left(x<_{n,n-1}x\right)}$,
• if ${l+k+1=m\leq n}$ then ${x<_{n,l}y\,\land\, y<_{n,k}z\,\rightarrow\, x<_{n,m}z}$.

It eliminates quantifiers.

However, all these examples have ${\mbox{TP}_{2}}$.
Proof:
(1) It is immediate that the formula ${E\left(x;y,i\right)}$ has ${\mbox{TP}_{2}}$.
(2) Let ${\phi\left(x,y_{1}y_{2}\right)=xRy_{1}\land y_{2}Rx}$. For ${i\in\omega}$ we choose sequencese ${\left(a_{i,j}b_{i,j}\right)_{j\in\omega}}$ such that ${\models R\left(a_{i,j},b_{i,k}\right)}$ and ${R\left(b_{i,j},a_{i,k}\right)}$ for all ${j, and these are the only edges around — it is possible as no directed cycles are created. Now for any ${i}$, if there is ${c\models\phi\left(x,a_{i,0}b_{i,0}\right)\land\phi\left(x,a_{i,1}b_{i,1}\right)}$, then we would have a directed cycle ${c,b_{i,0},a_{i,1}}$ of length ${3}$ — a contradiction. On the other hand, given ${i_{0}<\ldots and ${j_{0},\ldots,j_{n}}$ there has to be an element ${a\models\bigwedge_{\alpha\leq n}\phi\left(x,a_{i_{\alpha},j_{\alpha}}b_{i_{\alpha},j_{\alpha}}\right)}$ as there are no directed cycles created. Thus ${\phi\left(x,y_{1}y_{2}\right)}$ has ${\mbox{TP}_{2}}$.
(3) and (4) Similar.

This naturally leads to the following question (which I originally asked in [4]):

Question: Is the ${\mbox{SOP}_{n}}$ hierarchy strict for ${\mbox{NTP}_{2}}$ theories? Note that the strictness of the implication ${\mbox{SOP}_{3}\Rightarrow \mbox{SOP}_{2}}$ is open even in general.

Even an example of a non-simple theory with ${\mbox{NSOP}}$ and ${\mbox{NTP}_{2}}$ is missing. In [2, §7, Exercise 7.12] Shelah suggests an example of such a theory as an exercise. However, I couldn’t make sense of the suggested example. Perhaps someone else would?

References

1. Saharon Shelah, “Simple unstable theories”, Ann. Math. Logic, http://dx.doi.org/10.1016/0003-4843(80)90009-1
2. Saharon Shelah, “Classification theory and the number of nonisomorphic models”, North-Holland Publishing Co., 1990
3. Artem Chernikov and Itay Kaplan, “Forking and dividing in NTP2 theories”, J. Symbolic Logic, 2012
4. Artem Chernikov, “Theories without the tree property of the second kind”, http://arxiv.org/abs/1204.0832
5. Itai Ben Yaacov and Artem Chernikov, “An independence theorem for NTP2 theories”, arXiv:1207.0289
6. Byunghan Kim and Hyeung-Joon Kim, “Notions around tree property 1”, Annals of Pure and Applied Logic, 2011
7. Saharon Shelah, “Toward classifying unstable theories”, Ann. Pure Appl. Logic, 1996
8. Saharon Shelah and Alex Usvyatsov, “More on SOP1 and SOP2”, arXiv:math/0404178


text:
# Thread: Sine and Cosine of i (imaginary unit)

1. ## Sine and Cosine of i (imaginary unit)

The following is my working for the Sine and Cosine of the imaginary unit, $i$.

$e^{ix}=cos(x)+i(sin(x))$
Substituting $x=i$ gives
$e^{-1}=cos(i)+i(sin(i))$
Squaring both sides
$e^{-2}=(cos(i))^2-(sin(i))^2+2i(sin(i)cos(i))$
$e^{-2}=(1-2((sin(i))^2)+2i(sin(i)cos(i))$
Rearranging the original equation in terms of $cos(i)$ gives
$cos(i)=e^{-1}-i(sin(i))$
Substituing this back into $e^{-2}=(1-2((sin(i))^2)+2i(sin(i)cos(i))$gives
$e^{-2}=(1-2((sin(i))^2)+2i(sin(i))(e^{-1}-i(sin(i)))$
$e^{-2}=(1-2((sin(i))^2)+2i(sin(i))(e^{-1}) -2(i^2)((sin(i))^2)$
$e^{-2}=1+2i(sin(i))(e^{-1})$
Rearranging for sin(i) gives
$(e^{-2}-1)/2i(e^{-1})=sin(i)$
$sin(i)=(1-e^2)/2ei$
Then to find Cos(i): Substituting back into the original equation gives
$cos(i)=e^{-1}-(i(1-e^2))/(2ei)
cos(i)=(1-e^2)/2e$

The problem is that all the sources I can find for the sine and cosine of $i$ on the internet say
$sin(i) = ((e-e^{-1})/2)i$ or $((e^2-1)/2e)i$ and
$cos(i)=(e+e^{-1})/2$ or ( $e^2+1)/2e$.

As you can see my answers are very close to the others, I just can't figure out where the difference in signs comes from... also, is there any difference if the $i$ is put outside the fraction like they have, or on the bottom like I work it to be?

If I've made any typos or not made anything clear enough, just point it out and I'll change the original post.

Thanks, Spud.

2. $e^{ix} = \cos x + i \sin x \ \ \ \ (1)$
$e^{-ix} = \cos x - i \sin x \ \ \ (2)$

$(1) + (2)$ gives

$e^{ix} + e^{-ix} = 2 \cos x$

$\cos x = \frac{1}{2} \left ( e^{ix} + e^{-ix} \right )$

$\cos i = \frac{1}{2} \left ( e^{-1} + e^{1} \right )$

I will leave you to do $\sin i$.

- Bobak


text:
# Quadrature of a circle solved

Discussion in 'Pseudoscience' started by Jason.Marshall, Jan 7, 2015.

1. ### James RJust this guy, you know?Staff Member

Messages:
29,990
Nonsense. The second two numbers are not $\pi$.

Why do you think that
$\pi = \frac{14-\sqrt{2}}{4}$?
How did you derive that result? (Just to emphasise: it is incorrect.)

Why do you think that
$\pi=\frac{4}{(1+\sqrt{5})/2}$?
How did you derive that result? (Just to emphasise: it is incorrect.)

What is the relevance of this?

What?!

There's only one "modern pi value". Why 4 or 5 decimal places?

No. There is no debate. Only one of the values you have cited approximates pi.

exchemist likes this.

3. ### rpennerFully WiredStaff Member

Messages:
4,827
Actually, it was $\frac{4}{\sqrt{\frac{1 + \sqrt{5}}{2}}} = 4 \sqrt{\frac{2}{1 + \sqrt{5}}} = 2 \sqrt{ 2 ( \sqrt{5} - 1 ) }$

Not "almost" -- 100% accuracy is never found in any manufacturing technique. It is also impossible in Euclidean geometry to construct circles and squares of equal area. Likewise it is impossible to form an exact expression in terms of just the four arithmetic operators and roots or to find a polynomial equation with integer coefficients that gives pi as a root.

But the approximate forms you give are not very impressive as intellectual achievements.

$\frac{14 - \sqrt{2}}{4}$ gets the first 3 digits right. If a circle had a diameter of 12 million meters (about the diameter of the Earth) the error in the circumference calculated with this approximation would be about 58,247 meters too long.
$\frac{4}{\sqrt{\frac{1 + \sqrt{5}}{2}}}$ gets the first 3 digits right, but is better than the above.
3.14 gets the first 3 digits right, but is better than the above. If a circle had a diameter of 12 million meters (about the diameter of the Earth) the error in the circumference calculated with this approximation would be about 19,112 meters too short.
22/7 gets the first 3 digits right, but is better than the above. If a circle had a diameter of 12 million meters (about the diameter of the Earth) the error in the circumference calculated with this approximation would be about 15,178 meters too long.
$\sqrt{ \frac{40}{3} - \sqrt{12}}$ (Kochanski's Approximation) gets the first 5 digits right.
355/113 gets the first 7 digits right. If a circle had a diameter of 12 million meters (about the diameter of the Earth) the error in the circumference calculated with this approximation would be about 3.2 meters too long. That's likely as good as one would ever need for civil engineering.
$\frac{99^2}{2206 \sqrt{2}}$ (Ramanujan) gets the first 7 digits right.
$\frac{66 \sqrt{2}}{ 33 \sqrt{29} - 148 }$ (Borwein and Bailey) gets the first 8 digits right.
3.141592653589793 is a simple truncation of first 16 digits of the infinite decimal sequence for pi.
Due to design considerations, most PC and Mac programs are coded with IEEE double precision numbers which forces them to best approximate pi as $\frac{884279719003555}{2^{48} }$ which is a bit better than the above decimal truncation. This makes me suspect you cribbed the above from the computer without any heavy lifting on your part.
21053343141/6701487259 gets the first 21 digits right.
$\frac{ \ln ( (640320^3 + 744)^2 - 393768 ) }{ 2 \sqrt{163}}$ (Warda) gets the first 46 digits right. But this is using the natural logarithm which is outside of the rules above.
But if we are allowing that, then we could use this: $\frac{ \ln ( -1 ) }{ \sqrt{-1} } = \pi$ and that is exact.

5. ### Confused2Registered Senior Member

Messages:
360
I spy e^(iπ)=-1 EDIT: aka Euler's formula ...

A proof (for example) here:-


text:
# Closure as UIControlEvents handler

I'm expanding the functionality of this SO answer.

Mainly I'm focusing on:

• You can add as many handlers as you want.
• You can remove (i.e. cancel) the handler.
• You can receive the sender parameter in the handler closure.
• You can add "oneshot" handler.

import UIKit

extension UIControl {
private class EventHandler {

let _cb: (UIControl, UIEvent) -> Void
let _oneshot: Bool

init(_ cb: (UIControl, UIEvent) -> Void, oneshot: Bool) {
_cb = cb
_oneshot = oneshot
}

@objc func invoke(sender: UIControl, event: UIEvent) {
_cb(sender, event)
if _oneshot {
}
}
}

typealias EventHandlerId = UnsafePointer<Void>

func on<T: UIControl>(events: UIControlEvents, _ callback: (T, UIEvent) -> Void) -> EventHandlerId {
assert(self.isKindOfClass(T), "The handler must receive \(NSStringFromClass(self.dynamicType)) or UIControl")
return self._on(events, EventHandler({ callback($0 as T,$1) }, oneshot: false))
}
func once<T: UIControl>(events: UIControlEvents, _ callback: (T, UIEvent) -> Void) -> EventHandlerId {
assert(self.isKindOfClass(T), "The handler must receive \(NSStringFromClass(self.dynamicType)) or UIControl")
return self._on(events, EventHandler({ callback($0 as T,$1) }, oneshot: true))
}

func on(events: UIControlEvents, _ callback: () -> Void) -> EventHandlerId {
return self._on(events, EventHandler({ _, _ in callback() }, oneshot: false))
}
func once(events: UIControlEvents, _ callback: () -> Void) -> EventHandlerId {
return self._on(events, EventHandler({ _, _ in callback() }, oneshot: true))
}

private func _on(events: UIControlEvents, _ handler: EventHandler) -> EventHandlerId {
objc_setAssociatedObject(self, ptr, handler, objc_AssociationPolicy(OBJC_ASSOCIATION_RETAIN_NONATOMIC))
return ptr
}

func off(identifier: EventHandlerId) {
if let handler = objc_getAssociatedObject(self, identifier) as? EventHandler {
self.removeTarget(handler, action: nil, forControlEvents: .AllEvents)
objc_setAssociatedObject(self, identifier, nil, 0)
}
}
}

Usage:

class MyViewController:UIViewController {

@IBOutlet weak var myButton:UIButton!

let handle = myButton.on(.TouchUpInside) { (sender, event) in
// sender is the control itself.
// event is the UIEvent object.
}

// remove event handler
myButton.off(handle)

// event handler can be () -> Void type
myButton.on(.TouchUpInside) { [unowned self] in
}

// "oneshot" event handler
myButton.once(.TouchUpInside) {
}
}
}

It's working OK... But, for example:

let btn = UIButton()
btn.on(.TouchUpInside) { (sender: UISwitch, _) in /* ... */ }
^^^^^^^^

This compiles, but I want to make this compile time error.

Currently, as a workaround, I'm doing "assertion":

assert(self.isKindOfClass(T), "The handler must receive \(NSStringFromClass(self.dynamicType)) or UIControl")

And, if possible, I wish the compiler could infer the type of the sender, like this:

let btn = UIButton()
btn.on(.TouchUpInside) { sender, _ in
sender.titleLabel.text = "Pushed !!"
}

Any ideas?

• For what it's worth, I've posted a question on Stack Overflow, which is relevant to your question here. stackoverflow.com/questions/27434346/… – nhgrif Dec 11 '14 at 23:28
• What you may and may not do after receiving answers – rolfl Dec 12 '14 at 11:39
• @rolfl I apologize for my fault. But, I think, I did not edit the original code. So, where should I write such reply, then? – rintaro Dec 12 '14 at 12:04
• Did you read option 1 on the meta link I added? Accept/vote for answers that help. Only post changed code if you want that revised code reviewed as well, in which case it should be in a different question. – rolfl Dec 12 '14 at 12:08

Consider for a moment, if you will, how we typically handle a user tapping a button. We typically will do so with an @IBAction method. What are the Apple suggested defaults when we hook up a button this way?

The default is to give us a method that takes an object of type AnyObject as its only parameter. We can, of course, change the type to specify UIButton (or whatever UIControl subclass our element actually is). We can also change the sent arguments. We can choose between None, Sender, and Sender and Event.

I don't think it's useful to allow objects that aren't of type UIControl as the parameter. But, I do feel like we're missing methods to accept a handler that just passes the Sender argument. For me, this is the most common way I hook up methods (mostly because it's the default, but sometimes because I want the sender). Meanwhile, I don't think I've ever cared about the Event argument.

But moreover, I actually think it'd also be useful if we also had the option of passing a reference to the handler itself (the EventHandlerId returned when the handler is added) so that potentially we could then remove the event conditionally and without having to keep track of the handler reference on our own. (Although admittedly, I haven't played too terribly much with this aspect of your code, so I'm not sure how possible or manageable that might be.)

I'd change your typealias to this:

typealias EventHandlerRef = UnsafePointer<EventHandler>

and remove the private access modifier from your EventHandler class, and add version of all your methods that take an EventHandler argument.

For starters, I'd do this because even though the version you've implemented is easier, there's not a particularly good reason for this aspect of the implementation to be private.

But moreover, by making the EventHandler class private, you've tricked yourself into writing the off function in a not-so-great way. The off function takes an EventHandler pointer, finds the event, then removes it as a target of the UI element. And that's fine for everything you've done... except for your "oneshot" implementation... where the EventHandler object finds its own reference to pass to the control's off method so that method can use the pointer to find the object (which we already knew) and remove it.

Instead, we should have a method that accepts an EventHandler object. The method that accepts the EventHandlerRef grabs the EventHandler that the reference points to and calls the method that accepts the EventHandler.

The reason, by the way, I prefer EventHandlerRef to EventHandlerId is two-fold. First of all, the value it holds is hardly an id in the sense that one might think in a database sense, but most importantly, suffixes pointer typedefs with Ref is just how Apple does it throughout their own libraries. Any other iOS developer will see EventHandlerRef and know that this is a pointer to an EventHandler thing, even if they don't know what sort of thing EventHandler is. Meanwhile, EventHandlerId seems slightly arbitrary.

Other than these two observations, my main complaint here would be naming. Large, descriptive variable names don't make your compiled program take up any more space on the disk, or any more RAM, or run any slower. The only drawback to large, descriptive variable names is that it makes your code more readable. Wait... that's not a drawback.

Moreover, this isn't Objective-C. Something declares as private truly is private in Swift. The underscores just make things look weird here. So, here's my take on your code, including the name changes I'd make:

Well, I was going to post some sample code... but now I'm going to be distracted with writing a bug report because the compiler keeps crashing trying to figure out the sample I wrote. And that means there's something wrong with it, but the compiler doesn't feel like telling me, so I can't figure it out...

• Thanks. Please see my updated OP. Anyway, I see I need more consideration about "naming". BTW, I think, UnsafePointer<EventHandler> is meaningless. EventHandler is already a reference type. So UnsafePointer<EventHandler> means "pointer to pointer to object". – rintaro Dec 12 '14 at 7:40
• This is extraordinarily common throughout Apple's libraries. ABAddressBookRef, etc. – nhgrif Dec 12 '14 at 11:27
• Actually, I see what you are saying... But in that case then we don't need the typealias at all since we are making the EventHandler class public, we don't need to have pointers to it. – nhgrif Dec 12 '14 at 12:05


text:
# What is the order of the left tail of a mixture of non-central chi-square?

Let $\mu\sim N(0,1)$, $Z\sim N(\mu,1)$. Then $Z$ can be viewed as a mixture of Gaussians. It can also be viewed as a Gaussian but there is a prior for the mean.

Let $X\sim\exp(\lambda)$ where the density of $\exp(\lambda)$ is parameterized as $\exp(-x/\lambda)/\lambda$. The independence of $X$ and $Z$ is also assumed. Now I'm interested in the asymptotic behavior of the following probability: $$\mathbb{P}_\lambda(Z^2\leq X)$$ as $\lambda\to0^+$.

Here $Z^2$ can also be viewed as a non-central chi-squared distribution with 1 degree of freedom and a prior distribution of $\chi_1^2$ on the non-central parameter.

Obviously this probability tends 0 as $\lambda\to0^+$. I also did some simulation study and it seems that the order should be $\sqrt{\lambda}$. However, I'm not able to come up with a rigorous proof and have no idea on where to start.

• Nope. $\lambda$ is another constant and $\mu$ is the Gaussian random variable as defined. Thanks! – neverevernever Sep 2 '18 at 19:38

The probability can be computed exactly as $$\int_{\mu=-\infty}^\infty \int_{z=-\infty}^\infty \int_{x=z^2}^\infty \frac{e^{-\mu^2/2}}{\sqrt{2\pi}} \frac{e^{-(z-\mu)^2/2}}{\sqrt{2\pi}} \frac{e^{-x/\lambda}}{\lambda} dx\, dz\, d\mu = \sqrt{\frac{\lambda}{4+\lambda}}$$ So this looks like $\sqrt{\lambda}/2$ as $\lambda\rightarrow 0^+$.


text:
# How do you solve for J in (CE)/2 = (3JQ)/7?

Jul 5, 2017

$J = \frac{7 C E}{6 Q}$

#### Explanation:

1. Cross multiply.

Multiply the numerator of the first fraction by the denominator of the second fraction, and set that equal to the numerator of the second fraction times the denominator of the first fraction. For example:

$\frac{a}{b} = \frac{c}{d}$

$a d = b c$

$\frac{C E}{2} = \frac{3 J Q}{7}$

$7 \left(C E\right) = 3 J Q \left(2\right)$

$7 C E = 6 J Q$

Commutative property:

$7 C E = 6 Q J$

2. To isolate J, divide both sides by 6Q.

$\frac{7 C E}{6 Q} = \frac{\cancel{6 Q} J}{\cancel{6 Q}}$

$\frac{7 C E}{6 Q} = J$

You've now solved for J. Hope this helps!


text:
Translator Disclaimer
VOL. 53 | 2009 Periodic solutions of periodic difference equations
Tetsuo Furumochi, Masato Muraoka

Editor(s) Saber Elaydi, Kazuo Nishimura, Mitsuhiro Shishikura, Nobuyuki Tose

## Abstract

In this paper, we discuss the existence of periodic solutions of the periodic difference equation $$x(n + 1) = f(n, x(n)),\ \ n \in \mathbf{Z}$$ and the periodic difference equation with finite delay $$x(n + 1) = f(n, x_n),\ \ n \in \mathbf{Z},$$ where $x$ and $f$ are $d$-vectors, and $\mathbf{Z}$ denotes the set of integers. We show the existence of periodic solutions by using Browder's fixed point theorem, and illustrate an example by using a boundedness result due to Shunian Zhang.

## Information

Published: 1 January 2009
First available in Project Euclid: 28 November 2018

zbMATH: 1182.39013
MathSciNet: MR2582404

Digital Object Identifier: 10.2969/aspm/05310051

Subjects:
Primary: 39A11


text:
# The unusually high boiling point of water compared with formaldehyde which also contains hydrogen and oxygen also is because of water's ability to do what?

Hydrogen bonding occurs where the hydrogen atom is covalently bound to a strongly electronegative element such as oxygen or fluorine. The electronegative atom polarizes electron density away from the bond with the result that the oxygen acquires a partial negative charge, and the hydrogen acquires a partial positivie charge, i.e. ""^(delta+)H-O^(delta-)-H^(delta+).
These dipoles can align in solution, which acts as attractive intermolecular force, and is held to be responsible for the unusually high boiling point of water (compare the boiling points of ${H}_{2} S e$, and ${H}_{2} S$, both gases as room temperature). The enhanced boiling point is also observed fro hydrogen fluoride, $H F$, which boils at $19.5$ ""^@C (compare boiling points of $H C l$, and $H B r$).


text:
23-27 May 2017
Seoul
Asia/Seoul timezone
Home > Timetable > Session details
PDF | iCal

# Session 6

## Place

Location: Seoul
Date: from 25 May 13:30 to 26 May 10:00

## Conveners

• 25 May 13:30 - 14:30 Experiment backgrounds, models, and simulations
• Prof. Kim, Yeongduk (Institute for Basic Science)
• 25 May 15:30 - 16:30 Experiment backgrounds, models, and simulations
• Prof. Kim, Yeongduk (Institute for Basic Science)
• 25 May 16:50 - 18:10 Session 6
• Dr. PIEPKE, Andreas (University of Alabama)
• 26 May 09:00 - 10:00 Experiment backgrounds, models, and simulations
• Dr. PIEPKE, Andreas (University of Alabama)

## Timetable | Contribution List

Displaying 13 contributions out of 13
Type: Oral Session: Session 6
Neutron-induced nuclear recoils present one of the dominant backgrounds in many low-background experiments. These neutrons are largely radiogenic in origin, coming from fission and ($\alpha$,n) reactions in detector components. The ($\alpha$,n) neutron production rate in a material depends on the composition of the material as well as the energies of the $\alpha$ decays that occur within it. In th ... More
Presented by Dr. Shawn WESTERDALE on 25/5/2017 at 6:30
Type: Oral Session: Session 6
The KArlsruhe TRItium Neutrino (KATRIN) experiment aims to determine the effective mass of the electron antineutrino with an unsurpassed sensitivity of 200 meV/c$^2$ in a direct model-independent approach. Located at the Karlsruhe Institute of Technology (KIT) the experiment uses a MAC-E filter type electrostatic Main Spectrometer (MS) to investigate the tritium $\beta$-decay spectrum close to ... More
Presented by Dr. Fabian HARMS on 25/5/2017 at 5:10
Type: Oral Session: Session 6
A convincing observation of neutrino-less double beta decay (0νDBD) pivots on the possibility of operating high-energy resolution detectors in background-free conditions. The CUPID-0 experiment is the first step of a next generation project based on cryogenic calorimeters equipped with light detectors able to measure the scintillating light produced in the scintillating absorbers for particle i ... More
Presented by Dr. Luca PATTAVINA on 25/5/2017 at 8:50
Type: Oral Session: Session 6
The Cryogenic Underground Observatory for Rare Events (CUORE) will search for the neutrinoless double-beta ($0\nu\beta\beta$) decay of $^{130}$Te using a 19 tower array of 988 high-resolution TeO$_{2}$ bolometers. The goal of CUORE is to reach a $2\times10^{26}$ year 1-sigma sensitivity on the $^{130}$Te $0\nu\beta\beta$ decay half-life, which CUORE can achieve if the background index is the orde ... More
Presented by Dr. Giovanni BENATO on 25/5/2017 at 8:30
Type: Oral Session: Session 6
CALDER is a R&D project for the development of cryogenic light detectors with an active surface of 5x5cm$^{2}$ and an energy resolution of 20eV RMS for visible and UV photons. These devices can enhance the sensitivity of next generation large mass bolometric detectors for rare event searches, providing an active background rejection method based on particle discrimination. A CALDER detector is c ... More
Presented by Mr. Sergio DI DOMIZIO on 26/5/2017 at 0:20
Type: Oral Session: Session 6
The MAJORANA DEMONSTRATOR is a neutrinoless double beta decay experiment utilizing enriched Ge-76 detectors in 2 separate modules inside of a common compact shield at the Sanford Underground Research Facility. The DEMONSTRATOR has developed specialized processes for producing ultra-pure copper and plastic components and world leading assay sensitivities to validate their cleanliness. The experimen ... More
Presented by Cabot-Ann CHRISTOFFERSON on 25/5/2017 at 8:10
Type: Oral Session: Session 6
CANDLES aims to measure neutrino-less double beta decays using $^{48}$Ca which has the highest Q value (4.27 MeV) among all isotope candidates of double beta decays. A distinction in the measurement is an active veto system using liquid scintillator. Large amount of external backgrounds reacted in LS can be removed by taking advantage of the pulse shape difference between CaF$_{2}$ and liquid scin ... More
Presented by Dr. Kyohei NAKAJIMA on 25/5/2017 at 7:10
Type: Oral Session: Session 6
The GERDA experiment is designed to search for neutrinoless double beta decay of Ge-76. In its second phase 37 HPGe detectors enriched in the isotope Ge-76 are directly immersed into liquid argon. The radio-pure cryogenic liquid acts as passive and active shield and as a cooling medium for the detectors simultaneously. Recently a half-life limit on 0vbb decay of Ge-76 of T1/2 > 5 *10^25 ... More
Presented by Dr. Bela MAJOROVITS on 25/5/2017 at 7:50
Type: Oral Session: Session 6
The objective of the Karlsruhe Tritium Neutrino experiment (KATRIN) at the Karlsruhe Institute of Technology (KIT) is the measurement of the effective electron neutrino mass with a sensitivity of 200 meV/c$^2$. A central component is the Main Spectrometer (MS), a MAC-E filter type electrostatic high pass filter for electrons. It measures the energy of $\beta$-electrons from tritium decay c ... More
Presented by Dr. Joachim WOLF on 25/5/2017 at 4:50
Type: Oral Session: Session 6
News Experiment With Sphere- Gaseous (NEWS-G) detector is a world wide collaboration based on spherical gas detector for Light Dark Matter search. The first low radioactivity spherical detector, SEDINE (60 cm diameter), installed at LSM on 2012 is continuing to take data. The next detector, 140 cm in diameter, will be fabricated using remarkable ultra-low radioactivity (few microBq/kg). This l ... More
Presented by Mr. Ali DASTGHEIBI FARD on 26/5/2017 at 0:00
Type: Oral Session: Session 6
The SABRE (Sodium-iodide with Active Background REjection) experiment is designed to search for WIMP dark matter via detection of an annually modulating signal. The DAMA/LIBRA experiment claims the observation of a modulation compatible with dark matter detection. However, the candidate dark matter signal has not yet been confirmed by other experiments. SABRE will perform a high sensitivity sear ... More
Presented by Mr. Nuti FRANCESCO on 25/5/2017 at 4:30
Type: Oral Session: Session 6
The LZ dark matter experiment will require an unprecedented low background rate within its fiducial volume, defining strict constraints on radioactivity from construction materials. The radioactive background is further mitigated through the combination of powerful self-shielding from liquid xenon, 3D event vertex reconstruction, and external veto detector systems. An aggressive screening campaign ... More
Presented by Dr. Chamkaur GHAG on 25/5/2017 at 6:50
Type: Oral Session: Session 6
Thanks to the 2400 m overburden and the long distance to commercial reactors, the China Jinping Underground Laboratory (CJPL) is an ideal site for low background neutrino experiments. The Jinping Neutrino Experiment will perform an in-depth research on solar neutrinos, geo-neutrinos and supernova relic neutrinos. Many efforts were devoted to the R&D of the experimental proposal. A new type of liqu ... More
Presented by Dr. Zhe WANG on 26/5/2017 at 0:40
Building timetable...


text:
# Centripetal force on a Ferris wheel

(This is a high school–level problem, so no air resistance, etc.) A person is sitting on a Ferris wheel of radius $r$ moving at a constant speed. What is the force from the seat acting on the person when the person is at the bottom of the ride? When the person is at the top?

My attempt at a solution:

When the person is at the top, the forces acting on the person are his weight and an equally large normal force from the seat pushing him upwards. Since the problem involves uniform circular motion, at the top of the ride, there must be some force pulling the person towards the center of the circle with magnitude $\frac{mv^2}{r}$.

The cause of this centripetal force must be the seat belt on the person, pulling him downwards?

When the ride is at the bottom, the normal force from the seat both counteracts the weight of the person and applies a centripetal force of $\frac{mv^2}{r}$ upwards.

Centripetal force kind of confuses me since my professor says a proof of it is beyond the scope of the course.

• You can think of centripetal force as the sum of a bunch of radial forces rather than its own standalone force. In this case, at the top of the wheel, the sum of the normal force, the force provided by the seat belt, and the gravitational force must be a net force with magnitude $\frac{mv^2}{r}$ pointing towards the center of the wheel. Note that centripetal force is dependent on speed, meaning the seat belt may not necessarily need to exert any downwards force if the wheel is spinning slowly. Sep 8 '15 at 19:54
• @Rations Ok. So the net force acting on the person when he is at the top of the wheel Fs = v^2/2 * m...and this force consists of the gravity minus the normal force from the seat...right? Sep 8 '15 at 20:01
• Gravity minus the magnitude of the normal force is only true when (1) the person is at the top of the ride, (2) the direction pointing towards the center has been defined as positive, and (3) when you know the Ferris wheel is moving slowly enough that the direction of the normal force must be opposite the direction of gravity. Sep 8 '15 at 20:12

Assuming that you mean a "ferris" wheel:

In a ferris wheel, $\frac{m*v^2}{r}$ is very small, because ferris wheels move slowly.

Also, on the wheel, all of the cars with people remain upright. This means that the force of gravity is always pulling downwards on people as they ride.

So, there are three cases that you can look at to explain this:

1. You are at the top.

In this case, the centripetal force (which is required to keep you moving within the circle is provided by gravity. Gravity pulls you down towards the center of the wheel.

1. You are at the bottom.

In this case, the force provided is an upward force provided by the metal structure of the wheel. The metal beams that support the car as it travels along at this point.

1. You are on the side.

In this case, the force towards the center of the wheel is provided by a combination of the structure of the wheel (if you are on the bottom/side, and gravity if you are more on the top)

• Yeah i think i understand now...Given that v = k = 1m/s and r = 70m...then when the wheel is at the top Fc(centripetalforce) = 1/70... so 1/70 = G-N(normal force of seat). So N = G-1/70 Sep 8 '15 at 20:04
• Right, for a person weighing 100kg, going 1 m/s on top of a 70m wheel, They feel 1.43N of centripetal force, and 981N of gravitational force. I also edited the answer to explain where this centripetal force actually comes from, even though it is relatively insignificant. Sep 8 '15 at 20:18
• OH yeah i forgot the mass when i calculated the centripetal force, but I feel like i understand now, thanks. Sep 8 '15 at 20:25


text:
# Time Complexity for Creating a Graph from a File

Assume that I have a file that consists of pairs of numbers separated by a space. These numbers are the labels for vertices in my graph. For example:

0 5
0 7
2 3
4 5
1 5
.
.
.

I want to create a graph (adjacency list) by reading this file line-by-line. For each line, I will create an edge between the two vertices. Of course, if the vertex doesn't exist yet, then I will add it before creating the edge.

I read here of an algorithm that builds a graph with a time complexity of $O(|V| + |E|)$ where $V$ = set of vertices and $E$ = set of edges. That makes sense to me. However my algorithm doesn't insert the vertices in a loop first and then insert all of the edges in another loop second. My algorithm just adds the vertices as it's looping through the edges.

My question is if my algorithm is $O(|E|)$? It seems like that can't be right, but I read here that when calculating the time complexity you don't take into account if statements. That's exactly what my vertex creation would be -- an if statement that checks if the node exists in the middle of my looping through all the edges.

• It depends on the data structure you use. For instance if you store the adjacency list as a map of lists the time complexity is O(E) for exactly the reasons you mention. It is the best time complexity you can get for this. But if you use a list of lists you might end up implementing a O(EV) time complexity (e.g.: going through V vertices to check if the tail vertex exists for each edge). – marcv81 Jun 13 '16 at 12:53

You forget that $O(|E|) \subset O(|E|+|V|)$ and $O(|E|+|V|) \subset O(|E|)$. Though It's actually $O(|E|\ln|V|)$, because checking if a vertex has been inserted is hardly $O(1)$.
• Sure, if the labels are $0, 1, 2, \dots n$. The insertion/allocation costs can also be hidden that way. Though, should you ever end up actually implementing the algorithm, I'd advise against such trickery. It's best not to demand too much from your inputs :). – Karolis Juodelė Sep 9 '13 at 5:48
• If $|V|$ is large enough random array lookups are not constant time on real machines, because of address translation. See this paper. – adrianN Sep 9 '13 at 8:20
• It depends on the model whether or not you have to add the $\log$-part, e.g., we say bucket sort is linear time. – Pål GD Sep 9 '13 at 8:51


text:
# Methods to check if my data fits a distribution function?

My shortened data is:

y <- c (2,2,1,5,6,7,1,2,1,6,6,7,3,2,4,4,4,4,3,3,9,1,1,9)

I firstly normalize my data:

y_scale <- scale(y)

Then, I generate a model dataset with normal distribution based on y_scale's mean and stdev:

y_norm <- rnorm(n=24, m=mean(y_scale), sd=sd(y_scale))

To check if my data fits the normal distribution, I do

ks.test(y_scale,y_norm)

I found the result is as follows:

Two-sample Kolmogorov-Smirnov test

data:  y_scale and y_norm
D = 0.2083, p-value = 0.6749
alternative hypothesis: two-sided

Warning message:
In ks.test(y_scale, y_norm) : cannot compute correct p-values with ties

Here, my question is:

(1) My real data set has ~ 700,000 numbers, I found I cannot use shapiro.test.

shapiro.test(y_scale)
Error in shapiro.test(y_scale) : sample size must be between 3 and 5000

(2) Is the p-value calculated above by ks.test wrong? How to solve this problem of p-values?

Warning message:
In ks.test(y_scale, y_norm) : cannot compute correct p-values with ties

(3) The reasons why I tried to use ks.test instead of other methods, is because I want to compare with other model datasets that have other distribution functions. It seems to me that I can simply replace y_norm with other model dataset, and compare their p-values or D-values (the smaller the better), to choose which distribution function fits my data most.

(4) Is it a must to normalize my data first?

• Unless your data are artificially generated by a particular, known distribution, I can guarantee that any reasonably effective distribution test will reject them! Nevertheless, it can be meaningful to use a goodness of fit statistic, like the KS statistic, to measure the deviation between the distribution of your data and any ideal distribution (there will be no problem with ties or discreteness, either), but the p-values are worthless. – whuber Jun 22 '11 at 16:31
• Probably QQ-plots might guide you also, though I'm not sure what is the reason for scaling at such sample size if you do know that the data has two finite moments then scaling will bring you to the central limit theorem conclusions. – Dmitrij Celov Jun 22 '11 at 18:43
• Interesting read: stats.stackexchange.com/questions/2492/… – nico Jun 22 '11 at 20:23

Why are you testing for normality?

As stated by @user603 the discreteness of your data suggests that it is not normal. But are you interested in normal enough?

With 700,000 data points you will have power to detect differences from normality that are very minor and probably not important (I just compared a sample from a t distribution with 100 df and got a p-value of 0.011). If you are doing the normality test in preparation to using normal theory inference (t-tests, confidence intervals, etc.) then for most population distributions 700,000 should be enough for the central limit theorem to let you use the normal theory inference, but knowledge about the population is probably more important here than any test of normality.

Also, if your data really is discrete, then normalizing ruins the discreteness and could be misleading. For meaningful results you should not normalize.

Computing the mean and standard deviation after normalizing is meaningless since you have set the mean to 0 and standard deviation to 1.

The KS test is designed to test against a fully specified distribution, normalizing the data first is equivalent to comparing to a distribution with estimated parameters which will also invalidate the p-value.

• I have some questions. Isn't the data always discrete? We can depict numbers only up to a number of digits. Can't the marks in a school be normal distributed? – Theta30 Jun 23 '11 at 7:00
• There are 2 concepts here, the actual data entered into the computer which will always be discrete, and the theoretical mechanism for generating the data which we can theorize about being continous (even though the data we enter will be a discrete approximation to this). Your data is all integers which means that either the mechanism for generating the data is discrete, like counts from a poisson or binomial where it is impossible to get fractional counts, or you have done a lot of rounding. This is one of the reasons that understanding beats testing. – Greg Snow Jun 23 '11 at 19:17
1. If your data is discrete, it cannot possible be drawn from a continuous distribution.
2. Try ks.test(y,"pnorm",mean(y),sd(y)).
• I tried to do this as follows, but I don't know if I have misunderstood your reply. I found the D value are different as show below. However, the p-value and the warning message is the same as below. Could you mind to give me some more guidance? – evdstat Jun 22 '11 at 16:19
• One-sample Kolmogorov-Smirnov test data: y D = 0.0703, p-value < 2.2e-16 alternative hypothesis: two-sided Warning message: In ks.test(y, "pnorm", mean(y), sd(y)) : cannot compute correct p-values with ties – evdstat Jun 22 '11 at 16:20
• > ks.test(y, y_norm) Two-sample Kolmogorov-Smirnov test data: y and y_norm D = 0.9386, p-value < 2.2e-16 alternative hypothesis: two-sided Warning message: In ks.test(y, y_norm) : cannot compute correct p-values with ties > – evdstat Jun 22 '11 at 16:21
• i can't help but point out again that if your data is discrete (as it seems to be) it cannot possible be a draw from a Gaussian (i.e. the correct p-value in this case is 0). – user603 Jun 22 '11 at 16:54

As suggested by user603, you can test directly by comparing with the normal distribution.
As you can see at help page the $p$-values are not exact if there are ties because "the continuous distributions do not generate them." So the theory (and hence the algorithm) does not allow ties.
I did some testings using
x <- rnorm(N)
ks.test(x,"pnorm")
and increased the size of $N$. I noticed the $p$-value is unreliable, jumping up and down randomly. And there were no ties (give credit to R for that). However, the $D$-value is consistent and decreases with the increase of the size. So I suggest you to use the $D$-value.
And about the normalizing thing, there is no such requirement. So I see no point in doing it.


text:
Articles written in Pramana – Journal of Physics

• Dephasing of a qubit due to quantum and classical noise

The qubit (or a system of two quantum dots) has become a standard paradigm for studying quantum information processes. Our focus is decoherence due to interaction of the qubit with its environment, leading to noise. We consider quantum noise generated by a dissipative quantum bath. A detailed comparative study with the results for a classical noise source such as generated by a telegraph process, enebles us to set limits on the pplicability of this process $\nu is à \nu is$ its quantum counterpart, as well as lend handle on the parameters that can be tuned for analysing decoherence. Both Ohmic and non-Ohmic dissipations are treated and appropriate limits are analysed for facilitating comparison with the telegraph process.

• Pramana – Journal of Physics

Volume 96, 2022
All articles
Continuous Article Publishing mode

• Editorial Note on Continuous Article Publication

Posted on July 25, 2019


text:
#### Vol. 309, No. 1, 2020

 Recent Issues Vol. 309: 1  2 Vol. 308: 1  2 Vol. 307: 1  2 Vol. 306: 1  2 Vol. 305: 1  2 Vol. 304: 1  2 Vol. 303: 1  2 Vol. 302: 1  2 Online Archive Volume: Issue:
 The Journal Subscriptions Editorial Board Officers Contacts Submission Guidelines Submission Form Policies for Authors ISSN: 1945-5844 (e-only) ISSN: 0030-8730 (print) Special Issues Author Index To Appear Other MSP Journals
The arithmetic Hodge index theorem and rigidity of dynamical systems over function fields

### Alexander Carney

Vol. 309 (2020), No. 1, 71–102
DOI: 10.2140/pjm.2020.309.71
##### Abstract

In one of the fundamental results of Arakelov’s arithmetic intersection theory, Faltings and Hriljac (independently) proved the Hodge index theorem for arithmetic surfaces by relating the intersection pairing to the negative of the Néron–Tate height pairing. More recently, this has been generalized to higher dimensions by Moriwaki and by Yuan and Zhang. We extend these results to projective varieties over transcendence degree one function fields. The new challenge is dealing with nonconstant but numerically trivial line bundles coming from the constant field via Chow’s $K∕k$-trace functor. As an application of the Hodge index theorem, we also prove a rigidity theorem for the set of canonical height zero points of polarized algebraic dynamical systems over function fields. For function fields over finite fields, this gives a rigidity theorem for preperiodic points, generalizing previous work of Mimar, of Baker and DeMarco, and of Yuan and Zhang.

##### Keywords
arithmetic dynamics, intersection theory, Arakelov theory
##### Mathematical Subject Classification
Primary: 11G50, 14G40, 37P30


text:
Enter the pallet length (in), the pallet height (in), and the pallet width (in) into the Pallet Volume Calculator. The calculator will evaluate and display the Pallet Volume.

Pallet Volume Formula

The following formula is used to calculate the Pallet Volume.

PV = PL/12*PH/12*PW/12
• Where PV is the Pallet Volume (ft^3)
• PL is the pallet length (in)
• PH is the pallet height (in)
• PW is the pallet width (in)

To calculate a pallet volume, simply multiply the length, width, and height of the pallet.

How to Calculate Pallet Volume?

The following example problems outline how to calculate Pallet Volume.

Example Problem #1

1. First, determine the pallet length (in).
1. The pallet length (in) is given as 30.
2. Next, determine the pallet height (in).
1. The pallet height (in) is calculated as: 40.
3. Next, determine the pallet width (in).
1. The pallet width (in) is found to be: 15.
4. Finally, calculate the Pallet Volume using the formula above:

PV = PL/12*PH/12*PW/12

Inserting the values from above yields:

PV = 30/12*40/12*15/12 = 10.4166 (ft^3)

Example Problem #2

The variables needed for this problem are provided below:

pallet length (in) = 60

pallet height (in) = 30

pallet width (in) = 20

Entering these values and solving gives:

PV = 60/12*30/12*20/12 = 20.833 (ft^3)


text:
# evaluateHeatFlux

Evaluate heat flux of a thermal solution at nodal or arbitrary spatial locations

## Syntax

``````[qx,qy] = evaluateHeatFlux(thermalresults,xq,yq)``````
``````[qx,qy,qz] = evaluateHeatFlux(thermalresults,xq,yq,zq)``````
``[___] = evaluateHeatFlux(thermalresults,querypoints)``
``[___] = evaluateHeatFlux(___,iT)``
``````[qx,qy] = evaluateHeatFlux(thermalresults)``````
``````[qx,qy,qz] = evaluateHeatFlux(thermalresults)``````

## Description

example

``````[qx,qy] = evaluateHeatFlux(thermalresults,xq,yq)``` returns the heat flux for a thermal problem at the 2-D points specified in `xq` and `yq`. This syntax is valid for both the steady-state and transient thermal models.```

example

``````[qx,qy,qz] = evaluateHeatFlux(thermalresults,xq,yq,zq)``` returns the heat flux for a thermal problem at the 3-D points specified in `xq`, `yq`, and `zq`. This syntax is valid for both the steady-state and transient thermal models.```

example

````[___] = evaluateHeatFlux(thermalresults,querypoints)` returns the heat flux for a thermal problem at the 2-D or 3-D points specified in `querypoints`. This syntax is valid for both the steady-state and transient thermal models.```

example

````[___] = evaluateHeatFlux(___,iT)` returns the heat flux for a thermal problem at the times specified in `iT`. You can specify `iT` after the input arguments in any of the previous syntaxes.The first dimension of `qx`, `qy`, and, in the 3-D case, `qz` corresponds to query points. The second dimension corresponds to time steps `iT`.```

example

``````[qx,qy] = evaluateHeatFlux(thermalresults)``` returns the heat flux for a 2-D problem at the nodal points of the triangular mesh. The first dimension of `qx` and `qy` represents the node indices. The second dimension represents time steps.```

example

``````[qx,qy,qz] = evaluateHeatFlux(thermalresults)``` returns the heat flux for a 3-D thermal problem at the nodal points of the tetrahedral mesh. The first dimension of `qx`, `qy`, and `qz` represents the node indices. The second dimension represents time steps.```

## Examples

collapse all

For a 2-D steady-state thermal model, evaluate heat flux at the nodal locations and at the points specified by `x` and `y` coordinates.

Create a thermal model for steady-state analysis.

`thermalmodel = createpde('thermal');`

Create the geometry and include it in the model.

```R1 = [3,4,-1,1,1,-1,1,1,-1,-1]'; g = decsg(R1,'R1',('R1')'); geometryFromEdges(thermalmodel,g); pdegplot(thermalmodel,'EdgeLabels','on') xlim([-1.5 1.5]) axis equal```

Assuming that this geometry represents an iron plate, the thermal conductivity is $79.5\phantom{\rule{0.16666666666666666em}{0ex}}W/\left(mK\right)$.

`thermalProperties(thermalmodel,'ThermalConductivity',79.5,'Face',1);`

Apply a constant temperature of 500 K to the bottom of the plate (edge 3). Also, assume that the top of the plate (edge 1) is insulated, and apply convection on the two sides of the plate (edges 2 and 4).

```thermalBC(thermalmodel,'Edge',3,'Temperature',500); thermalBC(thermalmodel,'Edge',1,'HeatFlux',0); thermalBC(thermalmodel,'Edge',[2 4], ... 'ConvectionCoefficient',25, ... 'AmbientTemperature',50);```

Mesh the geometry and solve the problem.

```generateMesh(thermalmodel); results = solve(thermalmodel)```
```results = SteadyStateThermalResults with properties: Temperature: [1541x1 double] XGradients: [1541x1 double] YGradients: [1541x1 double] ZGradients: [] Mesh: [1x1 FEMesh] ```

Evaluate heat flux at the nodal locations.

```[qx,qy] = evaluateHeatFlux(results); figure pdeplot(thermalmodel,'FlowData',[qx qy])```

Create a grid specified by `x` and `y` coordinates, and evaluate heat flux to the grid.

```v = linspace(-0.5,0.5,11); [X,Y] = meshgrid(v); [qx,qy] = evaluateHeatFlux(results,X,Y);```

Reshape the `qTx` and `qTy` vectors, and plot the resulting heat flux.

```qx = reshape(qx,size(X)); qy = reshape(qy,size(Y)); figure quiver(X,Y,qx,qy)```

Alternatively, you can specify the grid by using a matrix of query points.

```querypoints = [X(:) Y(:)]'; [qx,qy] = evaluateHeatFlux(results,querypoints); qx = reshape(qx,size(X)); qy = reshape(qy,size(Y)); figure quiver(X,Y,qx,qy)```

For a 3-D steady-state thermal model, evaluate heat flux at the nodal locations and at the points specified by `x`, `y`, and `z` coordinates.

Create a thermal model for steady-state analysis.

`thermalmodel = createpde("thermal");`

Create the following 3-D geometry and include it in the model.

```importGeometry(thermalmodel,"Block.stl"); pdegplot(thermalmodel,"FaceLabels","on","FaceAlpha",0.5) title("Copper block, cm") axis equal```

Assuming that this is a copper block, the thermal conductivity of the block is approximately $4\phantom{\rule{0.16666666666666666em}{0ex}}W/\left(cmK\right)$.

`thermalProperties(thermalmodel,"ThermalConductivity",4);`

Apply a constant temperature of 373 K to the left side of the block (face 1) and a constant temperature of 573 K to the right side of the block (face 3).

```thermalBC(thermalmodel,"Face",1,"Temperature",373); thermalBC(thermalmodel,"Face",3,"Temperature",573);```

Apply a heat flux boundary condition to the bottom of the block.

`thermalBC(thermalmodel,"Face",4,"HeatFlux",-20);`

Mesh the geometry and solve the problem.

```generateMesh(thermalmodel); thermalresults = solve(thermalmodel)```
```thermalresults = SteadyStateThermalResults with properties: Temperature: [12691x1 double] XGradients: [12691x1 double] YGradients: [12691x1 double] ZGradients: [12691x1 double] Mesh: [1x1 FEMesh] ```

Evaluate heat flux at the nodal locations.

```[qx,qy,qz] = evaluateHeatFlux(thermalresults); figure pdeplot3D(thermalmodel,"FlowData",[qx qy qz])```

Create a grid specified by `x`, `y`, and `z` coordinates, and evaluate heat flux to the grid.

```[X,Y,Z] = meshgrid(1:26:100,1:6:20,1:11:50); [qx,qy,qz] = evaluateHeatFlux(thermalresults,X,Y,Z);```

Reshape the `qx`, `qy`, and `qz` vectors, and plot the resulting heat flux.

```qx = reshape(qx,size(X)); qy = reshape(qy,size(Y)); qz = reshape(qz,size(Z)); figure quiver3(X,Y,Z,qx,qy,qz)```

Alternatively, you can specify the grid by using a matrix of query points.

```querypoints = [X(:) Y(:) Z(:)]'; [qx,qy,qz] = evaluateHeatFlux(thermalresults,querypoints); qx = reshape(qx,size(X)); qy = reshape(qy,size(Y)); qz = reshape(qz,size(Z)); figure quiver3(X,Y,Z,qx,qy,qz)```

Solve a 2-D transient heat transfer problem on a square domain, and compute heat flow across a convective boundary.

Create a thermal model for this problem.

`thermalmodel = createpde('thermal','transient');`

Create the geometry and include it in the model.

```g = @squareg; geometryFromEdges(thermalmodel,g); pdegplot(thermalmodel,'EdgeLabels','on') xlim([-1.2 1.2]) ylim([-1.2 1.2]) axis equal```

Assign the following thermal properties: thermal conductivity is $100\phantom{\rule{0.16666666666666666em}{0ex}}W/\left({m}^{\circ }C\right)$, mass density is $7800\phantom{\rule{0.16666666666666666em}{0ex}}kg/{m}^{3}$, and specific heat is $500\phantom{\rule{0.16666666666666666em}{0ex}}J/\left(k{g}^{\circ }C\right)$.

```thermalProperties(thermalmodel,'ThermalConductivity',100, ... 'MassDensity',7800, ... 'SpecificHeat',500);```

Apply insulated boundary conditions on three edges and the free convection boundary condition on the right edge.

```thermalBC(thermalmodel,'Edge',[1 3 4],'HeatFlux',0); thermalBC(thermalmodel,'Edge',2,... 'ConvectionCoefficient',5000, ... 'AmbientTemperature',25);```

Set the initial conditions: uniform room temperature across domain and higher temperature on the top edge.

```thermalIC(thermalmodel,25); thermalIC(thermalmodel,100,'Edge',1);```

Generate a mesh and solve the problem using `0:1000:200000` as a vector of times.

```generateMesh(thermalmodel); tlist = 0:1000:200000; thermalresults = solve(thermalmodel,tlist);```

Create a grid specified by `x` and `y` coordinates, and evaluate heat flux to the grid.

```v = linspace(-1,1,11); [X,Y] = meshgrid(v); [qx,qy] = evaluateHeatFlux(thermalresults,X,Y,1:length(tlist));```

Reshape `qx` and `qy`, and plot the resulting heat flux for the 25th solution step.

`tlist(25)`
```ans = 24000 ```
```figure quiver(X(:),Y(:),qx(:,25),qy(:,25)); xlim([-1,1]) axis equal```

Solve the heat transfer problem for the following 2-D geometry consisting of a square and a diamond made of different materials. Compute the heat flux, and plot it as a vector field.

Create a thermal model for transient analysis.

`thermalmodel = createpde('thermal','transient');`

Create the geometry and include it in the model.

```SQ1 = [3; 4; 0; 3; 3; 0; 0; 0; 3; 3]; D1 = [2; 4; 0.5; 1.5; 2.5; 1.5; 1.5; 0.5; 1.5; 2.5]; gd = [SQ1 D1]; sf = 'SQ1+D1'; ns = char('SQ1','D1'); ns = ns'; dl = decsg(gd,sf,ns); geometryFromEdges(thermalmodel,dl); pdegplot(thermalmodel,'EdgeLabels','on','FaceLabels','on') xlim([-1.5 4.5]) ylim([-0.5 3.5]) axis equal```

For the square region, assign the following thermal properties: thermal conductivity is $10\phantom{\rule{0.16666666666666666em}{0ex}}W/\left({m}^{\circ }C\right)$, mass density is $2\phantom{\rule{0.16666666666666666em}{0ex}}kg/{m}^{3}$, and specific heat is $0.1\phantom{\rule{0.16666666666666666em}{0ex}}J/\left(k{g}^{\circ }C\right)$.

```thermalProperties(thermalmodel,'ThermalConductivity',10, ... 'MassDensity',2, ... 'SpecificHeat',0.1, ... 'Face',1);```

For the diamond-shaped region, assign the following thermal properties: thermal conductivity is $2\phantom{\rule{0.16666666666666666em}{0ex}}W/\left({m}^{\circ }C\right)$, mass density is $1\phantom{\rule{0.16666666666666666em}{0ex}}kg/{m}^{3}$, and specific heat is $0.1\phantom{\rule{0.16666666666666666em}{0ex}}J/\left(k{g}^{\circ }C\right)$.

```thermalProperties(thermalmodel,'ThermalConductivity',2, ... 'MassDensity',1, ... 'SpecificHeat',0.1, ... 'Face',2);```

Assume that the diamond-shaped region is a heat source with the density of $4\phantom{\rule{0.16666666666666666em}{0ex}}W/{m}^{3}$.

`internalHeatSource(thermalmodel,4,'Face',2);`

Apply a constant temperature of ${0}^{\circ }C$ to the sides of the square plate.

`thermalBC(thermalmodel,'Temperature',0,'Edge',[1 2 7 8]);`

Set the initial temperature to ${0}^{\circ }C$.

`thermalIC(thermalmodel,0);`

Mesh the geometry and solve the problem.

`generateMesh(thermalmodel);`

The dynamic for this problem is very fast: the temperature reaches steady state in about 0.1 seconds. To capture the interesting part of the dynamics, set the solution time to `logspace(-2,-1,10)`. This gives 10 logarithmically spaced solution times between 0.01 and 0.1. Solve the equation.

```tlist = logspace(-2,-1,10); thermalresults = solve(thermalmodel,tlist); temp = thermalresults.Temperature;```

Compute the heat flux density. Plot the solution with isothermal lines using a contour plot, and plot the heat flux vector field using arrows.

```[qTx,qTy] = evaluateHeatFlux(thermalresults); figure pdeplot(thermalmodel,'XYData',temp(:,10),'Contour','on', ... 'FlowData',[qTx(:,10) qTy(:,10)], ... 'ColorMap','hot')```

## Input Arguments

collapse all

Solution of a thermal problem, specified as a `SteadyStateThermalResults` object or a `TransientThermalResults` object. Create `thermalresults` using the `solve` function.

Example: ```thermalresults = solve(thermalmodel)```

x-coordinate query points, specified as a real array. `evaluateHeatFlux` evaluates the heat flux at the 2-D coordinate points `[xq(i) yq(i)]` or at the 3-D coordinate points `[xq(i) yq(i) zq(i)]`. So `xq`, `yq`, and (if present) `zq` must have the same number of entries.

`evaluateHeatFlux` converts query points to column vectors `xq(:)`, `yq(:)`, and (if present) `zq(:)`. It returns the heat flux in a form of a column vector of the same size. To ensure that the dimensions of the returned solution are consistent with the dimensions of the original query points, use `reshape`. For example, use ```qx = reshape(qx,size(xq))```.

Data Types: `double`

y-coordinate query points, specified as a real array. `evaluateHeatFlux` evaluates the heat flux at the 2-D coordinate points `[xq(i) yq(i)]` or at the 3-D coordinate points `[xq(i) yq(i) zq(i)]`. So `xq`, `yq`, and (if present) `zq` must have the same number of entries.

`evaluateHeatFlux` converts query points to column vectors `xq(:)`, `yq(:)`, and (if present) `zq(:)`. It returns the heat flux in a form of a column vector of the same size. To ensure that the dimensions of the returned solution is consistent with the dimensions of the original query points, use `reshape`. For example, use ```qy = reshape(qy,size(yq))```.

Data Types: `double`

z-coordinate query points, specified as a real array. `evaluateHeatFlux` evaluates the heat flux at the 3-D coordinate points `[xq(i) yq(i) zq(i)]`. So `xq`, `yq`, and `zq` must have the same number of entries.

`evaluateHeatFlux` converts query points to column vectors `xq(:)`, `yq(:)`, and (if present) `zq(:)`. It returns the heat flux in a form of a column vector of the same size. To ensure that the dimensions of the returned solution is consistent with the dimensions of the original query points, use `reshape`. For example, use ```qz = reshape(qz,size(zq))```.

Data Types: `double`

Query points, specified as a real matrix with two rows for 2-D geometry or three rows for 3-D geometry. `evaluateHeatFlux` evaluates the heat flux at the coordinate points `querypoints(:,i)`, so each column of `querypoints` contains exactly one 2-D or 3-D query point.

Example: For 2-D geometry, ```querypoints = [0.5 0.5 0.75 0.75; 1 2 0 0.5]```

Data Types: `double`

Time indices, specified as a vector of positive integers. Each entry in `iT` specifies a time index.

Example: `iT = 1:5:21` specifies every fifth time-step up to 21.

Data Types: `double`

## Output Arguments

collapse all

x-component of the heat flux, returned as an array. The first array dimension represents the node index. The second array dimension represents the time step.

For query points that are outside the geometry, `qx` = `NaN`.

y-component of the heat flux, returned as an array. The first array dimension represents the node index. The second array dimension represents the time step.

For query points that are outside the geometry, `qy` = `NaN`.

z-component of the heat flux, returned as an array. The first array dimension represents the node index. The second array dimension represents the time step.

For query points that are outside the geometry, `qz` = `NaN`.

## Version History

Introduced in R2017a


text:
# Segment 1 (16 January 2013)

Jan. 16th Wed, Segment 1

Problems:

1. show $P(ABC)=P(B)P(C | B) P(A | BC)$

right side:$P(B)P(C | B) P(A | BC) = P(BC)P(A|BC)$ $=P(ABC)$

2. What is the probability that the sum of two dice is odd with neither being a 4?

P(neither being 4 & sum of two dice is odd) =P(neither being 4 | sum of two dice is odd)* P(sum of two dice is odd) =12/18 * 18/36 =1/3

3. For the trout/minnow problem, what if you want to know the probability that the Nth fish caught is a trout, for N=1,2,3,... What is an efficient way to set up this calculation? (Hint: If you ever learned the word "Markov", this might be a good time to remember it!)

if N=1, P=2/5;

if N=2, P=P(1st is trout & 2nd is trout) + P(1st is minnow & 2nd is trout)=2/5*1/4 +3/5*2/5=0.34;

if N>2, P=P(Nth is trout & didn't have a trout before) + P(Nth is trout & had a trout before)

P(Nth is trout & didn't have a trout before) = (3/5)^(N-1) * (2/5)

P(Nth is trout & had a trout before) =P (Nth is a trout when there's one left) * [ P(1st trial got trout) +P( 2nd trial got trout) + ... +P (N-1 th trial got trout) ]

\begin{align} = (1/4) * [ (2/5) * (3/4)^{N-2} + (3/5) * (2/5) * (3/4)^{N-3} + (3/5)^2 * (2/5) * (3/4)^{N-4} + ... + (3/5)^{N-2}* (2/5) ] \\ =(1/4) * \sum_{i=0}^{N-2} (3/5)^i * (2/5) * (3/4)^{N-2-i} \\ \end{align}

So, $P = (3/5)^{N-1} * (2/5) + (1/4) * \sum_{i=0}^{N-2} (3/5)^i * (2/5) * (3/4)^{N-2-i}$

## in class problem

1. you are an oracle that, when asked, says "yes" with probability P and "no" with probability 1 − P. How do you do this using only a fair, two‐sided coin?

2. In the programming language of your choice, how would you simulate flips of a fair, two‐ sided coin? Do it. Simulate 106 flips. How many heads do you get?

In the programming language of your choice, how would you simulate draws from two weird 7‐sided dice whose faces (showing 1 through 7 spots) have probabilities proportional to: $1:e: \pi :4:5:6:e^ \pi$ respectively ? – Do it. Simulate 106 throws of the dice. How many times is the sum of the two dice equal to 8? – What should it be (in expectation) analytically?

To calculated the expected probability, I summed across the probability of all possible combinations:

I got 62606 times with the sum being 8, over the 10**6 tossing.

So, the observed probability is 0.62606.