text:
# Jury theorem

A jury theorem is a mathematical theorem proving that, under certain assumptions, a decision attained using majority voting in a large group is more likely to be correct than a decision attained by a single expert. It serves as a formal argument for the idea of wisdom of the crowd, for decision of questions of fact by jury trial, and for democracy in general.[1]

The first and most famous jury theorem is Condorcet's jury theorem. It assumes that all voters have independent probabilities to vote for the correct alternative, these probabilities are larger than 1/2, and are the same for all voters. Under these assumptions, the probability that the majority decision is correct is strictly larger when the group is larger; and when the group size tends to infinity, the probability that the majority decision is correct tends to 1.

There are many other jury theorems, relaxing some or all of these assumptions.

## Setting

The premise of all jury theorems is that there is an objective truth, which is unknown to the voters. Most theorems focus on binary issues (issues with two possible states), for example, whether a certain defendant is guilty or innocent, whether a certain stock is going to rise or fall, etc. There are ${\displaystyle n}$  voters (or jurors), and their goal is to reveal the truth. Each voter has an opinion about which of the two options is correct. The opinion of each voter is either correct (i.e., equals the true state), or wrong (i.e., differs than the true state). This is in contrast to other settings of voting, in which the opinion of each voter represents his/her subjective preferences and is thus always "correct" for this specific voter. The opinion of a voter can be considered a random variable: for each voter, there is a positive probability that his opinion equals the true state.

The group decision is determined by the majority rule. For example, if a majority of voters says "guilty" then the decision is "guilty", while if a majority says "innocent" then the decision is "innocent". To avoid ties, it is often assumed that the number of voters ${\displaystyle n}$  is odd. Alternatively, if ${\displaystyle n}$  is even, then ties are broken by tossing a fair coin.

Jury theorems are interested in the probability of correctness - the probability that the majority decision coincides with the objective truth. Typical jury theorems make two kinds of claims on this probability:[1]

1. Growing Reliability: the probability of correctness is larger when the group is larger.
2. Crowd Infallibility: the probability of correctness goes to 1 when the group size goes to infinity.

Claim 1 is often called the non-asymptotic part and claim 2 is often called the asymptotic part of the jury theorem.

Obviously, these claims are not always true, but they are true under certain assumptions on the voters. Different jury theorems make different assumptions.

## Independence, competence, and uniformity

Condorcet's jury theorem makes the following three assumptions:

1. Unconditional Independence: the voters make up their minds independently. In other words, their opinions are independent random variables.
2. Unconditional Competence: the probability that the opinion of a single voter coincides with the objective truth is larger than 1/2 (i.e., the voter is smarter than a random coin-toss).
3. Uniformity: all voters have the same probability of being correct.

The jury theorem of Condorcet says that these three assumptions imply Growing Reliability and Crowd Infallibility.

## Correlated votes: weakening the independence assumption

The opinions of different voters are often correlated, so Unconditional Independence may not hold. In this case, the Growing Reliability claim might fail.

### Example

Let ${\displaystyle p}$  be the probability of a juror voting for the correct alternative and ${\displaystyle c}$  be the (second-order) correlation coefficient between any two correct votes. If all higher-order correlation coefficients in the Bahadur representation[2] of the joint probability distribution of votes equal to zero, and ${\displaystyle (p,c)\in {\mathcal {B}}_{n}}$  is an admissible pair, then the probability of the jury collectively reaching the correct decision under simple majority is given by:

${\displaystyle P(n,p,c)=I_{p}\left({\frac {n+1}{2}},{\frac {n+1}{2}}\right)+0.5c(n-1)(0.5-p){\frac {\partial I_{p}({\frac {n+1}{2}},{\frac {n+1}{2}})}{\partial p}},}$

where ${\displaystyle I_{p}}$  is the regularized incomplete beta function.

Example: Take a jury of three jurors ${\displaystyle (n=3)}$ , with individual competence ${\displaystyle p=0.55}$  and second-order correlation ${\displaystyle c=0.4}$ . Then ${\displaystyle P(3,0.55,0.4)=0.54505}$ . The competence of the jury is lower than the competence of a single juror, which equals to ${\displaystyle 0.55}$ . Moreover, enlarging the jury by two jurors ${\displaystyle (n=5)}$  decreases the jury competence even further, ${\displaystyle P(5,0.55,0.4)=0.5196194}$ . Note that ${\displaystyle p=0.55}$  and ${\displaystyle c=0.4}$  is an admissible pair of parameters. For ${\displaystyle n=5}$  and ${\displaystyle p=0.55}$ , the maximum admissible second-order correlation coefficient equals ${\displaystyle \approx 0.43}$ .

The above example shows that when the individual competence is low but the correlation is high:

• The collective competence under simple majority may fall below that of a single juror;
• Enlarging the jury may decrease its collective competence.

The above result is due to Kaniovski and Zaigraev. They also discuss optimal jury design for homogenous juries with correlated votes.[3]

There are several jury theorems that weaken the Independence assumption in various ways.

### Truth-sensitive independence and competence

In binary decision problems, there is often one option that is easier to detect that the other one. For example, it may be easier to detect that a defendant is guilty (as there is clear evidence for guilt) than to detect that he is innocent. In this case, the probability that the opinion of a single voter is correct is represented by two different numbers: probability given that option #1 is correct, and probability given that option #2 is correct. This also implies that opinions of different voters are correlated. This motivates the following relaxations of the above assumptions:

1. Conditional Independence: for each of the two options, the voters' opinions given that this option is the true one are independent random variables.
2. Conditional Competence: for each of the two options, the probability that a single voter's opinion is correct given that this option is true is larger than 1/2.
3. Conditional Uniformity: for each of the two options, all voters have the same probability of being correct given that this option is true.

Growing Reliability and Crowd Infallibility continue to hold under these weaker assumptions.[1]

One criticism of Conditional Competence is that it depends on the way the decision question is formulated. For example, instead of asking whether the defendant is guilty or innocent, one can ask whether the defendant is guilty of exactly 10 charges (option A), or guilty of another number of charges (0..9 or more than 11). This changes the conditions, and hence, the conditional probability. Moreover, if the state is very specific, then the probability of voting correctly might be below 1/2, so Conditional Competence might not hold.[4]

### Effect of an opinion leader

Another cause of correlation between voters is the existence of an opinion leader. Suppose each voter makes an independent decision, but then each voter, with some fixed probability, changes his opinion to match that of the opinion leader. Jury theorems by Boland[5] and Boland, Proschan and Tong[6] shows that, if (and only if) the probability of following the opinion leader is less than 1-1/2p (where p is the competence level of all voters), then Crowd Infallibility holds.

### Problem-sensitive independence and competence

In addition to the dependence on the true option, there are many other reasons for which voters' opinions may be correlated. For example:

• Deliberation among voters;
• Peer pressure;
• False evidence (e.g. a guilty defendant that excells at pretending to be innocent);
• External conditions (e.g. poor weather affecting their judgement).
• Any other common cause of votes

It is possible to weaken the Conditional Independence assumption, and conditionalize on all common causes of the votes (rather than just the state). In other words, the votes are now independent conditioned on the specific decision problem. However, in a specific problem, the Conditional Competence assumption may not be valid. For example, in a specific problem with false evidence, it is likely that most voters will have a wrong opinion. Thus, the two assumptions - conditional independence and conditional competence - are not justifiable simultaneously (under the same conditionalization).[7]

A possible solution is to weaken Conditional Competence as follows. For each voter and each problem x, there is a probability p(x) that the voter's opinion is correct in this specific problem. Since x is a random variable, p(x) is a random variable too. Conditional Competence requires that p(x) > 1/2 with probability 1. The weakened assumption is:

• Tendency to Competence: for each voter, and for each r>0, the probability that p(x) = 1/2+r is at least as large as the probability that p(x) = 1/2-r.

A jury theorem by Dietrich and Spiekerman[8] says that Conditional Independence, Tendency to Competence, and Conditional Uniformity, together imply Growing Reliability. Note that Crowd Infallibility is not implied. In fact, the probability of correctness tends to a value which is below 1, if and only of Conditional Competence does not hold.

### Bounded correlation

A jury theorem by Pivato[9] shows that, if the average covariance between voters becomes small as the population becomes large, then Crowd Infallibility holds (for some voting rule). There are other jury theorems that take into account the degree to which votes may be correlated.[10][11]

### Other solutions

Other ways to cope with voter correlation include causal networks, dependence structures, and interchangeability.[1]: 10

## Diverse capabilities: weakening the uniformity assumption

Different voters often have different competence levels, so the Uniformity assumption does not hold. In this case, both Growing Reliability and Crowd Infallibility may not hold. This may happen if new voters have much lower competence than existing voters, so that adding new voters decreases the group's probability of correctness. In some cases, the probability of correctness might converge to 1/2 (- a random decision) rather than to 1.[12]

### Stronger competence requirements

Uniformity can be dismissed if the Competence assumption is strengthened. There are several ways to strengthen it:

• Strong Competence: for each voter i, the probability of correctness pi is at least 1/2+e, where e>0 is fixed for all voters. In other words: the competence is bounded away from a fair coin toss. A jury theorem by Paroush[12] shows that Strong Competence and Conditional Independence together imply Crowd Infallibility (but not Growing Reliability).
• Average Competence: the average of the individual competence levels of the voters (i.e. the average of their individual probabilities of deciding correctly) is slightly greater than half, or converges to a value above 1/2. Jury theorems by Grofman, Owen and Feld,[13] and Berend and Paroush,[14] show that Average Competence and Conditional Independence together imply Crowd Infallibility (but not Growing Reliability).

### Random voter selection

instead of assuming that the voter identity is fixed, one can assume that there is a large pool of potential voters with different competence levels, and the actual voters are selected at random from this pool (as in sortition).

A jury theorem by Ben Yashar and Paroush[15] shows that, under certain conditions, the correctness probability of a jury, or of a subset of it chosen at random, is larger than the correctness probability of a single juror selected at random. A more general jury theorem by Berend and Sapir[16] proves that Growing Reliability holds in this setting: the correctness probability of a random committee increases with the committee size. The theorem holds, under certain conditions, even with correlated votes.[17]

A jury theorem by Owen, Grofman and Feld[18] analyzes a setting where the competence level is random. They show what distribution of individual competence maximizes or minimizes the probability of correctness.

### Weighted majority rule

When the competence levels of the voters are known, the simple majority rule may not be the best decision rule. There are various works on identifying the optimal decision rule - the rule maximizing the group correctness probability. Nitzan and Paroush[19] show that, under Unconditional Independence, the optimal decision rule is a weighted majority rule, where the weight of each voter with correctness probability pi is log(pi/(1-pi)), and an alternative is selected iff the sum of weights of its supporters is above some threshold. Grofman and Shapley[20] analyze the effect of interdependencies between voters on the optimal decision rule. Ben-Yashar and Nitzan[21] prove a more general result.

Dietrich[22] generalizes this result to a setting that does not require prior probabilities of the 'correctness' of the two alternative. The only required assumption is Epistemic Monotonicity, which says that, if under certain profile alternative x is selected, and the profile changes such that x becomes more probable, then x is still selected. Dietrich shows that Epistemic Monotonicity implies that the optimal decision rule is weighted majority with a threshold. In the same paper, he generalizes the optimal decision rule to a setting that does not require the input to be a vote for one of the alternatives. It can be, for example, a subjective degree of belief. Moreover, competence parameters do not need to be known. For example, if the inputs are subjective beliefs x1,...,xn, then the optimal decision rule sums log(xi/(1-xi)) and checks whether the sum is above some threshold. Epistemic Monotonicity is not sufficient for computing the threshold itself; the threshold can be computed by assuming expected-utility maximization and prior probabilities.

A general problem with the weighted majority rules is that they require to know the competence levels of the different voters, which is usually hard to compute in an objective way. Baharad, Goldberger, Koppel and Nitzan[23] present an algorithm that solves this problem using statistical machine learning. It requires as input only a list of past votes; it does not need to know whether these votes were correct or not. If the list is sufficiently large, then its probability of correctness converges to 1 even if the individual voters' competence levels are close to 1/2.

## More than two options

Often, decision problems involve three or more options. This critical limitation was in fact recognized by Condorcet (see Condorcet's paradox), and in general it is very difficult to reconcile individual decisions between three or more outcomes (see Arrow's theorem).

This limitation may also be overcome by means of a sequence of votes on pairs of alternatives, as is commonly realized via the legislative amendment process. (However, as per Arrow's theorem, this creates a "path dependence" on the exact sequence of pairs of alternatives; e.g., which amendment is proposed first can make a difference in what amendment is ultimately passed, or if the law—with or without amendments—is passed at all.)

With three or more options, Conditional Competence can be generalized as follows:

• Multioption Conditional Competence: for any two options x and y, if x is correct and y is not, then any voter is more likely to vote for x than for y.

A jury theorem by List and Goodin shows that Multioption Conditional Competence and Conditional Independence together imply Crowd Infallibility.[24] Dietrich and Spiekermann conjecture that they imply Growing Reliability too.[1]: 10  Another related jury theorem is by Everaere, Konieczny and Marquis.[25]

When there are more than two options, there are various voting rules that can be used instead of simple majority. The statistic and utilitarian properties of such rules are analyzed e.g. by Pivato.[26][27]

## Indirect majority systems

Condorcet's theorem considers a direct majority system, in which all votes are counted directly towards the final outcome. Many countries use an indirect majority system, in which the voters are divided into groups. The voters in each group decide on an outcome by an internal majority vote; then, the groups decide on the final outcome by a majority vote among them. For example,[5] suppose there are 15 voters. In a direct majority system, a decision is accepted whenever at least 8 votes support it. Suppose now that the voters are grouped into 3 groups of size 5 each. A decision is accepted whenever at least 2 groups support it, and in each group, a decision is accepted whenever at least 3 voters support it. Therefore, a decision may be accepted even if only 6 voters support it.

Boland, Proschan and Tong[6] prove that, when the voters are independent and p>1/2, a direct majority system - as in Condorcet's theorem - always has a higher chance of accepting the correct decision than any indirect majority system.

Berg and Paroush[28] consider multi-tier voting hierarchies, which may have several levels with different decision-making rules in each level. They study the optimal voting structure, and compares the competence against the benefit of time-saving and other expenses.

Goodin and Spiekermann[29] compute the amount by which a small group of experts should be better than the average voters, in order for them to accept better decisions.

## Strategic voting

It is well-known that, when there are three or more alternatives, and voters have different preferences, they may engage in strategic voting, for example, vote for the second-best option in order to prevent the worst option from being elected. Surprisingly, strategic voting might occur even with two alternatives and when all voters have the same preference, which is to reveal the truth. For example, suppose the question is whether a defendant is guilty or innocent, and suppose a certain juror thinks the true answer is "guilty". However, he also knows that his vote is effective only if the other votes are tied. But, if other votes are tied, it means that the probability that the defendant is guilty is close to 1/2. Taking this into account, our juror might decide that this probability is not sufficient for deciding "guilty", and thus will vote "innocent". But if all other voters do the same, the wrong answer is derived. In game-theoretic terms, truthful voting is might not be a Nash equilibrium.[30] This problem has been termed the swing voter's curse,[31] as it is analogous to the winner's curse in auction theory.

A jury theorem by Peleg and Zamir[32] shows sufficient and necessary conditions for the existence of a Bayesian-Nash equilibrium that satisfies Condorcet's jury theorem. Bozbay, Dietrich and Peters[33] show voting rules that lead to efficient aggregation of the voters' private information even with strategic voting.

In practice, this problem may not be very severe, since most voters care not only about the final outcome, but also about voting correctly by their conscience. Moreover, most voters are not sophisticated enough to vote strategically.[1]: 13

## Subjective opinions

The notion of "correctness" may not be meaningful when making policy decisions, which are based on values or preferences, rather than just on facts.

Some defenders of the theorem hold that it is applicable when voting is aimed at determining which policy best promotes the public good, rather than at merely expressing individual preferences. On this reading, what the theorem says is that although each member of the electorate may only have a vague perception of which of two policies is better, majority voting has an amplifying effect. The "group competence level", as represented by the probability that the majority chooses the better alternative, increases towards 1 as the size of the electorate grows assuming that each voter is more often right than wrong.

Several papers show that, under reasonable conditions, large groups are better trackers of the majority preference.[34]: 323 [35][36]

## References

1. Franz Dietrich and Kai Spiekermann (2019-07-19). "Jury Theorems". The Routledge Handbook of Social Epistemology. Routledge. pp. 386–396. doi:10.4324/9781315717937-38. ISBN 978-1-315-71793-7. S2CID 201086039.
2. ^ Bahadur, R.R. (1961). "A representation of the joint distribution of responses to n dichotomous items". H. Solomon (Ed.), Studies in Item Analysis and Prediction: 158–168.
3. ^ Kaniovski, Serguei; Alexander, Zaigraev (2011). "Optimal Jury Design for Homogeneous Juries with Correlated Votes" (PDF). Theory and Decision. 71 (4): 439–459. CiteSeerX 10.1.1.225.5613. doi:10.1007/s11238-009-9170-2. S2CID 9189720.
4. ^ Estlund, David (2009-08-03). Democratic Authority: A Philosophical Framework. Princeton University Press. ISBN 978-1-4008-3154-8.
5. ^ a b Boland, Philip J. (1989). "Majority Systems and the Condorcet Jury Theorem". Journal of the Royal Statistical Society, Series D (The Statistician). 38 (3): 181–189. doi:10.2307/2348873. ISSN 1467-9884. JSTOR 2348873.
6. ^ a b Boland, Philip J.; Proschan, Frank; Tong, Y. L. (March 1989). "Modelling dependence in simple and indirect majority systems". Journal of Applied Probability. 26 (1): 81–88. doi:10.2307/3214318. ISSN 0021-9002. JSTOR 3214318.
7. ^ Dietrich, Franz (2008). "The Premises of Condorcet's Jury Theorem Are Not Simultaneously Justified". Episteme: A Journal of Social Epistemology. 5 (1): 56–73. doi:10.1353/epi.0.0023. ISSN 1750-0117. S2CID 9214091.
8. ^ Dietrich, Franz; Spiekermann, Kai (2013-03-01). "Epistemic democracy with defensible premises". Economics and Philosophy. 29 (1): 87–120. doi:10.1017/S0266267113000096. ISSN 0266-2671. S2CID 55692104.
9. ^ Pivato, Marcus (2017-10-01). "Epistemic democracy with correlated voters". Journal of Mathematical Economics. 72: 51–69. doi:10.1016/j.jmateco.2017.06.001. ISSN 0304-4068.
10. ^ James Hawthorne. "Voting In Search of the Public Good: the Probabilistic Logic of Majority Judgments" (PDF). Archived from the original (PDF) on 2016-03-23. Retrieved 2009-04-20.
11. ^ see for example: Krishna K. Ladha (August 1992). "The Condorcet Jury Theorem, Free Speech, and Correlated Votes". American Journal of Political Science. 36 (3): 617–634. doi:10.2307/2111584. JSTOR 2111584.
12. ^ a b Paroush, Jacob (1998). "Stay away from fair coins: A Condorcet jury theorem". Social Choice and Welfare. 15 (1): 15–20. doi:10.1007/s003550050088. ISSN 0176-1714. JSTOR 41106237. S2CID 153646874.
13. ^ Bernard Grofman; Guillermo Owen; Scott L. Feld (1983). "Thirteen theorems in search of the truth" (PDF). Theory & Decision. 15 (3): 261–78. doi:10.1007/BF00125672. S2CID 50576036.
14. ^ Berend, Daniel; Paroush, Jacob (1998). "When is Condorcet's Jury Theorem valid?". Social Choice and Welfare. 15 (4): 481–488. doi:10.1007/s003550050118. ISSN 0176-1714. JSTOR 41106274. S2CID 120012958.
15. ^ Ben-Yashar, Ruth; Paroush, Jacob (2000-03-01). "A nonasymptotic Condorcet jury theorem". Social Choice and Welfare. 17 (2): 189–199. doi:10.1007/s003550050014. ISSN 1432-217X. S2CID 32072741.
16. ^ Berend, Daniel; Sapir, Luba (2005). "Monotonicity in Condorcet Jury Theorem". Social Choice and Welfare. 24 (1): 83–92. doi:10.1007/s00355-003-0293-z. ISSN 0176-1714. JSTOR 41106652. S2CID 5617331.
17. ^ Berend, Daniel; Sapir, Luba (2007). "Monotonicity in Condorcet's Jury Theorem with dependent voters". Social Choice and Welfare. 28 (3): 507–528. doi:10.1007/s00355-006-0179-y. ISSN 0176-1714. JSTOR 41106830. S2CID 41180424.
18. ^ Owen, Guillermo; Grofman, Bernard; Feld, Scott L. (1989-02-01). "Proving a distribution-free generalization of the Condorcet Jury Theorem". Mathematical Social Sciences. 17 (1): 1–16. doi:10.1016/0165-4896(89)90012-7. ISSN 0165-4896.
19. ^ Nitzan, Shmuel; Paroush, Jacob (1982). "Optimal Decision Rules in Uncertain Dichotomous Choice Situations". International Economic Review. 23 (2): 289–297. doi:10.2307/2526438. ISSN 0020-6598. JSTOR 2526438.
20. ^ Shapley, Lloyd; Grofman, Bernard (1984-01-01). "Optimizing group judgmental accuracy in the presence of interdependencies". Public Choice. 43 (3): 329–343. doi:10.1007/BF00118940. ISSN 1573-7101. S2CID 14858639.
21. ^ Ben-Yashar, Ruth C.; Nitzan, Shmuel I. (1997). "The Optimal Decision Rule for Fixed-Size Committees in Dichotomous Choice Situations: The General Result". International Economic Review. 38 (1): 175–186. doi:10.2307/2527413. ISSN 0020-6598. JSTOR 2527413.
22. ^ Dietrich, Franz (2006). "General representation of epistemically optimal procedures". Social Choice and Welfare. 26 (2): 263–283. doi:10.1007/s00355-006-0094-2. ISSN 0176-1714. JSTOR 41106734. S2CID 12716206.
23. ^ Baharad, Eyal; Goldberger, Jacob; Koppel, Moshe; Nitzan, Shmuel (2012-01-01). "Beyond Condorcet: optimal aggregation rules using voting records". Theory and Decision. 72 (1): 113–130. doi:10.1007/s11238-010-9240-5. ISSN 1573-7187. S2CID 189822673.
24. ^ Christian List and Robert Goodin (September 2001). "Epistemic democracy : generalizing the Condorcet Jury Theorem" (PDF). Journal of Political Philosophy. 9 (3): 277–306. CiteSeerX 10.1.1.105.9476. doi:10.1111/1467-9760.00128.
25. ^ Patricia Everaere, Sébastien Konieczny and Pierre Marquis (August 2010). "The Epistemic View of Belief Merging: Can We Track the Truth?" (PDF). Proceedings of the 19th European Conference on Artificial Intelligence (ECAI'10). 215 (ECAI 2010): 621–626. CiteSeerX 10.1.1.298.3965. doi:10.3233/978-1-60750-606-5-621.
26. ^ Pivato, Marcus (2013). "Voting rules as statistical estimators". Social Choice and Welfare. 40 (2): 581–630. doi:10.1007/s00355-011-0619-1. ISSN 1432-217X. S2CID 22310477.
27. ^ Pivato, Marcus (2016-08-01). "Asymptotic utilitarianism in scoring rules". Social Choice and Welfare. 47 (2): 431–458. doi:10.1007/s00355-016-0971-2. ISSN 1432-217X. S2CID 34482765.
28. ^ Berg, Sven; Paroush, Jacob (1998-05-01). "Collective decision making in hierarchies". Mathematical Social Sciences. 35 (3): 233–244. doi:10.1016/S0165-4896(97)00047-4. ISSN 0165-4896.
29. ^ Goodin, Robert E.; Spiekermann, Kai (2012-11-01). "Epistemic aspects of representative government". European Political Science Review. 4 (3): 303–325. doi:10.1017/S1755773911000245. ISSN 1755-7739. S2CID 85556702.
30. ^ Austen-Smith, David; Banks, Jeffrey S. (1996). "Information aggregation, rationality, and the Condorcet Jury Theorem" (PDF). American Political Science Review. 90 (1): 34–45. doi:10.2307/2082796. JSTOR 2082796.
31. ^ Feddersen, Timothy J.; Pesendorfer, Wolfgang (1996). "The Swing Voter's Curse". The American Economic Review. 86 (3): 408–424. ISSN 0002-8282. JSTOR 2118204.
32. ^ Peleg, Bezalel; Zamir, Shmuel (2012). "Extending the Condorcet Jury Theorem to a general dependent jury". Social Choice and Welfare. 39 (1): 91–125. doi:10.1007/s00355-011-0546-1. ISSN 0176-1714. JSTOR 41485510. S2CID 5685386.
33. ^ Bozbay, İrem; Dietrich, Franz; Peters, Hans (2014-09-01). "Judgment aggregation in search for the truth". Games and Economic Behavior. 87: 571–590. doi:10.1016/j.geb.2014.02.007. ISSN 0899-8256.
34. ^ Goldman, Alvin (2002). "Knowledge in a Social World". Philosophy and Phenomenological Research. 64 (1): 185–190. doi:10.1111/j.1933-1592.2002.tb00151.x.
35. ^ Goodin, Robert E.; Spiekermann, Kai (December 2015). "Epistemic solidarity as a political strategy". Episteme. 12 (4): 439–457. doi:10.1017/epi.2015.29. ISSN 1742-3600. S2CID 142927949.
36. ^ List, Christian; Spiekermann, Kai (2016), "The Condorcet Jury Theorem and Voter-Specific Truth", Goldman and His Critics, John Wiley & Sons, Ltd, pp. 219–233, doi:10.1002/9781118609378.ch10, ISBN 978-1-118-60937-8, retrieved 2021-05-27
37. ^ "Evolution in collective decision making". Understanding Collective Decision Making: 167–192. 2017. doi:10.4337/9781783473151.00011. ISBN 9781783473151.
38. ^ Pivato, Marcus (2019), Laslier, Jean-François; Moulin, Hervé; Sanver, M. Remzi; Zwicker, William S. (eds.), "Realizing Epistemic Democracy", The Future of Economic Design: The Continuing Development of a Field as Envisioned by Its Researchers, Studies in Economic Design, Cham: Springer International Publishing, pp. 103–112, doi:10.1007/978-3-030-18050-8_16, ISBN 978-3-030-18050-8, S2CID 211399419, retrieved 2021-05-27
39. ^ Anderson, Elizabeth (2006). "The Epistemology of Democracy". Episteme: A Journal of Social Epistemology. 3 (1): 8–22. doi:10.1353/epi.0.0000. ISSN 1750-0117.


text:
# Transfinite Induction/Schema 2/Proof 2

## Theorem

Let $\phi \left({x}\right)$ be a property satisfying the following conditions:

$(1): \quad \phi \left({\varnothing}\right)$ is true
$(2): \quad$ If $x$ is an ordinal, then $\phi \left({x}\right) \implies \phi \left({x^+}\right)$
$(3): \quad$ If $y$ is a limit ordinal, then $\left({\forall x < y: \phi \left({x}\right)}\right) \implies \phi \left({y}\right)$

where $x^+$ denotes the successor of $x$.

Then, $\phi \left({x}\right)$ is true for all ordinals $x$.

## Proof

Define the class:

$A := \left\{{x \in \operatorname{On}: \phi \left({x}\right) = \mathrm T}\right\}$.

Then $\phi \left({x}\right) = \mathrm T$ is equivalent to the statement:

that $x \in A$

The three conditions in the hypothesis become:

$(1a): \quad \varnothing \in A$
$(2a): \quad x \in A \implies x^+ \in A$
$(3a): \quad \left({\forall x < y: x \in A}\right) \implies y \in A$

These are precisely the conditions for the class $A$ in the second principle of transfinite induction.

Therefore, $\operatorname{On} \subseteq A$.

Thus, $\phi \left({x}\right)$ holds for all $x \in \operatorname{On}$.

$\blacksquare$

format: plain


text:
journal_list | How to participate | E-utilities
Seenappa, Manjunatha, Chandrika, and Chikka: A Study of Shielding Properties of X-ray and Gamma in Barium Compounds

### Background

Ionizing radiation is known to be harmful to human health. The shielding of ionizing radiation depends on the attenuation which can be achieved by three main rules, i.e. time, distance and absorbing material.

### Materials and Methods

The mass attenuation coefficient, linear attenuation coefficient, Half Value Layer (HVL) and Tenth Value Layer (TVL) of X-rays (32 keV, 74 keV) and gamma rays (662 keV) are measured in Barium compounds.

### Results and Discussion

The measured values agree well with the theory. The effective atomic numbers (Zeff) and electron density (Ne) of Barium compounds have been computed in the wide energy region 1 keV to 100 GeV using an accurate database of photon-interaction cross sections and the WinXCom program.

### Conclusion

The mass attenuation coefficient and linear attenuation coefficient for BaCO3 is higher than the BaCl2, Ba(No3)2 and BaSO4. HVL, TVL and mean free path are lower for BaCO3 than the BaCl2, Ba(No3)2 and BaSO4. Among the studied barium compounds, BaCO3 is best material for x-ray and gamma shielding.

### Introduction

Ionizing radiation is known to be harmful to human health. The shielding of ionizing radiation depends on the attenuation which can be achieved by three main rules, i. e. time, distance and absorbing material. Shielding is the most effective technique and it is required against X-rays and gamma rays, which are very penetrating [1, 2]. Gamma radiation is best absorbed by dense materials consisting of heavy atoms such as lead and barium [3]. Barium is a dense alkaline earth metal in Group IIA- (alkaline earth metals) of the periodic table that occurs in nature as a divalent cation in combination with other elements. Two commonly found forms of barium are barium sulfate and barium carbonate, often found as underground ore deposits.
Shielding aprons manufactured from environmentally-friendly barium sulfate as a potential substitute for the lead aprons. Barium sulfate shielding can be processed easily to any type, with the same shielding ability as lead. Barium sulfate has long been utilized for in-vivo tests by employing the difference in density between soft tissues in radiology, and it is one of the most economic environment-friendly shielding materials [4]. Hubbell-Seltzer [5] tabulated the mass attenuation co-efficient for elements of atomic number Z=1 to 92 and for energy range 1 kev–100 GeV. Berger-Hubbell [6] developed a XCOM program to calculate a mass attenuation coefficients and it is based on the Hubbell-Seltzer theoretical data. Later, Gerward et al. [7, 8] transformed XCOM program to the Windows platform under the name WinXCom.
It is necessary to search for new radiation shielding materials to replace more toxic and dense shielding materials such as lead. Barium is less toxic and cost effective material compared to lead. Due to the importance of Barium compounds in radiation shielding, the study of an interaction of gamma radiation in these compounds becomes important. Hence in the present work, we have studied radiation shielding properties of Barium compounds. The photon attenuation coefficients (linear and mass attenuation coefficients), effective atomic number and electron density are basic quantities required in determining the attenuation of X-rays and gamma photons in matter. The aim of the present work is to measure the X-ray (32 keV, 74 keV) and Gamma (662 keV) shielding parameters such as mass attenuation coefficient, and linear attenuation coefficient, Half Value Layer (HVL) and Tenth Value Layer (TVL) in Barium compounds such as BaCl2, BaCO3, Ba(No3)2 and BaSO4. The effective atomic numbers (Zeff) and electron density (Ne) of Barium have been computed in the wide region 1 keV to 100 GeV using an accurate database of photon-interaction cross sections and the WinXCom program.

### 1. Present work

#### 1) Theoretical calculation of effective atomic number and electron density

In the present work, the mass attenuation coefficients and photon interaction cross sections in the energy range from 1 keV to 100 GeV are generated using WinXCom [7, 8]. The total molecular cross section σm [milli barn], is computed from the following equation using the values of mass attenuation coefficients [(μ/ρ)c]
##### (1)
$σm(E)=(1N)(μ(E)ρ)c∑iniAi$
where ni is the number of atoms of ith element in a given molecule, (μ/ρ)c is the mass attenuation coefficient of biomolecule, N is the Avogadro’s number, and Ai is the atomic weight of element i. The effective (average) atomic cross section for a particular atom in the compound σa [milli barn] is estimated using the equation,
##### (2)
$σa=σm∑ini$
The effective electronic cross section σe [milli barn] is computed from mass attenuation coefficient (μ/ρ)i of ith element in the given molecule using following equation,
##### (3)
$σe=(1N)∑i{(fiAiZi)(μρ)i}=σaZeff$
where, fi is the fractional abundance (a mass fraction of the ith element in the molecule) and Zi is the atomic number of the ith element in a molecule. Finally the Zeff is estimated as
##### (4)
$Zeff=σaσe$
The effective electron density, Ne, expressed in terms of number of electrons per unit mass is closely related to the effective atomic number. For an element, the electron density is given by Ne=NZ/A [electrons/g]. This expression can be generalized for a compound,
##### (5)
$Ne=N∑iniAiZeff∑ini$
In the present work, Ne and Zeff of Barium compounds are computed from Equations (4) and (5).

#### 2) Measurement of mass attenuation coefficient of gamma and other derived gamma attenuation parameters

Transmission experiments with the narrow beam (good-geometry) setup were used for measuring the incident and transmitted intensities, and hence calculating the attenuation coefficient. The narrow geometry experimental setup used in the present measurement is as shown in Figure 1. We have used a NaI(Tl) crystal detector mounted on a photomultiplier tube housed in a lead chamber and a sophisticated PC based MCA for a detection purpose, gamma source such as 137Cs (661.6 keV) and Barium compounds such as BaCl2, BaCO3, Ba(No3)2 and BaSO4 as target samples. The sample was directly attached to the opening of the lead shield where source is placed. The integral intensities, I0 and I of the beam before and after passing through the sample are measured for sufficient time. (μ/ρ)c of the sample is then estimated using the relation.
##### (6)
$(μρ)c=(1tρ)ln(IoI)$
Where, t and ρ are the thickness and density of the sample respectively. Experimental values of Ne and Zeff of Barium compounds are obtained by substituting the measured values of (μ/ρ)c in Equations (1)-(5). Some of the earlier workers measured the mass attenuation coefficient of photons using alternate to transmission experiments [9, 10]. The high-purity Germanium spectrometers having poor efficiency but high resolution, NaI scintillation detectors have a poor energy resolution but high efficiency [11]. For intensity measurements, efficiency of the detector should be high rather than resolution. Many previous [1215] workers used the NaI scintillation detectors for the measurement of mass attenuation coefficients. Hence we have used the NaI scintillation detectors for the measurements.

### Results and Discussion

The measured 137Cs gamma spectrum in different thickness of target samples such as BaCl2, BaCO3, Ba(No3)2 and BaSO4 are shown in the Figures 25. The experimental mass attenuation coefficients are compared with the theoretical values and it is shown in the Table 1. This comparision shows that the measured values agree well with the theoretical values.
The total linear attenuation coefficient (μ) can be evaluated by multiplying density of compounds to mass attenuation coefficients.
##### (7)
$μ=(μρ)c×ρ$
The total linear attenuation coefficient (μ) is used in the calculation of HVL. HVL is the thickness of a shield or an absorber that reduces the radiation level by a factor of 2 that is to half the initial level and is calculated by the following equation
##### (8)
$HVL=In2μ=0.693μ$
The total linear attenuation coefficient (μ) is also used in the calculation of TVL. It is the thickness of a shield required for attenuating a radiation beam to 10% of its radiation level and is computed by
##### (9)
$TVL=ln10μ=2.303μ$
The average distance between two successive interactions is called the relaxation length (λ). It is also called the photon mean free path which is determined by the equation:
##### (10)
$λ=∫0∞x·exp(-μx) dx∫0∞exp(-μx) dx=1μ$
The measured linear attenuation coefficients (cm−1), HVL (in cm), TVL (in cm) and mean free path (in cm) are compared with the theoretical values. This comparison is as shown in the Tables 25. The theoretical mass attenuation coefficients for the given compounds are computed for wide energy range 1 keV–100 GeV. These values are used in the calculation of linear attenuation coefficients (cm−1), HVL (in cm), TVL (in cm) and mean free path (in cm) for wide energy range 1 keV–100 GeV. Figures 68 show that the variation of HVL, TVL and mean free path for different barium compounds with energy. From these figures, it is found that for all compounds the values of HVL, TVL and mean free path remains constant from 1 keV to 10 keV. These parameters increase sharply up to few MeV and thereafter shows decreasing trend. From these figures it is observed that the HVL, TVL and mean free path increases up to the Epe and then decreases [16]. Here Epe is the energy value at which the photo electric interaction coefficients matches with Compton interaction coefficients. The variation of these parameters with energy is due to dominance of photoelectric absorption in the lower end and dominance of pair production in the higher photon energy region. In the lower energy end photoelectric absorption is dominant, hence these values are minimum. As the energy of incident photon increases, Compton scattering overtakes the photoelectric absorption. It results multiple Compton scattering events which increases these values up to the Epe and becomes maximum at Epe. Thereafter (above Epe), pair production starts dominating (absorption process) which reduces these parameters to minimum value.
The variation of Zeff with photon energy for total photon interactions is as shown in the figure 9 and this variation is because of dominance of different photon interactions. Zeff increases and becomes maximum and decreases sharply in the energy region 0.002–035 MeV. The variation of Zeff with energy is constant for 0.5 MeV to 2 MeV, From 2 MeV to 70 MeV increases and thereafter remains constant. The effective electron density shows similar trend as that of Zeff. The errors in the experiment came from two major sources; the counting rate error and the uncertainties on the thickness of target. The maximum errors in the total mass attenuation coefficients were calculated from errors in incident (I0) and transmitted (I) intensities and a real density (t) by using the propagation of error formula,
##### (11)
$Δ(μρ)=1t(ΔI0I0)2+(ΔII)2+(lnΔII)2+(Δtt)2$
where ΔI0, ΔI, and Δt are the errors in the intensities I0, I, and thickness t of the sample, respectively. The error occurred in measured (μ/ρ)c is 2–3%.

### Conclusion

We have studied the x-ray and gamma radiation shielding properties of Barium compounds such as BaCl2, BaCO3, Ba(No3)2 and BaSO4. The mass attenuation coefficient and linear attenuation coefficient for BaCO3 is higher than the BaCl2, Ba(No3)2 and BaSO4. HVL, TVL and mean free path are lower for BaCO3 than the BaCl2, Ba(No3)2 and BaSO4. Among the studied barium compounds, BaCO3 is best material for X-ray and gamma shielding.

### References

1. Stewart DC. Data for radioactive waste management and nuclear applications. New York, NY: John Wiley and Sons;1985. p. 89.
2. Chilton AB, Sheltie JK, Faw RE. Principles of radiation shielding. 2nd Ed. Englewood Cliffs, NJ: Prentice-Hall;1984. p. 105.
3. Dresner L. Principles of radiation protection engineering. 3rd Ed. New York, NY: McGraw-Hill;1965. p. 204.
4. Kim SC, Dong KR, Chung WK. Medical radiation shielding effect by composition of barium compounds. Ann Nucl Energy. 2012; 47:1–5.
5. Hubbell JH, Seltzer SM. Tables of x-ray mass attenuation coefficients and mass energy-absorption coefficients 1 keV to 20 MeV for elements Z=1 to 92 and 48 additional substances of dosimetric interest. NISTIR 5632. National Institute of Standards and Technology;1995. p. 56.
6. Berger MJ, Hubbell JH. XCOM: Photon cross sections on a personal computer. NBSIR87-3597. National Bureau of Standards, U.S. Department of Commerce;1987. p. 28.
7. Gerward L, Guilbert N, Jensen KB, Levring H. lead phosphate glass containing boron and lithium oxides as a shielding material for neutron- and gamma-radiation. Rad Phys Chem. 2001; 60:23.
8. Gerward L, Guilbert N, Jensen KB, Levring H. WinXCom—a program for calculating X-ray attenuation coefficients. Rad Phys Chem. 2004; 71:653.
9. Chantler CT, Tran CQ, Barnea Z, Paterson D, Cookson DJ, Balaic DX. Measurement of the X-ray mass attenuation coefficient of copper using 8.85–20keV synchrotron radiation. Phys Rev A. 2001; (6):062506.
10. Tran CQ, Chantler CT, Barnea Z. X-Ray Mass attenuation coefficient of silicon: Theory versus experiment, Phys. Rev Lett. 2003; 90(25):257401.
11. Hossain I, Sharip N, Viswanathan KK. Efficiency and resolution of HPGe and NaI(Tl) detectors using gamma-ray spectroscopy. Sci Res Essays. 2012; 7(1):86–89.
12. Goswami B, Chaudhuri N. Measurements of gamma-ray attenuation coefficients. Phys Rev A. 1937; 7(6):1912.
13. Manjunatha HC. Influence of gamma irradiation on conductivity of YBa2Cu3O7. Rad Phys Chem. 2005; 113:24–27.
14. Rudraswamy B, Dhananjaya N, Manjunatha HC. Measurement of absorbed dose rate of gamma radiation for lead compounds. Nucl Instrum Methods Phys Res, Sect A. 2010; 619:171–173.
15. Manjunathaguru V, Umesh TK. Effective atomic numbers and electron densities of some biologically important compounds containing H, C, N and O in the energy range 145–1330 keV. J Phys B: At Mol Opt Phys. 2006; 39(18):3969.
16. Manjunatha HC, Rudraswamy B. A study of thickness and penetration depth dependence of specific absorbed fraction of energy in bone. Ann Nucl Energy. 2011; 38(10):2271–2282.
##### Fig. 1
Schematic diagram of the Experimental Setup. S: Source position, T: Target sample, L: Lead shielding, D: Detector, PM: Photomultiplier.
##### Fig. 2
The measured 137Cs spectrum in different thickness of BaCl2 sample.
##### Fig. 3
The measured 137Cs spectrum in different thickness of Ba(CO3)2 sample.
##### Fig. 4
The measured 137Cs spectrum in different thickness of Ba(NO3)2 sample.
##### Fig. 5
The measured 137Csspectrum in different thickness of BaSO4 sample.
##### Fig. 6
The variation of Half Value Layer (HVL) with energy for different barium compounds.
##### Fig. 7
The variation of Tenth Value Layer (TVL) with energy for different barium compounds.
##### Fig. 8
The variation of Tenth Value Layer means free path or relaxation length with energy for different barium compounds.
##### Fig. 9
The variation of Zeff with energy for different barium compounds.
##### Table 1
Comparison of Measured Mass Attenuation Coefficients (cm2/g) with Theoretical Values
Target compound 32 keV 74 keV 661.7 keV

Expt. Theory Expt. Theory Expt. Theory
BaCl2 8.434±0.194 7.676 3.132±0.072 2.910 0.081±0.0019 0.0754

BaCO3 10.454±0.261 9.523 3.363±0.084 3.143 0.085±0.0021 0.0799

Ba(No3)2 6.996±0.182 6.431 2.751±0.072 2.553 0.082±0.0022 0.0763

BaSO4 7.441±0.201 6.890 2.768±0.080 2.612 0.083±0.0024 0.0781
##### Table 2
Comparision of Measured Linear Attenuation Coefficients (cm−1) with Theoretical Values
Target compound 32 keV 74 keV 661.7 keV

Expt. Theory Expt. Theory Expt. Theory
BaCl2 32.557±0.814 29.629 12.091±0.302 11.233 0.314±0.008 0.291

BaCO3 44.849±1.166 40.854 14.426±0.375 13.483 0.363±0.009 0.343

BaNO3 31.483±0.866 28.940 12.381±0.340 11.489 0.367±0.010 0.343

BaSO4 24.107±0.686 22.324 8.970±0.255 8.463 0.268±0.008 0.253
##### Table 3
Comparision of HVL (cm) with Theoretical Values
Target compound 32 keV 74 keV 661.7 keV

Expt. Theory Expt. Theory Expt. Theory
BaCl2 2.13E-02±5.32E-04 2.34E-02 5.73E-02±1.43E-03 6.17E-02 2.21E+00±5.51E-02 2.38E+00

BaCO3 1.55E-02±3.86E-04 1.70E-02 4.80E-02±1.20E-03 5.14E-02 1.91E+00±4.77E-02 2.02E+00

BaNO3 2.20E-02±5.50E-04 2.40E-02 5.60E-02±1.40E-03 6.03E-02 1.89E+00±4.72E-02 2.02E+00

BaSO4 2.88E-02±7.19E-04 3.10E-02 7.73E-02±1.93E-03 8.19E-02 2.58E+00±6.46E-02 2.74E+00
##### Table 4
Comparision of TVL (cm) with Theoretical Values
Target compound 32 keV 74 keV 661.7 keV

Expt. Theory Expt. Theory Expt. Theory
BaCl2 7.07E-02±1.77E-03 7.77E-02 1.90E-01±4.76E-03 2.05E-01 7.33E+00±1.83E-01 7.91E+00

BaCO3 5.13E-02±1.28E-03 5.64E-02 1.60E-01±3.99E-03 1.71E-01 6.34E+00±1.59E-01 6.72E+00

BaNO3 7.31E-02±1.83E-03 7.96E-02 1.86E-01±4.65E-03 2.00E-01 6.27E+00±1.57E-01 6.71E+00

BaSO4 9.55E-02±2.39E-03 1.03E-01 2.57E-01±6.42E-03 2.72E-01 8.59E+00±2.15E-01 9.10E+00
##### Table 5
Comparision of Photon Mean Free Path (cm) with Theoretical Values
Target compound 32 keV 74 keV 661.7 keV

Expt. Theory Expt. Theory Expt. Theory
BaCl2 3.07E-02±7.68E-04 3.38E-02 8.27E-02±2.07E-03 8.90E-02 3.18E+00±7.96E-02 3.44E+00

BaCO3 2.23E-02±5.58E-04 2.45E-02 6.93E-02±1.73E-03 7.42E-02 2.76E+00±6.89E-02 2.92E+00

BaNO3 3.18E-02±7.94E-04 3.46E-02 8.08E-02±2.02E-03 8.70E-02 2.72E+00±6.81E-02 2.91E+00

BaSO4 4.15E-02±1.04E-03 4.48E-02 1.12E-01±2.79E-03 1.18E-01 3.73E+00±9.32E-02 3.95E+00
Formats:
Article |
PDF(615K) | PubReader | ePub |


text:
# How do you factor 1-x^8 ?

Nov 15, 2016

$\left(1 - x\right) \left(1 + x\right) \left(1 + {x}^{2}\right) \left(1 + {x}^{4}\right)$

#### Explanation:

Remember $\left({a}^{2} - {b}^{2}\right) = \left(a - b\right) \left(a + b\right)$
$\left(1 - {x}^{8}\right) = \left(1 - {x}^{4}\right) \left(1 + {x}^{4}\right)$
=$\left(1 - {x}^{2}\right) \left(1 + {x}^{2}\right) \left(1 + {x}^{4}\right)$
=$\left(1 - x\right) \left(1 + x\right) \left(1 + {x}^{2}\right) \left(1 + {x}^{4}\right)$

Nov 15, 2016

$1 - {x}^{8} = \left(1 - x\right) \left(1 + x\right) \left(1 + {x}^{2}\right) \left(1 - \sqrt{2} x + {x}^{2}\right) \left(1 + \sqrt{2} x + {x}^{2}\right)$

#### Explanation:

The difference of squares identity can be written:

${a}^{2} - {b}^{2} = \left(a - b\right) \left(a + b\right)$

Note also that:

$\left({a}^{2} - k a b + {b}^{2}\right) \left({a}^{2} + k a b + {b}^{2}\right) = {a}^{4} + \left(2 - {k}^{2}\right) {a}^{2} {b}^{2} + {b}^{4}$

In particular, putting $k = \sqrt{2}$ we find:

$\left({a}^{2} - \sqrt{2} a b + {b}^{2}\right) \left({a}^{2} + \sqrt{2} a b + {b}^{2}\right) = {a}^{4} + {b}^{4}$

So we find:

$1 - {x}^{8} = {1}^{2} - {\left({x}^{4}\right)}^{2}$

$\textcolor{w h i t e}{1 - {x}^{8}} = \left(1 - {x}^{4}\right) \left(1 + {x}^{4}\right)$

$\textcolor{w h i t e}{1 - {x}^{8}} = \left({1}^{2} - {\left({x}^{2}\right)}^{2}\right) \left({1}^{4} + {x}^{4}\right)$

$\textcolor{w h i t e}{1 - {x}^{8}} = \left(1 - {x}^{2}\right) \left(1 + {x}^{2}\right) \left({1}^{2} - \sqrt{2} x + {x}^{2}\right) \left({1}^{2} + \sqrt{2} x + {x}^{2}\right)$

$\textcolor{w h i t e}{1 - {x}^{8}} = \left({1}^{2} - {x}^{2}\right) \left(1 + {x}^{2}\right) \left(1 - \sqrt{2} x + {x}^{2}\right) \left(1 + \sqrt{2} x + {x}^{2}\right)$

$\textcolor{w h i t e}{1 - {x}^{8}} = \left(1 - x\right) \left(1 + x\right) \left(1 + {x}^{2}\right) \left(1 - \sqrt{2} x + {x}^{2}\right) \left(1 + \sqrt{2} x + {x}^{2}\right)$

The remaining quadratic factors have no linear factors with Real coefficients.


text:
E. Crypto Lights
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

To monitor cryptocurrency exchange rates trader William invented a wonderful device consisting of $n$ lights arranged in a row. The device functions in the following way:

Initially, all lights on William's device are turned off. At the beginning of a new iteration the device randomly, with a uniform distribution, picks a light that is turned off and turns it on, telling William which cryptocurrency he should invest in. After this iteration if any $k$ consecutive lights contain more than one turned on light, then the device finishes working.

William doesn't like uncertainty, so he wants you to calculate the expected value of the number of lights that are turned on in the device after it finishes working.

Input

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10$). Description of the test cases follows.

The only line for each test case contains two integers $n$ and $k$ ($2 \le k \le n \le 10^5$), which are the total number of lights and the length of subsegment of lights that are being checked, respectively.

Output

For each test case print the answer, modulo $10^9+7$.

Formally, let $M = 10^9+7$. It can be shown that the answer can be expressed as an irreducible fraction $\frac{p}{q}$, where $p$ and $q$ are integers and $q \not \equiv 0 \pmod{M}$. Output the integer equal to $p \cdot q^{-1} \bmod M$. In other words, output such an integer $x$ that $0 \le x < M$ and $x \cdot q \equiv p \pmod{M}$.

Example
Input
3
3 2
15 2
40 15

Output
333333338
141946947
329622137

Note

Explanation of the first sample test case:

Let's write out all possible sequences of light toggles, which will make the device complete its operation:

1. $(1, 2)$  — $2$ lights are turned on
2. $(1, 3, 2)$  — $3$ lights are turned on
3. $(2, 1)$  — $2$ lights are turned on
4. $(2, 3)$  — $2$ lights are turned on
5. $(3, 2)$  — $2$ lights are turned on
6. $(3, 1, 2)$  — $3$ lights are turned on

Then the final expected value will be equal to $\frac{2}{6}$ + $\frac{3}{6}$ + $\frac{2}{6}$ + $\frac{2}{6}$ + $\frac{2}{6}$ + $\frac{3}{6}$ = $\frac{14}{6}$ = $\frac{7}{3}$.

Then the required output will be $333333338$, since $333333338 \cdot 3 \equiv 7 \pmod{10^9+7}$.


text:
# 10-327/Classnotes for Thursday September 24

See some blackboard shots at BBS/10_327-100923-143358.jpg.

 Dror's notes above / Student's notes below

Here are some lecture notes..

• Supplementary Notes to Lecture 4(By Kai)

For lecture 4. Some more illustration on Uniqueness of the product topology satisfying condition 1&2. Complete proof of the subspace topology is the unique topology satisfying condition 1&2. Proof for a couple of claims: The product topology on R_std and R_std is the standard topology on R^2 and subspace topology on Z as a subspace of Y which is a subspace of Z is the same as the subspace topology on Z as a subspace of X, where Y is a subspace of X.


text:
Tango is a sad thought that is danced.think & dancemore quotes

# poetry: beautiful

The Outbreak Poems — artistic emissions in a pandemic

# daily quotation server archives

In the late 90’s I started (a good decade for starts) a daily quotation server project at www.quoteserver.ca. The domain is now defunct—some pages are partially viewable at the Way Back Machine.

Below is the list of quotes I had collected by the end of the life of the project. Most are about love—duh—and a few are jolly jests from funny trenches. You know, that place where mustard gas makes your eyes water.

The quotes weren’t scraped from quote archives—each is meaningful and hand-picked.

## the quote archive

And now for full list of 1,700+ other things worth reading. Such as everything Dorothy Parker has written and ... yes, even the Pinky and Brain quotes, which are a special kind of special.

Quote collections about love, heart, desire, life, death, god, mind, science.

Feeling lucky? Read 10 random quotes. Well, will you, punk?

280
Science is a cemetery of dead ideas.
735
As soon as questions of will or decision or reason or choice of action arise, human science is at a loss.
870
The great tragedy of Science—the slaying of a beautiful hypothesis by an ugly fact.
Biogenesis and Abiogenesis
1466
Even if there is only one possible unified theory, it is just a set of rules and equations. What is it that breathes fire into the equations and makes a universe for them to describe? The usual approach of science of constructing a mathematical model cannot answer the questions of why there should be a universe for the model to describe. Why does the universe go to all the bother of existing?
A Brief History of Time
1467
Science can purify religion from error and superstition. Religion can purify science from idolatry and false absolutes.
1561
In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it’s the exact opposite.
Mathematical Circles Adieu by H. Eves [quoted]
1607
Every attempt to employ mathematical methods in the study of chemical questions must be considered profoundly irrational and contrary to the spirit of chemistry... if mathematical analysis should ever hold a prominent place in chemistry — an aberration which is happily almost impossible — it would occasion a rapid and widespread degeneration of that science.
Cours de Philosophie Positive (1830)
1609
Biology is the only science in which multiplication means the same thing as division.
1610
Science has proof without any certainty. Creationists have certainty without any proof.
1625
This isn’t a rare scene in science or technology. This is the commonest scene of all. Just plain stuck. In traditional maintenance this is the worst of all moments, so bad that you have avoided even thinking about it before you come to it.
Zen and the Art of Motorcycle Maintenance
1630
Art is Science in Love.
1662
A poet is, after all, a sort of scientist, but engaged in a qualitative science in which nothing is measurable. He lives with data that cannot be numbered, and his experiments can be done only once. The information in a poem is, by definition, not reproducible. He becomes an equivalent of scientist, in the act of examining and sorting the things popping in [to his head], finding the marks of remote similarity, points of distant relationship, tiny irregularities that indicate that this one is really the same as that one over there only more important. Gauging the fit, he can meticulously place pieces of the universe together, in geometric configurations that are as beautiful and balanced as crystals.
The Medusa and the Snail: More Notes of a Biology Watcher
1665
How often people speak of art and science as though they were two entirely different things, with no interconnection. An artist is emotional, they think, and uses only his intuition; he sees all at once and has no need of reason. A scientist is cold, they think, and uses only his reason; he argues carefully step by step, and needs no imagination. That is all wrong. The true artist is quite rational as well as imaginative and knows what he is doing; if he does not, his art suffers. The true scientist is quite imaginative as well as rational, and sometimes leaps to solutions where reason can follow only slowly; if he does not, his science suffers.
The Roving Mind (Ch 25)

# Points of Significance celebrates 50th column

Mon 24-08-2020

We are celebrating the publication of our 50th column!

To all our coauthors — thank you and see you in the next column!

Nature Methods Points of Significance: Celebrating 50 columns of clear explanations of statistics. (read)

# Uncertainty and the management of epidemics

Mon 24-08-2020

When modelling epidemics, some uncertainties matter more than others.

Public health policy is always hampered by uncertainty. During a novel outbreak, nearly everything will be uncertain: the mode of transmission, the duration and population variability of latency, infection and protective immunity and, critically, whether the outbreak will fade out or turn into a major epidemic.

The uncertainty may be structural (which model?), parametric (what is $R_0$?), and/or operational (how well do masks work?).

This month, we continue our exploration of epidemiological models and look at how uncertainty affects forecasts of disease dynamics and optimization of intervention strategies.

Nature Methods Points of Significance column: Uncertainty and the management of epidemics. (read)

We show how the impact of the uncertainty on any choice in strategy can be expressed using the Expected Value of Perfect Information (EVPI), which is the potential improvement in outcomes that could be obtained if the uncertainty is resolved before making a decision on the intervention strategy. In other words, by how much could we potentially increase effectiveness of our choice (e.g. lowering total disease burden) if we knew which model best reflects reality?

This column has an interactive supplemental component (download code) that allows you to explore the impact of uncertainty in $R_0$ and immunity duration on timing and size of epidemic waves and the total burden of the outbreak and calculate EVPI for various outbreak models and scenarios.

Nature Methods Points of Significance column: Uncertainty and the management of epidemics. (Interactive supplemental materials)

BjÃ¸rnstad, O.N., Shea, K., Krzywinski, M. & Altman, N. (2020) Points of significance: Uncertainty and the management of epidemics. Nature Methods 17.

BjÃ¸rnstad, O.N., Shea, K., Krzywinski, M. & Altman, N. (2020) Points of significance: Modeling infectious epidemics. Nature Methods 17:455–456.

BjÃ¸rnstad, O.N., Shea, K., Krzywinski, M. & Altman, N. (2020) Points of significance: The SEIRS model for infectious disease dynamics. Nature Methods 17:557–558.

# Cover of Nature Genetics August 2020

Mon 03-08-2020

Our design on the cover of Nature Genetics's August 2020 issue is “Dichotomy of Chromatin in Color” . Thanks to Dr. Andy Mungall for suggesting this terrific title.

Dichotomy of Chromatin in Color. Nature Genetics, August 2020 issue. (read more)

The cover design accompanies our report in the issue Gagliardi, A., Porter, V.L., Zong, Z. et al. (2020) Analysis of Ugandan cervical carcinomas identifies human papillomavirus cladeâspecific epigenome and transcriptome landscapes. Nature Genetics 52:800–810.

# Poster Design Guidelines

Wed 15-07-2020

Clear, concise, legible and compelling.

The PDF template is a poster about making posters. It provides design, typography and data visualiation tips with minimum fuss. Follow its advice until you have developed enough design sobriety and experience to know when to go your own way.

Poster Design Guidelines — Clear, concise, legible and compelling..

# The SEIRS model for infectious disease dynamics

Thu 18-06-2020

Realistic models of epidemics account for latency, loss of immunity, births and deaths.

We continue with our discussion about epidemic models and show how births, deaths and loss of immunity can create epidemic waves—a periodic fluctuation in the fraction of population that is infected.

Nature Methods Points of Significance column: The SEIRS model for infectious disease dynamics. (read)

This column has an interactive supplemental component (download code) that allows you to explore epidemic waves and introduces the idea of the phase plane, a compact way to understand the evolution of an epidemic over its entire course.

Nature Methods Points of Significance column: The SEIRS model for infectious disease dynamics. (Interactive supplemental materials)

BjÃ¸rnstad, O.N., Shea, K., Krzywinski, M. & Altman, N. (2020) Points of significance: The SEIRS model for infectious disease dynamics. Nature Methods 17:557–558.


text:
Hello Every one,
I need to write a program to copy a part of a String from a specified
place.
Eg: if the first String looks like "This is a C program"
I need to extract the part of "C program"
Can I modify the below program

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
FILE *f;
char i=0;
char *c;
char d[256];
if((f=fopen("D:\\data\\def.txt","r"))==NULL){
printf("File can't open.\n");
}
else{
while((c=fgetc(f))!=EOF){

printf("%c",c);
}

}
}
4
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by yellowSnow

Use strtok().

Hello Every one,
I need to write a program to copy a part of a String from a specified
place.
Eg: if the first String looks like "This is a C program"
I need to extract the part of "C program"
Can I modify the below program

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
FILE *f;
char i=0;
char *c;
char d[256];
if((f=fopen("D:\\data\\def.txt","r"))==NULL){
printf("File can't open.\n");
}
else{
while((c=fgetc(f))!=EOF){

printf("%c",c);
}

}
}

I don't mind helping you out, but you really need to start learning how to do your own research. With this question you're dealing with strings so this would suggest that you need to look at the library documentation for string handling functions. This is an essential and valuable skill to learn if you wish to pursue a career in the software development field.

For this particular example, in the first instance, you should look at the strstr() function. I'm not sure what modifications you're looking for in your code snippet. Like your previous post, you have forgotten to return an integer from your main() function (i.e. return 0).

Use strtok().

The strtok() function is a poorly implemented function and except for the absolute simplest cases (or for demonstration purposes) should be avoided. There are plenty of online references as to the pitfalls of this function.

Unless I misinterpreted the OP's question, it didn't sound like he/she was looking to tokenise the string in any case.

just use strstr and use its return value to copy it


text:
# Determine if Injective (One to One) p(x)=8x^2

A function is said to be injective or one-to-one if every y-value has only one corresponding x-value.
Not injective (Not One-to-One)
Determine if Injective (One to One) p(x)=8x^2


text:
# Gravitational Potential Energy

Show/Hide Sub-topics (Gravitation | A Level)

Gravitational potential energy, U of a point mass m, in a gravitational field, is the work done by an external force in bringing that point mass from infinity to that point.

$U \, = \, G \frac{Mm}{r}$

Units of U is Joules (J).


text:
# The Geovation Group

Seeing the Planet Differently

## Urban Heat Loss - Revealed

Where is waste heat (red) leaving your home?

### Overview

Welcome to the Geovation Group. We are an innovative and diverse group of geospatial scientists and researchers motivated to better quantify, visualize, understand and communicate the urban complexity of our planet.

### Home

The Geovation Group was established in 2019, and builds on the legacy of the Foothills Facility for Remote Sensing, a co-directed lab that was created in 2005. This new group is directed by Dr Geoff Hay. We conduct operational and curiosity-driven research in urban remote sensing within the scientific frameworks of GIScience, Landscape Ecology, GEOBIA (Geographic Object-Based Image Analysis), Computer Vision and Machine Learning.

### Mission

Our Mission is to provide a stimulating environment and exceptional resources in Remote Sensing and GIScience for the development of innovative geospatial solutions to pressing urban challenges, and for the training of a new generation of geospatial scientists.

### Scientific Goal

Our scientific goal is to develop and operationally apply innovative theoretical and methodological approaches to better understand, map, monitor, model and communicate the multi-scale dynamics of urban ecosystem patterns and processes.

Generous support for this research has been provided by the following groups and organizations

### Research

Dr Hay’s long-term research program is titled “The Remote Sensing of Urban Energy Efficiency.” It involves the use of high-resolution (25 cm-1m) Thermal Infrared (TIR) imagery, geographic object-based image analysis (GEOBIA), machine learning, GIS and geo-spatial analysis to accurately define urban energy efficiency from space.

Problem: The world wastes more energy than it uses – every year, with billions of gigajoules of wasted heat energy escaping from millions of buildings in thousands of cities worldwide [1]. Although energy-efficiency (EE) programs exist worldwide, most only measure energy consumption – not waste energy [2]. This is because waste-energy is invisible to the human eye, and challenging to quantify – and it’s difficult to measure, monitor, or manage something that we can’t see. Yet, waste-energy is responsible for an estimated 50% of urban energy demand, but is missing from urban energy efficiency equations.

Solution: In order to solve these challenges, Dr Hay’s long-term goal is to evaluate whether high-resolution airborne thermal infrared (TIR) imagery acquired by the Canadian made TABI-1800 (Thermal Airborne Broadband Imager) can be used to quantify, map and monitor urban energy efficiency over time, at the resolution of individual houses, and the scale of a large Canadian city with over 1 million residents.

## Proposed Research Projects

This is an example of projects either underway, or potentially available for students to work on that involve high-resolution (25 cm-1m) TIR imagery, geographic object-based image analysis (GEOBIA), machine learning, GIS and geo-spatial analysis.

## TIR Derived Urban Energy Efficiency

Potential PhD Project

## The Role of Anisotropy on TIR Waste Heat

Potential PhD Project

## Auto-Roof Extraction from TIR Imagery

Potential MSc Project

## TIR Hot-Spot Stability over Time and Space

Potential MSc Project

## Machine Learning to Generate 3D Results from 2D TIR Imagery

Potential MSc Project

## Diagnostic Machine Learning of TIR Heat-Loss Patterns

Potential MSc Project

## Thermal Hyper-spectral Assessment of Roof Materials with the TASI-600

Potential MSc Project

## Defining Roof Materials with RGBi Imagery

Potential MGIS Project

References:[1] International Energy Agency. (2017). Energy Efficiency 2017. Retrieved from iea.org/ publications/ freepublications/ publication/ Energy_Efficiency_2017.pdf [2] Hemachandran B., et al., 2018. Chapter 11. Urban Remote Sensing 2nd edition. (Editor Q. Weng). Taylor and Francis Catalogue ISBN: 978-1-138-05460-8. pp 235 – 270.

## Meet our team

Our diverse team typically fluctuates between 2-10+ individuals, depending on where folks are in their program. Ideally, Dr Hay prefers a research team of 3-5, allowing for meaningful research, teaching and leadership opportunities through team participation and collaboration.

Since 2005, Dr Hay has been engaged in the training of 32 Highly Qualified Personnel (HQP) including: (3) Post Doctoral Fellows, (3) Research Associates, (6) PhD’s, (5) MSc’s, (13) MGIS and (2) Co-supervised students. Several of whom, have gone on to be hired by Dr Hay’s University startup, which has been in business since 2014. Others have gone on to numerous Geospatial positions in Government and Industry, with the first graduate student now an Associate Professor developing his own research program.

## Dr Geoff Hay

Director

Dr. Geoffrey J. Hay is an Associate Professor in GIScience at the University of Calgary, Director of the Geovation Group and Co-Founder and Chief Science Officer at MyHEAT. Inc.

## Salar Ghaffarian

MSc Student

Salar Ghaffarian has a master’s degree in Geomatics Engineering and specializes in Remote Sensing Science. He is using machine -learning and high-res’ thermal imagery to automatically map residential rooftops.

## Corey Hughes

MGIS Student

Corey Hughes has a bachelor’s degree in Urban Studies and Geography from the University of Calgary and is in the UC MGIS program. He specializes in GIS.

## New (2020) $30K /4yr PhD Scholarship in Urban Remote Sensing Deadline: This September 2020 scholarship opportunity closes January 15, 2020 (or when filled). Applicants are invited to apply for a University of Calgary Eyes High PhD Graduate Research Scholarship (open to all nationalities) in Urban Remote Sensing with an emphasis on Geographic Object Based Image Analysis (GEOBIA), Machine Learning and H-Res’ Airborne Thermal Imaging. This award is for$30,000 (CDN) per year for 4 years at the PhD level in the Department of Geography. It will be carried out as a member of the Geovation Group under the supervision of Dr. Geoffrey J. Hay

Preference will be given to those with a strong background in digital urban remote sensing (ENVI & IDL), GEOBIA (ENVI-FX, eCognition), GIS (ESRI, QGIS), spatial statistics (R, SPSS, S-Plus), Machine Learning(pytorch, tensorflow, keras, etc), computer programming (IDL, Matlab and Python) and web-development, as well as strong oral and written English language abilities. The ability to communicate and publicly present well in social settings, and conduct research both on their own, and as part of a team are desirable assets. Ideally, candidates will have interest/expertise in: (i) Segmentation of dense urban roof tops/buildings, roads and vegetation from high-resolution TIR/RGBi imagery, (ii) Generation of heat-loss and energy-efficiency metrics from high-resolution TIR imagery.

The successful candidate will have access to state-of-the-art department computing, software and digital library resources as well as high-resolution thermal and RGBi urban remote sensing and GIS datasets. Opportunities may also be developed for motivated students to collaborate with Industry partners.

Academic Requirement: (i)Applicants must hold a minimum grade equivalent to a GPA of 3.5 on a 4.0 scale OR an (A-) to (A+) average. If your degreeis not from a Canadian institution, please check the Faculty of Graduate Studies website for information on International requirements for admission. (ii) For those whose first language is not English, we require either TOEFL or IELTS. In general, the minimumis an overall IELTS score of 6.5 and no band less than 6.0, and/or TOEFL of 86 with no section less than 20 (internet based).

Supporting documents: Please email Dr Hay with (i) copies of academic transcripts, (ii) a curriculum vitae, (iii) a brief project proposal/statement (one-page max) of how your research may fit Dr Hay’s, (iv) copies of your TOEFL/IELTS results, and (v) a list of at least three references that Dr. Hay can contact. Please ensure that your CV includes a list of all awards/scholarships/grants, presentations, and related publications, as well as areas of expertise, training and knowledge, and other relevant experiences. International students must provide transcripts in their original language as well as an English translation.

Please email supporting documents as a complete package (not compressed) to gjhay@ucalgary.ca and include Subject Heading “Eyes-High PhD Scholarship Application”.

## New GEOBIA Review Publication

In October, 2019 Dr Hay co-authored an important GEOBIA review paper in the ISPRS International Journal of Geo -Information (IJGI) titled GEOBIA Achievements and Spatial Opportunities in the Era of Big Earth Observation Data”.

The objective of this paper is to review the role of spatial concepts in the understanding of image objects as the primary analytical units in semantic EO (Earth Observation) image analysis, and to identify opportunities where GEOBIA may support multi-source remote sensing analysis in the era of big EO data analytics. It also (re-) emphasizes the spatial paradigm as a key requisite for an image understanding system able to deal with and exploit the massive data streams we are currently facing.

## Salar Ghaffarian successfully defends MSc Thesis Proposal

On Sept 11, 2019, Salar Ghaffarian successfully defended his thesis proposal. Salar’s proposal was titled “Automatic Mapping of Residential Rooftops using High-Resolution Thermal Imagery”. In order to meet the needs of our commercial partner (MyHEAT) this research proposes two main goals: (1) optimize a leading-edge Convolutional Neural Network (CNN) method for automatic and accurate rooftop delineation from MyHEAT’s existing H-Res TIR imagery and (2) define the optimal spatial resolution for CNN based rooftop delineation. By satisfying these goals, we expect to: (i) reduce MyHEAT’s ancillary data acquisition/processing costs as their (optimal resolution) TIR imagery will be the only required data source for HEAT loss metrics, (ii) speed up their entire analytical pipe-line, as there will be no need to acquire, correct, or negotiate for auxiliary data, (iii) be able to apply the optimized model to existing and future archives of MyHEAT TIR imagery.

All committee members noted how well written the proposal was. Well done Salar.

## MyHEAT at UCalgary Innovation Fair

Great beginning of 2019 semester at @UCalgary Innovation Fair – Making new friends and 6+ hrs of non-stop @myheatinc conversations on #urban#EnergyEfficiency and thermal remote sensing.

Thanks to my Grad students Corey (left) and Salar (right) for making this happen.

For more pics visit this link

## Dr Hay receives a 5yr NSERC grant

In April 2019, Dr Hay was awarded a 5 year NSERC Discovery Grant (2019-2023) for his newly proposed research program titled “The Remote Sensing of Urban Energy Efficiency”. His long-term goal is to evaluate whether high-resolution airborne thermal infrared (TIR) imagery acquired by the Canadian made TABI-1800 (Thermal Airborne Broadband Imager) can be used to quantify, map and monitor urban energy efficiency over time, at the resolution of individual houses, and the scale of a large Canadian city with over 1 million residents.

This has never been done before with remote sensing imagery.

## Dave Griffith publishes MGIS research

In November 2018, David Griffith (MGIS, 2018)  published his MGIS project in the ISPRS International Journal of Geo -Information* – titled: “Integrating GEOBIA, Machine Learning, and Volunteered Geographic Information to Map Vegetation over Rooftops. It was also selected as the Cover Paper for the GEOBIA 2018 Special issue (GEOBIA in a Changing World).

The objective of this study is to evaluate operational methods for creating a particular type of urban vegetation map – one focused on vegetation over rooftops (VOR) -specifically trees that extend over urban residential buildings.

Since this time, David has accepted a full-time position at MyHEAT, as an Applied Scientist specializing in Remote Sensing and Machine Learning. Great Work Dave!

### Our University Startup Company

In Nov 2013, Dr Hay’s HEAT research team won the MIT Climate CoLab Grand Prize from over 400 crowd sourced contestants world-wide, and appeared in 25+ national/international media interviews. In April 2014, this research was commercialized as MyHEAT Inc.

MyHEAT is a Calgary geomatics startup company built on research developed by Dr Hay’s UofC research team. Since creation, MyHEAT has hired 4 University of Calgary graduate students/Postdocs from the departments of Geography and Geomatics engineering – including several of Dr Hay’s former students.

MyHEAT’s goal is to empower the Urban Energy Efficiency movement with a platform designed to help residents visualize, the amount of invisible waste heat (thermal energy) and associated GHGs leaving their homes, communities and cities, as simply as clicking on an image in Google Maps. In Jan 2016, the MyHEAT team unveiled their first commercial product as www.myheat.ca. In Sept 2016, they completed 500,000+ detailed heat-loss images at the house, community and city level for 5 Alberta Municipalities. By the end of 2017 MyHEAT had web-enabled over 1.3 million detailed images of Canadian buildings’ heat-loss (5.3M residents) in 21 cities and towns. By the end of 2019 MyHEAT had collected and processed proprietary thermal images for 47+ cities, in 2 countries (Canada and the United States), covering 11,000+ sq.km and a population of about 9 million people – with more projects planned in Canada, the United States and Europe.


text:
# "INFO: fail to reach target" in MG5_v2.9.9

Hi Olivier,
I am trying to generate events for the process 'Z+jets'or 'W+jets' in the multicore mode in MG5_v2.9.9 through multi_run with 60k events in each run. But it's failing to generate 60k events in most of the cases. The generated events though are not the same in each run varying from 1k to 50k, sometimes 60k also. The script I'm using for process generation is in below:
----------------
generate p p > z, z > vl vl~ @1
add process p p > z j, z > vl vl~ @2
add process p p > z j j, z > vl vl~ @3
add process p p > z j j j, z > vl vl~ @4
add process p p > z j j j j, z > vl vl~ @5
output
----------------
I found some posts on these. Like, in

you have suggested setting 'hard_survey'>0 and in

you have suggested setting 'sde_strategy'>0. But I noticed that "set sde_strategy 2" doesn't work have to be set manually inside the run_card. Should I use "set hard_survey 2" and "set job_strategy 1" to reduce the CPU time?

Thanks a lot for any help with this.

Regards,
Saumyen

## Question information

Language:
English Edit question
Status:
Expired
For:
Assignee:
No assignee Edit question
Last query:
 Revision history for this message Saumyen Kundu (saumyen.k) said on 2022-04-23: #1

Sorry, "set SDE_strategy 2" worked. But on giving this it says "INFO: modify parameter SDE_strategy of the run_card.dat to None "

Regards,

 Revision history for this message Olivier Mattelaer (olivier-mattelaer) said on 2022-04-27: #3

Here one option to simplify the computation is likely to not decay the Z and let such decay be handle by the parton-shower.
Or if spin-correlation are critical for you (I doubt with decay to neutrino) you can use MadSpin for such decay (which is likely more efficient)

Cheers,

Olivier

 Revision history for this message Saumyen Kundu (saumyen.k) said on 2022-04-27: #4

Thanks a lot, Olivier.

>Here one option to simplify the computation is likely to not decay the Z and let such decay be handled by the parton-shower.

I don't know how to do that. Is it that I leave it as "generate p p > z j j" and do the rest as it is. And at the time of parton shower, it will automatically be decayed invisibly through QED shower? Or something else I have to do?

Also for the process
------
define ww = w- w+; define bb = b b~; define ll = l- l+; define vll = vl vl~
generate p p > ww, ww > ll vll @1
add process p p > ww j, ww > ll vll @2
add process p p > ww j j, ww > ll vll @3
add process p p > ww j j j, ww > ll vll @4
add process p p > ww j j j j, ww > ll vll @5
output wjj
-----
It is taking a huge time (even more than 24 hours) for compilation particularly the process with 4 quarks.
----
INFO: Compiling for process 6/19.
INFO: P5_qq_wpqqqq_wp_lvl
----
Is there a way to reduce the CPU time? I am running via for-loop., although 'multi_run' is also working. And I using
----
set SDE_strategy 2
set hard_survey 1
set job_strategy 1
----

Regards,
Saumyen

 Revision history for this message Olivier Mattelaer (olivier-mattelaer) said on 2022-04-27: #5

> I don't know how to do that. Is it that I leave it as "generate p p > z j j" and do the rest as it is. And at the time of parton shower, it will automatically be decayed invisibly through QED shower? Or something else I have to do?

You will need to specify to the parton-shower that you want the invisible decay (check the manual of the parton-shower that you use)
For the rest yes, you can do it like this
generate p p > z @1
add process p p > z j @2
add process p p > z j j @3
add process p p > z j j j @4
add process p p > z j j j j @5

> Is there a way to reduce the CPU time?

Yes they are ways to fasten the compilation time, but this will remove optimization of the code and therefore the next step will be slower...
You can play (i.e. turn off) the optimization from this paper: 2102.00773 [hep-ph]

Cheers,

Olivier

 Revision history for this message Saumyen Kundu (saumyen.k) said on 2022-04-30: #6

Thanks a lot, Olivier.
So, I tried the process (upto 3 jets) in two ways, decaying the Z-boson in MG5 itself as well as through Pythia8. For decaying through PY8, I added the following lines in the PY8 card, (hope this is the correct way)
----
23:onMode=off
23:onIfAny=12 14 16
----
But I see that the matched xsections and vetoed events are different for the 2 cases: 144.5pb (1418 events) while decaying in MG5 and 4.619e+04pb (3479 events) while decaying in PY8. Are these values expected? I was expecting they should be similar given the fact that the hadron level information in the HepMC files should be the same.

Regards,
Saumyen

 Revision history for this message Olivier Mattelaer (olivier-mattelaer) said on 2022-05-01: #7

Hi,

If I do:

generate p p > z, z > vl vl~ @1
output
launch
shower=PY8

I get:
Cross-section : 8412 +- 12.06 pb
Nb of events : 10000

If I do:
generate p p > z, z > vl vl~ @1
add process p p > z j, z > vl vl~ @2
output
launch
shower=PY8

I get:
=== Results Summary for run: run_01 tag: tag_1 ===

Cross-section : 1.009e+04 +- 17.46 pb
Nb of events : 10000
Pythia8 merged cross-sections are:
> Merging scale = 45 : 8425.9 +/- 9.2 [pb]
> Merging scale = 67.5 : 8437 +/- 9.2 [pb]
> Merging scale = 90 : 8445 +/- 9.2 [pb]

So I do not reproduce your numbers for the first one (and have number certainly closer to your decay within Pythia8 --even if I still do have a factor of two).

 Revision history for this message Launchpad Janitor (janitor) said on 2022-05-16: #8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.


text:
## Zentralblatt MATH

Publications of (and about) Paul Erdös

Zbl.No:  372.41008
Autor:  Erdös, Paul; Newman, D.J.; Reddy, A.R.
Title:  Approximation by rational functions. (In English)
Source:  J. London Math. Soc., II. Ser. 15, 319-328 (1977).
Review:  This paper contains eight theorems on the rational approximation of e-x . We cite one of them by way of an example: ''Let p(x) and q(x) be any polynomials of degress at most n-1 where n \geq 2. Then we have

||e-x-\frac{p(x)}{q(x)}||l_{oo(N)} \geq \frac{(e-1)ne-4n2-7n}{n(3+2\sqrt2)n-1}.'',

(N is the set of non-negative integers). Another theorems is a result of the same type for ||e-x-\frac{p(x)}{q(x)}||L_{oo[0,1]}, with the restriction on p(x) that its coefficients are non-negative. It should have been mentioned that the rational function rm,n(x) with denominator of degree m and numerator of degree n (not m), both defined by an integral, for which it is shown that, theorem 2,

||e-x-rm,n(x)||L_{oo[0,1]} \leq \frac{mnnn}{(m,n)m+n(m+n)!},

is in fact the Padé approximant of e-x. From the various results applied during the proofs of the eight theorems we mention Lagrange's interpolation theorem, interpolation polynomials from the calculus of differences and a lemma of the second author which says that [p(x)] 1/n is concave on [a,b] when the polynomial p has degree at most n, has only real zeros and p(x) < 0 on [a,b].
Reviewer:  H.Jager
Classif.:  * 41A20 Approximation by rational functions

© European Mathematical Society & FIZ Karlsruhe & Springer-Verlag


text:
# Is there a more optimal way to write the following encoding and then assign the result to a label?

Is there a more optimal (or concise) way to write the following:

I have to do some encoding and then assign the result to a label.

// encoding fix
NSString *correctStringTitle = [NSString stringWithCString: [[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding]
encoding: NSUTF8StringEncoding];

cell.titleLabel.text = [correctStringTitle capitalizedString];

-

Here is a marginally more concise solution:

cell.titleLabel.text = [NSString stringWithCString:[[item[@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding].capitalizedString;

If I had to do this more than once I would consider hiding this complexity in an NSString category like:

@interface NSString(Utils)
-(NSString)stringWithLatinEncoding;
@end

@implementation NSString(Utils)

-(NSString)stringWithLatinEncoding
{
return [NSString stringWithCString:[self cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
}

@end

This will simplify your code to:

cell.titleLabel.text = ((NSString*)item[@"main_tag"]).stringWithLatinEncoding.capitalizedString;

-
Thanks. I have fixed it. –  Peter DeWeese Mar 5 '13 at 13:30


text:
# How unitary change of basis related to Trace?

1. Nov 2, 2012

### Shing

1. The problem statement, all variables and given/known data
Shanker 1.7.1
3.)Show that the trace of an operator is unaffected by a unitary change of basis (Equivalently, show $TrΩ=TrU^{\dagger}ΩU$

2. Relevant equations

I can show that via Shanker's hint, but I however can't see how a unitary change of basis links to $TrΩ=TrU^{\dagger}ΩU$, (and it really giving me a headache!) Would anyone be kind enough to explain to me?

Last edited: Nov 2, 2012
2. Nov 2, 2012

### Square

There is some identity which tells you that $\mathrm{Tr}(AB) = \mathrm{Tr}(BA)$ (more generally one could state that the trace is invariant under cyclic permutations). Use it and your problem should be as good as solved.

3. Nov 2, 2012

### Shing

Forgive my ignorance,
But shouldn't "unaffected by a unitary change of basis" be expressed as$TrUΩ=TrΩ$

Last edited: Nov 2, 2012
4. Nov 2, 2012

### Dick

No. A matrix A is a change of basis of a matrix B if A=T^(-1)BT for a nonsingular matrix T.

5. Nov 2, 2012

### Shing

So here is my understanding: we map A to B, A and B represent the same thing in different bases, and their mathematical relation is $A=T^{-1}AT$
am I right?
I have a rough picture now, but Sadly, I still can't see the physical picture, neither the mathematics.
, and shanker surely was telling the truth! One should know a bit more of linear algebra before embrace into it!

Thanks guys, anyway :)

6. Nov 2, 2012

### Shing

Now I got it a bit!
For column vector (1,0) -> (0 ,1)
And T is {(0,1),(1,0)} :)
Did I get it right?

7. Nov 2, 2012

### Dick

If T is unitary then sure that's an option. So T takes (1,0) -> (0,1) and (0,1) -> (1,0). T^(-1) (which happens to be the same as T, but that's usually not the case) does the opposite. So to figure out what A is 'equivalent' (not equal!) to B, you use T to rotate a vector to the basis of B, then let B act on it, then undo the rotation with T^(-1), so A=T^(-1)BT. I know this is vague. But none of this vagueness should stop you from being able to show Tr(B)=Tr(A)=Tr(T^(-1)BT). That change of bases don't change the trace.

Last edited: Nov 2, 2012


text:
# Re: st: Adjusting -tabout- to include top.tex and bot.tex lines automatically?

 From Roy Wada To statalist@hsphsun2.harvard.edu Subject Re: st: Adjusting -tabout- to include top.tex and bot.tex lines automatically? Date Tue, 17 Nov 2009 15:33:19 -0800

> I would also very much appreciate any advice on how to modify top.tex
> and bot.tex to include \begin{table}, \caption, \label and \end{table}
> so that tabout could automatically generate a table float.

You already know about the stuff that goes to the top and the bottom?
You just want to write it automatically? I can't really recommend that
you go into the ado file unless you really want to.

However, you can directly add the stuff you want to the file produced
by -tabout-. Just put it on the top and the bottom. The following is a
fast and easy method of doing this. You have a tex fragment hanging
around? No problem. Just run the code and it will be fixed.

In fact, this is perhaps the easiest method available in Stata for
reading and writing to a text file. No need to go through the
technical foo foo on the way there.

sysuse auto, clear
replace style(tex)

logout, use(table1.tex) clear raw

gen temp=1
set obs =_N+5'
replace temp=0 if temp==.
sort temp

replace raw="\begin{center}" in 1
replace raw="\footnotesize" in 2
replace raw="\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}" in 3
replace raw="\begin{tabularx} {#} {@{} l Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Y@{}} \\" in 4
replace raw="\toprule" in 5

set obs =_N+5'
replace raw="\bottomrule" in  =_N-5'
replace raw="\addlinespace[.75ex]" in =_N-4'
replace raw="\scriptsize{\emph{Source: }#}" in =_N-3'
replace raw="\end{tabularx}" in =_N-2'
replace raw="\normalsize" in =_N-1'
replace raw="\end{center}" in =_N-0'

outsheet raw using raw.tex, noquote noname replace

The stuff about \begin{table}, \caption, \label and \end{table} can be
inserted as well. Just add a few more lines and you are good to go.

Roy
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


text:
# Thread: dbmopen() giving fatal error

1. ## dbmopen() giving fatal error

Hi,

I am designing a questionnaire for my site using php and mySQL (although at present mySQL isn't yet installed so I thought great use dbm.... - so she thought)

But when I type this small script:

<?php
$dbh = dbmopen ( ".data", "c" ) or die( "Couldn't open DBM" ); dbmclose ($dbh);
?>

in an html page and called dbm.php, I get this huge error in IE

Fatal error: Call to undefined function: dbmopen() in c:\PROGRA~1\sambar44\docs\usersurvey\dbm.php on line 9

where line 9 corresponds to the dbmopen() part.

As I am using sambar server I checked through the search facility and re checked the instructions by kevin (great tutorial also!) but its still doesn't work.

One very very frustrated web dev..... with a deadline for monday evening!!!!

Any help would be appreciated I was wondering whether read/write access was the problem but everything is fullcontrol access!?

Sarah

2. Okay here's some tips for you to use dbm perhaps this might help you to solve your problem.

The first argument is the full path file name of the DBM file to be opened,

and the second is the file open mode which is one of the following
"r" = standing for read only

"n" = new(implies read-write, and most likely will truncate an already existing database of the same name)

"c" = create(implies read-write, and most likely will NOT truncate an already existing database of the same name)

int dbmopen(string filename, string mode)

hope this will help

3. just to check a few points;

by full file name do you mean c:..... etc or just from your working root directory?

and also if you are creating one surely it should create it regardless of the full directory?

I did know about the read write etc and started of with c to create but that still isn't working (actually following tutorial in book...)

Anyway I have tried it but for some reason it still objects to the dbmopen() part?!

and if I write int dbmopen("new", "c")

I now get

Parse error: parse error in c:\PROGRA~1\sambar44\docs\usersurvey\dbm.php on line 10

Next question can you create a dbm without using php i.e. is it something I can create and then look for to see if that works?

Thanks for the info though

Sarah

4. yes, try use the full path file name such as c:\to\where\is\your\database

please dont write int dbmopen("new", "c")

you should write dbmopen("c:\to\where\is\your\database","c")

the int infront of it just represent the return value whether the function is done successfully or not.

5. nope still not working... I wrote

$dbh = dbmopen ( "c:\PROGRA~1\sambar44\docs\usersurvey", "c" ) or die( "Couldn't open DMB"); and got the same error message Fatal error: Call to undefined function: dbmopen() in c:\PROGRA~1\sambar44\docs\usersurvey\dbm.php on line 11 I also created a database to see if I could open that and I couldn't! Never mind I shall sleep on it and see what happens, thank you very much for your help - even if we didn't get to teh bottom of it.... Sarah 6. Try This... I think it should work$file = 'c:\PROGRA~1\sambar44\docs\usersurvey';

$dbh = dbmopen ($file, "c" ) or die( "Couldn't open DMB");

7. I just found out a lot of other people are having the same problem. They say you should recompile php with-ndb *and* --with-db, then it should work

8. manipura,

[thank you thank you, bow scrape floor]

cheers I shall try it later when I download all the stuff tonight (at home now) but can you clarify something (still fairly new at this i.e. i've been doing it about 5 hours so far) biu what do you mean recompile php with-ndb *and* --with-db - as basic words as possible.

Nice to know that I am not the only one who is having problems! Although might download mySQL this evening anyway... hey who wants a friday night out anyway

Your help is MUCH appreciated one very frustrated female php programmer (no remarks thank you!)

I also dip into many other languages too jack of all trades really, XML next, haven't done asp much got jsp and perl not too bad...

Sarah

9. recompile... I think its like reinstall or something along those lines. I'm not to familiar with that sort of thing. I'm just the programmer, I don't control the server. Never have, and pribably won't (for at least a few months anyway). I know nothing about installing MySQL or PHP or anything about apache. I just know how to build and structure a site using PHP and MySQL. Hey, I have only been in the industry for 6 or 7 months now.. Don't expect me to know everything now do you? Although I have been slowly learning lingo (just for fun). Making games and stuff.

I think you should get MySQL.. I have it and I love it. Lots of people have it so its not hard to find help.

one very frustrated female php programmer (no remarks thank you!)
Sorry, just have to tease you. But of course you are fustrated, who wouldn't be? I get mad if a script decids not to work. I don't know what its like coming from a female point of view. I don't know many female programmers but it is nice to see at least some out there. The male and female mind works differently (Duh!) but men are for understanding and logic. Women are for experiencing and emotion. Although in this insane world men take over everything. Women should be the ones out being the artists. Men should be out there Builing the walls those peices of art stand upon.

Sorry for spilling my guts out here, I just need a reason not to work today. Ha Ha... I should be working. But I'm in a lazy mood. If you want to find out more go into general chat forum and see my post on christianity. (Hope your not religious)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•